218 Commits

Author SHA1 Message Date
ff59f7d955 Merge pull request 'projects/mescc/zhp' (#110) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #110
2024-08-01 16:37:45 +08:00
‘937886381’
a618e081b5 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-08-01 14:30:05 +08:00
‘937886381’
9efddba586 修改ui 2024-08-01 14:29:31 +08:00
12b37c13c7 Merge pull request '修改bug' (#109) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #109
2024-07-26 19:23:38 +08:00
‘937886381’
eda007d713 修改bug 2024-07-26 17:03:09 +08:00
9e3c9fff6d Merge pull request 'projects/mescc/zhp' (#108) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #108
2024-07-26 11:17:35 +08:00
‘937886381’
4d8300d213 修改页码页数 2024-07-26 11:16:16 +08:00
‘937886381’
52dbb694a8 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-26 11:08:45 +08:00
‘937886381’
cd36d33be9 修改bug 2024-07-26 11:07:52 +08:00
52d968fdde Merge pull request 'projects/mescc/zhp' (#107) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #107
2024-07-26 10:52:36 +08:00
‘937886381’
b05d9067d3 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-26 10:48:44 +08:00
‘937886381’
7e9f89fdda 新增成本核算及即时库存 2024-07-26 10:47:36 +08:00
2d89137809 Merge pull request 'projects/mescc/zhp' (#106) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #106
2024-07-25 14:19:34 +08:00
‘937886381’
f5f472854b 解决冲突 2024-07-25 14:17:06 +08:00
‘937886381’
737949d3ec 修改ui 2024-07-25 14:13:35 +08:00
e802674196 Merge pull request 'projects/mescc/dy' (#105) from projects/mescc/dy into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #105
2024-07-24 14:52:55 +08:00
helloDy
8da6dc6232 Merge branch 'projects/mescc/develop' into projects/mescc/dy 2024-07-24 14:51:56 +08:00
helloDy
3e2661581e bug 2024-07-24 14:51:26 +08:00
ec5e47a416 Merge pull request 'projects/mescc/dy' (#104) from projects/mescc/dy into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #104
2024-07-24 13:07:28 +08:00
helloDy
99d60a14bd merge 2024-07-23 18:01:22 +08:00
helloDy
6409d2d348 bug 2024-07-23 17:59:11 +08:00
71f548cb3b Merge pull request 'projects/mescc/zhp' (#103) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #103
2024-07-22 08:36:42 +08:00
‘937886381’
8ecf281f08 修改ui 2024-07-19 16:46:51 +08:00
‘937886381’
fa75a2b89f Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-19 15:30:38 +08:00
‘937886381’
c469ca5ebe 修改ui 2024-07-19 15:30:05 +08:00
9b8c090f7e Merge pull request 'projects/mescc/zhp' (#102) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #102
2024-07-19 13:25:45 +08:00
‘937886381’
cbae9ef922 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-19 13:23:06 +08:00
‘937886381’
c7a6ad2e22 修改ui 2024-07-19 13:22:42 +08:00
e66ef52489 Merge pull request 'projects/mescc/zhp' (#101) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #101
2024-07-19 08:39:41 +08:00
‘937886381’
ebb7f597b9 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-19 08:38:37 +08:00
‘937886381’
7d6a0e228f 修改ui 2024-07-19 08:37:54 +08:00
3bec7e3333 Merge pull request 'projects/mescc/zhp' (#100) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #100
2024-07-17 09:47:25 +08:00
‘937886381’
5444ff92f7 解决冲突 2024-07-17 08:56:03 +08:00
‘937886381’
0713cb1650 修改bug 2024-07-17 08:53:32 +08:00
9da2e20b24 Merge pull request '生产数据echarts图重写' (#99) from projects/mescc/dy into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #99
2024-07-17 08:28:56 +08:00
helloDy
efa5a7c383 生产数据echarts图重写 2024-07-16 18:41:57 +08:00
6ba4c90767 Merge pull request 'projects/mescc/zhp' (#98) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #98
2024-07-12 09:32:46 +08:00
‘937886381’
b45818e2a4 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-12 09:21:20 +08:00
‘937886381’
00a5a8ed34 修改bug 2024-07-12 09:20:51 +08:00
f51d786fd3 Merge pull request 'projects/mescc/zhp' (#97) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #97
2024-07-12 09:12:23 +08:00
‘937886381’
01464663fa Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-12 09:10:20 +08:00
‘937886381’
db393bec12 修改bug 2024-07-12 09:09:49 +08:00
59df1c16f6 Merge pull request 'projects/mescc/zhp' (#96) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #96
2024-07-12 09:02:10 +08:00
‘937886381’
2f2d3defd0 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-12 09:00:25 +08:00
‘937886381’
0b847d2903 修改bug 2024-07-12 08:59:59 +08:00
5b0bb2ccdb Merge pull request 'projects/mescc/zhp' (#95) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #95
2024-07-12 08:54:16 +08:00
‘937886381’
4d4feee160 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-12 08:52:14 +08:00
‘937886381’
8d370118aa 修改bug 2024-07-12 08:51:45 +08:00
3a5c2eeb2a Merge pull request '修改bug' (#94) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #94
2024-07-12 08:35:13 +08:00
‘937886381’
72f146394b 修改bug 2024-07-12 08:33:10 +08:00
53b10a9847 Merge pull request 'projects/mescc/zhp' (#93) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #93
2024-07-11 15:15:28 +08:00
‘937886381’
82a7a2b8cd 修改bug 2024-07-11 15:01:49 +08:00
‘937886381’
3e327277e9 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-11 14:50:34 +08:00
‘937886381’
06ab8159c5 修改ui 2024-07-11 14:49:48 +08:00
cdf0525fca Merge pull request 'projects/mescc/zhp' (#92) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #92
2024-07-11 14:36:34 +08:00
‘937886381’
0547133e35 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-11 14:34:40 +08:00
‘937886381’
11387724de 修改ui 2024-07-11 14:34:19 +08:00
fe6fb41e29 Merge pull request 'projects/mescc/zhp' (#91) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #91
2024-07-11 08:28:10 +08:00
‘937886381’
074432851c Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-10 15:46:53 +08:00
‘937886381’
8af5158a1b 修改bug 2024-07-10 15:46:21 +08:00
46743fa4ef Merge pull request 'projects/mescc/zhp' (#90) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #90
2024-07-10 15:26:27 +08:00
‘937886381’
91c352ff79 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-10 15:17:44 +08:00
‘937886381’
41748b740d 修改ui 2024-07-10 15:17:16 +08:00
8d524a71a6 Merge pull request 'projects/mescc/zhp' (#89) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #89
2024-07-10 10:01:27 +08:00
‘937886381’
4fa58b62fc 修改bug 2024-07-10 09:59:53 +08:00
‘937886381’
2d67ca4347 修改ui 2024-07-09 17:01:11 +08:00
‘937886381’
91ac125671 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-09 11:11:01 +08:00
‘937886381’
9ea2f2dbe3 修改bug 2024-07-09 11:10:38 +08:00
30e04d641f Merge pull request 'projects/mescc/zhp' (#88) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #88
2024-07-09 10:21:47 +08:00
‘937886381’
6f2f751b0e Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-09 10:20:17 +08:00
‘937886381’
96f7798708 导出 2024-07-09 10:19:54 +08:00
1aa2310adf Merge pull request 'projects/mescc/zhp' (#87) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #87
2024-07-08 16:57:02 +08:00
‘937886381’
63f4fd7cb5 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-08 16:55:21 +08:00
‘937886381’
72855a6f04 工单导出 2024-07-08 16:54:58 +08:00
b3bd3eea22 Merge pull request 'projects/mescc/zhp' (#86) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #86
2024-07-08 13:26:37 +08:00
‘937886381’
2c53c249af Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-08 13:25:52 +08:00
‘937886381’
f2d57a8ebb 修改ui 2024-07-08 13:25:28 +08:00
00ed35ed82 Merge pull request 'projects/mescc/zhp' (#85) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #85
2024-07-05 16:36:30 +08:00
‘937886381’
689de3173f Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-05 16:33:39 +08:00
‘937886381’
865698a9be 修改ui 2024-07-05 16:33:14 +08:00
798ea2d90d Merge pull request 'projects/mescc/zhp' (#84) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #84
2024-07-05 14:08:40 +08:00
‘937886381’
44f3ab3e99 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-05 14:06:39 +08:00
‘937886381’
3e025020ab 修改bug 2024-07-05 14:06:15 +08:00
d62015bfbb Merge pull request 'projects/mescc/zhp' (#83) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #83
2024-07-04 16:41:23 +08:00
‘937886381’
a7e89fe7e8 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-04 09:39:31 +08:00
‘937886381’
6cb91b2c4a 修改bug 2024-07-04 09:39:08 +08:00
165722d67d Merge pull request 'projects/mescc/zhp' (#82) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #82
2024-07-03 16:59:09 +08:00
‘937886381’
486cffd64e 解决冲突 2024-07-03 16:30:14 +08:00
‘937886381’
81c4af0cc8 修改ui 2024-07-03 16:28:41 +08:00
db113cdba9 Merge pull request 'projects/mescc/dy' (#81) from projects/mescc/dy into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #81
2024-07-03 08:52:56 +08:00
helloDy
af52db4a37 Merge branch 'projects/mescc/develop' into projects/mescc/dy 2024-07-03 08:52:07 +08:00
helloDy
e0ca435014 ui 2024-07-03 08:51:32 +08:00
affe8ec026 Merge pull request 'projects/mescc/zhp' (#80) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #80
2024-07-02 13:42:35 +08:00
‘937886381’
aa6ae82607 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-02 13:16:48 +08:00
‘937886381’
eee121e5ab 修改bui 2024-07-02 13:15:50 +08:00
4332113e3b Merge pull request 'projects/mescc/zhp' (#79) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #79
2024-07-01 20:34:09 +08:00
‘937886381’
53ba98b01a Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-01 15:28:12 +08:00
‘937886381’
23cf4aaa1e 修改bug 2024-07-01 15:27:49 +08:00
81a110ba45 Merge pull request 'projects/mescc/zhp' (#78) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #78
2024-07-01 14:58:13 +08:00
‘937886381’
a249e88530 修改bug 2024-07-01 14:40:09 +08:00
‘937886381’
2128538199 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-01 13:50:06 +08:00
‘937886381’
052d0704fd 修改bug 2024-07-01 13:49:30 +08:00
749b9c6576 Merge pull request 'projects/mescc/zhp' (#77) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #77
2024-07-01 12:10:22 +08:00
‘937886381’
3f942111b0 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-07-01 11:52:14 +08:00
‘937886381’
716c88dfc4 修改bug 2024-07-01 11:51:44 +08:00
ec0a99b5fb Merge pull request 'projects/mescc/zhp' (#76) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #76
2024-06-28 16:35:08 +08:00
‘937886381’
384527d6db Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-28 16:32:12 +08:00
‘937886381’
26cf9a6ce4 修改 2024-06-28 16:30:52 +08:00
5ba0b62ae6 Merge pull request 'projects/mescc/zhp' (#75) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #75
2024-06-28 16:12:04 +08:00
‘937886381’
5ac5da1bf5 修改 2024-06-28 16:03:42 +08:00
‘937886381’
99f5f978d4 修改 2024-06-28 15:35:28 +08:00
‘937886381’
04af70f416 修改bug 2024-06-28 14:55:12 +08:00
‘937886381’
242e42a56a Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-28 14:42:26 +08:00
‘937886381’
2ab541d4c1 修改bug 2024-06-28 14:41:50 +08:00
95d530e5f1 Merge pull request 'projects/mescc/zhp' (#74) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #74
2024-06-28 13:22:49 +08:00
‘937886381’
83b9867c2a Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-28 13:16:07 +08:00
‘937886381’
7b8f4cac21 修改bug 2024-06-28 13:15:43 +08:00
7886d5ad5a Merge pull request 'projects/mescc/zjl' (#73) from projects/mescc/zjl into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #73
2024-06-28 11:10:40 +08:00
b31b67d2ed Merge branch 'projects/mescc/develop' into projects/mescc/zjl 2024-06-28 11:09:49 +08:00
fc21359f8f 样式 2024-06-28 11:09:02 +08:00
be6d84daf5 Merge pull request 'projects/mescc/zjl' (#72) from projects/mescc/zjl into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #72
2024-06-27 16:57:47 +08:00
daaec2417c Merge branch 'projects/mescc/develop' into projects/mescc/zjl 2024-06-27 16:57:20 +08:00
dcf4f6c392 Merge pull request 'projects/mescc/zhp' (#71) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #71
2024-06-27 16:56:15 +08:00
d27e56cd7f 报表样式 2024-06-27 16:55:47 +08:00
‘937886381’
445ebe339d Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-27 15:47:28 +08:00
‘937886381’
353e3e0f35 修改bug 2024-06-27 15:47:07 +08:00
ea29a33c2a Merge pull request 'projects/mescc/dy' (#70) from projects/mescc/dy into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #70
2024-06-27 14:59:19 +08:00
helloDy
d5673f3c9f 工厂更改 2024-06-27 14:56:47 +08:00
helloDy
3064722052 Merge branch 'projects/mescc/develop' into projects/mescc/dy 2024-06-27 14:53:37 +08:00
helloDy
dfe52cbac5 工单管理详情ui 2024-06-27 14:53:11 +08:00
68e386333b Merge pull request 'projects/mescc/zhp' (#69) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #69
2024-06-27 14:43:32 +08:00
‘937886381’
96d55b5a57 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-27 13:59:29 +08:00
‘937886381’
fb74340f0f 修改滚动条样式及导出 2024-06-27 13:58:58 +08:00
b1ddfa5c0d Merge pull request 'projects/mescc/zhp' (#68) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #68
2024-06-27 09:29:54 +08:00
‘937886381’
f7b151f9aa Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-27 09:28:27 +08:00
‘937886381’
51938926d3 修改bug 2024-06-27 09:28:04 +08:00
588037c45c Merge pull request 'projects/mescc/zhp' (#67) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #67
2024-06-27 08:38:58 +08:00
‘937886381’
354031f119 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-26 16:56:44 +08:00
‘937886381’
44c5271b5a 修改bug 2024-06-26 16:56:22 +08:00
241810d1c8 Merge pull request 'projects/mescc/zhp' (#66) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #66
2024-06-26 15:53:43 +08:00
‘937886381’
92a297a5e9 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-26 15:19:10 +08:00
‘937886381’
f67e781146 修改bug 2024-06-26 15:18:38 +08:00
e310c5465e Merge pull request 'projects/mescc/zhp' (#65) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #65
2024-06-26 11:04:29 +08:00
‘937886381’
f2cfe94dfc 剞劂冲突 2024-06-26 11:00:48 +08:00
‘937886381’
92c0c33fbd 修改bug 2024-06-26 10:59:23 +08:00
0a391a4de5 Merge pull request 'projects/mescc/dy' (#64) from projects/mescc/dy into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #64
2024-06-25 14:40:13 +08:00
helloDy
8be57f586e Merge branch 'projects/mescc/develop' into projects/mescc/dy 2024-06-25 14:36:04 +08:00
helloDy
4e5a5f9ba2 2024-06-25 14:35:23 +08:00
a78c3d79f1 Merge pull request 'projects/mescc/dy' (#63) from projects/mescc/dy into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #63
2024-06-24 17:00:47 +08:00
helloDy
3c5163bd66 merge 2024-06-24 16:58:08 +08:00
helloDy
8437d52c1b bug 2024-06-24 16:57:15 +08:00
ca0a0142db Merge pull request 'projects/mescc/zjl' (#62) from projects/mescc/zjl into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #62
2024-06-24 13:33:08 +08:00
703334ac3c mt 2024-06-24 13:32:34 +08:00
3897f35d28 Merge pull request 'projects/mescc/zhp' (#61) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #61
2024-06-24 13:30:57 +08:00
3c6e408074 Merge branch 'projects/mescc/develop' into projects/mescc/zjl 2024-06-24 13:27:57 +08:00
a9392c8999 1 2024-06-24 13:27:09 +08:00
‘937886381’
196a615f61 修改bug 2024-06-24 10:44:21 +08:00
‘937886381’
8395f37371 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-24 10:39:42 +08:00
‘937886381’
5e703350e1 修改bug 2024-06-24 10:39:10 +08:00
266604878b Merge pull request 'projects/mescc/zhp' (#60) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #60
2024-06-24 09:50:07 +08:00
‘937886381’
0c2221b373 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-24 09:48:30 +08:00
‘937886381’
0992940655 修改bug 2024-06-24 09:48:06 +08:00
7e1b0f8725 Merge pull request 'projects/mescc/zjl' (#59) from projects/mescc/zjl into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #59
2024-06-24 09:17:14 +08:00
8f8d0396b7 Merge branch 'projects/mescc/develop' into projects/mescc/zjl 2024-06-24 09:16:37 +08:00
582484f6db 时间 2024-06-24 09:15:51 +08:00
b259cdb545 Merge pull request 'projects/mescc/zjl' (#58) from projects/mescc/zjl into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #58
2024-06-21 16:21:40 +08:00
b6aa6a19f4 Merge branch 'projects/mescc/develop' into projects/mescc/zjl 2024-06-21 16:21:02 +08:00
a9e176be74 1 2024-06-21 16:20:14 +08:00
a237c66901 Merge pull request 'projects/mescc/zhp' (#57) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #57
2024-06-21 16:19:01 +08:00
‘937886381’
c7205e32a3 报表 2024-06-21 16:17:25 +08:00
‘937886381’
b180bac226 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-21 16:05:33 +08:00
‘937886381’
670d7e5600 报表 2024-06-21 16:04:50 +08:00
69b3e7de2e Merge pull request 'projects/mescc/zhp' (#56) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #56
2024-06-21 10:42:43 +08:00
‘937886381’
0eb17fa08b 报表 2024-06-20 20:54:34 +08:00
‘937886381’
cc800eae5d Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-20 20:38:45 +08:00
‘937886381’
6be1a83dd8 报表 2024-06-20 20:38:11 +08:00
033d61ea96 Merge pull request 'projects/mescc/zjl' (#55) from projects/mescc/zjl into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #55
2024-06-20 17:10:00 +08:00
4fb88a5201 Merge branch 'projects/mescc/develop' into projects/mescc/zjl 2024-06-20 17:08:51 +08:00
0e60ba7dc8 1 2024-06-20 17:07:57 +08:00
1969cd3ada Merge pull request 'projects/mescc/dy' (#54) from projects/mescc/dy into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #54
2024-06-20 16:58:00 +08:00
helloDy
510f12e40b Merge branch 'projects/mescc/develop' into projects/mescc/dy 2024-06-20 16:54:45 +08:00
helloDy
7a67da105f bug 2024-06-20 16:54:14 +08:00
6c145579cb Merge pull request '1' (#53) from projects/mescc/zjl into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #53
2024-06-20 16:52:26 +08:00
e512ad5858 1 2024-06-20 16:51:44 +08:00
a7b13c6a8f Merge pull request 'projects/mescc/zjl' (#52) from projects/mescc/zjl into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #52
2024-06-20 15:25:01 +08:00
0655eafb1d Merge branch 'projects/mescc/develop' into projects/mescc/zjl 2024-06-20 15:24:20 +08:00
ce350c0c7f 剩余报表 2024-06-20 15:23:05 +08:00
abfd20bac6 Merge pull request 'projects/mescc/zjl' (#51) from projects/mescc/zjl into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #51
2024-06-19 16:52:26 +08:00
7ba831f496 Merge branch 'projects/mescc/develop' into projects/mescc/zjl 2024-06-19 16:51:33 +08:00
78d387b2c6 1 2024-06-19 16:50:44 +08:00
‘937886381’
15d3b3622c Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-19 16:26:17 +08:00
‘937886381’
c8bc54e04b 报表 2024-06-19 16:25:50 +08:00
a5d0970fa0 Merge pull request 'projects/mescc/dy' (#50) from projects/mescc/dy into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #50
2024-06-19 16:07:14 +08:00
helloDy
2368916e62 merge 2024-06-19 16:06:12 +08:00
helloDy
2d5bd161f3 生产数据管理 2024-06-19 16:04:42 +08:00
ff424ca1b6 Merge pull request '对接报表' (#49) from projects/mescc/zjl into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #49
2024-06-19 16:01:50 +08:00
9de0dfc639 对接报表 2024-06-19 16:01:13 +08:00
fc0a97a9c6 Merge pull request 'projects/mescc/zjl' (#48) from projects/mescc/zjl into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #48
2024-06-19 08:50:56 +08:00
45538e80c4 mt 2024-06-19 08:50:24 +08:00
6233ca4dca Merge pull request 'projects/mescc/zhp' (#47) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #47
2024-06-18 16:03:14 +08:00
‘937886381’
41d554f897 修改bug 2024-06-18 15:55:48 +08:00
‘937886381’
d95853dec2 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-18 10:25:39 +08:00
‘937886381’
eacf93e0db 修改bug 2024-06-18 10:25:13 +08:00
1e941180b0 Merge pull request 'projects/mescc/dy' (#46) from projects/mescc/dy into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #46
2024-06-18 08:49:31 +08:00
helloDy
7f379f2589 Merge branch 'projects/mescc/develop' into projects/mescc/dy 2024-06-18 08:48:31 +08:00
helloDy
e990680159 bug 2024-06-18 08:47:53 +08:00
d6cb371c68 Merge pull request 'projects/mescc/zhp' (#45) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #45
2024-06-18 08:46:50 +08:00
‘937886381’
731243636f Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-17 17:00:11 +08:00
‘937886381’
14c782f112 修改 2024-06-17 16:59:41 +08:00
2b3db710c1 Merge pull request 'projects/mescc/zhp' (#44) from projects/mescc/zhp into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #44
2024-06-17 15:36:53 +08:00
‘937886381’
0ef7c9808c Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-17 15:35:14 +08:00
‘937886381’
f241a35252 修改 2024-06-17 15:34:37 +08:00
e9d17e0f82 Merge pull request 'projects/mescc/dy' (#43) from projects/mescc/dy into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #43
2024-06-17 09:19:57 +08:00
helloDy
e1e39681ce merge 2024-06-17 09:01:58 +08:00
helloDy
2d49bfe10e bug 2024-06-17 09:00:07 +08:00
6bd65b19f9 Merge pull request 'projects/mescc/zhp' (#42) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #42
2024-06-14 10:22:16 +08:00
‘937886381’
03dd862cb4 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-14 10:18:46 +08:00
‘937886381’
f14e9d7408 修改bug 2024-06-14 10:18:20 +08:00
137 changed files with 14634 additions and 4678 deletions

View File

@@ -1,7 +1,7 @@
### ###
# @Author: zhp # @Author: zhp
# @Date: 2024-04-28 13:42:51 # @Date: 2024-04-28 13:42:51
# @LastEditTime: 2024-06-11 08:33:19 # @LastEditTime: 2024-07-26 10:50:10
# @LastEditors: zhp # @LastEditors: zhp
# @Description: # @Description:
### ###
@@ -13,13 +13,19 @@ VUE_APP_TITLE = 发电玻璃智能管控平台
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://192.168.1.70:30307' # VUE_APP_BASE_API = 'http://192.168.1.70:30307'
# VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com' VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com'
VUE_APP_BASE_API = 'http://192.168.1.56:48080' # 闫阳
# VUE_APP_BASE_API = 'http://192.168.1.81:48080'
# 徐
# VUE_APP_BASE_API = 'http://192.168.1.56:48080'
# 郭
# VUE_APP_BASE_API = 'http://192.168.1.61:48080'
# sara # sara
# VUE_APP_BASE_API = 'http://192.168.1.63:48080' # VUE_APP_BASE_API = 'http://192.168.1.63:8080'
# 张一丁 # 张一丁
# VUE_APP_BASE_API = 'http://192.168.4.139:48080' # VUE_APP_BASE_API = 'http://192.168.4.139:48080'
# 蔡
# VUE_APP_BASE_API = 'http://192.168.1.54:48080'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@@ -1,32 +1,24 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2024-04-26 14:53:45 * @Date: 2024-04-26 14:53:45
* @LastEditTime: 2024-05-06 14:55:33 * @LastEditTime: 2024-07-26 09:32:26
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
*/ */
import request from '@/utils/request' import request from '@/utils/request'
export function getCostMainPage(data) {
// 查询部门列表
export function getOrderList(data) {
return request({ return request({
url: 'ip/prod-order/prodOrderList', url: 'ip/cost-main/page',
method: 'post',
data: data
})
}
export function getCostPage(data) {
return request({
url: 'ip/cost/costPage',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function getCostList(data) { export function exportExcel(data) {
return request({ return request({
url: 'ip/cost/costList', url: 'ip/cost-main/export-excel',
method: 'post', method: 'post',
data: data data: data,
responseType: 'blob'
}) })
} }

View File

@@ -1,7 +1,7 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2024-05-07 08:54:59 * @Date: 2024-05-07 08:54:59
* @LastEditTime: 2024-06-03 08:52:02 * @LastEditTime: 2024-06-19 15:22:10
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
*/ */
@@ -10,23 +10,33 @@ import request from '@/utils/request'
// 查询生产数据管理分页 // 查询生产数据管理分页
export function getProduceDataPage(data) { export function getProduceDataPage(data) {
return request({ return request({
url: 'ip/prod-output/prodOutputDataPage', url: '/ip/proddata/page',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function getProduceDataDetail(id){ // 查询图数据
export function getproddata(data) {
return request({ return request({
url: '/ip/prod-output/get?id=' + id, url: '/ip/proddata/list',
method: 'get' method: 'post',
data: data
})
}
export function getProduceDataDetail(data){
return request({
url: '/ip/proddata/get',
method: 'post',
data: data
}) })
} }
// 导出生产数据 // 导出生产数据
export function exportOutPutExcel(data) { export function exportOutPutExcel(data) {
return request({ return request({
url: '/ip/prod-output/output-export-excel', url: '/ip/proddata/export-excel',
method: 'post', method: 'post',
data: data, data: data,
responseType: 'blob' responseType: 'blob'

View File

@@ -1,6 +1,115 @@
// 对标报表的接口 // 对标报表的接口
import request from '@/utils/request' import request from '@/utils/request'
// 产量对标FTO
export function fTOReportByDateRangePage(data) {
return request({
url: '/ip/prod-output/queryOBFTOReportByDateRange',
method: 'post',
data: data
})
}
// 产量对标FTO导出
export function fTOReportByDateRangeExport(data) {
return request({
url: '/ip/prod-output/queryOBFTOReportByDateRangeExcel',
method: 'post',
responseType: 'blob',
data: data
})
}
// 芯片产量对标
export function cPReportByDateRangePage(data) {
return request({
url: '/ip/prod-output/queryCPReportByDateRange',
method: 'post',
data: data
})
}
// 芯片产量对标导出
export function cPReportByDateRangeExport(data) {
return request({
url: '/ip/prod-output/queryCPReportByDateRangeExport',
method: 'post',
responseType: 'blob',
data: data
})
}
// 标准组件产量对标
export function sCPReportByDateRangePage(data) {
return request({
url: '/ip/prod-output/querySCPReportByDateRange',
method: 'post',
data: data
})
}
// 标准组件产量对标导出
export function sCPReportByDateRangeExport(data) {
return request({
url: '/ip/prod-output/querySCPReportByDateRangeExport',
method: 'post',
responseType: 'blob',
data: data
})
}
// 转化效率对标
export function componentconvertrateCPage(data) {
return request({
url: '/ip/componentconvertrate-compare/page',
method: 'post',
data: data
})
}
// 转化效率对标导出
export function componentconvertrateCExport(data) {
return request({
url: '/ip/componentconvertrate-compare/export-excel',
method: 'post',
responseType: 'blob',
data: data
})
}
// 芯片良率对标
export function chipyieldRatePage(data) {
return request({
url: '/ip/chipyield-rate/page',
method: 'post',
data: data
})
}
// 芯片良率对标导出
export function chipyieldRateExport(data) {
return request({
url: '/ip/chipyield-rate/export-excel',
method: 'post',
responseType: 'blob',
data: data
})
}
// 标准组件良率对标
export function componentyieldRatePage(data) {
return request({
url: '/ip/componentyield-rate/page',
method: 'post',
data: data
})
}
// 标准组件良率对标导出
export function componentyieldRateExport(data) {
return request({
url: '/ip/componentyield-rate/export-excel',
method: 'post',
responseType: 'blob',
data: data
})
}
// 稼动率对标 // 稼动率对标
export function utilzationComparePage(data) { export function utilzationComparePage(data) {
return request({ return request({
@@ -35,4 +144,76 @@ export function chipoeeCompareExport(data) {
responseType: 'blob', responseType: 'blob',
data: data data: data
}) })
}
// 封装OEE对标
export function componentOEEPage(data) {
return request({
url: '/ip/component-oee/page',
method: 'post',
data: data
})
}
// 封装OEE对标导出
export function componentOEEExport(data) {
return request({
url: '/ip/component-oee/export',
method: 'post',
responseType: 'blob',
data: data
})
}
// 芯片人均产量
export function chipAnnualAverageProductionPage(data) {
return request({
url: '/ip/chip-annual-average-production/page',
method: 'post',
data: data
})
}
// 芯片人均产量导出
export function chipAnnualAverageProductionExport(data) {
return request({
url: '/ip/chip-annual-average-production/export',
method: 'post',
responseType: 'blob',
data: data
})
}
// 标准组件人均产量对标
export function componentAapPage(data) {
return request({
url: '/ip/prod-output/componentAap',
method: 'post',
data: data
})
}
// 标准组件人均产量对标导出
export function componentAapExport(data) {
return request({
url: '/ip/prod-output/componentAap-export',
method: 'post',
responseType: 'blob',
data: data
})
}
// 指标完成情况对标
export function targetCompletionPage(data) {
return request({
url: '/ip/prod-output/TargetCompletion',
method: 'post',
data: data
})
}
// 指标完成情况对标导出
export function targetCompletionExport(data) {
return request({
url: '/ip/prod-output/TargetCompletion-export',
method: 'post',
responseType: 'blob',
data: data
})
} }

95
src/api/report/index.js Normal file
View File

@@ -0,0 +1,95 @@
/*
* @Author: zhp
* @Date: 2024-06-17 09:41:03
* @LastEditTime: 2024-06-20 15:39:21
* @LastEditors: zhp
* @Description:
*/
import request from '@/utils/request'
export function getComprehensiveDataPage(data) {
return request({
url: 'ip/comprehensive/data/get/comprehensive/data',
method: 'post',
data: data
})
}
export function exportComprehensiveDataPage(data) {
return request({
url: 'ip/comprehensive/data/export/comprehensive/data',
method: 'post',
data: data,
responseType: 'blob',
})
}
export function getProduceTransData(data) {
return request({
url: 'ip/prod-output/queryYCEReportByDateRange',
method: 'post',
data: data
})
}
export function exportProduceTransData(data) {
return request({
url: 'ip/prod-output/queryYCEReportByDateRangeExcel',
method: 'post',
data: data,
responseType: 'blob',
})
}
export function getProduceSituationData(data) {
return request({
url: 'ip/production/situation/get/production/situation',
method: 'post',
data: data
})
}
export function exportProduceSituationData(data) {
return request({
url: 'ip/production/situation/export/production/situation',
method: 'post',
data: data,
responseType: 'blob',
})
}
export function getProductionSituationMWData(data) {
return request({
url: 'ip/production/situation/power/get/production/situation',
method: 'post',
data: data
})
}
export function exportProductionSituationMWData(data) {
return request({
url: 'ip/production/situation/power/export/production/situation',
method: 'post',
data: data,
responseType: 'blob',
})
}
export function getProductionYieldSituationMWData(data) {
return request({
url: 'ip/product/yield/get/production/situation',
method: 'post',
data: data
})
}
export function exportProductionYieldSituationMWData(data) {
return request({
url: 'ip/product/yield/export/production/situation',
method: 'post',
data: data,
responseType: 'blob',
})
}

View File

@@ -1,15 +1,24 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2024-04-28 09:28:12 * @Date: 2024-04-28 09:28:12
* @LastEditTime: 2024-04-28 15:52:36 * @LastEditTime: 2024-07-25 15:05:43
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
*/ */
import request from '@/utils/request' import request from '@/utils/request'
export function getStockPage(data) { export function getStockRealTimePage(data) {
return request({ return request({
url: 'ip/stock/page', url: 'ip/stock-realtime/page',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function exportExcel(data) {
return request({
url: '/ip/stock-realtime/export-excel',
method: 'get',
data: data,
responseType: 'blob'
})
}

View 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="01数字驾驶舱" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="产量驾驶舱" transform="translate(-1438.000000, -12.000000)" fill="#FFFFFF" fill-rule="nonzero">
<g id="编组-20" transform="translate(1438.000000, 8.000000)">
<g id="编组" transform="translate(0.000000, 4.000000)">
<rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
<path d="M11.1710783,2.42919989 C11.7298936,2.09409047 12.4328291,2.12455473 12.9654367,2.52059014 L20.3218013,7.99000647 L20.4665209,8.10559268 C21.0744501,8.62656431 21.4302636,9.40344805 21.4302636,10.227099 L21.4302636,19.0470569 L21.4250327,19.2212289 C21.3382831,20.6611171 20.1833875,21.8011882 18.7715031,21.8011882 L5.2284969,21.8011882 L5.06035624,21.7957697 C3.67032883,21.7059084 2.56973638,20.5095861 2.56973638,19.0470569 L2.56973638,10.2273587 L2.57600507,10.0381789 C2.63012926,9.22282649 3.03207443,8.47038558 3.67819781,7.99000711 L11.034559,2.52059336 Z M12.0713092,3.55793652 C11.9772762,3.53774358 11.8769764,3.55793433 11.7954857,3.6185066 L4.43911542,9.0879271 L4.32641124,9.18150853 C4.04059293,9.44596068 3.87451485,9.82573182 3.87451485,10.2273587 L3.87451485,19.0470569 L3.880713,19.1821318 C3.94632222,19.8933667 4.52470053,20.4496068 5.2284969,20.4496068 L11.2507497,20.4487759 L11.3507364,20.3451977 L11.3512202,14.4627186 L11.3582338,14.3683764 C11.4044406,14.0603828 11.6734228,13.8227675 12,13.8227675 C12.3345637,13.8227675 12.6123182,14.0734451 12.6454705,14.3976012 L12.6489183,14.4681588 L12.6487364,20.3451881 L12.7487231,20.4487759 L18.7714898,20.4496068 L18.9018895,20.4431864 C19.5885066,20.3752237 20.1254851,19.7760987 20.1254851,19.0470569 L20.1254851,10.2273587 L20.1177907,10.0779557 C20.0769951,9.68325297 19.8759128,9.32208831 19.5608746,9.08791971 L12.2045243,3.61851399 L12.1402672,3.58065321 Z" id="形状结合" stroke="#FFFFFF" stroke-width="0.1"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="26px" height="26px" viewBox="0 0 26 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 15</title>
<g id="03设备管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="工单管理" transform="translate(-714.000000, -131.000000)">
<g id="编组-15" transform="translate(714.000000, 131.000000)">
<g id="编组-13备份" fill="#0B58FF" opacity="0.227236793">
<rect id="矩形备份-2" x="0" y="0" width="26" height="26" rx="6"></rect>
</g>
<g id="公司" transform="translate(4.749735, 4.749735)" fill-rule="nonzero">
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16.50053" height="16.50053"></rect>
<path d="M11.933204,3.46511501 L11.933204,1 C11.933204,0.44771525 11.4854888,-1.01453063e-16 10.933204,0 L7.7088886,0 L7.7088886,0 C3.83109495,0 0.687522083,3.16186639 0.687522083,7.06222625 L0.687522083,15.50053 C0.687522083,16.0528147 1.13523733,16.50053 1.68752208,16.50053 L14.8130079,16.50053 C15.3652927,16.50053 15.8130079,16.0528147 15.8130079,15.50053 L15.8130079,6.45996015 L15.8130079,6.45996015 L11.933204,3.46511501 Z M10.8812851,15.4709239 L1.80917527,15.4709239 L1.80917527,6.9505448 C1.81175925,3.6815283 4.55432163,1.03209261 7.93823277,1.02960612 L10.8812851,1.02960612 L10.8812851,15.4709239 Z M14.8298514,15.4709239 L11.9257773,15.4709239 L11.9257773,5.179727 L14.850314,7.12879718 L14.8298514,15.4709239 Z M3.75976827,9.04329837 L8.75976827,9.04329837 L8.75976827,10.3766317 L3.75976827,10.3766317 L3.75976827,9.04329837 Z M3.75976827,6.3766317 L8.75976827,6.3766317 L8.75976827,7.70996504 L3.75976827,7.70996504 L3.75976827,6.3766317 Z" id="形状" fill="#0B58FF"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="26px" height="26px" viewBox="0 0 26 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 13</title>
<g id="03设备管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="工单管理" transform="translate(-474.000000, -131.000000)">
<g id="编组-13" transform="translate(474.000000, 131.000000)">
<rect id="矩形备份-2" fill="#66DD89" opacity="0.227236793" x="0" y="0" width="26" height="26" rx="6"></rect>
<g id="机床、加工中心" transform="translate(3.000000, 3.000000)" fill-rule="nonzero">
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="20" height="20"></rect>
<path d="M18.1818304,15.1909171 L18.1818304,2.5 C18.1818304,2.22385763 17.9579728,2 17.6818304,2 L2.7272736,2 C2.45113122,2 2.2272736,2.22385763 2.2272736,2.5 L2.2272736,10.195451 C2.2272736,10.3084167 2.31885035,10.3999934 2.431816,10.3999934 C2.54478165,10.3999934 2.63635841,10.4915702 2.63635841,10.6045358 L2.63635841,10.999993 C2.63635841,11.3313636 2.90498735,11.5999925 3.23635794,11.5999925 L3.24999521,11.5999925 C3.58889745,11.5999925 3.86363201,11.8747271 3.86363201,12.2136293 L3.86363201,12.7909094 C3.86363201,13.016846 4.04678981,13.2000037 4.2727264,13.2000037 C4.498663,13.2000037 4.6818208,13.016846 4.6818208,12.7909094 L4.6818208,12.2136293 C4.6818208,11.8747271 4.95655535,11.5999925 5.2954576,11.5999925 L5.30909486,11.5999925 C5.64046546,11.5999925 5.9090944,11.3313636 5.9090944,10.999993 L5.9090944,10.6045358 C5.9090944,10.4915702 6.00067115,10.3999934 6.1136368,10.3999934 C6.22660245,10.3999934 6.3181792,10.3084167 6.3181792,10.195451 L6.3181792,6.5 C6.3181792,6.22385763 6.54203683,6 6.8181792,6 L12.772736,6 C13.0488784,6 13.272736,6.22385763 13.272736,6.5 L13.272736,15.1000019 C13.272736,15.3761442 13.0488784,15.6000019 12.772736,15.6000019 L11.7272736,15.6000019 C11.4511312,15.6000019 11.2272736,15.3761442 11.2272736,15.1000019 L11.2272736,14.8000009 C11.2272736,14.3581726 10.869101,14 10.4272727,14 L8.75453855,14 C8.31271023,14 7.95453761,14.3581726 7.95453761,14.8000009 L7.95453761,15.1000019 C7.95453761,15.3761442 7.73067998,15.6000019 7.45453761,15.6000019 L6.4090944,15.6000019 C6.13295202,15.6000019 5.9090944,15.3761442 5.9090944,15.1000019 L5.9090944,14.8000009 C5.9090944,14.3581726 5.55092178,14 5.10909346,14 L3.43635934,14 C2.99453103,14 2.63635841,14.3581726 2.63635841,14.8000009 L2.63635841,15.1000019 C2.63635841,15.3761442 2.41250078,15.6000019 2.13635841,15.6000019 L1.8181792,15.6000019 C1.36631131,15.6000019 1,15.9663132 1,16.4181811 L1,17.5 C1,17.7761424 1.22385763,18 1.5,18 L18.5,18 C18.7761424,18 19,17.7761424 19,17.5 L19,16.0090867 C19,15.7831554 18.8168465,15.6000019 18.5909152,15.6000019 C18.3649839,15.6000019 18.1818304,15.4168484 18.1818304,15.1909171 Z M5.0909056,10.8000056 L3.4545472,10.8000056 L3.4545472,10.3999934 L5.0909056,10.3999934 L5.0909056,10.8000056 Z M5.49999041,6.20000375 L5.49999041,9.60000656 L5.49999041,9.60000656 L3.04544321,9.60000656 L3.04544321,2.80000562 L17.3636416,2.80000562 L17.3636416,15.6000019 L14.0909056,15.6000019 L14.0909056,6.20000375 C14.0909056,5.647719 13.6431904,5.20000375 13.0909056,5.20000375 L6.49999041,5.20000375 C5.94770566,5.20000375 5.49999041,5.647719 5.49999041,6.20000375 Z M8.7727264,14.7999963 L10.4090848,14.7999963 L10.4090848,15.6000019 L8.7727264,15.6000019 L8.7727264,14.7999963 Z M3.4545472,14.7999963 L5.0909056,14.7999963 L5.0909056,15.6000019 L3.4545472,15.6000019 L3.4545472,14.7999963 Z M18.1818304,17.1999944 L1.81816962,17.1999944 L1.81816962,16.3999888 L18.1818304,16.3999888 L18.1818304,17.1999944 Z M12.0454528,4.00000469 C12.0440427,4.28673847 12.1996755,4.55228735 12.4534043,4.69605646 C12.707133,4.83982557 13.0201502,4.83982557 13.2738789,4.69605646 C13.5276077,4.55228735 13.6832405,4.28673847 13.6818304,4.00000469 C13.6832405,3.71327091 13.5276077,3.44772202 13.2738789,3.30395291 C13.0201502,3.1601838 12.707133,3.1601838 12.4534043,3.30395291 C12.1996755,3.44772202 12.0440427,3.71327091 12.0454528,4.00000469 L12.0454528,4.00000469 Z M5.49999041,3.60001125 L11.2272736,3.60001125 L11.2272736,4.39999813 L5.49999041,4.39999813 L5.49999041,3.60001125 Z M15.3181792,11.5999925 L16.136368,11.5999925 L16.136368,14.7999963 L15.3181792,14.7999963 L15.3181792,11.5999925 Z M15.3181792,9.19999438 L16.136368,9.19999438 L16.136368,10.8000056 L15.3181792,10.8000056 L15.3181792,9.19999438 Z M15.3181792,6.79999625 L16.136368,6.79999625 L16.136368,8.4000075 L15.3181792,8.4000075 L15.3181792,6.79999625 Z" id="形状" fill="#43B866"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
src/assets/images/map.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 MiB

View File

@@ -232,6 +232,8 @@ aside {
background-color: #d9d9d9; background-color: #d9d9d9;
} }
// 大屏滚动表格
.no-data-bg { .no-data-bg {
position: absolute; position: absolute;
display: inline-block; display: inline-block;
@@ -252,3 +254,13 @@ aside {
letter-spacing: 1px; letter-spacing: 1px;
} }
} }
.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;
}

View File

@@ -1,11 +1,13 @@
<template> <template>
<el-breadcrumb class="app-breadcrumb" separator="/"> <el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb"> <transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path"> <el-breadcrumb-item v-for=" (item, index) in levelList" :key="item.path">
<span v-if="item.redirect === 'noRedirect' || index === levelList.length - 1" class="no-redirect">{{ <span :style="{ color: (changeColor == true ? 'rgba(255, 255, 255, 0.45)' :' rgba(0, 0, 0, .65)')}"
item.meta.title v-if="item.redirect === 'noRedirect' || index === levelList.length - 1" class="no-redirect">{{
}}</span> item.meta.title
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a> }}</span>
<a :style="{ color: (changeColor == true ? 'rgba(255, 255, 255, 0.45)' :' rgba(0, 0, 0, .45)')}" v-else
@click.prevent="handleLink(item)">{{ item.meta.title }}</a>
</el-breadcrumb-item> </el-breadcrumb-item>
</transition-group> </transition-group>
</el-breadcrumb> </el-breadcrumb>
@@ -18,7 +20,29 @@ export default {
levelList: null levelList: null
} }
}, },
computed: {
changeColor() {
// console.log(this.$route);
if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
return true
} else {
return false
}
}
},
watch: { watch: {
changeColor(val) {
if (val == true) {
let item = document.getElementsByClassName('el-breadcrumb__separator')
// let item =document.getElementsByClassName('')
item[0].style.color = rgba(255, 255, 255, 0.45)
item[1].style.color = rgba(255, 255, 255, 0.45)
} else {
let item = document.getElementsByClassName('el-breadcrumb__separator')
item[0].style.color = ''
item[1].style.color = ''
}
},
$route(route) { $route(route) {
// if you go to the redirect page, do not update the breadcrumbs // if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith('/redirect/')) { if (route.path.startsWith('/redirect/')) {
@@ -70,13 +94,20 @@ export default {
margin-left: 8px; margin-left: 8px;
.no-redirect { .no-redirect {
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, .45);
cursor: text; cursor: text;
} }
} }
.app-breadcrumb .el-breadcrumb__inner a, .app-breadcrumb .el-breadcrumb__inner a,
.el-breadcrumb__inner.is-link { .el-breadcrumb__inner.is-link {
color: rgba(0, 0, 0, 0.45); color:rgba(0, 0, 0, 0.65)
} }
</style> </style>
<!-- <style lang="scss">
.changeColor {
--theme-color: rgba(255, 255, 255, 0.45);
}
.el-breadcrumb__separator {
color:var(--theme-color);
}
</style> -->

View File

@@ -1,14 +1,16 @@
<!--
* @Author: zhp
* @Date: 2024-06-03 15:38:31
* @LastEditTime: 2024-07-22 16:15:21
* @LastEditors: zhp
* @Description:
-->
<template> <template>
<div style="padding: 0 15px;" @click="toggleClick"> <div style="padding: 0 15px;" @click="toggleClick">
<svg <svg :class="{'is-active':isActive}" class="hamburger" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"
:class="{'is-active':isActive}" width="64" height="64" :fill="changeColor === true ? 'rgba(255, 255, 255,.65)' : '' ">
class="hamburger" <path
viewBox="0 0 1024 1024" d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
xmlns="http://www.w3.org/2000/svg"
width="64"
height="64"
>
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
</svg> </svg>
</div> </div>
</template> </template>
@@ -22,6 +24,15 @@ export default {
default: false default: false
} }
}, },
computed: {
changeColor() {
if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
return true
} else {
return false
}
},
},
methods: { methods: {
toggleClick() { toggleClick() {
this.$emit('toggleClick') this.$emit('toggleClick')

View File

@@ -1,6 +1,7 @@
<template> <template>
<div class="navbar"> <div ref="navbar" class="navbar"
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" :style="changeColor ? 'background: rgba(0, 21, 41, 1);boxShadow:0px 1px 8px 0px rgba(0,131,255,0.35);' : ''">
<hamburger style="margin-left: 20px;" id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
@toggleClick="toggleSideBar" /> @toggleClick="toggleSideBar" />
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" /> <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
@@ -41,6 +42,13 @@ export default {
'nickname', 'nickname',
'device' 'device'
]), ]),
changeColor() {
if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
return true
} else {
return false
}
},
setting: { setting: {
get() { get() {
return this.$store.state.settings.showSettings return this.$store.state.settings.showSettings
@@ -58,6 +66,23 @@ export default {
} }
} }
}, },
watch: {
// changeColor: {
// handler(val){
// if (val == true) {
// let svg = document.getElementsByClassName('hamburger')
// console.log('svg', svg)
// svg[0].style.color = 'rgba(255, 255, 255, 1)'
// svg[0].setAttribute('fill', 'rgba(255, 255, 255, 1)')
// } else {
// let svg = document.getElementsByClassName('hamburger')
// console.log('svg', svg);
// svg[0].setAttribute('fill', '')
// }
// },
// immediate: true, //立即执行
// }
},
methods: { methods: {
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch('app/toggleSideBar')

View File

@@ -1,25 +1,31 @@
<template> <template>
<div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'"> <div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'">
<div class="home-icon" v-if='blackTitle'> <div class="home-icon" v-if='blackTitle'>
<svg-icon icon-class="home" style="font-size: 24px; cursor: pointer;" @click="toHome" /> <svg-icon :icon-class="changeColor === true ? 'darkHome' : 'home'"
style="font-size: 24px; cursor: pointer;color: aqua;" @click="toHome" />
</div> </div>
<div class="time-msg"> <div class="time-msg">
<div class="line1">{{ timeZone }}&nbsp;&nbsp;&nbsp;&nbsp;{{ topTime }}</div> <div class="line1" :style="changeColor === true ? 'color:rgba(255, 255, 255, 1)' : ''">{{ timeZone
<div class="line2">{{ topDate }}</div> }}&nbsp;&nbsp;&nbsp;&nbsp;{{ topTime }}</div>
<div :style="changeColor === true ? 'color:rgba(255, 255, 255, .65)' : ''" class="line2">{{ topDate }}</div>
</div> </div>
<div class="base-msg"> <div class="base-msg">
<div class="avatar"> <div class="avatar">
<el-dropdown> <el-dropdown>
<img :src="require(`../../assets/images/choicepart/avatar.png`)" alt="" width="32" height="32" /> <img :src="require(`../../assets/images/choicepart/avatar.png`)" alt="" width="32" height="32" />
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item><svg-icon icon-class="helpbtn" />帮助文档</el-dropdown-item> <el-dropdown-item>
<el-dropdown-item @click.native="logout"><svg-icon icon-class="exitbtn" />退出登录</el-dropdown-item> <svg-icon icon-class="helpbtn" />帮助文档
</el-dropdown-item>
<el-dropdown-item @click.native="logout">
<svg-icon icon-class="exitbtn" />退出登录
</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
<div class="use-msg"> <div class="use-msg">
<div class="line1">{{ nickname }}</div> <div :style="changeColor === true ? 'color:rgba(255, 255, 255, 1)' : ''" class="line1">{{ nickname }}</div>
<div class="line2">{{ dept }}</div> <div :style="changeColor === true ? 'color:rgba(255, 255, 255, .65)' : ''" class="line2">{{ dept }}</div>
</div> </div>
</div> </div>
</div> </div>
@@ -48,6 +54,15 @@ export default {
} }
} }
}, },
computed: {
changeColor() {
if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
return true
} else {
return false
}
},
},
created() { created() {
// this.getUserMsg() // this.getUserMsg()
this.getTime() this.getTime()
@@ -124,4 +139,4 @@ export default {
opacity: 0.65; opacity: 0.65;
} }
} }
</style> </style>

View File

@@ -1,3 +1,10 @@
<!--
* @Author: zhp
* @Date: 2024-06-03 15:38:31
* @LastEditTime: 2024-07-04 10:44:35
* @LastEditors: zhp
* @Description:
-->
<template> <template>
<el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.native.prevent="handleScroll"> <el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.native.prevent="handleScroll">
<slot /> <slot />
@@ -17,7 +24,9 @@ export default {
computed: { computed: {
scrollWrapper() { scrollWrapper() {
return this.$refs.scrollContainer.$refs.wrap return this.$refs.scrollContainer.$refs.wrap
} },
},
watch: {
}, },
mounted() { mounted() {
this.scrollWrapper.addEventListener('scroll', this.emitScroll, true) this.scrollWrapper.addEventListener('scroll', this.emitScroll, true)

View File

@@ -1,5 +1,7 @@
<template> <template>
<div id="tags-view-container" class="tags-view-container"> <div ref="tagsViewContainer"
:style="changeColor === true ? 'background:rgba(0, 21, 41, 1);borderTop:0px solid #d8dce5' : ''" id="tags-view-container"
class="tags-view-container">
<scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll"> <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
<router-link v-for="tag in visitedViews" ref="tag" :key="tag.path" :class="isActive(tag) ? 'active' : ''" <router-link v-for="tag in visitedViews" ref="tag" :key="tag.path" :class="isActive(tag) ? 'active' : ''"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" tag="span" class="tags-view-item" :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" tag="span" class="tags-view-item"
@@ -36,6 +38,13 @@ export default {
} }
}, },
computed: { computed: {
changeColor() {
if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
return true
} else {
return false
}
},
visitedViews() { visitedViews() {
return this.$store.state.tagsView.visitedViews return this.$store.state.tagsView.visitedViews
}, },
@@ -44,9 +53,31 @@ export default {
}, },
theme() { theme() {
return this.$store.state.settings.theme; return this.$store.state.settings.theme;
} },
}, },
watch: { watch: {
changeColor(val) {
if (val == true) {
// console.log('this.$refs.tagsViewContainer', this.$refs.tagsViewContainer);
// this.$refs.tagsViewContainer.style.backgroundColor = 'rgba(0, 21, 41, 1)'
// this.$refs.tagsViewContainer.style.borderTop = '0px solid #d8dce5'
var tag = document.getElementsByClassName("tags-view-item")
console.log('tag', tag)
for (let i in tag) {
tag[i].classList.add("changeColor")
// tag[i].classList.remove("default")
}
// console.log('this.$refs.scrollContainer', this.$refs.tag);
} else {
// this.$refs.tagsViewContainer.style.backgroundColor = ''
// this.$refs.tagsViewContainer.style.borderTop = '1px solid #d8dce5'
var tag = document.getElementsByClassName("tags-view-item")
for (let i in tag) {
tag[i].classList.remove("changeColor")
// tag[i].classList.add("default")
}
}
},
$route() { $route() {
this.addTags() this.addTags()
this.moveToCurrentTag() this.moveToCurrentTag()
@@ -60,6 +91,7 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(this.$route, this.changeColor);
this.initTags() this.initTags()
this.addTags() this.addTags()
}, },
@@ -68,11 +100,23 @@ export default {
return route.path === this.$route.path return route.path === this.$route.path
}, },
activeStyle(tag) { activeStyle(tag) {
if (!this.isActive(tag)) return {}; if (this.changeColor) {
return { if (!this.isActive(tag)) return {
"background-color": this.theme, "background-color": 'rgba(0, 59, 115, 1)',
"border-color": this.theme "border-color": 'rgba(0, 59, 115, 1)',
}; "color": 'rgba(255, 255, 255, 1)'
};
return {
"background-color": this.theme,
"border-color": this.theme
};
} else {
if (!this.isActive(tag)) return {};
return {
"background-color": this.theme,
"border-color": this.theme
};
}
}, },
isAffix(tag) { isAffix(tag) {
return tag.meta && tag.meta.affix return tag.meta && tag.meta.affix
@@ -230,6 +274,14 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// :root{
// --theme-color: rgba(0, 0, 0, 0.45);
// --theme-background: #f4f4f4ff;
// }
.changeColor{
--theme-background: rgba(0, 59, 115, 1);
--theme-color: rgba(255, 255, 255, 1);
}
.tags-view-container { .tags-view-container {
height: 42px; height: 42px;
width: 100%; width: 100%;
@@ -245,8 +297,8 @@ export default {
cursor: pointer; cursor: pointer;
height: 28px; height: 28px;
line-height: 28px; line-height: 28px;
color: rgba(0, 0, 0, 0.45); color: var(--theme-color,rgba(0, 0, 0, 0.45));
background: #F4F4F4FF; background:var(--theme-background,#f4f4f4ff);
padding: 0 8px 0 12px; padding: 0 8px 0 12px;
font-size: 14px; font-size: 14px;
letter-spacing: 1px; letter-spacing: 1px;
@@ -331,7 +383,7 @@ export default {
.el-icon-close { .el-icon-close {
&:hover { &:hover {
background-color: #fff; background-color: #fff;
color: #409eff; color: rgba(62, 142, 247, 1);
} }
} }
} }

View File

@@ -2,7 +2,8 @@
<div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }"> <div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" /> <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar v-if="!sidebar.hide" class="sidebar-container" /> <sidebar v-if="!sidebar.hide" class="sidebar-container" />
<div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container"> <div :style="changeColor ? 'background: rgba(0, 21, 41, 1)' : ''" ref="mainContainer"
:class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }"> <div :class="{ 'fixed-header': fixedHeader }">
<navbar /> <navbar />
<tags-view v-if="needTagsView" /> <tags-view v-if="needTagsView" />
@@ -39,6 +40,13 @@ export default {
needTagsView: state => state.settings.tagsView, needTagsView: state => state.settings.tagsView,
fixedHeader: state => state.settings.fixedHeader fixedHeader: state => state.settings.fixedHeader
}), }),
changeColor() {
if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
return true
} else {
return false
}
},
classObj() { classObj() {
return { return {
hideSidebar: !this.sidebar.opened, hideSidebar: !this.sidebar.opened,
@@ -51,6 +59,16 @@ export default {
return variables; return variables;
} }
}, },
watch: {
// changeColor(val) {
// if (val == true) {
// // console.log('this.$refs.mainContainer', this.$refs.mainContainer);
// this.$refs.mainContainer.style.backgroundColor = 'rgba(0, 21, 41, 1)'
// } else {
// this.$refs.mainContainer.style.backgroundColor = ''
// }
// },
},
methods: { methods: {
handleClickOutside() { handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })

View File

@@ -1,12 +1,12 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2024-04-12 11:13:06 * @Date: 2024-04-12 11:13:06
* @LastEditTime: 2024-04-12 16:20:31 * @LastEditTime: 2024-07-26 09:31:09
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
*/ */
import Vue from 'vue' import Vue from 'vue'
import Element from 'element-ui' import Element, { DatePicker } from 'element-ui'
// 修改如下样式文件,覆盖样式,或者新增样式文件 // 修改如下样式文件,覆盖样式,或者新增样式文件
import "./assets/styles/element-variables.scss"; import "./assets/styles/element-variables.scss";
@@ -44,7 +44,7 @@ import {
} from "@/utils/dict"; } from "@/utils/dict";
import CodeBrickZj from 'code-brick-zj'; import CodeBrickZj from 'code-brick-zj';
import "./theme/index.css"; // 自定义主题包 - code-brick-zj import "./theme/index.css"; // 自定义主题包 - code-brick-zj
// Vue.component(Select.name, Select)
// 全局方法挂载 // 全局方法挂载
Vue.prototype.getDicts = getDicts; Vue.prototype.getDicts = getDicts;
Vue.prototype.parseTime = parseTime; Vue.prototype.parseTime = parseTime;
@@ -68,7 +68,8 @@ Vue.component("RightToolbar", RightToolbar);
import DictTag from "@/components/DictTag"; import DictTag from "@/components/DictTag";
// 头部标签插件 // 头部标签插件
import VueMeta from "vue-meta"; import VueMeta from "vue-meta";
// import locale from './views/cost/zh'; // 请根据实际路径修改
// Vue.use(ElementUI, { locale });
Vue.use(directive) Vue.use(directive)
Vue.use(plugins) Vue.use(plugins)
Vue.use(VueMeta) Vue.use(VueMeta)

View File

@@ -9,13 +9,9 @@ function __resizeHandler(entries) {
: entry.contentBoxSize; : entry.contentBoxSize;
this.chart_mixin_chartInstance.resize({ this.chart_mixin_chartInstance.resize({
// width: // width:
// contentBoxSize.inlineSize < this.MIN_WIDTH // contentBoxSize.inlineSize < this.MIN_WIDTH
// ? this.MIN_WIDTH // ? this.MIN_WIDTH
// : contentBoxSize.inlineSize, // : contentBoxSize.inlineSize,
// width:
// entry.contentRect.width < this.MIN_WIDTH
// ? this.MIN_WIDTH
// : entry.contentRect.width,
height: contentBoxSize.blockSize, height: contentBoxSize.blockSize,
}); });
} else { } else {

View File

@@ -92,7 +92,7 @@ const actions = {
/** 初始化首页数据 */ /** 初始化首页数据 */
async initHome({ commit }) { async initHome({ commit }) {
const dataArr = await getHomeInfo(); const dataArr = await getHomeInfo();
console.log('dataArr', dataArr); // console.log('dataArr', dataArr);
let preData = dataArr.previousProdOutputOutDO let preData = dataArr.previousProdOutputOutDO
let preFtoData = dataArr.previousProdOutputFtoDO let preFtoData = dataArr.previousProdOutputFtoDO
// const targetArr = await getHomeInfo(); // const targetArr = await getHomeInfo();
@@ -127,7 +127,7 @@ const actions = {
// const payload = handler(factoryData) // const payload = handler(factoryData)
// commit("SET_COPILOT_INFO", { type, payload }); // commit("SET_COPILOT_INFO", { type, payload });
// } else { // } else {
console.log('factoryList',factoryList) // console.log('factoryList',factoryList)
let factoryData = factoryList.prodOutputOutDO ? factoryList.prodOutputOutDO : factoryList.prodOutputRateDO let factoryData = factoryList.prodOutputOutDO ? factoryList.prodOutputOutDO : factoryList.prodOutputRateDO
let preData = factoryList.previousProdOutputOutDO ? factoryList.previousProdOutputOutDO : factoryList.previousProdOutputRateDO let preData = factoryList.previousProdOutputOutDO ? factoryList.previousProdOutputOutDO : factoryList.previousProdOutputRateDO
let preFtoData = factoryList.previousProdOutputFtoDO ? factoryList.previousProdOutputFtoDO : [] let preFtoData = factoryList.previousProdOutputFtoDO ? factoryList.previousProdOutputFtoDO : []
@@ -289,7 +289,7 @@ function splitCurrentAndPreviousB(factoryListResponse) {
} }
function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) { function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) {
console.log('工厂',targetListResponse); // console.log('工厂',preData);
// 初始数据 // 初始数据
const { chipOeeRate, transformRate, chipRate, stdRate } = initA(); const { chipOeeRate, transformRate, chipRate, stdRate } = initA();
@@ -343,17 +343,24 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
// componentYieldRate: 0.73, // componentYieldRate: 0.73,
// }, // },
// ]; // ];
if (preData && preData[0] != null) { if (preData) {
for (const factory of preData) { for (const factory of preData) {
const fId = getPreFactoryId(factory); const fId = getPreFactoryId(factory)
// console.log('factory',factory.previousYearOee);
// chipInvest.previous[fId] = factory.previousYearInputNumber; // chipInvest.previous[fId] = factory.previousYearInputNumber;
// chipOeeRate.current[fId] = factory.oee; // chipOeeRate.current[fId] = factory.oee;
chipOeeRate.previous[fId] = factory.previousYearOee; if (factory.previousGlassType === 0) {
chipOeeRate.previous[fId] = factory.previousYearOee;
}
// chipOeeRate.previous[fId] = factory.previousYearOee;
// 转化效率 // 转化效率
transformRate.previous[fId] =factory.previousYearComponentConversionEfficiency ; if (factory.previousGlassType === 1) {
transformRate.previous[fId] = factory.previousYearComponentConversionEfficiency;
}
// transformRate.previous[fId] =factory.previousYearComponentConversionEfficiency ;
// 芯片良率 与 标准组件良率 // 芯片良率 与 标准组件良率
if (![0, 1].includes(factory.glassType)) continue; if (![0, 1].includes(factory.previousGlassType)) continue;
const _t = [chipRate, stdRate][factory.glassType] const _t = [chipRate, stdRate][factory.previousGlassType]
// _t.current[fId] = factory.yieldRate ; // _t.current[fId] = factory.yieldRate ;
_t.previous[fId] = factory.previousYearYieldRate ; _t.previous[fId] = factory.previousYearYieldRate ;
// } // }
@@ -378,10 +385,14 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
transformRate.target[fId] = componentConversionEfficiency transformRate.target[fId] = componentConversionEfficiency
} }
// 芯片OEE // 芯片OEE
chipOeeRate.current[fId] = factory.oee; if (factory.glassType === 0) {
chipOeeRate.current[fId] = factory.oee;
}
// chipOeeRate.previous[fId] = factory.previousYearOee; // chipOeeRate.previous[fId] = factory.previousYearOee;
// 转化效率 // 转化效率
transformRate.current[fId] = factory.componentConversionEfficiency; if (factory.glassType === 1) {
transformRate.current[fId] = factory.componentConversionEfficiency;
}
// transformRate.previous[fId] = factory.previousYearComponentConversionEfficiency ; // transformRate.previous[fId] = factory.previousYearComponentConversionEfficiency ;
// 芯片良率 与 标准组件良率 // 芯片良率 与 标准组件良率
if (![0, 1].includes(factory.glassType)) continue; if (![0, 1].includes(factory.glassType)) continue;
@@ -389,6 +400,7 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
_t.current[fId] = factory.yieldRate ; _t.current[fId] = factory.yieldRate ;
// _t.previous[fId] = factory.previousYearYieldRate ; // _t.previous[fId] = factory.previousYearYieldRate ;
} }
// console.log('chipOeeRate',stdRate);
// console.log('chipOeeRate',chipOeeRate); // console.log('chipOeeRate',chipOeeRate);
return { return {
chipOeeRate, chipOeeRate,
@@ -400,12 +412,12 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
} }
function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) { function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) {
console.log('prodOutputFtoListRes',preFtoData); // console.log('prodOutputFtoListRes',preFtoData);
// 初始数据 // 初始数据
const { chipInvest, ftoInvest, chipOutput, stdOutput, bipvOutput } = init() const { chipInvest, ftoInvest, chipOutput, stdOutput, bipvOutput } = init()
if (prodOutputFtoListRes) { if (prodOutputFtoListRes.length !== 0 ) {
for (const factory of prodOutputFtoListRes) { for (const factory of prodOutputFtoListRes) {
console.log(factory); // console.log(factory);
const fId = getFactoryId(factory); const fId = getFactoryId(factory);
// const preFId = getPreFactoryId(factory); // const preFId = getPreFactoryId(factory);
// if (fId) { // if (fId) {
@@ -418,7 +430,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
} }
if (preFtoData) { if (preFtoData) {
for (const factory of preFtoData) { for (const factory of preFtoData) {
console.log(factory); // console.log(factory);
const fId = getPreFactoryId(factory); const fId = getPreFactoryId(factory);
// const preFId = getPreFactoryId(factory); // const preFId = getPreFactoryId(factory);
// if (fId) { // if (fId) {
@@ -429,10 +441,13 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
// } // }
} }
} }
if (preData && preData[0] != null) { if (preData) {
for (const factory of preData) { for (const factory of preData) {
const fId = getPreFactoryId(factory); const fId = getPreFactoryId(factory);
chipInvest.previous[fId] = factory.previousYearInputNumber; if (factory.previousGlassType === 0) {
chipInvest.previous[fId] = factory.previousYearInputNumber
}
// chipInvest.previous[fId] = factory.previousYearInputNumber;
if (![0, 1, 2].includes(factory.previousGlassType)) continue; if (![0, 1, 2].includes(factory.previousGlassType)) continue;
const _t = [chipOutput, stdOutput, bipvOutput][factory.previousGlassType]; const _t = [chipOutput, stdOutput, bipvOutput][factory.previousGlassType];
// if (fId) { // if (fId) {
@@ -445,11 +460,14 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
} }
} }
// console.log('ftoInvest',ftoInvest) // console.log('ftoInvest',ftoInvest)
if (factoryListResponse && factoryListResponse[0] != null) { if (factoryListResponse) {
for (const factory of factoryListResponse) { for (const factory of factoryListResponse) {
const fId = getFactoryId(factory); const fId = getFactoryId(factory);
// console.log('factory.inputNumber', factory, fId);
if (factory.glassType === 0) {
chipInvest.current[fId] = factory.inputNumber
}
// const preFId = getPreFactoryId(factory); // const preFId = getPreFactoryId(factory);
// 获取目标值 // 获取目标值
if (targetListResponse) { if (targetListResponse) {
const { chipYield, componentYield, bipvProductOutput } = const { chipYield, componentYield, bipvProductOutput } =
@@ -459,7 +477,6 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
bipvOutput.target[fId] = bipvProductOutput; bipvOutput.target[fId] = bipvProductOutput;
} }
// 芯片投入 // 芯片投入
chipInvest.current[fId] = factory.inputNumber;
// 产出数据, 0 - (玻璃)芯片产出, 1 - 标准组件产出, 2 - BIPV产出 // 产出数据, 0 - (玻璃)芯片产出, 1 - 标准组件产出, 2 - BIPV产出
// 因为后端写的垃圾数据,所以这里要做一下判断 // 因为后端写的垃圾数据,所以这里要做一下判断
@@ -467,6 +484,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
const _t = [chipOutput, stdOutput, bipvOutput][factory.glassType]; const _t = [chipOutput, stdOutput, bipvOutput][factory.glassType];
_t.current[fId] = factory.outputNumber; _t.current[fId] = factory.outputNumber;
} }
// console.log('chipInvest',ftoInvest);
return { return {
chipInvest, chipInvest,
// ftoInvest, // ftoInvest,
@@ -475,15 +493,6 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
stdOutput, stdOutput,
bipvOutput, bipvOutput,
}; };
}else{
return {
chipInvest,
// ftoInvest,
ftoInvest,
chipOutput,
stdOutput,
bipvOutput,
}
} }
} }
@@ -542,15 +551,15 @@ function getFactoryTargetValueA(targetList, factoryId) {
*/ */
function initA() { function initA() {
const t_ = { const t_ = {
current: Array(7).fill(0), current: Array(2).fill(0),
previous: Array(7).fill(0), previous: Array(2).fill(0),
}; };
// 芯片OEE // 芯片OEE
// 转化效率 // 转化效率
// 标准组件良率 // 标准组件良率
const stdRate = { const stdRate = {
...deepClone(t_), ...deepClone(t_),
target: Array(7).fill(0), target: Array(2).fill(0),
}; };
// 芯片良率 // 芯片良率
const transformRate = deepClone(stdRate); const transformRate = deepClone(stdRate);
@@ -570,8 +579,8 @@ function initA() {
*/ */
function init() { function init() {
const t_ = { const t_ = {
current: Array(7).fill(0), current: Array(2).fill(0),
previous: Array(7).fill(0), previous: Array(2).fill(0),
}; };
// 芯片投入 // 芯片投入
const chipInvest = deepClone(t_); const chipInvest = deepClone(t_);
@@ -580,7 +589,7 @@ function init() {
// 芯片产出 // 芯片产出
const chipOutput = { const chipOutput = {
...deepClone(t_), ...deepClone(t_),
target: Array(7).fill(0), target: Array(2).fill(0),
}; };
// 标准组件产出 // 标准组件产出
const stdOutput = deepClone(chipOutput); const stdOutput = deepClone(chipOutput);

View File

@@ -163,4 +163,4 @@ textarea {
.el-upload__tip { .el-upload__tip {
line-height: 1.2; line-height: 1.2;
} }

View File

@@ -143,6 +143,8 @@ export const tyjxfactoryList =[
// 暂时只有瑞昌邯郸数据 // 暂时只有瑞昌邯郸数据
export const factoryList =['瑞昌中建材光电材料有限公司', '邯郸中建材光电材料有限公司'] export const factoryList =['瑞昌中建材光电材料有限公司', '邯郸中建材光电材料有限公司']
export const factoryListabbr =['瑞昌', '邯郸']
export const factoryArray =[ export const factoryArray =[
{ {
name: '瑞昌中建材光电材料有限公司', name: '瑞昌中建材光电材料有限公司',

View File

@@ -1,8 +1,16 @@
<!-- <!--
* @Author: zhp
* @Date: 2024-07-10 15:17:28
* @LastEditTime: 2024-07-23 17:03:42
* @LastEditors: zhp
* @Description:
-->
<!--
filename: ChartContainer.vue filename: ChartContainer.vue
author: liubin author: liubin
date: 2024-04-10 08:54:33 date: 2024-04-10 08:54:33
description: description:
todo: 驾驶舱和首页的 ChartContainer, 实现滑动条 和动态宽高 todo: 驾驶舱和首页的 ChartContainer, 实现滑动条 和动态宽高
--> -->
@@ -19,7 +27,7 @@ export default {
props: { props: {
noScroll: { noScroll: {
type: Boolean, type: Boolean,
default: false, default: true,
}, },
}, },
data() { data() {

View File

@@ -9,7 +9,7 @@
<chart-container class="bar-chart-base"> <chart-container class="bar-chart-base">
<div class="legend"> <div class="legend">
<span v-for="item in legend" :key="item.label" class="legend-item" <span v-for="item in legend" :key="item.label" class="legend-item"
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span> :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
</div> </div>
<div ref="chart" style="height:94%;width:100%"></div> <div ref="chart" style="height:94%;width:100%"></div>
</chart-container> </chart-container>
@@ -62,7 +62,36 @@ export default {
top: "15%", top: "15%",
containLabel: true, containLabel: true,
}, },
tooltip: {}, tooltip: {
trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter: params => {
var res = `<span style='color:rgba(255,255,255,0.85);display:inline-block;margin-bottom:8px;'>${params[0].axisValueLabel}</span>`;
for (var i = 0, l = params.length; i < l; i++) {
let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
// console.log(item.color, color);
res +=
"<br/>" +
`<span style='border-radius:2px;display:inline-block;margin-right:4px;width:12px;height:12px;background-color:${color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;letter-spacing: 2px;'>${params[i].seriesName}</span>` +
`<span style='display:inline-block;width:60px;color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;text-align: right;'>${params[i].value ? params[i].value : 0}</span>`;
}
const htmlContent = `
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
${res}
</div>
`;
return htmlContent;
},
},
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false, show: false,
@@ -73,24 +102,24 @@ export default {
}, },
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
data: this.xAxis, data: this.xAxis,
}, },
yAxis: { yAxis: {
name: "单位/片", name: "单位/片",
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
align: "right", align: "right",
}, },
axisTick: { axisTick: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
axisLine: { axisLine: {
show: true, show: true,
@@ -100,7 +129,7 @@ export default {
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: "#4561AE", color: "rgba(69,97,174,.4)",
}, },
}, },
}, },
@@ -108,7 +137,7 @@ export default {
{ {
name: "", // this.series[0].name, name: "", // this.series[0].name,
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
itemStyle: { itemStyle: {
borderRadius: [10, 10, 0, 0], borderRadius: [10, 10, 0, 0],
color: { color: {
@@ -143,7 +172,7 @@ export default {
{ {
name: "", // this.series[1].name, name: "", // this.series[1].name,
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
// tooltip: { // tooltip: {
// valueFormatter: function (value) { // valueFormatter: function (value) {
// return value + " ml"; // return value + " ml";
@@ -188,19 +217,19 @@ export default {
this.canvasReset() this.canvasReset()
}, },
isFullscreen(val) { isFullscreen(val) {
this.actualOptions.series.map((item) => { this.options.series.map((item) => {
item.barWidth = val ? 18 : 12; item.barWidth = val ? 18 : 16;
}); });
this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; this.options.xAxis.axisLabel.fontSize = val ? 18 : 16;
this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; this.options.yAxis.axisLabel.fontSize = val ? 18 : 16;
this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; this.options.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
this.initChart(this.actualOptions); this.initChart(this.options);
// this.actualOptions.series.map((item) => { // this.actualOptions.series.map((item) => {
// item.barWidth = val ? 18 : 12; // item.barWidth = val ? 18 : 16;
// }); // });
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
// this.initChart(this.actualOptions); // this.initChart(this.actualOptions);
this.canvasReset() this.canvasReset()
}, },
@@ -209,14 +238,14 @@ export default {
this.initChart(this.options); this.initChart(this.options);
return; return;
} }
const actualOptions = JSON.parse(JSON.stringify(this.options)); // const actualOptions = JSON.parse(JSON.stringify(this.options));
console.log('actualOptions', this.options) // console.log('actualOptions', this.options)
actualOptions.series[0].data = val[0].data; this.options.series[0].data = val[0].data;
actualOptions.series[0].name = val[0].name; this.options.series[0].name = val[0].name;
actualOptions.series[1].data = val?.[1]?.data || []; this.options.series[1].data = val?.[1]?.data || [];
actualOptions.series[1].name = val?.[1]?.name || ""; this.options.series[1].name = val?.[1]?.name || "";
this.actualOptions = actualOptions; // this.actualOptions = actualOptions;
this.initChart(actualOptions); this.initChart(this.options);
}, },
}, },
mounted() { mounted() {
@@ -225,7 +254,7 @@ export default {
this.isFullscreen = screenfull.isFullscreen; this.isFullscreen = screenfull.isFullscreen;
}); });
} }
this.actualOptions = this.options // this.actualOptions = this.options
this.canvasReset(); this.canvasReset();
window.addEventListener("resize", this.canvasReset); window.addEventListener("resize", this.canvasReset);
}, },
@@ -249,7 +278,7 @@ export default {
this.chart.dispose(); this.chart.dispose();
} }
this.chart = echarts.init(this.$refs.chart); this.chart = echarts.init(this.$refs.chart);
this.chart.setOption(this.actualOptions); this.chart.setOption(this.options);
}, },
}, },
}; };

View File

@@ -1,8 +1,15 @@
<!-- <!--
* @Author: zhp
* @Date: 2024-06-03 15:38:31
* @LastEditTime: 2024-07-24 10:29:26
* @LastEditors: zhp
* @Description:
-->
<!--
filename: ChartContainer.vue filename: ChartContainer.vue
author: liubin author: liubin
date: 2024-04-10 08:54:33 date: 2024-04-10 08:54:33
description: description:
todo: 驾驶舱和首页的 ChartContainer, 实现滑动条 和动态宽高 todo: 驾驶舱和首页的 ChartContainer, 实现滑动条 和动态宽高
--> -->
@@ -19,7 +26,7 @@ export default {
props: { props: {
noScroll: { noScroll: {
type: Boolean, type: Boolean,
default: false, default: true,
}, },
}, },
data() { data() {

View File

@@ -8,9 +8,7 @@
<template> <template>
<div class="copilot-container"> <div class="copilot-container">
<!-- refresh btn --> <!-- refresh btn -->
<button <button v-if="0" style="
v-if="0"
style="
appearance: none; appearance: none;
outline: none; outline: none;
border: none; border: none;
@@ -20,22 +18,11 @@
position: absolute; position: absolute;
top: 8px; top: 8px;
right: 8px; right: 8px;
" " @click="$emit('refresh')">
@click="$emit('refresh')" <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
> style="width: 24px; height: 24px">
<svg <path stroke-linecap="round" stroke-linejoin="round"
xmlns="http://www.w3.org/2000/svg" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg> </svg>
</button> </button>
<!-- decoration --> <!-- decoration -->
@@ -44,19 +31,13 @@
<div v-if="side == 'left'" class="corner bl"></div> <div v-if="side == 'left'" class="corner bl"></div>
<div v-if="side == 'right'" class="corner br"></div> <div v-if="side == 'right'" class="corner br"></div>
<!-- content --> <!-- content -->
<div <div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
class="container-head" <Icon style="margin-left: 16px;" :icon="icon"></Icon>
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
</div> </div>
<div <div class="container-body" :class="[
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left', side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]" ]">
>
<slot /> <slot />
</div> </div>
</div> </div>
@@ -92,6 +73,7 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.copilot-container { .copilot-container {
height: 0; height: 0;
flex: 1; flex: 1;
@@ -141,7 +123,7 @@ export default {
gap: 8px; gap: 8px;
.container-title { .container-title {
font-size: 1.18vw; font-size: 1vw;
line-height: 1.39vw; line-height: 1.39vw;
font-weight: normal; font-weight: normal;
letter-spacing: 2px; letter-spacing: 2px;
@@ -161,8 +143,8 @@ export default {
position: absolute; position: absolute;
// width: 16px; // width: 16px;
// height: 16px; // height: 16px;
width: 0.95vw; width: 0.7vw;
height: 0.95vw; height: 0.7vw;
} }
.corner.tl { .corner.tl {

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-28 13:42:51 * @Date: 2024-04-28 13:42:51
* @LastEditTime: 2024-05-07 16:54:54 * @LastEditTime: 2024-07-09 16:55:58
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -61,8 +61,8 @@ export default {
.container-icon { .container-icon {
// width: 32px; // width: 32px;
// height: 32px; // height: 32px;
width: 1.701vw; width: 1.4vw;
height: 1.701vw; height: 1.4vw;
background: #ccc2; background: #ccc2;
} }
</style> </style>

View File

@@ -7,7 +7,7 @@
<template> <template>
<div class="copilot-header"> <div class="copilot-header">
<section class="menu"> <section class="menu left">
<CopilotButton v-for="i in ['产量', '效率']" :key="i" :label="i" :active="i === active" <CopilotButton v-for="i in ['产量', '效率']" :key="i" :label="i" :active="i === active"
@click="() => $emit('update:active', i)" /> @click="() => $emit('update:active', i)" />
<div class="type-name"></div> <div class="type-name"></div>
@@ -15,7 +15,7 @@
@click="() => $emit('update:than', i)" /> @click="() => $emit('update:than', i)" />
</section> </section>
<div class="page-title">{{ active }}驾驶舱</div> <div class="page-title">{{ active }}驾驶舱</div>
<section class="menu" style="width: 24vw;float: right;"> <section class="menu right" style="width: 24vw;float: right;">
<CopilotButton v-for="i in ['日', '周', '月', '年']" :key="i" :label="i" :active="i === period" <CopilotButton v-for="i in ['日', '周', '月', '年']" :key="i" :label="i" :active="i === period"
@click="() => $emit('update:period', i)" /> @click="() => $emit('update:period', i)" />
<div class="btn-group"> <div class="btn-group">
@@ -132,7 +132,13 @@ export default {
justify-content: space-between; justify-content: space-between;
} }
.copilot-header > section { .copilot-header > .left {
width: 26vw;
display: flex;
align-items: center;
gap: 8px;
}
.copilot-header >.right {
width: 26vw; width: 26vw;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -184,7 +190,7 @@ export default {
/* top: 10px; */ /* top: 10px; */
} }
.page-title { .page-title {
width: 25vw; width: 26vw;
font-size: 54px; font-size: 54px;
line-height: 70px; line-height: 70px;
letter-spacing: 5px; letter-spacing: 5px;

View File

@@ -12,7 +12,7 @@
<div class="page-title">{{ companyName }}</div> <div class="page-title">{{ companyName }}</div>
<section class="menu2"> <section class="menu2">
<div class="btn-group"> <div class="btn-group">
<el-tooltip class="item" effect="dark" content="导出" placement="top"> <el-tooltip v-if="showPeriod" class="item" effect="dark" content="导出" placement="top">
<button type="button" class="export-btn" @click="handleExport" /> <button type="button" class="export-btn" @click="handleExport" />
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" :content="isFullscreen === false ? '退出全屏' : '全屏'" placement="top"> <el-tooltip class="item" effect="dark" :content="isFullscreen === false ? '退出全屏' : '全屏'" placement="top">
@@ -48,10 +48,20 @@ export default {
type: String, type: String,
}, },
}, },
watch: {
period(val) {
if (val != 1) {
this.showPeriod = true
} else {
this.showPeriod = false
}
}
},
data() { data() {
return { return {
isFullscreen: false, isFullscreen: false,
content:'全屏', content: '全屏',
showPeriod:false,
dataList: [ dataList: [
{ id: 1, name: "日" }, { id: 1, name: "日" },
{ id: 2, name: "周" }, { id: 2, name: "周" },
@@ -63,14 +73,20 @@ export default {
computed: {}, computed: {},
methods: { methods: {
handleExport() { handleExport() {
exportFactoryDataExcel({ // if (this.period != 1) {
factoryId: this.companyId, this.showPeriod = true
timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3, exportFactoryDataExcel({
compare: this.than === '同比' ? 1 : 2 factoryId: this.companyId,
}).then(response => { timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
this.$download.excel(response, `${this.companyName}生产数据.xls`); compare: this.than === '同比' ? 1 : 2
// this.exportLoading = false; }).then(response => {
}).catch(() => { }); this.$download.excel(response, `${this.companyName}生产数据.xls`);
// this.exportLoading = false;
}).catch(() => { });
// } else {
// this.showPeriod = false
// }
}, },
toggleFullScreen() { toggleFullScreen() {
this.isFullscreen = !this.isFullscreen; this.isFullscreen = !this.isFullscreen;
@@ -107,7 +123,7 @@ export default {
gap: 8px; gap: 8px;
} }
.factory-header > .menu2 { .factory-header > .menu2 {
width: 26vw; width: 20vw;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
@@ -138,14 +154,15 @@ export default {
} }
.page-title { .page-title {
flex: 1 1 auto; flex: 1;
font-size: 40px; font-size: 40px;
line-height: 70px; line-height: 70px;
justify-content: center;
letter-spacing: 5px; letter-spacing: 5px;
font-family: 优设标题黑; font-family: 优设标题黑;
color: #6db6ff; color: #6db6ff;
text-align: center; text-align: center;
user-select: none; user-select: none;
background: url(../../../assets/images/homeindex/page-title-two.png) 0 0 / 100% 100% no-repeat; background: url(../../../assets/images/homeindex/page-title-two.png) center no-repeat;
} }
</style> </style>

View File

@@ -0,0 +1,227 @@
<!--
* @Author: zhp
* @Date: 2024-07-09 15:07:50
* @LastEditTime: 2024-07-22 13:41:40
* @LastEditors: zhp
* @Description:
-->
<!--
* @Author: zhp
* @Date: 2024-06-05 09:43:51
* @LastEditTime: 2024-07-09 15:06:52
* @LastEditors: zhp
* @Description:
-->
<template>
<div class="copilot-container">
<!-- refresh btn -->
<button v-if="false" style="
appearance: none;
outline: none;
border: none;
background: none;
color: #fff;
cursor: pointer;
position: absolute;
top: 8px;
right: 8px;
" @click="$emit('refresh')">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
style="width: 24px; height: 24px">
<path stroke-linecap="round" stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
</svg>
</button>
<!-- decoration -->
<div class="corner tl"></div>
<div class="corner tr"></div>
<div class="corner bl"></div>
<div class="corner br"></div>
<!-- content -->
<div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
<Icon style="margin-left: 16px;" :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2>
</div>
<div class="container-body" :class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]">
<slot />
</div>
</div>
</template>
<script>
import ContainerIconVue from "./ContainerIcon.vue";
export default {
name: "DashboardContainer",
components: {
Icon: ContainerIconVue,
},
props: {
side: {
type: String,
default: "left",
},
icon: {
type: String,
default: "cube",
},
title: {
type: String,
default: "Default Title",
},
},
data() {
return {};
},
computed: {},
methods: {},
};
</script>
<style scoped lang="scss">
.copilot-container {
height: 0;
flex: 1;
display: flex;
flex-direction: column;
position: relative;
box-shadow: inset 0 0 20px 1px #fff1;
border-right: .13vw solid;
// border-image: linear-gradient(to bottom,transparent 10%,
// #024798 20%,
// transparent 90%) 1;
border-image: linear-gradient(to bottom, transparent 10%, rgba(5, 138, 237, 1) 30%, rgba(2, 82, 215, 0.24) 90%)1;
box-sizing: border-box;
backdrop-filter: blur(4px);
&::before {
content: "";
position: absolute;
display: inline-block;
height: 92%;
width: 0.13vw;
border-radius: 2px;
top: 0%;
left: 0;
background: radial-gradient(circle at center,
#1481fd 2%,
#024798 90%,
transparent);
z-index: 1;
}
&::after {
content: "";
position: absolute;
display: inline-block;
width: 90%;
height: 0.31415vh;
border-radius: 2px;
left: 8%;
bottom: 0;
background: linear-gradient(to right, transparent 60%, #4197f9 98%, transparent 98%);
z-index: 0;
}
.container-head {
// height: 40px;
height: 3.8vh;
padding: 8px;
display: flex;
align-items: center;
gap: 8px;
.container-title {
font-size: 1vw;
line-height: 1.39vw;
font-weight: normal;
letter-spacing: 2px;
}
}
.container-body {
padding: 12px;
display: flex;
flex-direction: column;
flex: 1;
height: 0;
}
.corner {
z-index: 1;
position: absolute;
// width: 16px;
// height: 16px;
width: 0.95vw;
height: 0.95vw;
}
.corner.tl {
border-top: 2px solid #0175dc;
border-left: 2px solid #0175dc;
top: 0;
left: 0;
}
.corner.tr {
top: 0;
right: 0;
border-top: 2px solid #0175dc;
border-right: 2px solid #0175dc;
}
.corner.bl {
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
bottom: 0;
left: 0;
// border-left: 10px solid #0175dc;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid transparent;
border-left: 0.532vw solid transparent;
border-bottom: .6vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid transparent;
}
.corner.br {
bottom: 0;
right: 0;
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
border-left: 0.532vw solid transparent;
border-bottom: 0.532vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid #0175dc;
// border-left: 10px solid transparent;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid #0175dc;
// transform: rotate(-90deg);
}
.gradient-to-right {
background: linear-gradient(to right, #0c3f68cc, transparent);
}
.gradient-to-left {
background: linear-gradient(to left, #0c3f68cc, transparent);
}
.body-gradient-to-right {
background: linear-gradient(to right, #0003, transparent);
}
.body-gradient-to-left {
background: linear-gradient(to left, #0003, transparent);
}
}
</style>

View File

@@ -0,0 +1,220 @@
<!--
filename: Container.vue
author: liubin
date: 2024-04-09 10:44:09
description:
-->
<template>
<div class="copilot-container">
<!-- refresh btn -->
<button v-if="false" style="
appearance: none;
outline: none;
border: none;
background: none;
color: #fff;
cursor: pointer;
position: absolute;
top: 8px;
right: 8px;
" @click="$emit('refresh')">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
style="width: 24px; height: 24px">
<path stroke-linecap="round" stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
</svg>
</button>
<!-- decoration -->
<div class="corner tl"></div>
<div class="corner tr"></div>
<div class="corner bl"></div>
<div class="corner br"></div>
<!-- content -->
<div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
<Icon style="margin-left: 16px;" :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2>
</div>
<div class="container-body" :class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]">
<slot />
</div>
</div>
</template>
<script>
import ContainerIconVue from "./ContainerIcon.vue";
export default {
name: "DashboardContainer",
components: {
Icon: ContainerIconVue,
},
props: {
side: {
type: String,
default: "left",
},
icon: {
type: String,
default: "cube",
},
title: {
type: String,
default: "Default Title",
},
},
data() {
return {};
},
computed: {},
methods: {},
};
</script>
<style scoped lang="scss">
.copilot-container {
height: 0;
flex: 1;
display: flex;
flex-direction: column;
position: relative;
box-shadow: inset 0 0 20px 1px #fff1;
border-right: .13vw solid;
// border-image: linear-gradient(to bottom,transparent 10%,
// #024798 20%,
// transparent 90%) 1;
border-image: linear-gradient(to bottom, transparent 10%, rgba(5, 138, 237, 1) 30%, rgba(2, 82, 215, 0.24) 90%)1;
box-sizing: border-box;
backdrop-filter: blur(4px);
&::before {
content: "";
position: absolute;
display: inline-block;
height: 92%;
width: 0.13vw;
border-radius: 2px;
top: 0%;
left: 0;
background: radial-gradient(circle at center,
#1481fd 2%,
#024798 90%,
transparent);
z-index: 1;
}
&::after {
content: "";
position: absolute;
display: inline-block;
width: 95%;
height: 0.31415vh;
border-radius: 2px;
right: 3%;
bottom: 0;
background: linear-gradient(to left, transparent 60%, #4197f9 98%, transparent 98%);
z-index: 0;
}
.container-head {
// height: 40px;
height: 3.8vh;
padding: 8px;
display: flex;
align-items: center;
gap: 8px;
.container-title {
font-size: 1vw;
line-height: 1.39vw;
font-weight: normal;
letter-spacing: 2px;
}
}
.container-body {
padding: 12px;
display: flex;
flex-direction: column;
flex: 1;
height: 0;
}
.corner {
z-index: 1;
position: absolute;
// width: 16px;
// height: 16px;
width: 0.95vw;
height: 0.95vw;
}
.corner.tl {
border-top: 2px solid #0175dc;
border-left: 2px solid #0175dc;
top: 0;
left: 0;
}
.corner.tr {
top: 0;
right: 0;
border-top: 2px solid #0175dc;
border-right: 2px solid #0175dc;
}
.corner.bl {
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
bottom: 0;
left: 0;
// border-left: 10px solid #0175dc;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid transparent;
border-left: 0.532vw solid #0175dc;
border-bottom: 0.532vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid transparent;
}
.corner.br {
bottom: 0;
right: 0;
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
// border-left: 10px solid transparent;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid #0175dc;
// transform: rotate(-90deg);
border-left: 0.532vw solid transparent;
border-bottom: .6vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid transparent;
}
.gradient-to-right {
background: linear-gradient(to right, #0c3f68cc, transparent);
}
.gradient-to-left {
background: linear-gradient(to left, #0c3f68cc, transparent);
}
.body-gradient-to-right {
background: linear-gradient(to right, #0003, transparent);
}
.body-gradient-to-left {
background: linear-gradient(to left, #0003, transparent);
}
}
</style>

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-28 13:42:51 * @Date: 2024-04-28 13:42:51
* @LastEditTime: 2024-05-31 13:26:32 * @LastEditTime: 2024-07-31 08:52:25
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -54,8 +54,8 @@ button {
background: #006acd40; background: #006acd40;
backdrop-filter: blur(3px); backdrop-filter: blur(3px);
text-align: center; text-align: center;
padding: 12px; padding: 16px 24px 16px 24px;
padding-left: 20px; padding-left: 32px;
color: #fff; color: #fff;
font-size: 18px; font-size: 18px;
letter-spacing: 10px; letter-spacing: 10px;
@@ -75,8 +75,8 @@ button {
.copilot-btn::after { .copilot-btn::after {
content: ""; content: "";
position: absolute; position: absolute;
width: 16px; width: 0.7vw;
height: 16px; height: 0.7vw;
top: 0; top: 0;
background: transparent; background: transparent;
border-style: solid; border-style: solid;

View File

@@ -0,0 +1,220 @@
<!--
* @Author: zhp
* @Date: 2024-07-09 15:15:00
* @LastEditTime: 2024-07-22 13:42:08
* @LastEditors: zhp
* @Description:
-->
<template>
<div class="copilot-container">
<!-- refresh btn -->
<button v-if="false" style="
appearance: none;
outline: none;
border: none;
background: none;
color: #fff;
cursor: pointer;
position: absolute;
top: 8px;
right: 8px;
" @click="$emit('refresh')">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
style="width: 24px; height: 24px">
<path stroke-linecap="round" stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
</svg>
</button>
<!-- decoration -->
<div class="corner tl"></div>
<div class="corner tr"></div>
<div class="corner bl"></div>
<div class="corner br"></div>
<!-- content -->
<div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
<Icon style="margin-left: 16px;" :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2>
</div>
<div class="container-body" :class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]">
<slot />
</div>
</div>
</template>
<script>
import ContainerIconVue from "./ContainerIcon.vue";
export default {
name: "DashboardContainer",
components: {
Icon: ContainerIconVue,
},
props: {
side: {
type: String,
default: "left",
},
icon: {
type: String,
default: "cube",
},
title: {
type: String,
default: "Default Title",
},
},
data() {
return {};
},
computed: {},
methods: {},
};
</script>
<style scoped lang="scss">
.copilot-container {
height: 0;
flex: 1;
display: flex;
flex-direction: column;
position: relative;
box-shadow: inset 0 0 20px 1px #fff1;
border-right: .13vw solid;
// border-image: linear-gradient(to bottom,transparent 10%,
// #024798 20%,
// transparent 90%) 1;
border-image: linear-gradient(to bottom, transparent 10%, rgba(5, 138, 237, 1) 30%, rgba(2, 82, 215, 0.24) 90%)1;
box-sizing: border-box;
backdrop-filter: blur(4px);
&::before {
content: "";
position: absolute;
display: inline-block;
height: 92%;
width: 0.13vw;
border-radius: 2px;
top: 0%;
left: 0;
background: radial-gradient(circle at center,
#1481fd 2%,
#024798 90%,
transparent);
z-index: 1;
}
&::after {
content: "";
position: absolute;
display: inline-block;
width: 90%;
height: 0.31415vh;
border-radius: 2px;
left: 10%;
bottom: 0;
background: linear-gradient(to right, transparent 60%, #4197f9 98%, transparent 98%);
z-index: 0;
}
.container-head {
// height: 40px;
height: 3.8vh;
padding: 8px;
display: flex;
align-items: center;
gap: 8px;
.container-title {
font-size: 1vw;
line-height: 1.39vw;
font-weight: normal;
letter-spacing: 2px;
}
}
.container-body {
padding: 12px;
display: flex;
flex-direction: column;
flex: 1;
height: 0;
}
.corner {
z-index: 1;
position: absolute;
// width: 16px;
// height: 16px;
width: 0.7vw;
height: 0.7vw;
}
.corner.tl {
border-top: 2px solid #0175dc;
border-left: 2px solid #0175dc;
top: 0;
left: 0;
}
.corner.tr {
top: 0;
right: 0;
border-top: 2px solid #0175dc;
border-right: 2px solid #0175dc;
}
.corner.bl {
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
bottom: 0;
left: 0;
// border-left: 10px solid #0175dc;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid transparent;
border-left: 0.532vw solid transparent;
border-bottom: .6vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid transparent;
}
.corner.br {
bottom: 0;
right: 0;
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
border-left: 0.532vw solid transparent;
border-bottom: 0.532vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid #0175dc;
// border-left: 10px solid transparent;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid #0175dc;
// transform: rotate(-90deg);
}
.gradient-to-right {
background: linear-gradient(to right, #0c3f68cc, transparent);
}
.gradient-to-left {
background: linear-gradient(to left, #0c3f68cc, transparent);
}
.body-gradient-to-right {
background: linear-gradient(to right, #0003, transparent);
}
.body-gradient-to-left {
background: linear-gradient(to left, #0003, transparent);
}
}
</style>

View File

@@ -0,0 +1,220 @@
<!--
filename: Container.vue
author: liubin
date: 2024-04-09 10:44:09
description:
-->
<template>
<div class="copilot-container">
<!-- refresh btn -->
<button v-if="false" style="
appearance: none;
outline: none;
border: none;
background: none;
color: #fff;
cursor: pointer;
position: absolute;
top: 8px;
right: 8px;
" @click="$emit('refresh')">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
style="width: 24px; height: 24px">
<path stroke-linecap="round" stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
</svg>
</button>
<!-- decoration -->
<div class="corner tl"></div>
<div class="corner tr"></div>
<div class="corner bl"></div>
<div class="corner br"></div>
<!-- content -->
<div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
<Icon style="margin-left: 16px;" :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2>
</div>
<div class="container-body" :class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]">
<slot />
</div>
</div>
</template>
<script>
import ContainerIconVue from "./ContainerIcon.vue";
export default {
name: "DashboardContainer",
components: {
Icon: ContainerIconVue,
},
props: {
side: {
type: String,
default: "left",
},
icon: {
type: String,
default: "cube",
},
title: {
type: String,
default: "Default Title",
},
},
data() {
return {};
},
computed: {},
methods: {},
};
</script>
<style scoped lang="scss">
.copilot-container {
height: 0;
flex: 1;
display: flex;
flex-direction: column;
position: relative;
box-shadow: inset 0 0 20px 1px #fff1;
border-right: .13vw solid;
// border-image: linear-gradient(to bottom,transparent 10%,
// #024798 20%,
// transparent 90%) 1;
border-image: linear-gradient(to bottom, transparent 10%, rgba(5, 138, 237, 1) 30%, rgba(2, 82, 215, 0.24) 90%)1;
box-sizing: border-box;
backdrop-filter: blur(4px);
&::before {
content: "";
position: absolute;
display: inline-block;
height: 92%;
width: 0.13vw;
border-radius: 2px;
top: 0%;
left: 0;
background: radial-gradient(circle at center,
#1481fd 2%,
#024798 90%,
transparent);
z-index: 1;
}
&::after {
content: "";
position: absolute;
display: inline-block;
width: 95%;
height: 0.31415vh;
border-radius: 2px;
right: 3%;
bottom: 0;
background: linear-gradient(to left, transparent 60%, #4197f9 98%, transparent 98%);
z-index: 0;
}
.container-head {
// height: 40px;
height: 3.8vh;
padding: 8px;
display: flex;
align-items: center;
gap: 8px;
.container-title {
font-size: 1vw;
line-height: 1.39vw;
font-weight: normal;
letter-spacing: 2px;
}
}
.container-body {
padding: 12px;
display: flex;
flex-direction: column;
flex: 1;
height: 0;
}
.corner {
z-index: 1;
position: absolute;
// width: 16px;
// height: 16px;
width: 0.7vw;
height: 0.7vw;
}
.corner.tl {
border-top: 2px solid #0175dc;
border-left: 2px solid #0175dc;
top: 0;
left: 0;
}
.corner.tr {
top: 0;
right: 0;
border-top: 2px solid #0175dc;
border-right: 2px solid #0175dc;
}
.corner.bl {
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
bottom: 0;
left: 0;
// border-left: 10px solid #0175dc;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid transparent;
border-left: 0.532vw solid #0175dc;
border-bottom: 0.532vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid transparent;
}
.corner.br {
bottom: 0;
right: 0;
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
// border-left: 10px solid transparent;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid #0175dc;
// transform: rotate(-90deg);
border-left: 0.532vw solid transparent;
border-bottom: .6vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid transparent;
}
.gradient-to-right {
background: linear-gradient(to right, #0c3f68cc, transparent);
}
.gradient-to-left {
background: linear-gradient(to left, #0c3f68cc, transparent);
}
.body-gradient-to-right {
background: linear-gradient(to right, #0003, transparent);
}
.body-gradient-to-left {
background: linear-gradient(to left, #0003, transparent);
}
}
</style>

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-23 15:49:14 * @Date: 2024-05-23 15:49:14
* @LastEditTime: 2024-06-04 08:54:10 * @LastEditTime: 2024-07-25 14:29:40
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -10,7 +10,7 @@
<chart-container class="bar-chart-base"> <chart-container class="bar-chart-base">
<div class="legend"> <div class="legend">
<span v-for="item in legend" :key="item.label" class="legend-item" <span v-for="item in legend" :key="item.label" class="legend-item"
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span> :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
</div> </div>
<div ref="ftoChart" style="height:94%;width:100%"></div> <div ref="ftoChart" style="height:94%;width:100%"></div>
</chart-container> </chart-container>
@@ -63,7 +63,36 @@ export default {
top: "15%", top: "15%",
containLabel: true, containLabel: true,
}, },
tooltip: {}, tooltip: {
trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter: params => {
var res = `<span style='color:rgba(255,255,255,0.85);display:inline-block;margin-bottom:8px;'>${params[0].axisValueLabel}</span>`;
for (var i = 0, l = params.length; i < l; i++) {
let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
// console.log(item.color, color);
res +=
"<br/>" +
`<span style='border-radius:2px;display:inline-block;margin-right:4px;width:12px;height:12px;background-color:${color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;letter-spacing: 2px;'>${params[i].seriesName}</span>` +
`<span style='display:inline-block;width:60px;color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;text-align: right;'>${params[i].value ? params[i].value : 0 }</span>`;
}
const htmlContent = `
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
${res}
</div>
`;
return htmlContent;
},
},
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false, show: false,
@@ -74,24 +103,24 @@ export default {
}, },
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
data: this.xAxis, data: this.xAxis,
}, },
yAxis: { yAxis: {
name: "单位/片", name: "单位/片",
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
align: "right", align: "right",
}, },
axisTick: { axisTick: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
axisLine: { axisLine: {
show: true, show: true,
@@ -101,7 +130,7 @@ export default {
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: "#4561AE", color: "rgba(69,97,174,.4)",
}, },
}, },
}, },
@@ -109,7 +138,7 @@ export default {
{ {
name: "", // this.series[0].name, name: "", // this.series[0].name,
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
itemStyle: { itemStyle: {
borderRadius: [10, 10, 0, 0], borderRadius: [10, 10, 0, 0],
color: { color: {
@@ -144,7 +173,7 @@ export default {
{ {
name: "", // this.series[1].name, name: "", // this.series[1].name,
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
// tooltip: { // tooltip: {
// valueFormatter: function (value) { // valueFormatter: function (value) {
// return value + " ml"; // return value + " ml";
@@ -189,19 +218,19 @@ export default {
this.canvasReset() this.canvasReset()
}, },
isFullscreen(val) { isFullscreen(val) {
this.actualOptions.series.map((item) => { this.options.series.map((item) => {
item.barWidth = val ? 18 : 12; item.barWidth = val ? 18 : 16;
}); });
this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; this.options.xAxis.axisLabel.fontSize = val ? 18 : 16;
this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; this.options.yAxis.axisLabel.fontSize = val ? 18 : 16;
this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; this.options.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
this.initChart(this.actualOptions); this.initChart(this.options);
// this.actualOptions.series.map((item) => { // this.actualOptions.series.map((item) => {
// item.barWidth = val ? 18 : 12; // item.barWidth = val ? 18 : 16;
// }); // });
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
// this.initChart(this.actualOptions); // this.initChart(this.actualOptions);
this.canvasReset() this.canvasReset()
}, },
@@ -210,14 +239,14 @@ export default {
this.initChart(this.options); this.initChart(this.options);
return; return;
} }
const actualOptions = JSON.parse(JSON.stringify(this.options)); // const actualOptions = JSON.parse(JSON.stringify(this.options));
console.log('actualOptions', this.options) // console.log('actualOptions', this.options)
actualOptions.series[0].data = val[0].data; this.options.series[0].data = val[0].data;
actualOptions.series[0].name = val[0].name; this.options.series[0].name = val[0].name;
actualOptions.series[1].data = val[1].data; this.options.series[1].data = val[1].data;
actualOptions.series[1].name = val[1].name; this.options.series[1].name = val[1].name;
this.actualOptions = actualOptions; // this.actualOptions = actualOptions;
this.initChart(actualOptions); this.initChart(this.options);
}, },
}, },
mounted() { mounted() {
@@ -226,7 +255,7 @@ export default {
this.isFullscreen = screenfull.isFullscreen; this.isFullscreen = screenfull.isFullscreen;
}); });
} }
this.actualOptions = this.options // this.actualOptions = this.options
this.canvasReset(); this.canvasReset();
window.addEventListener("resize", this.canvasReset); window.addEventListener("resize", this.canvasReset);
}, },
@@ -250,7 +279,7 @@ export default {
this.chart.dispose(); this.chart.dispose();
} }
this.chart = echarts.init(this.$refs.ftoChart); this.chart = echarts.init(this.$refs.ftoChart);
this.chart.setOption(this.actualOptions); this.chart.setOption(this.options);
}, },
}, },
}; };

View File

@@ -1,16 +1,14 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-05 09:43:51 * @Date: 2024-06-05 09:43:51
* @LastEditTime: 2024-06-05 09:43:52 * @LastEditTime: 2024-07-22 13:36:30
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<div class="copilot-container"> <div class="copilot-container">
<!-- refresh btn --> <!-- refresh btn -->
<button <button v-if="false" style="
v-if="false"
style="
appearance: none; appearance: none;
outline: none; outline: none;
border: none; border: none;
@@ -20,43 +18,26 @@
position: absolute; position: absolute;
top: 8px; top: 8px;
right: 8px; right: 8px;
" " @click="$emit('refresh')">
@click="$emit('refresh')" <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
> style="width: 24px; height: 24px">
<svg <path stroke-linecap="round" stroke-linejoin="round"
xmlns="http://www.w3.org/2000/svg" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg> </svg>
</button> </button>
<!-- decoration --> <!-- decoration -->
<div class="corner tl"></div> <div class="corner tl"></div>
<div class="corner tr"></div> <div class="corner tr"></div>
<div class="corner bl"></div> <div class="corner bl"></div>
<div class="corner br"></div> <div class="corner br"></div>
<!-- content --> <!-- content -->
<div <div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
class="container-head" <Icon style="margin-left: 16px;" :icon="icon"></Icon>
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
</div> </div>
<div <div class="container-body" :class="[
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left', side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]" ]">
>
<slot /> <slot />
</div> </div>
</div> </div>
@@ -92,6 +73,7 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.copilot-container { .copilot-container {
height: 0; height: 0;
flex: 1; flex: 1;
@@ -99,36 +81,38 @@ export default {
flex-direction: column; flex-direction: column;
position: relative; position: relative;
box-shadow: inset 0 0 20px 1px #fff1; box-shadow: inset 0 0 20px 1px #fff1;
backdrop-filter: blur(4px); border-right: .13vw solid;
// border-image: linear-gradient(to bottom,transparent 10%,
&::before { // #024798 20%,
content: ""; // transparent 90%) 1;
position: absolute; border-image: linear-gradient(to bottom, transparent 10%, rgba(5, 138, 237, 1) 30%, rgba(2, 82, 215, 0.24) 90%)1;
display: inline-block; box-sizing: border-box;
height: 100%; backdrop-filter: blur(4px);
width: 0.11415vw; &::before {
border-radius: 2px; content: "";
top: 0%; position: absolute;
left: 0; display: inline-block;
background: radial-gradient( height: 92%;
circle at center, width: 0.13vw;
#024798 2%, border-radius: 2px;
#024798 30%, top: 0%;
transparent left: 0;
); background: radial-gradient(circle at center,
z-index: 1; #1481fd 2%,
} #024798 90%,
transparent);
z-index: 1;
}
&::after { &::after {
content: ""; content: "";
position: absolute; position: absolute;
display: inline-block; display: inline-block;
width: 60%; width: 90%;
height: 0.31415vh; height: 0.31415vh;
border-radius: 2px; border-radius: 2px;
left: 8%; left: 7%;
bottom: 0; bottom: 0;
background: linear-gradient(to right, #024798, transparent); background: linear-gradient(to right, transparent 60%, #4197f9 98%, transparent 98%);
z-index: 0; z-index: 0;
} }
@@ -141,7 +125,7 @@ export default {
gap: 8px; gap: 8px;
.container-title { .container-title {
font-size: 1.18vw; font-size: 1vw;
line-height: 1.39vw; line-height: 1.39vw;
font-weight: normal; font-weight: normal;
letter-spacing: 2px; letter-spacing: 2px;
@@ -161,8 +145,8 @@ export default {
position: absolute; position: absolute;
// width: 16px; // width: 16px;
// height: 16px; // height: 16px;
width: 0.95vw; width: 0.7vw;
height: 0.95vw; height: 0.7vw;
} }
.corner.tl { .corner.tl {

View File

@@ -8,9 +8,7 @@
<template> <template>
<div class="copilot-container"> <div class="copilot-container">
<!-- refresh btn --> <!-- refresh btn -->
<button <button v-if="false" style="
v-if="false"
style="
appearance: none; appearance: none;
outline: none; outline: none;
border: none; border: none;
@@ -20,43 +18,26 @@
position: absolute; position: absolute;
top: 8px; top: 8px;
right: 8px; right: 8px;
" " @click="$emit('refresh')">
@click="$emit('refresh')" <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
> style="width: 24px; height: 24px">
<svg <path stroke-linecap="round" stroke-linejoin="round"
xmlns="http://www.w3.org/2000/svg" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg> </svg>
</button> </button>
<!-- decoration --> <!-- decoration -->
<div class="corner tl"></div> <div class="corner tl"></div>
<div class="corner tr"></div> <div class="corner tr"></div>
<div class="corner bl"></div> <div class="corner bl"></div>
<div class="corner br"></div> <div class="corner br"></div>
<!-- content --> <!-- content -->
<div <div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
class="container-head" <Icon style="margin-left: 16px;" :icon="icon"></Icon>
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
</div> </div>
<div <div class="container-body" :class="[
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left', side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]" ]">
>
<slot /> <slot />
</div> </div>
</div> </div>
@@ -92,6 +73,8 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.copilot-container { .copilot-container {
height: 0; height: 0;
flex: 1; flex: 1;
@@ -99,21 +82,27 @@ export default {
flex-direction: column; flex-direction: column;
position: relative; position: relative;
box-shadow: inset 0 0 20px 1px #fff1; box-shadow: inset 0 0 20px 1px #fff1;
border-right: .13vw solid;
// padding-right: .2vw;
box-sizing: border-box; // border-image: linear-gradient(to bottom,transparent 10%,
// #024798 20%,
// transparent 90%) 1;
border-image: linear-gradient(to bottom,transparent 10%, rgba(5, 138, 237, 1) 30%, rgba(2, 82, 215, 0.24) 90%)1;
backdrop-filter: blur(4px); backdrop-filter: blur(4px);
&::before { &::before {
content: ""; content: "";
position: absolute; position: absolute;
display: inline-block; display: inline-block;
height: 100%; height: 92%;
width: 0.11415vw; width: 0.13vw;
border-radius: 2px; border-radius: 2px;
top: 0%; top: 0%;
left: 0; left: 0;
background: radial-gradient( background: radial-gradient(
circle at center, circle at center,
#024798 2%, #1481fd 2%,
#024798 30%, #024798 90%,
transparent transparent
); );
z-index: 1; z-index: 1;
@@ -123,12 +112,12 @@ export default {
content: ""; content: "";
position: absolute; position: absolute;
display: inline-block; display: inline-block;
width: 60%; width: 95%;
height: 0.31415vh; height: 0.31415vh;
border-radius: 2px; border-radius: 2px;
left: 8%; right: 1%;
bottom: 0; bottom: 0;
background: linear-gradient(to right, #024798, transparent); background: linear-gradient(to left, transparent 60%, #4197f9 98%, transparent 98%);
z-index: 0; z-index: 0;
} }
@@ -141,7 +130,7 @@ export default {
gap: 8px; gap: 8px;
.container-title { .container-title {
font-size: 1.18vw; font-size: 1vw;
line-height: 1.39vw; line-height: 1.39vw;
font-weight: normal; font-weight: normal;
letter-spacing: 2px; letter-spacing: 2px;
@@ -161,8 +150,8 @@ export default {
position: absolute; position: absolute;
// width: 16px; // width: 16px;
// height: 16px; // height: 16px;
width: 0.95vw; width: 0.7vw;
height: 0.95vw; height: 0.7vw;
} }
.corner.tl { .corner.tl {

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-05 09:48:37 * @Date: 2024-06-05 09:48:37
* @LastEditTime: 2024-06-05 09:53:49 * @LastEditTime: 2024-07-22 13:37:48
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -55,7 +55,7 @@
class="container-head" class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
> >
<Icon :icon="icon"></Icon> <Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
</div> </div>
<div <div
@@ -99,6 +99,8 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.copilot-container { .copilot-container {
height: 0; height: 0;
flex: 1; flex: 1;
@@ -106,36 +108,40 @@ export default {
flex-direction: column; flex-direction: column;
position: relative; position: relative;
box-shadow: inset 0 0 20px 1px #fff1; box-shadow: inset 0 0 20px 1px #fff1;
backdrop-filter: blur(4px); border-right: .13vw solid;
// border-image: linear-gradient(to bottom,transparent 10%,
// #024798 20%,
// transparent 90%) 1;
border-image: linear-gradient(to bottom, transparent 10%, rgba(5, 138, 237, 1) 30%, rgba(2, 82, 215, 0.24) 90%)1;
box-sizing: border-box;
backdrop-filter: blur(4px);
&::before { &::before {
content: ""; content: "";
position: absolute; position: absolute;
display: inline-block; display: inline-block;
height: 100%; height: 92%;
width: 0.11415vw; width: 0.13vw;
border-radius: 2px; border-radius: 2px;
top: 0%; top: 0%;
left: 0; left: 0;
background: radial-gradient( background: radial-gradient(circle at center,
circle at center, #1481fd 2%,
#024798 2%, #024798 90%,
#024798 30%, transparent);
transparent z-index: 1;
); }
z-index: 1;
}
&::after { &::after {
content: ""; content: "";
position: absolute; position: absolute;
display: inline-block; display: inline-block;
width: 60%; width: 95%;
height: 0.31415vh; height: 0.31415vh;
border-radius: 2px; border-radius: 2px;
left: 8%; left: 6%;
bottom: 0; bottom: 0;
background: linear-gradient(to right, #024798, transparent); background: linear-gradient(to left, transparent 60%, #4197f9 98%, transparent 98%);
z-index: 0; z-index: 0;
} }
@@ -148,7 +154,7 @@ export default {
gap: 8px; gap: 8px;
.container-title { .container-title {
font-size: 1.18vw; font-size: 1vw;
line-height: 1.39vw; line-height: 1.39vw;
font-weight: normal; font-weight: normal;
letter-spacing: 2px; letter-spacing: 2px;
@@ -168,8 +174,8 @@ export default {
position: absolute; position: absolute;
// width: 16px; // width: 16px;
// height: 16px; // height: 16px;
width: 0.95vw; width: 0.7vw;
height: 0.95vw; height: 0.7vw;
} }
.corner.tl { .corner.tl {

View File

@@ -47,8 +47,11 @@ export default {
legend() { legend() {
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -60,44 +63,47 @@ export default {
const year = new Date().getFullYear(); const year = new Date().getFullYear();
if (this.period === '日' && this.than === '同比') { if (this.period === '日' && this.than === '同比') {
items = [ items = [
{ label: `${year-1}${month}${today}`, color: "#12f7f1" }, { label: `${yesterday}目标`, color: "#58adfa" },
{ label: `${month}${today}`, color: "#58adfa" }, { label: `${year - 1}${yesterday}`, color: "#12f7f1" },
{ label: `${yesterday}`, color: "#58adfa" },
]; ];
} else if (this.period === '日' && this.than === '环比') { } else if (this.period === '日' && this.than === '环比') {
items = [ items = [
{ label: `${yesterday}`, color: "#12f7f1" }, { label: `${yesterday}目标`, color: "#58adfa" },
{ label: `${month}${today}`, color: "#58adfa" }, { label: `${dayBeYes}`, color: "#12f7f1" },
{ label: `${yesterday}`, color: "#58adfa" },
]; ];
} else if (this.period === '周' && this.than === '同比') { } else if (this.period === '周' && this.than === '同比') {
items = [ items = [
{ label: `${year-1}年本周`, color: "#12f7f1" }, { label: `本周目标`, color: "#58adfa" },
{ label: `${year - 1}年本周`, color: "#12f7f1" },
{ label: `本周`, color: "#58adfa" }, { label: `本周`, color: "#58adfa" },
]; ];
} else if (this.period === '周' && this.than === '环比') { } else if (this.period === '周' && this.than === '环比') {
items = [ items = [
{ label: `本周目标`, color: "#58adfa" },
{ label: `上周`, color: "#12f7f1" }, { label: `上周`, color: "#12f7f1" },
{ label: `本周`, color: "#58adfa" }, { label: `本周`, color: "#58adfa" },
]; ];
} else if (this.period === '月' && this.than === '同比') { } else if (this.period === '月' && this.than === '同比') {
items = [ items = [
{ label: `${year-1}${month}`, color: "#12f7f1" },
{ label: `${month}`, color: "#58adfa" },
{ label: `${month}月目标`, color: "#58adfa" }, { label: `${month}月目标`, color: "#58adfa" },
{ label: `${year - 1}${month}`, color: "#12f7f1" },
{ label: `${month}`, color: "#58adfa" },
// { label: `${month}月目标`, value: valueTuple[2] }, // { label: `${month}月目标`, value: valueTuple[2] },
]; ];
} else if (this.period === '月' && this.than === '环比') { } else if (this.period === '月' && this.than === '环比') {
items = [ items = [
{ label: `${month}月目标`, color: "#58adfa" },
{ label: `${lastMonth}`, color: "#12f7f1" }, { label: `${lastMonth}`, color: "#12f7f1" },
{ label: `${month}`, color: "#58adfa" }, { label: `${month}`, color: "#58adfa" },
{ label: `${month}月目标`, color: "#58adfa" },
// { label: `${month}月目标`, value: valueTuple[2] }, // { label: `${month}月目标`, value: valueTuple[2] },
]; ];
} else { } else {
items = [ items = [
{ label: `${year}年目标`, color: "#58adfa" },
{ label: `${year - 1}`, color: "#12f7f1" }, { label: `${year - 1}`, color: "#12f7f1" },
{ label: `${year}`, color: "#58adfa" }, { label: `${year}`, color: "#58adfa" },
{ label: `${year}`, color: "#58adfa" },
// { label: `${year}年目标`, value: valueTuple[2] }, // { label: `${year}年目标`, value: valueTuple[2] },
]; ];
} }
@@ -138,14 +144,6 @@ export default {
// console.log('chipOee', chipOeeRate) // console.log('chipOee', chipOeeRate)
let dataList = null let dataList = null
switch (this.period) { switch (this.period) {
case "日":
dataList = [];
dataList[0] = chipOeeRate?.previous;
dataList[1] = chipOeeRate?.current;
case "周":
dataList = [];
dataList[0] = chipOeeRate?.previous;
dataList[1] = chipOeeRate?.current;
default: default:
dataList = []; dataList = [];
dataList[0] = chipOeeRate?.previous; dataList[0] = chipOeeRate?.previous;
@@ -163,8 +161,11 @@ function getTemplate(period, dataList, than) {
// console.log('dataList',dataList); // console.log('dataList',dataList);
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -177,29 +178,46 @@ function getTemplate(period, dataList, than) {
if (period === '日' && than === '同比') { if (period === '日' && than === '同比') {
items = [ items = [
{ {
name: `${year-1}${month}${today}`, name: `${yesterday}目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
{
name: `${year - 1}${yesterday}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
}, },
{ {
name: `${month}${today}`, name: `${yesterday}`,
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
]; ];
} else if (period === '日' && than === '环比') { } else if (period === '日' && than === '环比') {
items = [ items = [
{ {
name: `${yesterday}`, name: `${yesterday}目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
{
name: `${dayBeYes}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
}, },
{ {
name: `${month}${today}`, name: `${yesterday}`,
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
]; ];
} else if (period === '周' && than === '同比') { } else if (period === '周' && than === '同比') {
items = [ items = [
{
name: `本周目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
{ {
name: `${year-1}年本周`, name: `${year-1}年本周`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
@@ -209,9 +227,15 @@ function getTemplate(period, dataList, than) {
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
]; ];
} else if (period === '周' && than === '环比') { } else if (period === '周' && than === '环比') {
items = [ items = [
{
name: `本周目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
{ {
name: `上周`, name: `上周`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
@@ -221,9 +245,15 @@ function getTemplate(period, dataList, than) {
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
]; ];
} else if (period === '月' && than === '同比') { } else if (period === '月' && than === '同比') {
items = [ items = [
{
name: `${month}月目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
{ {
name: `${year-1}${month}`, name: `${year-1}${month}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
@@ -233,31 +263,33 @@ function getTemplate(period, dataList, than) {
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
{
name: `${month}目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
]; ];
} else if (period === '月' && than === '环比') { } else if (period === '月' && than === '环比') {
items = [ items = [
{
name: `${lastMonth}`,
data: dataList ? dataList[0] : [],
},
{ {
name: `${month}`, name: `${month}`,
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
{ {
name: `${month}目标`, name: `${month}目标`,
data: dataList ? dataList[2] : [], data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
{
name: `${lastMonth}`,
data: dataList ? dataList[0] : [],
},
]; ];
} else { } else {
items = [ items = [
{
name: `${year}目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
{ {
name: `${year - 1}`, name: `${year - 1}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
@@ -267,11 +299,7 @@ function getTemplate(period, dataList, than) {
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
{
name: `${year}目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
]; ];
} }
return items return items

View File

@@ -47,8 +47,11 @@ export default {
legend() { legend() {
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -60,44 +63,47 @@ export default {
const year = new Date().getFullYear(); const year = new Date().getFullYear();
if (this.period === '日' && this.than === '同比') { if (this.period === '日' && this.than === '同比') {
items = [ items = [
{ label: `${year-1}${month}${today}`, color: "#12f7f1" }, { label: `${yesterday}目标`, color: "#58adfa" },
{ label: `${month}${today}`, color: "#58adfa" }, { label: `${year - 1}${yesterday}`, color: "#12f7f1" },
{ label: `${yesterday}`, color: "#58adfa" },
]; ];
} else if (this.period === '日' && this.than === '环比') { } else if (this.period === '日' && this.than === '环比') {
items = [ items = [
{ label: `${yesterday}`, color: "#12f7f1" }, { label: `${yesterday}目标`, color: "#58adfa" },
{ label: `${month}${today}`, color: "#58adfa" }, { label: `${dayBeYes}`, color: "#12f7f1" },
{ label: `${yesterday}`, color: "#58adfa" },
]; ];
} else if (this.period === '周' && this.than === '同比') { } else if (this.period === '周' && this.than === '同比') {
items = [ items = [
{ label: `${year-1}年本周`, color: "#12f7f1" }, { label: `本周目标`, color: "#58adfa" },
{ label: `${year - 1}年本周`, color: "#12f7f1" },
{ label: `本周`, color: "#58adfa" }, { label: `本周`, color: "#58adfa" },
]; ];
} else if (this.period === '周' && this.than === '环比') { } else if (this.period === '周' && this.than === '环比') {
items = [ items = [
{ label: `本周目标`, color: "#58adfa" },
{ label: `上周`, color: "#12f7f1" }, { label: `上周`, color: "#12f7f1" },
{ label: `本周`, color: "#58adfa" }, { label: `本周`, color: "#58adfa" },
]; ];
} else if (this.period === '月' && this.than === '同比') { } else if (this.period === '月' && this.than === '同比') {
items = [ items = [
{ label: `${year-1}${month}`, color: "#12f7f1" },
{ label: `${month}`, color: "#58adfa" },
{ label: `${month}月目标`, color: "#58adfa" }, { label: `${month}月目标`, color: "#58adfa" },
{ label: `${year - 1}${month}`, color: "#12f7f1" },
{ label: `${month}`, color: "#58adfa" },
// { label: `${month}月目标`, value: valueTuple[2] }, // { label: `${month}月目标`, value: valueTuple[2] },
]; ];
} else if (this.period === '月' && this.than === '环比') { } else if (this.period === '月' && this.than === '环比') {
items = [ items = [
{ label: `${month}月目标`, color: "#58adfa" },
{ label: `${lastMonth}`, color: "#12f7f1" }, { label: `${lastMonth}`, color: "#12f7f1" },
{ label: `${month}`, color: "#58adfa" }, { label: `${month}`, color: "#58adfa" },
{ label: `${month}月目标`, color: "#58adfa" },
// { label: `${month}月目标`, value: valueTuple[2] }, // { label: `${month}月目标`, value: valueTuple[2] },
]; ];
} else { } else {
items = [ items = [
{ label: `${year}年目标`, color: "#58adfa" },
{ label: `${year - 1}`, color: "#12f7f1" }, { label: `${year - 1}`, color: "#12f7f1" },
{ label: `${year}`, color: "#58adfa" }, { label: `${year}`, color: "#58adfa" },
{ label: `${year}`, color: "#58adfa" },
// { label: `${year}年目标`, value: valueTuple[2] }, // { label: `${year}年目标`, value: valueTuple[2] },
]; ];
} }
@@ -109,17 +115,9 @@ export default {
series() { series() {
// console.log('aaaaaaaa', this.$store.getters.copilot.efficiency.chipOee); // console.log('aaaaaaaa', this.$store.getters.copilot.efficiency.chipOee);
const transformRate = this.transformRate const transformRate = this.transformRate
// console.log('chipOee', chipOeeRate) console.log('chipOee', transformRate)
let dataList = null; let dataList = null;
switch (this.period) { switch (this.period) {
case "日":
dataList = [];
dataList[0] = transformRate.previous;
dataList[1] = transformRate.current;
case "周":
dataList = [];
dataList[0] = transformRate.previous;
dataList[1] = transformRate.current;
default: default:
dataList = []; dataList = [];
dataList[0] = transformRate.previous; dataList[0] = transformRate.previous;
@@ -154,8 +152,11 @@ function getTemplate(period, dataList,than) {
// console.log('dataList',dataList); // console.log('dataList',dataList);
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -168,31 +169,48 @@ function getTemplate(period, dataList,than) {
if (period === '日' && than === '同比') { if (period === '日' && than === '同比') {
items = [ items = [
{ {
name: `${year-1}${month}${today}`, name: `${yesterday}目标`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[2].splice(0,2) : [],
},
{
name: `${month}${today}`,
data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
{
name: `${year - 1}${yesterday}`,
data: dataList ? dataList[0].splice(0, 2) : [],
},
{
name: `${yesterday}`,
data: dataList ? dataList[1].splice(0, 2) : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
]; ];
} else if (period === '日' && than === '环比') { } else if (period === '日' && than === '环比') {
items = [ items = [
{ {
name: `${yesterday}`, name: `${yesterday}目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
{
name: `${dayBeYes}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
}, },
{ {
name: `${month}${today}`, name: `${yesterday}`,
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
]; ];
} else if (period === '周' && than === '同比') { } else if (period === '周' && than === '同比') {
items = [ items = [
{ {
name: `${year-1}年本周`, name: `本周目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
{
name: `${year - 1}年本周`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
}, },
{ {
@@ -200,9 +218,15 @@ function getTemplate(period, dataList,than) {
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
]; ];
} else if (period === '周' && than === '环比') { } else if (period === '周' && than === '环比') {
items = [ items = [
{
name: `本周目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
{ {
name: `上周`, name: `上周`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
@@ -212,11 +236,17 @@ function getTemplate(period, dataList,than) {
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
]; ];
} else if (period === '月' && than === '同比') { } else if (period === '月' && than === '同比') {
items = [ items = [
{ {
name: `${year-1}${month}`, name: `${month}目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
{
name: `${year - 1}${month}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
}, },
{ {
@@ -224,31 +254,34 @@ function getTemplate(period, dataList,than) {
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
{
name: `${month}目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
]; ];
} else if (period === '月' && than === '环比') { } else if (period === '月' && than === '环比') {
items = [ items = [
{ {
name: `${lastMonth}`, name: `${month}目标`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
{ {
name: `${month}`, name: `${month}`,
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
{ {
name: `${month}目标`, name: `${lastMonth}`,
data: dataList ? dataList[2] : [], data: dataList ? dataList[0] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
]; ];
} else { } else {
items = [ items = [
{
name: `${year}目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
{ {
name: `${year - 1}`, name: `${year - 1}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
@@ -258,11 +291,7 @@ function getTemplate(period, dataList,than) {
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
{
name: `${year}目标`,
data: dataList ? dataList[2] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
]; ];
} }
return items return items

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-07 13:22:43 * @Date: 2024-05-07 13:22:43
* @LastEditTime: 2024-06-06 15:12:58 * @LastEditTime: 2024-07-25 14:29:04
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -9,7 +9,7 @@
<chart-container class="bar-chart-base"> <chart-container class="bar-chart-base">
<div class="legend"> <div class="legend">
<span v-for="(item,index) in legend" :key="index" class="legend-item" <span v-for="(item,index) in legend" :key="index" class="legend-item"
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span> :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
</div> </div>
<div ref="oeeChart" style="height:94%;width:100%"></div> <div ref="oeeChart" style="height:94%;width:100%"></div>
</chart-container> </chart-container>
@@ -56,13 +56,48 @@ export default {
actualOptions: null, actualOptions: null,
options: { options: {
grid: { grid: {
left: "5%", left: "6%",
right: "0%", right: "0%",
bottom: "3%", bottom: "3%",
top: "15%", top: "15%",
containLabel: true, containLabel: true,
}, },
tooltip: {}, tooltip: {
trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter: params => {
console.log('params', params)
var res = `<span style='color:rgba(255,255,255,0.85);margin-bottom:8px'>${params[0].axisValueLabel}</span>`;
for (var i = 0, l = params.length; i < l; i++) {
let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
// console.log(item.color, color);
res +=
"<br/>" +
`${params[i].seriesType === "line"
? `<span style='display:inline-block; width: 20px;height: 2px;background-color: #f3c000;position: absolute;top:39%;left:3.05%;'></span>
<span style='display:inline-block;width: 8px;height: 8px;border-radius: 100%;background-color: #f3c000;position: absolute;top:36%;left:4.8%;'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;margin-left:20px'>${params[i].seriesName}</span>`
: `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:${color}"></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px'>${params[i].seriesName}</span>`
}` +
`<span style='display:inline-block;text-align: right;width:180px;color:rgba(255,255,255,0.65);;font-size:16px;letter-spacing: 2px;'>${params[i].value ? params[i].value.toFixed(2) + '%' : "0.00" + '%'}</span>`;
}
const htmlContent = `
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
${res}
</div>
`;
return htmlContent;
},
},
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false, show: false,
@@ -73,23 +108,24 @@ export default {
}, },
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
data: this.xAxis, data: this.xAxis,
}, },
yAxis: { yAxis: {
name: "单位/%", name: "单位/%",
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
align: "right",
}, },
axisTick: { axisTick: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
axisLine: { axisLine: {
show: true, show: true,
@@ -99,15 +135,50 @@ export default {
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: "#4561AE", color: "rgba(69,97,174,.4)",
}, },
}, },
}, },
series: [ series: [
{
name: "", // "2024年目标值",
type: "line",
lineStyle: {
color: "#f3c000",
},
itemStyle: {
color: "#f3c000",
},
// areaStyle: {
// color: {
// type: "linear",
// x: 0,
// y: 0,
// x2: 0,
// y2: 1,
// colorStops: [
// {
// offset: 0,
// color: "#f3c000", // 0% 处的颜色
// },
// {
// offset: 0.55,
// color: "#f3c00033",
// },
// {
// offset: 1,
// color: "transparent", // 100% 处的颜色
// },
// ],
// global: false, // 缺省为 false
// },
// },
data: [], // this.series[0].data,
},
{ {
name: "", // this.series[0].name, name: "", // this.series[0].name,
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
itemStyle: { itemStyle: {
borderRadius: [10, 10, 0, 0], borderRadius: [10, 10, 0, 0],
color: { color: {
@@ -142,7 +213,7 @@ export default {
{ {
name: "", // this.series[1].name, name: "", // this.series[1].name,
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
// tooltip: { // tooltip: {
// valueFormatter: function (value) { // valueFormatter: function (value) {
// return value + " ml"; // return value + " ml";
@@ -170,42 +241,7 @@ export default {
}, },
}, },
data: [], // this.series[1].data, data: [], // this.series[1].data,
}, }
{
name: "", // "2024年目标值",
type: "line",
lineStyle: {
color: "#f3c000",
},
itemStyle: {
color: "#f3c000",
},
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "#f3c000", // 0% 处的颜色
},
{
offset: 0.55,
color: "#f3c00033",
},
{
offset: 1,
color: "transparent", // 100% 处的颜色
},
],
global: false, // 缺省为 false
},
},
data: [], // this.series[0].data,
},
], ],
}, },
}; };
@@ -222,11 +258,11 @@ export default {
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */ /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
isFullscreen(val) { isFullscreen(val) {
// this.actualOptions.series.map((item) => { // this.actualOptions.series.map((item) => {
// item.barWidth = val ? 18 : 12; // item.barWidth = val ? 18 : 16;
// }); // });
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
// if (val === false && this.isOpen === true) { // if (val === false && this.isOpen === true) {
// console.log(val) // console.log(val)
// this.width = 97 + '%' // this.width = 97 + '%'
@@ -236,12 +272,12 @@ export default {
// this.canvasReset() // this.canvasReset()
// } // }
// this.actualOptions.series.map((item) => { // this.actualOptions.series.map((item) => {
// item.barWidth = val ? 18 : 12; // item.barWidth = val ? 18 : 16;
// }); // });
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
this.initChart(this.actualOptions) this.initChart(this.options)
this.canvasReset() this.canvasReset()
}, },
series(val) { series(val) {
@@ -252,14 +288,14 @@ export default {
// console.log('val', val) // console.log('val', val)
const actualOptions = JSON.parse(JSON.stringify(this.options)) const actualOptions = JSON.parse(JSON.stringify(this.options))
console.log(actualOptions) console.log(actualOptions)
actualOptions.series[0].data = val[0].data; this.options.series[0].data = val[0].data;
actualOptions.series[0].name = val[0].name; this.options.series[0].name = val[0].name;
actualOptions.series[1].data = val?.[1]?.data; this.options.series[1].data = val?.[1]?.data;
actualOptions.series[1].name = val?.[1]?.name; this.options.series[1].name = val?.[1]?.name;
actualOptions.series[2].data = val?.[2]?.data || []; this.options.series[2].data = val?.[2]?.data || [];
actualOptions.series[2].name = val?.[2]?.name || ""; this.options.series[2].name = val?.[2]?.name || "";
this.actualOptions = actualOptions; this.actualOptions = actualOptions;
this.initChart(actualOptions); this.initChart(this.options);
}, },
}, },
mounted() { mounted() {
@@ -273,7 +309,7 @@ export default {
this.isFullscreen = screenfull.isFullscreen; this.isFullscreen = screenfull.isFullscreen;
}); });
} }
this.actualOptions = this.options // this.actualOptions = this.options
this.canvasReset(); this.canvasReset();
window.addEventListener("resize", this.canvasReset); window.addEventListener("resize", this.canvasReset);
}, },
@@ -296,7 +332,7 @@ export default {
this.chart.dispose(); this.chart.dispose();
} }
this.chart = echarts.init(this.$refs.oeeChart); this.chart = echarts.init(this.$refs.oeeChart);
this.chart.setOption(this.actualOptions); this.chart.setOption(this.options);
}, },
}, },
}; };
@@ -328,42 +364,42 @@ export default {
margin-right: 0.22vw; margin-right: 0.22vw;
} }
} }
.legend-item:nth-child(3) { .legend-item:nth-child(1) {
margin-left: 1vw; margin-left: 1vw;
} }
.legend-item:nth-child(3):before { .legend-item:nth-child(1):before {
// width: 12px; // width: 12px;
// height: 2px; // height: 2px;
width: 1vw; width: 1vw;
height: 0.1064vw; height: 0.1064vw;
background-color: #f3c000; background-color: #f3c000;
position: absolute; position: absolute;
top: 50%; top: 50%;
// left: -16px; // left: -16px;
left: -0.951vw; left: -1.2vw;
transform: translateY(-50%); transform: translateY(-50%);
} }
.legend-item:nth-child(3):after { .legend-item:nth-child(1):after {
background-color: #f3c000; background-color: #f3c000;
content: ""; content: "";
display: inline-block; display: inline-block;
position: absolute; position: absolute;
// width: 6px; // width: 6px;
// height: 6px; // height: 6px;
width: 0.3191vw; width: 0.4vw;
height: 0.3191vw; height: 0.4vw;
border-radius: 100%; border-radius: 100%;
top: 50%; top: 50%;
left: -0.851vw; left: -1.1vw;
// left: -16px; // left: -16px;
transform: translateY(-50%) translateX(50%); transform: translateY(-50%) translateX(50%);
} }
.legend-item:nth-child(1):before { .legend-item:nth-child(2):before {
background-color: #12f7f1; background-color: #12f7f1;
} }
.legend-item:nth-child(2):before { .legend-item:nth-child(3):before {
background-color: #58adfa; background-color: #58adfa;
} }
} }

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-23 15:50:44 * @Date: 2024-05-23 15:50:44
* @LastEditTime: 2024-06-06 15:13:06 * @LastEditTime: 2024-07-25 14:29:09
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -9,7 +9,7 @@
<chart-container class="bar-chart-base"> <chart-container class="bar-chart-base">
<div class="legend"> <div class="legend">
<span v-for="(item,index) in legend" :key="index" class="legend-item" <span v-for="(item,index) in legend" :key="index" class="legend-item"
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span> :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
</div> </div>
<div ref="oeeChart" style="height:94%;width:100%"></div> <div ref="oeeChart" style="height:94%;width:100%"></div>
</chart-container> </chart-container>
@@ -56,13 +56,48 @@ export default {
actualOptions: null, actualOptions: null,
options: { options: {
grid: { grid: {
left: "5%", left: "6%",
right: "0%", right: "0%",
bottom: "3%", bottom: "3%",
top: "15%", top: "15%",
containLabel: true, containLabel: true,
}, },
tooltip: {}, tooltip: {
trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter: params => {
console.log('params', params)
var res = `<span style='color:rgba(255,255,255,0.85);margin-bottom:8px'>${params[0].axisValueLabel}</span>`;
for (var i = 0, l = params.length; i < l; i++) {
let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
// console.log(item.color, color);
res +=
"<br/>" +
`${params[i].seriesType === "line"
? `<span style='display:inline-block; width: 20px;height: 2px;background-color: #f3c000;position: absolute;top:39%;left:3.05%;'></span>
<span style='display:inline-block;width: 8px;height: 8px;border-radius: 100%;background-color: #f3c000;position: absolute;top:36%;left:4.8%;'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;margin-left:20px'>${params[i].seriesName}</span>`
: `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:${color}"></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px'>${params[i].seriesName}</span>`
}` +
`<span style='display:inline-block;text-align: right;width:180px;color:rgba(255,255,255,0.65);;font-size:16px;letter-spacing: 2px;'>${params[i].value ? params[i].value.toFixed(2) + '%' : "0.00" + '%'}</span>`;
}
const htmlContent = `
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
${res}
</div>
`;
return htmlContent;
},
},
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false, show: false,
@@ -73,23 +108,24 @@ export default {
}, },
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
data: this.xAxis, data: this.xAxis,
}, },
yAxis: { yAxis: {
name: "单位/%", name: "单位/%",
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
align: "right",
}, },
axisTick: { axisTick: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
axisLine: { axisLine: {
show: true, show: true,
@@ -99,15 +135,50 @@ export default {
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: "#4561AE", color: "rgba(69,97,174,.4)",
}, },
}, },
}, },
series: [ series: [
{
name: "", // "2024年目标值",
type: "line",
lineStyle: {
color: "#f3c000",
},
itemStyle: {
color: "#f3c000",
},
// areaStyle: {
// color: {
// type: "linear",
// x: 0,
// y: 0,
// x2: 0,
// y2: 1,
// colorStops: [
// {
// offset: 0,
// color: "#f3c000", // 0% 处的颜色
// },
// {
// offset: 0.55,
// color: "#f3c00033",
// },
// {
// offset: 1,
// color: "transparent", // 100% 处的颜色
// },
// ],
// global: false, // 缺省为 false
// },
// },
data: [], // this.series[0].data,
},
{ {
name: "", // this.series[0].name, name: "", // this.series[0].name,
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
itemStyle: { itemStyle: {
borderRadius: [10, 10, 0, 0], borderRadius: [10, 10, 0, 0],
color: { color: {
@@ -142,7 +213,7 @@ export default {
{ {
name: "", // this.series[1].name, name: "", // this.series[1].name,
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
// tooltip: { // tooltip: {
// valueFormatter: function (value) { // valueFormatter: function (value) {
// return value + " ml"; // return value + " ml";
@@ -171,41 +242,7 @@ export default {
}, },
data: [], // this.series[1].data, data: [], // this.series[1].data,
}, },
{
name: "", // "2024年目标值",
type: "line",
lineStyle: {
color: "#f3c000",
},
itemStyle: {
color: "#f3c000",
},
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "#f3c000", // 0% 处的颜色
},
{
offset: 0.55,
color: "#f3c00033",
},
{
offset: 1,
color: "transparent", // 100% 处的颜色
},
],
global: false, // 缺省为 false
},
},
data: [], // this.series[0].data,
},
], ],
}, },
}; };
@@ -222,11 +259,11 @@ export default {
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */ /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
isFullscreen(val) { isFullscreen(val) {
// this.actualOptions.series.map((item) => { // this.actualOptions.series.map((item) => {
// item.barWidth = val ? 18 : 12; // item.barWidth = val ? 18 : 16;
// }); // });
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
// if (val === false && this.isOpen === true) { // if (val === false && this.isOpen === true) {
// console.log(val) // console.log(val)
// this.width = 97 + '%' // this.width = 97 + '%'
@@ -236,12 +273,12 @@ export default {
// this.canvasReset() // this.canvasReset()
// } // }
// this.actualOptions.series.map((item) => { // this.actualOptions.series.map((item) => {
// item.barWidth = val ? 18 : 12; // item.barWidth = val ? 18 : 16;
// }); // });
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
this.initChart(this.actualOptions) this.initChart(this.options)
this.canvasReset() this.canvasReset()
}, },
series(val) { series(val) {
@@ -250,15 +287,15 @@ export default {
return; return;
} }
console.log(val) console.log(val)
const actualOptions = JSON.parse(JSON.stringify(this.options)) // const actualOptions = JSON.parse(JSON.stringify(this.options))
actualOptions.series[0].data = val[0].data; this.options.series[0].data = val[0].data;
actualOptions.series[0].name = val[0].name; this.options.series[0].name = val[0].name;
actualOptions.series[1].data = val?.[1]?.data || []; this.options.series[1].data = val?.[1]?.data || [];
actualOptions.series[1].name = val?.[1]?.name || ""; this.options.series[1].name = val?.[1]?.name || "";
actualOptions.series[2].data = val?.[2]?.data || []; this.options.series[2].data = val?.[2]?.data || [];
actualOptions.series[2].name = val?.[2]?.name || ""; this.options.series[2].name = val?.[2]?.name || "";
this.actualOptions = actualOptions; // this.actualOptions = actualOptions;
this.initChart(actualOptions); this.initChart(this.options);
}, },
}, },
mounted() { mounted() {
@@ -272,7 +309,7 @@ export default {
this.isFullscreen = screenfull.isFullscreen; this.isFullscreen = screenfull.isFullscreen;
}); });
} }
this.actualOptions = this.options // this.actualOptions = this.options
this.canvasReset(); this.canvasReset();
window.addEventListener("resize", this.canvasReset); window.addEventListener("resize", this.canvasReset);
}, },
@@ -295,7 +332,7 @@ export default {
this.chart.dispose(); this.chart.dispose();
} }
this.chart = echarts.init(this.$refs.oeeChart); this.chart = echarts.init(this.$refs.oeeChart);
this.chart.setOption(this.actualOptions); this.chart.setOption(this.options);
}, },
}, },
}; };
@@ -327,17 +364,17 @@ export default {
margin-right: 0.22vw; margin-right: 0.22vw;
} }
} }
.legend-item:nth-child(3) { .legend-item:nth-child(1) {
margin-left: 1vw; margin-left: 1vw;
} }
.legend-item:nth-child(1):before { .legend-item:nth-child(2):before {
background-color: #12f7f1; background-color: #12f7f1;
} }
.legend-item:nth-child(2):before { .legend-item:nth-child(3):before {
background-color: #58adfa; background-color: #58adfa;
} }
.legend-item:nth-child(3):before { .legend-item:nth-child(1):before {
// width: 12px; // width: 12px;
// height: 2px; // height: 2px;
width: 1vw; width: 1vw;
@@ -346,22 +383,22 @@ export default {
position: absolute; position: absolute;
top: 50%; top: 50%;
// left: -16px; // left: -16px;
left: -0.951vw; left: -1.2vw;
transform: translateY(-50%); transform: translateY(-50%);
} }
.legend-item:nth-child(3):after { .legend-item:nth-child(1):after {
background-color: #f3c000; background-color: #f3c000;
content: ""; content: "";
display: inline-block; display: inline-block;
position: absolute; position: absolute;
// width: 6px; // width: 6px;
// height: 6px; // height: 6px;
width: 0.3191vw; width: 0.4vw;
height: 0.3191vw; height: 0.4vw;
border-radius: 100%; border-radius: 100%;
top: 50%; top: 50%;
left: -0.851vw; left: -1.1vw;
// left: -16px; // left: -16px;
transform: translateY(-50%) translateX(50%); transform: translateY(-50%) translateX(50%);
} }

View File

@@ -65,13 +65,13 @@ export default {
valueTuple() { valueTuple() {
const getter = this.chipRate; const getter = this.chipRate;
// console.log(getter) // console.log(getter)
if (this.period === "日" || this.period === "周") { // if (this.period === "日" || this.period === "周") {
return [ // return [
getter.previous[this.factoryId], // getter.previous[this.factoryId],
getter.current[this.factoryId], // getter.current[this.factoryId],
0, // 0,
]; // ];
} // }
// [100, 200, 200] // [100, 200, 200]
return [ return [
getter.previous[this.factoryId], getter.previous[this.factoryId],
@@ -87,8 +87,11 @@ export default {
const vt = this.valueTuple; const vt = this.valueTuple;
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -100,23 +103,27 @@ export default {
// const year = new Date().getFullYear(); // const year = new Date().getFullYear();
if (this.period === '日' && this.than === '同比') { if (this.period === '日' && this.than === '同比') {
items = [ items = [
{ label: `${month}${today}日良率`, }, { label: `${yesterday}日良率`, },
{ label: `${year-1}${month}${today}日良率` }, { label: `${year - 1}${yesterday}日良率` },
{ label: `${yesterday}日目标` },
]; ];
} else if (this.period === '日' && this.than === '环比') { } else if (this.period === '日' && this.than === '环比') {
items = [ items = [
{ label: `${month}${today}日良率` },
{ label: `${yesterday}日良率` }, { label: `${yesterday}日良率` },
{ label: `${dayBeYes}日良率` },
{ label: `${yesterday}日目标` },
]; ];
} else if (this.period === '周' && this.than === '同比') { } else if (this.period === '周' && this.than === '同比') {
items = [ items = [
{ label: `本周良率`, }, { label: `本周良率`, },
{ label: `${year-1}年本周良率` }, { label: `${year - 1}年本周良率` },
{ label: `本周目标`, },
]; ];
} else if (this.period === '周' && this.than === '环比') { } else if (this.period === '周' && this.than === '环比') {
items = [ items = [
{ label: `本周良率`, }, { label: `本周良率`, },
{ label: `上周良率`, }, { label: `上周良率`, },
{ label: `本周目标`, },
]; ];
} else if (this.period === '月' && this.than === '同比') { } else if (this.period === '月' && this.than === '同比') {
items = [ items = [
@@ -139,17 +146,22 @@ export default {
} }
let titleValue = vt[1] === null ? 0 + '%' : this.formatNumber(vt[1]) + '%', let titleValue = vt[1] === null ? 0 + '%' : this.formatNumber(vt[1]) + '%',
subtitle = { subtitle = {
: "日良率", : "日良率",
: "本周良率", : "本周良率",
: `${month}月良率`, : `${month}月良率`,
: `${year}良率`, : `${year}良率`,
}[this.period]; }[this.period];
console.log(vt[1]); console.log(vt[0]);
let titleSize = this.fontSize(0.35)
let subtitleSize = this.fontSize(0.14)
const t = getOptions({ const t = getOptions({
// single, // single,
color: this.color == 1 ? "#4CF0E8" : "#1065ff", color: this.color == 1 ? "#4CF0E8" : "#1065ff",
titleValue, titleValue,
titleSize,
subtitleSize,
subtitle, subtitle,
yesterday,
currentName: items[0].label, currentName: items[0].label,
preName: items[1].label, preName: items[1].label,
previousSum: vt[0], previousSum: vt[0],
@@ -161,8 +173,11 @@ export default {
legend() { legend() {
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -174,24 +189,27 @@ export default {
const year = new Date().getFullYear(); const year = new Date().getFullYear();
if (this.period === '日' && this.than === '同比') { if (this.period === '日' && this.than === '同比') {
items = [ items = [
{ label: `${year-1}${month}${today}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0]) ) + "%" }, { label: `${year - 1}${yesterday}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0]) ) + "%" },
{ label: `${month}${today}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, { label: `${yesterday}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
{ label: `${yesterday}日目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
]; ];
} else if (this.period === '日' && this.than === '环比') { } else if (this.period === '日' && this.than === '环比') {
items = [ items = [
{ label: `${yesterday}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" }, { label: `${dayBeYes}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
{ label: `${month}${today}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, { label: `${yesterday}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
{ label: `${yesterday}日目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
]; ];
} else if (this.period === '周' && this.than === '同比') { } else if (this.period === '周' && this.than === '同比') {
items = [ items = [
{ label: `${year-1}年本周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" }, { label: `${year-1}年本周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
{ label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, { label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
{ label: `本周目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
]; ];
} else if (this.period === '周' && this.than === '环比') { } else if (this.period === '周' && this.than === '环比') {
items = [ items = [
{ label: `上周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" }, { label: `上周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
{ label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, { label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
{ label: `本周目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
]; ];
} else if (this.period === '月' && this.than === '同比') { } else if (this.period === '月' && this.than === '同比') {
items = [ items = [
@@ -247,6 +265,12 @@ export default {
}, },
}, },
methods: { methods: {
fontSize(res){
let clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (!clientWidth) return;
let fontSize = 100 * (clientWidth / 1920);
return res * fontSize;
},
formatNumber(num) { formatNumber(num) {
console.log(num); console.log(num);
// 判断是否为整数 // 判断是否为整数
@@ -276,9 +300,9 @@ export default {
// justify-content: center; // justify-content: center;
gap: 3px; gap: 3px;
backdrop-filter: blur(24px); backdrop-filter: blur(24px);
.cities { // .cities {
height: 40px; // // height: 40px;
} // }
.chart { .chart {
// margin-left: 5%; // margin-left: 5%;
@@ -286,12 +310,12 @@ export default {
flex: 1 1 auto; flex: 1 1 auto;
padding: 0 20%; padding: 0 20%;
/* margin: 10%; */ /* margin: 10%; */
height: 16vh; height: 0;
/* min-width: 300px; */ /* min-width: 300px; */
align-self: stretch; align-self: stretch;
} }
.legend { .legend {
height: 80px; // height: 80px;
display: flex; display: flex;
color: #fff; color: #fff;
justify-content: flex-end; justify-content: flex-end;
@@ -304,6 +328,8 @@ export default {
.legend-item { .legend-item {
margin-left: 15px; margin-left: 15px;
display: flex; display: flex;
font-size: 16px;
// font-weight: 600;
flex-direction: column; flex-direction: column;
// align-items: center; // align-items: center;
align-items: flex-start; align-items: flex-start;
@@ -357,8 +383,6 @@ export default {
background: #003982; background: #003982;
} }
.legend-item__value { .legend-item__value {
font-size: 24px;
font-weight: 600;
} }
} }
</style> </style>

View File

@@ -47,12 +47,12 @@ export default {
computed: { computed: {
dataRate() { dataRate() {
// if (this.current != 0 && this.target != 0) { // if (this.current != 0 && this.target != 0) {
console.log( '1111111111', this.current, this.target); console.log( '1111111111', this.current, this.target,this.previous);
return this.current == 0 && this.target == 0 return this.current == 0 && this.target == 0
? 0 ? 0
: this.current != 0 && this.target != 0 : this.current != 0 && this.target != 0
? `${((this.current / this.target) * 100).toFixed(2)}%` ? `${((this.current / this.target) * 100).toFixed(2)}%`
: this.current != 0 && this.target == 0 && this.current >= 100 ? 100 + '%' : this.current != 0 && this.target == 0 && this.current < 100 ? this.current + '%' : this.previous >=100 ? 100 + '%' : this.previous + '%'; : this.current != 0 && this.target == 0 && this.current >= 100 ? 100 + '%' : this.current != 0 && this.target == 0 && this.current < 100 ? parseFloat(this.current).toFixed(2) + '%' : 0 + '%'
// } else if(this.previous != 0) { // } else if(this.previous != 0) {
// return this.previous + '%' // return this.previous + '%'
// } // }
@@ -73,7 +73,7 @@ export default {
&:before { &:before {
content: attr(data-title); content: attr(data-title);
display: inline-block; display: inline-block;
color: #fff; color:rgba(223,241,254,.8);
position: absolute; position: absolute;
bottom: -200%; bottom: -200%;
font-size: 12px; font-size: 12px;
@@ -82,7 +82,7 @@ export default {
&:after { &:after {
content: attr(data-rate); content: attr(data-rate);
display: inline-block; display: inline-block;
color: #fff; color: rgba(223, 241, 254, .8);
position: absolute; position: absolute;
bottom: -200%; bottom: -200%;
right: 0; right: 0;

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-07 10:25:10 * @Date: 2024-05-07 10:25:10
* @LastEditTime: 2024-06-06 15:14:29 * @LastEditTime: 2024-07-09 15:04:24
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -11,21 +11,21 @@
<CityName :value="city.name" /> <CityName :value="city.name" />
<div class="std-rate-item__value"> <div class="std-rate-item__value">
<ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" /> <ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
<ProgressBar :period="period" :title="titlePre" :previous="city.previous" /> <preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
</div> </div>
</div> </div>
<div v-else-if="period == '周'" class="std-rate-item"> <div v-else-if="period == '周'" class="std-rate-item">
<CityName :value="city.name" /> <CityName :value="city.name" />
<div class="std-rate-item__value"> <div class="std-rate-item__value">
<ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" /> <ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
<ProgressBar :period="period" :title="titlePre" :previous="city.previous" /> <preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
</div> </div>
</div> </div>
<div v-else-if="period == '月'" class="std-rate-item"> <div v-else-if="period == '月'" class="std-rate-item">
<CityName :value="city.name" /> <CityName :value="city.name" />
<div class="std-rate-item__value"> <div class="std-rate-item__value">
<ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" /> <ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
<ProgressBar :period="period" :title="titlePre" :previous="city.previous" /> <preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
<!-- <ProgressBar :period="period" :title="title" :value="city.current" /> --> <!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
</div> </div>
</div> </div>
@@ -33,7 +33,7 @@
<CityName :value="city.name" /> <CityName :value="city.name" />
<div class="std-rate-item__value"> <div class="std-rate-item__value">
<ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" /> <ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
<ProgressBar :period="period" :title="titlePre" :previous="city.previous" /> <preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
<!-- <ProgressBar :period="period" :title="title" :value="city.current" /> --> <!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
</div> </div>
</div> </div>
@@ -42,10 +42,12 @@
<script> <script>
import CityName from "./CityName.vue"; import CityName from "./CityName.vue";
import ProgressBar from "./ProgressBar.vue"; import ProgressBar from "./ProgressBar.vue";
import preProgressBar from "./preProgressBar.vue";
export default { export default {
name: "StdRateItem", name: "StdRateItem",
components: { CityName, ProgressBar }, components: { CityName, ProgressBar, preProgressBar },
props: { props: {
city: { city: {
type: Object, type: Object,
@@ -69,16 +71,19 @@ export default {
titlePre() { titlePre() {
console.log(this.city); console.log(this.city);
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
const today = new Date().getDate(); const today = new Date().getDate();
const month = new Date().getMonth() + 1; const month = new Date().getMonth() + 1;
const lastMonth = new Date().getMonth() + 1 === 12 ? 1 : new Date().getMonth() + 1 - 1; const lastMonth = new Date().getMonth() + 1 === 12 ? 1 : new Date().getMonth() + 1 - 1;
const year = new Date().getFullYear(); const year = new Date().getFullYear();
if (this.period === '日' && this.than === '同比') { if (this.period === '日' && this.than === '同比') {
return `${year-1}${month}${today}` return `${year - 1}${yesterday}`
} else if (this.period === '日' && this.than === '环比') { } else if (this.period === '日' && this.than === '环比') {
return `${yesterday}` return `${dayBeYes}`
} else if (this.period === '周' && this.than === '同比') { } else if (this.period === '周' && this.than === '同比') {
return `${year-1}年本周` return `${year-1}年本周`
} else if (this.period === '周' && this.than === '环比') { } else if (this.period === '周' && this.than === '环比') {
@@ -93,14 +98,18 @@ export default {
}, },
title() { title() {
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
const today = new Date().getDate(); const today = new Date().getDate();
const month = new Date().getMonth() + 1; const month = new Date().getMonth() + 1;
const year = new Date().getFullYear(); const year = new Date().getFullYear();
if (this.period === '日' && this.than === '同比') { if (this.period === '日' && this.than === '同比') {
return `${month}${today}` return `${yesterday}`
} else if (this.period === '日' && this.than === '环比') { } else if (this.period === '日' && this.than === '环比') {
return `${month}${today}` return `${yesterday}`
} else if (this.period === '周' && this.than === '同比') { } else if (this.period === '周' && this.than === '同比') {
return `本周` return `本周`
} else if (this.period === '周' && this.than === '环比') { } else if (this.period === '周' && this.than === '环比') {
@@ -141,7 +150,7 @@ export default {
align-items: center; align-items: center;
gap: 8px; gap: 8px;
flex: 1 1 auto; flex: 1 1 auto;
padding: 12px; padding: 16px;
} }
.std-rate-item__value { .std-rate-item__value {

View File

@@ -0,0 +1,132 @@
<!--
* @Author: zhp
* @Date: 2024-06-27 09:12:54
* @LastEditTime: 2024-07-22 17:03:48
* @LastEditors: zhp
* @Description:
-->
<template>
<div class="progress-bar" :data-title="title" :data-rate="previous + '%'">
<div class="progress-bar__rate" :style="{ width: dataRate == '-' ? 0 : dataRate }"></div>
</div>
</template>
<script>
export default {
name: "ProgressBar",
components: {},
props: {
value: {
type: Number,
default: 0,
},
target: {
type: Number,
default: 0,
},
previous: {
type: Number,
default: 0,
},
current: {
type: Number,
default: 0,
},
// total: {
// type: Number,
// default: 0,
// },
title: {
type: String,
default: "",
},
},
data() {
return {};
},
computed: {
dataRate() {
// if (this.current != 0 && this.target != 0) {
// console.log( '1111111111', this.current, this.target,this.previous);
return this.previous >= 100 ? 100 + '%' : parseFloat(this.previous).toFixed(2) + '%';
// } else if(this.previous != 0) {
// return this.previous + '%'
// }
},
},
methods: {},
};
</script>
<style scoped lang="scss">
.progress-bar {
height: 10px;
background-color: #002f6b;
border-radius: 4px;
margin-bottom: 12px;
position: relative;
&:before {
content: attr(data-title);
display: inline-block;
color: rgba(223, 241, 254, .8);
position: absolute;
bottom: -200%;
font-size: 12px;
}
&:after {
content: attr(data-rate);
display: inline-block;
color: rgba(223, 241, 254, .8);
position: absolute;
bottom: -200%;
right: 0;
font-size: 12px;
}
&:first-child {
&:after {
color: #11eae3;
}
}
&:nth-child(2) {
&:after {
color: #0e65fd;
}
}
.progress-bar__rate {
position: absolute;
display: inline-block;
height: 100%;
width: 0;
border-radius: 4px;
background: linear-gradient(to right,
#004c5e11 10%,
#004c5e,
#0ac0c0,
#11eae3);
}
&:first-child {
.progress-bar__rate {
background: linear-gradient(to right,
#004c5e11 10%,
#004c5e,
#0ac0c0,
#11eae3);
}
}
&:nth-child(2) {
.progress-bar__rate {
background: linear-gradient(to right, #0048a811, #0048a8, #0e65fd);
}
}
}
</style>

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-07 10:04:53 * @Date: 2024-05-07 10:04:53
* @LastEditTime: 2024-06-05 09:45:47 * @LastEditTime: 2024-07-09 15:16:43
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -30,8 +30,9 @@
</template> </template>
<script> <script>
import Container from "@/views/copilot/components/rightContainer.vue"; import Container from "@/views/copilot/components/efficiencyRightContainer.vue";
import leftContainer from "@/views/copilot/components/leftContainer.vue"; import leftContainer from "@/views/copilot/components/efficiencyLeftContainer.vue";
import ChipOeeVue from "./components/ChipOee.vue"; import ChipOeeVue from "./components/ChipOee.vue";
import ChipRateVue from "./components/ChipRate.vue"; import ChipRateVue from "./components/ChipRate.vue";
import StdRateVue from "./components/StdRate.vue"; import StdRateVue from "./components/StdRate.vue";
@@ -102,12 +103,12 @@ export default {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 16px; gap: 20px;
} }
.flex { .flex {
display: flex; display: flex;
gap: 16px; gap: 20px;
flex: 1; flex: 1;
} }

View File

@@ -1,35 +1,44 @@
export default ({ export default ({
titleValue, titleValue,
subtitle, subtitle,
titleSize,
subtitleSize,
previousSum, previousSum,
currentSum, currentSum,
targetSum, targetSum,
currentName, currentName,
preName, preName,
yesterday,
}) => ({ }) => ({
grid: { grid: {
left: '0%', left: 300,
right: 0, right: 0,
bottom: 0, bottom: 0,
top: 0, top: 0,
containLabel: true, containLabel: true,
}, },
tooltip: {}, tooltip: {
trigger: "item",
extraCssText: 'box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38); border- radius: 4px;opacity: 0.6;backdrop- filter: blur(6px);',
backgroundColor: '#001829',
borderColor: '#001829',
},
title: { title: {
text: titleValue, text: titleValue,
left: "44%", left: "48%",
top: "37%", top: "middle",
textAlign: "center", textAlign: "center",
textVerticalAlign:'auto',
textStyle: { textStyle: {
fontWeight: 600, fontWeight: 400,
fontSize: 26, fontSize: titleSize,
color: "#fffd", color: "rgba(223,241,254,1)",
}, },
subtext: `\u2002${subtitle}\u2002`, subtext: `\u2002${yesterday + '日良率'}\u2002`,
subtextStyle: { subtextStyle: {
fontSize: 14, fontSize: subtitleSize,
fontWeight: 100, fontWeight: 100,
color: "#fffd", color: "rgba(255,255,255,.7)",
align: "right", align: "right",
}, },
}, },
@@ -38,8 +47,8 @@ export default ({
{ {
type: "pie", type: "pie",
name: "当前良率", name: "当前良率",
radius: ["70%", "85%"], radius: ["80%", "92%"],
center: ["45%", "52%"], center: ["50%", "50%"],
emptyCircleStyle: { emptyCircleStyle: {
color: "#003982", color: "#003982",
}, },
@@ -47,8 +56,8 @@ export default ({
// 数据 series // 数据 series
{ {
type: "pie", type: "pie",
radius: ["70%", "85%"], radius: ["80%", "92%"],
center: ["45%", "52%"], center: ["50%", "50%"],
avoidLabelOvervlap: false, avoidLabelOvervlap: false,
label: { label: {
show: false, show: false,
@@ -61,7 +70,15 @@ export default ({
value: currentSum, value: currentSum,
name: currentName, name: currentName,
tooltip: { tooltip: {
formatter: `${currentName} : ${currentSum}` backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter:`
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${currentName}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;'>${currentSum}</span>
</div>
`
}, },
selected: false, selected: false,
itemStyle: { itemStyle: {
@@ -86,7 +103,15 @@ export default ({
value:(targetSum - currentSum) === 0 ? 1 : (targetSum - currentSum), value:(targetSum - currentSum) === 0 ? 1 : (targetSum - currentSum),
name: currentName, name: currentName,
tooltip: { tooltip: {
formatter: `${currentName} : ${currentSum}` backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter:`
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${currentName}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;'>${currentSum}</span>
</div>
`
}, },
itemStyle: { color: "transparent" }, itemStyle: { color: "transparent" },
label: { show: false }, label: { show: false },
@@ -96,8 +121,8 @@ export default ({
// 数据 series2 - 2023累计 // 数据 series2 - 2023累计
{ {
type: "pie", type: "pie",
radius: ["55%", "70%"], radius: ["70%", "80%"],
center: ["45%", "52%"], center: ["50%", "50%"],
avoidLabelOvervlap: false, avoidLabelOvervlap: false,
label: { label: {
show: false, show: false,
@@ -109,6 +134,17 @@ export default ({
{ {
value: previousSum, value: previousSum,
name: preName, name: preName,
tooltip: {
backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter:`
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${preName}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;'>${previousSum}</span>
</div>
`
},
selected: false, selected: false,
itemStyle: { itemStyle: {
borderJoin: "round", borderJoin: "round",
@@ -129,10 +165,19 @@ export default ({
}, },
}, },
{ {
value:previousSum == 0 value:previousSum === 0 ? 1 : 0,
? 1 name: preName,
: 0, tooltip: {
name: "-", backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter:`
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${preName}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;'>${previousSum}</span>
</div>
`
},
itemStyle: { color: "transparent" }, itemStyle: { color: "transparent" },
label: { show: false }, label: { show: false },
}, },

View File

@@ -28,7 +28,7 @@
import FactoryDataHeader from "./../components/FactoryDataHeader.vue"; import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/rightContainer.vue"; import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue"; import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue"; import ProdMonitor from "./components/bipvProdMonitor.vue";
import { deepClone } from "@/utils"; import { deepClone } from "@/utils";
// import Store from "./components/Store.vue"; // import Store from "./components/Store.vue";
// import Energy from "./components/Energy.vue"; // import Energy from "./components/Energy.vue";

View File

@@ -28,7 +28,7 @@
import FactoryDataHeader from "./../components/FactoryDataHeader.vue"; import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/rightContainer.vue"; import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue"; import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue"; import ProdMonitor from "./components/bipvProdMonitor";
import { deepClone } from "@/utils"; import { deepClone } from "@/utils";
// import Store from "./components/Store.vue"; // import Store from "./components/Store.vue";
// import Energy from "./components/Energy.vue"; // import Energy from "./components/Energy.vue";

View File

@@ -1,19 +1,24 @@
<template> <template>
<div class="left-chart-base"> <chart-container class="bar-chart-base">
<!-- <div class="legend"> <div class="left-chart-base">
<!-- <div class="legend">
<span v-for="item in legend" :key="item.label" class="legend-item" <span v-for="item in legend" :key="item.label" class="legend-item"
:style="{ fontSize: isFullscreen ? '0.85vw' : '0.73vw' }">{{ item.label }}</span> :style="{ fontSize: isFullscreen ? '0.85vw' : '0.73vw' }">{{ item.label }}</span>
</div> --> </div> -->
<div id="factoryEnergyChart" style="width: 100%; height: 100%"></div> <div v-if="energyCockpits.length != 0" id="factoryEnergyChart" style="width: 100%; height: 100%"></div>
</div> </div>
</chart-container>
</template> </template>
<script> <script>
import { debounce } from "@/utils/debounce"; import { debounce } from "@/utils/debounce";
import * as echarts from "echarts"; import * as echarts from "echarts";
import ChartContainer from "../../components/ChartContainer.vue";
// import CopilotButton from "./chartButton" // import CopilotButton from "./chartButton"
export default { export default {
components: { components: {
ChartContainer
// CopilotButton, // CopilotButton,
}, },
name: "Energy", name: "Energy",
@@ -50,13 +55,40 @@ export default {
options: { options: {
color: ["#FFD160", "#2760FF", "#12FFF5"], color: ["#FFD160", "#2760FF", "#12FFF5"],
grid: { grid: {
left: "7%", left: "9%",
right: "7%", right: "0%",
bottom: "15%", bottom: "15%",
top: "15%", top: "15%",
}, },
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter: params => {
var res = ``;
for (var i = 0, l = params.length; i < l; i++) {
let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
// console.log(item.color, color);
res +=
`<span style='border-radius:2px;display:inline-block;margin-right:4px;width:12px;height:12px;background-color:${color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${params[0].axisValueLabel}</span>` +
`<span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${params[i].value ? params[i].value : 0}</span>`;
}
const htmlContent = `
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
${res}
</div>
`;
return htmlContent;
// return res;
},
}, },
xAxis: { xAxis: {
axisTick: { axisTick: {
@@ -68,26 +100,40 @@ export default {
}, },
}, },
axisLabel: { axisLabel: {
interval: 0,//设置横坐标为斜
rotate:45, rotate:45,
color: "rgba(255, 255, 255, 0.7)", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
// formatter: function (value) {
// console.log(value);
// return value;
// },
}, },
data: [], data: [],
}, },
// dataZoom: [
// {
// // show: true,
// start: 0,
// end: 50
// }
// ],
yAxis: { yAxis: {
type: "value", type: "value",
name: "单位/片", name: "单位/片",
position: 'left',
nameTextStyle: { nameTextStyle: {
color: "rgba(255, 255, 255, 0.7)", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
align: "right", align: "right",
}, },
axisTick: { axisTick: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
color: "rgba(255, 255, 255, 0.7)", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize:16,
}, },
axisLine: { axisLine: {
show: true, show: true,
@@ -97,7 +143,7 @@ export default {
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: "#4561AE", color: "rgba(69,97,174,.4)",
}, },
}, },
}, },
@@ -155,7 +201,7 @@ export default {
// { offset: 1, color: "#12FFF5" + "00" }, // { offset: 1, color: "#12FFF5" + "00" },
// ]), // ]),
// }, // },
barWidth: 12, barWidth: 16,
itemStyle: { itemStyle: {
borderRadius: [10, 10, 0, 0], borderRadius: [10, 10, 0, 0],
color: { color: {
@@ -199,11 +245,11 @@ export default {
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */ /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
// isFullscreen(val) { // isFullscreen(val) {
// this.actualOptions.series.map((item) => { // this.actualOptions.series.map((item) => {
// item.barWidth = val ? 18 : 12; // item.barWidth = val ? 18 : 16;
// }); // });
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
// this.initOptions(this.actualOptions); // this.initOptions(this.actualOptions);
// }, // },
// series(val) { // series(val) {
@@ -221,9 +267,9 @@ export default {
// this.actualOptions = actualOptions; // this.actualOptions = actualOptions;
// this.initOptions(actualOptions); // this.initOptions(actualOptions);
// }, // },
energyCockpits() { // energyCockpits() {
this.initChart(); // this.initChart();
}, // },
isOpen(val) { isOpen(val) {
this.canvasReset(); this.canvasReset();
}, },
@@ -258,6 +304,9 @@ export default {
if (this.energyCockpits) { if (this.energyCockpits) {
this.energyCockpits.forEach(ele => { this.energyCockpits.forEach(ele => {
this.data.push(ele.targetProduction) this.data.push(ele.targetProduction)
if (ele.workOrderNumber.length > 4) {
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
}
this.orderXAxis.push(ele.workOrderNumber) this.orderXAxis.push(ele.workOrderNumber)
}); });
} }
@@ -268,6 +317,9 @@ export default {
if (this.energyCockpits) { if (this.energyCockpits) {
this.energyCockpits.forEach(ele => { this.energyCockpits.forEach(ele => {
this.data.push(ele.plannedInvestment) this.data.push(ele.plannedInvestment)
if (ele.workOrderNumber.length > 4) {
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
}
this.orderXAxis.push(ele.workOrderNumber) this.orderXAxis.push(ele.workOrderNumber)
}); });
} }
@@ -277,6 +329,9 @@ export default {
if (this.energyCockpits) { if (this.energyCockpits) {
this.energyCockpits.forEach(ele => { this.energyCockpits.forEach(ele => {
this.data.push(ele.actualInvestment) this.data.push(ele.actualInvestment)
if (ele.workOrderNumber.length > 4) {
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
}
this.orderXAxis.push(ele.workOrderNumber) this.orderXAxis.push(ele.workOrderNumber)
}); });
} }
@@ -286,6 +341,9 @@ export default {
if (this.energyCockpits) { if (this.energyCockpits) {
this.energyCockpits.forEach(ele => { this.energyCockpits.forEach(ele => {
this.data.push(ele.actualProduction) this.data.push(ele.actualProduction)
if (ele.workOrderNumber.length > 4) {
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
}
this.orderXAxis.push(ele.workOrderNumber) this.orderXAxis.push(ele.workOrderNumber)
}); });
} }
@@ -295,6 +353,9 @@ export default {
if (this.energyCockpits) { if (this.energyCockpits) {
this.energyCockpits.forEach(ele => { this.energyCockpits.forEach(ele => {
this.data.push(ele.wasteNum) this.data.push(ele.wasteNum)
if (ele.workOrderNumber.length > 4) {
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
}
this.orderXAxis.push(ele.workOrderNumber) this.orderXAxis.push(ele.workOrderNumber)
}); });
} }
@@ -305,6 +366,9 @@ export default {
this.energyCockpits.forEach(ele => { this.energyCockpits.forEach(ele => {
console.log(ele.reworkNum); console.log(ele.reworkNum);
this.data.push(ele.reworkNum) this.data.push(ele.reworkNum)
if (ele.workOrderNumber.length > 4) {
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
}
this.orderXAxis.push(ele.workOrderNumber) this.orderXAxis.push(ele.workOrderNumber)
}); });
} }
@@ -360,11 +424,11 @@ export default {
this.chart.dispose(); this.chart.dispose();
} }
this.chart = echarts.init(document.getElementById("factoryEnergyChart")); this.chart = echarts.init(document.getElementById("factoryEnergyChart"));
const actualOptions = JSON.parse(JSON.stringify(this.options)); // const actualOptions = JSON.parse(JSON.stringify(this.options));
actualOptions.xAxis.data = this.orderXAxis; this.options.xAxis.data = this.orderXAxis;
actualOptions.series[0].data = this.data; this.options.series[0].data = this.data;
this.actualOptions = actualOptions; // this.actualOptions = actualOptions;
this.chart.setOption(actualOptions); this.chart.setOption(this.options);
}, },
}, },
}; };

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-30 08:58:39 * @Date: 2024-05-30 08:58:39
* @LastEditTime: 2024-06-07 09:29:45 * @LastEditTime: 2024-07-26 16:48:15
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -9,7 +9,7 @@
<chart-container class="bar-chart-base"> <chart-container class="bar-chart-base">
<div class="legend"> <div class="legend">
<span v-for="(item,index) in legend" :key="index" class="legend-item" <span v-for="(item,index) in legend" :key="index" class="legend-item"
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span> :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
</div> </div>
<div ref="oeeChart" style="height:100%"></div> <div ref="oeeChart" style="height:100%"></div>
</chart-container> </chart-container>
@@ -56,13 +56,70 @@ export default {
actualOptions: null, actualOptions: null,
options: { options: {
grid: { grid: {
left: "5%", left: "10%",
right: "0%", right: "3%",
bottom: "3%", bottom: "14%",
top: "15%", top: "20%",
containLabel: true, // containLabel: true,
},
// tooltip: {
// trigger: "axis",
// axisPointer: {
// // type: "cross",
// crossStyle: {
// color: "rgba(237,237,237,0.5)",
// },
// },
// extraCssText: 'box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38); border- radius: 4px;opacity: 0.6;backdrop- filter: blur(6px);',
// backgroundColor: '#001829',
// borderColor: '#001829',
// // textStyle: {
// // color:'rgba(255, 255, 255, 0.85)'
// // },
// formatter: params => {
// console.log('params', params)
// var res = `<span style='color:rgba(255,255,255,0.85)'>${params[0].axisValueLabel}</span>`;
// for (var i = 0, l = params.length; i < l; i++) {
// res +=
// "<br/>" +
// `<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[i].color}'></span>` +
// `<span style='display:inline-block;width:150px;color:rgba(255,255,255,0.65);font-size:14px;'>${params[i].seriesName}</span>` +
// `<span style='color:rgba(255,255,255,0.65);font-size:14px;'>${params[i].value}</span>`;
// }
// return res;
// },
// },
tooltip: {
trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter: params => {
var res = `<span style='display:inline-block;color:rgba(255,255,255,0.85);margin-bottom:8px;font-size:16px;letter-spacing: 2px;'>${params[0].axisValueLabel}</span>`;
for (var i = 0, l = params.length; i < l; i++) {
let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
// console.log(item.color, color);
res +=
"<br/>" +
`<span style='border-radius:2px;display:inline-block;margin-right:4px;width:12px;height:12px;background-color:${color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;letter-spacing: 2px;'>${params[i].seriesName}</span>` +
`<span style='display:inline-block;width:60px;color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;text-align:right'>${params[i].value ? params[i].value : 0}</span>`;
}
const htmlContent = `
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
${res}
</div>
`;
return htmlContent;
// return res;
},
}, },
tooltip: {},
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false, show: false,
@@ -73,24 +130,25 @@ export default {
}, },
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
data: this.xAxis, data: this.xAxis,
}, },
yAxis: { yAxis: {
name: "单位/片", name: "单位/片",
position: 'left',
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
align: "right", align: "right",
}, },
axisTick: { axisTick: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
axisLine: { axisLine: {
show: true, show: true,
@@ -100,7 +158,7 @@ export default {
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: "#4561AE", color: "rgba(69,97,174,.4)",
}, },
}, },
}, },
@@ -108,7 +166,7 @@ export default {
{ {
name: "FTO", // this.series[0].name, name: "FTO", // this.series[0].name,
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
itemStyle: { itemStyle: {
borderRadius: [10, 10, 0, 0], borderRadius: [10, 10, 0, 0],
color: { color: {
@@ -143,7 +201,7 @@ export default {
{ {
name: "", // this.series[1].name, name: "", // this.series[1].name,
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
// tooltip: { // tooltip: {
// valueFormatter: function (value) { // valueFormatter: function (value) {
// return value + " ml"; // return value + " ml";
@@ -175,7 +233,7 @@ export default {
{ {
name: "", // "2024年目标值", name: "", // "2024年目标值",
type: "line", type: "line",
barWidth: 12, barWidth: 16,
itemStyle: { itemStyle: {
borderRadius: [10, 10, 0, 0], borderRadius: [10, 10, 0, 0],
color:'#f3c000' color:'#f3c000'
@@ -201,12 +259,12 @@ export default {
}, },
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */ /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
isFullscreen(val) { isFullscreen(val) {
this.actualOptions.series.map((item) => { this.options.series.map((item) => {
item.barWidth = val ? 18 : 12; item.barWidth = val ? 18 : 16;
}); });
this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; this.options.xAxis.axisLabel.fontSize = val ? 18 : 16;
this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; this.options.yAxis.axisLabel.fontSize = val ? 18 : 16;
this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; this.options.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
// if (val === false && this.isOpen === true) { // if (val === false && this.isOpen === true) {
// console.log(val) // console.log(val)
// this.width = 97 + '%' // this.width = 97 + '%'
@@ -216,12 +274,12 @@ export default {
// this.canvasReset() // this.canvasReset()
// } // }
// this.actualOptions.series.map((item) => { // this.actualOptions.series.map((item) => {
// item.barWidth = val ? 18 : 12; // item.barWidth = val ? 18 : 16;
// }); // });
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
this.initChart(this.actualOptions) this.initChart(this.options)
this.canvasReset() this.canvasReset()
}, },
series(val) { series(val) {
@@ -231,16 +289,17 @@ export default {
} }
// console.log('val', val) // console.log('val', val)
const actualOptions = JSON.parse(JSON.stringify(this.options)) const actualOptions = JSON.parse(JSON.stringify(this.options))
console.log(actualOptions);
// actualOptions.xAxis.data = val // actualOptions.xAxis.data = val
console.log(actualOptions) console.log(actualOptions)
actualOptions.series[0].data = val[0].data; this.options.series[0].data = val[0].data;
actualOptions.series[0].name = val[0].name; this.options.series[0].name = val[0].name;
actualOptions.series[1].data = val?.[1]?.data; this.options.series[1].data = val?.[1]?.data;
actualOptions.series[1].name = val?.[1]?.name; this.options.series[1].name = val?.[1]?.name;
actualOptions.series[2].data = val?.[2]?.data || []; this.options.series[2].data = val?.[2]?.data || [];
actualOptions.series[2].name = val?.[2]?.name || ""; this.options.series[2].name = val?.[2]?.name || "";
this.actualOptions = actualOptions; this.actualOptions = actualOptions;
this.initChart(actualOptions); this.initChart(this.options);
}, },
}, },
mounted() { mounted() {
@@ -277,27 +336,28 @@ export default {
this.chart.dispose(); this.chart.dispose();
} }
this.chart = echarts.init(this.$refs.oeeChart); this.chart = echarts.init(this.$refs.oeeChart);
this.chart.setOption(this.actualOptions); this.chart.setOption(this.options);
}, },
}, },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.bar-chart-base { .bar-chart-base {
// position: relative; // position: relative;
.legend { .legend {
position: absolute; position: absolute;
top: 5.2vh; top: 6vh;
right: 1vw; right: 13vw;
} }
.legend-item { .legend-item {
position: relative; position: relative;
// font-size: 12px; font-size: 1.2vw;
margin-right:1.2vw; margin-right:1.2vw;
color: #DFF1FE;
&::before { &::before {
content: ""; content: "";
display: inline-block; display: inline-block;
@@ -347,4 +407,8 @@ export default {
transform: translateY(-50%) translateX(50%); transform: translateY(-50%) translateX(50%);
} }
} }
.echarts-tooltip-dark {
background: #001829;
}
</style> </style>

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-30 09:00:01 * @Date: 2024-05-30 09:00:01
* @LastEditTime: 2024-05-30 09:50:02 * @LastEditTime: 2024-07-24 10:31:52
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -19,7 +19,7 @@ export default {
props: { props: {
noScroll: { noScroll: {
type: Boolean, type: Boolean,
default: false, default: true,
}, },
}, },
data() { data() {

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-29 14:48:06 * @Date: 2024-05-29 14:48:06
* @LastEditTime: 2024-06-07 14:11:01 * @LastEditTime: 2024-06-18 14:49:25
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -54,8 +54,20 @@ export default {
legend() { legend() {
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间
// var day2 = new Date();
// day2.setTime(day2.getTime());
// var s2 = (day2.getMonth() + 1) + "月" + day2.getDate() + '日';
// const today = new Date().getDate();
// let yesterday = new Date().getDate() -1;
// const month = new Date().getMonth() + 1;
// const lastMonth = new Date().getMonth() + 1 === 12 ? 1 : new Date().getMonth() + 1 - 1;
// const year = new Date().getFullYear();
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -65,15 +77,18 @@ export default {
const month = new Date().getMonth() + 1; const month = new Date().getMonth() + 1;
const lastMonth = new Date().getMonth() + 1 === 12 ? 1 : new Date().getMonth() + 1 - 1; const lastMonth = new Date().getMonth() + 1 === 12 ? 1 : new Date().getMonth() + 1 - 1;
const year = new Date().getFullYear(); const year = new Date().getFullYear();
if (this.period === 1 && this.than === '同比') { if (this.period === 1 && this.than === '同比') {
items = [ items = [
{ label: `${year-1}${month}${today}`, color: "#12f7f1" }, { label: `${year - 1}${yesterday}累计` },
{ label: `${month}${today}`, color: "#58adfa" }, { label: `${yesterday}累计`, },
// { label: `${month}月${today}日目标`, },
]; ];
} else if (this.period ===1 && this.than === '环比') { } else if (this.period === 1 && this.than === '环比') {
items = [ items = [
{ label: `${yesterday}`, color: "#12f7f1" }, { label: `${dayBeYes}累计` },
{ label: `${month}${today}`, color: "#58adfa" }, { label: `${yesterday}累计` },
// { label: `${month}月${today}日目标`, },
]; ];
} else if (this.period === 2 && this.than === '同比') { } else if (this.period === 2 && this.than === '同比') {
items = [ items = [
@@ -158,8 +173,11 @@ function getTemplate(period, dataList, than) {
// console.log('dataList',dataList); // console.log('dataList',dataList);
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -172,11 +190,11 @@ function getTemplate(period, dataList, than) {
if (period === 1 && than === '同比') { if (period === 1 && than === '同比') {
items = [ items = [
{ {
name: `${year-1}${month}${today}`, name: `${year - 1}${yesterday}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
}, },
{ {
name: `${month}${today}`, name: `${yesterday}`,
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
@@ -184,11 +202,11 @@ function getTemplate(period, dataList, than) {
} else if (period ===1 && than === '环比') { } else if (period ===1 && than === '环比') {
items = [ items = [
{ {
name: `${yesterday}`, name: `${dayBeYes}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
}, },
{ {
name: `${month}${today}`, name: `${yesterday}`,
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },

View File

@@ -1,8 +1,15 @@
<!-- <!--
* @Author: zhp
* @Date: 2024-06-03 15:38:31
* @LastEditTime: 2024-07-09 16:49:22
* @LastEditors: zhp
* @Description:
-->
<!--
filename: ContainerIcon.vue filename: ContainerIcon.vue
author: liubin author: liubin
date: 2024-04-09 16:41:36 date: 2024-04-09 16:41:36
description: description:
--> -->
<template> <template>
@@ -49,8 +56,8 @@ export default {
.container-icon { .container-icon {
// width: 32px; // width: 32px;
// height: 32px; // height: 32px;
width: 1.701vw; width: 1.4vw;
height: 1.701vw; height: 1.4vw;
background: #ccc2; background: #ccc2;
} }
</style> </style>

View File

@@ -1,19 +1,20 @@
<template> <template>
<div class="order-container"> <div class="order-container">
<div class="table"> <div class="table">
<dv-scroll-board v-if="showTable" :config="config" style="width: 100%; height: 100%" ref="orderScrollBoard" /> <dv-scroll-board v-if="showTable" :config="config"
style="width: 100%; height: 100%; color: rgba(255, 255, 255,1);font-size:16," ref="orderScrollBoard" />
</div> </div>
<div class="chart"> <div class="chart">
<div class="chart-title"> <div class="chart-title">
<span class="title">工单情况</span> <span class="title">工单情况</span>
<span class="line"></span> <span class="line"></span>
</div> </div>
<div class="button-type" style="margin-left: auto;position: absolute;right: 1%;top: 57%;z-index: 999;"> <div class="button-type" style="margin-left: auto;position: absolute;right: 3%;top: 57%;z-index: 999;">
<CopilotButton v-for="i in ['目标产量', '计划投入', '实际投入', '实际产出', '废品数量', '待再加工']" :key="i" :label="i" <CopilotButton v-for="i in ['目标产量', '计划投入', '实际投入', '实际产出', '废品数量', '待再加工']" :key="i" :label="i"
:active="i === type" @click="() => $emit('update:type', i)" /> :active="i === type" @click="() => $emit('update:type', i)" />
</div> </div>
<barChartBase :type="type" :energyCockpits="prodOrder" ref="barChart" <barChartBase :type="type" :energyCockpits="prodOrder" ref="barChart" style="height: 0;flex:1">
style="height: 0;flex:1"></barChartBase> </barChartBase>
</div> </div>
</div> </div>
@@ -40,9 +41,10 @@ export default {
evenRowBGC: "rgba(rgba(2, 13, 45, 0.18)", evenRowBGC: "rgba(rgba(2, 13, 45, 0.18)",
data: [], data: [],
rowNum: 12, rowNum: 12,
fontSize:16,
waitTime: 3000, waitTime: 3000,
columnWidth: [100], columnWidth: [150],
align: ["center"], align: ["left"],
carousel: "page", carousel: "page",
}, },
}; };
@@ -99,53 +101,39 @@ export default {
let arr = []; let arr = [];
// arr.push(i + 1); // arr.push(i + 1);
arr.push( arr.push(
`<span title=${this.prodOrder[i].workOrderNumber || ""}>${ `<span title=${this.prodOrder[i].workOrderNumber || ""} style='color: rgba(223,241,254,.8);font-size:16px' >${
this.prodOrder[i].workOrderNumber || "" this.prodOrder[i].workOrderNumber || ""
}</span>` }</span>`,
); `<span style='color: rgba(223,241,254,.8);font-size:16px' title=${this.prodOrder[i].orderStatus || ""}>${this.prodOrder[i].orderStatus === 1 ? '未开始' : this.prodOrder[i].orderStatus === 2 ? '进行中' : '已完成' || ""
arr.push( }</span>`,
`<span title=${this.prodOrder[i].inStatus || ""}>${ `<span style='color: rgba(223,241,254,.8);font-size:1.2em' title=${this.prodOrder[i].plannedInvestment || ""}>${this.prodOrder[i].plannedInvestment || ""
this.prodOrder[i].inStatus || "" }</span>`,
}</span>` `<span style='color: rgba(223,241,254,.8);font-size:16px' title=${this.prodOrder[i].actualInvestment || ""}>${this.prodOrder[i].actualInvestment || ""
); }</span>`,
arr.push( `<span style='color: rgba(223,241,254,.8);font-size:16px' title=${this.prodOrder[i].targetProduction || ""}>${this.prodOrder[i].targetProduction || ""
`<span title=${this.prodOrder[i].plannedInvestment || ""}>${ }</span>`,
this.prodOrder[i].plannedInvestment || "" `<span style='color: rgba(223,241,254,.8);font-size:16px' title=${this.prodOrder[i].actualProduction || ""}>${this.prodOrder[i].actualProduction || ""
}</span>` }</span>`,
); `<span style="display:inline-block;width:45px;color: rgba(223,241,254,.8)">${this.prodOrder[i].productionProgress
arr.push( ? parseFloat((this.prodOrder[i].productionProgress * 100).toFixed(2)) + "%"
`<span title=${this.prodOrder[i].actualInvestment || ""}>${this.prodOrder[i].actualInvestment || "" : "0%"
}</span>` }</span>
); <div style="display:inline-block;height:20px;vertical-align:top;margin-top:3px;">
arr.push( <svg xmlns="http://www.w3.org/200/svg" height="18" width="18">
`<span title=${this.prodOrder[i].targetProduction || ""}>${this.prodOrder[i].targetProduction || ""
}</span>`
);
arr.push(
`<span title=${this.prodOrder[i].actualProduction || ""}>${this.prodOrder[i].actualProduction || ""
}</span>`
);
arr.push(`<span style="display:inline-block;width:45px;">${
this.prodOrder[i].productionProgress
? this.prodOrder[i].productionProgress.toFixed(0) + "%"
: "0%"
}</span>
<div style="display:inline-block;height:20px;margin-top:-5px;vertical-align:middle;">
<svg xmlns="http://www.w3.org/200/svg" height="20" width="20">
<circle cx="10" cy="10" r="6" fill="none" stroke="#283851" stroke-width="4" stroke-linecap="round"/> <circle cx="10" cy="10" r="6" fill="none" stroke="#283851" stroke-width="4" stroke-linecap="round"/>
<circle style="transform-origin: center;transform: rotate(-90deg);" id="J_progress_bar" cx="10" cy="10" r="6" fill="none" stroke="#47FF27" stroke-width="4" stroke-dasharray="${ <circle style="transform-origin: center;transform: rotate(-90deg);" id="J_progress_bar" cx="10" cy="10" r="6" fill="none" stroke="#47FF27" stroke-width="4" stroke-dasharray="${this.prodOrder[i].productionProgress
this.prodOrder[i].productionProgress ? this.prodOrder[i].productionProgress.toFixed(2) *100 *
? this.prodOrder[i].productionProgress.toFixed(0) * 37.68 *
37.68 * 0.01 +
0.01 + "," +
"," + (1 -
(1 - this.prodOrder[i].productionProgress.toFixed(2) * 0.01) * 100 *
this.prodOrder[i].productionProgress.toFixed(0) * 0.01) * 37.68
37.68 : 0 + "," + 37.68
: 0 + "," + 37.68
}"/> }"/>
</svg> </svg>
</div>`); </div>`
)
outArr.push(arr); outArr.push(arr);
} }
this.config.data = outArr; this.config.data = outArr;
@@ -169,7 +157,6 @@ export default {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
// gap: 6px; // gap: 6px;
.chart-title { .chart-title {
margin-top: 5px; margin-top: 5px;
@@ -202,8 +189,9 @@ export default {
height: 1px; // display: inline-block; height: 1px; // display: inline-block;
border: 1px solid; border: 1px solid;
// display: inline-block; // display: inline-block;
border-image: linear-gradient(90deg, rgba(25, 146, 255, 0) 10%, rgba(95, 190, 249, 1), rgba(0, 120, 228, 0) 90%, ) 2 2; // border-image: linear-gradient(to right, transparent 5%, rgba(95, 190, 249, 1) 20%, transparent 90%, )1;
backdrop-filter: blur(3px); border-image: linear-gradient(to right, transparent 10%, rgba(95, 190, 249, 1 )30%, transparent 90%,)1;
// backdrop-filter: blur(3px);
} }
} }
} }

View File

@@ -118,10 +118,14 @@
<div class="chart"> <div class="chart">
<div class="chart-title"> <div class="chart-title">
<span class="title">生产情况</span> <span class="title">生产情况</span>
<span class="line"></span> <div class="button-than" style="position: absolute;right: 0%;">
<CopilotButton v-for="i in ['同比', '环比']" :key="i" :label="i" :active="i === than"
@click="() => $emit('update:than', i)" />
</div>
<!-- <span class="line"></span> -->
</div> </div>
<barChartBase :companyId="companyId" :than="than" :period="period" :data="factoryData" ref="barChart" <barChartBase v-if="factoryData.length != 0" :companyId="companyId" :than="than" :period="period" :data="factoryData"
style="height: 0;flex:1"> ref="barChart" style="height: 0;flex:1">
</barChartBase> </barChartBase>
</div> </div>
</div> </div>
@@ -129,10 +133,12 @@
<script> <script>
import { number } from 'echarts'; import { number } from 'echarts';
import barChartBase from './ChipOee' import barChartBase from './ChipOee'
import CopilotButton from "./button.vue"
export default { export default {
name: "ProdMonitor", name: "ProdMonitor",
components: { components: {
barChartBase, barChartBase,
CopilotButton
}, },
data() { data() {
return { return {
@@ -153,6 +159,9 @@ export default {
type: Number, type: Number,
default:0 default:0
}, },
than: {
type: String,
},
than: { than: {
type: String, type: String,
default: '同比', default: '同比',
@@ -181,10 +190,14 @@ export default {
}, },
mounted() { mounted() {
this.makeData(); this.makeData();
this.$nextTick(() => {
let button = document.getElementsByClassName('button-than')
button[0].children[0].style.borderRadius = '4px 0 0 4px'
button[0].children[1].style.borderRadius = '0px 4px 4px 0'
})
}, },
methods: { methods: {
makeData() { makeData() {
console.log('msgObj', this.msgObj);
this.msgObj.chip = {}; this.msgObj.chip = {};
this.msgObj.stand = {}; this.msgObj.stand = {};
this.msgObj.bipv = {}; this.msgObj.bipv = {};
@@ -209,13 +222,13 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.chart{ .chart{
flex: 1; flex: 1.3;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
// gap: 6px; // gap: 6px;
.chart-title{ .chart-title{
margin-top: 5px; margin-top: 20px;
// flex: 1; // flex: 1;
// gap: 6px; // gap: 6px;
height: 1.5vw; height: 1.5vw;
@@ -233,19 +246,19 @@ export default {
// width: 5vw; // width: 5vw;
color: #FFFFFF; color: #FFFFFF;
line-height: 24px; line-height: 24px;
text-align: left; // text-align: left;
font-style: normal; font-style: normal;
display: inline-block; display: inline-block;
} }
.line{ // .line{
flex: 1; // flex: 1;
// width: 80%; // // width: 80%;
height: 1px; // display: inline-block; // height: 1px; // display: inline-block;
border: 1px solid; // border: 1px solid;
// display: inline-block; // // display: inline-block;
border-image: linear-gradient(90deg, rgba(25, 146, 255, 0) 10%, rgba(95, 190, 249, 1), rgba(0, 120, 228, 0) 90%,) 2 2; // border-image: linear-gradient(90deg, rgba(25, 146, 255, 0) 10%, rgba(95, 190, 249, 1), rgba(0, 120, 228, 0) 90%,) 2 2;
backdrop-filter: blur(3px); // backdrop-filter: blur(3px);
} // }
} }
} }
.data{ .data{
@@ -347,7 +360,7 @@ export default {
} }
.fto-box { .fto-box {
flex: 1; flex: .5;
.type::before { .type::before {
content: ""; content: "";
@@ -366,15 +379,15 @@ export default {
} }
.std-box { .std-box {
flex: 1.3; flex: .6;
} }
.chip-box { .chip-box {
flex: 1.3; flex: .6;
} }
.bipv-box { .bipv-box {
flex: 1.3; flex: .6;
} }
.std-box, .std-box,

View File

@@ -0,0 +1,422 @@
<!--
* @Author: zhp
* @Date: 2024-07-25 10:10:07
* @LastEditTime: 2024-07-26 16:47:15
* @LastEditors: zhp
* @Description:
-->
<template>
<div class="prod-monitor">
<div class="data">
<div class="fto-box">
<div class="icon">
<img src="./../assets/images/fto.png" alt="" style="width: 2.1875vw; height: 2.2875vw" />
</div>
<div class="middle-box">
<span class="type">玻璃类型</span>
<span class="type-name">FTO</span>
</div>
<div class="right-box">
<span class="type">投入数量</span>
<span class="num">{{ prodFto[0] ? prodFto[0].chipInput.toLocaleString() : 0 }}</span>
</div>
</div>
<div class="std-box">
<div class="icon">
<img src="./../assets/images/std.png" alt="" style="width: 2.1875vw; height: 2.1875vw" />
</div>
<div class="middle-box">
<div class="separate">
<div>
<span class="type">玻璃类型</span>
<span class="type-name">标准组件</span>
</div>
<div>
<span class="type">良品数量</span>
<span class="type-name">{{
msgObj.stand.goodNumber ? msgObj.stand.goodNumber.toLocaleString() : 0
}}</span>
</div>
</div>
</div>
<div class="right-box">
<div class="separate">
<div>
<span class="type">生产数量</span>
<span class="num">{{
msgObj.stand.outputNumber ? msgObj.stand.outputNumber.toLocaleString() : 0
}}</span>
</div>
<div>
<span class="type1">良品率</span>
<span class="num">{{ msgObj.stand.yieldRate ? msgObj.stand.yieldRate.toFixed(2) : 0 }}%</span>
</div>
</div>
</div>
</div>
<div class="chip-box">
<div class="icon">
<img src="./../assets/images/chip.png" alt="" style="width: 2.1875vw; height: 2.1875vw" />
</div>
<div class="middle-box">
<div class="separate">
<div>
<span class="type">玻璃类型</span>
<span class="type-name">芯片</span>
</div>
<div>
<span class="type">良品数量</span>
<span class="type-name">{{
msgObj.chip.goodNumber ? msgObj.chip.goodNumber.toLocaleString() : 0
}}</span>
</div>
</div>
</div>
<div class="right-box">
<div class="separate">
<div>
<span class="type">生产数量</span>
<span class="num">{{
msgObj.chip.outputNumber ? msgObj.chip.outputNumber.toLocaleString() : 0
}}</span>
</div>
<div>
<span class="type1">良品率</span>
<span class="num">{{ msgObj.chip.yieldRate ? msgObj.chip.yieldRate.toFixed(2) : 0 }}%</span>
</div>
</div>
</div>
</div>
<div class="bipv-box" v-if="companyId != 0">
<div class="icon">
<img src="./../assets/images/bipv.png" alt="" style="width: 2.1875vw; height: 2.1875vw" />
</div>
<div class="middle-box">
<div class="separate">
<div>
<span class="type">玻璃类型</span>
<span class="type-name">BIPV</span>
</div>
<div>
<span class="type">良品数量</span>
<span class="type-name">{{
msgObj.bipv.goodNumber ? msgObj.bipv.goodNumber.toLocaleString() : 0
}}</span>
</div>
</div>
</div>
<div class="right-box">
<div class="separate">
<div>
<span class="type">生产数量</span>
<span class="num">{{
msgObj.bipv.outputNumber ? msgObj.bipv.outputNumber.toLocaleString() : 0
}}</span>
</div>
<div>
<span class="type1">良品率</span>
<span class="num">{{ msgObj.bipv.yieldRate ? msgObj.bipv.yieldRate.toFixed(2) : 0 }}%</span>
</div>
</div>
</div>
</div>
</div>
<div class="chart">
<div class="chart-title">
<span class="title">生产情况</span>
<div class="button-than" style="position: absolute;right: 0%;">
<CopilotButton v-for="i in ['同比', '环比']" :key="i" :label="i" :active="i === than"
@click="() => $emit('update:than', i)" />
</div>
<!-- <span class="line"></span> -->
</div>
<barChartBase v-if="factoryData.length != 0" :companyId="companyId" :than="than" :period="period" :data="factoryData"
ref="barChart" style="height: 0;flex:1">
</barChartBase>
</div>
</div>
</template>
<script>
import { number } from 'echarts';
import barChartBase from './ChipOee'
import CopilotButton from "./button.vue"
export default {
name: "ProdMonitor",
components: {
barChartBase,
CopilotButton
},
data() {
return {
bipvVis:false,
msgObj: {
stand: {},
chip: {},
bipv: {},
},
};
},
props: {
period: {
type: Number,
default: 1,
},
companyId: {
type: Number,
default:0
},
than: {
type: String,
},
than: {
type: String,
default: '同比',
},
prodOutPut: {
type: Array,
default: [],
},
prodFto: {
type: Array,
default: [],
},
factoryData: {
type: Object,
default: {},
},
showBipv: {
type: Boolean,
default:true,
}
},
watch: {
prodOutPut() {
this.makeData();
},
},
mounted() {
this.makeData();
this.$nextTick(() => {
let button = document.getElementsByClassName('button-than')
button[0].children[0].style.borderRadius = '4px 0 0 4px'
button[0].children[1].style.borderRadius = '0px 4px 4px 0'
})
},
methods: {
makeData() {
this.msgObj.chip = {};
this.msgObj.stand = {};
this.msgObj.bipv = {};
if (this.prodOutPut.length > 0) {
this.prodOutPut.map((item) => {
if (item.glassType === 0) {
this.msgObj.chip = item;
} else if (item.glassType === 1) {
this.msgObj.stand = item;
} else if (item.glassType === 2) {
this.msgObj.bipv = item;
}
});
}
},
},
};
</script>
<style lang="scss" scoped>
.prod-monitor {
height: 100%;
display: flex;
flex-direction: column;
.chart{
flex: 1;
display: flex;
flex-direction: column;
position: relative;
// gap: 6px;
.chart-title{
margin-top: 20px;
// flex: 1;
// gap: 6px;
height: 1.5vw;
width: 100%;
display: flex;
align-items: center;
// flex-direction: column;
// flex-wrap: nowrap;
// justify-content: end
// margin-top: 10px;
.title{
// flex: 1;
font-weight: 400;
font-size: 24px;
// width: 5vw;
color: #FFFFFF;
line-height: 24px;
// text-align: left;
font-style: normal;
display: inline-block;
}
// .line{
// flex: 1;
// // width: 80%;
// height: 1px; // display: inline-block;
// border: 1px solid;
// // display: inline-block;
// border-image: linear-gradient(90deg, rgba(25, 146, 255, 0) 10%, rgba(95, 190, 249, 1), rgba(0, 120, 228, 0) 90%,) 2 2;
// backdrop-filter: blur(3px);
// }
}
}
.data{
flex: 1;
display: flex;
gap: 6px;
flex-direction: column;
.fto-box,
.std-box,
.chip-box,
.bipv-box {
box-shadow: inset 0 0 12px 2px #fff3;
border-radius: 4px;
display: flex;
align-items: center;
.icon {
flex: 1;
text-align: center;
}
.middle-box {
flex: 2.086;
position: relative;
}
.right-box {
flex: 2.424;
position: relative;
}
.type {
display: inline-block;
font-size: 0.9375vw;
color: #6db6ff;
position: relative;
text-align: right;
padding-right: 0.417vw;
letter-spacing: 2px;
width: 6.25vw;
}
.type1 {
display: inline-block;
font-size: 0.9375vw;
color: #6db6ff;
position: relative;
text-align: right;
padding-right: 0.6vw;
width: 6.25vw;
padding-left: 1.6vw;
text-align: justify;
text-align-last: justify;
}
.type-name {
font-size: 1.042vw;
color: #fff;
position: relative;
text-align: left;
padding-left: 0.573vw;
}
.type-name::before {
content: "";
display: inline-block;
width: 1px;
height: 1.042vw;
border: 1px solid;
border-image: linear-gradient(180deg,
rgba(0, 176, 243, 0),
rgba(31, 143, 255, 1)) 2 2;
position: absolute;
left: 0;
top: 4px;
}
.num {
font-size: 1.042vw;
color: #fff;
position: relative;
text-align: left;
padding-left: 0.573vw;
}
.num::before {
content: "";
display: inline-block;
width: 1px;
height: 1.042vw;
border: 1px solid;
border-image: linear-gradient(180deg,
rgba(0, 176, 243, 0),
rgba(31, 143, 255, 1)) 2 2;
position: absolute;
left: 0;
top: 4px;
}
}
.fto-box {
flex: 1;
.type::before {
content: "";
display: inline-block;
width: 1px;
height: 1.6146vw;
border: 1px solid;
border-image: linear-gradient(135deg,
rgba(0, 176, 243, 0),
rgba(31, 143, 255, 1),
rgba(31, 143, 255, 0)) 2 2;
position: absolute;
left: 0;
top: -2px;
}
}
.std-box {
flex: 1;
}
.chip-box {
flex: 1;
}
.bipv-box {
flex: 1;
}
.std-box,
.chip-box,
.bipv-box {
.separate::before {
content: "";
display: inline-block;
width: 1px;
height: 3.125vw;
border: 1px solid;
border-image: linear-gradient(135deg,
rgba(0, 176, 243, 0),
rgba(31, 143, 255, 1),
rgba(31, 143, 255, 0)) 2 2;
position: absolute;
left: 0;
top: -2px;
}
}
}
}
</style>

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-06 14:22:56 * @Date: 2024-06-06 14:22:56
* @LastEditTime: 2024-06-07 10:53:39 * @LastEditTime: 2024-07-02 13:54:08
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -62,7 +62,7 @@ button {
font-size: 16px; font-size: 16px;
color: #FFFFFF; color: #FFFFFF;
line-height: 22px; line-height: 22px;
letter-spacing: 5px; /* letter-spacing: 5px; */
text-align: center; text-align: center;
font-style: normal; font-style: normal;
letter-spacing: 10px; letter-spacing: 10px;

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-07 08:37:17 * @Date: 2024-06-07 08:37:17
* @LastEditTime: 2024-06-07 11:04:41 * @LastEditTime: 2024-07-18 16:16:24
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -59,7 +59,7 @@ button {
font-size: 18px; */ font-size: 18px; */
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 14px;
color: #FFFFFF; color: #FFFFFF;
line-height: 22px; line-height: 22px;
letter-spacing: 5px; letter-spacing: 5px;
@@ -91,7 +91,7 @@ button {
font-size: 18px; */ font-size: 18px; */
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 14px;
color: #FFFFFF; color: #FFFFFF;
line-height: 22px; line-height: 22px;
letter-spacing: 5px; letter-spacing: 5px;

View File

@@ -1,23 +1,15 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-06-05 09:36:07 * @Date: 2024-06-05 09:36:07
* @LastEditTime: 2024-06-05 09:38:23 * @LastEditTime: 2024-07-24 13:39:01
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<!--
filename: Container.vue
author: liubin
date: 2024-04-09 10:44:09
description:
-->
<template> <template>
<div class="copilot-container"> <div class="copilot-container">
<!-- refresh btn --> <!-- refresh btn -->
<button <button v-if="false" style="
v-if="false"
style="
appearance: none; appearance: none;
outline: none; outline: none;
border: none; border: none;
@@ -27,43 +19,26 @@
position: absolute; position: absolute;
top: 8px; top: 8px;
right: 8px; right: 8px;
" " @click="$emit('refresh')">
@click="$emit('refresh')" <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
> style="width: 24px; height: 24px">
<svg <path stroke-linecap="round" stroke-linejoin="round"
xmlns="http://www.w3.org/2000/svg" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg> </svg>
</button> </button>
<!-- decoration --> <!-- decoration -->
<div class="corner tl"></div> <div class="corner tl"></div>
<div class="corner tr"></div> <div class="corner tr"></div>
<div class="corner bl"></div> <div class="corner bl"></div>
<div class="corner br"></div> <div class="corner br"></div>
<!-- content --> <!-- content -->
<div <div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
class="container-head" <Icon style="margin-left: 16px;" :icon="icon"></Icon>
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
</div> </div>
<div <div class="container-body" :class="[
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left', side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]" ]">
>
<slot /> <slot />
</div> </div>
</div> </div>
@@ -99,6 +74,8 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.copilot-container { .copilot-container {
height: 0; height: 0;
flex: 1; flex: 1;
@@ -106,36 +83,40 @@ export default {
flex-direction: column; flex-direction: column;
position: relative; position: relative;
box-shadow: inset 0 0 20px 1px #fff1; box-shadow: inset 0 0 20px 1px #fff1;
backdrop-filter: blur(4px); border-right: .13vw solid;
// border-image: linear-gradient(to bottom,transparent 10%,
// #024798 20%,
// transparent 90%) 1;
border-image:radial-gradient(circle at center,
#1481fd 2%,
#024798 95%,
transparent)1;
box-sizing: border-box;
backdrop-filter: blur(4px);
&::before { &::before {
content: ""; content: "";
position: absolute; position: absolute;
display: inline-block; display: inline-block;
height: 100%; height: 92%;
width: 0.11415vw; width: 0.13vw;
border-radius: 2px; border-radius: 2px;
top: 0%; top: 0%;
left: 0; left: 0;
background: radial-gradient( background: linear-gradient(to bottom, transparent 10%, rgba(5, 138, 237, 1) 30%, rgba(2, 82, 215, 0.24) 90%);
circle at center, z-index: 1;
#024798 2%, }
#024798 30%,
transparent
);
z-index: 1;
}
&::after { &::after {
content: ""; content: "";
position: absolute; position: absolute;
display: inline-block; display: inline-block;
width: 60%; width: 80%;
height: 0.31415vh; height: 0.31415vh;
border-radius: 2px; border-radius: 2px;
left: 8%; right: 4%;
bottom: 0; bottom: 0;
background: linear-gradient(to right, #024798, transparent); background: linear-gradient(to right, transparent 60%, #4197f9 98%, transparent 98%);
z-index: 0; z-index: 0;
} }
@@ -148,7 +129,7 @@ export default {
gap: 8px; gap: 8px;
.container-title { .container-title {
font-size: 1.18vw; font-size: 1vw;
line-height: 1.39vw; line-height: 1.39vw;
font-weight: normal; font-weight: normal;
letter-spacing: 2px; letter-spacing: 2px;
@@ -156,7 +137,7 @@ export default {
} }
.container-body { .container-body {
padding: 12px; padding: 20px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex: 1; flex: 1;
@@ -168,8 +149,8 @@ export default {
position: absolute; position: absolute;
// width: 16px; // width: 16px;
// height: 16px; // height: 16px;
width: 0.95vw; width: 0.7vw;
height: 0.95vw; height: 0.7vw;
} }
.corner.tl { .corner.tl {

View File

@@ -33,12 +33,8 @@
<!-- content --> <!-- content -->
<div class="container-head" ref="container-head" <div class="container-head" ref="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"> :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
<Icon :icon="icon"></Icon> <Icon style="margin-left: 16px;" :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
<div class="button-than" style="margin-left: auto;">
<CopilotButton v-for="i in ['同比', '环比']" :key="i" :label="i" :active="i === than"
@click="() => $emit('update:than', i)" />
</div>
</div> </div>
<div class="container-body" :class="[ <div class="container-body" :class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left', side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
@@ -50,12 +46,10 @@
<script> <script>
import ContainerIconVue from "./ContainerIcon.vue" import ContainerIconVue from "./ContainerIcon.vue"
import CopilotButton from "./button.vue"
export default { export default {
name: "DashboardContainer", name: "DashboardContainer",
components: { components: {
Icon: ContainerIconVue, Icon: ContainerIconVue,
CopilotButton
}, },
props: { props: {
side: { side: {
@@ -66,9 +60,6 @@ export default {
type: String, type: String,
default: "cube", default: "cube",
}, },
than: {
type: String,
},
title: { title: {
type: String, type: String,
default: "Default Title", default: "Default Title",
@@ -80,56 +71,56 @@ export default {
}, },
computed: {}, computed: {},
mounted() { mounted() {
this.$nextTick(() => {
let button = document.getElementsByClassName('button-than')
console.log(button);
button[0].children[0].style.borderRadius = '4px 0 0 4px'
button[0].children[1].style.borderRadius = '0px 4px 4px 0'
console.log(button[0].children[0].style);
})
}, },
methods: {}, methods: {},
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.copilot-container { .copilot-container {
height: 0; height: 100%;
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
box-shadow: inset 0 0 20px 1px #fff1; box-shadow: inset 0 0 20px 1px #fff1;
backdrop-filter: blur(4px); border-right: .13vw solid;
// border-image: linear-gradient(to bottom,transparent 10%,
// #024798 20%,
// transparent 90%) 1;
border-image: linear-gradient(to bottom, transparent 10%, rgba(5, 138, 237, 1) 30%, rgba(2, 82, 215, 0.24) 90%)1;
box-sizing: border-box;
backdrop-filter: blur(4px);
&::before { &::before {
content: ""; content: "";
position: absolute; position: absolute;
display: inline-block; display: inline-block;
height: 100%; height: 92%;
width: 0.11415vw; width: 0.13vw;
border-radius: 2px; border-radius: 2px;
top: 0%; top: 0%;
left: 0; left: 0;
background: radial-gradient( background: radial-gradient(circle at center,
circle at center, #1481fd 2%,
#024798 2%, #024798 95%,
#024798 30%, transparent);
transparent z-index: 1;
); }
z-index: 1;
}
&::after { &::after {
content: ""; content: "";
position: absolute; position: absolute;
display: inline-block; display: inline-block;
width: 60%; width: 80%;
height: 0.31415vh; height: 0.31415vh;
border-radius: 2px; border-radius: 2px;
left: 8%; left: 3%;
bottom: 0; bottom: 0;
background: linear-gradient(to right, #024798, transparent); background: linear-gradient(to left, transparent 60%, #4197f9 98%, transparent 98%);
z-index: 0; z-index: 0;
} }
@@ -142,7 +133,7 @@ export default {
gap: 8px; gap: 8px;
.container-title { .container-title {
font-size: 1.18vw; font-size: 1vw;
line-height: 1.39vw; line-height: 1.39vw;
font-weight: normal; font-weight: normal;
letter-spacing: 2px; letter-spacing: 2px;
@@ -150,7 +141,7 @@ export default {
} }
.container-body { .container-body {
padding: 12px; padding: 20px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex: 1; flex: 1;
@@ -162,8 +153,8 @@ export default {
position: absolute; position: absolute;
// width: 16px; // width: 16px;
// height: 16px; // height: 16px;
width: 0.95vw; width: 0.7vw;
height: 0.95vw; height: 0.7vw;
} }
.corner.tl { .corner.tl {

View File

@@ -4,9 +4,9 @@
@update:than="updateThan" @update:period="updatePeriod" /> @update:than="updateThan" @update:period="updatePeriod" />
<div class="factory-section"> <div class="factory-section">
<section class="top flex"> <section class="top flex">
<db-container title="生产监控" icon="prod" @update:than="updateThan" :than="than"> <db-container title="生产监控" icon="prod">
<prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data" <prod-monitor @update:than="updateThan" :companyId="companyId" :factoryData="factoryData" :than="than"
:prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" /> :period="period" :data="data" :prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
</db-container> </db-container>
<left-container title="工单监控" icon="order"> <left-container title="工单监控" icon="order">
<order @update:type="updateType" :type="type" :prodOrder="prodOrder" /> <order @update:type="updateType" :type="type" :prodOrder="prodOrder" />
@@ -28,7 +28,7 @@
import FactoryDataHeader from "./../components/FactoryDataHeader.vue"; import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/rightContainer.vue"; import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue"; import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue"; import ProdMonitor from "./components/bipvProdMonitor";
import { deepClone } from "@/utils"; import { deepClone } from "@/utils";
// import Store from "./components/Store.vue"; // import Store from "./components/Store.vue";
// import Energy from "./components/Energy.vue"; // import Energy from "./components/Energy.vue";
@@ -88,7 +88,7 @@ export default {
updateThan(val) { updateThan(val) {
console.log(val); console.log(val);
this.than = val; this.than = val;
// this.getMes(); this.getMes()
}, },
updatePeriod(val) { updatePeriod(val) {
this.period = val; this.period = val;
@@ -134,11 +134,11 @@ export default {
if (preData && preData[0] != null) { if (preData && preData[0] != null) {
for (const factory of preData) { for (const factory of preData) {
if (factory.previousGlassType === 0) { if (factory.previousGlassType === 0) {
preDataDetail[1] = factory.previousYearOutputNumber preDataDetail[1] = factory.previousOutputNumber
} else if (factory.previousGlassType === 1) { } else if (factory.previousGlassType === 1) {
preDataDetail[2] = factory.previousYearOutputNumber preDataDetail[2] = factory.previousOutputNumber
} else if (factory.previousYearOutputNumber === 2) { } else if (factory.previousGlassType === 2) {
currentDataDetail[3] = factory.outputNumber preDataDetail[3] = factory.previousOutputNumber
} }
} }
} }

View File

@@ -4,9 +4,9 @@
@update:period="updatePeriod" /> @update:period="updatePeriod" />
<div class="factory-section"> <div class="factory-section">
<section class="top flex"> <section class="top flex">
<db-container title="生产监控" icon="prod" @update:than="updateThan" :than="than"> <db-container title="生产监控" icon="prod">
<prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data" <prod-monitor @update:than="updateThan" :than="than" :companyId="companyId" :factoryData="factoryData"
:prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" /> :period="period" :data="data" :prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
</db-container> </db-container>
<left-container title="工单监控" icon="order"> <left-container title="工单监控" icon="order">
<order @update:type="updateType" :type="type" :prodOrder="prodOrder" /> <order @update:type="updateType" :type="type" :prodOrder="prodOrder" />
@@ -29,7 +29,7 @@ import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/rightContainer.vue"; import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue"; import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue"; import ProdMonitor from "./components/ProdMonitor";
import { deepClone } from "@/utils"; import { deepClone } from "@/utils";
// import Store from "./components/Store.vue"; // import Store from "./components/Store.vue";
// import Energy from "./components/Energy.vue"; // import Energy from "./components/Energy.vue";
@@ -89,7 +89,7 @@ export default {
updateThan(val) { updateThan(val) {
console.log(val); console.log(val);
this.than = val; this.than = val;
// this.getMes(); this.getMes()
}, },
updatePeriod(val) { updatePeriod(val) {
this.period = val; this.period = val;
@@ -132,16 +132,17 @@ export default {
// } // }
} }
} }
if (preData && preData[0] != null) { if (preData) {
for (const factory of preData) { for (const factory of preData) {
if (factory.previousGlassType === 0) { if (factory.previousGlassType === 0) {
preDataDetail[1] = factory.previousYearOutputNumber console.log('factory', factory)
preDataDetail[1] = factory.previousOutputNumber
} else if (factory.previousGlassType === 1) { } else if (factory.previousGlassType === 1) {
preDataDetail[2] = factory.previousYearOutputNumber preDataDetail[2] = factory.previousOutputNumber
} }
} }
} }
if (targetListResponse && targetListResponse[0] != null) { if (targetListResponse) {
for (const factory of targetListResponse) { for (const factory of targetListResponse) {
targetDataDetail[0] = factory.ftoInput targetDataDetail[0] = factory.ftoInput
// if (factory.previousGlassType === 0) { // if (factory.previousGlassType === 0) {
@@ -153,7 +154,7 @@ export default {
} }
} }
// console.log('ftoInvest',ftoInvest) // console.log('ftoInvest',ftoInvest)
if (factoryListResponse && factoryListResponse[0] != null) { if (factoryListResponse) {
for (const factory of factoryListResponse) { for (const factory of factoryListResponse) {
// targetDataDetail[0] = factory.ftoInput // targetDataDetail[0] = factory.ftoInput
if (factory.glassType === 0) { if (factory.glassType === 0) {
@@ -163,6 +164,7 @@ export default {
} }
} }
} }
console.log(' this.factoryData.preDataDetail', preDataDetail);
this.factoryData.preDataDetail = preDataDetail this.factoryData.preDataDetail = preDataDetail
this.factoryData.currentDataDetail = currentDataDetail this.factoryData.currentDataDetail = currentDataDetail
this.factoryData.targetDataDetail = targetDataDetail this.factoryData.targetDataDetail = targetDataDetail

View File

@@ -28,7 +28,7 @@
import FactoryDataHeader from "./../components/FactoryDataHeader.vue"; import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/rightContainer.vue"; import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue"; import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue"; import ProdMonitor from "./components/bipvProdMonitor.vue";
import { deepClone } from "@/utils"; import { deepClone } from "@/utils";
// import Store from "./components/Store.vue"; // import Store from "./components/Store.vue";
// import Energy from "./components/Energy.vue"; // import Energy from "./components/Energy.vue";

View File

@@ -28,7 +28,7 @@
import FactoryDataHeader from "./../components/FactoryDataHeader.vue"; import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/rightContainer.vue"; import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue"; import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue"; import ProdMonitor from "./components/bipvProdMonitor.vue";
import { deepClone } from "@/utils"; import { deepClone } from "@/utils";
// import Store from "./components/Store.vue"; // import Store from "./components/Store.vue";
// import Energy from "./components/Energy.vue"; // import Energy from "./components/Energy.vue";

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-21 13:24:03 * @Date: 2024-05-21 13:24:03
* @LastEditTime: 2024-06-05 09:43:30 * @LastEditTime: 2024-07-25 10:52:35
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -38,7 +38,7 @@
<script> <script>
import FactoryDataHeader from "./../components/FactoryDataHeader.vue"; import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
// import Container from "./components/Container.vue"; // import Container from "./components/Container.vue";
import ProdMonitor from "./components/ProdMonitor.vue"; import ProdMonitor from "./components/bipvProdMonitor.vue";
import Store from "./components/Store.vue"; import Store from "./components/Store.vue";
import Energy from "./components/Energy.vue"; import Energy from "./components/Energy.vue";
import Order from "./components/Order.vue"; import Order from "./components/Order.vue";

View File

@@ -29,7 +29,7 @@ import FactoryDataHeader from "./../components/FactoryDataHeader.vue";
import Container from "./components/rightContainer.vue"; import Container from "./components/rightContainer.vue";
import leftContainer from "./components/leftContainer.vue"; import leftContainer from "./components/leftContainer.vue";
import ProdMonitor from "./components/ProdMonitor.vue"; import ProdMonitor from "./components/bipvProdMonitor.vue";
import { deepClone } from "@/utils"; import { deepClone } from "@/utils";
// import Store from "./components/Store.vue"; // import Store from "./components/Store.vue";
// import Energy from "./components/Energy.vue"; // import Energy from "./components/Energy.vue";

View File

@@ -45,8 +45,11 @@ export default {
legend() { legend() {
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -58,13 +61,13 @@ export default {
const year = new Date().getFullYear(); const year = new Date().getFullYear();
if (this.period === '日' && this.than === '同比') { if (this.period === '日' && this.than === '同比') {
items = [ items = [
{ label: `${year-1}${month}${today}`, color: "#12f7f1" }, { label: `${year - 1}${yesterday}`, color: "#12f7f1" },
{ label: `${month}${today}`, color: "#58adfa" }, { label: `${yesterday}`, color: "#58adfa" },
]; ];
} else if (this.period === '日' && this.than === '环比') { } else if (this.period === '日' && this.than === '环比') {
items = [ items = [
{ label: `${yesterday}`, color: "#12f7f1" }, { label: `${dayBeYes}`, color: "#12f7f1" },
{ label: `${month}${today}`, color: "#58adfa" }, { label: `${yesterday}`, color: "#58adfa" },
]; ];
} else if (this.period === '周' && this.than === '同比') { } else if (this.period === '周' && this.than === '同比') {
items = [ items = [
@@ -149,8 +152,11 @@ export default {
function getTemplate(period, dataList,than) { function getTemplate(period, dataList,than) {
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -163,11 +169,11 @@ function getTemplate(period, dataList,than) {
if (period === '日' && than === '同比') { if (period === '日' && than === '同比') {
items = [ items = [
{ {
name: `${year-1}${month}${today}`, name: `${year - 1}${yesterday}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
}, },
{ {
name: `${month}${today}`, name: `${yesterday}`,
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
@@ -175,11 +181,11 @@ function getTemplate(period, dataList,than) {
} else if (period === '日' && than === '环比') { } else if (period === '日' && than === '环比') {
items = [ items = [
{ {
name: `${yesterday}`, name: `${dayBeYes}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
}, },
{ {
name: `${month}${today}`, name: `${yesterday}`,
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },

View File

@@ -45,8 +45,11 @@ export default {
legend() { legend() {
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -58,13 +61,13 @@ export default {
const year = new Date().getFullYear(); const year = new Date().getFullYear();
if (this.period === '日' && this.than === '同比') { if (this.period === '日' && this.than === '同比') {
items = [ items = [
{ label: `${year-1}${month}${today}`, color: "#12f7f1" }, { label: `${year - 1}${yesterday}`, color: "#12f7f1" },
{ label: `${month}${today}`, color: "#58adfa" }, { label: `${yesterday}`, color: "#58adfa" },
]; ];
} else if (this.period === '日' && this.than === '环比') { } else if (this.period === '日' && this.than === '环比') {
items = [ items = [
{ label: `${yesterday}`, color: "#12f7f1" }, { label: `${dayBeYes}`, color: "#12f7f1" },
{ label: `${month}${today}`, color: "#58adfa" }, { label: `${yesterday}`, color: "#58adfa" },
]; ];
} else if (this.period === '周' && this.than === '同比') { } else if (this.period === '周' && this.than === '同比') {
items = [ items = [
@@ -150,9 +153,15 @@ export default {
function getTemplate(period, dataList,than) { function getTemplate(period, dataList,than) {
let items = []; let items = [];
// var day1 = new Date();
// day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000);
// var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -165,11 +174,11 @@ function getTemplate(period, dataList,than) {
if (period === '日' && than === '同比') { if (period === '日' && than === '同比') {
items = [ items = [
{ {
name: `${year-1}${month}${today}`, name: `${year - 1}${yesterday}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
}, },
{ {
name: `${month}${today}`, name: `${yesterday}`,
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },
@@ -177,11 +186,11 @@ function getTemplate(period, dataList,than) {
} else if (period === '日' && than === '环比') { } else if (period === '日' && than === '环比') {
items = [ items = [
{ {
name: `${yesterday}`, name: `${dayBeYes}`,
data: dataList ? dataList[0] : [], data: dataList ? dataList[0] : [],
}, },
{ {
name: `${month}${today}`, name: `${yesterday}`,
data: dataList ? dataList[1] : [], data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
}, },

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-20 13:32:59 * @Date: 2024-05-20 13:32:59
* @LastEditTime: 2024-06-06 08:42:04 * @LastEditTime: 2024-07-22 14:41:37
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -78,13 +78,13 @@ export default {
valueTuple() { valueTuple() {
// [previousValue, currentValue, sumValue?] // [previousValue, currentValue, sumValue?]
const getter = this.$store.getters.copilot.yield[this.dataSourceField]; const getter = this.$store.getters.copilot.yield[this.dataSourceField];
if (this.period === "日" || this.period === "周") { // if (this.period === "日" || this.period === "周") {
console.log(this.period) // console.log(this.period)
return [ // return [
getter.previous[this.factoryId], // getter.previous[this.factoryId],
getter.current[this.factoryId], // getter.current[this.factoryId],
]; // ];
} // }
// [100, 200, 200] // [100, 200, 200]
return [ return [
getter.previous[this.factoryId], getter.previous[this.factoryId],
@@ -100,8 +100,11 @@ export default {
const vt = this.valueTuple; const vt = this.valueTuple;
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -113,15 +116,15 @@ export default {
// const year = new Date().getFullYear(); // const year = new Date().getFullYear();
if (this.period === '日' && this.than === '同比') { if (this.period === '日' && this.than === '同比') {
items = [ items = [
{ label: `${month}${today}日累计`,}, { label: `${yesterday}日累计`,},
{ label: `${year-1}${month}${today}累计` }, { label: `${year - 1}${yesterday}累计` },
{ label: `${month}${today}日目标`, }, { label: `${yesterday}日目标`, },
]; ];
} else if (this.period === '日' && this.than === '环比') { } else if (this.period === '日' && this.than === '环比') {
items = [ items = [
{ label: `${month}${today}日累计`}, { label: `${yesterday}日累计`},
{ label: `${yesterday}日累计` }, { label: `${dayBeYes}日累计` },
{ label: `${month}${today}日目标`, }, { label: `${yesterday}日目标`, },
]; ];
} else if (this.period === '周' && this.than === '同比') { } else if (this.period === '周' && this.than === '同比') {
items = [ items = [
@@ -160,12 +163,17 @@ export default {
: (vt[1] != 0 && vt[1] != null) && vt[2] == 0 : (vt[1] != 0 && vt[1] != null) && vt[2] == 0
? "100%" : '0%', ? "100%" : '0%',
subtitle = subtitle =
this.period == "日" ? `${month}${today}日累计完成值` : this.period == "周" ? `本周累计完成值` : this.period == "月" ? `${month}月累计完成值` : `${year}年累计完成值`; this.period == "日" ? `${yesterday}日累计完成值` : this.period == "周" ? `本周累计完成值` : this.period == "月" ? `${month}月累计完成值` : `${year}年累计完成值`;
console.log(this.valueTuple[0], this.valueTuple[1], this.valueTuple[2],) console.log('titleValue', items)
console.log(this.valueTuple[2]- this.valueTuple[1]) let titleSize = fontSize(0.35)
let subtitleSize = fontSize(0.14)
// console.log(this.valueTuple[2]- this.valueTuple[1])
return getOptions({ return getOptions({
titleValue, titleValue,
subtitle, subtitle,
titleSize,
subtitleSize,
currentName: items[0].label, currentName: items[0].label,
preName: items[1].label, preName: items[1].label,
previousSum: this.valueTuple[0], previousSum: this.valueTuple[0],
@@ -216,13 +224,22 @@ export default {
// }, // },
}, },
}; };
function fontSize(res){
let clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (!clientWidth) return;
let fontSize = 100 * (clientWidth / 1920);
return res * fontSize;
}
function calculateItems(period, valueTuple, than) { function calculateItems(period, valueTuple, than) {
console.log('valueTuple', valueTuple); console.log('valueTuple', valueTuple);
let items = []; let items = [];
var day1 = new Date(); var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//今天的时间 //今天的时间
// var day2 = new Date(); // var day2 = new Date();
// day2.setTime(day2.getTime()); // day2.setTime(day2.getTime());
@@ -234,15 +251,15 @@ function calculateItems(period, valueTuple, than) {
const year = new Date().getFullYear(); const year = new Date().getFullYear();
if (period === '日' && than === '同比') { if (period === '日' && than === '同比') {
items = [ items = [
{ label: `${year-1}${month}${today}累计`, value: valueTuple[0] }, { label: `${year - 1}${yesterday}累计`, value: valueTuple[0] },
{ label: `${month}${today}累计`, value: valueTuple[1] }, { label: `${yesterday}累计`, value: valueTuple[1] },
{ label: `${month}${today}日目标`, value: valueTuple[2] }, { label: `${yesterday}日目标`, value: valueTuple[2] },
]; ];
} else if (period === '日' && than === '环比') { } else if (period === '日' && than === '环比') {
items = [ items = [
{ label: `${yesterday}日累计`, value: valueTuple[0] }, { label: `${dayBeYes}日累计`, value: valueTuple[0] },
{ label: `${month}${today}日累计`, value: valueTuple[1] }, { label: `${yesterday}日累计`, value: valueTuple[1] },
{ label: `${month}${today}日目标`, value: valueTuple[2] }, { label: `${yesterday}日目标`, value: valueTuple[2] },
]; ];
} else if (period === '周' && than === '同比') { } else if (period === '周' && than === '同比') {
items = [ items = [
@@ -289,8 +306,9 @@ function calculateItems(period, valueTuple, than) {
</script> </script>
<style scoped> <style scoped>
.double-ring-chart { .double-ring-chart {
height: 100%; height: 98%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
@@ -305,7 +323,7 @@ function calculateItems(period, valueTuple, than) {
} }
.double-ring-chart__legend { .double-ring-chart__legend {
padding: 12px; /* padding: 12px; */
color: #fff; color: #fff;
display: flex; display: flex;
justify-content: center; justify-content: center;
@@ -314,6 +332,7 @@ function calculateItems(period, valueTuple, than) {
.legend-item { .legend-item {
display: flex; display: flex;
/* font-size:16px; */
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
} }

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-30 16:00:50 * @Date: 2024-05-30 16:00:50
* @LastEditTime: 2024-06-03 16:26:03 * @LastEditTime: 2024-07-09 09:09:07
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -42,10 +42,11 @@ export default {
return { return {
factoryId: 4, // 默认成都 factoryId: 4, // 默认成都
cityOptions: [ cityOptions: [
"瑞昌",
// "成都", // "成都",
"邯郸", "邯郸",
// "株洲", // "株洲",
"瑞昌",
// "佳木斯", // "佳木斯",
// "凯盛光伏", // "凯盛光伏",
// "蚌埠兴科", // "蚌埠兴科",
@@ -63,7 +64,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.double-ring-wrapper { .double-ring-wrapper {
height: 100%; height: 100%;
padding: 12px 24px; padding: 0px 24px;
display: flex; display: flex;
gap: 12px; gap: 12px;
flex-direction: column; flex-direction: column;

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-24 15:15:00 * @Date: 2024-05-24 15:15:00
* @LastEditTime: 2024-05-31 16:16:16 * @LastEditTime: 2024-07-09 09:27:12
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -74,7 +74,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.double-ring-wrapper { .double-ring-wrapper {
height: 100%; height: 100%;
padding: 12px 24px; padding: 0px 24px;
display: flex; display: flex;
gap: 12px; gap: 12px;
flex-direction: column; flex-direction: column;

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-10 11:10:54 * @Date: 2024-05-10 11:10:54
* @LastEditTime: 2024-06-05 09:49:46 * @LastEditTime: 2024-07-09 15:09:27
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@@ -20,12 +20,12 @@
</left-container> </left-container>
</section> </section>
<section class="bottom flex"> <section class="bottom flex">
<right-container class="fto-involve" title="FTO投入"> <bottom-right-container class="fto-involve" title="FTO投入">
<fto-invest :period="period" :than="than" /> <fto-invest :period="period" :than="than" />
</right-container> </bottom-right-container>
<left-container class="chip-involve" title="芯片投入" icon="chip"> <bottom-left-container class="chip-involve" title="芯片投入" icon="chip">
<chip-invest :period="period" :than="than" /> <chip-invest :period="period" :than="than" />
</left-container> </bottom-left-container>
</section> </section>
</div> </div>
</template> </template>
@@ -34,7 +34,8 @@
import twoContainer from "@/views/copilot/components/twoContainer.vue"; import twoContainer from "@/views/copilot/components/twoContainer.vue";
import leftContainer from "@/views/copilot/components/leftContainer.vue"; import leftContainer from "@/views/copilot/components/leftContainer.vue";
import rightContainer from "@/views/copilot/components/rightContainer.vue"; import rightContainer from "@/views/copilot/components/rightContainer.vue";
import bottomRightContainer from "@/views/copilot/components/bottomRightContainer.vue";
import bottomLeftContainer from "@/views/copilot/components/bottomLeftContainer.vue";
import StdOutput from "./components/StdOutput.vue"; import StdOutput from "./components/StdOutput.vue";
import ChipOutput from "./components/ChipOutput.vue"; import ChipOutput from "./components/ChipOutput.vue";
import FtoInvest from "./components/FtoInvest.vue"; import FtoInvest from "./components/FtoInvest.vue";
@@ -45,6 +46,8 @@ export default {
name: "YieldCopilot", name: "YieldCopilot",
components: { components: {
DbContainer: twoContainer, DbContainer: twoContainer,
bottomRightContainer,
bottomLeftContainer,
leftContainer, leftContainer,
rightContainer, rightContainer,
StdOutput, StdOutput,

View File

@@ -3,6 +3,8 @@ export default ({
subtitle, subtitle,
previousSum, previousSum,
currentSum, currentSum,
subtitleSize,
titleSize,
targetSum, targetSum,
currentName, currentName,
preName, preName,
@@ -14,22 +16,29 @@ export default ({
top: 0, top: 0,
containLabel: true, containLabel: true,
}, },
tooltip: {}, tooltip: {
trigger: "item",
// extraCssText: 'box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38); border- radius: 4px;opacity: 0.6;backdrop- filter: blur(6px);',
// backgroundColor: '#001829',
// borderColor: '#001829',
},
title: { title: {
text: titleValue, text: titleValue,
left: "44%", left: "48.5%",
top: "37%", top: "middle",
itemGap: 12,
textVerticalAlign:'auto',
textAlign: "center", textAlign: "center",
textStyle: { textStyle: {
fontWeight: 600, fontWeight: 400,
fontSize: 20, fontSize: titleSize,
color: "#fffd", color: "rgba(223,241,254,1)",
}, },
subtext: `\u2002${subtitle}\u2002`, subtext: `\u2002${subtitle}\u2002`,
subtextStyle: { subtextStyle: {
fontSize: 14, fontSize: subtitleSize,
fontWeight: 100, fontWeight: 100,
color: "#fffd", color: "rgba(255,255,255,.7)",
align: "right", align: "right",
}, },
}, },
@@ -38,8 +47,8 @@ export default ({
{ {
type: "pie", type: "pie",
name: "当前目标", name: "当前目标",
radius: ["80%", "90%"], radius: ["73%", "85%"],
center: ["45%", "52%"], center: ["50%", "48%"],
emptyCircleStyle: { emptyCircleStyle: {
color: "#042c5f33", color: "#042c5f33",
}, },
@@ -47,8 +56,8 @@ export default ({
// 数据 series // 数据 series
{ {
type: "pie", type: "pie",
radius: ["80%", "90%"], radius: ["73%", "85%"],
center: ["45%", "52%"], center: ["50%", "48%"],
avoidLabelOvervlap: false, avoidLabelOvervlap: false,
label: { label: {
show: false, show: false,
@@ -61,8 +70,16 @@ export default ({
value: currentSum, value: currentSum,
name: currentName, name: currentName,
selected: false, selected: false,
tooltip: { tooltip: {
formatter: `${currentName} : ${currentSum}` backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter:`
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${currentName}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;'>${currentSum}</span>
</div>
`
}, },
itemStyle: { itemStyle: {
borderJoin: "round", borderJoin: "round",
@@ -85,8 +102,16 @@ export default ({
{ {
value:(targetSum - currentSum) === 0 ? 1 : (targetSum - currentSum), value:(targetSum - currentSum) === 0 ? 1 : (targetSum - currentSum),
name: currentName, name: currentName,
tooltip: { tooltip: {
formatter: `${currentName} : ${currentSum}` backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter:`
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${currentName}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;'>${currentSum}</span>
</div>
`
}, },
itemStyle: { color: "transparent" }, itemStyle: { color: "transparent" },
label: { show: false }, label: { show: false },
@@ -96,8 +121,8 @@ export default ({
// 数据 series2 - 2023累计 // 数据 series2 - 2023累计
{ {
type: "pie", type: "pie",
radius: ["70%", "80%"], radius: ["60%", "73%"],
center: ["45%", "52%"], center: ["50%", "48%"],
avoidLabelOvervlap: false, avoidLabelOvervlap: false,
label: { label: {
show: false, show: false,
@@ -111,7 +136,15 @@ export default ({
name: preName, name: preName,
selected: false, selected: false,
tooltip: { tooltip: {
formatter: `${preName} : ${previousSum}` backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter:`
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${preName}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;'>${previousSum}</span>
</div>
`
}, },
itemStyle: { itemStyle: {
borderJoin: "round", borderJoin: "round",
@@ -135,8 +168,16 @@ export default ({
value:previousSum === 0 ? 1 : 0, value:previousSum === 0 ? 1 : 0,
name: preName, name: preName,
tooltip: { tooltip: {
formatter: `${preName} : ${previousSum}` backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter:`
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${preName}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;'>${previousSum}</span>
</div>
`
}, },
itemStyle: { color: "transparent" }, itemStyle: { color: "transparent" },
label: { show: false }, label: { show: false },

View File

@@ -0,0 +1,590 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-07-26 14:28:19
* @LastEditors: zhp
* @Description:
-->
<template>
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 32px)">
<div class="app-container" style="height: auto; flex-grow: 1;">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="start">
<el-cascader clearable :options="options" v-model="listQuery.start"
:props="{ multiple: false, emitPath: false }" @change="handleChange" placeholder="选择开始年份和期数" />
</el-form-item>
<el-form-item label-width="0" prop="end">
<el-cascader clearable :options="options" v-model="listQuery.end"
:props="{ multiple: false, emitPath: false }" @change="handleChange" placeholder="选择结束年份和期数" />
</el-form-item>
<el-form-item label="成本中心名称" prop="center">
<el-input v-model="listQuery.center" placeholder="请填写成本中心名称" clearable>
</el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="getDataList">查询</el-button>
<el-divider direction="vertical"></el-divider>
<!-- <el-button type="primary" size="small" plain @click="handleImport">导入</el-button> -->
<el-button type="primary" size="small" plain @click="handleExport">导出</el-button>
<!-- <el-button type="success" size="small" plain @click="addFactory">新增</el-button> -->
</el-form-item>
</el-form>
<!-- <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> -->
<base-table :row-key="(record, index) => { return record.in }" border :table-props="tableProps"
:page="listQuery.pageNo" :limit="listQuery.pageSize" :table-data="tableData" :max-height="tableH">
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right"
:method-list="tableBtn" @clickBtn="handleClick" /> -->
</base-table>
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@pagination="getDataList" />
</div>
<!-- 用户导入对话框 -->
<!-- <inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
:type="listQuery.reportType" @refreshDataList="getDataList" /> -->
<!-- <pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" /> -->
</div>
</template>
<script>
import { parseTime } from '@/utils/ruoyi';
import { getCostMainPage, exportExcel } from '@/api/cost';
// import inputTable from './inputTable.vue';
import moment from 'moment'
// 设置语言
// 引入组件
// Vue.component(DatePicker.months, DatePicker)
// Vue.component(Select.name, Select)
// import ButtonNav from '@/components/ButtonNav'
import basicPage from '@/mixins/basic-page'
// import detailOrUpdate from './detail-or-updata';
// import addOrUpdate from './add-or-updata';
// import { factoryList, dhgfactoryList, tyjxfactoryList } from "@/utils/constants";
import { getBaseHeader } from "@/utils/request";
import { factoryList } from "@/utils/constants";
// import tableHeightMixin from "@/mixins/tableHeightMixin";
// import FileSaver from 'file-saver'
// import * as XLSX from 'xlsx'
export default {
// components: { ButtonNav, detailOrUpdate, addOrUpdate },
mixins: [basicPage],
data() {
const currentYear = new Date().getFullYear();
const startYear = currentYear - 10;
const endYear = currentYear + 10;
const options = [];
for (let year = startYear; year <= endYear; year++) {
const yearOptions = [];
for (let period = 1; period <= 12; period++) {
yearOptions.push({
value: `${year}${('0' + period + '期').slice(-3)}`,
label: `${year}${('0' + period + '期').slice(-3)}`
});
}
options.push({
value: year,
label: year,
children: yearOptions
});
}
return {
start: undefined,
end: undefined,
// selectedValues: [],
options,
tableH: this.tableHeight(300),
listQuery: {
pageSize: 20,
pageNo: 1,
total: 0,
center: undefined,
start: undefined,
end: undefined,
yearPhaseStart:undefined,
yearPhaseEnd:undefined,
},
// 用户导入参数
mainFormConfig: [
{
type: 'select',
label: '工单',
placeholder: '请选择工单',
param: 'workOrderId',
selectOptions: [],
},
// {
// type: 'select',
// label: '产线',
// placeholder: '请选择产线',
// param: 'lineId',
// selectOptions: [],
// },
// 选项切换
// {
// type: 'select',
// label: '时间类型',
// param: 'dateFilterType',
// defaultSelect: 0,
// selectOptions: [
// { id: 0, name: '按时间段' },
// { id: 1, name: '按日期' },
// ],
// index: 2,
// extraOptions: [
{
// parent: 'dateFilterType',
// 时间段选择
type: 'datePicker',
label: '时间段',
// dateType: 'datetimerange',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'recordTime',
},
// {
// parent: 'dateFilterType',
// // 日期选择
// type: 'datePicker',
// // label: '日期',
// dateType: 'date',
// placeholder: '选择日期',
// format: 'yyyy-MM-dd',
// valueFormat: 'yyyy-MM-dd',
// param: 'timeday',
// },
// ],
// },
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'separate'
},
// {
// type: this.$auth.hasPermi(
// 'analysis:equipment:export'
// )
// ? 'separate'
// : '',
// },
{
type: 'button',
btnName: '导出',
name: 'export',
color: 'warning',
},
],
formConfig: [
{
type: 'title',
label: '成本管理',
},
],
mDTypeList: [
{
value: 0,
label: '物料编码'
},
{
value: 1,
label: '物料名称'
}
],
wDTypeList: [
{
value: 0,
label: '仓库名称'
}
],
tableProps: [
{
prop: 'yearPhaseName',
label: '年期',
minWidth: 200,
showOverflowtooltip: true
},
{
prop: 'center',
label: '成本中心名称',
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'product',
label: '产品名称',
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'spec',
label: '规格型号',
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'workorderCode',
label: '工单编号',
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'workorderLineNum',
label: '工单行号',
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'supplierCode',
label: '供应商编码',
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'supplier',
label: '供应商名称',
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'unit',
label: '基本单位',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true
},
{
prop: 'planNum',
label: '计划产量',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true
},
{
prop: 'project',
label: '成本项目名称',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true
},
{
prop: 'material',
label: '子项物料名称',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true
},
{
prop: 'currentTime',
label: '本期完工',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true,
children: [
{
prop: 'finishNum',
label: '数量',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true
},
{
prop: 'unitConsume',
label: '单耗',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true
},
{
prop: 'unitCost',
label: '单位成本',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true
},
{
prop: 'cost',
label: '金额',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true
},
]
},
{
prop: 'totalTime',
label: '累计完工',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true,
children: [
{
prop: 'totalFinishNum',
label: '数量',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true
},
{
prop: 'totalUnitConsume',
label: '单耗',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true
},
{
prop: 'totalUnitCost',
label: '单位成本',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true
},
{
prop: 'totalCost',
label: '金额',
minWidth: 150,
// filter: (val) => factoryList[val],
showOverflowtooltip: true
},
]
},
],
// timeSelect:'month',
// startTimeStamp:null, //开始时间
// endTimeStamp:null, //结束时间
// date:'凯盛玻璃控股成员企业2024生产数据',
// reportTime: '',
// startTimeStamp: '',
// endTimeStamp: '',
tableData: [],
// proLineList: [],
// all: {}
};
},
computed: {
},
watch: {
},
created() {
const currentYear = new Date().getFullYear();
this.listQuery.start = `${currentYear}01期`;
this.listQuery.end = `${currentYear}12期`;
},
methods: {
handleChange(value) {
// console.log('选择的值:', this.selectedValues);
},
async getDataList() {
this.tableData = []
this.listQuery.yearPhaseStart = this.listQuery.start ? this.listQuery.start.slice(0,6) :undefined
this.listQuery.yearPhaseEnd = this.listQuery.end ? this.listQuery.end.slice(0, 6) : undefined
if (this.listQuery.end && this.listQuery.start) {
if (this.listQuery.end.slice(0, 4) - this.listQuery.start.slice(0, 4) > 10) {
this.listQuery.end = undefined
this.listQuery.start = undefined
this.listQuery.yearPhaseStart = undefined
this.listQuery.yearPhaseEnd = undefined
return this.$message({
message: '起止年份不能超过十年',
type: 'warning'
});
}
await getCostMainPage(this.listQuery).then(res => {
if (res.code === 0) {
// this.tableData = res.data.list
res.data.list.forEach((item, index) => {
let obj = {
in: Math.random().toString().slice(2, 10),
id:item.id,
yearPhase: item.yearPhase,
center: item.center,
product: item.product,
spec: item.spec,
workorderCode: item.workorderCode,
workorderLineNum: item.workorderLineNum,
supplierCode: item.supplierCode,
supplier: item.supplier,
unit: item.unit,
planNum: item.planNum,
finishNum: item.finishNum,
unitConsume: item.unitConsume,
unitCost: item.unitCost,
cost: item.cost,
totalFinishNum: item.totalFinishNum,
totalUnitConsume: item.totalUnitConsume,
totalUnitCost: item.totalUnitCost,
totalCost: item.totalCost,
createTime: item.createTime,
yearPhaseName: item.yearPhaseName,
project: item.project,
material: item.material,
children:[]
}
this.tableData.push(obj)
item.children.forEach((ele, ind) => {
// for (let i in item.projs) {
let obj = {
in: Math.random().toString().slice(2, 10),
id: ele.id,
yearPhase: ele.yearPhase,
center: ele.center,
product: ele.product,
spec: ele.spec,
workorderCode: ele.workorderCode,
workorderLineNum: ele.workorderLineNum,
supplierCode: ele.supplierCode,
supplier: ele.supplier,
unit: ele.unit,
planNum: ele.planNum,
finishNum: ele.finishNum,
unitConsume: ele.unitConsume,
unitCost: ele.unitCost,
cost: ele.cost,
totalFinishNum: ele.totalFinishNum,
totalUnitConsume: ele.totalUnitConsume,
totalUnitCost: ele.totalUnitCost,
totalCost: ele.totalCost,
createTime: ele.createTime,
yearPhaseName: ele.yearPhaseName,
project: ele.project,
material: ele.material,
children:[]
}
this.tableData[index].children.push(obj)
ele.children?.forEach((i,inde) => {
// for (let i in item.projs) {
let obj = {
in: Math.random().toString().slice(2, 10),
id: i.id,
yearPhase: i.yearPhase,
center: i.center,
product: i.product,
spec: i.spec,
workorderCode: i.workorderCode,
workorderLineNum: i.workorderLineNum,
supplierCode: i.supplierCode,
supplier: i.supplier,
unit: i.unit,
planNum: i.planNum,
finishNum: i.finishNum,
unitConsume: i.unitConsume,
unitCost: i.unitCost,
cost: i.cost,
totalFinishNum: i.totalFinishNum,
totalUnitConsume: i.totalUnitConsume,
totalUnitCost: i.totalUnitCost,
totalCost: i.totalCost,
createTime: i.createTime,
yearPhaseName: i.yearPhaseName,
project: i.project,
material: i.material,
}
this.tableData[index].children[ind].children.push(obj)
// });
// }
});
// });
// }
});
});
console.log(this.tableData);
this.listQuery.total = res.data.total
}
})
} else {
return this.$message({
message: '请选择起止年份和期数',
type: 'warning'
});
}
},
buttonClick(val) {
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.getDataList();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.listQuery;
// queryParams.current = 1
// queryParams.size = 999
// if (this.facType === 0) {
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
this.exportLoading = true;
return exportExcel(queryParams);
}).then(response => {
this.$download.excel(response, '成本核算数据.xls');
this.exportLoading = false;
}).catch(() => { });
// }
}
},
};
</script>
<style>
/* .blueTip { */
/* padding-bottom: 10px; */
/* } */
.blueTip .el-date-editor .el-range__icon {
font-size: 16px;
color: #0b58ff;
}
.blueTip .el-input__prefix .el-icon-date {
font-size: 16px;
color: #0b58ff;
}
.blueTip .el-input__prefix .el-icon-time {
font-size: 16px;
color: #0b58ff;
}
.blueTip::before {
display: inline-block;
content: '';
width: 4px;
height: 18px;
background: #0B58FF;
border-radius: 1px;
margin-right: 8PX;
margin-top: 8px;
}
.app-container {
margin: 0;
background-color: #fff;
border-radius: 4px;
padding: 16px 16px 0;
height: calc(100vh - 134px);
overflow: auto;
}
</style>

View File

@@ -1,421 +0,0 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-05-06 14:55:56
* @LastEditors: zhp
* @Description:
-->
<template>
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 31px)">
<div class="app-container" style="padding: 16px 24px 0;height: auto; flex-grow: 1;">
<search-bar :formConfigs="mainFormConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<el-row :gutter="24">
<el-col :span="12" v-for="item in dataList" :key="item.id">
<line-chart :id="item.id" class="yearChart" ref="lineChart" style="height: 40vh;width: 100%"></line-chart>
</el-col>
<!-- <el-col :span="12">
<line-chart :id=" 'second' " class="yearChart" ref="lineChart" style="height: 40vh;width: 100%"></line-chart>
</el-col> -->
</el-row>
</div>
<div class="app-container" style="margin-top: 18px;flex-grow: 1; height: auto; padding: 16px;">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
:table-data="tableData">
</base-table>
</div>
<!-- <inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
:type="listQuery.reportType" @refreshDataList="getDataList" /> -->
<!-- <pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" /> -->
</div>
</template>
<script>
// import { parseTime } from '../../core/mixins/code-filter';
import { getOrderList, getCostPage } from '@/api/cost/index';
// import inputTable from './inputTable.vue';
import lineChart from './lineChart';
import moment from 'moment'
// import FileSaver from 'file-saver'
// import * as XLSX from 'xlsx'
export default {
components: { lineChart },
data() {
return {
listQuery: {
current: 1,
size: 10,
// factoryId: null,
// total: 0,
// type: null,
// reportType: 2,
reportTime: []
},
dataList: [
{
id:'first',
},
{
id: 'second',
},
{
id: 'third',
},
{
id: 'fourth',
},
{
id: 'fifth',
},
{
id: 'sixth',
},
],
urlOptions: {
// getDataListURL: getGlassPage,
// exportURL: exportGlasscExcel
},
mainFormConfig: [
{
type: 'select',
label: '工单',
placeholder: '请选择工单',
param: 'workOrderId',
selectOptions: [],
clearable: true,
},
// {
// type: 'select',
// label: '产线',
// placeholder: '请选择产线',
// param: 'lineId',
// selectOptions: [],
// },
// 选项切换
// {
// type: 'select',
// label: '时间类型',
// param: 'dateFilterType',
// defaultSelect: 0,
// selectOptions: [
// { id: 0, name: '按时间段' },
// { id: 1, name: '按日期' },
// ],
// index: 2,
// extraOptions: [
{
// parent: 'dateFilterType',
// 时间段选择
type: 'datePicker',
label: '时间段',
// dateType: 'datetimerange',
dateType: 'datetimerange',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
rangeSeparator: '-',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'recordTime',
clearable:true,
},
// {
// parent: 'dateFilterType',
// // 日期选择
// type: 'datePicker',
// // label: '日期',
// dateType: 'date',
// placeholder: '选择日期',
// format: 'yyyy-MM-dd',
// valueFormat: 'yyyy-MM-dd',
// param: 'timeday',
// },
// ],
// },
{
type:'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type:'separate'
},
// {
// type: this.$auth.hasPermi(
// 'analysis:equipment:export'
// )
// ? 'separate'
// : '',
// },
{
type:'button',
btnName: '导出',
name: 'export',
color: 'warning',
},
],
formConfig: [
{
type: 'title',
label: '成本管理',
},
],
timeList: [
{
value: 'month',
label:'月'
},
{
value: 'year',
label: '年'
}
],
factoryList: [
{
name: '测试',
id:1
}
],
tableProps: [
// {
// prop: 'createTime',
// label: '添加时间',
// fixed: true,
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{
prop: 'userName',
label: '日期',
},
{
prop: 'nickName',
label: '工厂名称',
}
],
timeSelect:'month',
startTimeStamp:null, //开始时间
endTimeStamp:null, //结束时间
// date:'凯盛玻璃控股成员企业2024生产数据',
// reportTime: '',
startTimeStamp: '',
endTimeStamp: '',
tableData: [
{
userName: 'userName',
nickName: '用户名',
datas:'111111'
},
{
userName: 'userName',
nickName: '用户名',
datas: '111111'
},
{
userName: 'userName',
nickName: '用户名',
datas: '111111'
// subcomponent: row
}
],
// proLineList: [],
// all: {}
};
},
mounted() {
this.getDict()
// this.getCurrentYearFirst()
this.getDataList()
},
methods: {
buttonClick() {
},
// handleTime() {
// this.$forceUpdate()
// // this.$nextTick(() => [
// // ])
// },
// getCurrentYearFirst() {
// let date = new Date();
// date.setDate(1);
// date.setMonth(0);
// this.reportTime = date;
// this.startTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 0, 1, 7, 0, 1).getTime()); //开始时间
// this.endTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 11, 31, 7, 0, 0).getTime()); //结束时间
// this.listQuery.reportTime[0] = parseTime(new Date(new Date().getFullYear(), 0, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
// this.listQuery.reportTime[1] = parseTime(new Date(new Date().getFullYear(), 11, 31, 7, 0, 0).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 100
// },
changeTime(val) {
if (val) {
// let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
// this.endTimeStamp = this.timeFun(new Date(val.getFullYear(), 11, 31, 7, 0, 0).getTime()); //开始时间
// this.startTimeStamp = this.timeFun(new Date(val.getFullYear(), 0, 1, 7, 0, 1).getTime()); //结束时间
// this.listQuery.reportTime[0] = parseTime(new Date(val.getFullYear(), 0, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
// this.listQuery.reportTime[1] = parseTime(new Date(val.getFullYear(), 11, 31, 7, 0, 0).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
} else {
this.listQuery.reportTime = []
}
},
async getDict() {
// this.$refs.lineChart.initChart()
// 产线列表
const res = await getOrderList({
current:1,
size:999,
});
console.log(res)
this.mainFormConfig[0].selectOptions = res.data;
},
// 获取数据列表
multipliedByHundred(str) {
console.log(str);
// console.log(str)
if ( str != 0) {
let floatVal = parseFloat(str);
if (isNaN(floatVal)) {
return 0;
}
floatVal = Math.round(str * 10000) / 100;
let strVal = floatVal.toString();
let searchVal = strVal.indexOf('.');
if (searchVal < 0) {
searchVal = strVal.length;
strVal += '.';
}
while (strVal.length <= searchVal + 2) {
strVal += '0';
}
return parseFloat(strVal);
}
},
async getDataList() {
const res = await getCostPage({
current: 1,
size: 999,
});
},
add0(m) {
return m < 10 ? '0' + m : m
},
format(shijianchuo) {
//shijianchuo是整数否则要parseInt转换
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
// console.log(time)
// 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 time
},
changeTime(val) {
if (val) {
// console.log(val)
// console.log(val.setHours(7, 0, 0))
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
// let time = this.format(val.setHours(7, 0, 0))
this.endTimeStamp = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.startTimeStamp = this.format(val.setHours(7, 0, 1) - 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
// console.log(this.listQuery.reportTime);
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
console.log(this.listQuery.reportTime);
} else {
this.listQuery.reportTime = []
}
},
//时间戳转为yy-mm-dd hh:mm:ss
timeFun(unixtimestamp) {
var unixtimestamp = new Date(unixtimestamp);
var year = 1900 + unixtimestamp.getYear();
var month = "0" + (unixtimestamp.getMonth() + 1);
var date = "0" + unixtimestamp.getDate();
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
},
buttonClick(val) {
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.getDataList();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
// var xlsxParam = { raw: true };
// /* 从表生成工作簿对象 */
// import('xlsx').then(excel => {
// var wb = excel.utils.table_to_book(
// document.querySelector("#exportTable"),
// xlsxParam
// );
// /* 获取二进制字符串作为输出 */
// var wbout = excel.write(wb, {
// bookType: "xlsx",
// bookSST: true,
// type: "array",
// });
// try {
// FileSaver.saveAs(
// //Blob 对象表示一个不可变、原始数据的类文件对象。
// //Blob 表示的不一定是JavaScript原生格式的数据。
// //File 接口基于Blob继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
// //返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
// new Blob([wbout], { type: "application/octet-stream" }),
// //设置导出文件名称
// "许昌安彩日原片生产汇总.xlsx"
// );
// } catch (e) {
// if (typeof console !== "undefined") console.log(e, wbout);
// }
// return wbout;
// //do something......
// })
},
},
};
</script>
<style scoped>
/* .blueTip { */
/* padding-bottom: 10px; */
/* } */
/* .blueTi */
.blueTip::before{
display: inline-block;
content: '';
width: 4px;
height: 18px;
background: #0B58FF;
border-radius: 1px;
margin-right: 8PX;
margin-top: 8px;
}
.app-container {
margin: 0 16px 0;
background-color: #fff;
border-radius: 4px;
padding: 16px 16px 0;
height: calc(100vh - 134px);
overflow: auto;
}
</style>

View File

@@ -1,233 +0,0 @@
<!--
* @Author: zwq
* @Date: 2022-01-21 14:43:06
* @LastEditors: zhp
* @LastEditTime: 2024-04-16 14:16:17
* @Description:
-->
<template>
<!-- <div> -->
<!-- <div :id="id" :class="className" :style="{ height: '65%', width:width}" /> -->
<div :id="id" class="costChart" :style="{ height: height, 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: 'OverviewLine'
},
// className: {
// type: String,
// default: 'epChart'
// },
width: {
type: String,
default: '100%'
},
beilv: {
type: Number,
default: 1
},
height: {
type: String,
default: '35vh'
},
legendPosition: {
type: String,
default: 'center'
},
showLegend: {
type: Boolean,
default: false
},
legendData: {
type: Array,
default: () => []
}
},
data() {
return {
chartData: [
{
name: '产品1',
num: 1112,
yield: 0.97,
},
{
name: '产品2',
num: 1112,
yield: 0.97,
},
{
name: '产品3',
num: 1112,
yield: 0.97,
},
{
name: '产品4',
num: 1112,
yield: 0.97,
},
{
name: '产品5',
num: 1112,
yield: 0.97,
}
],
chart: null,
colors: ['rgba(113, 99, 254, 1)', 'rgba(39, 139, 255, 1)', 'rgba(100, 189, 255, 1)', 'rgba(143, 240, 170, 1)', 'rgba(246, 189, 22, 0.85)'],
}
},
mounted() {
this.initChart()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
getEqualNewlineString(params, length) {
let text = ''
let count = Math.ceil(params.length / length) // 向上取整数
// 一行展示length个
if (count > 1) {
for (let z = 1; z <= count; z++) {
text += params.substr((z - 1) * length, length)
if (z < count) {
text += '\n'
}
}
} else {
text += params.substr(0, length)
}
return text
},
initChart() {
console.log(1111)
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()
}
this.chart = echarts.init(document.getElementById(this.id))
this.chart.setOption({
color: this.colors,
title: {
text: num,
subtext: '总数/片',
top: '32%',
left: '49%',
textAlign: 'center',
textStyle: {
fontSize: 32,
color: 'rgba(140, 140, 140, 1)',
},
subtextStyle: {
fontSize: 20,
color: '#fff00',
},
},
legend: {
bottom: '2%',
left: 'center',
itemWidth: 12,
itemHeight: 12,
icon: 'roundRect',
textStyle: {
color: 'rgba(140, 140, 140, 1)'
},
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',
// position:outerHeight,
center: ['50%', '40%'],
radius: ['45%', '70%'],
avoidLabelOverlap: true,
label: {
show: true,
normal: {
alignTo: 'labelLine',
margin: 10,
edgeDistance: 10,
lineHeight: 16,
// 各分区的提示内容
// params: 即下面传入的data数组,通过自定义函数,展示你想要的内容和格式
formatter: function (params) {
console.log(params);
return;
},
formatter: (params) => {
//调用自定义显示格式
return this.getEqualNewlineString(params.value + " | " + params.percent.toFixed(0) + "%" + "\n" + params.name, 10);
},
textStyle: { // 提示文字的样式
// color: 'rgba(0, 0, 0, 0.65)',
fontSize: 18
}
}
},
labelLine: {
show: true,
length: 25,
length2: 100,
},
data: this.chartData && this.chartData.length > 0 && this.chartData.map((item, index) => ({
name: item.name,
value: item.num,
label: {
color: this.colors[index % 4]
},
itemStyle: {
// color: {
// type: 'linear',
// x: 0,
// y: 0,
// x2: 0,
// y2: 1,
// 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"
},
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -1,8 +1,9 @@
<!-- <!--
filename: chip-invest.vue * @Author: zhp
author: liubin * @Date: 2024-06-03 15:38:31
date: 2024-04-10 08:59:28 * @LastEditTime: 2024-06-21 15:06:39
description: * @LastEditors: zhp
* @Description:
--> -->
<template> <template>
@@ -34,6 +35,7 @@ export default {
xAxis: cities, xAxis: cities,
}; };
}, },
computed: { computed: {
series() { series() {
const chipInvest = this.$store.getters.home.chipInvest; const chipInvest = this.$store.getters.home.chipInvest;

View File

@@ -1,16 +1,10 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-28 13:42:51 * @Date: 2024-04-28 13:42:51
* @LastEditTime: 2024-06-05 14:12:31 * @LastEditTime: 2024-07-23 16:36:18
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<!--
filename: ChipYield.vue
author: liubin
date: 2024-04-11 10:46:47
description:
-->
<template> <template>
<chart-container class="chip-yield-chart" :noScroll="true"> <chart-container class="chip-yield-chart" :noScroll="true">
@@ -53,20 +47,30 @@ export default {
top: 0, top: 0,
containLabel: true, containLabel: true,
}, },
tooltip: {}, tooltip: {
trigger: "item",
// axisPointer: {
// // type: "cross",
// crossStyle: {
// color: "rgba(237,237,237,0.5)",
// },
// },
backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
},
title: { title: {
text: "0%", text: "0%",
left: "48%", left: "48%",
top: "40%", top: "40%",
textAlign: "center", textAlign: "center",
textStyle: { textStyle: {
fontWeight: 600, fontWeight: 400,
fontSize: 32, fontSize: 32,
color: "#fffd", color: "#fffd",
}, },
subtext: `\u2002${year}年累计产出\u2002`, subtext: `\u2002${year}年累计产出\u2002`,
subtextStyle: { subtextStyle: {
fontSize: 12, fontSize: 15,
fontWeight: 100, fontWeight: 100,
color: "#fffd", color: "#fffd",
align: "right", align: "right",
@@ -102,7 +106,6 @@ export default {
name: `${year}累计产出`, name: `${year}累计产出`,
selected: false, selected: false,
tooltip: { tooltip: {
formatter: null,
}, },
itemStyle: { itemStyle: {
borderJoin: "round", borderJoin: "round",
@@ -126,7 +129,6 @@ export default {
value: 0, value: 0,
name: `${year}目标`, name: `${year}目标`,
tooltip: { tooltip: {
formatter: null,
}, },
itemStyle: { color: "transparent" }, itemStyle: { color: "transparent" },
label: { show: false }, label: { show: false },
@@ -151,7 +153,17 @@ export default {
name: `${year - 1}累计产出`, name: `${year - 1}累计产出`,
selected: false, selected: false,
tooltip: { tooltip: {
formatter: null, trigger: "item",
// axisPointer: {
// // type: "cross",
// crossStyle: {
// color: "rgba(237,237,237,0.5)",
// },
// },
backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter: params => {
},
}, },
itemStyle: { itemStyle: {
borderJoin: "round", borderJoin: "round",
@@ -175,7 +187,15 @@ export default {
value: 0, value: 0,
name: `${year - 1}累计产出`, name: `${year - 1}累计产出`,
tooltip: { tooltip: {
formatter:null, trigger: "item",
// axisPointer: {
// // type: "cross",
// crossStyle: {
// color: "rgba(237,237,237,0.5)",
// },
// },
backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
}, },
itemStyle: { color: "transparent" }, itemStyle: { color: "transparent" },
label: { show: false }, label: { show: false },
@@ -221,41 +241,82 @@ export default {
}; };
}, },
actualOptions() { actualOptions() {
console.log('this.output.current / this.output.target', this.output.current/this.output.target);
const year = new Date().getFullYear() const year = new Date().getFullYear()
const options = JSON.parse(JSON.stringify(this.options)); const options = this.options
// console.log('options', options); // console.log('options', options);
// 标题 // 标题
if (!this.output.target) options.title.text = "0%"; if (!this.output.target && !this.output.current) options.title.text = "0%";
else else if (!this.output.target && this.output.current) options.title.text = "100%";
options.title.text = else options.title.text =
(this.output.current / this.output.target) * 100 + "%"; ((this.output.current / this.output.target).toFixed(2)) * 100 + "%";
// 外环 // 外环
if ( if (
this.output.current == this.output.target && this.output.current == this.output.target &&
this.output.current == 0 this.output.current == 0
) { ) {
options.series[1].data[0].value = 0; this.options.series[1].data[0].value = 0;
options.series[1].data[1].value = 1; this.options.series[1].data[1].value = 1;
options.series[1].data[0].tooltip.formatter = year + '累计完成:0'; this.options.series[1].data[0].tooltip.formatter =
options.series[1].data[1].tooltip.formatter = year + '累计完成:0'; `<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year + '累计完成'}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${0}</span>
</div>`;
this.options.series[1].data[1].tooltip.formatter =
`<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year + '累计完成'}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${0 }</span>
</div>`;
} else { } else {
options.series[1].data[0].value = this.output.current; this.options.series[1].data[0].value = this.output.current;
options.series[1].data[1].value = this.options.series[1].data[1].value =
this.output.target - this.output.current; this.output.target - this.output.current;
options.series[1].data[0].tooltip.formatter = year + '累计完成:' + this.output.current; this.options.series[1].data[0].tooltip.formatter =
options.series[1].data[1].tooltip.formatter = year + '累计完成:' + this.output.current; `<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year + '累计完成'}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${this.output.current}</span>
</div>`;
this.options.series[1].data[1].tooltip.formatter =
`<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year + '累计完成'}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${this.output.current}</span>
</div>`;
} }
// 内环 // 内环
if (this.output.previous == 0) { if (this.output.previous == 0) {
options.series[2].data[0].value = 0; this.options.series[2].data[0].value = 0;
options.series[2].data[1].value = 1; this.options.series[2].data[1].value = 1;
options.series[2].data[0].tooltip.formatter = year-1 + '累计完成:' + 0; this.options.series[2].data[0].tooltip.formatter =
options.series[2].data[1].tooltip.formatter = year-1 + '累计完成:' + 0; `<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year - 1 + '累计完成'}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${0}</span>
</div>`;
this.options.series[2].data[1].tooltip.formatter =
`<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year - 1 + '累计完成'}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${0}</span>
</div>`;
} else { } else {
options.series[2].data[0].value = this.output.previous; this.options.series[2].data[0].value = this.output.previous;
options.series[2].data[1].value = 0; this.options.series[2].data[1].value = 0;
options.series[2].data[0].tooltip.formatter = year - 1 + '累计完成:' + this.output.previous; this.options.series[2].data[0].tooltip.formatter =
options.series[2].data[1].tooltip.formatter = year - 1 + '累计完成:' + this.output.previous; `<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year - 1 + '累计完成'}</span>
<span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${this.output.previous}</span>
</div>`;
this.options.series[2].data[1].tooltip.formatter =
`<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year - 1 + '累计完成'}</span> +
<span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${this.output.previous}</span>
</div>`;
} }
console.log('options', options); console.log('options', options);
return options; return options;
@@ -273,6 +334,9 @@ export default {
factory(val) { factory(val) {
this.initOptions(this.actualOptions); this.initOptions(this.actualOptions);
}, },
actualOptions() {
this.initOptions(this.actualOptions);
}
}, },
mounted() { mounted() {
console.log("mounted", this.actualOptions); console.log("mounted", this.actualOptions);

View File

@@ -1,16 +1,10 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-28 13:42:51 * @Date: 2024-04-28 13:42:51
* @LastEditTime: 2024-05-31 16:11:06 * @LastEditTime: 2024-07-23 17:03:50
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<!--
filename: fto.vue
author: liubin
date: 2024-04-10 08:59:28
description:
-->
<template> <template>
<left-chart-base <left-chart-base

View File

@@ -8,19 +8,10 @@
<template> <template>
<chart-container class="left-chart-base"> <chart-container class="left-chart-base">
<div class="legend"> <div class="legend">
<span <span style="color: rgba(223,241,254,.8);" v-for="item in legend" :key="item.label" class="legend-item"
v-for="item in legend" :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
:key="item.label"
class="legend-item"
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }"
>{{ item.label }}</span
>
</div> </div>
<div <div ref="chart" style="max-width: 22vw" :style="{ height: vHeight + 'vh' }"></div>
ref="chart"
style="max-width: 22vw"
:style="{ height: vHeight + 'vh' }"
></div>
</chart-container> </chart-container>
</template> </template>
@@ -59,14 +50,46 @@ export default {
actualOptions: null, actualOptions: null,
options: { options: {
grid: { grid: {
left: "3%", left: "5%",
right: "4%", right: "4%",
bottom: "0", bottom: "0",
top: "15%", top: "15%",
containLabel: true, containLabel: true,
}, },
tooltip: {}, tooltip: {
trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter: params => {
console.log('params', params)
var res = `<span style='display:inline-block;color:rgba(255,255,255,0.85);margin-bottom:8px;font-size:16px;letter-spacing: 2px;'>${params[0].axisValueLabel}</span>`;
for (var i = 0, l = params.length; i < l; i++) {
let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
// console.log(item.color, color);
res +=
"<br/>" +
`<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:${color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;letter-spacing: 2px;'>${params[i].seriesName}</span>` +
`<span style='width:60px;display:inline-block;color:rgba(255,255,255,0.65);font-size:16px;text-align: right;letter-spacing: 2px;'>${params[i].value ? params[i].value: 0}</span>`;
}
const htmlContent = `
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
${res}
</div>
`;
return htmlContent;
// return res;
},
},
xAxis: { xAxis: {
type:'category',
axisTick: { axisTick: {
show: false, show: false,
}, },
@@ -76,24 +99,27 @@ export default {
}, },
}, },
axisLabel: { axisLabel: {
color: "#fff", textStyle: {
fontSize: 12, color: "rgba(223,241,254,.8)",
fontSize: 16,
},
}, },
data: this.xAxis, data: this.xAxis,
}, },
yAxis: { yAxis: {
name: "单位/片", name: "单位/片",
// position:'left',
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
align:'right' align:'right'
}, },
axisTick: { axisTick: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
axisLine: { axisLine: {
show: true, show: true,
@@ -103,7 +129,7 @@ export default {
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: "#4561AE", color: "rgba(69,97,174,.4)",
}, },
}, },
}, },
@@ -111,14 +137,14 @@ export default {
{ {
name: '', // this.series[0].name, name: '', // this.series[0].name,
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
label: { label: {
show: true, //开启显示 show: true, //开启显示
align: 'right', //在上方显示 align: 'right', //在上方显示
position: 'top', //在上方显示 position: 'top', //在上方显示
textStyle: { //数值样式 textStyle: { //数值样式
color: '#DFF1FE', color: "rgba(223,241,254,.8)",
fontSize: 12 fontSize: 14
} }
}, },
itemStyle: { itemStyle: {
@@ -155,14 +181,14 @@ export default {
{ {
name: '', // this.series[1].name, name: '', // this.series[1].name,
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
label: { label: {
show: true, //开启显示 show: true, //开启显示
align: 'left', //在上方显示 align: 'left', //在上方显示
position: 'top', //在上方显示 position: 'top', //在上方显示
textStyle: { //数值样式 textStyle: { //数值样式
color: '#DFF1FE', color: "rgba(223,241,254,.8)",
fontSize: 12 fontSize: 16
} }
}, },
itemStyle: { itemStyle: {
@@ -201,9 +227,9 @@ export default {
this.actualOptions.series.map((item) => { this.actualOptions.series.map((item) => {
item.barWidth = val ? 18 : 12; item.barWidth = val ? 18 : 12;
}); });
this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 14;
this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 14;
this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 14;
this.initOptions(this.actualOptions); this.initOptions(this.actualOptions);
}, },
series(val) { series(val) {
@@ -234,9 +260,25 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.left-chart-base { .echarts-tooltip{
// position: relative; background: #001829;
// background-color: ;
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);
opacity: 0.6;
border-radius: 4px;
.content {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
backdrop-filter: blur(6px);
// transition: .3s transform;
}
}
.left-chart-base {
.legend { .legend {
position: absolute; position: absolute;
top: 5.2vh; top: 5.2vh;

View File

@@ -1,10 +1,3 @@
<!--
* @Author: zhp
* @Date: 2024-04-28 13:42:51
* @LastEditTime: 2024-06-04 15:35:54
* @LastEditors: zhp
* @Description:
-->
<!-- <!--
filename: right-chart-base filename: right-chart-base
author: liubin author: liubin
@@ -15,19 +8,10 @@
<template> <template>
<chart-container class="right-chart-base"> <chart-container class="right-chart-base">
<div class="legend"> <div class="legend">
<span <span style="color: rgba(223,241,254,.8);" v-for="item in legend" :key="item.label" class="legend-item"
v-for="item in legend" :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
:key="item.label"
class="legend-item"
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }"
>{{ item.label }}</span
>
</div> </div>
<div <div ref="chart" style="max-width: 22vw" :style="{ height: vHeight + 'vh' }"></div>
ref="chart"
style="max-width: 22vw"
:style="{ height: vHeight + 'vh' }"
></div>
</chart-container> </chart-container>
</template> </template>
@@ -65,13 +49,50 @@ export default {
isFullscreen: false, isFullscreen: false,
options: { options: {
grid: { grid: {
left: "3%", left: "6%",
right: "4%", right: "4%",
bottom: "0", bottom: "0",
top: "18%", top: "18%",
containLabel: true, containLabel: true,
}, },
tooltip: {}, tooltip: {
trigger: "axis",
axisPointer: {
// type: "cross",
crossStyle: {
color: "rgba(237,237,237,0.5)",
},
},
confine:true,
backgroundColor: 'rgba(50,50,50,0)', // tooltip默认背景为白色手动置为透明
extraCssText: 'padding:0;border-width:0',
formatter: params => {
console.log('params', params)
var res = `<span style='display:inline-block;color:rgba(255,255,255,0.85);margin-bottom:8px;font-size:16px;letter-spacing: 2px;'>${params[0].axisValueLabel}</span>`;
for (var i = 0, l = params.length; i < l; i++) {
let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
// console.log(item.color, color);
res +=
"<br/>" +
`${params[i].seriesType === "line"
? `<span style='display:inline-block; width: 20px;height: 2px;background-color: #f3c000;position: absolute;top:42.3%;left:3.05%;'></span>
<span style='display:inline-block;width: 8px;height: 8px;border-radius: 100%;background-color: #f3c000;position: absolute;top:39.4%;left:4.6%;'></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;margin-left:20px;letter-spacing: 2px;'>${params[i].seriesName}</span>`
: `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:${color}"></span>
<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;letter-spacing: 2px;'>${params[i].seriesName}</span>`
}` +
`<span style='width:180px;display:inline-block;color:rgba(255,255,255,0.65);font-size:16px;text-align: right;letter-spacing: 2px;'>${params[i].value ? params[i].value : 0 }</span>`;
}
const htmlContent = `
<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
${res}
</div>
`;
return htmlContent;
},
},
xAxis: { xAxis: {
axisTick: { axisTick: {
show: false, show: false,
@@ -82,24 +103,25 @@ export default {
}, },
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
data: this.xAxis, data: this.xAxis,
}, },
yAxis: { yAxis: {
name: "单位/片", name: "单位/片",
// position: 'left',
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
align: 'right' align: 'right'
}, },
axisTick: { axisTick: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
color: "#fff", color: "rgba(223,241,254,.8)",
fontSize: 12, fontSize: 16,
}, },
axisLine: { axisLine: {
show: true, show: true,
@@ -109,7 +131,7 @@ export default {
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: "#4561AE", color: "rgba(69,97,174,.4)",
}, },
}, },
}, },
@@ -123,36 +145,36 @@ export default {
itemStyle: { itemStyle: {
color: "#f3c000", color: "#f3c000",
}, },
areaStyle: { // areaStyle: {
color: { // color: {
type: "linear", // type: "linear",
x: 0, // x: 0,
y: 0, // y: 0,
x2: 0, // x2: 0,
y2: 1, // y2: 1,
colorStops: [ // colorStops: [
{ // {
offset: 0, // offset: 0,
color: "#f3c000", // 0% 处的颜色 // color: "#f3c000", // 0% 处的颜色
}, // },
{ // {
offset: 0.55, // offset: 0.55,
color: "#f3c00033", // color: "#f3c00033",
}, // },
{ // {
offset: 1, // offset: 1,
color: "transparent", // 100% 处的颜色 // color: "transparent", // 100% 处的颜色
}, // },
], // ],
global: false, // 缺省为 false // global: false, // 缺省为 false
}, // },
}, // },
data: [], // this.series[0].data, data: [], // this.series[0].data,
}, },
{ {
name: "", // "2023年", name: "", // "2023年",
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
itemStyle: { itemStyle: {
borderRadius: [10, 10, 0, 0], borderRadius: [10, 10, 0, 0],
color: { color: {
@@ -187,7 +209,7 @@ export default {
{ {
name: "", // "2024年", name: "", // "2024年",
type: "bar", type: "bar",
barWidth: 12, barWidth: 16,
// tooltip: { // tooltip: {
// valueFormatter: function (value) { // valueFormatter: function (value) {
// return value + " ml"; // return value + " ml";
@@ -227,9 +249,9 @@ export default {
this.actualOptions.series.map((item) => { this.actualOptions.series.map((item) => {
item.barWidth = val ? 18 : 12; item.barWidth = val ? 18 : 12;
}); });
this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12; this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12; this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12; this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
this.initOptions(this.actualOptions); this.initOptions(this.actualOptions);
}, },
series(val) { series(val) {
@@ -292,13 +314,13 @@ export default {
.legend-item:nth-child(1):before { .legend-item:nth-child(1):before {
// width: 12px; // width: 12px;
// height: 2px; // height: 2px;
width: 0.638vw; width: 1vw;
height: 0.1064vw; height: 0.1064vw;
background-color: #f3c000; background-color: #f3c000;
position: absolute; position: absolute;
top: 50%; top: 50%;
// left: -16px; // left: -16px;
left: -0.851vw; left: -1.2vw;
transform: translateY(-50%); transform: translateY(-50%);
} }
.legend-item:nth-child(1):after { .legend-item:nth-child(1):after {
@@ -308,11 +330,11 @@ export default {
position: absolute; position: absolute;
// width: 6px; // width: 6px;
// height: 6px; // height: 6px;
width: 0.3191vw; width: 0.4vw;
height: 0.3191vw; height: 0.4vw;
border-radius: 100%; border-radius: 100%;
top: 50%; top: 50%;
left: -0.851vw; left: -1.1vw;
// left: -16px; // left: -16px;
transform: translateY(-50%) translateX(50%); transform: translateY(-50%) translateX(50%);
} }

View File

@@ -67,15 +67,15 @@ export default {
return [ return [
{ {
name: `${new Date().getFullYear()}年目标值`, name: `${new Date().getFullYear()}年目标值`,
data: stdOutput.target, data: stdOutput.target.splice(0,2),
}, },
{ {
name: `${new Date().getFullYear() - 1}`, name: `${new Date().getFullYear() - 1}`,
data: stdOutput.previous, data: stdOutput.previous.splice(0, 2),
}, },
{ {
name: `${new Date().getFullYear()}`, name: `${new Date().getFullYear()}`,
data: stdOutput.current, data: stdOutput.current.splice(0, 2),
}, },
]; ];
}, },

View File

@@ -83,7 +83,7 @@ export default {
// backdrop-filter: blur(2px); // backdrop-filter: blur(2px);
// border-radius: 4px; // border-radius: 4px;
transform: translate(-50%, -100%); transform: translate(-50%, -100%);
box-shadow: inset 0 0 12px 2px #fff3; // box-shadow: inset 0 0 12px 2px #fff3;
background: url(../../../assets/images/homeindex/info.png) no-repeat 0 0 / 100% 100%; background: url(../../../assets/images/homeindex/info.png) no-repeat 0 0 / 100% 100%;
// background: radial-gradient(circle farthest-corner at bottom center,rgba(255,239,162,.7) 10%, #021842 30%); // background: radial-gradient(circle farthest-corner at bottom center,rgba(255,239,162,.7) 10%, #021842 30%);
// 在这里设置一个总的字体大小 不失为一个好的选择 // 在这里设置一个总的字体大小 不失为一个好的选择
@@ -92,11 +92,12 @@ export default {
} }
h2 { h2 {
padding: 0 1vw; // padding: 0 1vw;
margin: 6px 0; margin: 6px 0;
font-family: 优设标题黑; font-family: 优设标题黑;
color: #fff; color: #fff;
letter-spacing:5px; letter-spacing:4px;
text-align: left;
// font-size: 24px; // font-size: 24px;
font-size: 1.276em; font-size: 1.276em;
} }
@@ -115,7 +116,7 @@ ul {
} }
li { li {
font-size: 0.851em; font-size: 0.77em;
} }
.corner { .corner {

View File

@@ -1,8 +1,8 @@
<!-- <!--
filename: Container.vue filename: Container.vue
author: liubin author: liubin
date: 2024-04-09 10:44:09 date: 2024-04-09 10:44:09
description: description:
--> -->
<template> <template>
@@ -38,7 +38,7 @@
class="container-head" class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
> >
<Icon :icon="icon"></Icon> <Icon style="margin-left: 16px;" :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2> <h2 class="container-title">{{ title }}</h2>
</div> </div>
<div <div
@@ -82,6 +82,7 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.dashboard-container { .dashboard-container {
height: 0; height: 0;
flex: 1; flex: 1;
@@ -90,29 +91,29 @@ export default {
position: relative; position: relative;
box-shadow: inset 0 0 20px 1px #fff1; box-shadow: inset 0 0 20px 1px #fff1;
// &::after { &::after {
// content: ""; content: "";
// position: absolute; position: absolute;
// display: inline-block; display: inline-block;
// width: 60%; width: 85%;
// height: 0.31415vh; height: 0.31415vh;
// border-radius: 2px; border-radius: 2px;
// left: 8%; left: 8%;
// bottom: 0; bottom: 0;
// background: linear-gradient(to right, #024798, transparent); background: linear-gradient(to left, #024798, transparent);
// z-index: 0; z-index: 0;
// } }
.container-head { .container-head {
// height: 40px; // height: 40px;
height: 3.8vh; height:4vh;
padding: 8px; padding: 8px;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
.container-title { .container-title {
font-size: 1.18vw; font-size: 1vw;
line-height: 1.39vw; line-height: 1.39vw;
font-weight: normal; font-weight: normal;
letter-spacing: 2px; letter-spacing: 2px;
@@ -132,8 +133,8 @@ export default {
position: absolute; position: absolute;
// width: 16px; // width: 16px;
// height: 16px; // height: 16px;
width: 0.95vw; width: 0.7vw;
height: 0.95vw; height: 0.7vw;
} }
.corner.tl { .corner.tl {

View File

@@ -1,8 +1,8 @@
<!-- <!--
filename: ContainerIcon.vue filename: ContainerIcon.vue
author: liubin author: liubin
date: 2024-04-09 16:41:36 date: 2024-04-09 16:41:36
description: description:
--> -->
<template> <template>
@@ -51,8 +51,8 @@ export default {
.container-icon { .container-icon {
// width: 32px; // width: 32px;
// height: 32px; // height: 32px;
width: 1.701vw; width: 1.4vw;
height: 1.701vw; height: 1.4vw;
background: #ccc2; background: #ccc2;
} }
</style> </style>

View File

@@ -153,7 +153,7 @@ h1 {
.side { .side {
position: absolute; position: absolute;
font-size: 1.18vw; font-size: 1vw;
// line-height: 24px; // line-height: 24px;
line-height: 1.277vw; line-height: 1.277vw;
letter-spacing: 2px; letter-spacing: 2px;

View File

@@ -0,0 +1,204 @@
<!--
* @Author: zhp
* @Date: 2024-07-08 13:51:30
* @LastEditTime: 2024-07-19 10:43:18
* @LastEditors: zhp
* @Description:
-->
<template>
<div class="dashboard-container">
<!-- refresh btn -->
<button
v-if="0"
style="appearance: none; outline: none; border: none; background: none; color:#fff; cursor: pointer; position: absolute; top: 8px; right: 8px"
@click="$emit('refresh')"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
style="width: 24px; height: 24px"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
/>
</svg>
</button>
<!-- decoration -->
<div class="corner tl"></div>
<div class="corner tr"></div>
<div v-if="side == 'left'" class="corner bl"></div>
<div v-if="side == 'right'" class="corner br"></div>
<!-- content -->
<div
class="container-head"
:class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
>
<Icon style="margin-left: 16px;" :icon="icon"></Icon>
<h2 class="container-title">{{ title }}</h2>
</div>
<div
class="container-body"
:class="[
side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
]"
>
<slot />
</div>
</div>
</template>
<script>
import ContainerIconVue from "./ContainerIcon.vue";
export default {
name: "DashboardContainer",
components: {
Icon: ContainerIconVue,
},
props: {
side: {
type: String,
default: "left",
},
icon: {
type: String,
default: "cube",
},
title: {
type: String,
default: "Default Title",
},
},
data() {
return {};
},
computed: {},
methods: {},
};
</script>
<style scoped lang="scss">
.dashboard-container {
height: 0;
flex: 1;
display: flex;
flex-direction: column;
position: relative;
box-shadow: inset 0 0 20px 1px #fff1;
&::after {
content: "";
position: absolute;
display: inline-block;
width: 85%;
height: 0.31415vh;
border-radius: 2px;
left: 8%;
bottom: 0;
background: linear-gradient(to right, #024798, transparent);
z-index: 0;
}
.container-head {
// height: 40px;
height:4vh;
padding: 8px;
display: flex;
align-items: center;
gap: 8px;
.container-title {
font-size: 1vw;
line-height: 1.39vw;
font-weight: normal;
letter-spacing: 2px;
}
}
.container-body {
padding: 12px;
display: flex;
flex-direction: column;
flex: 1;
height: 0;
}
.corner {
z-index: 1;
position: absolute;
// width: 16px;
// height: 16px;
width: 0.7vw;
height: 0.7vw;
}
.corner.tl {
border-top: 2px solid #0175dc;
border-left: 2px solid #0175dc;
top: 0;
left: 0;
}
.corner.tr {
top: 0;
right: 0;
border-top: 2px solid #0175dc;
border-right: 2px solid #0175dc;
}
.corner.bl {
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
bottom: 0;
left: 0;
// border-left: 10px solid #0175dc;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid transparent;
border-left: 0.532vw solid #0175dc;
border-bottom: 0.532vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid transparent;
}
.corner.br {
bottom: 0;
right: 0;
// width: 20px;
// height: 20px;
width: 1.064vw;
height: 1.064vw;
// border-left: 10px solid transparent;
// border-bottom: 10px solid #0175dc;
// border-top: 10px solid transparent;
// border-right: 10px solid #0175dc;
border-left: 0.532vw solid transparent;
border-bottom: 0.532vw solid #0175dc;
border-top: 0.532vw solid transparent;
border-right: 0.532vw solid #0175dc;
}
.gradient-to-right {
background: linear-gradient(to right, #0c3f68cc, transparent);
}
.gradient-to-left {
background: linear-gradient(to left, #0c3f68cc, transparent);
}
.body-gradient-to-right {
background: linear-gradient(to right, #0003, transparent);
}
.body-gradient-to-left {
background: linear-gradient(to left, #0003, transparent);
}
}
</style>

View File

@@ -17,12 +17,12 @@
<db-header class="db-header"></db-header> <db-header class="db-header"></db-header>
<div class="db-body"> <div class="db-body">
<div class="db-left"> <div class="db-left">
<db-container icon="cube" title="FTO投入" @refresh="() => (ftoKey = Math.random())"> <left-container icon="cube" title="FTO投入" @refresh="() => (ftoKey = Math.random())">
<fto-chart :key="ftoKey" /> <fto-chart :key="ftoKey" />
</db-container> </left-container>
<db-container icon="chip2" title="芯片投入" @refresh="() => (chipInvestKey = Math.random())"> <left-container icon="chip2" title="芯片投入" @refresh="() => (chipInvestKey = Math.random())">
<chip-invest-chart :key="chipInvestKey" /> <chip-invest-chart :key="chipInvestKey" />
</db-container> </left-container>
</div> </div>
<div class="db-right"> <div class="db-right">
<db-container side="right" icon="chip" title="芯片产出" @refresh="() => (chipYieldKey = Math.random())"> <db-container side="right" icon="chip" title="芯片产出" @refresh="() => (chipYieldKey = Math.random())">
@@ -53,6 +53,7 @@ import store from "@/store";
import DashboardHeader from "./dashboard/components/Header.vue"; import DashboardHeader from "./dashboard/components/Header.vue";
import CompanyInfo from "./dashboard/components/CompanyInfo.vue"; import CompanyInfo from "./dashboard/components/CompanyInfo.vue";
import Container from "./dashboard/components/Container.vue"; import Container from "./dashboard/components/Container.vue";
import leftContainer from "./dashboard/components/leftContainer.vue";
import FtoChart from "./dashboard/charts/Fto.vue"; import FtoChart from "./dashboard/charts/Fto.vue";
import ChipInvestChart from "./dashboard/charts/ChipInvest.vue"; import ChipInvestChart from "./dashboard/charts/ChipInvest.vue";
import BipvChart from "./dashboard/charts/Bipv.vue"; import BipvChart from "./dashboard/charts/Bipv.vue";
@@ -69,11 +70,11 @@ const LOCATIONS = [
// 蚌埠2 // 蚌埠2
// { x: 61, y: 53, tx: 39, ty: 68, path: 'factoryData/ksIndex' }, // { x: 61, y: 53, tx: 39, ty: 68, path: 'factoryData/ksIndex' },
// 江西 瑞昌 // 江西 瑞昌
{ x: 60, y: 58, tx: 68, ty: 52,lx:61,ly:61.5,ltx:69.5,lty:52, path: 'factoryData/factory-data' }, { x: 60, y: 58, tx: 68, ty: 51,lx:61,ly:61.5,ltx:69.3,lty:51.4, path: 'factoryData/factory-data' },
// 湖南 株洲 // 湖南 株洲
// { x: 56, y: 60, tx: 60, ty: 95, path: 'factoryData/zzIndex' }, // { x: 56, y: 60, tx: 60, ty: 95, path: 'factoryData/zzIndex' },
// 邯郸 // 邯郸
{ x: 58, y: 45, tx: 47.4, ty: 34.3, lx: 58.7, ly: 34, ltx: 53.2, lty: 34, path: 'factoryData/hdIndex' }, { x: 58, y: 45, tx: 48.5, ty: 34.3, lx: 58.7, ly: 34, ltx: 53.2, lty: 34, path: 'factoryData/hdIndex' },
]; ];
// rcLine.style.left = `66.8%`; // rcLine.style.left = `66.8%`;
// rcLine.style.top = `52%`; // rcLine.style.top = `52%`;
@@ -84,6 +85,7 @@ export default {
name: "Index", name: "Index",
components: { components: {
CompanyInfo, CompanyInfo,
leftContainer,
ksCompanyInfo: CompanyInfo, ksCompanyInfo: CompanyInfo,
hdCompanyInfo: CompanyInfo, hdCompanyInfo: CompanyInfo,
bbCompanyInfo: CompanyInfo, bbCompanyInfo: CompanyInfo,
@@ -340,7 +342,7 @@ export default {
.db-left, .db-left,
.db-right { .db-right {
// width: 420px; // width: 420px;
width: 24vw; width: 24.5vw;
padding: 20px; padding: 20px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@@ -10,7 +10,7 @@
style=" style="
position: absolute; position: absolute;
top: 12%; top: 12%;
left: 20%; left: 15%;
user-select: none; user-select: none;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -31,7 +31,7 @@
<p <p
style=" style="
margin: 0; margin: 0;
font-size: 26px; font-size: 24px;
letter-spacing: 1px; letter-spacing: 1px;
color: #26b9de; color: #26b9de;
opacity: 75%; opacity: 75%;
@@ -52,8 +52,8 @@
</p> </p>
</div> </div>
<img <img
src="../assets/images/login.png" src="../assets/images/map.png"
style="position: absolute; top: 30%; left: 15%; width: 40vw" style="position: absolute; top: 00%; left: 11%; width: 50vw"
alt="" alt=""
/> />
</div> </div>

View File

@@ -1,12 +1,12 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-06-07 10:28:51 * @LastEditTime: 2024-07-05 13:28:38
* @LastEditors: DY * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer class="drawer" :visible.sync="visible" size="60%" @closed="$emit('destroy')"> <el-drawer class="drawer" :visible.sync="visible" size="65%" @closed="$emit('destroy')">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
{{ '碲化镉工厂生产数据详情' }} {{ '碲化镉工厂生产数据详情' }}
</small-title> </small-title>
@@ -14,142 +14,160 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<p class="title">工厂名称</p> <p class="title">工厂名称</p>
<p class="text">{{ dataForm.factory }}</p> <p class="text">{{ factoryList[dataForm.factory] }}</p>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<p class="title">时间维度</p> <p class="title">时间维度</p>
<p class="text">{{ date }}</p> <p class="text">{{ ['日', '周', '月', '年'][date] }}</p>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<p class="title">时间</p> <p class="title">时间</p>
<p class="text">{{ dataForm.reportDate?.length > 0 ? dataForm.reportDate[0] + '年' + dataForm.reportDate[1] + '月' + dataForm.reportDate[2] + '日' : '' }}</p> <p class="text">{{ dataForm.datestr }}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-divider></el-divider> <el-divider></el-divider>
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false"> <div v-if="glass === 0">
{{ '芯片' }} <small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
</small-title> {{ '芯片' }}
<el-row :gutter="24"> </small-title>
<el-col :span="6"> <el-row :gutter="24">
<p class="title">芯片产量()</p> <el-col :span="6">
<p class="text">{{ }}</p> <p class="title">芯片产量()</p>
</el-col> <p class="text">{{ dataForm.chipYieldSum }}</p>
<el-col :span="6"> </el-col>
<p class="title">芯片良率(%)</p> <el-col :span="6">
<p class="text">{{ dataForm.yieldRate }}</p> <p class="title">芯片良率(%)</p>
</el-col> <p class="text">{{ dataForm.chipYieldRate }}</p>
<el-col :span="6"> </el-col>
<p class="title">芯片BOM</p> <el-col :span="6">
<p class="text">{{ dataForm.bom }}</p> <p class="title">芯片BOM</p>
</el-col> <p class="text">{{ dataForm.chipBom }}</p>
<el-col :span="6"> </el-col>
<p class="title">芯片总功率(MW)</p> <el-col :span="6">
<p class="text">{{ dataForm.totalPower }}</p> <p class="title">芯片总功率(MW)</p>
</el-col> <p class="text">{{ dataForm.chipTotalPower.toFixed(2) }}</p>
</el-row> </el-col>
<el-row :gutter="24"> </el-row>
<el-col :span="6"> <el-row :gutter="24">
<p class="title">FTO投入量()</p> <el-col :span="6">
<p class="text">{{ dataForm.chipInput }}</p> <p class="title">FTO投入量()</p>
</el-col> <p class="text">{{ dataForm.ftoInput }}</p>
<el-col :span="6"> </el-col>
<p class="title">CSS稼动率(%)</p> <el-col :span="6">
<p class="text">{{ dataForm.marriageRate }}</p> <p class="title">CSS稼动率(%)</p>
</el-col> <p class="text">{{ dataForm.chipCssMarriageRate }}</p>
<el-col :span="6"> </el-col>
<p class="title">芯片段OEE</p> <el-col :span="6">
<p class="text">{{ dataForm.oee }}</p> <p class="title">芯片段OEE(%)</p>
</el-col> <p class="text">{{ dataForm.chipOee }}</p>
<el-col :span="6"> </el-col>
<p class="title">芯片平均功率(W)</p> <el-col :span="6">
<p class="text">{{ dataForm.averagePower }}</p> <p class="title">芯片平均功率(W)</p>
</el-col> <p class="text">{{ dataForm.chipAveragePower }}</p>
</el-row> </el-col>
<el-row :gutter="24"> </el-row>
<el-col :span="6"> <el-row :gutter="24">
<p class="title">芯片人均产量(/)</p> <el-col :span="6">
<p class="text">{{ dataForm.annualAverageProduction }}</p> <p class="title">芯片人均产量(/)</p>
</el-col> <p class="text">{{ dataForm.chipAnnualAverageProduction }}</p>
<el-col :span="6"> </el-col>
<p class="title">芯片产能利用率(%)</p> <el-col :span="6">
<p class="text">{{ dataForm.capacityUtilizationRate }}</p> <p class="title">芯片产能利用率(%)</p>
</el-col> <p class="text">{{ parseFloat(dataForm.chipCapacityUtilizationRate.toFixed(2)) }}</p>
</el-row> </el-col>
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false"> </el-row>
{{ '标准组件' }} </div>
</small-title> <div v-if="glass === 1">
<el-row :gutter="24"> <small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
<el-col :span="6"> {{ '标准组件' }}
<p class="title">封装BOM</p> </small-title>
<!-- 没参数 --> <el-row :gutter="24">
<!-- <p class="text">{{ dataForm.bom }}</p> --> <el-col :span="6">
</el-col> <p class="title">封装BOM</p>
<el-col :span="6"> <p class="text">{{ dataForm.componentBom }}</p>
<p class="title">封装线OEE(%)</p> </el-col>
<!-- <p class="text">{{ dataForm.code }}</p> --> <el-col :span="6">
</el-col> <p class="title">封装线OEE(%)</p>
<el-col :span="6"> <p class="text">{{ dataForm.componentOee }}</p>
<p class="title">标准组件良率(%)</p> </el-col>
<!-- <p class="text">{{ dataForm.productName }}</p> --> <el-col :span="6">
</el-col> <p class="title">标准组件良率(%)</p>
<el-col :span="6"> <p class="text">{{ dataForm.componentYieldRate }}</p>
<p class="title">标准组件产量()</p> </el-col>
<!-- <p class="text">{{ dataForm.productName }}</p> --> <el-col :span="6">
</el-col> <p class="title">标准组件产量()</p>
</el-row> <p class="text">{{ dataForm.componentYield }}</p>
<el-row :gutter="24"> </el-col>
<el-col :span="6"> </el-row>
<p class="title">标准组件总功率(MW)</p> <el-row :gutter="24">
<p class="text">{{ }}</p> <el-col :span="6">
</el-col> <p class="title">标准组件总功率(MW)</p>
<el-col :span="6"> <p class="text">{{ parseFloat(dataForm.componentTotalPower.toFixed(2)) }}</p>
<p class="title">封装产能利用率(%)</p> </el-col>
<!-- <p class="text">{{ dataForm.code }}</p> --> <el-col :span="6">
</el-col> <p class="title">封装产能利用率(%)</p>
<el-col :span="6"> <p class="text">{{ parseFloat(dataForm.componentCapacityUtilizationRate.toFixed(2)) }}</p>
<p class="title">标准组件人均产量</p> </el-col>
<!-- <p class="text">{{ dataForm.productName }}</p> --> <el-col :span="6">
</el-col> <p class="title">标准组件人均产量(/)</p>
<el-col :span="6"> <p class="text">{{ dataForm.componentAnnualAverageProduction }}</p>
<p class="title">标准组件平均功率</p> </el-col>
<!-- <p class="text">{{ dataForm.productName }}</p> --> <el-col :span="6">
</el-col> <p class="title">标准组件平均功率(W)</p>
</el-row> <p class="text">{{ dataForm.componentAveragePower }}</p>
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false"> </el-col>
{{ 'BIPV产品' }} </el-row>
</small-title> <el-row :gutter="24">
<el-row :gutter="24"> <el-col :span="6">
<el-col :span="6"> <p class="title">标准组件转化效率</p>
<p class="title">产品产量</p> <p class="text">{{ dataForm.componentTransRate }}</p>
<p class="text">{{ }}</p> </el-col>
</el-col> <el-col :span="6">
<el-col :span="6"> <p class="title">芯片投入</p>
<p class="title">人均产量</p> <p class="text">{{ dataForm.chipInput }}</p>
<p class="text">{{ dataForm.code }}</p> </el-col>
</el-col> </el-row>
<el-col :span="6"> </div>
<p class="title">芯片使用量</p> <div v-if="glass === 2">
<p class="text">{{ dataForm.productName }}</p> <small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
</el-col> {{ 'BIPV产品' }}
<el-col :span="6"> </small-title>
<p class="title">芯片使用量</p> <el-row :gutter="24">
<p class="text">{{ dataForm.productName }}</p> <el-col :span="6">
</el-col> <p class="title">产品产量()</p>
</el-row> <p class="text">{{ dataForm.bipvProductOutput }}</p>
<el-row :gutter="24"> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">内部材料成本</p> <p class="title">人均产量(/)</p>
<p class="text">{{ }}</p> <p class="text">{{ dataForm.bipvAnnualAverageProduction }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">内部材料成本</p> <p class="title">芯片使用量()</p>
<p class="text">{{ dataForm.code }}</p> <p class="text">{{ dataForm.bipvChipUsage }}</p>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<p class="title">内部材料成本</p> <p class="title">芯片利用率(%)</p>
<p class="text">{{ dataForm.productName }}</p> <p class="text">{{ dataForm.bipvChipUtilizationRate }}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24">
<el-col :span="6">
<p class="title">内部材料成本(/)</p>
<p class="text">{{ dataForm.bipvInsideMaterialCost }}</p>
</el-col>
<el-col :span="6">
<p class="title">OEM及委外材料成本(/)</p>
<p class="text">{{ dataForm.code }}</p>
</el-col>
<el-col :span="6">
<p class="title">综合材料成本(/)</p>
<p class="text">{{ dataForm.bipvComprehensiveMaterialCost }}</p>
</el-col>
</el-row>
</div>
<div v-if="glass === 4">
<!-- 铜铟镓硒待完成 -->
</div>
</div> </div>
</el-drawer> </el-drawer>
@@ -157,24 +175,18 @@
<script> <script>
// import basicAdd from './basic-add'; // import basicAdd from './basic-add';
import { import { getProduceDataDetail } from "@/api/produceData";
getProduceDataDetail
} from "@/api/produceData";
// import { getList, } from "@/api/base/qualityScrapType"; // import { getList, } from "@/api/base/qualityScrapType";
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { factoryList } from "@/utils/constants";
export default { export default {
components: { components: {
SmallTitle, SmallTitle,
}, },
// mixins: [basicAdd],
props: {
date: {
type: Number,
default: 0
}
},
data() { data() {
return { return {
factoryList,
urlOptions: { urlOptions: {
isGetCode: false, isGetCode: false,
// codeURL: getCode, // codeURL: getCode,
@@ -198,6 +210,8 @@ export default {
} }
], ],
sectionList: [], sectionList: [],
glass: 0,
date: 0,
visible: false, visible: false,
dataForm: { dataForm: {
id: undefined, id: undefined,
@@ -229,11 +243,16 @@ export default {
// this.getCurrentTime() // this.getCurrentTime()
}, },
methods: { methods: {
init(id) { init(id, type, glass) {
this.visible = true this.visible = true
console.log('打印', id) this.glass = glass
this.date = type
console.log('打印', id, glass)
if (id) { if (id) {
getProduceDataDetail(id).then(res => { getProduceDataDetail({
id: id,
type: type
}).then(res => {
this.dataForm = res.data this.dataForm = res.data
console.log('你好', res.data) console.log('你好', res.data)
}) })

View File

@@ -1,53 +1,53 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-07 09:41:56 * @LastEditTime: 2024-07-30 10:31:35
* @LastEditors: DY * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 31px)"> <div style="display: flex; flex-direction: column; min-height: calc(100vh - 200px - 31px)">
<div class="app-container" style="padding: 16px 24px 0;height: auto; flex-grow: 1;"> <div class="app-container" style="padding: 16px 16px 0; height: auto; flex-grow: 1;">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip"> <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="date"> <el-form-item label="时间维度" prop="type">
<el-select size="small" clearable v-model="listQuery.date" placeholder="请选择"> <el-select @change="changType" v-model="listQuery.type" size="small" clearable placeholder="请选择">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.date === 0 || listQuery.date === ''" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.type === 0 || listQuery.type === ''" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="datetimerange" range-separator="至" <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="daterange" range-separator="至"
start-placeholder="开始日期" value-format="timestamp" format="yyyy-MM-dd" @change="changeDayTime" end-placeholder="结束日期"> start-placeholder="开始日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" @change="changeDayTime" end-placeholder="结束日期" :picker-options="{ firstDayOfWeek: 1 }">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.date === 1" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.type === 1" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.start" type="week" format="yyyy 第 WW 周" placeholder="选择周" <el-date-picker size="small" clearable v-model="listQuery.start" type="week" format="yyyy-MM-dd" placeholder="选择周" :picker-options="{ firstDayOfWeek: 1 }"
style="width: 180px" @change="onValueChange"> style="width: 180px" @change="onValueChange">
</el-date-picker> </el-date-picker>
<el-date-picker size="small" clearable v-model="listQuery.end" type="week" format="yyyy 第 WW 周" placeholder="选择周" <el-date-picker size="small" clearable v-model="listQuery.end" type="week" format="yyyy-MM-dd" placeholder="选择周" :picker-options="{ firstDayOfWeek: 1 }"
style="width: 180px" @change="onValueChange"> style="width: 180px" @change="onValueChange">
</el-date-picker> </el-date-picker>
<span v-if="listQuery.start && listQuery.end" style="margin-left: 10px"> <!-- <span v-if="listQuery.start && listQuery.end" style="margin-left: 10px">
{{ date1 }} {{ date2 }} {{ weekNum }} {{ date1 }} {{ date2 }} {{ weekNum }}
</span> </span> -->
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.date === 2" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.type === 2" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="monthrange" value-format="timestamp" range-separator="至" <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="monthrange" value-format="yyyy-MM-dd" range-separator="至"
start-placeholder="开始月份" end-placeholder="结束月份" @change="changeTime"> start-placeholder="开始月份" end-placeholder="结束月份" @change="changeTime">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-show="listQuery.date === 3" label="时间范围" prop="reportTime"> <el-form-item v-show="listQuery.type === 3" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.start" format="yyyy-MM-dd" value-format="timestamp" type="year" <el-date-picker size="small" clearable v-model="listQuery.start" value-format="yyyy-MM-dd" type="year"
placeholder="开始时间"> placeholder="开始时间" @change="getYear">
</el-date-picker> </el-date-picker>
~ ~
<el-date-picker size="small" clearable v-model="listQuery.end" format="yyyy-MM-dd" value-format="timestamp" type="year" placeholder="结束时间" <el-date-picker size="small" clearable v-model="listQuery.end" value-format="yyyy-MM-dd" type="year" placeholder="结束时间"
@change="getYear"> @change="getYear">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="工厂名称" prop="factorys"> <el-form-item label="工厂名称" prop="factory">
<el-select size="small" clearable v-model="listQuery.factorys" placeholder="请选择工厂名称" multiple > <el-select size="small" clearable v-model="listQuery.factory" placeholder="请选择工厂名称" multiple >
<el-option v-for="item in factoryArray" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in factoryArray" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -58,8 +58,8 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> --> </el-form-item> -->
<el-form-item label="玻璃类型" prop="type"> <el-form-item label="玻璃类型" prop="glass">
<el-select size="small" clearable v-model="listQuery.type" multiple placeholder="请选择玻璃类型"> <el-select size="small" clearable v-model="listQuery.glass" multiple placeholder="请选择玻璃类型">
<el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@@ -74,7 +74,7 @@
<!-- <el-row :gutter="24"> --> <!-- <el-row :gutter="24"> -->
<!-- <el-col :span="12" v-for="item in dataList" :key="item.id"> --> <!-- <el-col :span="12" v-for="item in dataList" :key="item.id"> -->
<search-bar :formConfigs="formConfig1" ref="searchBarForm1" style="margin-bottom: 0" /> <search-bar :formConfigs="formConfig1" ref="searchBarForm1" style="margin-bottom: 0" />
<line-chart class="yearChart" ref="lineChart" style="height: 40vh;width: 100%"></line-chart> <line-chart ref="lineChart" class="yearChart" style="height: 45vh;width: 100%"></line-chart>
<!-- </el-col> --> <!-- </el-col> -->
<!-- <el-col :span="12"> <!-- <el-col :span="12">
<line-chart :id=" 'second' " class="yearChart" ref="lineChart" style="height: 40vh;width: 100%"></line-chart> <line-chart :id=" 'second' " class="yearChart" ref="lineChart" style="height: 40vh;width: 100%"></line-chart>
@@ -82,19 +82,19 @@
</div> </div>
<div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto; padding: 16px;"> <div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto; padding: 16px;">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" style="margin-bottom: 0" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" style="margin-bottom: 0" />
<base-table :table-props="tableProps" :page="listQuery.current" :limit="listQuery.size" <base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
:table-data="tableData"> :table-data="tableData" :max-height="tableH">
<method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right" <method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right"
:method-list="tableBtn" @clickBtn="handleClick" /> :method-list="tableBtn" @clickBtn="handleClick" />
</base-table> </base-table>
<pagination <pagination
:limit.sync="listQuery.size" :limit.sync="listQuery.pageSize"
:page.sync="listQuery.current" :page.sync="listQuery.pageNo"
:total="listQuery.total" :total="listQuery.total"
@pagination="getDataList" @pagination="getDataList"
/> />
</div> </div>
<add-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" :date="listQuery.date" @refreshDataList="successSubmit" @destroy="detailOrUpdateVisible = false" /> <add-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" @refreshDataList="successSubmit" @destroy="detailOrUpdateVisible = false" />
<!-- <inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" <!-- <inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
:type="listQuery.reportType" @refreshDataList="getDataList" /> --> :type="listQuery.reportType" @refreshDataList="getDataList" /> -->
<!-- <pagination <!-- <pagination
@@ -106,37 +106,38 @@
</template> </template>
<script> <script>
// import { parseTime } from '../../core/mixins/code-filter'; // import { parseTime } from "@/utils/ruoyi";
import { getProduceDataPage, prodOutputDataList, exportOutPutExcel } from '@/api/produceData'; import tableHeightMixin from "@/mixins/tableHeightMixin";
import { getProduceDataPage, getproddata, exportOutPutExcel } from '@/api/produceData';
// import inputTable from './inputTable.vue'; // import inputTable from './inputTable.vue';
import lineChart from './lineChart'; import lineChart from './lineChart';
import moment from 'moment' import moment from 'moment'
import ButtonNav from '@/components/ButtonNav' import ButtonNav from '@/components/ButtonNav'
import basicPage from '@/mixins/basic-page' import basicPage from '@/mixins/basic-page'
import AddOrUpdate from './add-or-updata' import AddOrUpdate from './add-or-updata'
import { factoryList, factoryArray, factoryArray1 } from "@/utils/constants"; import { factoryList, factoryArray, factoryListabbr } from "@/utils/constants";
export default { export default {
components: { lineChart, ButtonNav, AddOrUpdate }, components: { lineChart, ButtonNav, AddOrUpdate },
mixins: [basicPage], mixins: [basicPage, tableHeightMixin],
data() { data() {
return { return {
factoryList, factoryList,
factoryArray, factoryArray,
factoryArray1, factoryListabbr,
listQuery: { listQuery: {
size: 20, pageSize: 20,
current: 1, pageNo: 1,
factorys: undefined, factory: undefined,
total: 0, total: 0,
date: 0, type: 0, // 时间维度
type:undefined, glass: undefined, // 玻璃类型
// reportType: 2, // reportType: 2,
beginTime: undefined, startDate: undefined,
endTime:undefined, endDate:undefined,
reportTime: [], reportTime: null,
start: undefined, start: null,
end: undefined end: null
}, },
detailOrUpdateVisible:false, detailOrUpdateVisible:false,
date1: undefined, date1: undefined,
@@ -153,7 +154,7 @@ export default {
].filter((v) => v), ].filter((v) => v),
typeList: [ typeList: [
{ {
name: '芯片', name: '玻璃芯片',
id: 0, id: 0,
}, },
{ {
@@ -164,6 +165,10 @@ export default {
name: 'BIPV产品', name: 'BIPV产品',
id: 2, id: 2,
}, },
// {
// name: '定制组件',
// id: 3,
// },
], ],
formConfig: [ formConfig: [
{ {
@@ -197,16 +202,16 @@ export default {
], ],
tableProps: [ tableProps: [
{ {
prop: 'groupTime', prop: 'datestr',
label: '日期', label: '日期',
minWidth: 100, minWidth: 120,
showOverflowtooltip: true showOverflowtooltip: true
}, },
{ {
prop: 'factory', prop: 'factory',
label: '工厂名称', label: '工厂名称',
filter: (val) => factoryList[val], filter: (val) => factoryList[val],
minWidth: 200, minWidth: 180,
showOverflowtooltip: true showOverflowtooltip: true
}, },
{ {
@@ -215,51 +220,59 @@ export default {
filter: (val) => ['玻璃芯片', '标准组件', 'BIPV', '定制组件'][val] filter: (val) => ['玻璃芯片', '标准组件', 'BIPV', '定制组件'][val]
}, },
{ {
prop: 'inputNumber', prop: 'inputNum',
label: '投入数量', label: '投入数量',
}, },
{ {
prop: 'outputNumber', prop: 'outputNum',
label: '产出数量', label: '产出数量',
}, },
{ {
prop: 'goodNumber', prop: 'goodNum',
label: '良品数量', label: '良品数量',
}, },
{ {
prop: 'yieldRate', prop: 'goodRatio',
label: '良品率%', label: '良品率%',
filter: (val) => (val * 100) + '%' filter: (val) => val.toFixed(2) + '%'
}, },
], ],
tableData: [], tableData: [],
lineData: [], lineData: [],
chart: null, chart: null,
seriesList: [] seriesList: [],
colorList: ['#7164FF', '#63BDFF', '#8EF0AB', '#FFCE6A']
// proLineList: [], // proLineList: [],
// all: {} // all: {}
}; };
},
computed: {
weekNum() {
return Math.round((this.listQuery.end - this.listQuery.start) / (24 * 60 * 60 * 1000 * 7)) + 1
},
}, },
// computed: {
// weekNum() {
// return Math.round((this.listQuery.end - this.listQuery.start) / (24 * 60 * 60 * 1000 * 7)) + 1
// },
// },
created() { created() {
const today = new Date() const today = new Date()
const sevenDaysAgo = new Date(today.getTime() - (7 * 24 * 60 * 60 * 1000)) const sevenDaysAgo = new Date(today.getTime() - (6 * 24 * 60 * 60 * 1000))
this.listQuery.beginTime = sevenDaysAgo.getTime() this.listQuery.startDate = moment(sevenDaysAgo).format('yyyy-MM-DD')
this.listQuery.endTime = today.getTime() this.listQuery.endDate = moment(today).format('yyyy-MM-DD')
this.listQuery.reportTime = [this.listQuery.beginTime, this.listQuery.endTime] this.listQuery.reportTime = [this.listQuery.startDate, this.listQuery.endDate]
}, },
mounted() { mounted() {
}, },
methods: { methods: {
changType() {
this.listQuery.endDate = null
this.listQuery.startDate = null
this.listQuery.reportTime = null
this.listQuery.start = null
this.listQuery.end = null
},
otherMethods(val) { otherMethods(val) {
this.detailOrUpdateVisible = true; this.detailOrUpdateVisible = true;
this.addOrEditTitle = "详情"; this.addOrEditTitle = "详情";
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.detailOrUpdate.init(val.data.id); this.$refs.detailOrUpdate.init(val.data.id, this.listQuery.type, val.data.glassType);
}); });
}, },
getYear(e) { getYear(e) {
@@ -271,17 +284,14 @@ export default {
this.listQuery.reportTime = [] this.listQuery.reportTime = []
this.listQuery.start = undefined this.listQuery.start = undefined
this.listQuery.end = undefined this.listQuery.end = undefined
// console.log();
} else { } else {
this.listQuery.beginTime = this.listQuery.start this.listQuery.startDate = this.listQuery.start
this.listQuery.endTime = this.listQuery.end this.listQuery.endDate = this.listQuery.end
} }
// console.log(e);
}, },
onValueChange(picker, k) { // 选中近k周后触发的操作 onValueChange(picker, k) { // 选中近k周后触发的操作
// console.log(this.listQuery.reportTime[0], this.listQuery.reportTime[1])
if (this.listQuery.start && this.listQuery.end) { if (this.listQuery.start && this.listQuery.end) {
console.log(this.listQuery.reportTime) // console.log(this.listQuery.start, this.listQuery.end - this.listQuery.start)
this.date1 = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss') this.date1 = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
this.date2 = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss') this.date2 = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000); const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000);
@@ -292,10 +302,18 @@ export default {
type: 'warning' type: 'warning'
}); });
} else { } else {
this.listQuery.beginTime = this.listQuery.start.getTime() - 24 * 60 * 60 * 1000 this.listQuery.startDate = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
this.listQuery.endTime = this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000 this.listQuery.endDate = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
} }
console.log(this.listQuery.startDate, this.listQuery.endDate)
} else {
this.listQuery.startDate = undefined
this.listQuery.endDate = undefined
} }
// if (!this.listQuery.start && !this.listQuery.end) {
// this.listQuery.startDate = undefined
// this.listQuery.endDate = undefined
// }
}, },
changeDayTime() { changeDayTime() {
if (this.listQuery.reportTime) { if (this.listQuery.reportTime) {
@@ -310,10 +328,12 @@ export default {
}); });
this.listQuery.reportTime = []; this.listQuery.reportTime = [];
} else { } else {
this.listQuery.beginTime = this.listQuery.reportTime[0] this.listQuery.startDate = this.listQuery.reportTime[0]
this.listQuery.endTime = this.listQuery.reportTime[1] this.listQuery.endDate = this.listQuery.reportTime[1]
} }
} else { } else {
this.listQuery.startDate = undefined
this.listQuery.endDate = undefined
} }
}, },
changeTime(value) { changeTime(value) {
@@ -326,114 +346,117 @@ export default {
}); });
this.listQuery.reportTime = []; this.listQuery.reportTime = [];
} else { } else {
this.listQuery.beginTime = this.listQuery.reportTime[0] this.listQuery.startDate = this.listQuery.reportTime[0]
this.listQuery.endTime = this.listQuery.reportTime[1] this.listQuery.endDate = this.listQuery.reportTime[1]
} }
} else { } else {
console.log(this.listQuery.reportTime[0]) this.listQuery.startDate = undefined
this.listQuery.endDate = undefined
} }
}, },
async getDataList() { async getDataList() {
const res = await getProduceDataPage(this.listQuery) if (this.listQuery.type === '') {
console.log(res) this.$message.warning('请选择时间维度!')
if (res.code === 0) { return
this.tableData = res.data.records
this.listQuery.total = res.data.total
// if (this.listQuery.total > 0) {
// this.tableData.forEach(item => {
// item.tableTime = item?.reportDate?.length > 0 ? item.reportDate[0] + '-' + item.reportDate[1] + '-' + item.reportDate[2] : '--'
// })
// }
} }
if (!this.listQuery.startDate || !this.listQuery.endDate) {
// 图表 this.$message.warning('请选择时间范围!')
await prodOutputDataList({ } else {
current: 1, await getProduceDataPage(this.listQuery).then(res => {
size: 99, console.log(res)
beginTime: this.listQuery.beginTime, if (res.code === 0) {
endTime: this.listQuery.endTime, this.tableData = res.data.records
factorys: this.listQuery.factorys, this.listQuery.total = res.data.total
date: this.listQuery.date,
type: this.listQuery.type
}).then(resp => {
console.log('Aaa', resp.data)
this.lineData = resp?.data || []
if (this.lineData.length > 0) {
this.buildChart(this.lineData)
}
})
// this.buildChart(this.tableData)
},
buildChart(list) {
let temp = []
let xAxisData = []
list.forEach(item => {
temp.push(item.groupTime)
})
// x轴数据
xAxisData = Array.from(new Set(temp))
// y轴数据
for (const y of this.factoryArray1) {
for (const type of this.typeList) {
const seriesItem = {
name: y.name,
record: type.name,
type: 'bar',
emphasis: {
focus: 'series'
},
data: Array(xAxisData.length).fill(0)
} }
list.forEach(data => { })
xAxisData.forEach((x, index) => { // 图表
if (x === data.groupTime && y.id === data.factory && type.id === data.glassType) { await getproddata(this.listQuery).then(resp => {
seriesItem.data[index] = data.goodNumber if (resp.data?.length > 0) {
const chartData = Object.groupBy(resp.data, (member) => member.datestr)
this.buildChart(chartData, resp.data)
} else {
this.$refs.lineChart.initChart([], [])
}
})
}
},
buildChart(data, dataList) {
let xAxisData = []
this.seriesList = []
// x轴数据
xAxisData = Object.keys(data)
// 构造series
// 玻璃类型 ['chipYield', 'componentYield', 'bipvProductOutput']
const typeArray = (this.listQuery.glass.length === 0 || this.listQuery.glass.length === 3) ? [0, 1, 2] : this.listQuery.glass
// 工厂名称 this.factoryListabbr
const factoryNameArray = (this.listQuery.factory.length === 0 || this.listQuery.factory.length === this.factoryListabbr.length) ? [0, 1] : this.listQuery.factory
const seriesArray = []
factoryNameArray.forEach((fac, facIndex) => {
typeArray.forEach((type, typeIndex) => {
const series = {
data: Array(xAxisData.length).fill(0),
type: 'bar',
stack: String(fac),
barWidth: 16,
itemStyle: {
color: this.colorList[type]
},
name: this.factoryListabbr[fac] + '-' + type
}
seriesArray.push(series)
})
})
// 按工厂分
const arrayByFacArray = Object.groupBy(dataList, (member) => member.factory)
// const seriesDataArray = []
let n = 0
Object.values(arrayByFacArray).forEach((item) => {
typeArray.forEach(type => {
const typeName = ['chipYield', 'componentYield', 'bipvProductOutput'][type]
let seriesData = Array(xAxisData.length).fill(0)
item.forEach(it => {
xAxisData.forEach((x, xindex) => {
if (x === it['datestr']) {
seriesData[xindex] = it[typeName]
} }
}) })
}) })
this.seriesList.push(seriesItem) seriesArray[n].data = seriesData
n ++
})
})
// 添加工厂
const validSeriesArray = []
factoryNameArray.forEach(f => {
const s = {
name: '显示工厂',
data: Array(xAxisData.length).fill(0),
type: 'bar',
stack: String(f),
barWidth: 16,
label: {
show: true,
position: 'top',
// position: f > 0 ? [2, -16] : [-10, -16],
formatter(params) {
return factoryListabbr[f]
}
}
} }
} validSeriesArray.push(s)
console.log('啊啊', this.seriesList) })
this.$refs.lineChart.initChart(xAxisData, this.seriesList) this.seriesList = [...seriesArray, ...validSeriesArray]
// const chartList = Object.groupBy(list, (item) => item.tableTime) this.$refs.lineChart.initChart(xAxisData, this.seriesList, factoryNameArray)
// this.xAxis = []
// this.seriesList = []
// for (const keyIndex in chartList) {
// // X坐标轴数据
// this.xAxis.push(keyIndex)
// }
// // y轴数据
// for (const y of this.factoryArray) {
// // y: {name: , id: }
// const seriesItem = {
// name: y.name,
// type: 'bar',
// emphasis: {
// focus: 'series'
// },
// data: Array(this.xAxis.length).fill(0)
// }
// for (const a in chartList) {
// for (const z of chartList[a]) {
// this.xAxis.forEach((item, index) => {
// if (z.factory === y.id && a === item) {
// seriesItem.data[index] = z.goodNumber
// }
// })
// }
// }
// this.seriesList.push(seriesItem)
// }
// this.$refs.lineChart.initChart(this.xAxis, this.seriesList)
}, },
buttonClick(val) { buttonClick(val) {
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined; this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.current = 1; this.listQuery.pageNo = 1;
this.listQuery.size = 20; this.listQuery.pageSize = 20;
this.getDataList(); this.getDataList();
break; break;
case 'export': case 'export':
@@ -448,8 +471,8 @@ export default {
this.$modal.confirm('是否确认导出生产数据?').then(() => { this.$modal.confirm('是否确认导出生产数据?').then(() => {
// 处理查询参数 // 处理查询参数
let params = {...this.listQuery}; let params = {...this.listQuery};
params.current = 1; params.pageNo = 1;
params.size = 999; params.pageSize = 999;
this.exportLoading = true; this.exportLoading = true;
return exportOutPutExcel(params); return exportOutPutExcel(params);
}).then(response => { }).then(response => {
@@ -492,11 +515,23 @@ export default {
}; };
</script> </script>
<style scoped> <style>
/* .blueTip { */ /* .blueTip { */
/* padding-bottom: 10px; */ /* padding-bottom: 10px; */
/* } */ /* } */
/* .blueTi */ /* .blueTi */
.blueTip .el-date-editor .el-range__icon {
font-size: 16px;
color: #0b58ff;
}
.blueTip .el-input__prefix .el-icon-date {
font-size: 16px;
color: #0b58ff;
}
.blueTip .el-input__prefix .el-icon-time {
font-size: 16px;
color: #0b58ff;
}
.blueTip::before{ .blueTip::before{
display: inline-block; display: inline-block;
content: ''; content: '';

View File

@@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2022-01-21 14:43:06 * @Date: 2022-01-21 14:43:06
* @LastEditors: DY * @LastEditors: zhp
* @LastEditTime: 2024-05-30 14:52:05 * @LastEditTime: 2024-07-23 09:45:30
* @Description: * @Description:
--> -->
<template> <template>
@@ -16,6 +16,8 @@
import * as echarts from 'echarts' import * as echarts from 'echarts'
import 'echarts/theme/macarons' // echarts theme import 'echarts/theme/macarons' // echarts theme
import resize from '@/mixins/resize' import resize from '@/mixins/resize'
import { factoryListabbr } from "@/utils/constants";
export default { export default {
name: 'OverviewBar', name: 'OverviewBar',
mixins: [resize], mixins: [resize],
@@ -38,7 +40,7 @@ export default {
}, },
height: { height: {
type: String, type: String,
default: '30vh' default: '35vh'
}, },
legendPosition: { legendPosition: {
type: String, type: String,
@@ -71,64 +73,112 @@ export default {
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart(xAxis, seriesList) { initChart(xAxis, seriesList, facs) {
this.chart = echarts.init(document.getElementById(this.id)) if (xAxis.length === 0) {
console.log(this.$parent); this.chart.clear()
this.chart.setOption({ }
else {
this.chart = echarts.init(document.getElementById(this.id))
console.log(this.$parent);
this.chart.setOption({
title: { title: {
text: '', text: '',
// subtext: 'Fake Data' // subtext: 'Fake Data'
}, },
tooltip: {
trigger: 'axis'
},
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
legend: { legend: {
// data: ['工厂1', '工厂2'],
right: '90px', right: '90px',
top: '0%', top: '0%',
icon: 'rect', icon: 'rect',
itemWidth: 10, itemWidth: 10,
itemHeight: 10, itemHeight: 10,
itemGap: 40, itemGap: 40,
formatter(name) {
return ['玻璃芯片', '标准组件', 'BIPV'][name.split('-')[1]]
},
data: ['瑞昌-0', '瑞昌-1', '瑞昌-2']
}, },
// toolbox: { tooltip: {
// show: true, trigger: 'axis',
// feature: { axisPointer: {
// dataView: { show: true, readOnly: false }, type: 'shadow',
// magicType: { show: true, type: ['line', 'bar'] }, color: "rgba(237,237,237,0.5)"
// restore: { show: true }, },
// saveAsImage: { show: true } formatter(params) {
// } let str = ''
// }, facs.forEach(ele => {
str += `<div style="width: 60px; text-align: right">${ factoryListabbr[ele] }</div>`
})
let result = `
<div style="width: 270px; display: flex">
<div style="width: 150px">${params[0].name}</div>
${ str }
</div>`
const analyzeArray = params.filter(p => p.seriesName !== '显示工厂').map(item => {
const obj = {
glass: ['玻璃芯片', '标准组件', 'BIPV'][item.seriesName.split('-')[1]], // 玻璃类型
factoryName: item.seriesName.split('-')[0], // 工厂名称
value: item.value,
name: item.name,
marker: item.marker,
color: item.color
}
return obj
})
const analyzeList = Object.groupBy(analyzeArray, (member) => member.glass)
for (let g in analyzeList) {
// date => 玻璃类型
let oneData = `<div style="width: 270px; display: flex">
<div style="width: 150px; display: flex; align-items: center">
<div style="background-color: ${analyzeList[g][0].color}; width: 10px; height: 10px; margin-right: 5px"></div>
<div>${g}</div></div>`
let goodNum = 0
for (let ana of analyzeList[g]) {
goodNum = ana.value
oneData += `<div style="width: 60px; text-align: right">${goodNum}</div>`
}
result = result + oneData + '</div>'
}
return result
}
},
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
calculable: true, calculable: true,
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
// prettier-ignore name: '日期',
data: xAxis data: xAxis,
axisLabel: {
rotate: 25
}
} }
], ],
yAxis: [ yAxis: [
{ {
type: 'value' type: 'value',
name: '单位:片'
} }
], ],
grid: { grid: {
top: '20%', top: '10%',
left: "1%", left: "2%",
right: "3%", right: "5%",
bottom: "1%", bottom: "0%",
containLabel: true containLabel: true
}, },
series: seriesList series: seriesList
}, true) }, true)
}
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.chartTooltipSpan {
width: 50px;
background: #787878;
}
/* .reportChart { /* .reportChart {
position: absolute; position: absolute;
height: 100%; height: 100%;

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-17 16:31:51 * @Date: 2024-04-17 16:31:51
* @LastEditTime: 2024-06-04 16:45:52 * @LastEditTime: 2024-06-24 15:43:50
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@@ -11,7 +11,7 @@
{{ dataForm.id ? '编辑' : '新增' }} {{ dataForm.id ? '编辑' : '新增' }}
</small-title> </small-title>
<div class="detailBox"> <div class="detailBox">
<el-form ref="form" :model="dataForm" label-width="80px" label-position="top"> <el-form ref="form" :model="dataForm" label-width="80px" :rules="dataRule" label-position="top">
<el-row :gutter="24" style="padding: 0 32px;"> <el-row :gutter="24" style="padding: 0 32px;">
<el-col :span="8"> <el-col :span="8">
<el-form-item v-if="ftype === 0" label="工厂名称" prop="factory"> <el-form-item v-if="ftype === 0" label="工厂名称" prop="factory">
@@ -29,7 +29,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="时间维度" prop="targetType"> <el-form-item label="时间维度" prop="targetType">
<el-select v-model="dataForm.targetType" placeholder="请选择时间维度" clearable> <el-select v-model="dataForm.targetType" placeholder="请选择时间维度" clearable @change="clearTime">
<!-- <el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id"> --> <!-- <el-option v-for="item in factoryList" :key="item.id" :label="item.name" :value="item.id"> -->
<el-option label="日" :value="0" /> <el-option label="日" :value="0" />
<el-option label="周" :value="1" /> <el-option label="周" :value="1" />
@@ -40,19 +40,19 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item v-show="dataForm.targetType === 0 || dataForm.targetType === ''" label="时间" prop="reportTime"> <el-form-item v-show="dataForm.targetType === 0 || dataForm.targetType === ''" label="时间" prop="reportTime">
<el-date-picker v-model="reportTime" value-format="yyyyMMdd" type="date" placeholder="选择日"> <el-date-picker v-model="dataForm.reportTime" value-format="yyyyMMdd" type="date" placeholder="选择日">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-show="dataForm.targetType === 1" label="时间" prop="week"> <el-form-item v-show="dataForm.targetType === 1" label="时间" prop="reportTime">
<el-date-picker v-model="week" type="week" format="yyyy 第 WW 周" placeholder="选择周"> <el-date-picker v-model="week" type="week" format="yyyy 第 WW 周" placeholder="选择周" @change="setReportTime">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-show="dataForm.targetType === 2" label="时间" prop="reportTime"> <el-form-item v-show="dataForm.targetType === 2" label="时间" prop="reportTime">
<el-date-picker v-model="reportTime" value-format="yyyyMM" type="month" placeholder="选择月份"> <el-date-picker v-model="dataForm.reportTime" value-format="yyyyMM" type="month" placeholder="选择月份">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-show="dataForm.targetType === 3" label="时间" prop="reportTime"> <el-form-item v-show="dataForm.targetType === 3" label="时间" prop="reportTime">
<el-date-picker clearable v-model="reportTime" value-format="yyyy" type="year" placeholder="开始时间"> <el-date-picker clearable v-model="dataForm.reportTime" value-format="yyyy" type="year" placeholder="开始时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -170,6 +170,11 @@
<el-input-number v-model="dataForm.componentAveragePower" :precision="2" controls-position="right" placeholder="请输入标准组件平均功率" style="width: 100%" /> <el-input-number v-model="dataForm.componentAveragePower" :precision="2" controls-position="right" placeholder="请输入标准组件平均功率" style="width: 100%" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="标准组件转化效率" prop="componentConversionEfficiency">
<el-input-number v-model="dataForm.componentConversionEfficiency" :precision="2" controls-position="right" placeholder="请输入标准组件转化效率" style="width: 100%" />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-divider></el-divider> <el-divider></el-divider>
@@ -260,9 +265,10 @@ export default {
teamList: [], teamList: [],
sectionList: [], sectionList: [],
visible: false, visible: false,
reportTime: undefined, // reportTime: undefined,
week: undefined, week: undefined,
dataForm: { dataForm: {
reportTime: undefined,
factoryType: 0, factoryType: 0,
id: undefined, id: undefined,
factory: undefined, factory: undefined,
@@ -293,13 +299,14 @@ export default {
bipvInsideMaterialCost: undefined, bipvInsideMaterialCost: undefined,
bipvOeeMaterialCost: undefined, bipvOeeMaterialCost: undefined,
bipvComprehensiveMaterialCost: undefined, bipvComprehensiveMaterialCost: undefined,
molybdenumElectrodeInput: undefined molybdenumElectrodeInput: undefined,
componentConversionEfficiency: undefined
}, },
// materialList: [], // materialList: [],
dataRule: { dataRule: {
// materialId: [{ required: true, message: "", trigger: "blur" }], factory: [{ required: true, message: "工厂名称不能为空", trigger: "chnage" }],
// workOrderId: [{ required: true, message: "工单号不能为空", trigger: "change" }], reportTime: [{ required: true, message: "时间不能为空", trigger: "change" }],
// num: [{ required: true, message: "数量不能为空", trigger: "blur" }], targetType: [{ required: true, message: "时间维度不能为空", trigger: "change" }]
// detId: [{ required: true, message: "报废原因不能为空", trigger: "change" }], // detId: [{ required: true, message: "报废原因不能为空", trigger: "change" }],
// logTime: [{ required: true, message: "报废时间不能为空", trigger: "change" }], // logTime: [{ required: true, message: "报废时间不能为空", trigger: "change" }],
@@ -310,6 +317,13 @@ export default {
// this.getCurrentTime() // this.getCurrentTime()
}, },
methods: { methods: {
setReportTime() {
this.dataForm.reportTime = this.week
},
clearTime() {
this.week = undefined
this.dataForm.reportTime = undefined
},
formClear() { formClear() {
if (this.$refs.dataForm !== undefined) { if (this.$refs.dataForm !== undefined) {
this.$refs.dataForm.resetFields() this.$refs.dataForm.resetFields()
@@ -319,35 +333,41 @@ export default {
// this.dataForm.targetTime = undefined // this.dataForm.targetTime = undefined
// }, // },
handleClose() { handleClose() {
// 新增 this.$refs["form"].validate(valid => {
if (this.dataForm.targetType === 1) { if (valid) {
this.dataForm.targetTime = this.week ? Number(moment(this.week.getTime()).format('YYYYWW')) : undefined // 新增
} else { if (this.dataForm.targetType === 1) {
this.dataForm.targetTime = this.reportTime ? Number(this.reportTime) : undefined this.dataForm.targetTime = this.week ? Number(moment(this.week.getTime()).format('YYYYWW')) : ''
} } else {
if (this.dataForm.id) { this.dataForm.targetTime = this.dataForm.reportTime ? Number(this.dataForm.reportTime) : ''
// 修改
updateProduceTarget({
...this.dataForm
}).then(res => {
if (res.code === 0) {
this.$message.success('修改成功!')
this.visible = false
this.$emit('refreshDataList')
} }
}) if (this.dataForm.id) {
} else { // 修改
// 新增 updateProduceTarget({
createProduce({ ...this.dataForm,
...this.dataForm reportTime: undefined
}).then(res => { }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success('新增成功!') this.$message.success('修改成功!')
this.visible = false this.visible = false
this.$emit('refreshDataList') this.$emit('refreshDataList')
}
})
} else {
// 新增
createProduce({
...this.dataForm,
reportTime: undefined
}).then(res => {
if (res.code === 0) {
this.$message.success('新增成功!')
this.visible = false
this.$emit('refreshDataList')
}
})
} }
}) }
} })
}, },
init(id) { init(id) {
this.dataForm.id = id || undefined this.dataForm.id = id || undefined
@@ -355,9 +375,15 @@ export default {
this.visible = true this.visible = true
if (this.dataForm.id) { if (this.dataForm.id) {
getProduceTargetDetail(this.dataForm.id).then(res => { getProduceTargetDetail(this.dataForm.id).then(res => {
this.dataForm = res.data // this.dataForm = res.data
for (const i in res.data) {
if (res.data[i] !== null) {
this.dataForm[i] = res.data[i]
}
}
if (this.dataForm.targetType === 0 || this.dataForm.targetType === 2 || this.dataForm.targetType === 3) { if (this.dataForm.targetType === 0 || this.dataForm.targetType === 2 || this.dataForm.targetType === 3) {
this.reportTime = String(this.dataForm.targetTime) // this.dataForm.reportTime = String(this.dataForm.targetTime)
this.$set(this.dataForm, 'reportTime', String(this.dataForm.targetTime))
} }
if (this.dataForm.targetType === 1) { if (this.dataForm.targetType === 1) {
const date = new Date() const date = new Date()
@@ -366,6 +392,7 @@ export default {
date.setDate((Number(String(this.dataForm.targetTime).slice(4)) - 1)* 7 + 1) date.setDate((Number(String(this.dataForm.targetTime).slice(4)) - 1)* 7 + 1)
// console.log('你好', date, moment(date).format('yyyyWW'), String(this.dataForm.targetTime).slice(4)) // console.log('你好', date, moment(date).format('yyyyWW'), String(this.dataForm.targetTime).slice(4))
this.week = date this.week = date
this.$set(this.dataForm, 'reportTime', date)
} }
}) })
} }

View File

@@ -1,14 +1,15 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-06-04 16:54:46 * @LastEditTime: 2024-06-14 10:41:23
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer class="drawer" :visible.sync="visible" size="58%" @closed="$emit('destroy')"> <el-drawer class="drawer" :visible.sync="visible" size="70%" @closed="$emit('destroy')">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
{{ ftype === 0 ? '碲化镉工厂生产数据详情' : '铜铟镓硒工厂生产数据详情' }} <!-- {{ ftype === 0 ? '碲化镉工厂生产数据详情' : '铜铟镓硒工厂生产数据详情' }} -->
生产目标详情
</small-title> </small-title>
<div class="detailBox"> <div class="detailBox">
<el-row :gutter="24"> <el-row :gutter="24">
@@ -113,6 +114,10 @@
<p class="title">标准组件平均功率(W)</p> <p class="title">标准组件平均功率(W)</p>
<p class="text">{{ dataForm.componentAveragePower }}</p> <p class="text">{{ dataForm.componentAveragePower }}</p>
</el-col> </el-col>
<el-col :span="6">
<p class="title">标准组件转化效率</p>
<p class="text">{{ dataForm.componentConversionEfficiency }}</p>
</el-col>
</el-row> </el-row>
<small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false"> <small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
{{ 'BIPV产品' }} {{ 'BIPV产品' }}
@@ -197,35 +202,9 @@ export default {
], ],
sectionList: [], sectionList: [],
visible: false, visible: false,
dataForm: { dataForm: {}
id: undefined,
logTime: undefined,
source: 1,
detId: undefined,
workOrderId: null,
teamId: undefined,
num: undefined,
lineId: undefined,
description: undefined,
// description: undefined,
remark: undefined,
},
// materialList: [],
dataRule: {
// materialId: [{ required: true, message: "", trigger: "blur" }],
workOrderId: [{ required: true, message: "工单号不能为空", trigger: "change" }],
num: [{ required: true, message: "数量不能为空", trigger: "blur" }],
detId: [{ required: true, message: "报废原因不能为空", trigger: "change" }],
logTime: [{ required: true, message: "报废时间不能为空", trigger: "change" }],
}
}; };
}, },
mounted() {
this.getDict()
console.log('我看看', this.dataForm)
// this.getCurrentTime()
},
methods: { methods: {
init(id) { init(id) {
this.visible = true this.visible = true
@@ -235,102 +214,7 @@ export default {
this.dataForm = res.data this.dataForm = res.data
}) })
} }
}, }
// getCurrentTime() {
// // new Date().Format("yyyy-MM-dd HH:mm:ss")
// this.dataForm.logTime = new Date()
// // this.dataForm.logTime = year + "-" + month + "-" + day;
// console.log(this.dataForm.logTime);
// },
async getDict() {
// // 物料列表
// const res = await getList()
// this.typeList = res.data
// getWorkOrderList().then((res) => {
// console.log(res);
// // console.log(response);
// this.workOrderList = res.data.map((item) => {
// return {
// name: item.name,
// id: item.id
// }
// })
// // console.log(this.formConfig[0].selectOptions);
// // this.listQuery.total = response.data.total;
// })
// getLineList().then((res) => {
// console.log(res);
// // console.log(response);
// this.lineList = res.data.map((item) => {
// return {
// name: item.name,
// id: item.id
// }
// })
// // console.log(this.formConfig[0].selectOptions);
// // this.listQuery.total = response.data.total;
// })
// getDetList().then((res) => {
// console.log(res);
// // console.log(response);
// this.detList = res.data.map((item) => {
// return {
// name: item.content,
// id: item.id
// }
// })
// // console.log(this.formConfig[0].selectOptions);
// // this.listQuery.total = response.data.total;
// })
// getTeamList().then((res) => {
// console.log(res);
// // console.log(response);
// this.teamList = res.data.map((item) => {
// return {
// name: item.name,
// id: item.id
// }
// })
// // console.log(this.formConfig[0].selectOptions);
// // this.listQuery.total = response.data.total;
// })
// },
// async getWorksectionById(lineId) {
// if (lineId) {
// const { code, data } = await this.$axios({
// url: '/base/core-workshop-section/listByParentId',
// method: 'get',
// params: {
// id: lineId,
// },
// });
// if (code == 0) {
// console.log(data)
// this.sectionList = data.map((item) => {
// return {
// name: item.name,
// id: item.id,
// };
// });
// }
// } else {
// this.$axios({
// url: '/base/core-workshop-section/listAll',
// method: 'get',
// // params: {
// // id: lineId,
// // },
// }).then((res) => {
// // console.log(data)
// this.sectionList = res.data.map((item) => {
// return {
// name: item.name,
// id: item.id,
// };
// });
// })
// }
},
}, },
}; };
</script> </script>

View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-15 10:49:13 * @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-05 16:19:04 * @LastEditTime: 2024-07-02 16:35:01
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@@ -24,7 +24,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="时间维度" prop="date"> <el-form-item label="时间维度" prop="date">
<el-select size="small" clearable v-model="listQuery.date" placeholder="请选择"> <el-select size="small" clearable v-model="listQuery.date" placeholder="请选择" @change="clearTime">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@@ -144,7 +144,6 @@
import { parseTime } from '@/utils/ruoyi'; import { parseTime } from '@/utils/ruoyi';
import { prodTargetDiPage, prodTargetToPage, exportDiTargetExcel, exportToTargetExcel, delTarget, importToTarget, importDiTarget } from '@/api/produceData'; import { prodTargetDiPage, prodTargetToPage, exportDiTargetExcel, exportToTargetExcel, delTarget, importToTarget, importDiTarget } from '@/api/produceData';
// import inputTable from './inputTable.vue'; // import inputTable from './inputTable.vue';
import lineChart from './lineChart';
import moment from 'moment' import moment from 'moment'
import ButtonNav from '@/components/ButtonNav' import ButtonNav from '@/components/ButtonNav'
import basicPage from '@/mixins/basic-page' import basicPage from '@/mixins/basic-page'
@@ -157,7 +156,7 @@ import {getBaseHeader} from "@/utils/request";
// import FileSaver from 'file-saver' // import FileSaver from 'file-saver'
// import * as XLSX from 'xlsx' // import * as XLSX from 'xlsx'
export default { export default {
components: { lineChart, ButtonNav, detailOrUpdate, addOrUpdate }, components: { ButtonNav, detailOrUpdate, addOrUpdate },
mixins: [basicPage], mixins: [basicPage],
data() { data() {
return { return {
@@ -414,12 +413,12 @@ export default {
}, },
], ],
// timeSelect:'month', // timeSelect:'month',
startTimeStamp:null, //开始时间 // startTimeStamp:null, //开始时间
endTimeStamp:null, //结束时间 // endTimeStamp:null, //结束时间
// date:'凯盛玻璃控股成员企业2024生产数据', // date:'凯盛玻璃控股成员企业2024生产数据',
// reportTime: '', // reportTime: '',
startTimeStamp: '', // startTimeStamp: '',
endTimeStamp: '', // endTimeStamp: '',
tableData: [], tableData: [],
facType: 0 facType: 0
// proLineList: [], // proLineList: [],
@@ -458,6 +457,13 @@ export default {
this.changeTime() this.changeTime()
}, },
methods: { methods: {
clearTime() {
this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined
this.listQuery.reportTime = []
this.start = undefined
this.end = undefined
},
handleImport() { handleImport() {
this.upload.title = "生产目标导入"; this.upload.title = "生产目标导入";
this.upload.open = true; this.upload.open = true;
@@ -685,11 +691,22 @@ export default {
}; };
</script> </script>
<style scoped> <style>
/* .blueTip { */ /* .blueTip { */
/* padding-bottom: 10px; */ /* padding-bottom: 10px; */
/* } */ /* } */
/* .blueTi */ .blueTip .el-date-editor .el-range__icon {
font-size: 16px;
color: #0b58ff;
}
.blueTip .el-input__prefix .el-icon-date {
font-size: 16px;
color: #0b58ff;
}
.blueTip .el-input__prefix .el-icon-time {
font-size: 16px;
color: #0b58ff;
}
.blueTip::before{ .blueTip::before{
display: inline-block; display: inline-block;
content: ''; content: '';

View File

@@ -1,15 +1,15 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-06-07 14:15:00 * @LastEditTime: 2024-07-08 15:06:49
* @LastEditors: DY * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer class="drawer" :visible.sync="visible" size="85%" @closed="$emit('destroy')"> <el-drawer class="drawer" :visible.sync="visible" size="85%" @closed="$emit('destroy')">
<small-title slot="title" :no-padding="true"> <small-title slot="title" :no-padding="true">
{{ '详情' }} {{ '详情' }}
<el-button type="primary" plain size="small" style="float: right" @click="exportDetail">导出</el-button> <!-- <el-button type="primary" plain size="small" style="float: right" @click="exportDetail">导出</el-button> -->
</small-title> </small-title>
<div ref="detail" class="detailBox"> <div ref="detail" class="detailBox">
<el-row :gutter="20"> <el-row :gutter="20">
@@ -23,7 +23,7 @@
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<p class="title">工单类型</p> <p class="title">工单类型</p>
<p class="text">{{ ['', '芯片单', '组件类型', 'bipv类型'][dataForm.workOrderType] }}</p> <p class="text">{{ ['', '芯片单', '组件类型', 'bipv类型'][dataForm.workOrderType] }}</p>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<p class="title">工单来源</p> <p class="title">工单来源</p>
@@ -39,7 +39,7 @@
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<p class="title">工单状态</p> <p class="title">工单状态</p>
<p class="text">{{ ['未开始', '生产中', '已完成'][dataForm.orderStatus] }}</p> <p class="text">{{ ['', '未开始', '生产中', '已完成'][dataForm.orderStatus] }}</p>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<p class="title">投入状态</p> <p class="title">投入状态</p>
@@ -69,21 +69,59 @@
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<p class="title">开始时间</p> <p class="title">开始时间</p>
<p class="text">{{ dataForm.startDate?.length > 0 ? dataForm.startDate[0] + '-' + dataForm.startDate[1] + '-' + dataForm.startDate[2] : '' }}</p> <p class="text">{{ dataForm.startDate?.length > 0 ? dataForm.startDate[0] + '-' + dataForm.startDate[1] + '-'
+ dataForm.startDate[2] : '' }}</p>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<p class="title">完成时间</p> <p class="title">完成时间</p>
<p class="text">{{ dataForm.endDate?.length > 0 ? dataForm.endDate[0] + '-' + dataForm.endDate[1] + '-' + dataForm.endDate[2] : '' }}</p> <p class="text">{{ dataForm.endDate?.length > 0 ? dataForm.endDate[0] + '-' + dataForm.endDate[1] + '-' +
dataForm.endDate[2] : '' }}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-divider></el-divider> <div v-loading="loading">
<div class="chartDiv"> <div style="width: 100%; padding: 0 32px">
<div ref="bar" :style="{ height: '30vh', width: '40vw' }" /> <el-divider style="margin: 0"></el-divider>
<div ref="pie" :style="{ height: '30vh', width: '40vw' }" /> </div>
</div> <el-row :gutter="0" style="margin: 20px 32px">
<div class="chartDiv"> <el-col :span="8">
<div ref="equipmentLine" :style="{ height: '30vh', width: '40vw' }" /> <div>
<div ref="line" v-show="dataForm.orderStatus === 1" :style="{ height: '30vh', width: '40vw' }" /> <small-title slot="title" :no-padding="true">
产品良率
</small-title>
<div ref="pie" :style="{ height: '40vh', width: '100%' }" />
</div>
</el-col>
<el-col :span="16">
<div style="border-left: 1px solid #d1d3d8; width: 100%; padding-left: 32px">
<small-title slot="title" :no-padding="true">
待制品分布
</small-title>
<div ref="equipmentLine" :style="{ height: '40vh', width: '50vw' }" />
</div>
</el-col>
</el-row>
<div style="width: 100%; padding: 0 32px">
<el-divider style="margin: 0"></el-divider>
</div>
<el-row :gutter="0" style="margin: 20px 32px">
<el-col :span="8">
<div>
<small-title slot="title" :no-padding="true">
生产明细
</small-title>
<div ref="bar" :style="{ height: '40vh', width: '100%' }" />
</div>
</el-col>
<el-col :span="16">
<div v-show="dataForm.orderStatus === 2"
style="border-left: 1px solid #d1d3d8; width: 100%; padding-left: 32px">
<small-title slot="title" :no-padding="true">
历史趋势
</small-title>
<div ref="line" :style="{ height: '40vh', width: '50vw' }" />
</div>
</el-col>
</el-row>
</div> </div>
</div> </div>
</el-drawer> </el-drawer>
@@ -118,7 +156,9 @@ export default {
barChart: null, barChart: null,
equipmentLineChart: null, equipmentLineChart: null,
visible: false, visible: false,
dataForm: {} loading:true,
dataForm: {},
colorList: ['#3E8EF7', '#69E6D8', '#F7C739'] // pie颜色
} }
}, },
beforeDestroy() { beforeDestroy() {
@@ -137,17 +177,17 @@ export default {
const pdf = new jsPDF('l', 'pt', 'a4'); const pdf = new jsPDF('l', 'pt', 'a4');
const canvas = document.createElement('canvas') const canvas = document.createElement('canvas')
const element = this.$refs['detail']; const element = this.$refs['detail'];
const width = pdf.internal.pageSize.getWidth() const width = pdf.internal.pageSize.getWidth()
const height = pdf.internal.pageSize.getHeight() const height = pdf.internal.pageSize.getHeight()
canvas.width = width * 2 canvas.width = width * 2
canvas.height = height * 2 canvas.height = height * 2
canvas.style.width = width + 'px' canvas.style.width = width + 'px'
canvas.style.height = height + 'px' canvas.style.height = height + 'px'
const options = { const options = {
// scale: 2, // scale: 2,
dpi: 300, dpi: 300,
@@ -163,12 +203,13 @@ export default {
}, },
init(id) { init(id) {
this.visible = true this.visible = true
this.$nextTick(() => { // this.$nextTick(() => {
this.initLineChart() // this.initLineChart()
}) // })
if (id) { if (id) {
getWorkOrderDetail(id).then(res => { getWorkOrderDetail(id).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.loading = false
this.dataForm = res.data.prodWorkOrderDO this.dataForm = res.data.prodWorkOrderDO
this.buildChart(this.dataForm) this.buildChart(this.dataForm)
// 在制品 // 在制品
@@ -195,7 +236,7 @@ export default {
// this.initEqLineChart(xAxisList, yAxisList) // this.initEqLineChart(xAxisList, yAxisList)
// } // }
// }) // })
} }
}, },
trend() { trend() {
@@ -218,47 +259,56 @@ export default {
this.initChart(barList) this.initChart(barList)
// 良品率 // 良品率
const pieList = [ const pieList = [
{ value: data.actualProduction, name: '实际产出' }, { value: data.actualProduction ? data.actualProduction : 0, name: '实际产出' },
{ value: data.wasteNum, name: '废品数量' }, { value: data.wasteNum ? data.wasteNum : 0, name: '废品数量' },
{ value: data.reworkNum, name: '待再加工数量' } { value: data.reworkNum ? data.reworkNum :0, name: '待再加工数量' }
] ]
this.initPieChart(pieList) this.initPieChart(pieList)
}, },
initChart(barData) { initChart(barData) {
this.barChart = echarts.init(this.$refs['bar']) this.barChart = echarts.init(this.$refs['bar'])
this.barChart.setOption({ this.barChart.setOption({
title: { // title: {
text: '生产明细', // text: '生产明细',
left: 'center' // left: 'center'
// subtext: 'Fake Data' // // subtext: 'Fake Data'
}, // },
color: ['#3E8EF7'],
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
}, },
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true }, // grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
calculable: true, calculable: true,
grid: { grid: {
top: '20%', top: '15%',
left: "1%", left: 20,
right: "3%", right: '10%',
bottom: "1%", bottom: 0,
containLabel: true containLabel: true
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['目标产量', '计划投入量', '实际投入', '实际产出', '废品数量', '待再加工数量'], data: ['目标产量', '计划投入量', '实际投入', '实际产出', '废品数量', '待再加工数量'],
axisLabel: { axisLabel: {
rotate:45 rotate: 25
} }
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
name: '单位/片',
axisLine: {
show: true
}
}, },
series: [ series: [
{ {
data: barData, data: barData,
type: 'bar', type: 'bar',
barWidth: '40%' barWidth: 16,
label: {
show: true,
position: 'top'
}
} }
] ]
}, true) }, true)
@@ -266,8 +316,9 @@ export default {
initPieChart(pieData) { initPieChart(pieData) {
this.pieChart = echarts.init(this.$refs['pie']) this.pieChart = echarts.init(this.$refs['pie'])
this.pieChart.setOption({ this.pieChart.setOption({
color: ['#3E8EF7', '#69E6D8', '#F7C739'],
title: { title: {
text: '产品良率 ' + (pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100 + '%', // text: !isNaN((pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100) ? ( '产品良率 ' + (pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100 + '%') : '产品良率 -',
left: 'center' left: 'center'
// subtext: 'Fake Data' // subtext: 'Fake Data'
}, },
@@ -275,31 +326,38 @@ export default {
trigger: 'item' trigger: 'item'
}, },
legend: { legend: {
top: '5%', bottom: 0,
left: 'right', left: 'center'
orient: 'vertical'
}, },
series: [ series: [
{ {
// name: 'Access From', // name: 'Access From',
type: 'pie', type: 'pie',
radius: ['40%', '70%'], radius: ['50%', '70%'],
avoidLabelOverlap: false, avoidLabelOverlap: false,
data: pieData,
label: { label: {
show: false, show: true,
position: 'center' position: 'outside',
}, formatter: (params) => {
emphasis: { console.log(params)
label: { let res = ''
show: false, // for (let i in params) {
fontSize: 40, res += `${params.percent ? params.percent : 0}% \n ${params.name}`
fontWeight: 'bold' // }
return res
},
rich: {
d: {
color: 'inherit', // 系列色
verticalAlign: 'top'
},
b: {
color: '#8C8C8C',
verticalAlign: 'top'
}
} }
}, }
labelLine: {
show: false
},
data: pieData
} }
] ]
}, true) }, true)
@@ -307,39 +365,48 @@ export default {
initEqLineChart(xAxisList, yAxisList) { initEqLineChart(xAxisList, yAxisList) {
this.equipmentLineChart = echarts.init(this.$refs['equipmentLine']) this.equipmentLineChart = echarts.init(this.$refs['equipmentLine'])
this.equipmentLineChart.setOption({ this.equipmentLineChart.setOption({
title: { // title: {
text: '在制品分布', // text: '待制品分布',
left: 'center' // left: 'center'
// subtext: 'Fake Data' // // subtext: 'Fake Data'
}, // },
color: ['#3E8EF7'],
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
}, },
grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true }, // grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
calculable: true, calculable: true,
grid: { grid: {
top: '20%', top: '15%',
left: "1%", left: 30,
right: "3%", right: 0,
bottom: "1%", bottom: 0,
containLabel: true containLabel: true
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: xAxisList, data: xAxisList,
axisLabel: { axisLabel: {
rotate:45, rotate: 25
// width: '10%' // width: '10%'
} }
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
name: '单位/片',
axisLine: {
show: true
}
}, },
series: [ series: [
{ {
data: yAxisList, data: yAxisList,
type: 'bar', type: 'bar',
barWidth: '40px' barWidth: 16,
label: {
show: true,
position: 'top'
}
} }
] ]
}, true) }, true)
@@ -347,24 +414,39 @@ export default {
initLineChart(xAxisList, seriesList) { initLineChart(xAxisList, seriesList) {
this.lineChart = echarts.init(this.$refs['line']) this.lineChart = echarts.init(this.$refs['line'])
this.lineChart.setOption({ this.lineChart.setOption({
title: { color: ['#3E8EF7'],
text: '历史趋势', tooltip: {
left: 'center' // 设置标题居中 trigger: 'item'
},
grid: {
top: '15%',
left: 0,
right: 0,
bottom: 0,
containLabel: true
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: xAxisList, data: xAxisList,
axisLabel: { axisLabel: {
rotate:45 rotate: 25
} }
}, },
yAxis: { yAxis: {
type: 'value' type: 'value',
name: '单位/片',
axisLine: {
show: true
}
}, },
series: [ series: [
{ {
data: seriesList, data: seriesList,
type: 'line' type: 'line',
label: {
show: true,
position: 'top'
}
} }
] ]
}, true) }, true)
@@ -378,14 +460,8 @@ export default {
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.chartDiv {
display: flex;
justify-content: space-between;
width: 100%;
padding: 5px;
padding-left: 30px;
}
.drawer >>> .el-drawer { .drawer >>> .el-drawer {
border-radius: 8px 0 0 8px; border-radius: 8px 0 0 8px;
} }
@@ -402,7 +478,8 @@ export default {
} }
.detailBox p { .detailBox p {
margin: 0; margin: 0;
padding: 0 32px; padding-left: 32px;
/* padding: 0 32px; */
} }
.detailBox .title { .detailBox .title {
/* width: 56px; */ /* width: 56px; */
@@ -424,6 +501,8 @@ export default {
} }
.detailBox { .detailBox {
padding-top: 30px; padding-top: 30px;
width: 99%; overflow-x: hidden;
overflow-y: auto;
/* width: 99%; */
} }
</style> </style>

View File

@@ -0,0 +1,127 @@
<template>
<div class="dayRepExpBox">
<el-row>
<el-col :span="24">
<div class="chartTitle" style="text-align: center;">产品良率</div>
<div class="box2">
<productYield ref="productYield" :pieList="pieList" />
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="chartTitle" style="text-align: center;">待制品分布</div>
<div class="box2">
<beProcessed ref="beProcess" :beProcessObj="beProcessObj" />
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="chartTitle" style="text-align: center;">生产明细</div>
<div class="box2">
<produceDetail ref="produceDetail" :produceData="produceData" />
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="chartTitle" style="text-align: center;">历史趋势</div>
<div class="box2">
<hisChart ref="hisChart" :hisObj="hisObj" />
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import hisChart from './dayReportExportChart/hisChart'
import produceDetail from './dayReportExportChart/produceDetail'
import productYield from './dayReportExportChart/productYield'
import beProcessed from './dayReportExportChart/beProcessed.vue'
export default {
name: 'ExportDayReport',
components: { hisChart, produceDetail, productYield, beProcessed },
props: {
produceData: {
type: Array,
default: () => []
},
hisObj: {
type: Object,
default: () => { }
},
pieList: {
type: Array,
default: () => []
},
beProcessObj: {
type: Object,
default: () => {}
},
},
data() {
return {
}
},
watch: {
beProcessObj: {
handler(newValue, oldValue) {
this.$refs.beProcess.canvasReset()
}
}
},
mounted() {
this.getData()
},
methods: {
getData() {
// console.log('beProcessObj', this.beProcessObj);
// this.$refs.beProcess.canvasReset()
// this.$refs.productYield.canvasReset()
// this.$refs.produceDetail.canvasReset()
// this.$refs.hisChart.canvasReset()
}
}
}
</script>
<style lang='scss' scoped>
.dayRepExpBox {
width: 595px;
height: 842px;
padding: 15px 20px 0;
background-color: #fff;
z-index: 2000;
.box2{
width: 555px;
height: 200px;
border: 2px solid #ECECEC;
border-left: 0;
}
.box3{
width: 555px;
height: 200px;
border: 2px solid #ECECEC;
}
.box5{
width: 555px;
height: 200px;
border: 2px solid #ECECEC;
border-left: 0;
}
.box6{
width: 555px;
height: 200px;
border: 2px solid #ECECEC;
position: relative;
.rightTitle{
position: absolute;
right: 5px;
top:2px;
font-size: 8px;
color: #383838;
}
}
}
</style>

Some files were not shown because too many files have changed in this diff Show More