提交 | 用户 | 时间
|
850106
|
1 |
<template> |
H |
2 |
<div class="mod-prod-index-eval"> |
|
3 |
<div class="index-eval-left"> |
|
4 |
<el-card class="box-card"> |
|
5 |
<div slot="header" class="clearfix"> |
|
6 |
<span><i class="el-icon-data-analysis"></i> 生产指标评价</span> |
|
7 |
</div> |
|
8 |
<el-form :inline="true" :model="dataForm" style="margin-top: -10px;"> |
|
9 |
<el-form-item> |
|
10 |
<el-radio-group v-model="dataForm.valueType" @change="handleChange()"> |
|
11 |
<el-radio-button label="数量"></el-radio-button> |
|
12 |
<el-radio-button label="质量"></el-radio-button> |
|
13 |
<el-radio-button label="生产消耗"></el-radio-button> |
|
14 |
<el-radio-button label="过程控制"></el-radio-button> |
|
15 |
<el-radio-button label="管理"></el-radio-button> |
|
16 |
</el-radio-group> |
|
17 |
</el-form-item> |
|
18 |
<el-form-item> |
|
19 |
<el-date-picker |
|
20 |
v-model="dataForm.startDate" |
|
21 |
type="date" |
|
22 |
value-format="yyyy-MM-dd" |
|
23 |
placeholder="选择开始时间"> |
|
24 |
</el-date-picker> |
|
25 |
</el-form-item> |
|
26 |
<el-form-item> |
|
27 |
<el-date-picker |
|
28 |
v-model="dataForm.endDate" |
|
29 |
type="date" |
|
30 |
value-format="yyyy-MM-dd" |
|
31 |
placeholder="选择结束时间"> |
|
32 |
</el-date-picker> |
|
33 |
</el-form-item> |
|
34 |
<el-form-item> |
|
35 |
<el-button :loading="loading" @click="searchData()">{{ $t('query') }}</el-button> |
|
36 |
</el-form-item> |
|
37 |
|
|
38 |
</el-form> |
|
39 |
<div class="chart-boday"> |
|
40 |
<bar-line :option="chartOption" style="height: 400px;"></bar-line> |
|
41 |
</div> |
|
42 |
<div class="pc-text"> |
|
43 |
{{alarmInfo}} |
|
44 |
</div> |
|
45 |
|
|
46 |
<el-table |
|
47 |
v-loading="dataListLoading" |
|
48 |
:data="dataList" |
|
49 |
border |
|
50 |
@selection-change="dataListSelectionChangeHandle" |
|
51 |
@sort-change="dataListSortChangeHandle" |
|
52 |
style="width: 100%;"> |
|
53 |
<el-table-column |
|
54 |
type="index" |
|
55 |
align="center" |
|
56 |
width="50" |
|
57 |
label="序号" |
|
58 |
> |
|
59 |
</el-table-column> |
|
60 |
<el-table-column |
|
61 |
prop="dateTime" |
|
62 |
header-align="center" |
|
63 |
align="center" |
|
64 |
label="日期时间" |
|
65 |
min-width="150"> |
|
66 |
</el-table-column> |
|
67 |
<el-table-column |
|
68 |
prop="firstLevel" |
|
69 |
header-align="center" |
|
70 |
align="center" |
|
71 |
label="数量" |
|
72 |
min-width="50"> |
|
73 |
<template slot-scope="scope"> |
|
74 |
<span :class="getFenClass(JSON.parse(scope.row.firstLevel)[0][0])"> |
|
75 |
{{Number(JSON.parse(scope.row.firstLevel)[0][0])}} |
|
76 |
</span> |
|
77 |
</template> |
|
78 |
</el-table-column> |
|
79 |
<el-table-column |
|
80 |
prop="firstLevel" |
|
81 |
header-align="center" |
|
82 |
align="center" |
|
83 |
label="质量" |
|
84 |
min-width="50"> |
|
85 |
<template slot-scope="scope"> |
|
86 |
<span :class="getFenClass(JSON.parse(scope.row.firstLevel)[0][1])"> |
|
87 |
{{Number(JSON.parse(scope.row.firstLevel)[0][1])}} |
|
88 |
</span> |
|
89 |
</template> |
|
90 |
</el-table-column> |
|
91 |
<el-table-column |
|
92 |
prop="firstLevel" |
|
93 |
header-align="center" |
|
94 |
align="center" |
|
95 |
label="生产消耗" |
|
96 |
min-width="50"> |
|
97 |
<template slot-scope="scope"> |
|
98 |
<span :class="getFenClass(JSON.parse(scope.row.firstLevel)[0][2])"> |
|
99 |
{{Number(JSON.parse(scope.row.firstLevel)[0][2])}} |
|
100 |
</span> |
|
101 |
</template> |
|
102 |
</el-table-column> |
|
103 |
<el-table-column |
|
104 |
prop="firstLevel" |
|
105 |
header-align="center" |
|
106 |
align="center" |
|
107 |
label="过程控制" |
|
108 |
min-width="50"> |
|
109 |
<template slot-scope="scope"> |
|
110 |
<span :class="getFenClass(JSON.parse(scope.row.firstLevel)[0][3])"> |
|
111 |
{{Number(JSON.parse(scope.row.firstLevel)[0][3])}} |
|
112 |
</span> |
|
113 |
</template> |
|
114 |
</el-table-column> |
|
115 |
<el-table-column |
|
116 |
prop="firstLevel" |
|
117 |
header-align="center" |
|
118 |
align="center" |
|
119 |
label="管理" |
|
120 |
min-width="50"> |
|
121 |
<template slot-scope="scope"> |
|
122 |
<span :class="getFenClass(JSON.parse(scope.row.firstLevel)[0][4])"> |
|
123 |
{{Number(JSON.parse(scope.row.firstLevel)[0][4])}} |
|
124 |
</span> |
|
125 |
</template> |
|
126 |
</el-table-column> |
|
127 |
<el-table-column |
|
128 |
prop="zongLevel" |
|
129 |
header-align="center" |
|
130 |
align="center" |
|
131 |
label="总分" |
|
132 |
min-width="50"> |
|
133 |
<template slot-scope="scope"> |
|
134 |
{{Number(JSON.parse(scope.row.zongLevel)[0][0])}} |
|
135 |
</template> |
|
136 |
</el-table-column> |
|
137 |
<el-table-column |
|
138 |
prop="zongLevel" |
|
139 |
header-align="center" |
|
140 |
align="left" |
|
141 |
label="总评价" |
|
142 |
min-width="300"> |
|
143 |
<template slot-scope="scope"> |
|
144 |
{{JSON.parse(scope.row.zongLevel)[1][0] || ''}} |
|
145 |
</template> |
|
146 |
</el-table-column> |
|
147 |
|
|
148 |
|
|
149 |
</el-table> |
|
150 |
<el-pagination |
|
151 |
:current-page="page" |
|
152 |
:page-sizes="[5, 10, 20]" |
|
153 |
:page-size="limit" |
|
154 |
:total="total" |
|
155 |
layout="total, sizes, prev, pager, next, jumper" |
|
156 |
@size-change="pageSizeChangeHandle" |
|
157 |
@current-change="pageCurrentChangeHandle"> |
|
158 |
</el-pagination> |
|
159 |
</el-card> |
|
160 |
</div> |
|
161 |
<div class="index-eval-right"> |
|
162 |
<el-card class="box-card" style="padding: 0px;"> |
|
163 |
<div slot="header" class="clearfix"> |
|
164 |
<span><i class="el-icon-medal"></i> 评分</span> |
|
165 |
</div> |
|
166 |
<div class="today-pf"> |
|
167 |
<div class="today-pf-title"> |
|
168 |
<div class="today-pf-title-text"> |
|
169 |
<p>今日评分</p> |
|
170 |
<p>{{todayDate}}</p> |
|
171 |
</div> |
|
172 |
<div class="today-pf-title-value"> |
|
173 |
{{allEvaluationToday.zong_level[0][0] || 0}} |
|
174 |
</div> |
|
175 |
</div> |
|
176 |
<div class="today-pf-content"> |
|
177 |
<div class="today-pf-content-title"> |
|
178 |
<div><i class="el-icon-chat-round" style="font-size: 20px;"></i></div> |
|
179 |
<div>今日评价</div> |
|
180 |
</div> |
|
181 |
<div class="today-pf-content-value"> |
|
182 |
<span>{{allEvaluationToday.zong_level[1][0] || ''}}</span> |
|
183 |
</div> |
|
184 |
|
|
185 |
</div> |
|
186 |
</div> |
|
187 |
<el-divider/> |
|
188 |
<div class="yesterday-pf"> |
|
189 |
<div class="his-pf-content-item-title"> |
|
190 |
<div class="his-pf-content-item-title-text">昨日评分</div> |
|
191 |
<div class="his-pf-content-item-title-value">{{allEvaluationYesterday.zong_level[0][0] || 0}}</div> |
|
192 |
</div> |
|
193 |
<div class="today-pf-content"> |
|
194 |
<div class="today-pf-content-value" style="width: 100%;"> |
|
195 |
<span>{{allEvaluationYesterday.zong_level[1][0] || ''}}</span> |
|
196 |
</div> |
|
197 |
</div> |
|
198 |
</div> |
|
199 |
<div class="his-pf"> |
|
200 |
<div class="his-pf-title"> |
|
201 |
<span>评价历史</span> |
|
202 |
<!-- <span>--> |
|
203 |
<!-- <el-button type="text" style="float: right; margin-top: -15px">查看全部</el-button>--> |
|
204 |
<!-- </span>--> |
|
205 |
<el-divider/> |
|
206 |
</div> |
|
207 |
<div class="his-pf-content"> |
|
208 |
<div class="his-pf-content-item" v-for="(item, index) in logDate"> |
|
209 |
<div class="his-pf-content-item-title"> |
|
210 |
<div class="his-pf-content-item-title-text">{{item[0]}}</div> |
|
211 |
<div class="his-pf-content-item-title-value">{{item[1]}}</div> |
|
212 |
</div> |
|
213 |
<div class="his-pf-content-item-content"> |
|
214 |
<span>{{item[2]}}</span> |
|
215 |
</div> |
|
216 |
</div> |
|
217 |
</div> |
|
218 |
</div> |
|
219 |
</el-card> |
|
220 |
</div> |
|
221 |
</div> |
|
222 |
</template> |
|
223 |
<script> |
|
224 |
import BarLine from "@/components/chart/bar-line.vue"; |
|
225 |
import {getNowDate, getBeforDate} from '@/utils/dateUtils' |
|
226 |
import {stringToJSON} from '@/utils/jsonUtils' |
|
227 |
import mixinViewModule from '@/mixins/view-module' |
|
228 |
|
|
229 |
export default { |
|
230 |
mixins: [mixinViewModule], |
|
231 |
data() { |
|
232 |
return { |
|
233 |
mixinViewModuleOptions: { |
|
234 |
getDataListURL: '/iailab-ntt-model/any/evaluation/page', |
|
235 |
getDataListIsPage: true, |
|
236 |
deleteURL: '/iailab-ntt-model/any/evaluation', |
|
237 |
deleteIsBatch: true |
|
238 |
}, |
|
239 |
loading: false, |
|
240 |
dataForm: { |
|
241 |
modelId: 'c8c0d7fb-a17d-4813-baf2-e4f714369b8d', |
|
242 |
date: '', |
|
243 |
startDate: '', |
|
244 |
endDate: '', |
|
245 |
valueType: '数量', |
|
246 |
}, |
|
247 |
todayDate: '', |
|
248 |
allEvaluationToday: { |
|
249 |
runTime: '', |
|
250 |
zong_level: [[], []], |
|
251 |
first_level: [[], [], [], []], |
|
252 |
guan_li_fen: [[], []], |
|
253 |
guo_cheng_fen: [[], []], |
|
254 |
zhi_liang_fen: [[], []], |
|
255 |
shu_liang_fen: [[], []] |
|
256 |
}, |
|
257 |
yesterdayDate: '', |
|
258 |
allEvaluationYesterday: { |
|
259 |
runTime: '', |
|
260 |
zong_level: [[], []] |
|
261 |
}, |
|
262 |
logDate: [], |
|
263 |
chartOption: {}, |
|
264 |
chartData: { |
|
265 |
xData: [], |
|
266 |
zongPf: [], |
|
267 |
sl_xx: [], |
|
268 |
sl_zq: [], |
|
269 |
zl_xxk_hf: [], |
|
270 |
zl_xxk_sf: [], |
|
271 |
zl_xxk_rz: [], |
|
272 |
zl_xzk_hf: [], |
|
273 |
zl_xzk_sf: [], |
|
274 |
zl_xzk_rz: [], |
|
275 |
zl_hm_hf: [], |
|
276 |
zl_hm_sf: [], |
|
277 |
zl_hm_rz: [], |
|
278 |
scxh_jh: [], |
|
279 |
scxh_yh: [], |
|
280 |
scxh_dh: [], |
|
281 |
scxh_sh: [], |
|
282 |
gckz_kmhf: [], |
|
283 |
gckz_mmhf: [], |
|
284 |
gckz_1FJ: [], |
|
285 |
gckz_2FJ: [], |
|
286 |
gckz_401DL: [], |
|
287 |
gckz_402DL: [], |
|
288 |
gckz_501DL: [], |
|
289 |
gckz_HHM_RZ: [], |
|
290 |
gckz_HHM_SF: [], |
|
291 |
gl_jxl: [], |
|
292 |
gl_kjl: [], |
|
293 |
gl_kql: [], |
|
294 |
}, |
|
295 |
series: [], |
|
296 |
legend: [], |
|
297 |
alarm: { |
|
298 |
sl: { |
|
299 |
fen: 0, |
|
300 |
isAlarm: false, |
|
301 |
alarmMsg: '', |
|
302 |
adjust: '' |
|
303 |
}, |
|
304 |
zl: { |
|
305 |
fen: 0, |
|
306 |
isAlarm: false, |
|
307 |
alarmMsg: '', |
|
308 |
adjust: '' |
|
309 |
}, |
|
310 |
xh: { |
|
311 |
fen: 0, |
|
312 |
isAlarm: false, |
|
313 |
alarmMsg: '', |
|
314 |
adjust: '' |
|
315 |
}, |
|
316 |
kz: { |
|
317 |
fen: 0, |
|
318 |
isAlarm: false, |
|
319 |
alarmMsg: '', |
|
320 |
adjust: '' |
|
321 |
}, |
|
322 |
gl: { |
|
323 |
fen: 0, |
|
324 |
isAlarm: false, |
|
325 |
alarmMsg: '', |
|
326 |
adjust: '' |
|
327 |
}, |
|
328 |
}, |
|
329 |
alarmInfo: '' |
|
330 |
}; |
|
331 |
}, |
|
332 |
components: {BarLine}, |
|
333 |
mounted() { |
|
334 |
this.limit = 5 |
|
335 |
this.todayDate = getNowDate() |
|
336 |
this.yesterdayDate = getBeforDate(1) |
|
337 |
this.init() |
|
338 |
}, |
|
339 |
methods: { |
|
340 |
init() { |
|
341 |
let that = this |
|
342 |
this.getAllEvaluationToday() |
|
343 |
this.getAllEvaluationYesterday() |
|
344 |
this.getLog() |
|
345 |
this.getChartData() |
|
346 |
}, |
|
347 |
searchData() { |
|
348 |
this.getChartData() |
|
349 |
this.getDataList() |
|
350 |
}, |
|
351 |
getAllEvaluationToday() { |
|
352 |
this.$http.get(`/iailab-ntt-model/api/model/model-date-result`, { |
|
353 |
params: { |
|
354 |
modelCode: 'all_evaluation', |
|
355 |
resultTime: this.todayDate |
|
356 |
} |
|
357 |
}).then(({data: res}) => { |
|
358 |
if (res.code !== 0) { |
|
359 |
return this.$message.error(res.msg) |
|
360 |
} |
|
361 |
if (res.data === null) { |
|
362 |
return |
|
363 |
} |
|
364 |
this.allEvaluationToday.runTime = res.data.runTime |
|
365 |
this.allEvaluationToday.zong_level = stringToJSON(res.data.zong_level) |
|
366 |
this.allEvaluationToday.first_level = stringToJSON(res.data.first_level) |
|
367 |
this.allEvaluationToday.guan_li_fen = stringToJSON(res.data.guan_li_fen) |
|
368 |
this.allEvaluationToday.guo_cheng_fen = stringToJSON(res.data.guo_cheng_fen) |
|
369 |
this.allEvaluationToday.zhi_liang_fen = stringToJSON(res.data.zhi_liang_fen) |
|
370 |
this.allEvaluationToday.shu_liang_fen = stringToJSON(res.data.shu_liang_fen) |
|
371 |
|
|
372 |
|
|
373 |
this.alarm.sl.fen = Number(this.allEvaluationToday.first_level[0][0] || 0).toFixed(0) || 0 |
|
374 |
this.alarm.zl.fen = Number(this.allEvaluationToday.first_level[0][1] || 0).toFixed(0) || 0 |
|
375 |
this.alarm.xh.fen = Number(this.allEvaluationToday.first_level[0][2] || 0).toFixed(0) || 0 |
|
376 |
this.alarm.kz.fen = Number(this.allEvaluationToday.first_level[0][3] || 0).toFixed(0) || 0 |
|
377 |
this.alarm.gl.fen = Number(this.allEvaluationToday.first_level[0][4] || 0).toFixed(0) || 0 |
|
378 |
|
|
379 |
this.alarm.sl.isAlarm = this.allEvaluationToday.first_level[1][0] + '' === '1' |
|
380 |
this.alarm.zl.isAlarm = this.allEvaluationToday.first_level[1][1] + '' === '1' |
|
381 |
this.alarm.xh.isAlarm = this.allEvaluationToday.first_level[1][2] + '' === '1' |
|
382 |
this.alarm.kz.isAlarm = this.allEvaluationToday.first_level[1][3] + '' === '1' |
|
383 |
this.alarm.gl.isAlarm = this.allEvaluationToday.first_level[1][4] + '' === '1' |
|
384 |
|
|
385 |
this.alarm.sl.alarmMsg = this.allEvaluationToday.first_level[2][0] |
|
386 |
this.alarm.zl.alarmMsg = this.allEvaluationToday.first_level[2][1] |
|
387 |
this.alarm.xh.alarmMsg = this.allEvaluationToday.first_level[2][2] |
|
388 |
this.alarm.kz.alarmMsg = this.allEvaluationToday.first_level[2][3] |
|
389 |
this.alarm.gl.alarmMsg = this.allEvaluationToday.first_level[2][4] |
|
390 |
|
|
391 |
this.alarm.sl.adjust = this.allEvaluationToday.first_level[3][0] |
|
392 |
this.alarm.zl.adjust = this.allEvaluationToday.first_level[3][1] |
|
393 |
this.alarm.xh.adjust = this.allEvaluationToday.first_level[3][2] |
|
394 |
this.alarm.kz.adjust = this.allEvaluationToday.first_level[3][3] |
|
395 |
this.alarm.gl.adjust = this.allEvaluationToday.first_level[3][4] |
|
396 |
|
|
397 |
}) |
|
398 |
}, |
|
399 |
getAllEvaluationYesterday() { |
|
400 |
this.$http.get(`/iailab-ntt-model/api/model/model-date-result`, { |
|
401 |
params: { |
|
402 |
modelCode: 'all_evaluation', |
|
403 |
resultTime: this.yesterdayDate |
|
404 |
} |
|
405 |
}).then(({data: res}) => { |
|
406 |
if (res.code !== 0) { |
|
407 |
return this.$message.error(res.msg) |
|
408 |
} |
|
409 |
if (res.data === null) { |
|
410 |
return |
|
411 |
} |
|
412 |
this.allEvaluationYesterday.runTime = res.data.runTime |
|
413 |
this.allEvaluationYesterday.zong_level = stringToJSON(res.data.zong_level) |
|
414 |
}) |
|
415 |
}, |
|
416 |
getLog() { |
|
417 |
let that = this |
|
418 |
this.$http.get(`/iailab-ntt-model/api/model/model-result/list`, { |
|
419 |
params: { |
|
420 |
modelCode: 'all_evaluation', |
|
421 |
lastHour: 24 * 4, |
|
422 |
isAsc: false |
|
423 |
} |
|
424 |
}).then(({data: res}) => { |
|
425 |
res.data.forEach(function (item) { |
|
426 |
that.logDate.push([ |
|
427 |
item.resultTime, |
|
428 |
Number(stringToJSON(item.zong_level)[0][0]).toFixed(1), |
|
429 |
stringToJSON(item.zong_level)[1][0]]) |
|
430 |
}) |
|
431 |
}) |
|
432 |
}, |
|
433 |
getChartData() { |
|
434 |
let that = this |
|
435 |
this.loading = true |
|
436 |
this.$http.get(`/iailab-ntt-model/api/model/model-result/list`, { |
|
437 |
params: { |
|
438 |
modelCode: 'all_evaluation', |
|
439 |
lastHour: 24 * 7, |
|
440 |
isAsc: true, |
|
441 |
startDate: this.dataForm.startDate, |
|
442 |
endDate: this.dataForm.endDate, |
|
443 |
} |
|
444 |
}).then(({data: res}) => { |
|
445 |
this.loading = false |
|
446 |
this.resetFields(this.chartData) |
|
447 |
res.data.forEach(function (item) { |
|
448 |
this.chartData.xData.push(item.resultTime.toString().substr(0, 10)) |
|
449 |
this.chartData.zongPf.push(stringToJSON(item.zong_level)[0][0]) |
|
450 |
|
|
451 |
let shu_liang_fen = stringToJSON(item.shu_liang_fen) |
|
452 |
this.chartData.sl_xx.push(shu_liang_fen[0][0]) |
|
453 |
this.chartData.sl_zq.push(shu_liang_fen[0][1]) |
|
454 |
|
|
455 |
let zhi_liang_fen = stringToJSON(item.zhi_liang_fen) |
|
456 |
this.chartData.zl_xxk_hf.push(zhi_liang_fen[0][0]) |
|
457 |
this.chartData.zl_xxk_sf.push(zhi_liang_fen[0][1]) |
|
458 |
this.chartData.zl_xxk_rz.push(zhi_liang_fen[0][2]) |
|
459 |
this.chartData.zl_xzk_hf.push(zhi_liang_fen[0][3]) |
|
460 |
this.chartData.zl_xzk_sf.push(zhi_liang_fen[0][4]) |
|
461 |
this.chartData.zl_xzk_rz.push(zhi_liang_fen[0][5]) |
|
462 |
this.chartData.zl_hm_hf.push(zhi_liang_fen[0][6]) |
|
463 |
this.chartData.zl_hm_sf.push(zhi_liang_fen[0][7]) |
|
464 |
this.chartData.zl_hm_rz.push(zhi_liang_fen[0][8]) |
|
465 |
|
|
466 |
let sheng_chan_fen = stringToJSON(item.sheng_chan_fen) |
|
467 |
this.chartData.scxh_jh.push(sheng_chan_fen[0][0]) |
|
468 |
this.chartData.scxh_yh.push(sheng_chan_fen[0][1]) |
|
469 |
this.chartData.scxh_dh.push(sheng_chan_fen[0][2]) |
|
470 |
this.chartData.scxh_sh.push(sheng_chan_fen[0][3]) |
|
471 |
|
|
472 |
let guo_cheng_fen = stringToJSON(item.guo_cheng_fen) |
|
473 |
this.chartData.gckz_kmhf.push(guo_cheng_fen[0][0]) |
|
474 |
this.chartData.gckz_mmhf.push(guo_cheng_fen[0][1]) |
|
475 |
this.chartData.gckz_1FJ.push(guo_cheng_fen[0][2]) |
|
476 |
this.chartData.gckz_2FJ.push(guo_cheng_fen[0][3]) |
|
477 |
this.chartData.gckz_401DL.push(guo_cheng_fen[0][4]) |
|
478 |
this.chartData.gckz_402DL.push(guo_cheng_fen[0][5]) |
|
479 |
this.chartData.gckz_501DL.push(guo_cheng_fen[0][6]) |
|
480 |
this.chartData.gckz_HHM_RZ.push(guo_cheng_fen[0][7]) |
|
481 |
|
|
482 |
let guan_li_fen = stringToJSON(item.guan_li_fen) |
|
483 |
this.chartData.gl_jxl.push(guan_li_fen[0][0]) |
|
484 |
this.chartData.gl_kjl.push(guan_li_fen[0][1]) |
|
485 |
this.chartData.gl_kql.push(guan_li_fen[0][2]) |
|
486 |
|
|
487 |
}, this) |
|
488 |
that.handleChange(); |
|
489 |
}) |
|
490 |
}, |
|
491 |
|
|
492 |
resetFields (obj) { |
|
493 |
for (let key in obj) { |
|
494 |
if (obj[key] instanceof Array) { |
|
495 |
obj[key] = [] |
|
496 |
} else if (obj[key] instanceof Object) { |
|
497 |
this.resetFields(obj[key]) |
|
498 |
} else { |
|
499 |
obj[key] = '' |
|
500 |
} |
|
501 |
} |
|
502 |
}, |
|
503 |
handleChange() { |
|
504 |
let that = this |
|
505 |
if (this.dataForm.valueType === "数量") { |
|
506 |
this.series = [ |
|
507 |
{ |
|
508 |
name: "原煤入洗达成率", |
|
509 |
type: 'bar', |
|
510 |
data: that.chartData.sl_xx, |
|
511 |
}, |
|
512 |
{ |
|
513 |
name: "栈桥运输达成率", |
|
514 |
type: 'bar', |
|
515 |
data: that.chartData.sl_zq, |
|
516 |
} |
|
517 |
] |
|
518 |
this.legend = ['原煤入洗达成率', '栈桥运输达成率'] |
|
519 |
this.getChartOption("数量指标评分"); |
|
520 |
this.alarmInfo = `今日得分:${this.alarm.sl.fen}。${this.alarm.sl.alarmMsg}。${this.alarm.sl.adjust}` |
|
521 |
} else if (this.dataForm.valueType === "质量") { |
|
522 |
this.series = [ |
|
523 |
{ |
|
524 |
name: "洗小块灰分", |
|
525 |
type: 'bar', |
|
526 |
data: that.chartData.zl_xxk_hf, |
|
527 |
}, |
|
528 |
{ |
|
529 |
name: "洗小块水分", |
|
530 |
type: 'bar', |
|
531 |
data: that.chartData.zl_xxk_sf, |
|
532 |
}, |
|
533 |
{ |
|
534 |
name: "洗小块热值", |
|
535 |
type: 'bar', |
|
536 |
data: that.chartData.zl_xxk_rz, |
|
537 |
}, |
|
538 |
{ |
|
539 |
name: "洗中块灰分", |
|
540 |
type: 'bar', |
|
541 |
data: that.chartData.zl_xzk_hf, |
|
542 |
}, |
|
543 |
{ |
|
544 |
name: "洗中块水分", |
|
545 |
type: 'bar', |
|
546 |
data: that.chartData.zl_xzk_sf, |
|
547 |
}, |
|
548 |
{ |
|
549 |
name: "洗中块热值", |
|
550 |
type: 'bar', |
|
551 |
data: that.chartData.zl_xzk_rz, |
|
552 |
}, |
|
553 |
{ |
|
554 |
name: "混煤灰分", |
|
555 |
type: 'bar', |
|
556 |
data: that.chartData.zl_hm_hf, |
|
557 |
}, |
|
558 |
{ |
|
559 |
name: "混煤水分", |
|
560 |
type: 'bar', |
|
561 |
data: that.chartData.zl_hm_sf, |
|
562 |
}, |
|
563 |
{ |
|
564 |
name: "混煤热值", |
|
565 |
type: 'bar', |
|
566 |
data: that.chartData.zl_hm_rz, |
|
567 |
} |
|
568 |
] |
|
569 |
this.legend = ['洗小块灰分', '洗小块水分', "洗小块热值", '洗中块灰分', '洗中块水分', "洗中块热值", '混煤灰分', '混煤水分', "混煤热值"] |
|
570 |
this.getChartOption("质量指标评分"); |
|
571 |
this.alarmInfo = `今日得分:${this.alarm.zl.fen}。${this.alarm.zl.alarmMsg}。${this.alarm.zl.adjust}` |
|
572 |
} else if (this.dataForm.valueType === "生产消耗") { |
|
573 |
this.series = [ |
|
574 |
{ |
|
575 |
name: "介耗指标评分", |
|
576 |
type: 'bar', |
|
577 |
data: that.chartData.scxh_jh, |
|
578 |
}, |
|
579 |
{ |
|
580 |
name: "药耗指标评分", |
|
581 |
type: 'bar', |
|
582 |
data: that.chartData.scxh_yh, |
|
583 |
}, |
|
584 |
{ |
|
585 |
name: "电耗指标评分", |
|
586 |
type: 'bar', |
|
587 |
data: that.chartData.scxh_dh, |
|
588 |
}, |
|
589 |
{ |
|
590 |
name: "水耗指标评分", |
|
591 |
type: 'bar', |
|
592 |
data: that.chartData.scxh_sh, |
|
593 |
} |
|
594 |
] |
|
595 |
this.legend = ['介耗指标评分', '药耗指标评分', "电耗指标评分", "水耗指标评分"] |
|
596 |
this.getChartOption("生产消耗指标评分"); |
|
597 |
this.alarmInfo = `今日得分:${this.alarm.xh.fen}。${this.alarm.xh.alarmMsg}。${this.alarm.xh.adjust}` |
|
598 |
} else if (this.dataForm.valueType === "过程控制") { |
|
599 |
this.series = [ |
|
600 |
{ |
|
601 |
name: "块煤灰分", |
|
602 |
type: 'bar', |
|
603 |
data: that.chartData.gckz_kmhf, |
|
604 |
}, |
|
605 |
{ |
|
606 |
name: "末煤灰分", |
|
607 |
type: 'bar', |
|
608 |
data: that.chartData.gckz_mmhf, |
|
609 |
}, |
|
610 |
{ |
|
611 |
name: "1#低压风机", |
|
612 |
type: 'bar', |
|
613 |
data: that.chartData.gckz_1FJ, |
|
614 |
}, |
|
615 |
{ |
|
616 |
name: "2#低压风机", |
|
617 |
type: 'bar', |
|
618 |
data: that.chartData.gckz_2FJ, |
|
619 |
}, |
|
620 |
{ |
|
621 |
name: "401底流浓度", |
|
622 |
type: 'bar', |
|
623 |
data: that.chartData.gckz_401DL, |
|
624 |
}, |
|
625 |
{ |
|
626 |
name: "402底流浓度", |
|
627 |
type: 'bar', |
|
628 |
data: that.chartData.gckz_402DL, |
|
629 |
}, |
|
630 |
{ |
|
631 |
name: "501底流浓度", |
|
632 |
type: 'bar', |
|
633 |
data: that.chartData.gckz_501DL, |
|
634 |
}, |
|
635 |
{ |
|
636 |
name: "配煤混合煤热值", |
|
637 |
type: 'bar', |
|
638 |
data: that.chartData.gckz_HHM_RZ, |
|
639 |
} |
|
640 |
] |
|
641 |
this.legend = ['块煤灰分', '末煤灰分', "1#低压风机", "2#低压风机", "401底流浓度", "402底流浓度", "501底流浓度", "配煤混合煤热值"] |
|
642 |
this.getChartOption("过程控制指标评分"); |
|
643 |
this.alarmInfo = `今日得分:${this.alarm.kz.fen}。${this.alarm.kz.alarmMsg}。${this.alarm.kz.adjust}` |
|
644 |
} else if (this.dataForm.valueType === "管理") { |
|
645 |
this.series = [ |
|
646 |
{ |
|
647 |
name: "检修率", |
|
648 |
type: 'bar', |
|
649 |
data: that.chartData.gl_jxl, |
|
650 |
}, |
|
651 |
{ |
|
652 |
name: "生产运行评价", |
|
653 |
type: 'bar', |
|
654 |
data: that.chartData.gl_kjl, |
|
655 |
}, |
|
656 |
{ |
|
657 |
name: "考勤率", |
|
658 |
type: 'bar', |
|
659 |
data: that.chartData.gl_kql, |
|
660 |
} |
|
661 |
] |
|
662 |
this.legend = ['检修率', '生产运行评价', "考勤率"] |
|
663 |
this.getChartOption("管理指标评分"); |
|
664 |
this.alarmInfo = `今日得分:${this.alarm.gl.fen}。${this.alarm.gl.alarmMsg}。${this.alarm.gl.adjust}` |
|
665 |
} |
|
666 |
}, |
|
667 |
getChartOption(titleText) { |
|
668 |
this.chartOption = { |
|
669 |
title: { |
|
670 |
text: titleText, |
|
671 |
}, |
|
672 |
tooltip: { |
|
673 |
trigger: "axis" |
|
674 |
}, |
|
675 |
legend: { |
|
676 |
data: this.legend, |
|
677 |
right: '10%' |
|
678 |
}, |
|
679 |
xAxis: { |
|
680 |
type: "category", |
|
681 |
data: this.chartData.xData, |
|
682 |
}, |
|
683 |
yAxis: { |
|
684 |
type: 'value', |
|
685 |
min: 0,//最小 |
|
686 |
max: 100,//最大 |
|
687 |
}, |
|
688 |
series: this.series |
|
689 |
}; |
|
690 |
}, |
|
691 |
|
|
692 |
getFenClass(fen) { |
|
693 |
if (Number(fen) >= 60) { |
|
694 |
return 'fen-nor'; |
|
695 |
} else { |
|
696 |
return 'fen-low'; |
|
697 |
} |
|
698 |
|
|
699 |
} |
|
700 |
}, |
|
701 |
}; |
|
702 |
</script> |
|
703 |
<style scoped> |
|
704 |
.fen-low { |
|
705 |
color: #F45354; |
|
706 |
font-weight: 600; |
|
707 |
} |
|
708 |
.fen-nor { |
|
709 |
color: #00c2ff; |
|
710 |
font-weight: 600; |
|
711 |
} |
|
712 |
.his-pf-content-item-title-value { |
|
713 |
width: 30%; |
|
714 |
font-weight: 400; |
|
715 |
font-size: 20px; |
|
716 |
color: #00C2FF; |
|
717 |
text-align: center; |
|
718 |
margin-top: -5px; |
|
719 |
} |
|
720 |
|
|
721 |
.his-pf-content-item-title-text { |
|
722 |
width: 70%; |
|
723 |
} |
|
724 |
|
|
725 |
.his-pf-content-item-content { |
|
726 |
width: 100%; |
|
727 |
height: 50px; |
|
728 |
background: #F7F8FA; |
|
729 |
border-radius: 4px 4px 4px 4px; |
|
730 |
text-align: left; |
|
731 |
padding: 2px; |
|
732 |
margin-top: -5px; |
|
733 |
} |
|
734 |
|
|
735 |
.his-pf-content-item-title { |
|
736 |
width: 100%; |
|
737 |
height: 30px; |
|
738 |
display: flex; |
|
739 |
flex-direction: row; |
|
740 |
} |
|
741 |
|
|
742 |
.his-pf-content-item { |
|
743 |
width: 100%; |
|
744 |
height: 80px; |
|
745 |
} |
|
746 |
|
|
747 |
.his-pf-content { |
|
748 |
width: 100%; |
|
749 |
height: 100%; |
|
750 |
} |
|
751 |
|
|
752 |
.his-pf { |
|
753 |
width: 100%; |
|
754 |
height: 300px; |
|
755 |
padding: 10px 0 10px 0; |
|
756 |
margin-left: -5px; |
|
757 |
margin-right: -5px; |
|
758 |
margin-top: 20px; |
|
759 |
} |
|
760 |
|
|
761 |
.yesterday-pf-title-value { |
|
762 |
width: 30%; |
|
763 |
font-weight: 400; |
|
764 |
font-size: 20px; |
|
765 |
color: #00C2FF; |
|
766 |
text-align: center; |
|
767 |
} |
|
768 |
|
|
769 |
.yesterday-pf-title-text > p { |
|
770 |
margin-top: 0; |
|
771 |
margin-bottom: 5px; |
|
772 |
} |
|
773 |
|
|
774 |
.today-pf-title-text { |
|
775 |
width: 70%; |
|
776 |
} |
|
777 |
|
|
778 |
.yesterday-pf-title { |
|
779 |
width: 100%; |
|
780 |
height: 40px; |
|
781 |
display: flex; |
|
782 |
flex-direction: row; |
|
783 |
padding: 10px 0 10px 0; |
|
784 |
margin-left: -5px; |
|
785 |
margin-right: -5px; |
|
786 |
} |
|
787 |
|
|
788 |
.yesterday-pf { |
|
789 |
width: 100%; |
|
790 |
height: 100px; |
|
791 |
} |
|
792 |
|
|
793 |
.today-pf-content-value { |
|
794 |
width: 70%; |
|
795 |
background: #F7F8FA; |
|
796 |
border-radius: 4px 4px 4px 4px; |
|
797 |
text-align: left; |
|
798 |
padding: 2px; |
|
799 |
} |
|
800 |
|
|
801 |
.today-pf-content-title { |
|
802 |
width: 30%; |
|
803 |
padding: 5px 5px 5px 0; |
|
804 |
text-align: center; |
|
805 |
font-size: 12px; |
|
806 |
} |
|
807 |
|
|
808 |
.today-pf-content { |
|
809 |
height: 60px; |
|
810 |
width: 100%; |
|
811 |
display: flex; |
|
812 |
flex-direction: row; |
|
813 |
padding: 5px; |
|
814 |
} |
|
815 |
|
|
816 |
.today-pf-title-value { |
|
817 |
width: 50%; |
|
818 |
font-weight: 400; |
|
819 |
font-size: 36px; |
|
820 |
color: #4BCB11; |
|
821 |
text-align: center; |
|
822 |
} |
|
823 |
|
|
824 |
.today-pf-title-text > p { |
|
825 |
margin-top: 0; |
|
826 |
margin-bottom: 5px; |
|
827 |
} |
|
828 |
|
|
829 |
.today-pf-title-text { |
|
830 |
width: 50%; |
|
831 |
} |
|
832 |
|
|
833 |
.today-pf-title { |
|
834 |
width: 100%; |
|
835 |
height: 50px; |
|
836 |
display: flex; |
|
837 |
flex-direction: row; |
|
838 |
padding: 10px 0 10px 0; |
|
839 |
margin-left: -5px; |
|
840 |
margin-right: -5px; |
|
841 |
} |
|
842 |
|
|
843 |
.today-pf { |
|
844 |
width: 100%; |
|
845 |
height: 100px; |
|
846 |
} |
|
847 |
|
|
848 |
.box-card { |
|
849 |
width: 100%; |
|
850 |
height: 100%; |
|
851 |
} |
|
852 |
|
|
853 |
.index-eval-right { |
|
854 |
width: 25%; |
|
855 |
height: 100%; |
|
856 |
} |
|
857 |
|
|
858 |
.index-eval-left { |
|
859 |
width: 75%; |
|
860 |
height: 100%; |
|
861 |
padding-right: 10px; |
|
862 |
} |
|
863 |
|
|
864 |
.mod-prod-index-eval { |
|
865 |
width: 100%; |
|
866 |
height: calc(calc(100vh - 48px - 38px - 35px)); |
|
867 |
display: flex; |
|
868 |
flex-direction: row; |
|
869 |
} |
|
870 |
|
|
871 |
.pc-text { |
|
872 |
height: 60px; |
|
873 |
width: 100%; |
|
874 |
display: flex; |
|
875 |
flex-direction: row; |
|
876 |
padding: 5px; |
|
877 |
background: #F7F8FA; |
|
878 |
font-size: 16px; |
|
879 |
} |
|
880 |
</style> |