Compare commits
221 Commits
41cef952ac
...
8b88d6a9b9
Author | SHA1 | Date | |
---|---|---|---|
8b88d6a9b9 | |||
b672d0ff57 | |||
b0e38a378b | |||
63e77eb3cb | |||
967fed392d | |||
0a91161afe | |||
896675a3e9 | |||
6793ac7c50 | |||
|
009cf3b8e6 | ||
|
5098555a5e | ||
1d4a3f1d93 | |||
23f63c30bf | |||
26bf5165df | |||
2a504a715f | |||
1bbd9b1e3a | |||
004468ca8e | |||
65370dbdcb | |||
61b6ceb965 | |||
|
39aaf82345 | ||
4f810ee26a | |||
|
4dceaca2e3 | ||
|
7ad64c7611 | ||
|
0eae057ddc | ||
|
101dc1807e | ||
3fb9ed3c73 | |||
32b7abea82 | |||
|
fe836b36ce | ||
|
c7ec6da39c | ||
4af038ffca | |||
c6e0e0bd2f | |||
ccce85ce21 | |||
|
204e200102 | ||
|
1045a5fbb0 | ||
f5273a2b27 | |||
62ba32ca17 | |||
7a98ee1d0c | |||
|
62f1901c72 | ||
|
59c62fcb9c | ||
99f9ced0ee | |||
4c65cab29c | |||
029a2fa6d7 | |||
|
bd0636b458 | ||
|
77361c3d5f | ||
|
41e0d34551 | ||
a7dd966e3f | |||
21dc0412e3 | |||
6c837a7006 | |||
c494927b9c | |||
720849ba7d | |||
|
f84d66dd7f | ||
|
459d9268a0 | ||
99ac9ace51 | |||
2c34573e28 | |||
ebe926b83e | |||
16e5142ab5 | |||
2eb21ba31f | |||
4918008a47 | |||
|
c1ca2db161 | ||
|
44bc4a4659 | ||
|
c47dddfcdc | ||
af347f7380 | |||
778ebf6906 | |||
|
3bc12b8830 | ||
|
d5b1d418a8 | ||
861bda5df2 | |||
dd2f982677 | |||
60dd76f165 | |||
ac3957e0c7 | |||
|
05ce0dbd84 | ||
|
7534ab7817 | ||
820d503d8d | |||
e1015e382f | |||
670ded0511 | |||
|
bee302b08e | ||
|
d230508e9c | ||
c95635565a | |||
2e5ba8a891 | |||
a637977e12 | |||
|
c3b747d019 | ||
|
7ac9b6d35f | ||
286204165a | |||
3aa7825c56 | |||
cd416d7d01 | |||
ec3b6100b3 | |||
3248070168 | |||
|
d06784c2c3 | ||
|
44ca0595ec | ||
3647e9ba00 | |||
1438a1ff8b | |||
90be2a826b | |||
c94e3cec0b | |||
02e506c7d6 | |||
822ea71411 | |||
09adddb69e | |||
6c02990cb5 | |||
7d29690457 | |||
1026a849f1 | |||
5d157505aa | |||
44b45a6a04 | |||
60211b3a3c | |||
fad5b160bc | |||
593c9f7d60 | |||
b38a79eca1 | |||
|
95b70b2415 | ||
|
30b2d19710 | ||
|
040b76d276 | ||
|
f066180c26 | ||
d26852cd2f | |||
a2ea1ca926 | |||
b1458827f1 | |||
10ad3acf9c | |||
2e8852f667 | |||
|
ce4aabaaf3 | ||
|
16551a5f9d | ||
b7ab59d5cd | |||
d619db3d89 | |||
5444c7a90e | |||
6b8575b29d | |||
d42786e7ed | |||
8df2bbae1a | |||
|
0a1bc65e79 | ||
|
95c9e8501a | ||
d21749c170 | |||
bd1c02b24a | |||
6ea650e7eb | |||
|
8b1dbbeeea | ||
522910e432 | |||
8c089da31b | |||
c1142be780 | |||
da2999e67c | |||
53f2b242a4 | |||
22f3e06585 | |||
9fc429bc64 | |||
e544b91861 | |||
e848be2a35 | |||
bdf292654b | |||
3d198d83cb | |||
d0a0eadafe | |||
91526eb847 | |||
7667903218 | |||
|
05c0166003 | ||
|
0e0171cc0f | ||
9d34ca02f1 | |||
|
1c5e77258e | ||
|
ebd7cb02ff | ||
ebb8d3f184 | |||
0789decfd9 | |||
e2039141e6 | |||
286a9a1a0a | |||
75aa253a29 | |||
14967cbf67 | |||
35bcb23920 | |||
|
b6f801c6ce | ||
|
9e2da2ddc2 | ||
e72da57a54 | |||
9690ab4f70 | |||
41e1f46cfc | |||
a6127657cc | |||
|
60a6e86a6b | ||
|
a8ca7c37f2 | ||
0bb434bc22 | |||
|
f617597f38 | ||
|
df7bc08f71 | ||
5974e7026e | |||
29e5a3d07a | |||
d647dc0448 | |||
d65f5f9bca | |||
4c99d39f8a | |||
220ed16c64 | |||
39d2c4a959 | |||
b0bac562c3 | |||
60a94cd839 | |||
a764e20bd4 | |||
e1384a2d3e | |||
b9db57d66a | |||
9561dc27e3 | |||
cb6e3c3d5f | |||
|
6d8889bbec | ||
|
553d19db89 | ||
f0536c9cf9 | |||
c91be221dc | |||
069b28eeae | |||
84cc6dfde7 | |||
1d61f056b8 | |||
eda63ee8c8 | |||
78e8401029 | |||
5ad93105b3 | |||
97612a13ac | |||
d06756c6ff | |||
5ac17b15e1 | |||
4e064e4b01 | |||
f280a92145 | |||
aaa131cb1f | |||
f6af441030 | |||
cb9132abc1 | |||
5886875770 | |||
ccb2808e60 | |||
a766318e20 | |||
fd4b0088dc | |||
165a833088 | |||
5ac0782b36 | |||
46dd33cb05 | |||
5f47cb131f | |||
ea21f3d4bc | |||
bdda6c9985 | |||
ae83da6eb9 | |||
b62d0e4096 | |||
1c123fa22d | |||
6b3619514d | |||
dee9f7ce8b | |||
b4d2b69004 | |||
4f64c255af | |||
cc0d3d8b75 | |||
f5233001e7 | |||
7cb88fab88 | |||
e7263302a7 | |||
b26e1d5a7f | |||
86bdabf358 | |||
4069e71477 | |||
6c661bedd3 | |||
a2ed9ed54b |
16
.env.dev
@ -1,7 +1,7 @@
|
||||
###
|
||||
# @Author: Do not edit
|
||||
# @Date: 2023-08-29 09:40:39
|
||||
# @LastEditTime: 2023-12-15 16:28:20
|
||||
# @LastEditTime: 2024-02-01 16:49:38
|
||||
# @LastEditors: zhp
|
||||
# @Description:
|
||||
###
|
||||
@ -13,18 +13,26 @@ VUE_APP_TITLE = MES系统
|
||||
|
||||
# 芋道管理系统/开发环境
|
||||
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
|
||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
VUE_APP_BASE_API = 'http://10.70.2.2:8080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.49:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.56:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
||||
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
|
||||
# socket地址
|
||||
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
|
||||
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
||||
|
||||
# 积木报表指向地址
|
||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
||||
VUE_APP_JIMU_API = 'http://10.70.2.22:8080'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
@ -15,11 +15,14 @@ VUE_APP_TITLE = MES系统
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
|
||||
# 积木报表指向地址
|
||||
VUE_APP_JIMU_API = 'http://10.70.2.22:8080'
|
||||
VUE_APP_JIMU_API = 'http://10.70.2.2:8080'
|
||||
# socket地址
|
||||
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
|
||||
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
||||
|
||||
|
||||
# 根据服务器或域名修改
|
||||
PUBLIC_PATH = 'http://10.70.2.32'
|
||||
PUBLIC_PATH = ''
|
||||
|
||||
# 二级部署路径
|
||||
# VUE_APP_APP_NAME ='yudao-admin'
|
||||
|
@ -7,12 +7,19 @@ VUE_APP_TITLE = MES系统
|
||||
# 芋道管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
|
||||
# dcs地址
|
||||
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
|
||||
# socket地址
|
||||
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
|
||||
|
||||
# 积木报表指向地址
|
||||
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
|
||||
# socket地址
|
||||
VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
|
||||
|
||||
|
||||
# 根据服务器或域名修改
|
||||
PUBLIC_PATH = 'http://192.168.0.33:8889/'
|
||||
PUBLIC_PATH = ''
|
||||
|
||||
# 二级部署路径
|
||||
# VUE_APP_APP_NAME ='yudao-admin'
|
||||
|
@ -43,6 +43,7 @@
|
||||
"dependencies": {
|
||||
"@antv/x6": "^2.15.3",
|
||||
"@babel/parser": "7.18.4",
|
||||
"@jiaminghi/data-view": "^2.10.0",
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"axios": "0.27.2",
|
||||
"benz-amr-recorder": "^1.1.5",
|
||||
@ -80,6 +81,7 @@
|
||||
"vue-plugin-hiprint": "0.0.54-fix",
|
||||
"vue-quill-editor": "^3.0.6",
|
||||
"vue-router": "3.4.9",
|
||||
"vue-seamless-scroll": "^1.1.23",
|
||||
"vue-video-player": "^5.0.2",
|
||||
"vuedraggable": "2.24.3",
|
||||
"vuex": "3.6.2",
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 37 KiB |
@ -8,6 +8,10 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
||||
<link rel="stylesheet" type="text/css" media="print" href="<%= BASE_URL %>print-lock.css">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
||||
<meta http-equiv="Expires" content="0">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Cache-control" content="no-cache">
|
||||
<meta http-equiv="Cache" content="no-cache">
|
||||
<title>
|
||||
<%= webpackConfig.name %>
|
||||
</title>
|
||||
|
@ -59,6 +59,15 @@ export function listEnabled() {
|
||||
})
|
||||
}
|
||||
|
||||
// 获得可用的排班列表(根据车间筛选)
|
||||
export function listEnabledByRoom(query) {
|
||||
return request({
|
||||
url: '/base/group-team/listEnabledByRoom',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得班组组员信息分页
|
||||
export function groupTeamPage(query) {
|
||||
return request({
|
||||
|
91
src/api/base/qualityInspectionBoxPermissions.js
Normal file
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-04 14:10:37
|
||||
* @LastEditTime: 2024-01-31 09:56:09
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建安灯按钮16键对应
|
||||
export function createQualityInspectionBoxBtn(data) {
|
||||
return request({
|
||||
url: '/base/quality-inspection-box-btn/updateBatch',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新安灯按钮16键对应
|
||||
export function updateQualityInspectionBoxBtn(data) {
|
||||
return request({
|
||||
url: '/base/quality-inspection-box-btn-auth/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除安灯按钮16键对应
|
||||
export function deleteQualityInspectionBoxBtn(id) {
|
||||
return request({
|
||||
url: 'base/quality-inspection-box-btn-auth/delete?userId=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得安灯按钮16键对应
|
||||
export function getQualityInspectionBoxBtn(id) {
|
||||
return request({
|
||||
url: 'base/quality-inspection-box-btn-auth/get?userId=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得安灯按钮16键对应分页
|
||||
export function getQualityInspectionBoxBtnPage(query) {
|
||||
return request({
|
||||
url: '/base/quality-inspection-box-btn/listGroupByLineSection',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导出安灯按钮16键对应 Excel
|
||||
export function exportQualityInspectionBoxBtnExcel(query) {
|
||||
return request({
|
||||
url: '/base/quality-inspection-box-btn/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
export function getAllDetByTypeList(query) {
|
||||
return request({
|
||||
url: '/base/quality-scrap-det/scrapMap',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
export function getListByLineSection(query) {
|
||||
return request({
|
||||
url: '/base/quality-inspection-box-btn/detListByLineSection',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function getUserList(query) {
|
||||
return request({
|
||||
url: 'base/quality-inspection-box-btn-auth/getUserList',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
export function getPage(query) {
|
||||
return request({
|
||||
url: 'base/quality-inspection-box-btn-auth/page',
|
||||
method: 'post',
|
||||
data:query
|
||||
})
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:49:02
|
||||
* @LastEditTime: 2023-12-14 14:21:43
|
||||
* @LastEditTime: 2024-01-24 15:54:58
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
@ -55,3 +55,12 @@ export function updateSumAutoDeliveDataList(query) {
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function exportProductExcel(query) {
|
||||
return request({
|
||||
url: '/base/report-auto-production-backup/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
14
src/assets/icons/svg/arrow.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>编组 13</title>
|
||||
<g id="·窑炉总览" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="总览" transform="translate(-1823.000000, -772.000000)">
|
||||
<g id="编组-20备份-5" transform="translate(1786.000000, 764.000000)">
|
||||
<g id="编组-13" transform="translate(37.000000, 8.000000)">
|
||||
<rect id="矩形" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="15" height="15"></rect>
|
||||
<path d="M3.67840479,4.47768215 L12.3215952,4.47768215 C12.87388,4.47768215 13.3215952,4.9253974 13.3215952,5.47768215 C13.3215952,5.70423387 13.2446673,5.92407165 13.1034098,6.1011931 L8.78181462,11.5200015 C8.43745903,11.9517857 7.80827335,12.0226607 7.37648905,11.6783051 C7.31796217,11.6316289 7.2648616,11.5785283 7.21818538,11.5200015 L2.89659016,6.1011931 C2.55223458,5.6694088 2.62310955,5.04022312 3.05489384,4.69586753 C3.23201529,4.55461005 3.45185307,4.47768215 3.67840479,4.47768215 Z" id="路径-2" fill="#03233C"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
14
src/assets/icons/svg/energyMonitoring.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>能源监控</title>
|
||||
<g id="mes-看板/驾驶舱" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="冷端看板" transform="translate(-685.000000, -149.000000)" fill-rule="nonzero">
|
||||
<g id="编组-26备份-4" transform="translate(661.000000, 127.000000)">
|
||||
<g id="能源监控" transform="translate(24.000000, 22.000000)">
|
||||
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||
<path d="M5.56606392,22 L5.56606392,8.69394435 C5.56606392,8.16339333 5.15113542,7.75513729 4.65294365,7.75513729 L1.91312026,7.75513729 C1.41539106,7.75513729 1,8.20385524 1,8.69394435 L1,22 L5.56606392,22 L5.56606392,22 Z M11.3773759,22 L11.3773759,2.97972358 C11.3773759,2.44871795 10.9624474,2 10.4642557,2 L7.72443229,2 C7.22624054,2 6.81131201,2.44871795 6.81131201,2.97972358 L6.81131201,22 L11.3773759,22 Z M17.188688,22 L17.188688,13.591653 C17.188688,13.061102 16.7737595,12.6123841 16.2755677,12.6123841 L13.5362069,12.6123841 C13.0380151,12.6123841 12.622624,13.061102 12.622624,13.591653 L12.622624,22 L17.188688,22 Z M23,22 L23,8.69394435 C23,8.16339333 22.5850715,7.75513729 22.0868797,7.75513729 L19.3470564,7.75513729 C18.8493272,7.75513729 18.4339361,8.20385524 18.4339361,8.69394435 L18.4339361,22 L23,22 L23,22 Z" id="形状" fill="#59D0E2"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
14
src/assets/icons/svg/eqAlarm.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>报警</title>
|
||||
<g id="新增看板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="深加工看板" transform="translate(-64.000000, -149.000000)" fill-rule="nonzero">
|
||||
<g id="编组-26" transform="translate(40.000000, 127.000000)">
|
||||
<g id="报警" transform="translate(24.000000, 22.000000)">
|
||||
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||
<path d="M20.7657338,18.1387399 L13.9284614,22.3462921 C13.4025174,22.6969215 12.8765734,22.3462921 12.8765734,21.6450334 L12.8765734,11.8274116 C12.8765734,11.6520969 13.0518881,11.3014676 13.2272027,11.1261529 L20.0644751,6.91860067 C20.5904191,6.56797132 21.1163631,6.91860067 21.1163631,7.61985938 L21.1163631,17.6127959 C21.1163631,17.7881106 20.9410485,18.1387399 20.7657338,18.1387399 Z M3.23426622,18.1387399 L10.0715386,22.3462921 C10.5974826,22.6969215 11.1234266,22.3462921 11.1234266,21.6450334 L11.1234266,11.8274116 C11.1234266,11.6520969 10.9481119,11.3014676 10.7727973,11.1261529 L3.93552492,6.91860067 C3.58489557,6.743286 2.88363686,7.09391535 2.88363686,7.61985938 L2.88363686,17.6127959 C2.88363686,17.7881106 3.05895154,18.1387399 3.23426622,18.1387399 Z M11.8246853,1.48384573 L3.93552492,4.46419521 C3.58489557,4.63950989 3.58489557,5.16545392 3.93552492,5.34076859 L11.8246853,10.2495795 C12,10.2495795 12.1753147,10.2495795 12.1753147,10.2495795 L20.2397898,5.34076859 C20.5904191,5.16545392 20.5904191,4.63950989 20.2397898,4.46419521 L12.1753147,1.48384573 C12,1.48384573 12,1.48384573 11.8246853,1.48384573 Z" id="形状" fill="#59D0E2"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
17
src/assets/icons/svg/eqMonitoring.svg
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="19.7127155px" height="19.7127155px" viewBox="0 0 19.7127155 19.7127155" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>设备监控</title>
|
||||
<g id="mes-看板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="深加工看板" transform="translate(-1309.143642, -151.143642)">
|
||||
<g id="编组-26备份-4" transform="translate(1283.000000, 127.000000)">
|
||||
<g id="设备监控" transform="translate(24.000000, 22.000000)">
|
||||
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
|
||||
<g id="异常" transform="translate(2.143642, 2.143642)" fill-rule="nonzero">
|
||||
<rect id="矩形" fill="#000000" opacity="0" x="0.856357767" y="0.856357767" width="17" height="17"></rect>
|
||||
<path d="M9.85640228,0.000116285784 C7.94997171,-0.0106702658 6.11587607,0.729338602 4.75082135,2.0602014 C3.41793975,3.37801839 2.66584368,5.173105 2.66128994,7.04744966 L2.66128994,16.6671387 L16.9726637,16.6671387 L16.9726637,7.04743041 C16.9710126,5.1705386 16.2144177,3.37320892 14.8732566,2.06018215 C13.5319151,0.748116476 11.7327241,0.00936885323 9.85638303,0.000116285784 L9.85640228,0.000116285784 Z M9.26502002,14.3607842 L9.05803623,9.69875531 L5.52947465,9.69875531 L10.1619113,3.85402838 L10.5561661,7.61911494 L13.9073323,7.73739052 L9.22555602,14.3607842 L9.26502002,14.3607842 Z M4.37471863e-05,18.6383791 C-0.00254075641,18.3517467 0.109484124,18.0759491 0.311244358,17.8723357 C0.513004592,17.6687223 0.787767718,17.5541863 1.07441422,17.5541863 L18.6383903,17.5541863 C18.9225391,17.5577245 19.1943787,17.6707029 19.3973309,17.8696071 C19.5968337,18.0761491 19.7096866,18.3512359 19.7127155,18.6383791 C19.7127155,19.2317112 19.2317269,19.7127155 18.6383903,19.7127155 L1.07441422,19.7127155 C0.481077682,19.7127155 4.37471863e-05,19.2317112 4.37471863e-05,18.6383791 L4.37471863e-05,18.6383791 Z" id="形状" fill="#59D0E2"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
12
src/assets/icons/svg/fullScreenView.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>编组 54</title>
|
||||
<g id="驾驶舱" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="运营总览_生产线监控驾驶舱" transform="translate(-1866.000000, -36.000000)">
|
||||
<g id="编组-54" transform="translate(1866.000000, 36.000000)">
|
||||
<rect id="矩形" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="21" height="21"></rect>
|
||||
<path d="M18.4001211,1 L18.574731,1.00571398 C18.8641421,1.02474925 19.1451559,1.09128771 19.4122178,1.20447947 C19.7221027,1.33395436 19.9991094,1.52058631 20.2392616,1.76073844 C20.4776764,1.99915325 20.6652172,2.27804627 20.7953442,2.58736464 C20.9313506,2.90825642 21,3.24882158 21,3.59987893 L21,3.59987893 L21,18.4001211 L20.994286,18.574731 C20.9752507,18.8641421 20.9087123,19.1451559 20.7955205,19.4122178 C20.6660456,19.7221027 20.4794137,19.9991094 20.2392616,20.2392616 C20.0008468,20.4776764 19.7219537,20.6652172 19.4126354,20.7953442 C19.0917436,20.9313506 18.7511784,21 18.4001211,21 L18.4001211,21 L3.59987893,21 L3.42526905,20.994286 C3.13585794,20.9752507 2.85484405,20.9087123 2.58778224,20.7955205 C2.2778973,20.6660456 2.00089057,20.4794137 1.76073844,20.2392616 C1.52232363,20.0008468 1.33478285,19.7219537 1.20465581,19.4126354 C1.06864936,19.0917436 1,18.7511784 1,18.4001211 L1,18.4001211 L1,3.59987893 L1.00571398,3.42526905 C1.02474925,3.13585794 1.09128771,2.85484405 1.20447947,2.58778224 C1.33395436,2.2778973 1.52058631,2.00089057 1.76073844,1.76073844 C1.99915325,1.52232363 2.27804627,1.33478285 2.58736464,1.20465581 C2.90825642,1.06864936 3.24882158,1 3.59987893,1 L3.59987893,1 L18.4001211,1 Z M18.4001211,2.29539952 L3.59987893,2.29539952 L3.49797651,2.2993263 C2.82542992,2.35136056 2.29539952,2.9140495 2.29539952,3.59987893 L2.29539952,3.59987893 L2.29539952,18.4001211 L2.2993263,18.5020235 C2.35136056,19.1745701 2.9140495,19.7046005 3.59987893,19.7046005 L3.59987893,19.7046005 L18.4001211,19.7046005 L18.5020235,19.7006737 C19.1745701,19.6486394 19.7046005,19.0859505 19.7046005,18.4001211 L19.7046005,18.4001211 L19.7046005,3.59987893 L19.7006737,3.49797651 C19.6486394,2.82542992 19.0859505,2.29539952 18.4001211,2.29539952 L18.4001211,2.29539952 Z M4.56580299,11.8731508 L4.63987359,11.8789244 C4.95620444,11.9219442 5.20096852,12.1943435 5.20096852,12.5208838 L5.20096852,12.5208838 L5.20096852,15.8606113 L8.39814764,12.6634321 L8.45892035,12.6098356 C8.71226443,12.4133149 9.08161636,12.4311804 9.3138681,12.6634321 C9.56547415,12.9150382 9.56547415,13.3275466 9.3138681,13.5791526 L9.3138681,13.5791526 L6.09149511,16.7990315 L9.4155569,16.7990315 L9.49368756,16.8035151 C9.82695229,16.8420028 10.0864105,17.123441 10.081435,17.4601165 C10.0742517,17.8119637 9.78624591,18.094431 9.43371671,18.094431 L9.43371671,18.094431 L4.5691586,18.094431 L4.49163938,18.0899766 C4.16113157,18.051728 3.90556901,17.7718105 3.90556901,17.4308414 L3.90556901,17.4308414 L3.90556901,12.5367736 L3.91007171,12.4587841 C3.94871707,12.1260764 4.23118526,11.8665247 4.56580299,11.8731508 L4.56580299,11.8731508 Z M17.4353814,3.90556901 L17.512257,3.91000958 C17.8400885,3.94813523 18.094431,4.22707005 18.094431,4.56461864 L18.094431,4.56461864 L18.094431,9.46095642 L18.0899283,9.53894589 C18.0512829,9.87165361 17.7688147,10.1312053 17.434197,10.1245792 C17.0828999,10.1173731 16.7990315,9.82850504 16.7990315,9.47684625 L16.7990315,9.47684625 L16.7990315,6.13938874 L13.6018524,9.33656786 L13.5410796,9.39016441 C13.2877356,9.58668512 12.9183836,9.5688196 12.6861319,9.33656786 C12.4345258,9.08496181 12.4345258,8.67245345 12.6861319,8.4208474 L12.6861319,8.4208474 L15.9060108,5.20096852 L12.5821731,5.20096852 L12.5040246,5.19648608 C12.170734,5.1580095 11.9119308,4.876675 11.9185506,4.54071802 C11.9257483,4.18803625 12.2137541,3.90556901 12.5662833,3.90556901 L12.5662833,3.90556901 L17.4353814,3.90556901 Z" id="形状结合" fill="#52FFF1" fill-rule="nonzero" opacity="0.79078311"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.1 KiB |
@ -1 +0,0 @@
|
||||
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M38.47 52L52 38.462l-23.648-23.67L43.209 0H.035L0 43.137l14.757-14.865L38.47 52zm74.773 47.726L89.526 76 76 89.536l23.648 23.672L84.795 128h43.174L128 84.863l-14.757 14.863zM89.538 52l23.668-23.648L128 43.207V.038L84.866 0 99.73 14.76 76 38.472 89.538 52zM38.46 76L14.792 99.651 0 84.794v43.173l43.137.033-14.865-14.757L52 89.53 38.46 76z"/></svg>
|
Before Width: | Height: | Size: 421 B |
12
src/assets/icons/svg/menuIcon.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>制度流程</title>
|
||||
<g id="页面" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="栏" transform="translate(-383.000000, -639.000000)" fill="#FFFFFF" fill-rule="nonzero">
|
||||
<g id="制度流程" transform="translate(383.000000, 639.000000)">
|
||||
<rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||
<path d="M4.37117174,17.071929 L2.37885068,17.071929 C2.0028361,17.071929 1.69692899,17.3771995 1.69692899,17.7524526 L1.69692899,19.7475474 C1.69692899,20.1227781 2.00283612,20.428071 2.37885068,20.428071 L4.37117174,20.428071 C4.74718632,20.428071 5.05307101,20.1228005 5.05307101,19.7475474 L5.05307101,17.7524526 C5.05307101,17.3771996 4.74718632,17.071929 4.37117174,17.071929 Z M7.36536289,6.40073051 L21.8846371,6.40073051 C22.2245029,6.40073051 22.5,6.06492662 22.5,5.65073051 C22.5,5.2365344 22.2245029,4.90073051 21.8846371,4.90073051 L7.36536289,4.90073051 C7.02549709,4.90073051 6.75,5.23653442 6.75,5.65073054 C6.75,6.06492665 7.02549711,6.40073051 7.36536289,6.40073051 Z M3.14077284,5.95492436 L2.03265569,4.84248673 C1.8767502,4.68597337 1.62348469,4.6854806 1.46697133,4.84138609 C1.4665023,4.8418533 1.46603442,4.84232168 1.46556772,4.84279121 L1.18448184,5.12557972 C1.0295067,5.28149361 1.02939503,5.5332514 1.1842318,5.6893027 L2.85590574,7.37408916 C3.01150401,7.53090793 3.26476807,7.53189735 3.42158685,7.37629907 C3.42263304,7.37526103 3.42367349,7.3742172 3.42470814,7.37316765 L5.7220224,5.04277966 C5.87599957,4.88658572 5.87547971,4.63552909 5.72085699,4.47997417 L5.4403523,4.19777835 C5.28461275,4.04109986 5.0313479,4.04033871 4.87466942,4.19607825 C4.87370895,4.19703297 4.87275333,4.19799256 4.8718026,4.19895698 L3.14077284,5.95492436 L3.14077284,5.95492436 Z M21.8846371,11.25 L7.36536289,11.25 C7.02549709,11.25 6.75,11.5857972 6.75,11.999985 C6.75,12.4141729 7.02552167,12.75 7.36536289,12.75 L21.8846371,12.75 C22.2245029,12.75 22.5,12.4142028 22.5,11.999985 C22.5,11.5857672 22.2245029,11.25 21.8846371,11.25 Z M21.8846371,17.972656 L7.36536289,17.972656 C7.02549709,17.972656 6.75,18.30843 6.75,18.722656 C6.75,19.1368821 7.02552167,19.472656 7.36536289,19.472656 L21.8846371,19.472656 C22.2245029,19.472656 22.5,19.1368821 22.5,18.722656 C22.5,18.30843 22.2245029,17.972656 21.8846371,17.972656 Z M4.37117174,10.321929 L2.37885068,10.321929 C2.0028361,10.321929 1.69692899,10.6271975 1.69692899,11.0024481 L1.69692899,12.9975519 C1.69692899,13.3727801 2.00283612,13.678071 2.37885068,13.678071 L4.37117174,13.678071 C4.74718632,13.678071 5.05307101,13.3728025 5.05307101,12.9975519 L5.05307101,11.0024481 C5.05307101,10.6271975 4.74718632,10.321929 4.37117174,10.321929 Z" id="形状"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
@ -1 +1,14 @@
|
||||
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><defs><style/></defs><path d="M459.954 607.201h233.734c14.352 0 25.941-11.088 25.941-24.799 0-13.623-11.588-24.71-25.941-24.71H459.954c-14.353 0-25.987 11.087-25.987 24.71 0 13.71 11.634 24.8 25.987 24.8zm-77.937 217.186l287.564-.272v-.634c9.37-1.494 16.66-9.233 16.66-19.054 0-9.773-7.29-17.694-16.66-19.233v-.633H369.5c-27.275 0-51.95-38.47-51.95-65.215V303.761c.182-1.041.634-1.992.634-3.123 0-10.997-8.985-20.003-20.032-20.003-11.023 0-20.01 9.007-20.01 20.003v418.708c0 54.037 48.939 105.04 103.875 105.04zm311.67-734.462c-3.235 0-311.669-.814-311.669-.814-51.292 0-96.314 39.1-102.108 88.294-.182 1.086-.657 2.037-.657 3.169 0 .09.023.135.023.18 0 .047-.023.09-.023.182h.067c.181 10.86 9.032 19.685 19.942 19.685 10.933 0 19.762-8.825 19.965-19.685h.226c6.044-24.665 27.028-52.044 50.048-52.044h284.755c-.406 60.46 0 118.435 0 118.435 0 54.532 35.992 91.642 91.36 91.642h90.428v380.377c.338 44.261-33.703 65.758-62.18 65.215v.272c-10.23.723-18.426 9.188-18.426 19.594 0 10.454 8.196 18.737 18.426 19.417v.272c.248 0 .498-.092.746-.092.184 0 .34.092.522.092.972 0 1.812-.408 2.74-.545 52.288-3.755 97.58-52.314 97.58-104.225V299.778L693.688 89.925zm51.928 209.853c-27.684 0-51.927-51.412-51.927-78.7V142.377l129.839 157.4h-77.912zM459.955 483.47h233.733c14.352 0 25.941-11.041 25.941-24.709 0-13.667-11.588-24.754-25.941-24.754H459.954c-14.353 0-25.987 11.087-25.987 24.754 0 13.669 11.634 24.71 25.987 24.71zM716.71 841.356c-8.534 0-15.327 6.246-17.114 14.257l-.476-.045c-21.73 44.17-40.426 34.032-62.295 34.032H252.18c-27.277 0-64.466-38.512-64.466-65.213V322.315c0-24.801 29.857-58.607 55.954-63.403v-.544c10.572-.543 19.083-9.142 19.083-19.867 0-10.681-8.511-19.28-19.083-19.777v-.227c-.181.044-.34.091-.52.091-.158 0-.272-.09-.43-.09-1.245 0-2.353.497-3.553.724-50.704 5.203-90.86 52.134-90.86 103.093v502.07c0 54.035 48.938 105.039 103.875 105.039h389.558c47.105 0 78.255-17.199 90.542-61.684 1.36-2.534 2.33-5.25 2.33-8.327.002-9.866-8.009-18.057-17.9-18.057z"/></svg>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>周转进度</title>
|
||||
<g id="新增看板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="周转看板" transform="translate(-996.000000, -149.000000)" fill-rule="nonzero">
|
||||
<g id="编组-26备份-2" transform="translate(972.000000, 125.000000)">
|
||||
<g id="周转进度" transform="translate(24.000000, 24.000000)">
|
||||
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||
<path d="M14.5,8.25 L14.5,2 L4,2 C2.8954305,2 2,2.8954305 2,4 L2,14.5 L2,14.5 L8.25,14.5 L8.25,8.25 L14.5,8.25 Z M15.75,9.5 L15.75,15.75 L9.5,15.75 L9.5,22 L20,22 C21.1045695,22 22,21.1045695 22,20 L22,9.5 L22,9.5 L15.75,9.5 Z" id="形状" fill="#59D0E2"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.0 KiB |
14
src/assets/icons/svg/productLine.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>库存管理</title>
|
||||
<g id="新增看板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="周转看板" transform="translate(-64.000000, -618.000000)" fill-rule="nonzero">
|
||||
<g id="编组-26备份" transform="translate(40.000000, 596.000000)">
|
||||
<g id="库存管理" transform="translate(24.000000, 22.000000)">
|
||||
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="24" height="24"></rect>
|
||||
<path d="M17.5599807,5.95300863 L17.5599807,7.05052701 L6.39641163,7.05052701 L6.39641163,5.95300863 L5.15061552,5.95300863 C4.59833077,5.95300863 4.15061552,6.40072388 4.15061552,6.95300863 L4.15061552,21.465846 C4.15061552,22.0181307 4.59833077,22.465846 5.15061552,22.465846 L18.8493845,22.465846 C19.4016692,22.465846 19.8493845,22.0181307 19.8493845,21.465846 L19.8493845,6.95300863 C19.8493845,6.40072388 19.4016692,5.95300863 18.8493845,5.95300863 L17.5599807,5.95300863 L17.5599807,5.95300863 Z M6.35280394,9.22062017 L17.516373,9.22062017 L17.516373,11.3240808 L6.35280394,11.3240808 L6.35280394,9.22062017 Z M14.2456217,20.2200499 L6.3962372,20.2200499 L6.3962372,18.0396653 L14.2456217,18.0396653 L14.2456217,20.2200499 Z M17.5709698,15.8758516 L6.40740077,15.8758516 L6.40740077,13.6570923 L17.5709698,13.6570923 L17.5709698,15.8758516 Z M10.7650186,1.53415402 L13.234807,1.53415402 C13.7870917,1.53415402 14.234807,1.98186927 14.234807,2.53415402 L14.234807,4.82653474 L14.234807,4.82653474 L9.76501859,4.82653474 L9.76501859,2.53415402 C9.76501859,1.98186927 10.2127338,1.53415402 10.7650186,1.53415402 Z M16.4807775,4.75814629 L16.4807775,5.95300863 L16.4807775,5.95300863 L7.51922248,5.95300863 L7.51922248,4.75814629 C7.51922248,4.20586154 7.96693773,3.75814629 8.51922248,3.75814629 L15.4807775,3.75814629 C16.0330623,3.75814629 16.4807775,4.20586154 16.4807775,4.75814629 Z" id="形状" fill="#59D0E2"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
16
src/assets/icons/svg/scrap.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="23.9999981px" height="23.9999981px" viewBox="0 0 23.9999981 23.9999981" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>缺陷</title>
|
||||
<g id="mes-看板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="深加工看板" transform="translate(-686.000000, -149.000000)" fill-rule="nonzero">
|
||||
<g id="编组-26备份-2" transform="translate(662.000000, 127.000000)">
|
||||
<g id="编组-24" transform="translate(24.000000, 22.000000)">
|
||||
<g id="缺陷" transform="translate(0.000000, 0.000000)">
|
||||
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="23.9999981" height="23.9999981"></rect>
|
||||
<path d="M20.2321175,10.4550863 L18.9032068,10.4550863 L18.9032068,6.47221732 C18.9010796,5.9702116 18.4935224,5.56438134 17.9915122,5.56438585 L13.108538,5.56438585 L13.108538,3.98437284 C13.1108007,3.21607553 12.8028771,2.47938539 12.2545397,1.94122931 C11.7062023,1.40307324 10.9638711,1.1090093 10.1957511,1.12566955 C8.60430329,1.19855778 7.3587693,2.52279309 7.38340516,4.11571867 L7.38340516,5.56438585 L2.5004309,5.56438585 C1.99842068,5.56438134 1.59086349,5.9702116 1.58870356,6.47221732 L1.58870356,9.53566556 C1.58667583,9.77879788 1.68181868,10.0126808 1.85301841,10.1853314 C2.02421815,10.3579819 2.25728984,10.4550951 2.5004309,10.4550863 L3.01036175,10.4550863 C4.60185595,10.4303757 5.92550348,11.6736467 6.00041086,13.2635692 C6.0149973,14.0317095 5.71894789,14.773225 5.17934105,15.3201042 C4.63973421,15.8669834 3.90224815,16.1729324 3.13398136,16.1686298 L2.5004309,16.1686298 C1.9969159,16.1686298 1.58870356,16.5768093 1.58870356,17.0803243 L1.58870356,21.9632986 C1.58870356,22.4668136 1.9969159,22.8750014 2.5004309,22.8750014 L6.47171061,22.8750014 C6.71382208,22.8760256 6.94631552,22.780304 7.11751574,22.6091037 C7.28871596,22.4379035 7.38443764,22.2054101 7.38340516,21.9632986 L7.38340516,21.5113144 C7.3587693,19.9183889 8.60430329,18.5941536 10.1957511,18.5212653 C10.9638711,18.5046051 11.7062023,18.798669 12.2545397,19.3368251 C12.8028771,19.8749812 13.1108007,20.6116713 13.108538,21.3799686 L13.108538,21.9632986 C13.1075105,22.2047391 13.202703,22.4366433 13.3730659,22.6077311 C13.5434288,22.778819 13.7749267,22.8750014 14.0163694,22.8750014 L17.9915122,22.8750014 C18.4950272,22.8750014 18.9032068,22.4668136 18.9032068,21.9632986 L18.9032068,16.1686298 L20.3596002,16.1686298 C21.127882,16.1719118 21.8649697,15.8649752 22.403851,15.3173671 C22.9427323,14.769759 23.2377892,14.027836 23.2221666,13.259706 C23.1452437,11.6713093 21.8221825,10.4302984 20.2321175,10.4550863 Z" id="路径" fill="#59D0E2"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
10
src/assets/icons/svg/unFullScreenView.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>编组 54备份</title>
|
||||
<g id="驾驶舱" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="编组-54备份">
|
||||
<rect id="矩形" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="21" height="21"></rect>
|
||||
<path d="M18.4001211,1 L18.574731,1.00571398 C18.8641421,1.02474925 19.1451559,1.09128771 19.4122178,1.20447947 C19.7221027,1.33395436 19.9991094,1.52058631 20.2392616,1.76073844 C20.4776764,1.99915325 20.6652172,2.27804627 20.7953442,2.58736464 C20.9313506,2.90825642 21,3.24882158 21,3.59987893 L21,3.59987893 L21,18.4001211 L20.994286,18.574731 C20.9752507,18.8641421 20.9087123,19.1451559 20.7955205,19.4122178 C20.6660456,19.7221027 20.4794137,19.9991094 20.2392616,20.2392616 C20.0008468,20.4776764 19.7219537,20.6652172 19.4126354,20.7953442 C19.0917436,20.9313506 18.7511784,21 18.4001211,21 L18.4001211,21 L3.59987893,21 L3.42526905,20.994286 C3.13585794,20.9752507 2.85484405,20.9087123 2.58778224,20.7955205 C2.2778973,20.6660456 2.00089057,20.4794137 1.76073844,20.2392616 C1.52232363,20.0008468 1.33478285,19.7219537 1.20465581,19.4126354 C1.06864936,19.0917436 1,18.7511784 1,18.4001211 L1,18.4001211 L1,3.59987893 L1.00571398,3.42526905 C1.02474925,3.13585794 1.09128771,2.85484405 1.20447947,2.58778224 C1.33395436,2.2778973 1.52058631,2.00089057 1.76073844,1.76073844 C1.99915325,1.52232363 2.27804627,1.33478285 2.58736464,1.20465581 C2.90825642,1.06864936 3.24882158,1 3.59987893,1 L3.59987893,1 L18.4001211,1 Z M18.4001211,2.29539952 L3.59987893,2.29539952 L3.49797651,2.2993263 C2.82542992,2.35136056 2.29539952,2.9140495 2.29539952,3.59987893 L2.29539952,3.59987893 L2.29539952,18.4001211 L2.2993263,18.5020235 C2.35136056,19.1745701 2.9140495,19.7046005 3.59987893,19.7046005 L3.59987893,19.7046005 L18.4001211,19.7046005 L18.5020235,19.7006737 C19.1745701,19.6486394 19.7046005,19.0859505 19.7046005,18.4001211 L19.7046005,18.4001211 L19.7046005,3.59987893 L19.7006737,3.49797651 C19.6486394,2.82542992 19.0859505,2.29539952 18.4001211,2.29539952 L18.4001211,2.29539952 Z M9.43538136,11.905569 L9.512257,11.9100096 C9.84008849,11.9481352 10.094431,12.2270701 10.094431,12.5646186 L10.094431,12.5646186 L10.094431,17.4609564 L10.0899283,17.5389459 C10.0512829,17.8716536 9.76881474,18.1312053 9.43419701,18.1245792 C9.08289988,18.1173731 8.79903148,17.828505 8.79903148,17.4768462 L8.79903148,17.4768462 L8.79903148,14.1393887 L5.60185236,17.3365679 L5.54107965,17.3901644 C5.28773557,17.5866851 4.91838364,17.5688196 4.6861319,17.3365679 C4.43452585,17.0849618 4.43452585,16.6724534 4.6861319,16.4208474 L4.6861319,16.4208474 L7.90601077,13.2009685 L4.58217312,13.2009685 L4.50402457,13.1964861 C4.17073404,13.1580095 3.9119308,12.876675 3.91855064,12.540718 C3.92574827,12.1880363 4.21375409,11.905569 4.56628329,11.905569 L4.56628329,11.905569 L9.43538136,11.905569 Z M12.565803,3.8731508 L12.6398736,3.87892442 C12.9562044,3.92194416 13.2009685,4.19434347 13.2009685,4.52088378 L13.2009685,4.52088378 L13.2009685,7.86061126 L16.3981476,4.66343214 L16.4589204,4.60983559 C16.7122644,4.41331488 17.0816164,4.4311804 17.3138681,4.66343214 C17.5654742,4.91503819 17.5654742,5.32754655 17.3138681,5.5791526 L17.3138681,5.5791526 L14.0914951,8.79903148 L17.4155569,8.79903148 L17.4936876,8.80351509 C17.8269523,8.84200281 18.0864105,9.12344101 18.081435,9.46011654 C18.0742517,9.81196375 17.7862459,10.094431 17.4337167,10.094431 L17.4337167,10.094431 L12.5691586,10.094431 L12.4916394,10.0899766 C12.1611316,10.051728 11.905569,9.77181051 11.905569,9.4308414 L11.905569,9.4308414 L11.905569,4.53677361 L11.9100717,4.45878413 C11.9487171,4.12607641 12.2311853,3.86652471 12.565803,3.8731508 L12.565803,3.8731508 Z" id="形状结合" fill="#52FFF1" fill-rule="nonzero" opacity="0.79078311"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.9 KiB |
BIN
src/assets/img/eqStatus.png
Normal file
After Width: | Height: | Size: 99 KiB |
BIN
src/assets/img/high.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
src/assets/img/logo-back.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 7.3 KiB |
BIN
src/assets/img/middle.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
src/assets/img/short.png
Normal file
After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 5.6 KiB |
BIN
src/assets/logo/logo1.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/assets/logo/xcac.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
@ -139,7 +139,7 @@ $base1px: 0.15vh; // 1px / 1080px;
|
||||
|
||||
.title {
|
||||
margin: 0;
|
||||
margin-left: calc(28 * 0.12vh);
|
||||
margin-left: calc(18px * 0.12vh);
|
||||
font-weight: 400;
|
||||
user-select: none;
|
||||
color: #000;
|
||||
@ -148,8 +148,8 @@ $base1px: 0.15vh; // 1px / 1080px;
|
||||
letter-spacing: calc(2 * 0.12vh);
|
||||
|
||||
.cnbm_logo {
|
||||
height: calc(40 * 0.12vh);
|
||||
width: calc(40 * 0.12vh);
|
||||
height: calc(160 * 0.12vh);
|
||||
width: calc(182 * 0.12vh);
|
||||
position: relative;
|
||||
top: calc(8 * 0.12vh);
|
||||
right: calc(8 * 0.12vh);
|
||||
|
@ -86,8 +86,8 @@
|
||||
</span>
|
||||
<!-- :file-list="uploadedFileList" -->
|
||||
<el-upload
|
||||
class="upload-in-dialog"
|
||||
v-if="col.upload"
|
||||
class="upload-in-dialog"
|
||||
:key="col.prop + '__el-upload'"
|
||||
:action="uploadUrl"
|
||||
:headers="uploadHeaders"
|
||||
@ -101,7 +101,9 @@
|
||||
}
|
||||
"
|
||||
v-bind="col.bind">
|
||||
<el-button size="mini" :disabled="col.bind?.disabled || false">
|
||||
<el-button
|
||||
size="mini"
|
||||
:disabled="disabled || col.bind?.disabled || false">
|
||||
<svg-icon
|
||||
icon-class="icon-upload"
|
||||
style="color: inherit"></svg-icon>
|
||||
@ -117,6 +119,7 @@
|
||||
v-for="file in form[col.prop]"
|
||||
:file="file"
|
||||
:key="file.fileUrl"
|
||||
:disabled="disabled"
|
||||
@delete="!disabled && handleDeleteFile(file, col.prop)" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
@ -142,6 +145,9 @@ function findMaxLabelWidth(rows) {
|
||||
if (!opt.label) return 0;
|
||||
if (opt.label.length > max) {
|
||||
max = opt.label.length;
|
||||
if (opt.label.includes('(')) {
|
||||
max = max - 3;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -150,7 +156,7 @@ function findMaxLabelWidth(rows) {
|
||||
|
||||
const uploadedFile = {
|
||||
name: 'UploadedFile',
|
||||
props: ['file'],
|
||||
props: ['file', 'disabled'],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
@ -195,13 +201,15 @@ const uploadedFile = {
|
||||
display: 'inline-block',
|
||||
}}>
|
||||
{this.file.fileName}
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-close"
|
||||
style="float: right; position: relative; top: 2px; left: 8px; z-index: 100"
|
||||
class="dialog__upload_component__close"
|
||||
onClick={this.handleDelete}
|
||||
/>
|
||||
{!this.disabled && (
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-close"
|
||||
style="float: right; position: relative; top: 2px; left: 8px; z-index: 100"
|
||||
class="dialog__upload_component__close"
|
||||
onClick={this.handleDelete}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@ -404,8 +412,26 @@ export default {
|
||||
}
|
||||
if (!promiseList.length) this.formLoading = false;
|
||||
},
|
||||
|
||||
// 上传成功的特殊处理
|
||||
beforeUpload() {},
|
||||
beforeUpload(file) {
|
||||
const checkFileSize = () => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
this.$modal.msgError('上传文件大小不能超过 2MB!');
|
||||
}
|
||||
return isLt2M;
|
||||
};
|
||||
const checkFileType = () => {
|
||||
const isJPG =
|
||||
file.type === 'image/jpeg' ||
|
||||
file.type === 'image/png' ||
|
||||
file.type === 'image/jpg';
|
||||
return isJPG;
|
||||
};
|
||||
return checkFileSize() && checkFileType();
|
||||
},
|
||||
|
||||
// 上传前的验证规则可通过 bind 属性传入
|
||||
handleUploadSuccess(response, file, prop) {
|
||||
console.log('[handleUploadSuccess]', response, file, prop);
|
||||
|
@ -17,7 +17,9 @@ export default {
|
||||
const vnodes = []
|
||||
|
||||
if (icon) {
|
||||
vnodes.push(<svg-icon icon-class={icon}/>)
|
||||
vnodes.push(<svg-icon style="font-size: 18px;margin-right: 10px;vertical-align: middle;" icon-class={icon}/>)
|
||||
} else {
|
||||
vnodes.push(<span style="display: inline-block; width: 10px;"/>)
|
||||
}
|
||||
|
||||
if (title) {
|
||||
|
@ -15,7 +15,7 @@
|
||||
key="collapse"
|
||||
class="sidebar-logo-link"
|
||||
to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo-close" />
|
||||
<h1
|
||||
v-else
|
||||
class="sidebar-title"
|
||||
@ -67,7 +67,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '中建材智能化院',
|
||||
title: '许昌安彩新能科技有限公司',
|
||||
logo: logoImg,
|
||||
};
|
||||
},
|
||||
@ -98,8 +98,8 @@ export default {
|
||||
width: 100%;
|
||||
|
||||
& .sidebar-logo {
|
||||
width: 32px;
|
||||
height: 40px;
|
||||
width: 67px;
|
||||
height: 24px;
|
||||
vertical-align: middle;
|
||||
margin-right: 12px;
|
||||
}
|
||||
@ -108,17 +108,23 @@ export default {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
font-size: 18px;
|
||||
letter-spacing: 1px;
|
||||
font-weight: 500;
|
||||
width: 147px;
|
||||
letter-spacing: 2px;
|
||||
font-size: 10px;
|
||||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
&.collapse {
|
||||
.sidebar-logo {
|
||||
// .sidebar-logo {
|
||||
// margin-right: 0px;
|
||||
// }
|
||||
.sidebar-logo-close {
|
||||
width: 54px;
|
||||
height: 19px;
|
||||
vertical-align: middle;
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
|
@ -3,16 +3,16 @@
|
||||
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
||||
<item icon="menuIcon" :title="onlyOneChild.meta.title" />
|
||||
</el-menu-item>
|
||||
</app-link>
|
||||
</template>
|
||||
|
||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||
<template slot="title">
|
||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
||||
<item v-if="item.meta" icon="menuIcon" :title="item.meta.title" />
|
||||
</template>
|
||||
<sidebar-item
|
||||
<sidebar-item-sub
|
||||
v-for="(child, index) in item.children"
|
||||
:key="child.path + index"
|
||||
:is-nest="true"
|
||||
@ -30,10 +30,11 @@ import { isExternal } from '@/utils/validate'
|
||||
import Item from './Item'
|
||||
import AppLink from './Link'
|
||||
import FixiOSBug from './FixiOSBug'
|
||||
import SidebarItemSub from './SidebarItemSub'
|
||||
|
||||
export default {
|
||||
name: 'SidebarItem',
|
||||
components: { Item, AppLink },
|
||||
components: { Item, AppLink, SidebarItemSub },
|
||||
mixins: [FixiOSBug],
|
||||
props: {
|
||||
// route object
|
||||
|
@ -3,16 +3,16 @@
|
||||
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
||||
<item icon="" :title="onlyOneChild.meta.title" />
|
||||
</el-menu-item>
|
||||
</app-link>
|
||||
</template>
|
||||
|
||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||
<template slot="title">
|
||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
||||
<item v-if="item.meta" icon="" :title="item.meta.title" />
|
||||
</template>
|
||||
<sidebar-item
|
||||
<sidebar-item-sub
|
||||
v-for="(child, index) in item.children"
|
||||
:key="child.path + index"
|
||||
:is-nest="true"
|
||||
@ -32,7 +32,7 @@ import AppLink from './Link'
|
||||
import FixiOSBug from './FixiOSBug'
|
||||
|
||||
export default {
|
||||
name: 'SidebarItem',
|
||||
name: 'SidebarItemSub',
|
||||
components: { Item, AppLink },
|
||||
mixins: [FixiOSBug],
|
||||
props: {
|
@ -1,71 +0,0 @@
|
||||
<template>
|
||||
<div
|
||||
:class="{ 'has-logo': showLogo }"
|
||||
:style="{
|
||||
backgroundColor:
|
||||
settings.sideTheme === 'theme-dark'
|
||||
? variables.menuBackground
|
||||
: variables.menuLightBackground,
|
||||
}">
|
||||
<logo v-if="showLogo" :collapse="isCollapse" />
|
||||
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
|
||||
<el-menu
|
||||
:default-active="activeMenu"
|
||||
:collapse="isCollapse"
|
||||
:background-color="
|
||||
settings.sideTheme === 'theme-dark'
|
||||
? variables.menuBackground
|
||||
: variables.menuLightBackground
|
||||
"
|
||||
:text-color="
|
||||
settings.sideTheme === 'theme-dark'
|
||||
? variables.menuColor
|
||||
: variables.menuLightColor
|
||||
"
|
||||
:unique-opened="true"
|
||||
active-text-color="#fff"
|
||||
:collapse-transition="false"
|
||||
mode="vertical">
|
||||
<!-- 根据 sidebarRouters 路由,生成菜单 -->
|
||||
<sidebar-item
|
||||
v-for="(route, index) in sidebarRouters"
|
||||
:key="route.path + index"
|
||||
:item="route"
|
||||
:base-path="route.path" />
|
||||
</el-menu>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapState } from 'vuex';
|
||||
import Logo from './Logo';
|
||||
import SidebarItem from './SidebarItem';
|
||||
import variables from '@/assets/styles/variables.scss';
|
||||
|
||||
export default {
|
||||
components: { SidebarItem, Logo },
|
||||
computed: {
|
||||
...mapState(['settings']),
|
||||
...mapGetters(['sidebarRouters', 'sidebar']),
|
||||
activeMenu() {
|
||||
const route = this.$route;
|
||||
const { meta, path } = route;
|
||||
// if set path, the sidebar will highlight the path you set
|
||||
if (meta.activeMenu) {
|
||||
return meta.activeMenu;
|
||||
}
|
||||
return path;
|
||||
},
|
||||
showLogo() {
|
||||
return this.$store.state.settings.sidebarLogo;
|
||||
},
|
||||
variables() {
|
||||
return variables;
|
||||
},
|
||||
isCollapse() {
|
||||
return !this.sidebar.opened;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -28,10 +28,10 @@
|
||||
mode="vertical">
|
||||
<!-- 根据 sidebarRouters 路由,生成菜单 -->
|
||||
<sidebar-item
|
||||
v-for="(route, index) in routeList"
|
||||
v-for="(route, index) in routeList.children"
|
||||
:key="route.path + index"
|
||||
:item="route"
|
||||
:base-path="route.path" />
|
||||
:base-path="routeList.path+ '/'+ route.path" />
|
||||
</el-menu>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@ -49,9 +49,7 @@ export default {
|
||||
...mapState(['settings']),
|
||||
...mapGetters(['sidebarRouters', 'sidebar', 'choicepart']),
|
||||
routeList() {
|
||||
// return [this.partList[this.choicepart]]
|
||||
// return [this.sidebarRouters[29]]
|
||||
return [this.sidebarRouters[this.choicepart]]
|
||||
return this.sidebarRouters[this.choicepart]
|
||||
},
|
||||
activeMenu() {
|
||||
const route = this.$route;
|
||||
|
@ -48,6 +48,7 @@
|
||||
<script>
|
||||
import ScrollPane from './ScrollPane';
|
||||
import path from 'path';
|
||||
import { getDcsMsg, closeDcsMsg } from "@/websocket/wsInterface"
|
||||
|
||||
export default {
|
||||
components: { ScrollPane },
|
||||
@ -58,6 +59,7 @@ export default {
|
||||
left: 0,
|
||||
selectedTag: {},
|
||||
affixTags: [],
|
||||
wsIsOpen: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -83,6 +85,30 @@ export default {
|
||||
document.body.removeEventListener('click', this.closeMenu);
|
||||
}
|
||||
},
|
||||
visitedViews(newVal, oldVal){
|
||||
let num = 0
|
||||
newVal && newVal.map(item => {
|
||||
console.log(item)
|
||||
if (item.path === '/databoard/kiln' || item.path === '/databoard/whole-plant' || item.path === '/databoard/deep-processing') {
|
||||
num++
|
||||
}
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
if (num > 0) {
|
||||
if(!this.wsIsOpen) {
|
||||
getDcsMsg()
|
||||
this.wsIsOpen = true
|
||||
console.log('开启websocket==========')
|
||||
}
|
||||
}else{
|
||||
if (this.wsIsOpen) {
|
||||
closeDcsMsg()
|
||||
this.wsIsOpen = false
|
||||
console.log('关闭============')
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initTags();
|
||||
|
@ -9,6 +9,7 @@ import store from './store';
|
||||
import router from './router';
|
||||
import directive from './directive'; // directive
|
||||
import plugins from './plugins'; // plugins
|
||||
import { scrollBoard } from '@jiaminghi/data-view'
|
||||
|
||||
import './assets/icons'; // icon
|
||||
import './permission'; // permission control
|
||||
@ -78,8 +79,10 @@ Vue.use(CodeBrickZj)
|
||||
Vue.use(directive);
|
||||
Vue.use(plugins);
|
||||
Vue.use(VueMeta);
|
||||
Vue.use(scrollBoard)
|
||||
// Vue.use(hljs.vuePlugin);
|
||||
|
||||
import scroll from 'vue-seamless-scroll'
|
||||
Vue.use(scroll)
|
||||
// bpmnProcessDesigner 需要引入
|
||||
import MyPD from '@/components/bpmnProcessDesigner/package/index.js';
|
||||
Vue.use(MyPD);
|
||||
|
@ -62,7 +62,7 @@ export default {
|
||||
url,
|
||||
method,
|
||||
params: (method === 'get' || method === 'delete') ? payload : null,
|
||||
data: method !== 'get' ? payload : null,
|
||||
data: (method === 'get' || method === 'delete') ? null : payload
|
||||
})
|
||||
},
|
||||
put(payload) {
|
||||
|
@ -19,6 +19,9 @@ const getters = {
|
||||
sidebarRouters:state => state.permission.sidebarRouters,
|
||||
choicepart: state => state.app.choicepart,
|
||||
// 数据字典
|
||||
dict_datas: state => state.dict.dictDatas
|
||||
dict_datas: state => state.dict.dictDatas,
|
||||
//ws
|
||||
fanFrequencyInfo: state => state.websocket.FanFrequencyInfo,
|
||||
kilnInfo: state => state.websocket.kilnInfo,
|
||||
}
|
||||
export default getters
|
||||
|
@ -6,6 +6,7 @@ import tagsView from './modules/tagsView'
|
||||
import permission from './modules/permission'
|
||||
import settings from './modules/settings'
|
||||
import dict from './modules/dict'
|
||||
import websocket from './modules/websocket'
|
||||
import getters from './getters'
|
||||
|
||||
Vue.use(Vuex)
|
||||
@ -17,7 +18,8 @@ const store = new Vuex.Store({
|
||||
tagsView,
|
||||
permission,
|
||||
settings,
|
||||
dict
|
||||
dict,
|
||||
websocket
|
||||
},
|
||||
getters
|
||||
})
|
||||
|
204
src/store/modules/websocket.js
Normal file
@ -0,0 +1,204 @@
|
||||
const state = {
|
||||
fanFrequencyInfo:{},// 分机运行频率
|
||||
kilnInfo:{},// 窑炉信息
|
||||
gasInfo:{},// 天然气流量图
|
||||
sumGasInfo: {},// 天然气总量
|
||||
|
||||
israKiln:[],// ISRA窑炉缺陷检测
|
||||
material:[],// 原料
|
||||
energyInfo: {
|
||||
elecQty1: '',
|
||||
elecQty2: '',
|
||||
waterQty: ''
|
||||
}, // 能耗
|
||||
energyWeekTrend:[],
|
||||
energyMonthTrend:[],
|
||||
energyYearTrend:[],// 能耗图
|
||||
energyMonitoring: [], // 能源监控
|
||||
exhaustGasInfo:{}, // 烟气
|
||||
gasChartDayTrend:{}, // 烟气
|
||||
gasChartWeekTrend:{}, // 烟气
|
||||
gasChartMonthTrend:{}, // 烟气
|
||||
gasChartYearTrend:{}, // 烟气
|
||||
israCheckType: [],
|
||||
israDayStatistic: [],//缺陷统计
|
||||
israWeekStatistic: [],//缺陷统计
|
||||
israMonthStatistic: [],//缺陷统计
|
||||
israYearStatistic: [],//缺陷统计
|
||||
productline: [], // SJG产线产量及良品率
|
||||
sjgEquipment:[],// SJG设备报警
|
||||
workOrder: [], // 工单监控
|
||||
defectSum: [], // 缺陷汇总
|
||||
order: [],// 订单完成情况
|
||||
yieldRateTable: [],// 本日生产良率table
|
||||
cutChartDay:[],
|
||||
cutChartWeek:[],
|
||||
cutChartMonth:[],
|
||||
cutChartYear:[]
|
||||
};
|
||||
const mutations = {
|
||||
SET_FANFREQUENCYINFO: (state, fanFrequencyInfo) => {
|
||||
state.fanFrequencyInfo = fanFrequencyInfo
|
||||
},
|
||||
SET_KILNINFO: (state, kilnInfo) => {
|
||||
state.kilnInfo = kilnInfo
|
||||
},
|
||||
SET_GASINFO: (state, gasInfo) => {
|
||||
state.gasInfo = gasInfo
|
||||
},
|
||||
SET_SUMGASINFO: (state, sumGasInfo) => {
|
||||
state.sumGasInfo = sumGasInfo
|
||||
},
|
||||
|
||||
|
||||
SET_ISRAKILN: (state, israKiln) => {
|
||||
state.israKiln = israKiln
|
||||
},
|
||||
SET_MATERIAL: (state, material) => {
|
||||
state.material = material
|
||||
},
|
||||
SET_ENERGYINFO: (state, energyInfo) => {
|
||||
if (Object.keys(energyInfo).length > 1) {
|
||||
state.energyInfo.elecQty1 = energyInfo.elecQty1
|
||||
state.energyInfo.elecQty2 = energyInfo.elecQty2
|
||||
} else {
|
||||
state.energyInfo.waterQty = energyInfo.waterQty
|
||||
}
|
||||
},
|
||||
SET_ENERGYTREND: (state, energyTrend) => {
|
||||
if (energyTrend.week.length > 0) {
|
||||
state.energyWeekTrend = energyTrend.week
|
||||
}
|
||||
if (energyTrend.month.length > 0) {
|
||||
state.energyMonthTrend = energyTrend.month
|
||||
}
|
||||
if (energyTrend.year.length > 0) {
|
||||
state.energyYearTrend = energyTrend.year
|
||||
}
|
||||
},
|
||||
SET_ENERGY_MONITORING: (state, energyMonitoring) => {
|
||||
state.energyMonitoring = energyMonitoring
|
||||
},
|
||||
SET_EXHAUSTGASINFO: (state, exhaustGasInfo) => {
|
||||
state.exhaustGasInfo = exhaustGasInfo
|
||||
},
|
||||
SET_EXHAUSTGASCHART: (state, exhaustGasChart) => {
|
||||
state.gasChartDayTrend = exhaustGasChart.dayTrend
|
||||
state.gasChartWeekTrend = exhaustGasChart.weekTrend
|
||||
state.gasChartMonthTrend = exhaustGasChart.monthTrend
|
||||
state.gasChartYearTrend = exhaustGasChart.yearTrend
|
||||
},
|
||||
SET_DEFECTCHART: (state, israStatistic) => {
|
||||
state.israCheckType = israStatistic.checkType
|
||||
state.israDayStatistic = israStatistic.dayStatistic
|
||||
state.israWeekStatistic = israStatistic.weekStatistic
|
||||
state.israMonthStatistic = israStatistic.monthStatistic
|
||||
state.israYearStatistic = israStatistic.yearStatistic
|
||||
},
|
||||
SET_PRODUCTLINE: (state, productline) => {
|
||||
state.productline = productline
|
||||
},
|
||||
SET_SJGEQ: (state, equipment) => {
|
||||
state.sjgEquipment = equipment
|
||||
},
|
||||
SET_WORKORDER: (state, workOrder) => {
|
||||
state.workOrder = workOrder
|
||||
},
|
||||
SET_DEFECTSUM: (state, defectSum) => {
|
||||
state.defectSum = defectSum
|
||||
},
|
||||
SET_ORDER: (state, order) => {
|
||||
state.order = order
|
||||
},
|
||||
SET_YIELDRATETABLE: (state, yieldRateTable) => {
|
||||
state.yieldRateTable = yieldRateTable
|
||||
},
|
||||
SET_CUTCHARDAY: (state, cutChartDay) => {
|
||||
state.cutChartDay = cutChartDay
|
||||
},
|
||||
SET_CUTCHARWEEK: (state, cutChartWeek) => {
|
||||
state.cutChartWeek = cutChartWeek
|
||||
},
|
||||
SET_CUTCHARMONTH: (state, cutChartMonth) => {
|
||||
state.cutChartMonth = cutChartMonth
|
||||
},
|
||||
SET_CUTCHARYEAR: (state, cutChartYear) => {
|
||||
state.cutChartYear = cutChartYear
|
||||
}
|
||||
};
|
||||
const actions = {
|
||||
setFanFrequencyInfo({ commit }, fanFrequencyInfo) {
|
||||
commit('SET_FANFREQUENCYINFO', fanFrequencyInfo.payload)
|
||||
},
|
||||
setKilnInfo({ commit }, kilnInfo) {
|
||||
commit('SET_KILNINFO', kilnInfo.payload)
|
||||
},
|
||||
setGasInfo({ commit }, gasInfo) {
|
||||
commit('SET_GASINFO', gasInfo.payload)
|
||||
},
|
||||
setSumGasInfo({ commit }, sumGasInfo) {
|
||||
commit('SET_SUMGASINFO', sumGasInfo.payload)
|
||||
},
|
||||
|
||||
|
||||
setIsraKiln({ commit }, israKiln) {
|
||||
commit('SET_ISRAKILN', israKiln.payload)
|
||||
},
|
||||
setMaterial({ commit }, material) {
|
||||
commit('SET_MATERIAL', material.payload)
|
||||
},
|
||||
setEnergyInfo({ commit }, energyInfo) {
|
||||
commit('SET_ENERGYINFO', energyInfo.payload)
|
||||
},
|
||||
setEnergyTrend({ commit }, energyTrend) {
|
||||
commit('SET_ENERGYTREND', energyTrend.payload)
|
||||
},
|
||||
setEnergyMonitoring({ commit }, energyMonitoring) {
|
||||
commit('SET_ENERGY_MONITORING', energyMonitoring.payload)
|
||||
},
|
||||
setExhaustGasInfo({ commit }, exhaustGasInfo) {
|
||||
commit('SET_EXHAUSTGASINFO', exhaustGasInfo.payload)
|
||||
},
|
||||
setExhaustGasChart({ commit }, exhaustGasChart) {
|
||||
commit('SET_EXHAUSTGASCHART', exhaustGasChart.payload)
|
||||
},
|
||||
setDefectChart({ commit }, israStatistic) {
|
||||
commit('SET_DEFECTCHART', israStatistic.payload)
|
||||
},
|
||||
setProductline({ commit }, productline) {
|
||||
commit('SET_PRODUCTLINE', productline.payload)
|
||||
},
|
||||
setSJGEq({ commit }, equipment) {
|
||||
commit('SET_SJGEQ', equipment.payload)
|
||||
},
|
||||
setWorkOrder({ commit }, workOrder) {
|
||||
commit('SET_WORKORDER', workOrder.payload)
|
||||
},
|
||||
setDefectSum({ commit }, defectSum) {
|
||||
commit('SET_DEFECTSUM', defectSum.payload)
|
||||
},
|
||||
setOrder({ commit }, order) {
|
||||
commit('SET_ORDER', order.payload)
|
||||
},
|
||||
setYieldRateTable({ commit }, yieldRateTable) {
|
||||
commit('SET_YIELDRATETABLE', yieldRateTable.payload)
|
||||
},
|
||||
setCutChartDay({ commit }, cutChartDay) {
|
||||
commit('SET_CUTCHARDAY', cutChartDay.payload)
|
||||
},
|
||||
setCutChartWeek({ commit }, cutChartWeek) {
|
||||
commit('SET_CUTCHARWEEK', cutChartWeek.payload)
|
||||
},
|
||||
setCutChartMonth({ commit }, cutChartMonth) {
|
||||
commit('SET_CUTCHARMONTH', cutChartMonth.payload)
|
||||
},
|
||||
setCutChartYear({ commit }, cutChartYear) {
|
||||
commit('SET_CUTCHARYEAR', cutChartYear.payload)
|
||||
}
|
||||
};
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
mutations,
|
||||
actions,
|
||||
}
|
@ -201,3 +201,11 @@ input, textarea{
|
||||
.el-form--label-top .el-form-item__label {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
// 大屏滚动表格
|
||||
.dv-scroll-board .rows .ceil, .dv-scroll-board .header .header-item {
|
||||
border-right: 1px solid rgba(13, 23, 40, 1);
|
||||
}
|
||||
.dv-scroll-board .rows .ceil:last-child, .dv-scroll-board .header .header-item:last-child {
|
||||
border-right: none;
|
||||
}
|
@ -96,6 +96,7 @@ export const DICT_TYPE = {
|
||||
TIME_DIM: 'time_dim',
|
||||
TABLE_NAME: 'table_name',
|
||||
METHOD: 'method',
|
||||
PUSH: 'push',
|
||||
|
||||
// ============== ORDER - 订单模块 =============
|
||||
ORDER_STATUS: 'order_status',
|
||||
@ -109,7 +110,10 @@ export const DICT_TYPE = {
|
||||
FAULT_LEVEL: 'fault-level',
|
||||
|
||||
// ============== ENVIRONMENTAL - 环保模块 =============
|
||||
ENVIRONMENT_CHECK_UNIT: 'environment_check_unit'
|
||||
ENVIRONMENT_CHECK_UNIT: 'environment_check_unit',
|
||||
|
||||
// ============== GROUP - 班组模块 =============
|
||||
WORK_SHOP: 'workshop'
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-07-19 15:18:30
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-23 11:14:30
|
||||
* @LastEditTime: 2024-02-01 15:35:10
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -12,9 +12,9 @@
|
||||
lineHeight: 88 + 'px',
|
||||
fontSize: 31 + 'px'
|
||||
}">
|
||||
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt="">
|
||||
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.22em" alt="">
|
||||
许昌安彩AGV原片周转看板
|
||||
<h3 class="unit">单位:河南汇融科技服务有限公司</h3>
|
||||
<h3 class="unit">单位:河南汇融数字科技有限公司</h3>
|
||||
<h3 class="time">{{ times }}</h3>
|
||||
<!-- <el-button
|
||||
type="text"
|
||||
@ -29,13 +29,13 @@
|
||||
<el-row class="container-main flex-col" type="flex">
|
||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15 * beilv" type="flex" class="flex-1">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :beilv="1" :title="'搬运任务'" :title-icon="'5_1'" :back="'energy'">
|
||||
<base-table1 :page="1" :limit="9" :show-index="false" :beilv="1" :table-config="qualityYearTableProps"
|
||||
<base-container :beilv="1" :size="'middle'" :title="'搬运任务'" :title-icon="'5_1'" :back="'energy'">
|
||||
<base-table1 :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="qualityYearTableProps"
|
||||
:table-data="qualityYearList" />
|
||||
</base-container>
|
||||
</el-col>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :beilv="1" :title="'周转进度'" :title-icon="'5_3'" :back="'energy'">
|
||||
<base-container :beilv="1" :size="'middle'" :title="'周转进度'" :title-icon="'5_3'" :back="'energy'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div> -->
|
||||
@ -46,13 +46,15 @@
|
||||
<!-- <el-row style="margin-bottom: 1em">
|
||||
<p class="now-team-title">加工工单进度</p>
|
||||
</el-row> -->
|
||||
|
||||
<el-row v-for="op in orderProcessList" :key="op.id" style="margin-bottom: 1em">
|
||||
<el-progress :percentage="op.outRate * 100" class="custom-progress-bar" />
|
||||
<p v-if="op.outRate === 1" class="now-secondary-title" style="color:#4679FD">
|
||||
<i class="el-icon-check" />
|
||||
{{ op.name }}
|
||||
</p>
|
||||
<p v-else class="now-secondary-title">{{ op.name }}</p>
|
||||
<el-progress define-back-color="rgba(32, 57, 96, 1)" text-color="white" :percentage="op.outRate * 100"
|
||||
class="custom-progress-bar" />
|
||||
</el-row>
|
||||
<!-- <el-row>
|
||||
<el-progress :percentage="100" class="custom-progress-bar" />
|
||||
@ -85,16 +87,17 @@
|
||||
|
||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12 * beilv" type="flex" class="flex-1">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :beilv="1" :height="256" :title="'库存管理'" :title-icon="'5_5'" :back="'energy'">
|
||||
<base-container :beilv="1" :height="256" :size="'middle'" :title="'库存管理'" :title-icon="'5_5'"
|
||||
:back="'energy'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div> -->
|
||||
<!-- <el-row :gutter="9 * beilv"> -->
|
||||
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24"> -->
|
||||
<base-table :page="1" :limit="9" :show-index="false" :beilv="1" :table-config="inventoryTableProps"
|
||||
:table-data="inventoryList" />
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24"> -->
|
||||
<base-table :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="inventoryTableProps"
|
||||
:table-data="inventoryList" />
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-table3
|
||||
:page="2"
|
||||
:limit="5"
|
||||
@ -107,12 +110,13 @@
|
||||
</base-container>
|
||||
</el-col>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :beilv="1" :height="318 + 338 + 16" :title="'库位信息'" :title-icon="'5_4'" :back="'energy'">
|
||||
<base-container :beilv="1" :height="318 + 338 + 16" :size="'middle'" :title="'库位信息'" :title-icon="'5_4'"
|
||||
:back="'energy'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div> -->
|
||||
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
||||
<base-table2 :page="1" :limit="9" :show-index="false" :beilv="1" :table-config="locationTableProps"
|
||||
<base-table2 :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="locationTableProps"
|
||||
:table-data="locationList" />
|
||||
</base-container>
|
||||
</el-col>
|
||||
@ -401,13 +405,13 @@ const locationTableProps = [
|
||||
prop: 'level',
|
||||
label: '存放位置',
|
||||
// subcomponent: alarmLevel,
|
||||
align: 'center'
|
||||
// align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
label: '单位',
|
||||
// subcomponent: alarmLevel,
|
||||
align: 'center'
|
||||
// align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'product',
|
||||
@ -463,13 +467,13 @@ const inventoryTableProps = [
|
||||
prop: 'level',
|
||||
label: '规格',
|
||||
// subcomponent: alarmLevel,
|
||||
align: 'center'
|
||||
// align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
label: '单位',
|
||||
// subcomponent: alarmLevel,
|
||||
align: 'center'
|
||||
// align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'product',
|
||||
@ -515,7 +519,7 @@ const qualityYearTableProps = [
|
||||
prop: 'level',
|
||||
label: '库位',
|
||||
// subcomponent: alarmLevel,
|
||||
align: 'center'
|
||||
// align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'product',
|
||||
@ -753,6 +757,9 @@ export default {
|
||||
this.init()
|
||||
this.getTimes()
|
||||
this.windowWidth(document.documentElement.clientWidth)
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
}, 86400000)
|
||||
},
|
||||
mounted() {
|
||||
const _this = this;
|
||||
@ -874,6 +881,7 @@ export default {
|
||||
background-size: 100% 100%;
|
||||
color: #00fff0;
|
||||
text-align: center;
|
||||
word-spacing:8px;
|
||||
position: relative;
|
||||
.unit{
|
||||
position: absolute;
|
||||
|
159
src/views/OperationalOverview/components/ISRAChart.vue
Normal file
@ -0,0 +1,159 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-01-29 13:45:56
|
||||
* @LastEditTime: 2024-01-29 14:56:38
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<!-- <NotMsg v-show="notMsg"/> -->
|
||||
<div id="israChart" class="isra-chart" style="height:390px;"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
// import resize from './../mixins/resize'
|
||||
// import NotMsg from './../components/NotMsg'
|
||||
|
||||
export default {
|
||||
name: 'ISRAChart',
|
||||
// mixins: [resize],
|
||||
// components:{ NotMsg },
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
// notMsg:true,
|
||||
colors:['#2760ff', '#518eec', '#0ee8e4', '#ddb523'],
|
||||
chartData: []
|
||||
};
|
||||
},
|
||||
activated() {
|
||||
},
|
||||
computed: {
|
||||
israChartMsg() {
|
||||
return this.$store.state.websocket.israKiln
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
israChartMsg: {
|
||||
handler(newVal, oldVal) {
|
||||
this.chartData = newVal || []
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateChart() {
|
||||
console.log('update')
|
||||
let num = 0
|
||||
this.chartData && this.chartData.length > 0 && this.chartData.map(i => {
|
||||
num+=i.num
|
||||
})
|
||||
if (
|
||||
this.chart !== null &&
|
||||
this.chart !== '' &&
|
||||
this.chart !== undefined
|
||||
) {
|
||||
this.chart.dispose()
|
||||
}
|
||||
// if (this.chartData && this.chartData.length > 0) {
|
||||
// this.notMsg = false
|
||||
// } else {
|
||||
// this.notMsg = true
|
||||
// return
|
||||
// }
|
||||
this.chart = echarts.init(document.getElementById('israChart'));
|
||||
var option = {
|
||||
color:this.colors,
|
||||
title:{
|
||||
text: num,
|
||||
subtext: '总数',
|
||||
top: '32%',
|
||||
left: '49%',
|
||||
textAlign: 'center',
|
||||
textStyle: {
|
||||
fontSize: 32,
|
||||
color: '#fff',
|
||||
},
|
||||
subtextStyle: {
|
||||
fontSize: 20,
|
||||
color: '#fff00',
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
bottom: '2%',
|
||||
left: 'center',
|
||||
itemWidth: 18,
|
||||
itemHeight:18,
|
||||
icon: 'circle',
|
||||
textStyle: {
|
||||
color: '#fff'
|
||||
},
|
||||
data:this.chartData && this.chartData.length > 0 && this.chartData.map((item,index)=>({
|
||||
name:item.name,
|
||||
itemStyle:{
|
||||
color: this.colors[index%4]
|
||||
}
|
||||
}))
|
||||
},
|
||||
series:[{
|
||||
name: 'ISRA缺陷检测',
|
||||
type: 'pie',
|
||||
center: ['50%', '40%'],
|
||||
radius: ['45%', '70%'],
|
||||
avoidLabelOverlap: true,
|
||||
label: {
|
||||
show: false
|
||||
},
|
||||
labelLine: {
|
||||
show: true,
|
||||
},
|
||||
data: this.chartData && this.chartData.length > 0 && this.chartData.map((item, index) => ({
|
||||
name:item.name,
|
||||
value: item.num,
|
||||
itemStyle:{
|
||||
color:{
|
||||
type: 'linear',
|
||||
x: 1,
|
||||
y: 1,
|
||||
x2: 0,
|
||||
y2: 0,
|
||||
global: false,
|
||||
colorStops:[
|
||||
{offset: 0,color: this.colors[index%4]},
|
||||
{offset: 1,color: this.colors[index%4]+'33'}
|
||||
]
|
||||
}
|
||||
}
|
||||
}))}],
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
className: "isra-chart-tooltip"
|
||||
},
|
||||
}
|
||||
this.chart.setOption(option);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.isra-chart {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.isra-chart-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.isra-chart-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2022-01-21 14:43:06
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-24 09:12:18
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-01-25 17:41:44
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -143,9 +143,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart()
|
||||
})
|
||||
// this.$nextTick(() => {
|
||||
// // this.initChart()
|
||||
// })
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
|
@ -2,13 +2,13 @@
|
||||
* @Author: gtz
|
||||
* @Date: 2022-01-19 15:58:17
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-14 13:28:27
|
||||
* @LastEditTime: 2024-02-01 15:25:14
|
||||
* @Description: file content
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="base-container" ref="baseContainer" :style="{ height: '100%', fontSize: 12 + 'px', padding: 12 + 'px' }"
|
||||
:class="{ 'no-padding': noPadding, 'border-none': !showLine }">
|
||||
:class="[{ 'no-padding': noPadding, 'border-none': !showLine }, 'base-container__' + size]">
|
||||
<!-- <div class="base-container" :style="{height: height + 'px', fontSize: 12 + 'px', padding: 12 + 'px'}"> -->
|
||||
<template v-if="showLine">
|
||||
<div class="line" />
|
||||
@ -22,12 +22,24 @@
|
||||
</template>
|
||||
|
||||
<div class="bar-item">
|
||||
<div v-if="title" class="bar-title">
|
||||
<div v-if="title" class="bar-title" ds>
|
||||
<span>
|
||||
<svg-icon :icon-class="titleIcon" style="font-size: 1.5em; position: relative; top: .08em" />
|
||||
<svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .08em" />
|
||||
{{ title }}
|
||||
</span>
|
||||
<!-- <span v-if="showTime" style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
||||
{{ time2 +'-'+ time }}
|
||||
</span> -->
|
||||
<span style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
||||
{{ startTime + '-' + endTime }}
|
||||
</span>
|
||||
</div>
|
||||
<!-- <div v-if="true" class="bar-title">
|
||||
<span>
|
||||
<svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .08em" />
|
||||
{{ title }}
|
||||
</span>
|
||||
</div> -->
|
||||
<div class="bar-content" :class="{ 'p-0': noContentPadding }">
|
||||
<slot />
|
||||
</div>
|
||||
@ -36,6 +48,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from "moment";
|
||||
export default {
|
||||
name: 'BaseContainer',
|
||||
props: {
|
||||
@ -47,6 +60,14 @@ export default {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showTime: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showYesTime: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
back: {
|
||||
type: String,
|
||||
default: ''
|
||||
@ -74,26 +95,62 @@ export default {
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
curIndex: 0,
|
||||
time: null,
|
||||
time2: null,
|
||||
startTime: undefined,
|
||||
endTime: undefined
|
||||
// imgUrl: require(`../../../../assets/img/${this.back}.png`),
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log(this.back);
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseContainer.style = `background:url('../../../../assets/img/${this.back}.png') no-repeat;)`
|
||||
// })
|
||||
// console.log(this.$refs.baseContainer.style)
|
||||
},
|
||||
mounted () {
|
||||
// this.time = this.format(new Date().setHours(7,0,0));
|
||||
// // console.log(time);
|
||||
// //前一天时间
|
||||
let nowTime = new Date
|
||||
let hour = nowTime.getHours()
|
||||
if (hour > 6) {
|
||||
this.startTime = moment(nowTime).format('yyyy.MM.DD') + ' 7点'
|
||||
this.endTime = moment(moment(nowTime) + 86400000).format('yyyy.MM.DD') + ' 7点'
|
||||
} else {
|
||||
this.endTime = moment(nowTime).format('yyyy.MM.DD') + ' 7点'
|
||||
this.startTime = moment(moment(nowTime) - 86400000).format('yyyy.MM.DD') + ' 7点'
|
||||
}
|
||||
// this.yesStartTime = moment(moment(nowTime) - 86400000).format('yyyy.MM.DD') + ' 0点'
|
||||
// this.yesEndTime = moment(moment(nowTime) - 86400000).format('yyyy.MM.DD') + ' 24点'
|
||||
|
||||
// this.time2 = this.format(new Date().setHours(7, 0, 0) - 86400000 * 1);
|
||||
// console.log(new Date().setHours(7, 0, 0) - 86400000 * 1);
|
||||
},
|
||||
methods: {
|
||||
changeTab(num) {
|
||||
this.curIndex = num
|
||||
this.$emit('tabSelect', num)
|
||||
}
|
||||
// add0(m) {
|
||||
// return m < 10 ? '0' + m : m
|
||||
// },
|
||||
// format(shijianchuo) {
|
||||
// //shijianchuo是整数,否则要parseInt转换
|
||||
// var time = new Date(shijianchuo);
|
||||
// var y = time.getFullYear();
|
||||
// var m = time.getMonth() + 1;
|
||||
// var d = time.getDate();
|
||||
// var h = time.getHours();
|
||||
// var mm = time.getMinutes();
|
||||
// var s = time.getSeconds();
|
||||
// return y + '-' + this.add0(m) + '-' + this.add0(d) + ' ' + h + '时'
|
||||
// },
|
||||
// changeTab(num) {
|
||||
// this.curIndex = num
|
||||
// this.$emit('tabSelect', num)
|
||||
// },
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -106,8 +163,29 @@ export default {
|
||||
// background-color: rgba($color: #061027, $alpha: 0.15);
|
||||
position: relative;
|
||||
// border: 2px solid;
|
||||
background: url('../../../../assets/img/energy.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
// background: url('../../../../assets/img/energy.png') no-repeat;
|
||||
// background-size: 100% 100%;
|
||||
&__small {
|
||||
background: url(../../../../assets/img/short.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
// background-position: 0 0;
|
||||
}
|
||||
|
||||
&__middle {
|
||||
background: url(../../../../assets/img/middle.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
// background-position: 0 0;
|
||||
}
|
||||
|
||||
&__large {
|
||||
background: url(../../../../assets/img/high.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
// background-position: 0 0;
|
||||
}
|
||||
&__eqStatus {
|
||||
background: url(../../../../assets/img/short.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
// border-radius: 40px 0px 40px 0px;
|
||||
// border-image: linear-gradient(360deg, rgba(157, 246, 254, 0.05), rgba(100, 233, 252, 0.9)) 2 2;
|
||||
// .line {
|
||||
@ -170,14 +248,16 @@ export default {
|
||||
|
||||
.bar-title {
|
||||
width: 100%;
|
||||
color: #52fff1;
|
||||
font-size: 1.5em;
|
||||
padding: 0.67em;
|
||||
color: #ffffff;
|
||||
font-size: 24px;
|
||||
padding: 0.67em 0.67em 0.3em 0.67em;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.bar-content {
|
||||
padding: 1em;
|
||||
padding: .5em 1em 1em 1em;
|
||||
flex: 1 auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.no-padding {
|
||||
|
@ -1,47 +1,44 @@
|
||||
<!--
|
||||
* @Date: 2020-12-14 09:07:03
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-14 10:11:09
|
||||
* @LastEditTime: 2024-01-12 14:30:46
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="visual-base-table-container">
|
||||
<el-table
|
||||
v-loading="isLoading"
|
||||
:header-cell-style="{background:'rgba(4, 74, 132, .19)',color:'#fff'}"
|
||||
:row-style="setRowStyle"
|
||||
:data="renderData"
|
||||
border
|
||||
style="width: 100%; background: transparent"
|
||||
>
|
||||
<el-table-column
|
||||
v-if="page && limit && showIndex"
|
||||
prop="_pageIndex"
|
||||
:label="'tableHeader.index' | i18nFilter"
|
||||
:width="70"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
v-for="item in renderTableHeadList"
|
||||
:key="item.prop"
|
||||
:show-overflow-tooltip="showOverflow"
|
||||
v-bind="item"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<component
|
||||
:is="item.subcomponent"
|
||||
v-if="item.subcomponent"
|
||||
:inject-data="{...scope.row, ...item}"
|
||||
@emitData="emitData"
|
||||
/>
|
||||
<span v-else>{{ scope.row[item.prop] | commonFilter(item.filter) }}</span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<slot name="content" />
|
||||
</el-table>
|
||||
<div class="visual-base-table-container scroll_table">
|
||||
<div style="display: inline-block; width: 100%">
|
||||
<el-table class="top" v-loading="isLoading"
|
||||
:header-cell-style="{ background: 'rgba(32, 55, 96, 1)', color: '#fff', height: '33px', }"
|
||||
:row-style="setRowStyle" :data="renderData" border style="width: 100%; background: transparent">
|
||||
<el-table-column prop="_pageIndex" label="序号" :width="50" align="center" />
|
||||
<el-table-column v-for="item in renderTableHeadList" :key="item.prop" :show-overflow-tooltip="showOverflow"
|
||||
v-bind="item">
|
||||
<template slot-scope="scope">
|
||||
<component :is="item.subcomponent" v-if="item.subcomponent" :inject-data="{...scope.row, ...item}"
|
||||
@emitData="emitData" />
|
||||
<span v-else>{{ scope.row[item.prop] | commonFilter(item.filter) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<slot name="content" />
|
||||
</el-table>
|
||||
<vue-seamless-scroll :data="renderData" class="seamless-warp" style="width: 100%" :class-option="classOption">
|
||||
<el-table class="bottom" v-loading="isLoading"
|
||||
:header-cell-style="{background:'rgba(4, 74, 132, .19)',color:'#fff',}" :row-style="setRowStyle"
|
||||
:data="renderData" border style="width: 100%; background: transparent">
|
||||
<el-table-column prop="_pageIndex" label="序号" :width="50" align="center" />
|
||||
<el-table-column v-for="item in renderTableHeadList" :key="item.prop" :show-overflow-tooltip="showOverflow"
|
||||
v-bind="item">
|
||||
<template slot-scope="scope">
|
||||
<component :is="item.subcomponent" v-if="item.subcomponent" :inject-data="{...scope.row, ...item}"
|
||||
@emitData="emitData" />
|
||||
<span v-else>{{ scope.row[item.prop] | commonFilter(item.filter) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<slot name="content" />
|
||||
</el-table>
|
||||
</vue-seamless-scroll>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -110,7 +107,19 @@ export default {
|
||||
return this.tableConfig.filter((item, index) => {
|
||||
return this.selectedBox[index]
|
||||
})
|
||||
}
|
||||
},
|
||||
classOption() {
|
||||
return {
|
||||
step: 0.2, // 数值越大速度滚动越快
|
||||
limitMoveNum: 10, // 开始无缝滚动的数据量 this.list
|
||||
hoverStop: true, // 是否开启鼠标悬停stop
|
||||
direction: 1, // 0向下 1向上 2向左 3向右
|
||||
openWatch: true, // 开启数据实时监控刷新dom
|
||||
singleHeight: 0/1, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
|
||||
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
|
||||
waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
|
||||
};
|
||||
},
|
||||
},
|
||||
beforeMount() {
|
||||
this.selectedBox = new Array(100).fill(true)
|
||||
@ -172,16 +181,23 @@ export default {
|
||||
background-color: rgba(79,114,136,0.29) !important;
|
||||
}
|
||||
}
|
||||
// .setting {
|
||||
// text-align: right;
|
||||
// padding: 15px;
|
||||
// .setting-box {
|
||||
// width: 100px;
|
||||
// }
|
||||
// i {
|
||||
// color: #aaa;
|
||||
// @extend .pointer;
|
||||
// }
|
||||
// }
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
.seamless-warp {
|
||||
height: 308px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.min {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
.top .el-table__body-wrapper {
|
||||
display: none;
|
||||
}
|
||||
.bottom .el-table__header-wrapper {
|
||||
display: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
292
src/views/OperationalOverview/components/coldDoubleYChart.vue
Normal file
@ -0,0 +1,292 @@
|
||||
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-09-21 09:06:28
|
||||
* @LastEditTime: 2024-01-29 15:39:59
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div :id="id" class="productChart" :style="{ height: '390px', width: width }" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import 'echarts/theme/macarons' // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
|
||||
export default {
|
||||
name: 'OverviewBar',
|
||||
mixins: [resize],
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: 'linearBarChart'
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
borderRadius: {
|
||||
type: Array,
|
||||
default: () => [9, 9, 0, 0]
|
||||
},
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 200
|
||||
},
|
||||
showLegend: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
nameList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
dataList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
series: [{
|
||||
type: 'bar',
|
||||
data: [],
|
||||
barWidth: 6
|
||||
}]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('mounted')
|
||||
console.log('borderRadius: ', this.borderRadius)
|
||||
// this.$nextTick(() => {
|
||||
// this.initChart()
|
||||
// })
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart(nameList, passRateList, outputNumList) {
|
||||
console.log(nameList, passRateList)
|
||||
let series= [
|
||||
{
|
||||
name: '产线产量',
|
||||
type: 'bar',
|
||||
yAxisIndex: 1,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#9DD5FF' },
|
||||
{ offset: 0.3, color: '#1295FF' }
|
||||
]),
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
textStyle: { //数值样式
|
||||
color: '#ced1d5',
|
||||
fontSize: 12
|
||||
}
|
||||
},
|
||||
}
|
||||
// barBorderRadius: this.borderRadius
|
||||
},
|
||||
barWidth: 12,
|
||||
data: outputNumList
|
||||
},
|
||||
{
|
||||
name: '产线良品率',
|
||||
symbol: 'circle', //变为实心圆
|
||||
type: 'line',
|
||||
yAxisIndex: 0,
|
||||
areaStyle: {
|
||||
opacity: 0.8,
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: 'rgba(255, 209, 96, 0.18)'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: 'rgba(255, 234, 153, 0)'
|
||||
}
|
||||
])
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: 'rgba(255, 209, 96, 1)', //改变折线点的颜色
|
||||
lineStyle: {
|
||||
color: 'rgba(255, 209, 96, 1)' //改变折线颜色
|
||||
}
|
||||
}
|
||||
},
|
||||
data: passRateList
|
||||
}
|
||||
]
|
||||
// const colors = ['#5470C6', '#91CC75', '#EE6666']
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
this.chart.setOption({
|
||||
// color: colors,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: "3%",
|
||||
right: "5%",
|
||||
bottom: "3%",
|
||||
containLabel: true
|
||||
},
|
||||
legend: {
|
||||
itemWidth: 10,
|
||||
itemHeight: 10,
|
||||
top: '1%',
|
||||
// right: '20px',
|
||||
data: ['产线产量', '产线良品率'],
|
||||
textStyle: {
|
||||
fontSize: 12 * this.beilv,
|
||||
color: '#ced1d5'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#213259', // 左边线的颜色
|
||||
width: '1' // 坐标线的宽度
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#213259'
|
||||
}
|
||||
},
|
||||
data: nameList
|
||||
},
|
||||
// yAxis: {
|
||||
|
||||
// },
|
||||
yAxis: [
|
||||
{
|
||||
min: function() { // 取最小值向下取整为最小刻度
|
||||
return 0
|
||||
},
|
||||
max: function(value) { // 取最大值向上取整为最大刻度
|
||||
return Math.ceil(value.max)
|
||||
},
|
||||
scale: true,
|
||||
type: 'value',
|
||||
name: '良品率/%',
|
||||
nameTextStyle: {// y轴上方单位的颜色
|
||||
color: '#fff',
|
||||
align: "left",
|
||||
},
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#213259', // 左边线的颜色
|
||||
width: '1' // 坐标线的宽度
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: '#ced1d5', // 坐标值得具体的颜色
|
||||
formatter: '{value}%'
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#213259'
|
||||
}
|
||||
}
|
||||
// type: 'value'
|
||||
// axisLine: {
|
||||
// show: true,
|
||||
// lineStyle: {
|
||||
// color: colors[0]
|
||||
// }
|
||||
// },
|
||||
},
|
||||
{
|
||||
min: function() { // 取最小值向下取整为最小刻度
|
||||
return 0
|
||||
},
|
||||
max: function(value) { // 取最大值向上取整为最大刻度
|
||||
return Math.ceil(value.max)
|
||||
},
|
||||
scale: true,
|
||||
type: 'value',
|
||||
name: '产量/㎡', // y轴上方的单位
|
||||
nameTextStyle: {
|
||||
color: "#fff",
|
||||
// fontSize: 10,
|
||||
align: "right",
|
||||
},
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#213259', // 左边线的颜色
|
||||
width: '1' // 坐标线的宽度
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
|
||||
formatter: '{value} 片'
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#213259'
|
||||
}
|
||||
}
|
||||
// type: 'value'
|
||||
// axisLine: {
|
||||
// show: true,
|
||||
// lineStyle: {
|
||||
// color: colors[1]
|
||||
// }jik078u7uut9890999999999999999999999999999999999999999999999999999999999999995u8
|
||||
// },
|
||||
}
|
||||
],
|
||||
series: series
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.productChart{
|
||||
top: -10px;
|
||||
}
|
||||
</style>
|
44
src/views/OperationalOverview/components/colorDiv.vue
Normal file
@ -0,0 +1,44 @@
|
||||
<!--
|
||||
* @Date: 2021-02-20 10:45:21
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-01-09 16:16:43
|
||||
* @FilePath: \basic-admin\src\views\EquipmentManager\TypeParamSetting\ColorSqua.vue
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<span :class="[injectData.product <= 91 ? 'orange' : 'white']" >
|
||||
{{ injectData.product + "%" }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
color: 'rgba(255,255,255,0.5)',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.product = this.injectData.product
|
||||
},
|
||||
methods: {
|
||||
emitClick() {
|
||||
console.log(this.injectData)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.orange{
|
||||
color:rgba(255, 209, 96, 1)
|
||||
}
|
||||
.white{
|
||||
color:rgba(255, 255, 255, 0.5)
|
||||
}
|
||||
</style>
|
@ -1,13 +1,13 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-09-21 09:06:28
|
||||
* @LastEditTime: 2023-10-16 14:20:45
|
||||
* @LastEditTime: 2024-02-01 15:52:41
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div :id="id" :class="className" :style="{ height: height + 'px', width: width }" />
|
||||
<div style="height: 400px;">
|
||||
<div :id="id" class="productChart" :style="{ height: '420px', width: width }" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
import * as echarts from 'echarts';
|
||||
import 'echarts/theme/macarons' // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
|
||||
// import resize from './../mixins/resize'
|
||||
export default {
|
||||
name: 'OverviewBar',
|
||||
mixins: [resize],
|
||||
@ -60,101 +60,25 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
series: []
|
||||
series: [{
|
||||
type: 'bar',
|
||||
data: [],
|
||||
barWidth: 6
|
||||
}]
|
||||
}
|
||||
},
|
||||
// mounted() {
|
||||
// console.log('mounted')
|
||||
// console.log('borderRadius: ', this.borderRadius)
|
||||
// // this.$nextTick(() => {
|
||||
// // this.initChart()
|
||||
// // })
|
||||
// },
|
||||
mounted() {
|
||||
console.log('mounted')
|
||||
console.log('borderRadius: ', this.borderRadius)
|
||||
|
||||
this.series = [
|
||||
{
|
||||
name: this.dataList[0].name,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[0].topColor },
|
||||
{ offset: 1, color: this.dataList[0].bottomColor }
|
||||
]),
|
||||
barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: this.dataList[0].data,
|
||||
barWidth: 6
|
||||
},
|
||||
{
|
||||
name: this.dataList[1].name,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[1].topColor },
|
||||
{ offset: 1, color: this.dataList[1].bottomColor }
|
||||
]),
|
||||
barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: this.dataList[1].data,
|
||||
barWidth: 6
|
||||
},
|
||||
{
|
||||
name: this.dataList[2].name,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[2].topColor },
|
||||
{ offset: 1, color: this.dataList[2].bottomColor }
|
||||
]),
|
||||
// borderRadius: [5, 5, 0, 0]
|
||||
barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: this.dataList[2].data,
|
||||
barWidth: 6
|
||||
},
|
||||
{
|
||||
name: this.dataList[3].name,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[3].topColor },
|
||||
{ offset: 1, color: this.dataList[3].bottomColor }
|
||||
]),
|
||||
// borderRadius: [5, 5, 0, 0]
|
||||
barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: this.dataList[3].data,
|
||||
barWidth: 6
|
||||
},
|
||||
{
|
||||
name: this.dataList[4].name,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[4].topColor },
|
||||
{ offset: 1, color: this.dataList[4].bottomColor }
|
||||
]),
|
||||
// borderRadius: [5, 5, 0, 0]
|
||||
barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: this.dataList[4].data,
|
||||
barWidth: 6
|
||||
},
|
||||
{
|
||||
name: this.dataList[5].name,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[5].topColor },
|
||||
{ offset: 1, color: this.dataList[5].bottomColor }
|
||||
]),
|
||||
// borderRadius: [5, 5, 0, 0]
|
||||
barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: this.dataList[5].data,
|
||||
barWidth: 6
|
||||
}
|
||||
]
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.initChart()
|
||||
})
|
||||
this.$el.addEventListener('resize', () => {
|
||||
console.log('resziing.....');
|
||||
});
|
||||
this.initChart()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
@ -164,22 +88,79 @@ export default {
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
console.log(1)
|
||||
const colors = ['#5470C6', '#91CC75', '#EE6666']
|
||||
initChart(nameList, passRateList, outputNumList) {
|
||||
console.log(nameList, passRateList)
|
||||
let series= [
|
||||
{
|
||||
name: '产线产量',
|
||||
type: 'bar',
|
||||
yAxisIndex: 1,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#9DD5FF' },
|
||||
{ offset: 0.3, color: '#1295FF' }
|
||||
]),
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
textStyle: { //数值样式
|
||||
color: '#ced1d5',
|
||||
fontSize: 12
|
||||
}
|
||||
},
|
||||
}
|
||||
// barBorderRadius: this.borderRadius
|
||||
},
|
||||
barWidth: 12,
|
||||
data: outputNumList
|
||||
},
|
||||
{
|
||||
name: '产线良品率',
|
||||
symbol: 'circle', //变为实心圆
|
||||
type: 'line',
|
||||
yAxisIndex: 0,
|
||||
areaStyle: {
|
||||
opacity: 0.8,
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: 'rgba(255, 209, 96, 0.18)'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: 'rgba(255, 234, 153, 0)'
|
||||
}
|
||||
])
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: 'rgba(255, 209, 96, 1)', //改变折线点的颜色
|
||||
lineStyle: {
|
||||
color: 'rgba(255, 209, 96, 1)' //改变折线颜色
|
||||
}
|
||||
}
|
||||
},
|
||||
// data: passRateList
|
||||
data: []
|
||||
}
|
||||
]
|
||||
// const colors = ['#5470C6', '#91CC75', '#EE6666']
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
this.chart.setOption({
|
||||
color: colors,
|
||||
// color: colors,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
right: '20%'
|
||||
},
|
||||
grid: { top: 90, right: 60, bottom: 20, left: 90 },
|
||||
legend: {
|
||||
itemWidth: 10,
|
||||
itemHeight: 10,
|
||||
top: '0%',
|
||||
right: '20px',
|
||||
data: ['产线产量', '产线良品率'],
|
||||
textStyle: {
|
||||
fontSize: 12 * this.beilv,
|
||||
@ -196,37 +177,42 @@ export default {
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
||||
}
|
||||
color: "#fff",
|
||||
fontSize: 12,
|
||||
// formatter: '{value}'
|
||||
// textStyle: {
|
||||
// color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
||||
// }
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#213259'
|
||||
}
|
||||
},
|
||||
data: ['钢一线', '钢二线', '钢三线', '钢四线', '钢五线', '钢六线', '钢七线', '钢八线']
|
||||
data: nameList
|
||||
},
|
||||
// yAxis: {
|
||||
|
||||
// },
|
||||
yAxis: [
|
||||
{
|
||||
min: function() { // 取最小值向下取整为最小刻度
|
||||
return 0
|
||||
},
|
||||
max: function(value) { // 取最大值向上取整为最大刻度
|
||||
return Math.ceil(value.max)
|
||||
},
|
||||
// min: function() { // 取最小值向下取整为最小刻度
|
||||
// return 0
|
||||
// },
|
||||
// max: function(value) { // 取最大值向上取整为最大刻度
|
||||
// return Math.ceil(value.max)
|
||||
// },
|
||||
scale: true,
|
||||
type: 'value',
|
||||
name: '良品率/%',
|
||||
nameTextStyle: {// y轴上方单位的颜色
|
||||
color: '#fff'
|
||||
color: '#fff',
|
||||
align: "left",
|
||||
},
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#213259', // 左边线的颜色
|
||||
@ -234,11 +220,11 @@ export default {
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: '#ced1d5', // 坐标值得具体的颜色
|
||||
formatter: '{value} 片'
|
||||
|
||||
}
|
||||
color: "#fff",
|
||||
fontSize: 12,
|
||||
// formatter: '{value}'
|
||||
formatter: '{value}%'
|
||||
// }
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
@ -254,21 +240,24 @@ export default {
|
||||
// },
|
||||
},
|
||||
{
|
||||
min: function() { // 取最小值向下取整为最小刻度
|
||||
return 0
|
||||
},
|
||||
max: function(value) { // 取最大值向上取整为最大刻度
|
||||
return Math.ceil(value.max)
|
||||
},
|
||||
// min: function() { // 取最小值向下取整为最小刻度
|
||||
// return 0
|
||||
// },
|
||||
// max: function(value) { // 取最大值向上取整为最大刻度
|
||||
// return Math.ceil(value.max)
|
||||
// },
|
||||
scale: true,
|
||||
type: 'value',
|
||||
name: '产量/片', // y轴上方的单位
|
||||
nameTextStyle: {// y轴上方单位的颜色
|
||||
color: '#fff'
|
||||
nameTextStyle: {
|
||||
color: "#fff",
|
||||
// fontSize: 10,
|
||||
align: "right",
|
||||
},
|
||||
position: 'left',
|
||||
// position: 'left',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#213259', // 左边线的颜色
|
||||
@ -276,10 +265,13 @@ export default {
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
|
||||
formatter: '{value} 片'
|
||||
}
|
||||
// textStyle: {
|
||||
// color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
|
||||
color: "#fff",
|
||||
fontSize: 12,
|
||||
// formatter: '{value}'
|
||||
formatter: '{value} 片'
|
||||
// }
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
@ -291,35 +283,21 @@ export default {
|
||||
// show: true,
|
||||
// lineStyle: {
|
||||
// color: colors[1]
|
||||
// }
|
||||
// }jik078u7uut9890999999999999999999999999999999999999999999999999999999999999995u8
|
||||
// },
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '产线产量',
|
||||
type: 'bar',
|
||||
yAxisIndex: 1,
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#9DD5FF' },
|
||||
{ offset: 1, color: '#1295FF' }
|
||||
])
|
||||
// barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: [
|
||||
2032, 3032, 1802, 2932, 2322, 2613, 2873, 2561
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '产线良品率',
|
||||
type: 'line',
|
||||
yAxisIndex: 0,
|
||||
data: [98, 97, 94, 97.6, 98.2, 98.2, 97.4, 98.5]
|
||||
}
|
||||
]
|
||||
series: series
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.productChart{
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
top: -30px;
|
||||
}
|
||||
</style>
|
||||
|
@ -41,113 +41,39 @@ export default {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
nameList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
dataList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
// nameList: {
|
||||
// type: Array,
|
||||
// default: () => []
|
||||
// },
|
||||
// dataList: {
|
||||
// type: Array,
|
||||
// default: () => []
|
||||
// }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
series: []
|
||||
nameList: [],
|
||||
series: [{
|
||||
type: 'bar',
|
||||
data: [],
|
||||
barWidth: 6
|
||||
|
||||
}]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('mounted')
|
||||
console.log('borderRadius: ', this.borderRadius)
|
||||
|
||||
this.series = [
|
||||
{
|
||||
name: this.dataList[0].name,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[0].topColor },
|
||||
{ offset: 1, color: this.dataList[0].bottomColor }
|
||||
]),
|
||||
barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: this.dataList[0].data,
|
||||
barWidth: 6
|
||||
},
|
||||
{
|
||||
name: this.dataList[1].name,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[1].topColor },
|
||||
{ offset: 1, color: this.dataList[1].bottomColor }
|
||||
]),
|
||||
barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: this.dataList[1].data,
|
||||
barWidth: 6
|
||||
},
|
||||
{
|
||||
name: this.dataList[2].name,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[2].topColor },
|
||||
{ offset: 1, color: this.dataList[2].bottomColor }
|
||||
]),
|
||||
// borderRadius: [5, 5, 0, 0]
|
||||
barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: this.dataList[2].data,
|
||||
barWidth: 6
|
||||
},
|
||||
{
|
||||
name: this.dataList[3].name,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[3].topColor },
|
||||
{ offset: 1, color: this.dataList[3].bottomColor }
|
||||
]),
|
||||
// borderRadius: [5, 5, 0, 0]
|
||||
barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: this.dataList[3].data,
|
||||
barWidth: 6
|
||||
},
|
||||
{
|
||||
name: this.dataList[4].name,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[4].topColor },
|
||||
{ offset: 1, color: this.dataList[4].bottomColor }
|
||||
]),
|
||||
// borderRadius: [5, 5, 0, 0]
|
||||
barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: this.dataList[4].data,
|
||||
barWidth: 6
|
||||
},
|
||||
{
|
||||
name: this.dataList[5].name,
|
||||
type: 'bar',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: this.dataList[5].topColor },
|
||||
{ offset: 1, color: this.dataList[5].bottomColor }
|
||||
]),
|
||||
// borderRadius: [5, 5, 0, 0]
|
||||
barBorderRadius: this.borderRadius
|
||||
},
|
||||
data: this.dataList[5].data,
|
||||
barWidth: 6
|
||||
}
|
||||
]
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.initChart()
|
||||
})
|
||||
// console.log('33333', this.dataList)
|
||||
// let arr = []
|
||||
// this.dataList.forEach(ele => {
|
||||
// console.log(ele);
|
||||
// this.series = []
|
||||
this.initChart()
|
||||
// this.$nextTick(() => {
|
||||
// // this.initChart()
|
||||
// })
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
@ -157,9 +83,38 @@ export default {
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
console.log(1)
|
||||
initChart(nameList, dataList) {
|
||||
console.log('1111', dataList);
|
||||
// console.log(1)
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
// if (dataList.length !== 0) {
|
||||
// this.$set(this.series, "data", dataList);
|
||||
this.series = [{
|
||||
type: 'bar',
|
||||
data: dataList,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#9DD5FF' },
|
||||
{ offset: 0.3, color: '#1295FF' }
|
||||
]),
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
textStyle: { //数值样式
|
||||
color: '#ced1d5',
|
||||
fontSize: 12
|
||||
}
|
||||
},
|
||||
}
|
||||
// barBorderRadius: this.borderRadius
|
||||
},
|
||||
barWidth: 12,
|
||||
}]
|
||||
// }
|
||||
// if (nameList.length !== 0) {
|
||||
this.nameList = nameList
|
||||
// }
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
@ -175,6 +130,16 @@ export default {
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
// legend: {
|
||||
// itemWidth: 10,
|
||||
// itemHeight: 10,
|
||||
// // right: '20px',
|
||||
// data: nameList,
|
||||
// textStyle: {
|
||||
// fontSize: 12 * this.beilv,
|
||||
// color: '#ced1d5'
|
||||
// }
|
||||
// },
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
axisLine: {
|
||||
@ -185,9 +150,9 @@ export default {
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
||||
}
|
||||
color: "#fff",
|
||||
fontSize: 12,
|
||||
// formatter: '{value}'
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
@ -197,41 +162,47 @@ export default {
|
||||
data: this.nameList
|
||||
},
|
||||
yAxis: {
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
type: 'solid',
|
||||
color: '#213259', // 左边线的颜色
|
||||
width: '1' // 坐标线的宽度
|
||||
}
|
||||
name: '单位kwh',
|
||||
nameTextStyle: {
|
||||
color: '#fff',
|
||||
fontSize: 10,
|
||||
align: 'right',
|
||||
},
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: 'rgba(255,255,255,0.5)' // 坐标值得具体的颜色
|
||||
}
|
||||
color: "#fff",
|
||||
fontSize: 12,
|
||||
formatter: '{value}/kwh'
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: "#213259",
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#213259'
|
||||
}
|
||||
},
|
||||
type: 'value'
|
||||
},
|
||||
legend: {
|
||||
itemHeight: 10,
|
||||
itemWidth: 10,
|
||||
x: 'center', // 可设定图例在左、右、居中
|
||||
y: 'top', // 可设定图例在上、下、居中
|
||||
show: this.showLegend,
|
||||
data: this.dataList,
|
||||
right: '1%',
|
||||
textStyle: {
|
||||
fontSize: 12 * this.beilv,
|
||||
color: '#ced1d5'
|
||||
color: "#213259a0",
|
||||
},
|
||||
}
|
||||
},
|
||||
// legend: {
|
||||
// itemHeight: 10,
|
||||
// itemWidth: 10,
|
||||
// x: 'center', // 可设定图例在左、右、居中
|
||||
// y: 'top', // 可设定图例在上、下、居中
|
||||
// show: this.showLegend,
|
||||
// data: this.dataList,
|
||||
// right: '1%',
|
||||
// textStyle: {
|
||||
// fontSize: 12 * this.beilv,
|
||||
// color: '#ced1d5'
|
||||
// }
|
||||
// },
|
||||
series: this.series
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
224
src/views/OperationalOverview/components/pileBarChart.vue
Normal file
@ -0,0 +1,224 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-27 13:54:52
|
||||
* @LastEditTime: 2024-01-25 14:08:27
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div :id="id" class="productChart" :style="{ height: height + 'px', width: width }" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import 'echarts/theme/macarons' // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
|
||||
export default {
|
||||
name: 'OverviewBar',
|
||||
mixins: [resize],
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: 'linearBarChart'
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
borderRadius: {
|
||||
type: Array,
|
||||
default: () => [9, 9, 0, 0]
|
||||
},
|
||||
beilv: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 200
|
||||
},
|
||||
showLegend: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// nameList: {
|
||||
// type: Array,
|
||||
// default: () => []
|
||||
// },
|
||||
// dataList: {
|
||||
// type: Array,
|
||||
// default: () => []
|
||||
// }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
nameList: [],
|
||||
series: [{
|
||||
type: 'bar',
|
||||
data: [],
|
||||
barWidth: 6
|
||||
|
||||
}]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('mounted')
|
||||
// console.log('borderRadius: ', this.borderRadius)
|
||||
// console.log('33333', this.dataList)
|
||||
// let arr = []
|
||||
// this.dataList.forEach(ele => {
|
||||
// console.log(ele);
|
||||
// this.series = []
|
||||
this.initChart()
|
||||
// this.$nextTick(() => {
|
||||
// // this.initChart()
|
||||
// })
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) {
|
||||
// console.log(1)
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
let series = [
|
||||
{
|
||||
// 辅助系列
|
||||
name: '良品',
|
||||
type: 'bar',
|
||||
stack: 'total',
|
||||
// silent: true,
|
||||
// itemStyle: {
|
||||
color: '#0fdedb',
|
||||
// },
|
||||
// barCategoryGap: '10%',
|
||||
barWidth: 10,
|
||||
data: passRateList
|
||||
},
|
||||
{
|
||||
type: 'bar',
|
||||
stack: 'total',
|
||||
name: '废品',
|
||||
// barCategoryGap: '10%',
|
||||
data: wasteList,
|
||||
// barWidth: 10,
|
||||
// barWidth: 15,
|
||||
// label: {
|
||||
// position: [10, 10],
|
||||
// normal: {
|
||||
// position: [800, -24],
|
||||
// show: true,
|
||||
// textStyle: {
|
||||
// color: '#2359ec',
|
||||
// fontSize: 16,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
}
|
||||
]
|
||||
// for (i = 0; i < 5; i++) {
|
||||
// series.push({
|
||||
|
||||
// })
|
||||
// }
|
||||
this.chart.setOption({
|
||||
legend: {
|
||||
// top: '2.5%',
|
||||
// right: '20px',
|
||||
textStyle: {
|
||||
color: '#ffffff'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top:'80',
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
// bottom: '3%',
|
||||
width: 'auto',
|
||||
height: '300',
|
||||
containLabel: true
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
inside: true,
|
||||
interval: 0, //横轴信息全部显
|
||||
splitNumber: 50,
|
||||
// boundaryGap: [20, 20],
|
||||
textStyle: {
|
||||
color: '#ffffff',
|
||||
verticalAlign: 'bottom',
|
||||
fontSize: 12,
|
||||
align: 'left',
|
||||
padding: [0, 0, 15, -5]
|
||||
}
|
||||
},
|
||||
data: topNameList
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
inside: true,
|
||||
interval: 0, //横轴信息全部显
|
||||
splitNumber: 50,
|
||||
// boundaryGap: [20, 20],
|
||||
textStyle: {
|
||||
color: '#ffffff',
|
||||
verticalAlign: 'bottom',
|
||||
fontSize: 12,
|
||||
align: 'right',
|
||||
padding: [0, 0, 15, -5]
|
||||
}
|
||||
},
|
||||
data: nameWasteList
|
||||
}
|
||||
],
|
||||
xAxis: {
|
||||
// max: 120,
|
||||
show: false,
|
||||
},
|
||||
series:series
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
|
||||
</style>
|
62
src/views/OperationalOverview/components/resize.js
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2024-02-01 15:39:22
|
||||
* @LastEditTime: 2024-02-01 15:39:23
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
import { debounce } from '@/utils'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
$_sidebarElm: null,
|
||||
$_resizeHandler: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$_resizeHandler = debounce(() => {
|
||||
if (this.chart) {
|
||||
this.chart.resize()
|
||||
}
|
||||
}, 100)
|
||||
this.$_initResizeEvent()
|
||||
this.$_initSidebarResizeEvent()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$_destroyResizeEvent()
|
||||
this.$_destroySidebarResizeEvent()
|
||||
},
|
||||
// to fixed bug when cached by keep-alive
|
||||
// https://github.com/PanJiaChen/vue-element-admin/issues/2116
|
||||
activated() {
|
||||
this.$_initResizeEvent()
|
||||
this.$_initSidebarResizeEvent()
|
||||
},
|
||||
deactivated() {
|
||||
this.$_destroyResizeEvent()
|
||||
this.$_destroySidebarResizeEvent()
|
||||
},
|
||||
methods: {
|
||||
// use $_ for mixins properties
|
||||
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
|
||||
$_initResizeEvent() {
|
||||
window.addEventListener('resize', this.$_resizeHandler)
|
||||
},
|
||||
$_destroyResizeEvent() {
|
||||
window.removeEventListener('resize', this.$_resizeHandler)
|
||||
},
|
||||
$_sidebarResizeHandler(e) {
|
||||
if (e.propertyName === 'width') {
|
||||
this.$_resizeHandler()
|
||||
}
|
||||
},
|
||||
$_initSidebarResizeEvent() {
|
||||
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
|
||||
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
|
||||
},
|
||||
$_destroySidebarResizeEvent() {
|
||||
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
|
||||
}
|
||||
}
|
||||
}
|
@ -2,21 +2,20 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-07-19 15:18:30
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-11-23 11:11:35
|
||||
* @LastEditTime: 2024-02-01 15:35:29
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div id="container" ref="container" class="visual-container" :style="styles">
|
||||
<el-row
|
||||
class="container-title"
|
||||
:style="{
|
||||
height: 88 + 'px',
|
||||
lineHeight: 88 + 'px',
|
||||
fontSize: 31 + 'px'
|
||||
}"
|
||||
>
|
||||
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt="">
|
||||
<el-row class="container-title" :style="{
|
||||
height: 88 + 'px',
|
||||
lineHeight: 88 + 'px',
|
||||
fontSize: 31 + 'px'
|
||||
}">
|
||||
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.22em" alt="">
|
||||
许昌安彩深加工看板
|
||||
<h3 class="unit">单位:河南汇融数字科技有限公司</h3>
|
||||
<h3 class="time">{{ times }}</h3>
|
||||
<!-- <el-button
|
||||
type="text"
|
||||
class="title-button"
|
||||
@ -28,39 +27,30 @@
|
||||
</el-button> -->
|
||||
</el-row>
|
||||
<el-row class="container-main flex-col" type="flex">
|
||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
||||
<base-container :title="'设备报警'" :title-icon="'5_1'">
|
||||
<base-table1
|
||||
:page="1"
|
||||
:limit="9"
|
||||
:show-index="false"
|
||||
:table-config="qualityYearTableProps"
|
||||
:table-data="qualityYearList"
|
||||
/>
|
||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1" style="height: 50%;">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
||||
<base-container :title="'设备报警'" :size="'small'" :height="318" :title-icon="'eqAlarm'">
|
||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityYearTableProps"
|
||||
:table-data="equipmentList" /> -->
|
||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityYearTableProps"
|
||||
:table-data="qualityYearList" /> -->
|
||||
<dv-scroll-board class="eqTable" :config="eqConfig" style="width:100%;height:350px" ref='eqScrollBoard' />
|
||||
|
||||
</base-container>
|
||||
</el-col>
|
||||
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
||||
<base-container :title="'各工序缺陷汇总'" :title-icon="'5_2'">
|
||||
<div class="visual-select">
|
||||
<el-select class="coldSelect" v-model="modelMonth" size="mini" placeholder="">
|
||||
<el-option key="1" value="钢1线" label="钢1线" default />
|
||||
</el-select>
|
||||
</div>
|
||||
<base-table1
|
||||
:page="1"
|
||||
:limit="9"
|
||||
:show-index="false"
|
||||
|
||||
:table-config="qualityMonthTableProps"
|
||||
:table-data="qualityMonthList"
|
||||
/>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
||||
<base-container :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'">
|
||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityMonthTableProps"
|
||||
:table-data="qualityMonthList" /> -->
|
||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="qualityMonthTableProps"
|
||||
:table-data="qualityMonthList" /> -->
|
||||
<dv-scroll-board :config="processConfig" style="width:100%;height:350px" ref='processScrollBoard' />
|
||||
</base-container>
|
||||
</el-col>
|
||||
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
||||
<base-container :title="'设备监控'" :title-icon="'5_3'">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
||||
<base-container :height="318" :size="'small'" :title="'工单监控'" :title-icon="'order'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div> -->
|
||||
@ -71,37 +61,17 @@
|
||||
<!-- <el-row style="margin-bottom: 1em">
|
||||
<p class="now-team-title">加工工单进度</p>
|
||||
</el-row> -->
|
||||
<el-row v-for="op in orderProcessList" :key="op.id" style="margin-bottom: 1em">
|
||||
<el-progress :percentage="op.outRate * 100" class="custom-progress-bar" />
|
||||
<p v-if="op.outRate === 1" class="now-secondary-title" style="color:#4679FD">
|
||||
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: 1em">
|
||||
<!-- <el-col :span="12"> -->
|
||||
<p class="now-secondary-title">{{ op.name }}</p>
|
||||
<el-progress define-back-color="rgba(32, 57, 96, 1)" text-color="white"
|
||||
:percentage="op.progressRate * 100" class="custom-progress-bar" />
|
||||
<!-- <p v-if="op.progressRate === 1" class="now-secondary-title" style="color:#4679FD">
|
||||
<i class="el-icon-check" />
|
||||
{{ op.name }}
|
||||
</p>
|
||||
<p v-else class="now-secondary-title">{{ op.name }}</p>
|
||||
</p> -->
|
||||
<!-- </el-col> -->
|
||||
</el-row>
|
||||
<!-- <el-row>
|
||||
<el-progress :percentage="100" class="custom-progress-bar" />
|
||||
<p class="now-secondary-title" style="color:#4679FD">
|
||||
<i class="el-icon-check" />
|
||||
成都碲化镉5000一期订单
|
||||
</p>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-progress :percentage="85" class="custom-progress-bar" />
|
||||
<p class="now-secondary-title">成都碲化镉二订单</p>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-progress :percentage="85" class="custom-progress-bar" />
|
||||
<p class="now-secondary-title">长利订单1000</p>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-progress :percentage="85" class="custom-progress-bar" />
|
||||
<p class="now-secondary-title">国际工程20号订单</p>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-progress :percentage="85" class="custom-progress-bar" />
|
||||
<p class="now-secondary-title">铜铟镓硒眉山10万订单</p>
|
||||
</el-row> -->
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</base-container>
|
||||
@ -110,19 +80,15 @@
|
||||
|
||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12" type="flex" class="flex-1">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :height="256" :title="'能源监控'" :title-icon="'5_5'">
|
||||
<div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<base-container :show-yes-time="true" :no-content-padding="true" :height="256" :size="'middle'" :title="'能源监控'"
|
||||
:title-icon="'energyMonitoring'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div>
|
||||
</div> -->
|
||||
<el-row :gutter="9">
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
|
||||
<linear-bar-chart
|
||||
:name-list="cxNameList"
|
||||
:data-list="cxDataList"
|
||||
:height="359"
|
||||
|
||||
:show-legend="true"
|
||||
/>
|
||||
<linear-bar-chart ref="EnergyMonitoringChart" :name-list="EnergyMonitoringNameList"
|
||||
:data-list="EnergyMonitoringList" :height="359" />
|
||||
</el-col>
|
||||
<!-- <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-table3
|
||||
@ -137,19 +103,13 @@
|
||||
</base-container>
|
||||
</el-col>
|
||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||
<base-container :height="318 + 338 + 16" :title="'产线产量及良品率'" :title-icon="'5_4'">
|
||||
<div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<base-container :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'middle'"
|
||||
:title="'产线产量及良品率'" :title-icon="'productLine'">
|
||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||
<top-radio-group />
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 像下面这样表格里的limit值,也许可以用js动态计算出来 -->
|
||||
<double-y-chart
|
||||
:id=" 'doubleYChart' "
|
||||
:name-list="cxNameList"
|
||||
:data-list="cxDataList"
|
||||
:height="359"
|
||||
|
||||
:show-legend="true"
|
||||
/>
|
||||
<double-y-chart ref="productLineChart" :id=" 'doubleYChart' " :height="390" :show-legend="true" />
|
||||
</base-container>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -171,6 +131,7 @@
|
||||
|
||||
<script>
|
||||
import baseContainer from './components/baseContainer'
|
||||
|
||||
import baseTable1 from './components/baseTable'
|
||||
// import baseTable2 from './components/baseTable'
|
||||
// import baseTable3 from './components/baseTable'
|
||||
@ -424,245 +385,126 @@ const legendData3 = [
|
||||
]
|
||||
const qualityYearTableProps = [
|
||||
{
|
||||
prop: 'eqName',
|
||||
prop: 'name',
|
||||
label: '设备名称'
|
||||
},
|
||||
{
|
||||
prop: 'eqCode',
|
||||
prop: 'code',
|
||||
label: '设备编码'
|
||||
},
|
||||
{
|
||||
prop: 'level',
|
||||
label: '报警级别',
|
||||
subcomponent: alarmLevel,
|
||||
prop: 'status',
|
||||
label: '设备状态',
|
||||
// subcomponent: alarmLevel,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'content',
|
||||
label: '报警内容'
|
||||
prop: 'error',
|
||||
label: '是否故障'
|
||||
}
|
||||
]
|
||||
|
||||
const qualityYearList = [
|
||||
{ eqName: '钢化炉', eqCode: '21321312', level: 1, content: 'Temperature high' },
|
||||
{ eqName: '磨边机', eqCode: '32323232', level: 4, content: 'Device warning/alarm' },
|
||||
{ eqName: '镀膜机', eqCode: '32213213', level: 3, content: 'Temperature high' },
|
||||
{ eqName: '钢化清洗机', eqCode: '21321323', level: 1, content: 'P030: JET: Note: Transportation subsequent machine is not running' },
|
||||
{ eqName: '固化机', eqCode: '21321321', level: 2, content: 'P040' },
|
||||
{ eqName: '磨边清洗机', eqCode: '21321321', level: 2, content: 'M4033.6' },
|
||||
{ eqName: '预热机', eqCode: '21321321', level: 2, content: 'M4033.6' },
|
||||
{ eqName: '下片机', eqCode: '21321321', level: 3, content: 'P040' },
|
||||
{
|
||||
eqName: '冷却机', eqCode: '21321321', level: 4, content: 'P0xx: Pos. number exhaust UVnumber: Reserve' },
|
||||
name: '翻转机', code: 'EQ20240110112358000235', status: '运行', error: '否' },
|
||||
{
|
||||
eqName: 'A储片机106', eqCode: '21321321', level: 1, content: 'P0xx: Pos. number exhaust UVnumber: Reserve' },
|
||||
{ eqName: '二次清洗机', eqCode: '21321321', level: 2, content: 'Temperature high' },
|
||||
{ eqName: '二次磨边机', eqCode: '21321321', level: 2, content: 'Temperature high' },
|
||||
{ eqName: '测试设备', eqCode: '21321321', level: 2, content: 'Temperature high' }
|
||||
name: '烘干炉', code: 'EQ20240110112537000241', status: '运行', error: '否' },
|
||||
{
|
||||
name: '清洗机', code: ' EQ20240110112310000232', status: '运行', error: '否' },
|
||||
{ name: '钢化清洗机', code: 'EQ20240110111700000208', status: '运行', error: '否' },
|
||||
{ name: '固化机', code: 'EQ20240110111700000201', status: '运行', error: '否' },
|
||||
{
|
||||
name: '磨边清洗机', code: ' EQ20240110111700000208', status: '运行', error: '否' },
|
||||
{ name: '预热机', code: 'EQ20240110111700000205', status: '故障', error: '是' },
|
||||
{ name: '下片机', code: 'EQ20240115151435000279', status: '运行', error: '否' },
|
||||
{
|
||||
name: '冷却机', code: 'EQ20240110111700000203', status: '运行', error: '否' },
|
||||
{
|
||||
name: 'A储片机106', code: 'EQ20240110111700000202', status: '运行', error: '否' },
|
||||
{ name: '二次清洗机', code: 'EQ20240110111700000209', status: '运行', error: '否' },
|
||||
{
|
||||
name: '二次磨边机', code: ' EQ20240110110927000181', status: '故障', error: '是' },
|
||||
{ name: '测试设备', code: 'EQ20240110111700000201', status: '运行', error: '否' }
|
||||
|
||||
]
|
||||
const qualityMonthTableProps = [
|
||||
{
|
||||
prop: 'lineName',
|
||||
prop: 'productionLineName',
|
||||
label: '产线名'
|
||||
},
|
||||
{
|
||||
prop: 'process',
|
||||
prop: 'sectionName',
|
||||
label: '工序'
|
||||
},
|
||||
{
|
||||
prop: 'eqName',
|
||||
label: '设备名'
|
||||
prop: 'count',
|
||||
label: '损耗片数'
|
||||
},
|
||||
{
|
||||
prop: 'eqCode',
|
||||
label: '设备编码'
|
||||
prop: 'inspectionTypeName',
|
||||
label: '缺陷类型'
|
||||
},
|
||||
{
|
||||
prop: 'long',
|
||||
label: '总运行时长(h)'
|
||||
},
|
||||
// {
|
||||
// prop: 'createTime',
|
||||
// label: '保养时间'
|
||||
// },
|
||||
{
|
||||
prop: 'status',
|
||||
label: '设备状态'
|
||||
}
|
||||
// {
|
||||
// prop: 'nextCreateTime',
|
||||
// label: '下次保养时间'
|
||||
// }
|
||||
// {
|
||||
// prop: 'nextLong',
|
||||
// label: '距离保养时间(天)',
|
||||
// // subcomponent: nextDay,
|
||||
// align: 'center'
|
||||
// }
|
||||
]
|
||||
|
||||
const qualityMonthList = [
|
||||
{
|
||||
lineName: '钢一线',
|
||||
process: '41',
|
||||
eqName: '二次清洗机',
|
||||
eqCode: '2312312',
|
||||
long: '200',
|
||||
// createTime: '2021-02-25 12:00:01',
|
||||
status: '报警'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 365
|
||||
productionLineName: 'D61',
|
||||
sectionName: '成型',
|
||||
count: '3片',
|
||||
inspectionTypeName: '细长泡'
|
||||
},
|
||||
{
|
||||
lineName: '钢二线',
|
||||
process: '41',
|
||||
eqName: '锻造机',
|
||||
eqCode: '43434',
|
||||
long: '252',
|
||||
// createTime: '2021-11-25 12:00:01',
|
||||
status: '正常'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 4
|
||||
productionLineName: 'D62',
|
||||
sectionName: '组合落板',
|
||||
count: '4片',
|
||||
inspectionTypeName: '细长泡'
|
||||
},
|
||||
{
|
||||
lineName: '钢三线',
|
||||
process: '41',
|
||||
eqName: '设备3',
|
||||
eqCode: '23213212',
|
||||
long: '100',
|
||||
// createTime: '2021-10-25 12:00:01',
|
||||
status: '故障停机'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 24
|
||||
productionLineName: 'D61',
|
||||
sectionName: '磨边',
|
||||
count: '6片',
|
||||
inspectionTypeName: '开口泡'
|
||||
},
|
||||
{
|
||||
lineName: '钢四线',
|
||||
process: '41',
|
||||
eqName: '设备4',
|
||||
eqCode: '23213',
|
||||
long: '322',
|
||||
// createTime: '2021-02-25 12:00:01',
|
||||
status: '故障停机'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: -36
|
||||
productionLineName: 'D63',
|
||||
sectionName: '清洗',
|
||||
count: '5片',
|
||||
inspectionTypeName: '结石'
|
||||
},
|
||||
{
|
||||
lineName: '钢五线',
|
||||
process: '41',
|
||||
eqName: '设备5',
|
||||
eqCode: '23121312',
|
||||
long: '232',
|
||||
// createTime: '2021-06-25 12:00:01',
|
||||
status: '待机'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 111
|
||||
productionLineName: 'D64',
|
||||
sectionName: '打孔',
|
||||
count: '2片',
|
||||
inspectionTypeName: '结石'
|
||||
},
|
||||
{
|
||||
lineName: '钢五线',
|
||||
process: '41',
|
||||
eqName: '设备5',
|
||||
eqCode: '23121312',
|
||||
long: '212',
|
||||
// createTime: '2021-06-25 12:00:01',
|
||||
status: '待机'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 111
|
||||
productionLineName: 'D63',
|
||||
sectionName: '成型',
|
||||
count: '7片',
|
||||
inspectionTypeName: '开口泡'
|
||||
},
|
||||
{
|
||||
lineName: '钢五线',
|
||||
process: '41',
|
||||
eqName: '设备5',
|
||||
eqCode: '23121312',
|
||||
long: '123',
|
||||
// createTime: '2021-06-25 12:00:01',
|
||||
status: '镀膜机'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 111
|
||||
},
|
||||
{
|
||||
lineName: '钢五线',
|
||||
process: '41',
|
||||
eqName: '清洗机',
|
||||
eqCode: '23121312',
|
||||
long: '322',
|
||||
// createTime: '2021-06-25 12:00:01',
|
||||
status: 'Remote'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 111
|
||||
},
|
||||
{
|
||||
lineName: '钢五线',
|
||||
process: '41',
|
||||
eqName: '磨边机',
|
||||
eqCode: '23121312',
|
||||
long: '232',
|
||||
// createTime: '2021-06-25 12:00:01',
|
||||
status: 'Non-scheduled'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 111
|
||||
},
|
||||
{
|
||||
lineName: '钢五线',
|
||||
process: '41',
|
||||
eqName: '磨边机',
|
||||
eqCode: '23121312',
|
||||
long: '232',
|
||||
// createTime: '2021-06-25 12:00:01',
|
||||
status: 'Non-scheduled'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 111
|
||||
},
|
||||
{
|
||||
lineName: '钢五线',
|
||||
process: '41',
|
||||
eqName: '磨边机',
|
||||
eqCode: '23121312',
|
||||
long: '232',
|
||||
// createTime: '2021-06-25 12:00:01',
|
||||
status: 'Non-scheduled'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 111
|
||||
},
|
||||
{
|
||||
lineName: '钢五线',
|
||||
process: '41',
|
||||
eqName: '磨边机',
|
||||
eqCode: '23121312',
|
||||
long: '232',
|
||||
// createTime: '2021-06-25 12:00:01',
|
||||
status: 'Non-scheduled'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 111
|
||||
},
|
||||
{
|
||||
lineName: '钢五线',
|
||||
process: '41',
|
||||
eqName: '磨边机',
|
||||
eqCode: '23121312',
|
||||
long: '232',
|
||||
// createTime: '2021-06-25 12:00:01',
|
||||
status: 'Non-scheduled'
|
||||
// nextCreateTime: '2022-12-25 12:00:01',
|
||||
// nextLong: 111
|
||||
productionLineName: 'D61',
|
||||
sectionName: '上片',
|
||||
count: '8片',
|
||||
inspectionTypeName: '结石'
|
||||
}
|
||||
]
|
||||
const orderProcessList = [
|
||||
{
|
||||
id: '1', outRate: '.8', name: '凯盛0322'
|
||||
}, {
|
||||
id: '1', outRate: '.4', name: '光伏玻璃4.0'
|
||||
id: '2', outRate: '.4', name: '光伏玻璃4.0'
|
||||
}, {
|
||||
id: '1', outRate: '.5', name: '光伏玻璃3.0'
|
||||
id: '3', outRate: '.5', name: '光伏玻璃3.0'
|
||||
}, {
|
||||
id: '1', outRate: '.3', name: '光伏玻璃2.0'
|
||||
id: '4', outRate: '.3', name: '光伏玻璃2.0'
|
||||
}, {
|
||||
id: '1', outRate: '.5', name: '光伏玻璃1.0'
|
||||
id: '5', outRate: '.5', name: '光伏玻璃1.0'
|
||||
}, {
|
||||
id: '1', outRate: '.8', name: '光伏玻璃'
|
||||
id: '6', outRate: '.8', name: '光伏玻璃'
|
||||
},
|
||||
{
|
||||
id: '1', outRate: '.8', name: '统计订单'
|
||||
id: '7', outRate: '.8', name: '统计订单'
|
||||
}
|
||||
]
|
||||
export default {
|
||||
@ -685,10 +527,38 @@ export default {
|
||||
beilv2: 1,
|
||||
beilv: 1,
|
||||
value: 100,
|
||||
orderList:[],
|
||||
times: '',
|
||||
EnergyMonitoringNameList: [],
|
||||
equipmentList:[],
|
||||
EnergyMonitoringList: [],
|
||||
// offsetWidth: null,
|
||||
qualityYearTableProps,
|
||||
cxNameList,
|
||||
eqConfig: {
|
||||
header: ['序号', '设备名称', '设备编码', '设备状态', '是否故障'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||
columnWidth: [70, 100, 200, 90, 90,],
|
||||
align: ['center'],
|
||||
data: [],
|
||||
// index:true,
|
||||
rowNum: 10
|
||||
},
|
||||
processConfig: {
|
||||
header: ['序号', '产线名称', '工序', '损耗片数', '缺陷类型'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||
columnWidth: [70, 130, 100, 120, 110,],
|
||||
align: ['center'],
|
||||
data: [],
|
||||
// index:true,
|
||||
rowNum: 10
|
||||
},
|
||||
cxDataList,
|
||||
productLineList:[],
|
||||
qualityYearList,
|
||||
clientWidth: 0,
|
||||
containerWidth: 111111,
|
||||
@ -740,9 +610,42 @@ export default {
|
||||
// this.fetchList('order-process')
|
||||
// this.fetchList('line-chart-data')
|
||||
this.init()
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
}, 86400000)
|
||||
},
|
||||
destroyed () {
|
||||
this.websocketClose()
|
||||
this.SJGWebsocketClose()
|
||||
},
|
||||
mounted() {
|
||||
this.windowWidth(document.documentElement.clientWidth)
|
||||
let eqArr = this.qualityYearList.map((item, index) => [
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.status || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
|
||||
])
|
||||
this.eqConfig.data = eqArr
|
||||
this.$refs['eqScrollBoard'].updateRows(eqArr)
|
||||
this.getList()
|
||||
this.initWebSocket()
|
||||
this.SJGInitWebSocket()
|
||||
this.getTimes()
|
||||
// this.$refs.EnergyMonitoringChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [3134, 2323, 3232, 3233, 2321])
|
||||
// this.$refs.productLineChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
|
||||
const _this = this;
|
||||
_this.beilv2 = document.documentElement.clientWidth / 1920
|
||||
window.onresize = () => {
|
||||
return (() => {
|
||||
_this.clientWidth = `${document.documentElement.clientWidth}`
|
||||
this.beilv2 = _this.clientWidth / 1920
|
||||
})()
|
||||
}
|
||||
// const _this = this;
|
||||
// window.onresize = () => {
|
||||
// return (() => {
|
||||
@ -768,6 +671,259 @@ export default {
|
||||
// removeEventListener('resize', resizeFun)
|
||||
// },
|
||||
methods: {
|
||||
getList() {
|
||||
this.$axios.get(
|
||||
'base/core-production-line/listAll',
|
||||
'get',
|
||||
this.queryParams
|
||||
).then((res) => {
|
||||
// console.log('11111', res);
|
||||
this.productLineList = res.data
|
||||
})
|
||||
this.$axios.get(
|
||||
'base/quality-inspection-record/dayStatistics',
|
||||
'get',
|
||||
).then((res) => {
|
||||
// console.log('11111', res);
|
||||
let processArr = qualityMonthList.map((item, index) => [
|
||||
// console.log(item)
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
||||
])
|
||||
this.processConfig.data = processArr
|
||||
this.$refs['processScrollBoard'].updateRows(processArr)
|
||||
if (res.data.length !==0) {
|
||||
let processArr = res.data.map((item, index) => [
|
||||
// console.log(item)
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
|
||||
])
|
||||
this.processConfig.data = processArr
|
||||
this.$refs['processScrollBoard'].updateRows(processArr)
|
||||
}
|
||||
})
|
||||
},
|
||||
getTimes() {
|
||||
setInterval(this.getTimesInterval, 1000);
|
||||
},
|
||||
getTimesInterval: function () {
|
||||
let _this = this;
|
||||
let year = new Date().getFullYear(); //获取当前时间的年份
|
||||
let month = new Date().getMonth() + 1; //获取当前时间的月份
|
||||
let day = new Date().getDate(); //获取当前时间的天数
|
||||
let hours = new Date().getHours(); //获取当前时间的小时
|
||||
let minutes = new Date().getMinutes(); //获取当前时间的分数
|
||||
let seconds = new Date().getSeconds(); //获取当前时间的秒数
|
||||
//当小于 10 的是时候,在前面加 0
|
||||
if (hours < 10) {
|
||||
hours = "0" + hours;
|
||||
}
|
||||
if (minutes < 10) {
|
||||
minutes = "0" + minutes;
|
||||
}
|
||||
if (seconds < 10) {
|
||||
seconds = "0" + seconds;
|
||||
}
|
||||
//拼接格式化当前时间
|
||||
this.times = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
|
||||
},
|
||||
initWebSocket() {
|
||||
if (typeof (WebSocket) === 'undefined') {
|
||||
alert('您的浏览器不支持WebSocket')
|
||||
} else {
|
||||
let date = new Date().valueOf()
|
||||
const wsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=EN${date}`
|
||||
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
|
||||
// const wsUrl = 'ws://10.70.2.2:8080/websocket/message?userId=EN111'
|
||||
// 实例化 WebSocket
|
||||
this.websocket = new WebSocket(wsUrl)
|
||||
// 监听 WebSocket 连接
|
||||
this.websocket.onopen = this.websocketOnOpen
|
||||
// 监听 WebSocket 错误信息
|
||||
this.websocket.onerror = this.websocketOnError
|
||||
// 监听 WebSocket 消息
|
||||
this.websocket.onmessage = this.websocketOnMessage
|
||||
// 监听 webSocket 断开信息
|
||||
this.websocket.onclose = this.websocketClose
|
||||
}
|
||||
},
|
||||
SJGInitWebSocket() {
|
||||
if (typeof (WebSocket) === 'undefined') {
|
||||
alert('您的浏览器不支持WebSocket')
|
||||
} else {
|
||||
// const wsUrl = `ws://10.70.2.2:8080/websocket/message?userId=EN${date}`
|
||||
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
|
||||
let date = new Date().valueOf()
|
||||
// console.log(date);
|
||||
console.log(process.env);
|
||||
const SJGWsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=SJG${date}`
|
||||
this.SJGWebsocket = new WebSocket(SJGWsUrl)
|
||||
// 监听 WebSocket 连接
|
||||
this.SJGWebsocket.onopen = this.SJGWebsocketOnOpen
|
||||
// 监听 WebSocket 错误信息
|
||||
this.SJGWebsocket.onerror = this.SJGWebsocketOnError
|
||||
// 监听 WebSocket 消息
|
||||
this.SJGWebsocket.onmessage = this.SJGWebsocketOnMessage
|
||||
// 监听 webSocket 断开信息
|
||||
this.SJGWebsocket.onclose = this.SJGWebsocketClose
|
||||
}
|
||||
},
|
||||
SJGWebsocketOnOpen() {
|
||||
console.log('socket连接成功')
|
||||
// console.log(this.SJGWebsocket.onmessage);
|
||||
this.SJGWebsocket.onmessage()
|
||||
},
|
||||
// 连接建立失败重连
|
||||
SJGWebsocketOnError(e) {
|
||||
// console.log('11111', e)
|
||||
this.SJGInitWebSocket()
|
||||
},
|
||||
// 数据接收
|
||||
SJGWebsocketOnMessage(e) {
|
||||
// console.log(1111, e)
|
||||
this.SJGWsData = e?.data ? JSON.parse(e?.data) : {}
|
||||
// console.log(this.wsData.detData);
|
||||
// console.log('22222', this.wsData.data)
|
||||
if (this.SJGWsData.type === 'order') {
|
||||
this.orderList = this.SJGWsData.detData.map((ele, index) => {
|
||||
if (ele.progressRate != 1) {
|
||||
return {
|
||||
id: ele.id,
|
||||
name: ele.name,
|
||||
progressRate: ele.progressRate.toFixed(3)
|
||||
}
|
||||
}
|
||||
});
|
||||
console.log(this.orderList)
|
||||
} else if (this.SJGWsData.type === 'equipment') {
|
||||
// this.equipmentList = this.SJGWsData.detData.map((ele, index) => {
|
||||
// // if (ele.progressRate != 1) {
|
||||
// return {
|
||||
// id: ele.id,
|
||||
// name: ele.name,
|
||||
// code: ele.code,
|
||||
// status: ele.status,
|
||||
// error: ele.error=== true ? '是' : '否'
|
||||
// }
|
||||
// // }
|
||||
// });
|
||||
let eqArr = this.SJGWsData.detData.map((item, index) => [
|
||||
// console.log(item)
|
||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
||||
</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.status || ''}</span>`,
|
||||
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
|
||||
])
|
||||
this.eqConfig.data = eqArr
|
||||
this.$refs['eqScrollBoard'].updateRows(eqArr)
|
||||
// console.log(SJGWsData.orderList)
|
||||
} else if (this.SJGWsData.type === 'productline') {
|
||||
// console.log(this.wsData.detData);
|
||||
let nameList = []
|
||||
let passRateList = []
|
||||
let outputNumList = []
|
||||
|
||||
// console.log('2222222222', this.productLineList);
|
||||
this.productLineList.forEach((item) => {
|
||||
this.SJGWsData.detData.forEach((ele) => {
|
||||
if (item.id == ele.productionLineId) {
|
||||
if (item.name.substr(0, 1) == "D") {
|
||||
console.log(ele)
|
||||
nameList.push(item.name)
|
||||
outputNumList.push(ele.outputNum)
|
||||
passRateList.push(ele.passRate)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
// progressRateList = EnergyNameList
|
||||
// let EnergyDataList = []
|
||||
// this.SJGWsData.detData.forEach((ele) => {
|
||||
// })
|
||||
// this.SJGWsData.detData.forEach((ele) => {
|
||||
// })
|
||||
// console.log(this.EnergyMonitoringNameList)
|
||||
// console.log(this.EnergyMonitoringList)
|
||||
// this.$nextTick(() => {
|
||||
this.$refs.productLineChart.initChart(Array.from(new Set(nameList)), passRateList, outputNumList)
|
||||
}
|
||||
},
|
||||
// 数据发送
|
||||
// SJGWebsocketSend() {
|
||||
// this.websocket.send('11111')
|
||||
// },
|
||||
// // 关闭
|
||||
SJGWebsocketClose(e) {
|
||||
console.log('WebSocket 断开连接', e)
|
||||
},
|
||||
// // 连接建立之后执行send方法发送数据
|
||||
websocketOnOpen() {
|
||||
console.log('socket连接成功')
|
||||
this.websocket.onmessage()
|
||||
},
|
||||
// 连接建立失败重连
|
||||
websocketOnError(e) {
|
||||
console.log('11111', e)
|
||||
this.initWebSocket()
|
||||
},
|
||||
// 数据接收
|
||||
websocketOnMessage(e) {
|
||||
// console.log(1111, e)
|
||||
this.wsData = e?.data ? JSON.parse(e?.data) : {}
|
||||
// console.log('22222', this.wsData.data)
|
||||
if (this.wsData.type === 'EnergyMonitoring') {
|
||||
let EnergyNameList = []
|
||||
this.wsData.data.forEach((ele) => {
|
||||
EnergyNameList.push(ele.lineName)
|
||||
})
|
||||
this.EnergyMonitoringNameList = EnergyNameList
|
||||
let EnergyDataList = []
|
||||
this.wsData.data.forEach((ele) => {
|
||||
EnergyDataList.push(ele.useQuantity
|
||||
// {
|
||||
// type: 'bar',
|
||||
// data: ele.useQuantity,
|
||||
// barWidth: 6
|
||||
|
||||
// }
|
||||
)
|
||||
})
|
||||
this.EnergyMonitoringList = EnergyDataList
|
||||
console.log(EnergyDataList)
|
||||
// console.log(this.EnergyMonitoringNameList)
|
||||
// console.log(this.EnergyMonitoringList)
|
||||
// this.$nextTick(() => {
|
||||
this.$refs.EnergyMonitoringChart.initChart(this.EnergyMonitoringNameList, this.EnergyMonitoringList)
|
||||
// })
|
||||
}
|
||||
},
|
||||
// 数据发送
|
||||
websocketSend() {
|
||||
this.websocket.send('11111')
|
||||
},
|
||||
// 关闭
|
||||
websocketClose(e) {
|
||||
// console.log('WebSocket 断开连接', e)
|
||||
},
|
||||
windowWidth(value) {
|
||||
this.clientWidth = value
|
||||
this.beilv2 = this.clientWidth / 1920
|
||||
@ -837,8 +993,21 @@ export default {
|
||||
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
color: #00fff0;
|
||||
word-spacing: 8px;
|
||||
text-align: center;
|
||||
.unit {
|
||||
position: absolute;
|
||||
left: 260px;
|
||||
top: 25px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.time {
|
||||
position: absolute;
|
||||
left: 1360px;
|
||||
top: 25px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.title-button {
|
||||
color: #00fff0;
|
||||
font-size: 20px;
|
||||
@ -887,11 +1056,9 @@ export default {
|
||||
top: 2em;
|
||||
}
|
||||
|
||||
// .container-main {
|
||||
// padding: 0px;
|
||||
// .container-main {
|
||||
// padding: 5px;
|
||||
// }
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
@ -952,7 +1119,6 @@ export default {
|
||||
margin-left: 3em;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
@ -964,9 +1130,12 @@ export default {
|
||||
flex: 1 1;
|
||||
}
|
||||
.h-full {
|
||||
height: calc(100vh - 150px);
|
||||
height: calc(100vh);
|
||||
}
|
||||
/* .container-main {
|
||||
min-height: calc(100vh - 10em);
|
||||
} */
|
||||
.eqTable{
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
183
src/views/OperationalOverview/websocket.js
Normal file
@ -0,0 +1,183 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2024-01-29 17:05:25
|
||||
* @LastEditTime: 2024-01-29 17:05:25
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
/**
|
||||
* 发起websocket请求函数
|
||||
* @param {string} url ws连接地址
|
||||
* @param {Object} agentData 传给后台的参数
|
||||
* @param {function} successCallback 接收到ws数据,对数据进行处理的回调函数
|
||||
* @param {function} errCallback ws连接错误的回调函数
|
||||
*/
|
||||
export function WsConnect(url, agentData, successCallback, errCallback) {
|
||||
this.wsUrl = url;
|
||||
this.wsObj = null;
|
||||
// 是否执行重连 true/不执行 ; false/执行
|
||||
this.lockReconnect = false;
|
||||
// 重连定时器
|
||||
this.wsCreateHandler = null;
|
||||
// 连接成功,执行回调函数
|
||||
this.messageCallback = successCallback;
|
||||
// 连接失败,执行回调函数
|
||||
this.errorCallback = errCallback;
|
||||
// 发送给后台的数据
|
||||
this.sendDatas = agentData;
|
||||
// 创建ws函数
|
||||
this.createWebSoket = () => {
|
||||
if (typeof WebSocket === "undefined") {
|
||||
writeToScreen("您的浏览器不支持WebSocket,无法获取数据");
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
this.wsObj = new WebSocket(url);
|
||||
initWsEventHandle();
|
||||
} catch (e) {
|
||||
writeToScreen("连接异常,开始重连");
|
||||
reconnect();
|
||||
}
|
||||
};
|
||||
// 手动关闭websocket (这里手动关闭会执行onclose事件)
|
||||
this.closeWebsocket = () => {
|
||||
if (this.wsObj) {
|
||||
writeToScreen("手动关闭websocket");
|
||||
this.wsObj.close(); // 关闭websocket
|
||||
// this.wsObj.onclose() // 关闭websocket(如果上面的关闭不生效就加上这一条)
|
||||
// 关闭重连
|
||||
this.lockReconnect = true;
|
||||
this.wsCreateHandler && clearTimeout(this.wsCreateHandler);
|
||||
// 关闭心跳检查
|
||||
// heartCheck.stop();
|
||||
}
|
||||
};
|
||||
const initWsEventHandle = () => {
|
||||
try {
|
||||
// 连接成功
|
||||
this.wsObj.onopen = (event) => {
|
||||
onWsOpen(event);
|
||||
// heartCheck.start();
|
||||
};
|
||||
|
||||
// 监听服务器端返回的信息
|
||||
this.wsObj.onmessage = (event) => {
|
||||
onWsMessage(event);
|
||||
// heartCheck.start();
|
||||
};
|
||||
|
||||
this.wsObj.onclose = (event) => {
|
||||
writeToScreen("onclose执行关闭事件");
|
||||
onWsClose(event);
|
||||
};
|
||||
|
||||
this.wsObj.onerror = (event) => {
|
||||
writeToScreen("onerror执行error事件,开始重连");
|
||||
onWsError(event);
|
||||
reconnect();
|
||||
};
|
||||
} catch (err) {
|
||||
writeToScreen("绑定事件没有成功,开始重连");
|
||||
reconnect();
|
||||
}
|
||||
};
|
||||
|
||||
const onWsOpen = (event) => {
|
||||
writeToScreen("CONNECT");
|
||||
// // 客户端与服务器端通信
|
||||
// wsObj.send('我发送消息给服务端');
|
||||
// 添加状态判断,当为OPEN时,发送消息
|
||||
if (this.wsObj.readyState === this.wsObj.OPEN) {
|
||||
// wsObj.OPEN = 1
|
||||
// 发给后端的数据需要字符串化
|
||||
this.wsObj.send(JSON.stringify(this.sendDatas));
|
||||
}
|
||||
if (this.wsObj.readyState === this.wsObj.CLOSED) {
|
||||
// wsObj.CLOSED = 3
|
||||
writeToScreen("wsObj.readyState=3, ws连接异常,开始重连");
|
||||
reconnect();
|
||||
this.errorCallback(event);
|
||||
}
|
||||
};
|
||||
const onWsMessage = (event) => {
|
||||
const jsonStr = event.data;
|
||||
// writeToScreen("onWsMessage接收到服务器的数据: ", jsonStr);
|
||||
this.messageCallback(jsonStr);
|
||||
};
|
||||
const onWsClose = (event) => {
|
||||
writeToScreen("DISCONNECT");
|
||||
// e.code === 1000 表示正常关闭。 无论为何目的而创建, 该链接都已成功完成任务。
|
||||
// e.code !== 1000 表示非正常关闭。
|
||||
console.log("onclose event: ", event);
|
||||
if (event && event.code !== 1000) {
|
||||
writeToScreen("非正常关闭");
|
||||
this.errorCallback(event);
|
||||
// 如果不是手动关闭,这里的重连会执行;如果调用了手动关闭函数,这里重连不会执行
|
||||
reconnect();
|
||||
}
|
||||
};
|
||||
const onWsError = (event) => {
|
||||
writeToScreen("onWsError: ", event.data);
|
||||
this.errorCallback(event);
|
||||
};
|
||||
|
||||
const writeToScreen = (massage) => {
|
||||
console.log(massage);
|
||||
};
|
||||
|
||||
// 重连函数
|
||||
const reconnect = () => {
|
||||
if (this.lockReconnect) {
|
||||
return;
|
||||
}
|
||||
writeToScreen("3秒后重连");
|
||||
this.lockReconnect = true;
|
||||
// 没连接上会一直重连,设置延迟避免请求过多
|
||||
this.wsCreateHandler && clearTimeout(this.wsCreateHandler);
|
||||
this.wsCreateHandler = setTimeout(() => {
|
||||
writeToScreen("重连..." + this.wsUrl);
|
||||
this.createWebSoket();
|
||||
this.lockReconnect = false;
|
||||
writeToScreen("重连完成");
|
||||
}, 3000);
|
||||
};
|
||||
|
||||
// 心跳检查(看看websocket是否还在正常连接中)
|
||||
// let heartCheck = {
|
||||
// timeout: 15000,
|
||||
// timeoutObj: null,
|
||||
// serverTimeoutObj: null,
|
||||
// // 重启
|
||||
// reset() {
|
||||
// clearTimeout(this.timeoutObj);
|
||||
// clearTimeout(this.serverTimeoutObj);
|
||||
// this.start();
|
||||
// },
|
||||
// // 停止
|
||||
// stop() {
|
||||
// clearTimeout(this.timeoutObj);
|
||||
// clearTimeout(this.serverTimeoutObj);
|
||||
// },
|
||||
// // 开启定时器
|
||||
// start() {
|
||||
// this.timeoutObj && clearTimeout(this.timeoutObj);
|
||||
// this.serverTimeoutObj && clearTimeout(this.serverTimeoutObj);
|
||||
// // 15s之内如果没有收到后台的消息,则认为是连接断开了,需要重连
|
||||
// this.timeoutObj = setTimeout(() => {
|
||||
// writeToScreen("心跳检查,发送ping到后台");
|
||||
// try {
|
||||
// const datas = { ping: true };
|
||||
// this.wsObj.send(JSON.stringify(datas));
|
||||
// } catch (err) {
|
||||
// writeToScreen("发送ping异常");
|
||||
// }
|
||||
// console.log("内嵌定时器this.serverTimeoutObj: ", this.serverTimeoutObj);
|
||||
// // 内嵌定时器
|
||||
// this.serverTimeoutObj = setTimeout(() => {
|
||||
// writeToScreen("没有收到后台的数据,重新连接");
|
||||
// reconnect();
|
||||
// }, this.timeout);
|
||||
// }, this.timeout);
|
||||
// },
|
||||
// };
|
||||
}
|
51
src/views/OperationalOverview/wsInterface.js
Normal file
@ -0,0 +1,51 @@
|
||||
import { WsConnect } from './websocket'
|
||||
import store from "@/store";
|
||||
|
||||
// 创建websocket链接
|
||||
|
||||
const timestr = new Date().getTime()
|
||||
// ISRA
|
||||
const mesIsra = new WsConnect(
|
||||
process.env.VUE_APP_Socket_API + '/websocket/message?userId=KILN'+timestr,
|
||||
'',
|
||||
(data) => {
|
||||
// console.log('mes ISRA成功的回调函数, 接收到的data数据: ', data)
|
||||
let msgData = JSON.parse(data)
|
||||
// console.log(msgData)
|
||||
if (msgData == null) return;
|
||||
switch (msgData?.type) {
|
||||
case "israKiln": {
|
||||
store.dispatch({type: "websocket/setIsraKiln", payload:msgData.detData.dayStatistic})
|
||||
break;
|
||||
}
|
||||
default:
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
console.log('失败的回调函数', err)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
export const getDcsMsg = () => {
|
||||
// dcsConn.createWebSoket()
|
||||
mesIsra.createWebSoket()
|
||||
// mesMA.createWebSoket()
|
||||
// mesEN.createWebSoket()
|
||||
// mesGAS.createWebSoket()
|
||||
// mesIS.createWebSoket()
|
||||
// mesSJG.createWebSoket()
|
||||
// mesOV.createWebSoket()
|
||||
// mesCUTTING.createWebSoket()
|
||||
}
|
||||
export const closeDcsMsg = () => {
|
||||
// dcsConn.closeWebsocket()
|
||||
mesIsra.closeWebsocket()
|
||||
// mesMA.closeWebsocket()
|
||||
// mesEN.closeWebsocket()
|
||||
// mesGAS.closeWebsocket()
|
||||
// mesIS.closeWebsocket()
|
||||
// mesSJG.closeWebsocket()
|
||||
// mesOV.closeWebsocket()
|
||||
// mesCUTTING.closeWebsocket()
|
||||
}
|
@ -90,7 +90,7 @@ export default {
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '时间段',
|
||||
dateType: 'datetimerange',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
|
266
src/views/base/coreEquipmentLineBind/dialogForm.vue
Normal file
@ -0,0 +1,266 @@
|
||||
<!--
|
||||
filename: dialogForm.vue
|
||||
author: liubin
|
||||
date: 2023-09-11 15:55:13
|
||||
description: DialogForm for equipmentBindSection only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="dataForm"
|
||||
label-width="128px"
|
||||
v-loading="formLoading">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="产线"
|
||||
prop="productionLineId"
|
||||
:rules="[
|
||||
{ required: true, message: '产线不能为空', trigger: 'blur' },
|
||||
]">
|
||||
<el-select
|
||||
v-model="dataForm.productionLineId"
|
||||
placeholder="请选择产线"
|
||||
filterable
|
||||
clearable
|
||||
@change="handleProductlineChange">
|
||||
<el-option
|
||||
v-for="opt in productionLineList"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="工段"
|
||||
prop="workshopSectionId"
|
||||
:rules="[
|
||||
{ required: true, message: '工段不能为空', trigger: 'blur' },
|
||||
]">
|
||||
<el-select
|
||||
v-model="dataForm.workshopSectionId"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择工段"
|
||||
@change="$emit('update', dataForm)">
|
||||
<el-option
|
||||
v-for="opt in worksectionList"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="设备"
|
||||
prop="equipmentId"
|
||||
clearable
|
||||
filterable
|
||||
:rules="[
|
||||
{ required: true, message: '设备不能为空', trigger: 'blur' },
|
||||
]">
|
||||
<el-select
|
||||
v-model="dataForm.equipmentId"
|
||||
filterable
|
||||
placeholder="请选择设备"
|
||||
@change="$emit('update', dataForm)">
|
||||
<el-option
|
||||
v-for="opt in equipmentList"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="工段排序"
|
||||
prop="sort"
|
||||
:rules="[
|
||||
{
|
||||
type: 'number',
|
||||
trigger: 'change',
|
||||
message: '请输入正确的数字类型',
|
||||
transform: (val) => Number(val),
|
||||
},
|
||||
]">
|
||||
<el-input
|
||||
v-model="dataForm.sort"
|
||||
clearable
|
||||
@change="$emit('update', dataForm)"
|
||||
placeholder="请输入工段排序" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="产线统计类型"
|
||||
prop="lineDataType"
|
||||
:rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '产线统计类型不能为空',
|
||||
trigger: 'change',
|
||||
},
|
||||
]">
|
||||
<el-select
|
||||
v-model="dataForm.lineDataType"
|
||||
placeholder="请选择产线统计类型"
|
||||
clearable
|
||||
filterable
|
||||
@change="$emit('update', dataForm)">
|
||||
<el-option
|
||||
v-for="opt in [
|
||||
{ label: '无类型', value: 0 },
|
||||
{ label: '进口统计', value: 1 },
|
||||
{ label: '出口统计', value: 2 },
|
||||
]"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="工段统计类型"
|
||||
prop="sectionDataType"
|
||||
:rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '工段统计类型不能为空',
|
||||
trigger: 'change',
|
||||
},
|
||||
]">
|
||||
<el-select
|
||||
v-model="dataForm.sectionDataType"
|
||||
placeholder="请选择工段统计类型"
|
||||
clearable
|
||||
filterable
|
||||
@change="$emit('update', dataForm)">
|
||||
<el-option
|
||||
v-for="opt in [
|
||||
{ label: '无类型', value: 0 },
|
||||
{ label: '进口统计', value: 1 },
|
||||
{ label: '出口统计', value: 2 },
|
||||
]"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DialogForm',
|
||||
model: {
|
||||
prop: 'dataForm',
|
||||
event: 'update',
|
||||
},
|
||||
emits: ['update'],
|
||||
components: {},
|
||||
props: {
|
||||
dataForm: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formLoading: true,
|
||||
productionLineList: [],
|
||||
equipmentList: [],
|
||||
worksectionList: [],
|
||||
dataFormCache: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
Promise.all([this.getProductLineList(), this.getEquipmentList()]).then(
|
||||
() => {
|
||||
this.formLoading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
watch: {
|
||||
'dataForm.productionLineId': {
|
||||
handler: async function (plId) {
|
||||
if (plId) await this.getWorksectionList(plId);
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/** 模拟透传 ref */
|
||||
validate(cb) {
|
||||
return this.$refs.form.validate(cb);
|
||||
},
|
||||
resetFields(args) {
|
||||
return this.$refs.form.resetFields(args);
|
||||
},
|
||||
async handleProductlineChange(id) {
|
||||
await this.getWorksectionList(id);
|
||||
this.dataForm.workshopSectionId = null;
|
||||
this.$emit('update', this.dataForm);
|
||||
},
|
||||
// getCode
|
||||
async getCode(url) {
|
||||
const response = await this.$axios(url);
|
||||
return response.data;
|
||||
},
|
||||
// 获取产线列表
|
||||
async getProductLineList() {
|
||||
const response = await this.$axios('/base/core-production-line/listAll');
|
||||
this.productionLineList = response.data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
// 获取设备列表
|
||||
async getEquipmentList() {
|
||||
const response = await this.$axios(
|
||||
// '/base/core-equipment/page?pageNo=1&pageSize=100'
|
||||
'/base/core-equipment/listAll'
|
||||
);
|
||||
this.equipmentList = response.data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
// 获取工段列表
|
||||
async getWorksectionList(plId) {
|
||||
const response = await this.$axios(
|
||||
'/base/core-workshop-section/listByParentId',
|
||||
{
|
||||
params: {
|
||||
id: plId,
|
||||
},
|
||||
}
|
||||
);
|
||||
this.worksectionList = response.data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.el-date-editor,
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
@ -50,12 +50,13 @@
|
||||
<script>
|
||||
import moment from 'moment';
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import DialogForm from './dialogForm.vue';
|
||||
|
||||
// import { getAccessToken } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'EquipmentLineBind',
|
||||
components: {},
|
||||
components: { DialogForm },
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
return {
|
||||
@ -149,7 +150,9 @@ export default {
|
||||
select: true,
|
||||
label: '产线',
|
||||
prop: 'productionLineId',
|
||||
rules: [{ required: true, message: '产线名不能为空', trigger: 'blur' }],
|
||||
rules: [
|
||||
{ required: true, message: '产线名不能为空', trigger: 'blur' },
|
||||
],
|
||||
url: '/base/core-production-line/listAll',
|
||||
bind: { clearable: true, filterable: true },
|
||||
// watch: 'workshopSectionId'
|
||||
@ -159,7 +162,9 @@ export default {
|
||||
label: '工段',
|
||||
prop: 'workshopSectionId',
|
||||
depends: 'productionLineId',
|
||||
rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
|
||||
rules: [
|
||||
{ required: true, message: '工段不能为空', trigger: 'blur' },
|
||||
],
|
||||
bind: { clearable: true, filterable: true },
|
||||
url: '/base/core-workshop-section/listByParentId',
|
||||
},
|
||||
@ -169,7 +174,9 @@ export default {
|
||||
select: true,
|
||||
label: '设备',
|
||||
prop: 'equipmentId',
|
||||
rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
|
||||
rules: [
|
||||
{ required: true, message: '设备名不能为空', trigger: 'blur' },
|
||||
],
|
||||
bind: { clearable: true, filterable: true },
|
||||
url: '/base/core-equipment/listAll',
|
||||
},
|
||||
@ -190,9 +197,16 @@ export default {
|
||||
label: '产线统计类型',
|
||||
prop: 'lineDataType',
|
||||
bind: {
|
||||
clearable: true, filterable: true
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
},
|
||||
rules: [{ required: true, message: '产线统计类型不能为空', trigger: 'change' }],
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '产线统计类型不能为空',
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
select: true,
|
||||
@ -204,9 +218,16 @@ export default {
|
||||
label: '工段统计类型',
|
||||
prop: 'sectionDataType',
|
||||
bind: {
|
||||
clearable: true, filterable: true
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
},
|
||||
rules: [{ required: true, message: '工段统计类型不能为空', trigger: 'change' }],
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '工段统计类型不能为空',
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
@ -335,15 +356,21 @@ export default {
|
||||
handleDelete(row) {
|
||||
const id = row.id;
|
||||
this.$modal
|
||||
.confirm('是否确认删除绑定"' + row.name + '"?')
|
||||
.then(function () {
|
||||
return deleteEquipmentType(id);
|
||||
.confirm(
|
||||
'是否确认删除绑定"' +
|
||||
(row.equipmentName == null ? '这条记录' : row.equipmentName) +
|
||||
'"?'
|
||||
)
|
||||
.then(() => {
|
||||
return this.del({ id });
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess('删除成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-12-06 10:36:56
|
||||
* @LastEditTime: 2024-01-08 16:11:03
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -253,6 +253,7 @@ export default {
|
||||
dataRule: {
|
||||
code: [{ required: true, message: "产品编码不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
|
||||
specifications: [{ required: true, message: "规格不能为空", trigger: "blur" }],
|
||||
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
|
||||
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }],
|
||||
processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }]
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-23 18:45:15
|
||||
* @LastEditTime: 2023-12-26 16:59:25
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -12,86 +12,162 @@
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
size="50%"> -->
|
||||
<div class="app-container">
|
||||
<div class="container">
|
||||
<!-- <small-title slot="title" :no-padding="true">
|
||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title> -->
|
||||
<el-button style="float: right" type="primary" @click="goback()">返回</el-button>
|
||||
<div v-show="workOrderButton.length">
|
||||
<el-button v-for="(work, index) in workOrderButton" :key="index" type="primary" @click="init(work.id, true)">{{ work.name }}</el-button>
|
||||
<div v-show="workOrderButton.length" class="buttonDiv">
|
||||
<div style="display: flex; width: 100%;">
|
||||
<el-button v-show="showScroll" type="text" style="width: 30px; background: white; margin-right: 8px" @click="scrollLeft" icon="el-icon-caret-left"></el-button>
|
||||
<div ref="content" class="scrollDiv">
|
||||
<el-button style="border: none" v-for="(work, index) in workOrderButton" :key="index" @click="init(work.id, true)">{{ work.name }}</el-button>
|
||||
</div>
|
||||
<el-button v-show="showScroll" type="text" @click="scrolRight" style="width: 30px; background: white; margin-left: 8px" icon="el-icon-caret-right"></el-button>
|
||||
<el-button style="float: right" type="primary" size="small" plain @click="goback()">
|
||||
<svg-icon icon-class="return"/>返回
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>工单编码:{{ dataForm.code }}</h1>
|
||||
</div>
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
基本信息
|
||||
</small-title>
|
||||
<div class="formContent">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">工单名称:{{ dataForm.name }}</el-col>
|
||||
<el-col :span="8">工单来源:{{ dataForm.triggerOrigin === 1 ? 'MES' : dataForm.triggerOrigin === 2 ? 'ERP' : ''}}</el-col>
|
||||
<el-col :span="8">所属订单:
|
||||
<span v-for="(item, index) in orderList" :key="index" style="margin-right: 10px">{{ item.orderName }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">产品名称:{{ dataForm.productName }}</el-col>
|
||||
<el-col :span="8">规 格:{{ dataForm.specifications }}</el-col>
|
||||
<el-col :span="8">计划生产数量:{{ dataForm.planQuantity }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">预计用时(小时):{{ dataForm.remainingTime }}</el-col>
|
||||
<el-col :span="8">计划投入数量:{{ dataForm.planAssignQuantity }}</el-col>
|
||||
<el-col :span="8">优先级:{{ fitlerP(dataForm.priority) }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">负责人:{{ dataForm.workers }}</el-col>
|
||||
<el-col :span="8">关联产线:
|
||||
<span v-for="(item, index) in dataForm.productLineNames" :key="index" style="margin-right: 10px">{{ item }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">物料计算方式:{{ dataForm.materialMethod === 1 ? '产品基础' : dataForm.materialMethod === 2 ? '工艺扩展' : '' }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">关联工艺:{{ dataForm.processFlowName }}</el-col>
|
||||
</el-row>
|
||||
<div class="card">
|
||||
<div class="boxTitle">
|
||||
<span class="blueTitle"></span>
|
||||
<span>工单编码:{{ dataForm.code }}</span>
|
||||
</div>
|
||||
<el-button v-if="!workOrderButton.length" style="float: right" type="primary" size="small" plain @click="goback()">
|
||||
<svg-icon icon-class="return"/>返回
|
||||
</el-button>
|
||||
<div class="formContent">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">工单名称</div>
|
||||
<div class="lightTip">{{ dataForm.name }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">工单来源</div>
|
||||
<div class="lightTip">{{ dataForm.triggerOrigin === 1 ? 'MES' : dataForm.triggerOrigin === 2 ? 'ERP' : ''}}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">所属订单</div>
|
||||
<div class="lightTip">
|
||||
<span v-for="(item, index) in orderList" :key="index" style="margin-right: 10px">{{ item.orderName }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">产品名称</div>
|
||||
<div class="lightTip">{{ dataForm.productName }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">规 格</div>
|
||||
<div class="lightTip">{{ dataForm.specifications }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">计划生产数量</div>
|
||||
<div class="lightTip">{{ dataForm.planQuantity }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">预计用时(小时)</div>
|
||||
<div class="lightTip">{{ dataForm.remainingTime }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">计划投入数量</div>
|
||||
<div class="lightTip">{{ dataForm.planAssignQuantity }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">优先级</div>
|
||||
<div class="lightTip">{{ fitlerP(dataForm.priority) }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">负责人</div>
|
||||
<div class="lightTip">{{ dataForm.workers }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">关联产线</div>
|
||||
<div class="lightTip">
|
||||
<span v-for="(item, index) in dataForm.productLineNames" :key="index" style="margin-right: 10px">{{ item }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">物料计算方式</div>
|
||||
<div class="lightTip">{{ dataForm.materialMethod === 1 ? '产品基础' : dataForm.materialMethod === 2 ? '工艺扩展' : '' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">关联工艺</div>
|
||||
<div class="lightTip">{{ dataForm.processFlowName }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
生产信息
|
||||
</small-title>
|
||||
<div class="formContent">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">工单创建时间:{{ parseTime(dataForm.createTime) }}</el-col>
|
||||
<el-col :span="8">计划开始时间:{{ parseTime(dataForm.planStartTime) }}</el-col>
|
||||
<el-col :span="8">计划完成时间:{{ parseTime(dataForm.planFinishTime) }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">预计结束时间:{{ parseTime(dataForm.computeFinishTime) }}</el-col>
|
||||
<el-col :span="8">实际开始时间:{{ parseTime(dataForm.startProduceTime) }}</el-col>
|
||||
<el-col :span="8">实际完成时间:{{ parseTime(dataForm.finishProduceTime) }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">工单状态:{{ fitlerS(dataForm.status) }}</el-col>
|
||||
<el-col :span="8">实际投入数量:{{ dataForm.assignQuantity }}</el-col>
|
||||
<el-col :span="8">实际生产数量:{{ dataForm.actualQuantity }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">废片数量:{{ dataForm.nokQuantity }}</el-col>
|
||||
<el-col :span="8">检测瑕疵数:{{ }}</el-col>
|
||||
</el-row>
|
||||
<div class="card">
|
||||
<!-- <small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
生产信息
|
||||
</small-title> -->
|
||||
<div class="boxTitle">
|
||||
<span class="blueTitle"></span>
|
||||
<span>生产信息</span>
|
||||
</div>
|
||||
<div class="formContent">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">工单创建时间</div>
|
||||
<div class="lightTip">{{ parseTime(dataForm.createTime) }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">计划开始时间</div>
|
||||
<div class="lightTip">{{ parseTime(dataForm.planStartTime) }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">计划完成时间</div>
|
||||
<div class="lightTip">{{ parseTime(dataForm.planFinishTime) }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">预计结束时间</div>
|
||||
<div class="lightTip">{{ parseTime(dataForm.computeFinishTime) }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">实际开始时间</div>
|
||||
<div class="lightTip">{{ parseTime(dataForm.startProduceTime) }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">实际完成时间</div>
|
||||
<div class="lightTip">{{ parseTime(dataForm.finishProduceTime) }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">工单状态</div>
|
||||
<div class="lightTip">{{ fitlerS(dataForm.status) }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">实际投入数量</div>
|
||||
<div class="lightTip">{{ dataForm.assignQuantity }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">实际生产数量</div>
|
||||
<div class="lightTip">{{ dataForm.actualQuantity }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">废片数量</div>
|
||||
<div class="lightTip">{{ dataForm.nokQuantity }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">检测瑕疵数</div>
|
||||
<div class="lightTip">{{ }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="attr-list">
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
订单相关信息
|
||||
</small-title>
|
||||
<div class="card" style="padding-bottom: 16px; margin-bottom: 10px">
|
||||
<div class="boxTitle">
|
||||
<span class="blueTitle"></span>
|
||||
<span>订单相关信息</span>
|
||||
</div>
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
@ -114,12 +190,11 @@
|
||||
@pagination="getList" /> -->
|
||||
</div>
|
||||
|
||||
<div class="attr-list">
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
预计用料信息
|
||||
</small-title>
|
||||
<div class="card" style="padding-bottom: 16px;">
|
||||
<div class="boxTitle">
|
||||
<span class="blueTitle"></span>
|
||||
<span>预计用料信息</span>
|
||||
</div>
|
||||
<base-table
|
||||
:table-props="tableProps1"
|
||||
:page="listQuery1.pageNo"
|
||||
@ -227,8 +302,11 @@ export default {
|
||||
// orderArray: [],
|
||||
visible: false,
|
||||
isdetail: false,
|
||||
showScroll: false,
|
||||
workOrderButton: [],
|
||||
processFlowList: []
|
||||
processFlowList: [],
|
||||
timer: null
|
||||
// tableH: this.tableHeight(510) / 2
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -244,13 +322,38 @@ export default {
|
||||
name: work.name
|
||||
}
|
||||
})
|
||||
const contentRef = this.$refs.content
|
||||
if (contentRef.scrollWidth > contentRef.clientWidth) {
|
||||
this.showScroll = true
|
||||
} else {
|
||||
this.showScroll = false
|
||||
}
|
||||
console.log(contentRef.scrollWidth, contentRef.clientWidth)
|
||||
this.init(this.workOrderButton[0].id, true)
|
||||
})
|
||||
} else {
|
||||
} else {
|
||||
this.init(this.$route.query.id, true)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scrolRight() {
|
||||
// let contentRef = this.$refs.content
|
||||
// console.log('你好啊啊', contentRef.scrollWidth, contentRef.clientWidth)
|
||||
this.stopScroll()
|
||||
this.timer = setTimeout(() => {
|
||||
this.$refs.content.scrollLeft += 50
|
||||
}, 100)
|
||||
// if (contentRef.scrollWidth > contentRef.clientWi)
|
||||
},
|
||||
scrollLeft() {
|
||||
this.stopScroll()
|
||||
this.timer = setTimeout(() => {
|
||||
this.$refs.content.scrollLeft -= 50
|
||||
}, 100)
|
||||
},
|
||||
stopScroll() {
|
||||
clearTimeout(this.timer)
|
||||
},
|
||||
getDict() {
|
||||
// 工艺
|
||||
getProcessFlowList().then(res => {
|
||||
@ -391,59 +494,26 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.drawer >>> .el-drawer {
|
||||
border-radius: 8px 0 0 8px;
|
||||
.scrollDiv {
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
/* height: 50px; */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* padding-bottom: -10px; */
|
||||
}
|
||||
|
||||
.drawer >>> .el-form-item__label {
|
||||
padding: 0;
|
||||
.scrollDiv::-webkit-scrollbar-track {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.drawer >>> .el-drawer__header {
|
||||
margin: 0;
|
||||
padding: 32px 32px 24px;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
}
|
||||
.drawer >>> .el-drawer__body {
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
.buttonDiv {
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.drawer >>> .content {
|
||||
padding: 10px 24px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* height: 100%; */
|
||||
}
|
||||
|
||||
.drawer >>> .visual-part {
|
||||
flex: 1 auto;
|
||||
max-height: 76vh;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
padding-right: 10px; /* 调整滚动条样式 */
|
||||
}
|
||||
|
||||
.drawer >>> .el-form,
|
||||
.drawer >>> .attr-list {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.drawer-body__footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 18px;
|
||||
}
|
||||
.formContent {
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
padding: 0 14px;
|
||||
}
|
||||
.action_btn {
|
||||
float: right;
|
||||
@ -453,4 +523,43 @@ export default {
|
||||
.add {
|
||||
color: #0b58ff;
|
||||
}
|
||||
.blodTip {
|
||||
height: 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: rgba(0,0,0,0.85);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.lightTip {
|
||||
/* height: 16px; */
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: rgba(102,102,102,0.75);
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.container {
|
||||
background-color: rgb(242, 244, 249);
|
||||
}
|
||||
.card {
|
||||
padding: 16px 16px 0 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 9px;
|
||||
}
|
||||
.boxTitle {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
margin:0 10px 20px 0;
|
||||
}
|
||||
.blueTitle {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 18px;
|
||||
background-color: #0B58FF;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
</style>
|
||||
|
@ -16,7 +16,9 @@
|
||||
<el-form-item
|
||||
label="产线"
|
||||
prop="productionLineId"
|
||||
:rules="[{ required: true, message: '产线不能为空', trigger: 'blur' }]">
|
||||
:rules="[
|
||||
{ required: true, message: '产线不能为空', trigger: 'blur' },
|
||||
]">
|
||||
<el-select
|
||||
v-model="dataForm.productionLineId"
|
||||
placeholder="请选择产线"
|
||||
@ -35,7 +37,9 @@
|
||||
<el-form-item
|
||||
label="工段"
|
||||
prop="workshopSectionId"
|
||||
:rules="[{ required: true, message: '工段不能为空', trigger: 'blur' }]">
|
||||
:rules="[
|
||||
{ required: true, message: '工段不能为空', trigger: 'blur' },
|
||||
]">
|
||||
<el-select
|
||||
v-model="dataForm.workshopSectionId"
|
||||
filterable
|
||||
@ -55,7 +59,9 @@
|
||||
<el-form-item
|
||||
label="设备"
|
||||
prop="equipmentId"
|
||||
:rules="[{ required: true, message: '设备不能为空', trigger: 'blur' }]">
|
||||
:rules="[
|
||||
{ required: true, message: '设备不能为空', trigger: 'blur' },
|
||||
]">
|
||||
<el-select
|
||||
v-model="dataForm.equipmentId"
|
||||
filterable
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-10-17 16:50:19
|
||||
* @LastEditTime: 2023-12-04 13:43:19
|
||||
* @LastEditTime: 2024-01-22 09:55:32
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -282,7 +282,6 @@ export default {
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
|
||||
if (this.dataForm.id) {
|
||||
// 获取产品详情
|
||||
getPackingModel(id).then((response) => {
|
||||
|
@ -89,7 +89,7 @@
|
||||
<el-form ref="updateAssigneeForm" :model="updateAssignee.form" :rules="updateAssignee.rules" label-width="110px">
|
||||
<el-form-item label="新审批人" prop="assigneeUserId">
|
||||
<el-select v-model="updateAssignee.form.assigneeUserId" clearable style="width: 100%">
|
||||
<el-option v-for="item in userOptions" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
|
||||
<el-option v-for="item in userOptions" :key="item.id" :label="item.nickname" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -41,7 +41,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.type === 10" label="指定角色" prop="roleIds">
|
||||
<el-select v-model="form.roleIds" multiple clearable style="width: 100%">
|
||||
<el-option v-for="item in roleOptions" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
||||
<el-option v-for="item in roleOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.type === 20 || form.type === 21" label="指定部门" prop="deptIds">
|
||||
@ -50,17 +50,17 @@
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.type === 22" label="指定岗位" prop="postIds">
|
||||
<el-select v-model="form.postIds" multiple clearable style="width: 100%">
|
||||
<el-option v-for="item in postOptions" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
||||
<el-option v-for="item in postOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.type === 30 || form.type === 31 || form.type === 32" label="指定用户" prop="userIds">
|
||||
<el-select v-model="form.userIds" multiple clearable style="width: 100%">
|
||||
<el-option v-for="item in userOptions" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
|
||||
<el-option v-for="item in userOptions" :key="item.id" :label="item.nickname" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.type === 40" label="指定用户组" prop="userGroupIds">
|
||||
<el-select v-model="form.userGroupIds" multiple clearable style="width: 100%">
|
||||
<el-option v-for="item in userGroupOptions" :key="parseInt(item.id)" :label="item.name" :value="parseInt(item.id)" />
|
||||
<el-option v-for="item in userGroupOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.type === 50" label="指定脚本" prop="scripts">
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<div style="color: #fff;font-size: 22px; float: left; letter-spacing: 1px; font-weight: 500; padding-left: 24px; marginTop: 13px">
|
||||
<img src="../../../assets/images/cnbm.png" style="width: 26px; height: 26px; position: relative; top: 6px; marginRight: 14px" alt="">
|
||||
MES
|
||||
<div style="color: #fff;font-size: 22px; float: left; letter-spacing: 2px; font-weight: 500; padding-left: 24px; marginTop: 13px">
|
||||
<img src="../../../assets/logo/logo.png" style="width: 79px; height: 28px; position: relative; top: 6px; marginRight: 14px" alt="">
|
||||
许昌安彩新能科技有限公司
|
||||
</div>
|
||||
<div style="padding-top: 15px; padding-right: 38px;">
|
||||
<navbar-right />
|
||||
|
@ -84,7 +84,7 @@ export default {
|
||||
label: '时间',
|
||||
dateType: 'monthrange',
|
||||
format: 'yyyy-MM',
|
||||
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
|
||||
valueFormat: 'timestamp',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-24 11:19:43
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-09-21 16:02:07
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-01-10 10:29:29
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@ -92,7 +92,7 @@ export default {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === "delete") {
|
||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data)
|
||||
} else if (val.type === "change") {
|
||||
this.changeStatus(val.data.id)
|
||||
} else {
|
||||
|
@ -120,8 +120,12 @@ export default {
|
||||
lineData['proLineName'] = item[0].lineName
|
||||
let works = [], specs = []
|
||||
item.forEach(it => {
|
||||
works.push(it.workOrderName)
|
||||
specs.push(it.specifications)
|
||||
if (it.workOrderName) {
|
||||
works.push(it.workOrderName)
|
||||
}
|
||||
if (it.specifications) {
|
||||
specs.push(it.specifications)
|
||||
}
|
||||
lineData[it.recordTime + '_up'] = it.inputNum
|
||||
lineData[it.recordTime + '_down'] = it.outputNum
|
||||
lineData[it.recordTime + '_area'] = it.area
|
||||
@ -140,8 +144,8 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
lineData['workOrderName'] = works.join(',')
|
||||
lineData['spec'] = specs.join(',')
|
||||
lineData['workOrderName'] = Array.from(new Set(works)).join(',')
|
||||
lineData['spec'] = Array.from(new Set(specs)).join(',')
|
||||
this.tableData.push(lineData)
|
||||
})
|
||||
console.log('打印', this.tableData)
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 13:52:10
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-12-05 15:41:39
|
||||
* @LastEditTime: 2024-02-19 09:36:50
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -44,7 +44,7 @@
|
||||
v-for="item in urlOptions.dictList.dict0"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="parseInt(item.value)"></el-option>
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
BIN
src/views/databoard/assets/bg.png
Normal file
After Width: | Height: | Size: 2.7 MiB |
BIN
src/views/databoard/assets/check.png
Normal file
After Width: | Height: | Size: 492 B |
BIN
src/views/databoard/assets/defectStatistics.png
Normal file
After Width: | Height: | Size: 558 B |
BIN
src/views/databoard/assets/energeCost.png
Normal file
After Width: | Height: | Size: 322 B |
BIN
src/views/databoard/assets/eqMonitor.png
Normal file
After Width: | Height: | Size: 615 B |
BIN
src/views/databoard/assets/flow.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
src/views/databoard/assets/full.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
src/views/databoard/assets/gas.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/views/databoard/assets/goodRate.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
src/views/databoard/assets/head.png
Normal file
After Width: | Height: | Size: 132 KiB |
BIN
src/views/databoard/assets/high.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
src/views/databoard/assets/middle.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
src/views/databoard/assets/middle2.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
src/views/databoard/assets/move.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
src/views/databoard/assets/msg.png
Normal file
After Width: | Height: | Size: 507 B |
BIN
src/views/databoard/assets/order.png
Normal file
After Width: | Height: | Size: 789 B |
BIN
src/views/databoard/assets/short.png
Normal file
After Width: | Height: | Size: 41 KiB |
128
src/views/databoard/components/Container.vue
Normal file
@ -0,0 +1,128 @@
|
||||
<!--
|
||||
filename: Container.vue
|
||||
author: liubin
|
||||
date: 2023-12-05 14:29:53
|
||||
description: 窑炉容器
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="kiln-container" :class="['kiln-container__' + size]">
|
||||
<div class="container-hd" style="display: flex; align-items: center">
|
||||
<i
|
||||
class=""
|
||||
style="display: inline-block; margin-left: 12px; padding-top: 4px">
|
||||
<img :src="imgSrc" width="24" height="24" alt="" />
|
||||
</i>
|
||||
<span
|
||||
style="
|
||||
color: #fff;
|
||||
font-size: 24px;
|
||||
line-height: 2;
|
||||
margin-left: 6px;
|
||||
display: inline-block;
|
||||
">
|
||||
{{ name }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="container-body">
|
||||
<slot>
|
||||
<div class="test-body">something test....</div>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'KilnContainer',
|
||||
components: {},
|
||||
props: ['name', 'width', 'size'],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
imgSrc() {
|
||||
switch (this.name) {
|
||||
case '原料用量统计':
|
||||
return require('../assets/move.png');
|
||||
case '风机运行频率':
|
||||
return require('../assets/flow.png');
|
||||
case 'ISRA缺陷检测':
|
||||
return require('../assets/check.png');
|
||||
case '能耗':
|
||||
return require('../assets/energeCost.png');
|
||||
case '窑炉信息':
|
||||
return require('../assets/msg.png');
|
||||
case '烟气处理':
|
||||
return require('../assets/gas.png');
|
||||
case '产线缺陷统计':
|
||||
return require('../assets/defectStatistics.png');
|
||||
case '产线当日缺陷分类':
|
||||
return require('../assets/check.png');
|
||||
case '本日生产良品率':
|
||||
return require('../assets/goodRate.png');
|
||||
case '订单完成情况':
|
||||
return require('../assets/order.png');
|
||||
case '设备报警':
|
||||
return require('../assets/goodRate.png');
|
||||
case '各工序缺陷汇总':
|
||||
return require('../assets/check.png');
|
||||
case '能源监控':
|
||||
return require('../assets/defectStatistics.png');
|
||||
case '产线产量及良品率':
|
||||
return require('../assets/order.png');
|
||||
case '工单监控':
|
||||
return require('../assets/eqMonitor.png');
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.kiln-container {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
&__small {
|
||||
background: url(../assets/short.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
&__middle {
|
||||
background: url(../assets/middle.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
&__large {
|
||||
background: url(../assets/high.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-position: 0 0;
|
||||
}
|
||||
&::after {
|
||||
content: " ";
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
// background: inherit;
|
||||
/* 设置模糊,不用 filter */
|
||||
backdrop-filter: blur(5px);
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
.container-body {
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
84
src/views/databoard/components/DateBtnGroup.vue
Normal file
@ -0,0 +1,84 @@
|
||||
<!--
|
||||
filename: DateBtnGroup.vue
|
||||
author: liubin
|
||||
date: 2023-12-05 14:35:14
|
||||
description: 日期按钮组
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="date-btn-group">
|
||||
<button
|
||||
class="btn"
|
||||
:class="{ 'btn-active': active == '日' }"
|
||||
@click="handleClick('日')">
|
||||
日
|
||||
</button>
|
||||
<button
|
||||
class="btn"
|
||||
:class="{ 'btn-active': active == '周' }"
|
||||
@click="handleClick('周')">
|
||||
周
|
||||
</button>
|
||||
<button
|
||||
class="btn"
|
||||
:class="{ 'btn-active': active == '月' }"
|
||||
@click="handleClick('月')">
|
||||
月
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DateBtnGroup',
|
||||
data() {
|
||||
return {
|
||||
active: '日',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleClick(v) {
|
||||
this.active = v;
|
||||
this.$emit('change', v);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
button {
|
||||
appearance: none;
|
||||
border: none;
|
||||
outline: none;
|
||||
background: none;
|
||||
padding: 6px 8px;
|
||||
}
|
||||
.date-btn-group {
|
||||
// position: absolute;
|
||||
// top: 40px;
|
||||
// right: 100px;
|
||||
// border: 1px solid #ccc;
|
||||
// padding: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
border: 1px solid #11e8e4;
|
||||
border-radius: 4px;
|
||||
color: #11e8e4;
|
||||
transition: all 0.3s ease-in-out;
|
||||
|
||||
&:hover {
|
||||
background: #11e8e4;
|
||||
color: #013433;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-active {
|
||||
background: #11e8e4;
|
||||
color: #013433;
|
||||
}
|
||||
</style>
|
240
src/views/databoard/components/DefectChart.vue
Normal file
@ -0,0 +1,240 @@
|
||||
<template>
|
||||
<div>
|
||||
<NotMsg v-show="notMsg"/>
|
||||
<div id="defectChart" style="width:580px;height:238px;" v-show="!notMsg"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import resize from './../mixins/resize'
|
||||
import NotMsg from './../components/NotMsg'
|
||||
export default {
|
||||
name: 'DefectChart',
|
||||
mixins: [resize],
|
||||
components:{ NotMsg },
|
||||
props: {
|
||||
chartTime: ''
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
tempData: [],
|
||||
notMsg:false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
israCheckType() {
|
||||
return this.$store.state.websocket.israCheckType
|
||||
},
|
||||
israDayStatistic() {
|
||||
return this.$store.state.websocket.israDayStatistic
|
||||
},
|
||||
israWeekStatistic() {
|
||||
return this.$store.state.websocket.israWeekStatistic
|
||||
},
|
||||
israMonthStatistic() {
|
||||
return this.$store.state.websocket.israMonthStatistic
|
||||
},
|
||||
israYearStatistic() {
|
||||
return this.$store.state.websocket.israYearStatistic
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
israDayStatistic: {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '日') {
|
||||
this.tempData = this.israDayStatistic
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
israWeekStatistic: {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '周') {
|
||||
this.tempData = this.israWeekStatistic
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
israMonthStatistic: {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '月') {
|
||||
this.tempData = this.israMonthStatistic
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
israYearStatistic: {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '年') {
|
||||
this.tempData = this.israYearStatistic
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
chartTime: {// 监听类型变化,更新图
|
||||
handler(newVal, oldVal) {
|
||||
switch(this.chartTime){
|
||||
case '日':
|
||||
this.tempData = this.israDayStatistic
|
||||
break;
|
||||
case '周':
|
||||
this.tempData = this.israWeekStatistic
|
||||
break;
|
||||
case '月':
|
||||
this.tempData = this.israMonthStatistic
|
||||
break;
|
||||
case '年':
|
||||
this.tempData = this.israYearStatistic
|
||||
break;
|
||||
default:
|
||||
}
|
||||
this.updateChart()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$el.addEventListener('resize', () => {
|
||||
console.log('resziing.....');
|
||||
});
|
||||
this.updateChart()
|
||||
},
|
||||
methods: {
|
||||
updateChart() {
|
||||
if (!this.tempData || this.tempData.length == 0) {
|
||||
this.notMsg = true
|
||||
return
|
||||
} else {
|
||||
this.notMsg = false
|
||||
}
|
||||
if (
|
||||
this.chart !== null &&
|
||||
this.chart !== '' &&
|
||||
this.chart !== undefined
|
||||
) {
|
||||
this.chart.dispose()
|
||||
}
|
||||
this.chart = echarts.init(document.getElementById('defectChart'));
|
||||
let xData = []
|
||||
let seriesData = []
|
||||
for (let i = 0;i < this.israCheckType.length; i++) {
|
||||
let obj = {}
|
||||
obj.type = 'bar'
|
||||
obj.stack = 'all'
|
||||
obj.emphasis = {
|
||||
focus:"series"
|
||||
}
|
||||
obj.name = this.israCheckType[i]
|
||||
obj.barWidth = 12
|
||||
obj.data = []
|
||||
if (i === this.israCheckType.length-1) {
|
||||
obj.label = {
|
||||
show: true,
|
||||
position: 'top',
|
||||
color: "#fffc",
|
||||
formatter: (params)=>this.tempData[params.dataIndex].sum
|
||||
}
|
||||
}
|
||||
for (let j = 0;j < this.tempData.length; j++) {
|
||||
let num = 0
|
||||
for (let k = 0; k < this.tempData[j].data.length; k++) {
|
||||
if (this.israCheckType[i] === this.tempData[j].data[k].checkType) {
|
||||
obj.data.push(this.tempData[j].data[k].checkNum)
|
||||
num++
|
||||
}
|
||||
}
|
||||
if (num === 0) {
|
||||
obj.data.push(0)
|
||||
}
|
||||
}
|
||||
seriesData.push(obj)
|
||||
}
|
||||
|
||||
this.tempData && this.tempData.length > 0 && this.tempData.map(item => {
|
||||
xData.push(item.name)
|
||||
})
|
||||
var option = {
|
||||
color: ["#2760FF", "#8167F6", "#5B9BFF", "#99D66C", "#FFD160", "#FF8A40"],
|
||||
grid: { top: 90, right: 12, bottom: 20, left: 70 },
|
||||
legend: {
|
||||
top: 0,
|
||||
left: 8,
|
||||
padding: 5,
|
||||
itemWidth: 12,
|
||||
itemHeight: 12,
|
||||
itemGap: 12,
|
||||
height: 12,
|
||||
textStyle: {
|
||||
color: "#DFF1FE",
|
||||
fontSize: 12,
|
||||
},
|
||||
data:this.israCheckType,
|
||||
},
|
||||
xAxis: {
|
||||
type: "category",
|
||||
data: xData,
|
||||
axisLabel: {
|
||||
color: "#fffc",
|
||||
fontSize: 12,
|
||||
},
|
||||
axisTick: { show: false },
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
width: 1,
|
||||
color: "#213259",
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name: "单位/个",
|
||||
nameTextStyle: {
|
||||
color: "#fff",
|
||||
fontSize: 10,
|
||||
align: "right",
|
||||
},
|
||||
type: "value",
|
||||
axisLabel: {
|
||||
color: "#fff",
|
||||
fontSize: 12,
|
||||
formatter: "{value}",
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: "#213259",
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: "#213259a0",
|
||||
},
|
||||
},
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow",
|
||||
},
|
||||
className: "defect-chart-tooltip"
|
||||
},
|
||||
series: seriesData
|
||||
};
|
||||
option && this.chart.setOption(option)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.defect-chart-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.defect-chart-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
171
src/views/databoard/components/DefectClassChart.vue
Normal file
@ -0,0 +1,171 @@
|
||||
<template>
|
||||
<div>
|
||||
<NotMsg v-show="notMsg"/>
|
||||
<div id="defectClassChart" class="defect-class-chart" style="width:600px;height:390px;" v-show='!notMsg'></div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import resize from './../mixins/resize'
|
||||
import NotMsg from './../components/NotMsg'
|
||||
export default {
|
||||
name: 'DefectClassChart',
|
||||
mixins: [resize],
|
||||
components:{ NotMsg },
|
||||
props: {
|
||||
chartType: ''
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
notMsg:false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
israDayStatistic() {
|
||||
return this.$store.state.websocket.israDayStatistic
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
israDayStatistic: {
|
||||
handler(newVal, oldVal) {
|
||||
if (newVal === oldVal) {
|
||||
return false
|
||||
}
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
},
|
||||
chartType: {// 监听类型变化,更新图
|
||||
handler(newVal, oldVal) {
|
||||
this.updateChart()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$el.addEventListener('resize', () => {
|
||||
console.log('resziing.....');
|
||||
});
|
||||
this.updateChart()
|
||||
},
|
||||
methods: {
|
||||
updateChart() {
|
||||
if (!this.israDayStatistic || this.israDayStatistic.length == 0) {
|
||||
this.notMsg = true
|
||||
return
|
||||
} else {
|
||||
this.notMsg = false
|
||||
}
|
||||
if (
|
||||
this.chart !== null &&
|
||||
this.chart !== '' &&
|
||||
this.chart !== undefined
|
||||
) {
|
||||
this.chart.dispose()
|
||||
}
|
||||
this.chart = echarts.init(document.getElementById('defectClassChart'));
|
||||
let tempData = []
|
||||
let xData = []
|
||||
let yData = []
|
||||
this.israDayStatistic && this.israDayStatistic.length > 0 && this.israDayStatistic.map(item => {
|
||||
if (this.chartType === item.name) {
|
||||
tempData = item.data
|
||||
return
|
||||
}
|
||||
})
|
||||
tempData.length > 0 && tempData.map(item => {
|
||||
xData.push(item.checkType)
|
||||
yData.push(item.checkNum)
|
||||
})
|
||||
var option = {
|
||||
color: ['#2760FF','#5B9BFF','#FFD160','#8167F6', '#99D66C', '#FF8A40'],
|
||||
grid: { top: 40, right: 12, bottom: 65, left: 70 },
|
||||
xAxis: {
|
||||
type: "category",
|
||||
data: xData,
|
||||
axisLabel: {
|
||||
color: "#fffc",
|
||||
fontSize: 12,
|
||||
rotate: 25
|
||||
},
|
||||
axisTick: { show: false },
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
width: 1,
|
||||
color: "#213259",
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name: "单位/个",
|
||||
nameTextStyle: {
|
||||
color: "#fff",
|
||||
fontSize: 10,
|
||||
align: "right",
|
||||
},
|
||||
type: "value",
|
||||
axisLabel: {
|
||||
color: "#fff",
|
||||
fontSize: 12,
|
||||
formatter: "{value}",
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: "#213259",
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: "#213259a0",
|
||||
},
|
||||
},
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow",
|
||||
},
|
||||
className: "defect-chart-tooltip"
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: yData,
|
||||
type: 'bar',
|
||||
barWidth: 12,
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
distance: 10,
|
||||
color: "#fffc"
|
||||
},
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#5CB7FF' },
|
||||
{ offset: 1, color: '#364BFE' }
|
||||
])
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
option && this.chart.setOption(option)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.defect-class-chart {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.defect-chart-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.defect-chart-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
86
src/views/databoard/components/DropDownBtn.vue
Normal file
@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<div class="drop-down-btn">
|
||||
<button class="top-btn" @click='toggleExpand'><span style="margin-right: 3px;">{{active}}</span><svg-icon class-name="arrow" icon-class="arrow" :style="{transform:isExpand?'rotate(180deg)':'rotate(0deg)'}"/></button>
|
||||
<div v-show="isExpand" class="btn-box">
|
||||
<button
|
||||
class="btn"
|
||||
v-for="opt in options"
|
||||
:key="opt"
|
||||
@click="clickBtn(opt)"
|
||||
v-show="active !== opt">
|
||||
<span class="btn-text">
|
||||
{{ opt }}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DropDownBtn',
|
||||
components: {},
|
||||
props: ['options', 'active'],
|
||||
data() {
|
||||
return {
|
||||
isExpand: false
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
clickBtn(opt) {
|
||||
this.$emit('emitFun', opt)
|
||||
this.isExpand = !this.isExpand
|
||||
},
|
||||
toggleExpand() {
|
||||
this.isExpand = !this.isExpand
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.drop-down-btn {
|
||||
z-index: 1000;
|
||||
button {
|
||||
border: none;
|
||||
appearance: none;
|
||||
outline: none;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
padding: 8px 5px 8px 8px;
|
||||
height: 32px;
|
||||
}
|
||||
.top-btn {
|
||||
background: #02457E;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
.arrow {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.btn-box {
|
||||
.btn {
|
||||
display: block;
|
||||
width: 100%;
|
||||
background: #03233C;
|
||||
&:hover {
|
||||
background: #02457E;
|
||||
transition: all 0.5s ease-out;
|
||||
}
|
||||
.btn-text{
|
||||
padding: 0px 5px 6px;
|
||||
border-bottom: 1px solid #010D18;
|
||||
}
|
||||
}
|
||||
.btn:last-child{
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
.btn-text{
|
||||
height: 16px;
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
177
src/views/databoard/components/EnergeMonitoringChart.vue
Normal file
@ -0,0 +1,177 @@
|
||||
<template>
|
||||
<div>
|
||||
<NotMsg v-show="notMsg"/>
|
||||
<div id="energeMonitoringChart" class="energe-monitoring-chart" style="width:575px;height:420px;" v-show='!notMsg'></div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import resize from './../mixins/resize'
|
||||
import NotMsg from './../components/NotMsg'
|
||||
export default {
|
||||
name: 'EnergeMonitoringChart',
|
||||
mixins: [resize],
|
||||
components:{ NotMsg },
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
notMsg:true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
energyMonitoring() {
|
||||
return this.$store.state.websocket.energyMonitoring
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
energyMonitoring: {
|
||||
handler(newVal, oldVal) {
|
||||
if (newVal === oldVal) {
|
||||
return false
|
||||
}
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$el.addEventListener('resize', () => {
|
||||
console.log('resziing.....');
|
||||
});
|
||||
this.updateChart()
|
||||
},
|
||||
methods: {
|
||||
updateChart() {
|
||||
if (
|
||||
this.chart !== null &&
|
||||
this.chart !== '' &&
|
||||
this.chart !== undefined
|
||||
) {
|
||||
this.chart.dispose()
|
||||
}
|
||||
this.chart = echarts.init(document.getElementById('energeMonitoringChart'));
|
||||
let xData = []
|
||||
let yData = []
|
||||
this.energyMonitoring && this.energyMonitoring.length > 0 && this.energyMonitoring.map(item => {
|
||||
xData.push(item.lineName)
|
||||
yData.push(item.useQuantity)
|
||||
})
|
||||
if (yData.length === 0) {
|
||||
this.notMsg = true
|
||||
return
|
||||
} else {
|
||||
this.notMsg = false
|
||||
}
|
||||
var option = {
|
||||
// color: ['#FF8A40','#FFD160','#99D66C','#5B9BFF','#8167F6','#2760FF'],
|
||||
grid: { top: 82, right: 12, bottom: 20, left: 90 },
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#999'
|
||||
}
|
||||
},
|
||||
className: "energe-monitoring-chart-tooltip"
|
||||
},
|
||||
legend: {
|
||||
itemWidth:10,
|
||||
itemHeight:10,
|
||||
top: '2.5%',
|
||||
right: '0',
|
||||
data: [{name:'电耗能',itemStyle:{color:'#364BFE'}}],
|
||||
textStyle: {
|
||||
color: "#DFF1FE",
|
||||
fontSize: 12,
|
||||
}
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: xData,
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
},
|
||||
axisLabel: {
|
||||
color: "#fff",
|
||||
fontSize: 12,
|
||||
},
|
||||
axisTick: { show: false },
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
width: 1,
|
||||
color: "#213259",
|
||||
},
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
name: '单位kwh',
|
||||
nameTextStyle: {
|
||||
color: '#fff',
|
||||
fontSize: 10,
|
||||
align: 'right',
|
||||
},
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
color: "#fff",
|
||||
fontSize: 12,
|
||||
formatter: '{value}'
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: "#213259",
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: "#213259a0",
|
||||
},
|
||||
}
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '电耗能',
|
||||
type: 'bar',
|
||||
barWidth: 20,
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#5CB7FF' },
|
||||
{ offset: 1, color: '#364BFE' }
|
||||
])
|
||||
},
|
||||
data: yData
|
||||
}
|
||||
]
|
||||
}
|
||||
option && this.chart.setOption(option)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.energe-monitoring-chart {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: -50px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.energe-monitoring-chart-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.energe-monitoring-chart-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
261
src/views/databoard/components/FlueGasChart.vue
Normal file
@ -0,0 +1,261 @@
|
||||
<template>
|
||||
<div>
|
||||
<NotMsg v-show="notMsg"/>
|
||||
<div id='flueGasChart' class="flue-gas-chart" style="width:575px;height:250px;" v-show='!notMsg'></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
import resize from './../mixins/resize'
|
||||
import NotMsg from './../components/NotMsg'
|
||||
|
||||
export default {
|
||||
name: 'FlueGasChart',
|
||||
mixins: [resize],
|
||||
components:{ NotMsg },
|
||||
props: {
|
||||
chartType: '',
|
||||
chartTime: ''
|
||||
},
|
||||
data() {
|
||||
const colors = [
|
||||
'#12FFF5',
|
||||
'#2760FF',
|
||||
'#FFD160',
|
||||
'#E80091',
|
||||
'#8064ff',
|
||||
'#ff8a3b',
|
||||
'#8cd26d',
|
||||
'#2aa1ff',
|
||||
];
|
||||
return {
|
||||
chart: null,
|
||||
notMsg:false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
gasChartDayTrend() {
|
||||
return this.$store.state.websocket.gasChartDayTrend
|
||||
},
|
||||
gasChartWeekTrend() {
|
||||
return this.$store.state.websocket.gasChartWeekTrend
|
||||
},
|
||||
gasChartMonthTrend() {
|
||||
return this.$store.state.websocket.gasChartMonthTrend
|
||||
},
|
||||
gasChartYearTrend() {
|
||||
return this.$store.state.websocket.gasChartYearTrend
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
gasChartDayTrend: {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '日') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
gasChartWeekTrend: {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '周') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
gasChartMonthTrend: {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '月') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
gasChartYearTrend: {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '年') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
chartType: {// 监听类型变化,更新图
|
||||
handler(newVal, oldVal) {
|
||||
this.updateChart()
|
||||
}
|
||||
},
|
||||
chartTime: {// 监听时间变化,更新图
|
||||
handler(newVal, oldVal) {
|
||||
this.updateChart()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$el.addEventListener('resize', () => {
|
||||
console.log('resziing.....');
|
||||
});
|
||||
this.updateChart()
|
||||
},
|
||||
methods: {
|
||||
updateChart() {
|
||||
let gasName = ''
|
||||
const colors = ['#FFCB59'];
|
||||
let temp1 = []
|
||||
let temp2 = []
|
||||
let seriesData = []
|
||||
let xData = []
|
||||
let yData = []
|
||||
switch (this.chartTime) {
|
||||
case '日':{
|
||||
temp1 = this.gasChartDayTrend
|
||||
break;
|
||||
}
|
||||
case '周':{
|
||||
temp1 = this.gasChartWeekTrend
|
||||
break;
|
||||
}
|
||||
case '月':{
|
||||
temp1 = this.gasChartMonthTrend
|
||||
break;
|
||||
}
|
||||
case '年':{
|
||||
temp1 = this.gasChartYearTrend
|
||||
break;
|
||||
}
|
||||
default:
|
||||
}
|
||||
switch (this.chartType) {
|
||||
case '氧气含量':{
|
||||
temp2 = temp1?.O2_float || []
|
||||
break;
|
||||
}
|
||||
case '二氧化硫':{
|
||||
temp2 = temp1?.SO2_float || []
|
||||
break;
|
||||
}
|
||||
case '氮氧化物':{
|
||||
temp2 = temp1?.NOX_float || []
|
||||
break;
|
||||
}
|
||||
case '颗粒物':{
|
||||
temp2 = temp1?.dust_float || []
|
||||
break;
|
||||
}
|
||||
default:
|
||||
}
|
||||
if (temp2.length === 0) {
|
||||
this.notMsg = true
|
||||
return
|
||||
} else {
|
||||
this.notMsg = false
|
||||
}
|
||||
temp2.map(i => {
|
||||
xData.push(i.time)
|
||||
yData.push((i.value)?(Number(i.value)).toFixed(2):null)
|
||||
})
|
||||
if (yData.length == 0) {
|
||||
seriesData = []
|
||||
}else {
|
||||
seriesData = [{
|
||||
name: gasName,
|
||||
data: yData,
|
||||
type: "line",
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#FFCB59' + "40" },
|
||||
{ offset: 0.5, color: '#FFCB59' + "20" },
|
||||
{ offset: 1, color: '#FFCB59' + "00" },
|
||||
]),
|
||||
},
|
||||
lineStyle: {
|
||||
width: 1
|
||||
},
|
||||
symbol: 'circle',
|
||||
symbolSize: 5,
|
||||
emphasis: {
|
||||
focus: 'series'
|
||||
}
|
||||
}]
|
||||
|
||||
}
|
||||
// 绘图
|
||||
if (
|
||||
this.chart !== null &&
|
||||
this.chart !== '' &&
|
||||
this.chart !== undefined
|
||||
) {
|
||||
this.chart.dispose() // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例
|
||||
}
|
||||
this.chart = echarts.init(document.getElementById('flueGasChart'));
|
||||
var option = {
|
||||
color: colors,
|
||||
grid: { top: 32, right: 12, bottom: 20, left: 60 },
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: xData,
|
||||
axisLabel: {
|
||||
color: '#fff',
|
||||
fontSize: 12,
|
||||
},
|
||||
axisTick: { show: false },
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
width: 1,
|
||||
color: '#213259',
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name: this.chartType === '氧气含量' ? '单位%':'单位mg/m³',
|
||||
nameTextStyle: {
|
||||
color: '#fff',
|
||||
fontSize: 10,
|
||||
align: 'right',
|
||||
},
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
color: '#fff',
|
||||
fontSize: 12,
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#213259',
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#213259a0',
|
||||
},
|
||||
},
|
||||
},
|
||||
series: seriesData,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
className: "gas-chart-tooltip"
|
||||
},
|
||||
}
|
||||
option && this.chart.setOption(option)
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.flue-gas-chart {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.gas-chart-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.gas-chart-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
289
src/views/databoard/components/GasChart.vue
Normal file
@ -0,0 +1,289 @@
|
||||
<template>
|
||||
<div>
|
||||
<NotMsg v-show="notMsg"/>
|
||||
<div id='gasChart' class="gas-chart" style="width:600px;height:200px;" v-show='!notMsg'></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import resize from './../mixins/resize'
|
||||
import NotMsg from './../components/NotMsg'
|
||||
|
||||
export default {
|
||||
name: 'GasChart',
|
||||
mixins: [resize],
|
||||
components:{ NotMsg },
|
||||
props: {
|
||||
chartType: '', // 能源类型
|
||||
chartTime: ''
|
||||
},
|
||||
data() {
|
||||
const colors = [
|
||||
'#12FFF5',
|
||||
'#2760FF',
|
||||
'#FFD160',
|
||||
'#E80091',
|
||||
'#8064ff',
|
||||
'#ff8a3b',
|
||||
'#8cd26d',
|
||||
'#2aa1ff',
|
||||
];
|
||||
return {
|
||||
chart: null,
|
||||
notMsg:false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
gasChartMsg() {
|
||||
return this.$store.state.websocket.sumGasInfo
|
||||
},
|
||||
energyWeekTrend() {
|
||||
return this.$store.state.websocket.energyWeekTrend
|
||||
},
|
||||
energyMonthTrend() {
|
||||
return this.$store.state.websocket.energyMonthTrend
|
||||
},
|
||||
energyYearTrend() {
|
||||
return this.$store.state.websocket.energyYearTrend
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
energyWeekTrend: {// 监听周电能,更新图
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '周' && this.chartType === '电耗能') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
energyMonthTrend: {// 监听月电能,更新图
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '月' && this.chartType === '电耗能') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
energyYearTrend: {// 监听年电能,更新图
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '年' && this.chartType === '电耗能') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
gasChartMsg: {// 监听天然气,更新图
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartType === '天然气I' || this.chartType === '天然气II') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
chartTime: {// 监听时间变化,更新图
|
||||
handler(newVal, oldVal) {
|
||||
this.updateChart()
|
||||
}
|
||||
},
|
||||
chartType: {// 监听能源类型变化,更新图
|
||||
handler(newVal, oldVal) {
|
||||
this.updateChart()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$el.addEventListener('resize', () => {
|
||||
console.log('resziing.....');
|
||||
});
|
||||
this.updateChart()
|
||||
},
|
||||
methods: {
|
||||
updateChart() {
|
||||
let gasName = ''
|
||||
const colors = ['#FFCB59'];
|
||||
let temp = []
|
||||
let seriesData = []
|
||||
let xData = []
|
||||
let yData = []
|
||||
switch (this.chartType) {
|
||||
case '电耗能':{
|
||||
gasName = '电耗能'
|
||||
if (this.chartTime === '周') {
|
||||
temp = this.energyWeekTrend || []
|
||||
}else if(this.chartTime === '月') {
|
||||
temp = this.energyMonthTrend || []
|
||||
}else{
|
||||
temp = this.energyYearTrend || []
|
||||
}
|
||||
temp && temp.map(i => {
|
||||
xData.push(i.time)
|
||||
yData.push(i.qty)
|
||||
})
|
||||
break;
|
||||
}
|
||||
case '天然气I':{
|
||||
if (this.chartTime === '周') {
|
||||
yData = this.gasChartMsg.hisSumGas1For7Day || []
|
||||
}else if(this.chartTime === '月') {
|
||||
yData = this.gasChartMsg.sumGas1ForMonth || []
|
||||
}else{
|
||||
yData = this.gasChartMsg.sumGas1ForYear || []
|
||||
}
|
||||
gasName = '天然气I'
|
||||
xData = this.getXdata()
|
||||
break;
|
||||
}
|
||||
default:
|
||||
gasName = '天然气II'
|
||||
if (this.chartTime === '周') {
|
||||
yData = this.gasChartMsg.hisSumGas2For7Day || []
|
||||
}else if(this.chartTime === '月') {
|
||||
yData = this.gasChartMsg.sumGas2ForMonth || []
|
||||
}else{
|
||||
yData = this.gasChartMsg.sumGas2ForYear || []
|
||||
}
|
||||
xData = this.getXdata()
|
||||
}
|
||||
if (yData.length === 0) {
|
||||
this.notMsg = true
|
||||
return
|
||||
} else {
|
||||
this.notMsg = false
|
||||
}
|
||||
if (yData.length == 0) {
|
||||
seriesData = []
|
||||
}else {
|
||||
seriesData = [{
|
||||
name: gasName,
|
||||
data: yData,
|
||||
type: "line",
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#FFCB59' + "40" },
|
||||
{ offset: 0.5, color: '#FFCB59' + "20" },
|
||||
{ offset: 1, color: '#FFCB59' + "00" },
|
||||
]),
|
||||
},
|
||||
lineStyle: {
|
||||
width: 1
|
||||
},
|
||||
symbol: 'circle',
|
||||
symbolSize: 5,
|
||||
emphasis: {
|
||||
focus: 'series'
|
||||
}
|
||||
}]
|
||||
|
||||
}
|
||||
// 绘图
|
||||
if (
|
||||
this.chart !== null &&
|
||||
this.chart !== '' &&
|
||||
this.chart !== undefined
|
||||
) {
|
||||
this.chart.dispose() // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例
|
||||
}
|
||||
this.chart = echarts.init(document.getElementById('gasChart'));
|
||||
var option = {
|
||||
color: colors,
|
||||
grid: { top: 32, right: 12, bottom: 20, left: 60 },
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: xData,
|
||||
axisLabel: {
|
||||
color: '#fff',
|
||||
fontSize: 12,
|
||||
},
|
||||
axisTick: { show: false },
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
width: 1,
|
||||
color: '#213259',
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name: this.chartType === '电耗能'?'单位kwh':'单位Nm³',
|
||||
nameTextStyle: {
|
||||
color: '#fff',
|
||||
fontSize: 10,
|
||||
align: 'right',
|
||||
},
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
color: '#fff',
|
||||
fontSize: 12,
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#213259',
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#213259a0',
|
||||
},
|
||||
},
|
||||
},
|
||||
series: seriesData,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
className: "gas-tooltip"
|
||||
},
|
||||
}
|
||||
option && this.chart.setOption(option)
|
||||
},
|
||||
getXdata() {
|
||||
const today = new Date();
|
||||
const currentYear = today.getFullYear();
|
||||
const currentMonth = today.getMonth() + 1;
|
||||
let days = 30;
|
||||
if (this.chartTime === '周') {
|
||||
return Array(7)
|
||||
.fill(1)
|
||||
.map((_, index) => {
|
||||
const today = new Date();
|
||||
const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
|
||||
return `${new Date(dtimestamp).getMonth()+1}.${new Date(dtimestamp).getDate()}`;}).reverse()
|
||||
}else if (this.chartTime == "月") {
|
||||
if (currentMonth in [1, 3, 5, 7, 8, 10, 12]) {
|
||||
days = 31;
|
||||
} else if (currentMonth == 2) {
|
||||
days = this.isLeapYear(currentYear) ? 29 : 28;
|
||||
}
|
||||
return Array(days)
|
||||
.fill(1)
|
||||
.map((_, index) => {
|
||||
return `${currentMonth}.${days - index}`;}).reverse()
|
||||
} else {
|
||||
return Array(12)
|
||||
.fill(1)
|
||||
.map((_, index) => {
|
||||
return `${12 - index}`;}).reverse()
|
||||
}
|
||||
},
|
||||
isLeapYear(year) {
|
||||
return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.gas-chart {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.gas-tooltip {
|
||||
background: #0a2b4f77 !important;
|
||||
border: none !important;
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.gas-tooltip * {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
99
src/views/databoard/components/Header.vue
Normal file
@ -0,0 +1,99 @@
|
||||
<!--
|
||||
filename: Header.vue
|
||||
author: liubin
|
||||
date: 2023-12-05 14:30:46
|
||||
description: 顶部标题
|
||||
-->
|
||||
|
||||
<template>
|
||||
<header class="kiln-header">
|
||||
<h1>{{topTitle}}</h1>
|
||||
<!-- left: 312px; -->
|
||||
<div
|
||||
class="firm">
|
||||
单位: 河南汇融科技服务有限公司
|
||||
</div>
|
||||
<div
|
||||
class="datetime">
|
||||
<!-- <DateBtnGroup /> -->
|
||||
{{ new Date().toLocaleString() }}
|
||||
</div>
|
||||
<el-button
|
||||
type="text"
|
||||
class="screen-btn"
|
||||
@click="changeFullScreen"
|
||||
>
|
||||
<svg-icon v-if="isFullScreen" icon-class="unFullScreenView" />
|
||||
<svg-icon v-else icon-class="fullScreenView" />
|
||||
</el-button>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import DateBtnGroup from './DateBtnGroup.vue';
|
||||
|
||||
export default {
|
||||
name: 'KilnHeader',
|
||||
// components: { DateBtnGroup },
|
||||
props: {
|
||||
isFullScreen:false,
|
||||
topTitle: ''
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
changeFullScreen() {
|
||||
this.$emit('screenfullChange')
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.kiln-header {
|
||||
background: url('../assets/head.png') no-repeat;
|
||||
height: 96px;
|
||||
background-size: 100%;
|
||||
background-position: 0 0;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
position: relative;
|
||||
h1{
|
||||
font-size: 32px;
|
||||
margin-bottom: 36px;
|
||||
color: #0ee8e4;
|
||||
letter-spacing: 8px;
|
||||
}
|
||||
.firm{
|
||||
position: absolute;
|
||||
top: 45px;
|
||||
left: 325px;
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.datetime {
|
||||
position: absolute;
|
||||
top: 45px;
|
||||
right: 425px;
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
letter-spacing: 1px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
.screen-btn{
|
||||
color: #00fff0;
|
||||
font-size: 32px;
|
||||
position: absolute;
|
||||
right: 32px;
|
||||
top:28px
|
||||
}
|
||||
}
|
||||
</style>
|