提交 | 用户 | 时间
|
c74dcb
|
1 |
<template> |
W |
2 |
<el-table |
|
3 |
ref="multipleTable" |
|
4 |
:data="list1" |
|
5 |
height="259" |
|
6 |
border |
|
7 |
tooltip-effect="dark" |
|
8 |
style="width: 100%" |
|
9 |
@selection-change="handleSelectionChange"> |
|
10 |
<el-table-column |
|
11 |
type="index" |
|
12 |
width="50"> |
|
13 |
</el-table-column> |
|
14 |
<el-table-column |
|
15 |
type="selection" |
|
16 |
align="center" |
|
17 |
width="55"> |
|
18 |
</el-table-column> |
|
19 |
<el-table-column |
|
20 |
label="箱体编码" |
|
21 |
align="center" |
|
22 |
width="160"> |
|
23 |
<template slot-scope="scope">{{ scope.row.sfcCode }}</template> |
|
24 |
</el-table-column> |
|
25 |
<el-table-column |
|
26 |
prop="name" |
|
27 |
label="工位" |
|
28 |
align="center" |
|
29 |
width="120"> |
|
30 |
<template slot-scope="scope">{{ scope.row.locationCode }}</template> |
|
31 |
</el-table-column> |
|
32 |
<el-table-column |
|
33 |
prop="address" |
|
34 |
align="center" |
|
35 |
label="参数名" |
|
36 |
show-overflow-tooltip> |
|
37 |
<template slot-scope="scope">{{ scope.row.paramName }}</template> |
|
38 |
</el-table-column> |
|
39 |
<el-table-column |
|
40 |
prop="address" |
|
41 |
align="center" |
|
42 |
label="采集结果" |
|
43 |
show-overflow-tooltip> |
|
44 |
<template slot-scope="scope">{{ scope.row.paramValue }}</template> |
|
45 |
</el-table-column> |
|
46 |
<el-table-column |
|
47 |
prop="address" |
|
48 |
align="center" |
|
49 |
label="单位" |
|
50 |
show-overflow-tooltip> |
|
51 |
<template slot-scope="scope">{{ scope.row.unit }}</template> |
|
52 |
</el-table-column> |
|
53 |
<el-table-column |
|
54 |
prop="address" |
|
55 |
align="center" |
2c65c3
|
56 |
label="采集时间" |
c74dcb
|
57 |
show-overflow-tooltip> |
2c65c3
|
58 |
<template slot-scope="scope">{{ scope.row.collectionTime }}</template> |
c74dcb
|
59 |
</el-table-column> |
W |
60 |
</el-table> |
|
61 |
</template> |
|
62 |
|
|
63 |
<script> |
|
64 |
export default { |
|
65 |
name: "report1", |
|
66 |
props:['list1'], |
|
67 |
data() { |
|
68 |
return { |
|
69 |
total: '', |
|
70 |
queryParams: { |
|
71 |
pageNum: 5, |
|
72 |
pageSize: 5 |
|
73 |
}, |
|
74 |
tableData: [{ |
|
75 |
date: '2016-05-03', |
|
76 |
name: '王小虎', |
|
77 |
address: '上海市普陀区金沙江路 1518 弄' |
|
78 |
}, { |
|
79 |
date: '2016-05-02', |
|
80 |
name: '王小虎', |
|
81 |
address: '上海市普陀区金沙江路 1518 弄' |
|
82 |
}, { |
|
83 |
date: '2016-05-04', |
|
84 |
name: '王小虎', |
|
85 |
address: '上海市普陀区金沙江路 1518 弄' |
|
86 |
}, { |
|
87 |
date: '2016-05-01', |
|
88 |
name: '王小虎', |
|
89 |
address: '上海市普陀区金沙江路 1518 弄' |
|
90 |
}, { |
|
91 |
date: '2016-05-08', |
|
92 |
name: '王小虎', |
|
93 |
address: '上海市普陀区金沙江路 1518 弄' |
|
94 |
}, { |
|
95 |
date: '2016-05-06', |
|
96 |
name: '王小虎', |
|
97 |
address: '上海市普陀区金沙江路 1518 弄' |
|
98 |
}, { |
|
99 |
date: '2016-05-07', |
|
100 |
name: '王小虎', |
|
101 |
address: '上海市普陀区金沙江路 1518 弄' |
|
102 |
}], |
|
103 |
multipleSelection: [] |
|
104 |
} |
|
105 |
}, |
|
106 |
methods: { |
|
107 |
toggleSelection(rows) { |
|
108 |
if (rows) { |
|
109 |
rows.forEach(row => { |
|
110 |
this.$refs.multipleTable.toggleRowSelection(row); |
|
111 |
}); |
|
112 |
} else { |
|
113 |
this.$refs.multipleTable.clearSelection(); |
|
114 |
} |
|
115 |
}, |
|
116 |
handleSelectionChange(val) { |
|
117 |
this.multipleSelection = val; |
|
118 |
}, |
|
119 |
getList(){ |
|
120 |
|
|
121 |
} |
|
122 |
} |
|
123 |
} |
|
124 |
</script> |
|
125 |
|
|
126 |
<style scoped> |
|
127 |
|
|
128 |
</style> |