提交 | 用户 | 时间
|
850106
|
1 |
<template> |
H |
2 |
<el-card shadow="never" class="aui-card--fill"> |
|
3 |
<div class="mod-clock"> |
|
4 |
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
|
5 |
<el-form-item> |
|
6 |
<el-input v-model="dataForm.itemCode" placeholder="项目代码" clearable></el-input> |
|
7 |
</el-form-item> |
|
8 |
<el-form-item> |
|
9 |
<el-input v-model="dataForm.clock" placeholder="时间" clearable></el-input> |
|
10 |
</el-form-item> |
|
11 |
<el-form-item> |
|
12 |
<el-button @click="searchDataList()">查询</el-button> |
|
13 |
</el-form-item> |
|
14 |
</el-form> |
|
15 |
<el-table |
|
16 |
:data="dataList" |
|
17 |
border |
|
18 |
v-loading="dataListLoading" |
|
19 |
style="width: 100%;"> |
|
20 |
<el-table-column |
|
21 |
type="index" |
|
22 |
header-align="center" |
|
23 |
align="center" |
|
24 |
width="50"> |
|
25 |
</el-table-column> |
|
26 |
<el-table-column |
|
27 |
prop="itemCode" |
|
28 |
header-align="center" |
|
29 |
align="left" |
|
30 |
min-width="200" |
|
31 |
label="项目代码"> |
|
32 |
</el-table-column> |
|
33 |
<el-table-column |
|
34 |
prop="itemName" |
|
35 |
header-align="center" |
|
36 |
align="left" |
|
37 |
min-width="200" |
|
38 |
label="项目名称"> |
|
39 |
</el-table-column> |
|
40 |
<el-table-column |
|
41 |
prop="clock" |
|
42 |
header-align="center" |
|
43 |
align="center" |
|
44 |
min-width="100" |
|
45 |
label="时钟配置"> |
|
46 |
</el-table-column> |
|
47 |
<el-table-column |
|
48 |
prop="sumValue" |
|
49 |
header-align="center" |
|
50 |
align="right" |
|
51 |
min-width="100" |
|
52 |
label="累计值"> |
|
53 |
</el-table-column> |
|
54 |
<el-table-column |
|
55 |
prop="avgValue" |
|
56 |
header-align="center" |
|
57 |
align="right" |
|
58 |
min-width="100" |
|
59 |
label="平均值"> |
|
60 |
</el-table-column> |
|
61 |
<el-table-column |
|
62 |
prop="reportValue" |
|
63 |
header-align="center" |
|
64 |
align="right" |
|
65 |
min-width="100" |
|
66 |
label="上报值"> |
|
67 |
</el-table-column> |
|
68 |
<el-table-column |
|
69 |
prop="reportHourValue" |
|
70 |
header-align="center" |
|
71 |
align="right" |
|
72 |
min-width="100" |
|
73 |
label="上报小时值"> |
|
74 |
</el-table-column> |
|
75 |
<el-table-column |
|
76 |
prop="collectValue" |
|
77 |
header-align="center" |
|
78 |
align="right" |
|
79 |
min-width="100" |
|
80 |
label="采集值"> |
|
81 |
</el-table-column> |
|
82 |
<el-table-column |
|
83 |
prop="collectHourValue" |
|
84 |
header-align="center" |
|
85 |
align="right" |
|
86 |
min-width="100" |
|
87 |
label="采集小时值"> |
|
88 |
</el-table-column> |
|
89 |
<el-table-column |
|
90 |
prop="startUpTimes" |
|
91 |
header-align="center" |
|
92 |
align="right" |
|
93 |
min-width="100" |
|
94 |
label="启动次数"> |
|
95 |
</el-table-column> |
|
96 |
<el-table-column |
|
97 |
prop="createTime" |
|
98 |
header-align="center" |
|
99 |
align="center" |
|
100 |
width="180" |
|
101 |
label="创建时间"> |
|
102 |
</el-table-column> |
|
103 |
</el-table> |
|
104 |
<el-pagination |
|
105 |
@size-change="sizeChangeHandle" |
|
106 |
@current-change="currentChangeHandle" |
|
107 |
:current-page="pageIndex" |
|
108 |
:page-sizes="[10, 20, 50, 100]" |
|
109 |
:page-size="pageSize" |
|
110 |
:total="totalPage" |
|
111 |
layout="total, sizes, prev, pager, next, jumper"> |
|
112 |
</el-pagination> |
|
113 |
</div> |
|
114 |
</el-card> |
|
115 |
</template> |
|
116 |
<script> |
|
117 |
export default { |
|
118 |
data () { |
|
119 |
return { |
|
120 |
dataForm: { |
|
121 |
clock: '', |
|
122 |
itemCode: '' |
|
123 |
}, |
|
124 |
dataList: [], |
|
125 |
pageIndex: 1, |
|
126 |
pageSize: 10, |
|
127 |
totalPage: 0, |
|
128 |
dataListLoading: false, |
|
129 |
dataListSelections: [], |
|
130 |
addOrUpdateVisible: false |
|
131 |
} |
|
132 |
}, |
|
133 |
components: { |
|
134 |
}, |
|
135 |
mounted () { |
|
136 |
this.getDataList() |
|
137 |
}, |
|
138 |
methods: { |
|
139 |
searchDataList () { |
|
140 |
this.pageIndex = 1 |
|
141 |
this.getDataList() |
|
142 |
}, |
|
143 |
// 获取数据列表 |
|
144 |
getDataList () { |
|
145 |
this.dataListLoading = true |
|
146 |
this.$http({ |
|
147 |
url: '/data/index-data/value/list', |
|
148 |
method: 'get', |
|
149 |
params: this.$http.adornParams({ |
|
150 |
'page': this.pageIndex, |
|
151 |
'limit': this.pageSize, |
|
152 |
'clock': this.dataForm.clock, |
|
153 |
'itemCode': this.dataForm.itemCode |
|
154 |
}) |
|
155 |
}).then(({data}) => { |
|
156 |
if (data && data.code === 0) { |
|
157 |
this.dataList = data.page.list |
|
158 |
this.totalPage = data.page.totalCount |
|
159 |
} else { |
|
160 |
this.dataList = [] |
|
161 |
this.totalPage = 0 |
|
162 |
} |
|
163 |
this.dataListLoading = false |
|
164 |
}) |
|
165 |
}, |
|
166 |
// 每页数 |
|
167 |
sizeChangeHandle (val) { |
|
168 |
this.pageSize = val |
|
169 |
this.pageIndex = 1 |
|
170 |
this.getDataList() |
|
171 |
}, |
|
172 |
// 当前页 |
|
173 |
currentChangeHandle (val) { |
|
174 |
this.pageIndex = val |
|
175 |
this.getDataList() |
|
176 |
}, |
|
177 |
// 多选 |
|
178 |
selectionChangeHandle (val) { |
|
179 |
this.dataListSelections = val |
|
180 |
} |
|
181 |
} |
|
182 |
} |
|
183 |
</script> |