1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<template>
<div class="leakage-cable">
<el-button-group>
<el-button
v-for="item in tabs"
:key="item.key"
:type="activeName === item.key ? 'primary' : ''"
@click="changeType(item)"
>{{ item.label }}</el-button
>
</el-button-group>
<railWayTable v-if="activeName == '0'"></railWayTable>
<stationTable v-if="activeName == '1'"></stationTable>
<fsuTable v-if="activeName == '2'"></fsuTable>
<monitorTable v-if="activeName == '3'"></monitorTable>
<leakyTable v-if="activeName == '4'"></leakyTable>
</div>
</template>
<script>
import railWayTable from "./comp/railWayTable.vue";
import stationTable from "./comp/stationTable.vue";
import fsuTable from "./comp/fsuTable.vue";
import monitorTable from "./comp/monitorTable.vue";
import leakyTable from "./comp/leakyTable.vue";
import Pagination from "@/components/Pagination";
export default {
components: {
Pagination,
railWayTable,
stationTable,
fsuTable,
monitorTable,
leakyTable,
},
data() {
return {
params: {
pageNum: 1,
pageSize: 10,
},
total: 10,
activeName: "0",
tabs: [
{
label: "铁路线",
key: "0",
},
{
label: "站点",
key: "1",
},
{
label: "FSU",
key: "2",
},
{
label: "监测设备",
key: "3",
},
{
label: "漏缆",
key: "4",
},
{
label: "天馈线",
key: "5",
},
],
tableData2: [],
tableData: [],
multipleSelection: [],
ids: [],
};
},
methods: {
tableRowClassName({ row, rowIndex }) {
return rowIndex % 2 === 0 ? "" : "single-row";
},
changeType(item) {
this.activeName = item.key;
},
refresh() {},
query() {},
exportData() {},
},
mounted() {},
};
</script>
<style lang="scss" scoped>
.leakage-cable {
.leakage-top {
margin-bottom: 20px;
display: flex;
align-items: flex-end;
justify-content: space-between;
}
& ::v-deep .cell {
color: #333333;
}
& ::v-deep .stripe {
background-color: #eaf1fe;
}
& ::v-deep .red {
background-color: #f00;
}
& ::v-deep .green {
background-color: green;
}
.page {
display: flex;
align-items: center;
justify-content: center;
margin: 20px 0;
.pageNum {
margin: 0 20px;
}
}
}
</style>
<style lang="scss">
.statistics-table {
.single-row {
background: #f1f6ff;
}
td {
padding: 5px !important;
}
}
</style>