Compare commits

..

217 Commits

Author SHA1 Message Date
zwq
d70887fef0 修改成本bug 2024-03-21 13:43:09 +08:00
7bc5947a43 Merge pull request 'projects/mesxc-lb' (#257) from projects/mesxc-lb into projects/mesxc-test
Reviewed-on: #257
2024-03-21 13:37:34 +08:00
lb
4801287c01 Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-03-21 13:35:43 +08:00
lb
57071bc24a bugfix zentao 2024-03-21 10:45:06 +08:00
40ff565b92 Merge pull request 'projects/mesxc-zjl' (#256) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #256
2024-03-21 08:33:04 +08:00
300a33dca4 Merge branch 'projects/mesxc-test' into projects/mesxc-zjl 2024-03-21 08:28:26 +08:00
6f937e1976 改bug 2024-03-21 08:27:35 +08:00
b315564489 Merge pull request 'projects/mesxc-zhp' (#255) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #255
2024-03-20 15:56:37 +08:00
‘937886381’
aa582495de Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-20 15:55:25 +08:00
‘937886381’
6adbdac0a4 修改bug 2024-03-20 15:54:57 +08:00
135d9f0a60 Merge pull request 'projects/mesxc-dy' (#254) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #254
2024-03-20 09:00:08 +08:00
helloDy
e211e585af Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-03-20 08:48:34 +08:00
helloDy
630e7a95b3 bug 2 2024-03-20 08:48:02 +08:00
395a6e2967 Merge pull request '能源bug' (#253) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #253
2024-03-19 14:09:16 +08:00
8fcf6516a3 能源bug 2024-03-19 14:08:34 +08:00
c339e5c2de Merge pull request 'projects/mesxc-zhp' (#252) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #252
2024-03-18 16:11:50 +08:00
‘937886381’
75309dd9ea 修改依赖 2024-03-18 16:03:22 +08:00
‘937886381’
a0a9107863 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-18 16:01:32 +08:00
‘937886381’
94886eedde 修改bug 2024-03-18 16:00:56 +08:00
cb3406fac3 Merge pull request '订单详情修改字段' (#251) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #251
2024-03-18 08:28:15 +08:00
0c5245ef9b 订单详情修改字段 2024-03-18 08:27:05 +08:00
1ea2fe2738 Merge pull request 'projects/mesxc-lb' (#250) from projects/mesxc-lb into projects/mesxc-test
Reviewed-on: #250
2024-03-16 19:19:56 +08:00
lb
549d66f753 Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-03-15 17:04:29 +08:00
lb
ca129f5434 update core-worker的全列表获取地址 2024-03-15 17:03:52 +08:00
b5049b22fa Merge pull request 'projects/mesxc-zhp' (#249) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #249
2024-03-15 13:46:38 +08:00
‘937886381’
a4994ca5ae Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-15 13:44:27 +08:00
‘937886381’
448467ed61 修改bug 2024-03-15 13:43:59 +08:00
5af67b93fb Merge pull request '厂务订单里改个工单接口' (#248) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #248
2024-03-15 13:34:45 +08:00
73928a0ed0 厂务订单里改个工单接口 2024-03-15 13:33:58 +08:00
3d33912eff Merge pull request 'projects/mesxc-dy' (#247) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #247
2024-03-15 08:29:36 +08:00
helloDy
db2cbb64c9 Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-03-14 20:20:18 +08:00
helloDy
67948c10cb bug -- 2024-03-14 20:19:42 +08:00
60864e7110 Merge pull request 'projects/mesxc-lb' (#246) from projects/mesxc-lb into projects/mesxc-test
Reviewed-on: #246
2024-03-14 18:02:44 +08:00
lb
e3133cef1f Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-03-14 17:08:39 +08:00
efdf1f5b54 Merge pull request 'projects/mesxc-zhp' (#244) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #244
2024-03-14 14:57:12 +08:00
‘937886381’
eba9d2ba60 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-14 14:54:37 +08:00
‘937886381’
6b96f84150 修改bug 2024-03-14 14:54:03 +08:00
7de46a583f Merge pull request '班组bug' (#243) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #243
2024-03-14 14:48:30 +08:00
526bb8c534 班组bug 2024-03-14 14:47:57 +08:00
lb
7b4cd85ba0 1 2024-03-14 14:36:52 +08:00
57660ee5fd Merge pull request 'projects/mesxc-lb' (#242) from projects/mesxc-lb into projects/mesxc-test
Reviewed-on: #242
2024-03-14 09:03:49 +08:00
lb
764030a8da Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-03-14 09:01:45 +08:00
2d7fc02e0b Merge pull request 'projects/mesxc-zhp' (#241) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #241
2024-03-14 08:45:24 +08:00
lb
d2e38be1e1 Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-03-13 18:16:15 +08:00
lb
26d2e2b7e5 ui drawer ui change 2024-03-13 18:14:06 +08:00
lb
25f3c5d13b update 项目群更新 2024-03-13 17:04:36 +08:00
‘937886381’
0256306c0e Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-13 15:30:38 +08:00
‘937886381’
224625e10f 修改bug 2024-03-13 15:30:08 +08:00
e55198974d Merge pull request 'projects/mesxc-zhp' (#240) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #240
2024-03-13 14:57:25 +08:00
‘937886381’
680f852057 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-13 14:55:00 +08:00
‘937886381’
6025c8fbf7 修改bug 2024-03-13 14:54:35 +08:00
a4f5e75d3d Merge pull request 'projects/mesxc-dy' (#239) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #239
2024-03-13 09:17:11 +08:00
helloDy
149ec4c844 Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-03-12 18:02:52 +08:00
helloDy
8045c303ee 维修 2024-03-12 18:02:16 +08:00
lb
3aee4a54fb Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-03-12 15:50:41 +08:00
bf700b316e Merge pull request 'projects/mesxc-zhp' (#238) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #238
2024-03-12 11:22:06 +08:00
‘937886381’
4c9277b361 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-12 11:18:28 +08:00
‘937886381’
0457514f1e 修改bug 2024-03-12 11:18:06 +08:00
b23d7427bd Merge pull request 'projects/mesxc-zhp' (#237) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #237
2024-03-11 17:10:16 +08:00
‘937886381’
3be7ac4237 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-11 17:07:06 +08:00
‘937886381’
bddb182b73 修改bug 2024-03-11 17:06:38 +08:00
a74b3aa30a Merge pull request 'projects/mesxc-zhp' (#236) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #236
2024-03-11 15:53:13 +08:00
‘937886381’
8f0de8f0ba Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-11 15:48:19 +08:00
‘937886381’
df75aa04a1 修改bug 2024-03-11 15:47:46 +08:00
4531429e83 Merge pull request 'projects/mesxc-zhp' (#235) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #235
2024-03-08 18:48:29 +08:00
‘937886381’
756ed9772d Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-08 16:20:29 +08:00
‘937886381’
2e214b52a6 修改bug 2024-03-08 16:20:03 +08:00
a42f976127 Merge pull request 'projects/mesxc-zhp' (#234) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #234
2024-03-07 16:33:38 +08:00
‘937886381’
a81f961aca Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-07 16:28:50 +08:00
‘937886381’
39493549b9 修改bug 2024-03-07 16:28:23 +08:00
79394affb5 Merge pull request 'projects/mesxc-zhp' (#233) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #233
2024-03-06 11:06:58 +08:00
‘937886381’
2c06d68d72 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-03-06 11:02:00 +08:00
‘937886381’
e6e280c930 修改bug 2024-03-06 11:01:31 +08:00
354fd488a9 Merge pull request 'projects/mesxc-zhp' (#232) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #232
2024-03-05 10:07:27 +08:00
‘937886381’
a80ce13de1 解决冲突 2024-03-05 09:49:01 +08:00
‘937886381’
a027c4ca63 修改bug 2024-03-05 09:48:16 +08:00
267ee0015c Merge pull request 'projects/mesxc-zjl' (#231) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #231
2024-03-04 14:10:21 +08:00
9a6aa75171 merge test 2024-03-04 14:09:07 +08:00
41b79ba82c Merge pull request 'projects/mesxc-lb' (#230) from projects/mesxc-lb into projects/mesxc-test
Reviewed-on: #230
2024-03-04 14:07:08 +08:00
Melete
0a1175075d Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-03-04 14:04:37 +08:00
Melete
50cfcc3af2 update 2024-03-04 14:01:53 +08:00
d44f76b641 集团-包装要求 2024-03-04 13:56:42 +08:00
ac36dea881 Merge pull request 'projects/mesxc-dy' (#229) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #229
2024-03-04 12:24:25 +08:00
helloDy
063532567b Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-03-04 12:04:50 +08:00
873653b56d Merge pull request 'projects/mesxc-lb' (#227) from projects/mesxc-lb into projects/mesxc-test
Reviewed-on: #227
2024-03-04 11:19:32 +08:00
helloDy
b2c6a5fae9 Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-03-04 11:15:49 +08:00
helloDy
17b675cd13 checkperson delete 2024-03-04 11:15:09 +08:00
Melete
3aa3361559 merge 2024-03-04 11:01:48 +08:00
Melete
6df8c3bcc1 1 2024-03-04 10:53:04 +08:00
Melete
da0aa4aa75 bugfix 2024-03-04 10:47:57 +08:00
3b6483f013 Merge pull request 'projects/mesxc-dy' (#226) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #226
2024-03-04 07:52:03 +08:00
helloDy
e509722ac4 env 2024-03-01 20:41:09 +08:00
helloDy
48e7612a78 bug second 2024-03-01 20:39:52 +08:00
679f31af97 Merge pull request 'projects/mesxc-zhp' (#225) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #225
2024-03-01 15:30:10 +08:00
‘937886381’
f685a65a1f 解决冲突 2024-03-01 15:28:12 +08:00
‘937886381’
d8c126fccf 修改bug 2024-03-01 15:27:01 +08:00
4f14b32a83 Merge pull request 'projects/mesxc-lb' (#224) from projects/mesxc-lb into projects/mesxc-test
Reviewed-on: #224
2024-03-01 11:21:10 +08:00
lb
f378347063 Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-03-01 11:20:00 +08:00
6452b6a12c Merge pull request '3,1' (#223) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #223
2024-03-01 11:17:41 +08:00
151df54032 3,1 2024-03-01 11:17:11 +08:00
lb
4c41d6fad9 bugfix 2024-03-01 11:16:53 +08:00
9beca01fef Merge pull request 'projects/mesxc-lb' (#222) from projects/mesxc-lb into projects/mesxc-test
Reviewed-on: #222
2024-02-29 17:04:19 +08:00
lb
c66e82b152 Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-02-29 17:02:08 +08:00
lb
38668fca09 bugfix 设备保养 2024-02-29 17:01:35 +08:00
20bf8c27f0 Merge pull request 'projects/mesxc-zjl' (#221) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #221
2024-02-29 16:53:00 +08:00
afe28d103e 1 2024-02-29 16:52:30 +08:00
lb
889f4472e6 bugfix equipmentRepair 2024-02-29 16:49:54 +08:00
606a23f10d merge test 2024-02-29 16:47:54 +08:00
5deaa0bc1e 修改bug 2024-02-29 16:46:25 +08:00
933a4e45a6 Merge pull request 'projects/mesxc-dy' (#220) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #220
2024-02-29 16:45:58 +08:00
helloDy
7c8c584837 Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-02-29 15:55:12 +08:00
lb
838c8d66ad 1 2024-02-29 15:54:49 +08:00
helloDy
93eb12aeb7 bugs 2024-02-29 15:54:23 +08:00
lb
a41db38229 update 群里反馈的 2024-02-29 14:13:17 +08:00
a822ffe138 Merge pull request '订单状态对于按钮操作确认修改' (#219) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #219
2024-02-29 09:21:07 +08:00
d750cbe0f8 订单状态对于按钮操作确认修改 2024-02-29 09:20:34 +08:00
1318e96d0d Merge pull request 'projects/mesxc-zjl' (#218) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #218
2024-02-28 17:03:31 +08:00
4174feab9e merge test 2024-02-28 17:03:06 +08:00
e0aa0b7052 Merge pull request 'projects/mesxc-dy' (#217) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #217
2024-02-28 16:57:00 +08:00
ce1971727a 集团订单 2024-02-28 16:56:47 +08:00
helloDy
f8d033c97a Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-02-28 16:15:16 +08:00
helloDy
ecb447c052 巡检 2024-02-28 16:14:41 +08:00
dd6f07a9b0 Merge pull request 'projects/mesxc-dy' (#216) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #216
2024-02-28 15:09:46 +08:00
helloDy
0ba8d3bff8 Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-02-28 15:04:29 +08:00
helloDy
1a622dc4d3 待确认 2024-02-28 15:03:21 +08:00
2fe3aebe89 Merge pull request 'projects/mesxc-zhp' (#215) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #215
2024-02-28 11:23:36 +08:00
‘937886381’
bf90cc453d Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-02-28 10:55:19 +08:00
‘937886381’
afd6e68d9b 修改bug 2024-02-28 10:54:44 +08:00
helloDy
c71d99a21e Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-02-28 09:29:10 +08:00
helloDy
dbbccc7d72 bug 2024-02-28 09:28:34 +08:00
ac162415c5 Merge pull request 'projects/mesxc-lb' (#214) from projects/mesxc-lb into projects/mesxc-test
Reviewed-on: #214
2024-02-28 09:09:13 +08:00
lb
2c87e3f3b8 Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-02-28 09:05:42 +08:00
lb
529596b923 update 保养记录待确认 2024-02-27 17:08:15 +08:00
2a7bfa2562 Merge pull request 'projects/mesxc-dy' (#213) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #213
2024-02-27 16:42:26 +08:00
helloDy
520c31a9e1 Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-02-27 16:40:13 +08:00
helloDy
8e1a1848fb bug 2024-02-27 16:39:39 +08:00
a00edd8938 Merge pull request 'projects/mesxc-lb' (#212) from projects/mesxc-lb into projects/mesxc-test
Reviewed-on: #212
2024-02-27 16:36:49 +08:00
lb
71d1986671 Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-02-27 16:15:37 +08:00
lb
7287a1f6fa update 2024-02-27 16:13:54 +08:00
‘937886381’
38911a29d2 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-02-27 16:12:49 +08:00
‘937886381’
6490fe3f45 修改 2024-02-27 16:12:21 +08:00
lb
8abe75a9b9 update待确认巡检单 2024-02-27 15:55:52 +08:00
44dc55d69f Merge pull request 'projects/mesxc-dy' (#211) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #211
2024-02-27 09:27:20 +08:00
helloDy
85791cc10c Merge branch 'projects/mesxc-test' into projects/mesxc-dy 2024-02-27 09:23:00 +08:00
helloDy
ef740fec27 设备保养设备巡检 2024-02-27 09:22:03 +08:00
5c251e6a25 Merge pull request 'projects/mesxc-zjl' (#210) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #210
2024-02-27 09:14:48 +08:00
a8013fce87 merge test 2024-02-27 09:14:10 +08:00
65e2f9ed6a 订单bug修改 2024-02-27 09:12:17 +08:00
ad3a2cb1ae Merge pull request 'projects/mesxc-lb' (#209) from projects/mesxc-lb into projects/mesxc-test
Reviewed-on: #209
2024-02-27 09:11:12 +08:00
lb
6d3b41a394 Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-02-26 17:06:19 +08:00
007cf5e638 Merge pull request '订单bug' (#208) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #208
2024-02-26 13:19:19 +08:00
3e89f4066f 订单bug 2024-02-26 13:18:21 +08:00
2c12a26e64 Merge pull request 'projects/mesxc-zjl' (#207) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #207
2024-02-26 10:46:26 +08:00
c5925e54cd merge test 2024-02-26 10:45:48 +08:00
af426f4bf8 Merge pull request 'projects/mesxc-dy' (#206) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #206
2024-02-26 10:44:07 +08:00
lb
512986faf6 fix navbar right 2024-02-26 10:28:16 +08:00
b08639f15c merge test 2024-02-26 10:19:35 +08:00
9a807ff798 能源bug修改 2024-02-26 10:15:56 +08:00
helloDy
7da93bbca0 merge 2024-02-26 08:46:18 +08:00
helloDy
0abf628377 设备 2024-02-26 08:44:42 +08:00
e78a5e1b85 Merge pull request 'projects/mesxc-lb' (#205) from projects/mesxc-lb into projects/mesxc-test
Reviewed-on: #205
2024-02-26 02:14:06 +08:00
helloDy
35da704bb4 设备保养 2024-02-24 19:18:11 +08:00
lb
2997f4b7b9 Merge branch 'projects/mesxc-test' into projects/mesxc-lb 2024-02-23 17:15:56 +08:00
lb
4316e7f37f merge & delete yarn.lock 2024-02-23 17:14:28 +08:00
38bb5a31e7 Merge pull request 'projects/mesxc-zjl' (#204) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #204
2024-02-23 17:13:39 +08:00
842b863561 merge test 2024-02-23 17:11:24 +08:00
lb
89e86c31bb update 巡检记录 2024-02-23 17:03:55 +08:00
71fc98b0bb 订单管理 2024-02-23 17:01:48 +08:00
lb
15738642b0 update 2024-02-23 16:32:01 +08:00
2c88d442f2 Merge pull request 'projects/mesxc-zhp' (#203) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #203
2024-02-23 16:14:40 +08:00
‘937886381’
8dccbdbeb7 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-02-23 16:13:11 +08:00
‘937886381’
81c1f2c571 xiugaibug 2024-02-23 16:12:43 +08:00
5dd551c795 Merge pull request 'projects/mesxc-zhp' (#202) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #202
2024-02-23 16:09:54 +08:00
‘937886381’
a6f7bb2f2d 解决冲突 2024-02-23 16:04:05 +08:00
‘937886381’
05b513a862 修改 2024-02-23 16:02:55 +08:00
lb
f72cd9d68e update 待确认 2024-02-23 15:11:36 +08:00
lb
99b225e3dc update 巡检待确认 2024-02-23 11:20:04 +08:00
lb
4d1b72fae7 update 巡检待确认 2024-02-23 09:45:43 +08:00
lb
67a76869e1 update 巡检单待确认 2024-02-22 16:52:07 +08:00
lb
ca2774ca28 update navbar user dept 2024-02-22 16:23:19 +08:00
lb
1dd7fef171 update 巡检待确认 2024-02-22 16:19:02 +08:00
lb
9ad83f84fa update 巡检单设置 2024-02-22 16:11:30 +08:00
lb
ef354732b4 update 巡检单设置 2024-02-22 11:21:59 +08:00
478baaabd4 Merge pull request 'projects/mesxc-dy' (#201) from projects/mesxc-dy into projects/mesxc-test
Reviewed-on: #201
2024-02-22 09:31:30 +08:00
helloDy
ff19047729 merge 2024-02-21 18:47:46 +08:00
helloDy
ea7c419c6f 基础核心,设备基础 2024-02-21 18:39:48 +08:00
lb
95a4b336f8 update 2024-02-21 16:55:35 +08:00
lb
ed65bd7f30 update check record 2024-02-21 16:39:43 +08:00
fd03fdf046 Merge pull request 'projects/mesxc-zhp' (#200) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #200
2024-02-21 16:09:58 +08:00
lb
5b40c3972c update repair detail 2024-02-21 15:51:59 +08:00
‘937886381’
d3b87e4051 解决冲突 2024-02-21 15:28:15 +08:00
‘937886381’
03ee5e1037 修改bug 2024-02-21 15:27:09 +08:00
lb
f8c2889abc update repair 2024-02-21 14:44:15 +08:00
lb
eb0445f479 update 特种设备维修 2024-02-20 17:00:56 +08:00
lb
9f8d604456 done 保养模块 2024-02-20 15:53:31 +08:00
lb
d5551eabb8 update 保养记录详情 2024-02-20 15:14:31 +08:00
lb
8ca1ef5624 update maintain 2024-02-20 14:38:55 +08:00
lb
564a4a42d2 update waitinglist unplanned--edit 2024-02-19 16:57:22 +08:00
lb
8e081342f0 init waitinglist unplanned edit drawer 2024-02-19 15:29:55 +08:00
lb
874e36eb50 update waiting list 2024-02-19 11:27:23 +08:00
lb
66337f4aca update waitinglist table 2024-02-19 11:11:09 +08:00
d21bec434e Merge pull request '修改成本-仓库parseInt' (#199) from projects/mesxc-zwq into projects/mesxc-test
Reviewed-on: #199
2024-02-19 09:41:32 +08:00
lb
ade0f6745e update special equipment basic pages 2024-02-19 09:41:10 +08:00
2ee2b2bfc7 订单管理 2024-02-06 14:11:35 +08:00
lb
441a0f5371 update new table 2024-02-05 16:45:23 +08:00
lb
f67930941f before change table 2024-02-05 16:12:31 +08:00
lb
86996f8dd2 1 2024-02-05 11:23:14 +08:00
lb
9f82aac931 1 2024-02-05 11:17:19 +08:00
lb
ae7b13695a add waitinglist page and its dialogs 2024-02-05 10:59:36 +08:00
lb
372749e313 update 设备维修 2024-02-04 17:00:12 +08:00
lb
d0a4dc527f update 保养记录 2024-02-04 16:30:14 +08:00
lb
71aab2df9a update 保养监控 2024-02-04 15:43:33 +08:00
lb
fd7e295975 update 保养计划配置 2024-02-04 14:33:39 +08:00
lb
da5596766c Update 保养计划配置 2024-02-02 16:56:45 +08:00
lb
3a3e33db0e update special equipment management 2024-02-02 13:20:33 +08:00
lb
49afcb7666 update firefighting 2024-02-02 13:15:25 +08:00
lb
4a68467d88 update 安全设备 2024-02-01 16:19:42 +08:00
245 changed files with 31735 additions and 18162 deletions

View File

@ -1,7 +1,7 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-02-01 16:49:38
# @LastEditTime: 2024-03-13 14:57:16
# @LastEditors: zhp
# @Description:
###
@ -13,22 +13,19 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
VUE_APP_BASE_API = 'http://10.70.2.2:8080'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
# VUE_APP_BASE_API = 'http://192.168.1.20:48080'
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
# VUE_APP_BASE_API = 'http://192.168.1.49:48082'
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# VUE_APP_BASE_API = 'http://192.168.1.47:48082'
# socket地址
VUE_APP_Socket_API = 'ws://10.70.2.2:8080'
VUE_APP_Socket_API = 'ws://192.168.0.30:8888'
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# 积木报表指向地址

View File

@ -153,3 +153,12 @@ export function createConCoreWOr(data) {
data: data
})
}
// 修改分配产量
export function updateConCoreWOr(data) {
return request({
url: '/base/core-order-con-work-order/update',
method: 'put',
data: data
})
}

View File

@ -0,0 +1,72 @@
import request from '@/utils/request'
// 获得集团订单分页
export function getOrderGroupPage(query) {
return request({
url: '/base/order-group/page',
method: 'get',
params: query
})
}
// 获得集团订单
export function getOrderGroup(query) {
return request({
url: '/base/order-group/get',
method: 'get',
params: query
})
}
// 更新集团订单
export function updateOrderGroup(data) {
return request({
url: '/base/order-group/update',
method: 'put',
data: data
})
}
// 创建集团订单
export function createOrderGroup(data) {
return request({
url: '/base/order-group/create',
method: 'post',
data: data
})
}
// 修改集团订单状态,结束-终止-作废用
export function groupOrderStatusSet(data) {
return request({
url: '/base/order-group/groupOrderStatusSet',
method: 'put',
data: data
})
}
// 获得集团订单详情
export function orderGroupDetail(query) {
return request({
url: '/base/order-group/getDetail',
method: 'get',
params: query
})
}
// 创建集团订单与厂务订单表关联表 一对多
export function orderConGroupOrder(data) {
return request({
url: '/base/order-con-group-order/create',
method: 'post',
data: data
})
}
// 订单监控
export function orderGroupMonitor(query) {
return request({
url: '/base/order-group/orderGroupMonitor',
method: 'get',
params: query
})
}

View File

@ -8,6 +8,23 @@ export function orderList(query) {
})
}
// 获得订单列表
export function getOrderList(query) {
return request({
url: '/base/order/list',
method: 'get',
params: query
})
}
// 获得订单列表
export function getFreeOrderList() {
return request({
url: '/base/order/getFreeOrderList',
method: 'get'
})
}
// 条件获得工单列表
export function workOrderList(query) {
return request({
@ -17,6 +34,15 @@ export function workOrderList(query) {
})
}
// 条件获得工单列表
export function getFreeWOlist(query) {
return request({
url: '/base/core-work-order/getFreeWOlist',
method: 'get',
params: query
})
}
// 获得订单分页
export function getOrderPage(query) {
return request({
@ -86,6 +112,15 @@ export function orderDelete(query) {
})
}
// 修改订单状态,结束-终止-作废用
export function orderStatusSet(data) {
return request({
url: '/base/order/orderStatusSet',
method: 'put',
data: data
})
}
// 下发订单绑定的穿工单id新建不传
export function orderIssue(data) {
return request({
@ -104,24 +139,6 @@ export function getWorkOrderById(query) {
})
}
// 订单监控
export function orderMonitor(query) {
return request({
url: '/base/order/orderMonitor',
method: 'get',
params: query
})
}
// 获取订单绑定的工单和数量信息可传订单id列表map索引为订单id
export function orderAssignmentList(query) {
return request({
url: '/base/order/orderAssignmentList',
method: 'get',
params: query
})
}
// 获得所有客户列表
export function customerList() {
return request({

View File

@ -6,3 +6,12 @@ export function getLineAll() {
method: 'get'
})
}
// 根据车间获得所有工厂产线列表
export function getLinelistByRoom(query) {
return request({
url: '/base/core-production-line/listFilter',
method: 'get',
params: query
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: zhp
* @Date: 2023-12-04 14:10:37
* @LastEditTime: 2023-12-14 10:06:03
* @LastEditTime: 2024-03-19 15:02:49
* @LastEditors: zhp
* @Description:
*/
@ -26,10 +26,11 @@ export function updateQualityInspectionBoxBtn(data) {
}
// 删除安灯按钮16键对应
export function deleteQualityInspectionBoxBtn(id) {
export function deleteQualityInspectionBoxBtn(query) {
return request({
url: '/base/quality-inspection-box-btn/delete?id=' + id,
method: 'delete'
url: 'base/quality-inspection-box-btn/deleteByLineSection',
method: 'delete',
params: query
})
}

View File

@ -0,0 +1,53 @@
/*
* @Author: Do not edit
* @Date: 2024-02-21 13:43:02
* @LastEditTime: 2024-03-14 19:12:31
* @LastEditors: DY
* @Description:
*/
import request from '@/utils/request'
// 获得关联表名
export function getplcAllList(query) {
return request({
url: '/base/equipment-plc/listAll',
method: 'get',
params: query
})
}
// 获得设备
export function getEquipmentList(query) {
return request({
url: '/base/core-equipment/page',
method: 'get',
params: query
})
}
// 根据产线获得工段
export function listByParentId(query) {
return request({
url: '/base/core-workshop-section/listByParentId',
method: 'get',
params: query
})
}
// 获得产线工段设备树形结构
export function getTree(query) {
return request({
url: '/base/core-factory/getTree',
method: 'get',
params: query
})
}
// 获得设备分组列表
export function getgroupAllList(query) {
return request({
url: '/base/equipment-group/listAll',
method: 'get',
params: query
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: Do not edit
* @Date: 2023-11-08 15:56:52
* @LastEditTime: 2023-11-16 20:15:02
* @LastEditTime: 2024-02-28 18:16:56
* @LastEditors: DY
* @Description:
*/
@ -52,6 +52,17 @@ export function exportCheckLogExcel(query) {
})
}
// 导出设备巡检单记录
export function exportCheckOrderExcel(query) {
return request({
url: '/base/equipment-check-order/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 根据设备获得所有巡检配置列表
export function getcheckConfigByEqList(query) {
return request({
@ -68,3 +79,55 @@ export function deleteEqCheckLog(id) {
method: 'delete'
})
}
// 获得设备巡检单详情分页
export function getCheckOrderDetPage(query) {
return request({
url: '/base/equipment-check-order-det/page',
method: 'get',
params: query
})
}
// 创建设备巡检单详情
export function createCheckOrderDet(data) {
return request({
url: '/base/equipment-check-order-det/create',
method: 'post',
data: data
})
}
// 更新设备巡检单详情
export function updateCheckOrderDet(data) {
return request({
url: '/base/equipment-check-order-det/update',
method: 'put',
data: data
})
}
// 删除设备巡检单详情
export function deleteCheckOrderDet(id) {
return request({
url: '/base/equipment-check-order-det/delete?id=' + id,
method: 'delete'
})
}
// 获得设备巡检计划单
export function getEqCheckOrder(id) {
return request({
url: '/base/equipment-check-order/get?id=' + id,
method: 'get'
})
}
// 获得设备巡检单分页
export function getCheckOrderPage(query) {
return request({
url: '/base/equipment-check-order/page',
method: 'get',
params: query
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: Do not edit
* @Date: 2023-11-08 15:56:52
* @LastEditTime: 2023-11-25 16:22:49
* @LastEditTime: 2024-02-25 22:23:54
* @LastEditors: DY
* @Description:
*/
@ -100,3 +100,63 @@ export function updateCheckConfig(data) {
data: data
})
}
// 创建巡检单
export function createCheckOrder(data) {
return request({
url: '/base/equipment-check-order/create',
method: 'post',
data: data
})
}
// 更新巡检单
export function updateCheckOrder(data) {
return request({
url: '/base/equipment-check-order/update',
method: 'put',
data: data
})
}
// 获得设备巡检单code
export function getOrderCode() {
return request({
url: '/base/equipment-check-order/getCode',
method: 'get'
})
}
// 获得巡检单
export function getCheckOrder(id) {
return request({
url: '/base/equipment-check-order/get?id=' + id,
method: 'get'
})
}
// 获得巡检单详细
export function getCheckOrderDet(id) {
return request({
url: '/base/equipment-check-order-det/get?id=' + id,
method: 'get'
})
}
// 创建巡检单详情
export function createCheckOrderDet(data) {
return request({
url: '/base/equipment-check-order-det/create',
method: 'post',
data: data
})
}
// 更新巡检单详情
export function updateCheckOrderDet(data) {
return request({
url: '/base/equipment-check-order-det/update',
method: 'put',
data: data
})
}

View File

@ -0,0 +1,26 @@
/*
* @Author: Do not edit
* @Date: 2024-02-26 15:01:48
* @LastEditTime: 2024-02-26 18:09:39
* @LastEditors: DY
* @Description:
*/
import request from '@/utils/request'
// 获得设备保养记录分页
export function getLogDetPage(query) {
return request({
url: '/base/equipment-maintain-log-det/page',
method: 'get',
params: query
})
}
// 获得设备巡检单
export function getCheckOrder(query) {
return request({
url: '/base/equipment-check-order/get',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,104 @@
/*
* @Author: Do not edit
* @Date: 2024-02-22 15:14:19
* @LastEditTime: 2024-02-23 19:18:22
* @LastEditors: DY
* @Description:
*/
import request from '@/utils/request'
// 获得设备保养计划配置分页
export function getPlanPage(query) {
return request({
url: '/base/equipment-maintain-plan/page',
method: 'get',
params: query
})
}
// 创建设备保养计划
export function createPlan(data) {
return request({
url: '/base/equipment-maintain-plan/create',
method: 'post',
data: data
})
}
// 更新设备保养计划
export function updatePlan(data) {
return request({
url: '/base/equipment-maintain-plan/update',
method: 'put',
data: data
})
}
// 获得计划code
export function getCode() {
return request({
url: '/base/equipment-maintain-plan/getCode',
method: 'get'
})
}
// 获得计划
export function getPlan(query) {
return request({
url: '/base/equipment-maintain-plan/get',
method: 'get',
params: query
})
}
// 获得设备保养计划配置详情分页
export function getPlanDetPage(query) {
return request({
url: '/base/equipment-maintain-plan-det/page',
method: 'get',
params: query
})
}
// 创建设备保养计划详情
export function createPlanDet(data) {
return request({
url: '/base/equipment-maintain-plan-det/create',
method: 'post',
data: data
})
}
// 更新设备保养计划详情
export function updatePlanDet(data) {
return request({
url: '/base/equipment-maintain-plan-det/update',
method: 'put',
data: data
})
}
// 获得计划详情
export function getPlanDet(query) {
return request({
url: '/base/equipment-maintain-plan-det/get',
method: 'get',
params: query
})
}
// 删除设备保养计划
export function deletePlan(id) {
return request({
url: '/base/equipment-maintain-plan/delete?id=' + id,
method: 'delete'
})
}
// 删除设备保养计划详情
export function deletePlanDet(id) {
return request({
url: '/base/equipment-maintain-plan-det/delete?id=' + id,
method: 'delete'
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: Do not edit
* @Date: 2023-11-08 15:56:52
* @LastEditTime: 2023-11-23 19:10:07
* @LastEditTime: 2024-02-26 17:02:53
* @LastEditors: DY
* @Description:
*/
@ -42,3 +42,39 @@ export function exportMaintainLogExcel(query) {
responseType: 'blob'
})
}
// 导出巡检单
export function exportCheckOrderExcel(query) {
return request({
url: '/base/equipment-check-order/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 获得保养记录
export function getLog(query) {
return request({
url: '/base/equipment-maintain-log/get',
method: 'get',
params: query
})
}
// 获得设备保养记录详情分页
export function getLogDetPage(query) {
return request({
url: '/base/equipment-maintain-log-det/page',
method: 'get',
params: query
})
}
// 删除设备保养记录详情
export function deleteLogDet(id) {
return request({
url: '/base/equipment-maintain-log-det/delete?id=' + id,
method: 'delete'
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: zhp
* @Date: 2023-10-18 09:33:57
* @LastEditTime: 2023-11-03 09:31:17
* @LastEditTime: 2024-03-20 15:39:27
* @LastEditors: zhp
* @Description:
*/
@ -33,3 +33,12 @@ export function exportEnergyPlcExcel(query) {
responseType: 'blob'
})
}
export function exportEquipmentTraceabilityExcel(query) {
return request({
url: '/analysis/equipment-analysis/export-efficiency',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: zhp
* @Date: 2023-12-12 13:49:02
* @LastEditTime: 2024-01-24 15:54:58
* @LastEditTime: 2024-03-12 11:16:01
* @LastEditors: zhp
* @Description:
*/

View File

@ -26,6 +26,13 @@ export function getUser(userId) {
})
}
export function getUserSimple(userId) {
return request({
url: '/system/user/getSimple?id=' + praseStrEmpty(userId),
method: 'get'
})
}
// 新增用户
export function addUser(data) {
return request({

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="25px" height="26px" viewBox="0 0 25 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>库位信息</title>
<g id="新增看板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="周转看板" transform="translate(-996.000000, -618.000000)">
<g id="编组-26备份-3" transform="translate(972.000000, 596.000000)">
<g id="库位信息" transform="translate(24.000000, 22.000000)">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<g id="信息" transform="translate(1.000000, 2.000000)" fill-rule="nonzero">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<polygon id="路径" fill="#59D0E2" points="6.87951585 6.64119413 10.014693 6.64119413 10.014693 10.0613874 6.87951585 10.0613874"></polygon>
<path d="M19.42625,1.5 L4.57625,1.5 C3.45125001,1.5 2.51375,2.43750001 2.51375,3.56250001 L2.51375,20.4375 C2.51375,21.5625 3.45125001,22.5 4.57625,22.5 L19.46375,22.5 C20.58875,22.5 21.52625,21.5625 21.52625,20.4375 L21.52625,3.56250001 C21.48875,2.43750001 20.58875,1.5 19.42625,1.5 Z M5.66375,6.9375 C5.66375,6.1125 6.33875,5.4375 7.16375,5.4375 L9.63875,5.4375 C10.46375,5.4375 11.13875,6.1125 11.13875,6.9375 L11.13875,9.6375 C11.13875,10.4625 10.46375,11.1375 9.63875,11.1375 L7.16375,11.1375 C6.33875,11.1375 5.66375,10.4625 5.66375,9.6375 L5.66375,6.9375 Z M17.58875,18.5625 L6.41375001,18.5625 C6.00125002,18.5625 5.66375,18.225 5.66375,17.8125 C5.66375,17.4 6.00125,17.0625 6.41375001,17.0625 L17.55125,17.0625 C17.96375,17.0625 18.30125,17.4 18.30125,17.8125 C18.30125,18.225 18.00125,18.5625 17.58875,18.5625 Z M17.58875,15.1875 L6.41375001,15.1875 C6.00125002,15.1875 5.66375,14.85 5.66375,14.4375 C5.66375,14.025 6.00125,13.6875 6.41375001,13.6875 L17.55125,13.6875 C17.96375,13.6875 18.30125,14.025 18.30125,14.4375 C18.30125,14.85 18.00125,15.1875 17.58875,15.1875 Z M17.58875,10.65 L13.83875,10.65 C13.42625,10.65 13.08875,10.3125 13.08875,9.90000001 C13.08875,9.48750002 13.42625,9.14999999 13.83875,9.14999999 L17.58875,9.14999999 C18.00125,9.14999999 18.33875,9.48749999 18.33875,9.90000001 C18.33875,10.3125 18.00125,10.65 17.58875,10.65 Z M17.58875,7.425 L13.83875,7.425 C13.42625,7.425 13.08875,7.08750001 13.08875,6.675 C13.08875,6.26249998 13.42625,5.925 13.83875,5.925 L17.58875,5.925 C18.00125,5.925 18.33875,6.2625 18.33875,6.675 C18.33875,7.08749999 18.00125,7.425 17.58875,7.425 Z" id="形状" fill="#59D0E2"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>搬运任务</title>
<g id="新增看板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="周转看板" transform="translate(-64.000000, -149.000000)">
<g id="编组-26" transform="translate(40.000000, 127.000000)">
<g id="搬运任务" transform="translate(24.000000, 22.000000)">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<g id="异常" transform="translate(1.000000, 2.000000)" fill-rule="nonzero">
<rect id="矩形" fill="#000000" opacity="0" x="2" y="1" width="17" height="17"></rect>
<g>
<rect id="矩形" fill="#000000" opacity="0" x="5" y="6" width="13" height="13"></rect>
<g id="数量_面性">
<rect id="矩形" fill="#000000" opacity="0" x="2" y="2" width="16" height="16"></rect>
<path d="M11.5012639,11 C11.3917412,11 11.2835161,10.977151 11.184033,10.9329979 L0.441155372,6.16366481 C0.172262497,6.04432342 -1.77635684e-15,5.78507176 -1.77635684e-15,5.49973467 C-1.77635684e-15,5.21439758 0.172262497,4.95514592 0.441155372,4.83580453 L11.184033,0.066471464 C11.3846433,-0.0221571547 11.6153567,-0.0221571547 11.815967,0.066471464 L22.5588446,4.83580453 C22.8277375,4.95514592 23,5.21439758 23,5.49973467 C23,5.78507176 22.8277375,6.04432342 22.5588446,6.16366481 L11.815967,10.9329979 C11.7172585,10.9768087 11.6099339,10.9996587 11.5012639,11 L11.5012639,11 Z M22,14 L11.5,18.4986025 L1,14 L1,15.5733794 L11.1785976,19.935011 C11.3818459,20.021663 11.6155931,20.021663 11.8188415,19.935011 L22,15.5733794 L22,14 Z" id="形状" fill="#59D0E2"></path>
<path d="M22,9 L11.5,13.4953318 L1,9 L1,10.5789585 L11.1785976,14.9350754 C11.3818459,15.0216415 11.6155931,15.0216415 11.8188415,14.9350754 L22,10.5789585 L22,9 Z" id="路径" fill="#59D0E2"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>搬运任务</title>
<g id="新增看板" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="周转看板" transform="translate(-64.000000, -149.000000)">
<g id="编组-26" transform="translate(40.000000, 127.000000)">
<g id="搬运任务" transform="translate(24.000000, 22.000000)">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<g id="异常" transform="translate(1.000000, 2.000000)" fill-rule="nonzero">
<rect id="矩形" fill="#000000" opacity="0" x="2" y="1" width="17" height="17"></rect>
<g>
<rect id="矩形" fill="#000000" opacity="0" x="5" y="6" width="13" height="13"></rect>
<g id="数量_面性">
<rect id="矩形" fill="#000000" opacity="0" x="2" y="2" width="16" height="16"></rect>
<path d="M11.5012639,11 C11.3917412,11 11.2835161,10.977151 11.184033,10.9329979 L0.441155372,6.16366481 C0.172262497,6.04432342 -1.77635684e-15,5.78507176 -1.77635684e-15,5.49973467 C-1.77635684e-15,5.21439758 0.172262497,4.95514592 0.441155372,4.83580453 L11.184033,0.066471464 C11.3846433,-0.0221571547 11.6153567,-0.0221571547 11.815967,0.066471464 L22.5588446,4.83580453 C22.8277375,4.95514592 23,5.21439758 23,5.49973467 C23,5.78507176 22.8277375,6.04432342 22.5588446,6.16366481 L11.815967,10.9329979 C11.7172585,10.9768087 11.6099339,10.9996587 11.5012639,11 L11.5012639,11 Z M22,14 L11.5,18.4986025 L1,14 L1,15.5733794 L11.1785976,19.935011 C11.3818459,20.021663 11.6155931,20.021663 11.8188415,19.935011 L22,15.5733794 L22,14 Z" id="形状" fill="#59D0E2"></path>
<path d="M22,9 L11.5,13.4953318 L1,9 L1,10.5789585 L11.1785976,14.9350754 C11.3818459,15.0216415 11.6155931,15.0216415 11.8188415,14.9350754 L22,10.5789585 L22,9 Z" id="路径" fill="#59D0E2"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -360,8 +360,9 @@ export default {
promiseList.push(async () => {
const response = await this.$axios(opt.url, {
method: opt.method ?? 'get',
// data: opt.method == 'post' ? opt.queryParams : null
});
console.log('[dialogForm:handleOptions:response]', response);
// console.log('[dialogForm:handleOptions:response]', response);
if (opt.select) {
//
const list =

View File

@ -26,7 +26,7 @@
</template>
<script>
import moment from 'moment'
import { getUser } from "@/api/system/user.js";
import { getUserSimple } from "@/api/system/user.js";
import {getPath} from "@/utils/ruoyi";
export default {
name: 'navRight',
@ -67,8 +67,8 @@ export default {
},
getUserMsg() {
let id = this.$store.getters.userId
getUser(id).then(res => {
this.dept = res.data.dept ? res.data.dept.name : ''
getUserSimple(id).then(res => {
this.dept = res.data.deptName ? res.data.deptName : '---'
})
},
async logout() {

View File

@ -106,6 +106,8 @@ export default {
case 'detail':
this.handleDetail(data);
break;
default:
this.handleTableActions({data, type});
}
},
// 处理搜索栏按钮
@ -133,10 +135,13 @@ export default {
this.$refs['search-bar'].resetForm();
this.resetQuery();
break;
default:
this.searchBarClicked(btn);
break;
}
},
handleEmitFun(val) {
console.log('emit unf', val);
console.log('[basicPageMixin handleEmitFun]', val);
switch (val.action) {
// 查看详情
case 'show-detail':

View File

@ -87,6 +87,7 @@ const user = {
// 获取用户信息
GetInfo({ commit, state }) {
return new Promise((resolve, reject) => {
console.log('GetInfo')
getInfo().then(res => {
// 没有 data 数据,赋予个默认值
if (!res) {
@ -96,7 +97,7 @@ const user = {
user: {
id: '',
avatar: '',
userName: '',
username: '',
nickname: ''
}
}
@ -113,7 +114,7 @@ const user = {
commit('SET_ROLES', ['ROLE_DEFAULT'])
}
commit('SET_ID', user.id)
commit('SET_NAME', user.userName)
// commit('SET_NAME', user.username) //无效调用接口未提供username值
commit('SET_NICKNAME', user.nickname)
commit('SET_AVATAR', avatar)
resolve(res)

View File

@ -108,12 +108,17 @@ export const DICT_TYPE = {
// ============== EQUIPMENT - 设备模块 =============
MAINTAIN_TYPE: 'maintain_type',
FAULT_LEVEL: 'fault-level',
FAULT_TYPE: 'fault-type',
REPAIR_MODE: 'repair-mode',
REPAIR_RESULT: 'repair-result',
// ============== ENVIRONMENTAL - 环保模块 =============
ENVIRONMENT_CHECK_UNIT: 'environment_check_unit',
// ============== GROUP - 班组模块 =============
WORK_SHOP: 'workshop'
WORK_SHOP: 'workshop',
// ============== GROUP - 质量模块 =============
MATERIAL_GRADE: 'material_grade'
}
/**

View File

@ -0,0 +1,4 @@
import { getDictData } from './dict';
export const groupConnectWorkshop = (groupName, workshopValue) =>
`${groupName} - ${getDictData('workshop', workshopValue)?.label}`;

View File

@ -42,7 +42,7 @@ const service = axios.create({
let loadingInstance = null
function startLoading() {
loadingInstance = Loading.service({
fullscreen: false,
fullscreen: true,
text: '拼命加载中...',
background: 'rgba(0, 0, 0, 0.1)'
})

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-02-01 15:35:10
* @LastEditTime: 2024-03-12 09:05:20
* @Description:
-->
<template>
@ -29,13 +29,13 @@
<el-row class="container-main flex-col" type="flex">
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15 * beilv" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :size="'middle'" :title="'搬运任务'" :title-icon="'5_1'" :back="'energy'">
<base-container :beilv="1" :size="'middle'" :title="'搬运任务'" :title-icon="'task'" :back="'energy'">
<base-table1 :page="1" :limit="999" :show-index="false" :beilv="1" :table-config="qualityYearTableProps"
:table-data="qualityYearList" />
</base-container>
</el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :size="'middle'" :title="'周转进度'" :title-icon="'5_3'" :back="'energy'">
<base-container :beilv="1" :size="'middle'" :title="'周转进度'" :title-icon="'order'" :back="'energy'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group />
</div> -->
@ -87,7 +87,7 @@
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12 * beilv" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :height="256" :size="'middle'" :title="'库存管理'" :title-icon="'5_5'"
<base-container :beilv="1" :height="256" :size="'middle'" :title="'库存管理'" :title-icon="'productLine'"
:back="'energy'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group />
@ -110,7 +110,7 @@
</base-container>
</el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :beilv="1" :height="318 + 338 + 16" :size="'middle'" :title="'库位信息'" :title-icon="'5_4'"
<base-container :beilv="1" :height="318 + 338 + 16" :size="'middle'" :title="'库位信息'" :title-icon="'info'"
:back="'energy'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group />
@ -715,6 +715,7 @@ export default {
qualityMonthTableProps,
modelMonth: '',
qualityList1,
// logoutTime: 43200000,
qualityTableProps2,
qualityList2,
dateType: '0',
@ -869,6 +870,8 @@ export default {
</script>
<style lang="scss" scoped>
.visual-container {
width: 1920px;
height: 1080px;
@ -885,14 +888,16 @@ export default {
position: relative;
.unit{
position: absolute;
left: 260px;
left: 290px;
top:25px;
color: rgba($color: #ffffff, $alpha: 8);
font-size: 20px;
}
.time{
position: absolute;
left: 1360px;
top:25px;
color: rgba($color: #ffffff, $alpha: 8);
font-size: 20px;
}
.title-button {
@ -992,11 +997,11 @@ export default {
min-height: 10px;
}
.el-input__inner {
background-color: rgba($color: #31878c, $alpha: 0.29);
border: rgba($color: #31878c, $alpha: 0.29);
color: aliceblue;
}
// .el-input__inner {
// background-color: rgba($color: #31878c, $alpha: 0.29);
// border: rgba($color: #31878c, $alpha: 0.29);
// color: aliceblue;
// }
.el-divider--vertical {
height: 174px;

View File

@ -1,17 +1,11 @@
<!--
* @Author: zhp
* @Date: 2024-01-29 16:50:26
* @LastEditTime: 2024-02-01 15:35:43
* @LastEditTime: 2024-03-13 09:07:37
* @LastEditors: zhp
* @Description:
-->
<!--
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-01-29 17:05:37
* @Description:
-->
<template>
<div id="container" ref="container" class="visual-container" :style="styles">
<el-row class="container-title" :style="{
@ -19,7 +13,7 @@
lineHeight: 88 + 'px',
fontSize: 31 + 'px'
}">
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.4em" alt="">
<img src="../../assets/img/logo.png" style="width:1.1em;position:relative;top:.22em" alt="">
许昌安彩冷端看板
<h3 class="unit">单位河南汇融数字科技有限公司</h3>
<h3 class="time">{{ times }}</h3>
@ -341,7 +335,9 @@ export default {
// offsetWidth: null,
cxNameList,
cxDataList,
// time:12,
cutProps,
// logoutTime: 43200000,
cutTableDataList:[],
clientWidth: 0,
containerWidth: 111111,
@ -432,36 +428,15 @@ export default {
this.beilv2 = _this.clientWidth / 1920
})()
}
// let obj = {
// 'a': 11111,
// 'b': 22222,
// 'c': 33333,
// 'd': 44444,
// 'e': 55555,
// logoutInterval = setInterval(() => {
// this.logoutTime -= 1000
// }, 1000)
// if (this.logoutTime === 0) {
// this.SJGInitWebSocket()
// this.CutInitWebSocket()
// this.funInitWebSocket()
// this.logoutTimeReset()
// }
// let index = 0
// for (let i in obj) {
// index++,
// console.log(index);
// }
// this.getList()
// const _this = this;
// window.onresize = () => {
// return (() => {
// _this.clientWidth = `${document.documentElement.clientWidth}`
// this.beilv2 = _this.clientWidth / 1920
// })()
// }
// this.beilv2 = window.innerWidth / 1920
// addEventListener('resize', resizeFun = () => {
// this.beilv2 = window.innerWidth / 1920
// })
// erd.listenTo(document, (element) => {
// this.beilv2 = element.offsetWidth / 1920
// // var width = element.offsetWidth;
// // var height = element.offsetHeight;
// });
},
// beforeDestroy() {
// //
@ -469,13 +444,16 @@ export default {
// removeEventListener('resize', resizeFun)
// },
methods: {
// logoutTimeReset() {
// this.logoutTime = this.time * 60 * 60 * 1000
// },
CutWebsocketClose(e) {
console.log('WebSocket 断开连接', e)
},
SJGWebsocketClose(e) {
console.log('WebSocket 断开连接', e)
},
funInitWebSocket(e) {
funWebSocketClose(e) {
console.log('WebSocket 断开连接', e)
},
formatTime(time, option) {
@ -721,17 +699,17 @@ export default {
let cutArr = this.cutWsData.productHourData.map((item, index) => [
// console.log(item)
`
<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
<span style="color:rgba(255,255,255,0.7)" >${index + 1 || ''}
</span>`,
// formatDate(item.planStartTime) || '',
`
<span style="color:rgba(255,255,255,0.5)" >${item.lineName || ''}
<span style="color:rgba(255,255,255,0.7)" >${item.lineName || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${this.formatTime(item.time) || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${this.getSize(item.size) || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.productArea + '㎡' || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.wasteArea + '㎡' || ''}</span>`,
`<div style = "${(item.product * 100).toFixed(2) > 91 ? 'display:block;color:rgba(255,255,255,0.5)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>
`<span style="color:rgba(255,255,255,0.7)">${this.formatTime(item.time) || ''}</span>`,
`<span style="color:rgba(255,255,255,0.7)">${this.getSize(item.size) || ''}</span>`,
`<span style="color:rgba(255,255,255,0.7)">${item.productArea + '㎡' || ''}</span>`,
`<span style="color:rgba(255,255,255,0.7)">${item.wasteArea + '㎡' || ''}</span>`,
`<div style = "${(item.product * 100).toFixed(2) > 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>
<div style = "${(item.product * 100).toFixed(2) < 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
])
this.cutConfig.data = cutArr
@ -984,7 +962,7 @@ background: linear-gradient(to bottom,rgba(60,
height: 290px;
width: 1px;
position: absolute;
left: 66.2%;
left: 66.3%;
top: 12%;
background: linear-gradient(to bottom, rgba(60,
231,
@ -1036,11 +1014,11 @@ background: linear-gradient(to bottom,rgba(60,
min-height: 10px;
}
.el-input__inner {
background-color: rgba($color: #31878c, $alpha: 0.29);
border: rgba($color: #31878c, $alpha: 0.29);
color: aliceblue;
}
// .el-input__inner {
// background-color: rgba($color: #31878c, $alpha: 0.29);
// border: rgba($color: #31878c, $alpha: 0.29);
// color: aliceblue;
// }
.el-divider--vertical {
height: 174px;

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-29 13:45:56
* @LastEditTime: 2024-01-29 14:56:38
* @LastEditTime: 2024-03-13 08:58:01
* @LastEditors: zhp
* @Description:
-->
@ -85,11 +85,11 @@ export default {
},
},
legend: {
bottom: '2%',
bottom: '10%',
left: 'center',
itemWidth: 18,
itemHeight:18,
icon: 'circle',
itemWidth: 12,
itemHeight:12,
icon: 'rect',
textStyle: {
color: '#fff'
},

View File

@ -2,7 +2,7 @@
* @Author: gtz
* @Date: 2022-01-19 15:58:17
* @LastEditors: zhp
* @LastEditTime: 2024-02-01 15:25:14
* @LastEditTime: 2024-02-22 10:26:59
* @Description: file content
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
-->
@ -24,7 +24,7 @@
<div class="bar-item">
<div v-if="title" class="bar-title" ds>
<span>
<svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .08em" />
<svg-icon :icon-class="titleIcon" style="font-size: 1em; position: relative; top: .01em" />
{{ title }}
</span>
<!-- <span v-if="showTime" style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
@ -157,35 +157,58 @@ export default {
<style lang="scss" scoped>
.base-container {
color: #fff;
width: 100%;
// background-color: rgba($color: #061027, $alpha: 0.15);
position: relative;
opacity: calc(.8);
// border: 2px solid;
// background: url('../../../../assets/img/energy.png') no-repeat;
// background-size: 100% 100%;
&__small {
background: url(../../../../assets/img/short.png) no-repeat;
background-size: 100% 100%;
// background-position: 0 0;
backdrop-filter: blur(5px);
}
// &__small::after {
// content: "";
// position: absolute;
// top: 0;
// left: 0;
// filter: blur(20px);
// z-index: -1;
// }
&__middle {
background: url(../../../../assets/img/middle.png) no-repeat;
background-size: 100% 100%;
// background-position: 0 0;
backdrop-filter: blur(5px);
}
&__large {
background: url(../../../../assets/img/high.png) no-repeat;
background-size: 100% 100%;
// background-position: 0 0;
backdrop-filter: blur(5px);
}
&__eqStatus {
background: url(../../../../assets/img/short.png) no-repeat;
background: url(../../../../assets/img/high.png) no-repeat;
background-size: 100% 100%;
backdrop-filter: blur(5px);
}
// &::after {
// content: " ";
// // display: block;
// position: absolute;
// left: 0;
// top: 0;
// right: 0;
// bottom: 0;
// // background: inherit;
// /* filter */
// backdrop-filter: blur(5px);
// z-index: -1;
// }
// border-radius: 40px 0px 40px 0px;
// border-image: linear-gradient(360deg, rgba(157, 246, 254, 0.05), rgba(100, 233, 252, 0.9)) 2 2;
// .line {
@ -272,4 +295,9 @@ export default {
border: none;
}
}
// .base-container::after{
// z-index: -1;
// width: 100%;
// filter: blur(2px);
// }
</style>

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-09-21 09:06:28
* @LastEditTime: 2024-02-01 15:52:41
* @LastEditTime: 2024-03-13 08:51:12
* @LastEditors: zhp
* @Description:
-->
@ -172,7 +172,7 @@ export default {
axisLine: {
lineStyle: {
type: 'solid',
color: '#213259', // 线
color: '#25528f',
width: '1' // 线
}
},
@ -186,7 +186,7 @@ export default {
},
splitLine: {
lineStyle: {
color: '#213259'
color: '#25528f'
}
},
data: nameList
@ -215,7 +215,7 @@ export default {
show: true,
lineStyle: {
type: 'solid',
color: '#213259', // 线
color: '#25528f',
width: '1' // 线
}
},
@ -228,7 +228,7 @@ export default {
},
splitLine: {
lineStyle: {
color: '#213259'
color: '#25528f'
}
}
// type: 'value'
@ -260,7 +260,7 @@ export default {
show: true,
lineStyle: {
type: 'solid',
color: '#213259', // 线
color: '#25528f', // 线
width: '1' // 线
}
},
@ -275,7 +275,7 @@ export default {
},
splitLine: {
lineStyle: {
color: '#213259'
color: '#25528f'
}
}
// type: 'value'

View File

@ -145,7 +145,7 @@ export default {
axisLine: {
lineStyle: {
type: 'solid',
color: '#213259', // 线
color: '#25528f', // 线
width: '1' // 线
}
},
@ -156,7 +156,7 @@ export default {
},
splitLine: {
lineStyle: {
color: '#213259'
color: '#25528f'
}
},
data: this.nameList
@ -172,17 +172,17 @@ export default {
axisLabel: {
color: "#fff",
fontSize: 12,
formatter: '{value}/kwh'
// formatter: '{value}/kwh'
},
axisLine: {
show: true,
lineStyle: {
color: "#213259",
color: "#25528f",
},
},
splitLine: {
lineStyle: {
color: "#213259a0",
color: "#25528f",
},
}
},

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-27 13:54:52
* @LastEditTime: 2024-01-25 14:08:27
* @LastEditTime: 2024-03-13 09:04:11
* @LastEditors: zhp
* @Description:
-->
@ -91,43 +91,78 @@ export default {
},
methods: {
initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) {
let rawData = []
rawData.push(passRateList,wasteList)
// console.log(1)
this.chart = echarts.init(document.getElementById(this.id))
let series = [
{
//
name: '良品',
type: 'bar',
stack: 'total',
// silent: true,
// itemStyle: {
color: '#0fdedb',
// },
// barCategoryGap: '10%',
barWidth: 10,
data: passRateList
},
{
type: 'bar',
stack: 'total',
name: '废品',
// barCategoryGap: '10%',
data: wasteList,
// barWidth: 10,
// barWidth: 15,
// label: {
// position: [10, 10],
// normal: {
// position: [800, -24],
// show: true,
// textStyle: {
// color: '#2359ec',
// fontSize: 16,
// },
// },
// },
const totalData = [];
for (let i = 0; i < rawData[0].length; ++i) {
let sum = 0;
for (let j = 0; j < rawData.length; ++j) {
sum += rawData[j][i];
}
]
totalData.push(sum);
}
let colors = ['#0fdedb', '#2359ec' ]
console.log('total', totalData);
this.chart = echarts.init(document.getElementById(this.id))
const series = [
'良品',
'废品',
// 'Affiliate Ad',
// 'Video Ad',
// 'Search Engine'
].map((name, sid) => {
// console.log(sid)
return {
name,
type: 'bar',
stack: 'total',
barWidth: 10,
label: {
show: true,
formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
},
color:colors[sid],
data: rawData[sid].map((d, did) =>
totalData[did] <= 0 ? 0 : d / totalData[did]
)
};
});
// let series = [
// {
// //
// name: '',
// type: 'bar',
// stack: 'total',
// // silent: true,
// // itemStyle: {
// color: '#0fdedb',
// // },
// // barCategoryGap: '10%',
// barWidth: 10,
// data: passRateList
// },
// {
// type: 'bar',
// stack: 'total',
// name: '',
// // barCategoryGap: '10%',
// data: wasteList,
// // barWidth: 10,
// // barWidth: 15,
// // label: {
// // position: [10, 10],
// // normal: {
// // position: [800, -24],
// // show: true,
// // textStyle: {
// // color: '#2359ec',
// // fontSize: 16,
// // },
// // },
// // },
// }
// ]
// for (i = 0; i < 5; i++) {
// series.push({
@ -135,8 +170,9 @@ export default {
// }
this.chart.setOption({
legend: {
// top: '2.5%',
// right: '20px',
itemWidth: 12,
itemHeight: 12,
icon: 'rect',
textStyle: {
color: '#ffffff'
}

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-02-01 15:35:29
* @LastEditTime: 2024-03-12 09:34:06
* @Description:
-->
<template>
@ -632,12 +632,12 @@ export default {
])
this.eqConfig.data = eqArr
this.$refs['eqScrollBoard'].updateRows(eqArr)
this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
this.getList()
this.initWebSocket()
this.SJGInitWebSocket()
this.getTimes()
// this.$refs.EnergyMonitoringChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [3134, 2323, 3232, 3233, 2321])
// this.$refs.productLineChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920
window.onresize = () => {
@ -699,22 +699,22 @@ export default {
])
this.processConfig.data = processArr
this.$refs['processScrollBoard'].updateRows(processArr)
if (res.data.length !==0) {
let processArr = res.data.map((item, index) => [
// console.log(item)
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`,
// formatDate(item.planStartTime) || '',
`
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
])
this.processConfig.data = processArr
this.$refs['processScrollBoard'].updateRows(processArr)
}
// if (res.data.length !==0) {
// let processArr = res.data.map((item, index) => [
// // console.log(item)
// `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
// </span>`,
// // formatDate(item.planStartTime) || '',
// `
// <span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
// </span>`,
// `<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
// `<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
// `<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
// ])
// this.processConfig.data = processArr
// this.$refs['processScrollBoard'].updateRows(processArr)
// }
})
},
getTimes() {
@ -982,6 +982,8 @@ export default {
</script>
<style lang="scss" scoped>
.visual-container {
width: 1920px;
height: 1080px;
@ -993,12 +995,15 @@ export default {
background: url('../../assets/img/OperationalOverview/title.png') no-repeat;
background-size: 100% 100%;
color: #00fff0;
word-spacing: 8px;
// word-spacing: 8px;
letter-spacing: 8px;
text-align: center;
.unit {
position: absolute;
left: 260px;
left: 290px;
top: 25px;
letter-spacing: 0px;
color: rgba($color: #ffffff, $alpha: 8);
font-size: 20px;
}
@ -1006,6 +1011,8 @@ export default {
position: absolute;
left: 1360px;
top: 25px;
letter-spacing: 0px;
color: rgba($color: #ffffff, $alpha: 8);
font-size: 20px;
}
.title-button {
@ -1105,11 +1112,11 @@ export default {
min-height: 10px;
}
.el-input__inner {
background-color: rgba($color: #31878c, $alpha: 0.29);
border: rgba($color: #31878c, $alpha: 0.29);
color: aliceblue;
}
// .el-input__inner {
// background-color: rgba($color: #31878c, $alpha: 0.29);
// border: rgba($color: #31878c, $alpha: 0.29);
// color: aliceblue;
// }
.el-divider--vertical {
height: 174px;

View File

@ -32,7 +32,7 @@ import { parseTime } from '../../core/mixins/code-filter';
import {
getcoreAlarmLogPage
} from '@/api/base/coreAlarmLog';
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import {DICT_TYPE, getDictDatas, publicFormatter } from "@/utils/dict";
const tableProps = [
{
@ -50,7 +50,8 @@ const tableProps = [
},
{
prop: 'alarmGrade',
label: '报警级别'
label: '报警级别',
filter: publicFormatter(DICT_TYPE.EQU_ALARM_LEVEL)
},
{
prop: 'alarmReason',

View File

@ -7,10 +7,11 @@
<template>
<el-drawer
:visible="visible"
:visible.sync="visible"
:show-close="false"
:wrapper-closable="false"
:wrapper-closable="true"
class="drawer"
:before-close="beforeClose"
custom-class="mes-drawer"
size="60%"
@closed="$emit('destroy')">
@ -81,12 +82,12 @@
</section>
</div>
<div class="drawer-body__footer">
<div v-if="mode == 'edit'" class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button>
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑
</el-button>
<el-button v-else type="primary" @click="handleConfirm">保存</el-button>
</el-button> -->
<el-button type="primary" @click="handleConfirm">保存</el-button>
<!-- sections的第二项必须是 属性列表 -->
<!-- <el-button
v-if="sections[1].allowAdd"
@ -298,6 +299,17 @@ export default {
}
},
methods: {
beforeClose(done) {
if (this.mode.includes('edit')) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
} else {
done()
}
},
handleTableBtnClick({ type, data }) {
switch (type) {
case 'edit':

View File

@ -486,6 +486,7 @@ export default {
pageSize: 10,
code: '',
name: '',
special: false
},
//
form: {

View File

@ -83,20 +83,14 @@
<el-col :span="12">
<el-form-item
label="工段排序"
prop="sort"
:rules="[
{
type: 'number',
trigger: 'change',
message: '请输入正确的数字类型',
transform: (val) => Number(val),
},
]">
<el-input
prop="sort">
<el-input-number
v-model="dataForm.sort"
clearable
controls-position="right"
@change="$emit('update', dataForm)"
placeholder="请输入工段排序" />
placeholder="请输入工段排序"
style="width: 100%" />
</el-form-item>
</el-col>
</el-row>

View File

@ -298,9 +298,9 @@ export default {
//
sort: undefined,
// 线
lineDataType: undefined,
lineDataType: 0,
//
sectionDataType: undefined,
sectionDataType: 0,
};
this.resetForm('form');
},

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-12-14 13:52:42
* @LastEditTime: 2024-03-14 10:02:53
* @Description:
-->
<template>
@ -169,7 +169,7 @@ export default {
//
if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => {
if (this.test.length > 1 || this.test[0].name) {
if (this.test.length > 1 || this.test[0]?.name) {
this.test.forEach(check => {
check.hotMaterialId = this.dataForm.id
if (check.id) {
@ -191,7 +191,7 @@ export default {
}
//
this.urlOptions.createURL(this.dataForm).then(response => {
if (this.test.length > 1 || this.test[0].name) {
if (this.test.length > 1 || this.test[0]?.name) {
this.test.forEach(check => {
check.hotMaterialId = response.data
createHotMaterialCheck(check).then(res => {

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-01-08 16:11:03
* @LastEditTime: 2024-03-13 13:54:01
* @Description:
-->
<template>
@ -27,7 +27,7 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="产品名称" prop="name">
<el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入产品名称" />
<el-input v-model="dataForm.name" :disabled="isdetail || isedit" clearable placeholder="请输入产品名称" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -35,7 +35,7 @@
<el-input
v-model="dataForm.code"
clearable
:disabled="isdetail"
:disabled="isdetail || isedit"
placeholder="请输入产品编码" />
</el-form-item>
</el-col>
@ -44,12 +44,12 @@
<el-select
v-model="dataForm.materialType"
filterable
:disabled="isdetail"
:disabled="isdetail || isedit"
style="width: 100%"
placeholder="请选择物料类型">
<el-option
v-for="dict in getDictDatas('material_type')"
:key="dict.value"
v-for="(dict, index) in getDictDatas('material_type')"
:key="index"
:label="dict.label"
:value="dict.value" />
</el-select>
@ -62,12 +62,12 @@
<el-select
v-model="dataForm.productType"
filterable
:disabled="isdetail"
:disabled="isdetail || isedit"
style="width: 100%"
placeholder="请选择产品类型">
<el-option
v-for="dict in getDictDatas(DICT_TYPE.PRODUCT_TYPE)"
:key="dict.value"
v-for="(dict, index) in getDictDatas(DICT_TYPE.PRODUCT_TYPE)"
:key="index"
:label="dict.label"
:value="dict.value" />
</el-select>
@ -78,12 +78,12 @@
<el-select
v-model="dataForm.unit"
filterable
:disabled="isdetail"
:disabled="isdetail || isedit"
style="width: 100%"
placeholder="请选择单位">
<el-option
v-for="dict in getDictDatas(DICT_TYPE.UNIT_DICT)"
:key="dict.value"
v-for="(dict, index) in getDictDatas(DICT_TYPE.UNIT_DICT)"
:key="index"
:label="dict.label"
:value="dict.value" />
</el-select>
@ -91,24 +91,24 @@
</el-col>
<el-col :span="8">
<el-form-item label="单位平方数" prop="area">
<el-input-number v-model="dataForm.area" :precision="6" :min="0" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
<el-input-number v-model="dataForm.area" :precision="6" :min="0" style="width: 100%" :disabled="isdetail || isedit" clearable placeholder="请输入单位平方数" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="规格" prop="specifications">
<el-input v-model="dataForm.specifications" :disabled="isdetail" @blur="setArea" @clear="clearArea" clearable placeholder="请输入规格" />
<el-input v-model="dataForm.specifications" :disabled="isdetail || isedit" @blur="setArea" @clear="clearArea" clearable placeholder="请输入规格" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产线生产单位用时(S)" prop="processTime">
<el-form-item label="生产节拍(S)" prop="processTime">
<el-input v-model.number="dataForm.processTime" :precision="4" :min="0" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="重量" prop="weight">
<el-input-number v-model="dataForm.weight" :precision="6" :min="0" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入重量" />
<el-input-number v-model="dataForm.weight" :precision="6" :min="0" style="width: 100%" :disabled="isdetail || isedit" clearable placeholder="请输入重量" />
</el-form-item>
</el-col>
</el-row>
@ -241,7 +241,7 @@ export default {
productType: undefined,
area: undefined,
specifications: undefined,
processTime: 0,
processTime: undefined,
remark: undefined,
unit: undefined,
weight: undefined
@ -249,14 +249,14 @@ export default {
productAttrList: [],
visible: false,
isdetail: false,
isedit: false,
idAttrShow: false,
dataRule: {
code: [{ required: true, message: "产品编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
specifications: [{ required: true, message: "规格不能为空", trigger: "blur" }],
specifications: [{ required: false, message: "规格不能为空", trigger: "blur" }],
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }],
processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }]
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }]
}
};
},
@ -322,12 +322,14 @@ export default {
this.listQuery.total = response.data.total;
});
},
init(id, isdetail) {
init(row, isdetail) {
this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = id || undefined;
this.dataForm.id = row?.id || undefined;
this.isedit = row?.id && row?.externalCode ? true : false;
console.log('你好', this.isedit)
this.visible = true;
if (id) {
if (row) {
this.idAttrShow = true
} else {
this.idAttrShow = false
@ -338,15 +340,14 @@ export default {
if (this.dataForm.id) {
//
this.urlOptions.infoURL(id).then(response => {
this.urlOptions.infoURL(this.dataForm.id).then(response => {
this.dataForm = response.data
// this.dataForm.area = response.data.area || 0
// this.dataForm.weight = response.data.weight || 0
// this.dataForm.specifications = response.data.specifications || undefined
console.log('11res112', this.dataForm.specifications, this.dataForm.weight, this.dataForm.area)
if (this.dataForm.unit !== undefined) {
this.dataForm.unit = String(this.dataForm.unit)
}
// if (this.dataForm.unit !== undefined) {
// this.dataForm.unit = String(this.dataForm.unit)
// }
if (this.dataForm.materialType !== undefined) {
this.dataForm.materialType = String(this.dataForm.materialType)
}

View File

@ -74,9 +74,7 @@ export default {
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
getCoreProductAttr({
id: this.dataForm.id
}).then((res) => {
getCoreProductAttr(this.dataForm.id).then((res) => {
const { name, value } = res.data;
this.dataForm.name = name;
this.dataForm.value = value;

View File

@ -141,6 +141,22 @@ export default {
},
created() {},
methods: {
//tableBtn
handleClick(val) {
if (val.type === "edit") {
this.addOrUpdateVisible = true;
this.addOrEditTitle = "编辑";
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data);
});
} else if (val.type === "delete") {
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data)
} else if (val.type === "change") {
this.changeStatus(val.data.id)
} else {
this.otherMethods(val)
}
},
//
deleteHandle(id, name, index) {
this.$confirm(`是否确认删除产品名称为"${name}"的数据项`, "提示", {
@ -168,7 +184,7 @@ export default {
this.addOrUpdateVisible = true;
this.addOrEditTitle = "详情";
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, true);
this.$refs.addOrUpdate.init(val.data, true);
});
}
},

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-21 18:59:54
* @LastEditTime: 2024-03-13 13:54:48
* @Description:
-->
<template>
@ -12,18 +12,6 @@
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产线名称" prop="name">
<el-input v-model="dataForm.name" clearable placeholder="请输入产线名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产线编号" prop="code">
<el-input v-model="dataForm.code" clearable placeholder="请输入产线编号" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="工厂名称" prop="factoryId">
@ -41,6 +29,36 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车间名称" prop="roomNameDict">
<el-select
v-model="dataForm.roomNameDict"
filterable
clearable
style="width: 100%"
placeholder="请选择车间名称">
<el-option
v-for="(dict, index) in getDictDatas('workshop')"
:key="index"
:label="dict.label"
:value="Number(dict.value)" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产线名称" prop="name">
<el-input v-model="dataForm.name" clearable placeholder="请输入产线名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="产线编号" prop="code">
<el-input v-model="dataForm.code" clearable placeholder="请输入产线编号" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="产线TT值(h)" prop="tvalue">
<el-input
v-model.number="dataForm.tvalue"
@ -92,11 +110,13 @@ export default {
tvalue: 0,
factoryId: undefined,
remark: undefined,
roomNameDict: undefined
},
factoryList: [],
dataRule: {
code: [{ required: true, message: "产线编号不能为空", trigger: "blur" }],
name: [{ required: true, message: "产线名称不能为空", trigger: "blur" }],
roomNameDict: [{ required: true, message: "车间名称不能为空", trigger: "blur" }],
factoryId: [{ required: true, message: "工厂不能为空", trigger: "blur" }]
}
};
@ -105,6 +125,26 @@ export default {
this.getDict()
},
methods: {
init(id) {
this.dataForm.id = id || "";
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr()
}
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data
// this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
});
} else {
if (this.urlOptions.isGetCode) {
this.getCode()
}
}
});
},
async getDict() {
//
const factoryRes = await getFactoryList();

View File

@ -47,6 +47,7 @@ import {
} from '@/api/base/coreProductionLine';
import { getStatus } from '@/api/core/base/productionLine';
import codeFilter from '../../core/mixins/code-filter';
import { publicFormatter } from '@/utils/dict';
const tableProps = [
{
@ -58,6 +59,11 @@ const tableProps = [
prop: 'factoryName',
label: '工厂'
},
{
prop: 'roomNameDict',
label: '车间名称',
filter: publicFormatter('workshop')
},
{
prop: 'name',
label: '产线名称'
@ -71,10 +77,10 @@ const tableProps = [
label: '当前状态',
filter: codeFilter('lineStatus')
},
{
prop: 'tvalue',
label: '产线TT值(h)'
},
// {
// prop: 'tvalue',
// label: '线TT(h)'
// },
{
prop: 'description',
label: '描述'
@ -82,7 +88,7 @@ const tableProps = [
{
prop: 'remark',
label: '备注'
},
}
];
export default {

View File

@ -84,7 +84,7 @@
<el-radio :label="1">产品基础BOM</el-radio>
<el-radio :label="2">工艺扩展BOM</el-radio>
</el-radio-group> -->
<el-select v-model="dataForm.materialMethod" placeholder="请选择物料计算方式" style="width: 100%;" @change="materialMethodChange">
<el-select v-model="dataForm.materialMethod" placeholder="请选择物料计算方式" style="width: 100%;" clearable @change="materialMethodChange">
<el-option key="1" label="产品基础BOM" :value="1" />
<el-option key="2" label="工艺扩展BOM" :value="2" />
</el-select>
@ -92,7 +92,7 @@
</el-col>
<el-col :span='8'>
<el-form-item label="优先级" prop="priority">
<el-select v-model="dataForm.priority" placeholder="请选择优先级" style="width: 100%;">
<el-select v-model="dataForm.priority" clearable placeholder="请选择优先级" style="width: 100%;">
<el-option
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
:key="item.value"
@ -104,7 +104,7 @@
</el-col>
<el-col :span='8'>
<el-form-item label="工单类型" prop="type">
<el-select v-model="dataForm.type" placeholder="请选择工单类型" style="width: 100%;">
<el-select v-model="dataForm.type" clearable placeholder="请选择工单类型" style="width: 100%;">
<el-option
v-for="item in workOrderTypeList"
:key="item.id"
@ -116,9 +116,26 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span='8'>
<el-form-item label="负责车间" prop="roomNameDict">
<el-select
v-model="dataForm.roomNameDict"
filterable
clearable
style="width: 100%"
@change="setLine"
placeholder="请选择车间名称">
<el-option
v-for="(dict, index) in getDictDatas('workshop')"
:key="index"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span='8'>
<el-form-item label="关联产线" prop="productLineIds">
<el-select v-model="dataForm.productLineIds" placeholder="请选择关联产线" multiple style="width: 100%;">
<el-select v-model="dataForm.productLineIds" clearable placeholder="请选择关联产线" multiple style="width: 100%;">
<el-option
v-for="item in productLineList"
:key="item.id"
@ -130,7 +147,7 @@
</el-col>
<el-col :span='8'>
<el-form-item label="负责人" prop="workers">
<el-input v-model="dataForm.workers" placeholder="请输入负责人"></el-input>
<el-input v-model="dataForm.workers" clearable placeholder="请输入负责人"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -147,7 +164,7 @@
import { getProductAll } from '@/api/base/product'
import { getProcessFlowList, workOrderList } from '@/api/base/orderManage'
import { createCoreWO, updateCoreWO, getCode, getCoreWO } from '@/api/base/coreWorkOrder'
import { getLineAll } from '@/api/base/productionLine'
import { getLinelistByRoom, getLineAll } from '@/api/base/productionLine'
import basicAdd from '../../core/mixins/basic-add';
export default {
@ -180,6 +197,7 @@ export default {
productLineIds: [],
type: '',
workers: '',
roomNameDict: '',
status: 1
},
rules: {
@ -187,7 +205,9 @@ export default {
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
productLineIds: [{ required: true, message: "关联产线不能为空", trigger: "change" }]
roomNameDict: [{ required: true, message: "车间名称不能为空", trigger: "blur" }],
productLineIds: [{ required: true, message: "关联产线不能为空", trigger: "change" }],
materialMethod: [{ required: true, message: "物料计算方式不能为空", trigger: "change" }]
},
productList: [],
processFlowList: [],
@ -206,6 +226,14 @@ export default {
this.getDict()
},
methods: {
setLine() {
// 线
getLinelistByRoom({
room: this.dataForm.roomNameDict
}).then(res => {
this.productLineList = res.data || []
})
},
//
materialMethodChange(val) {
if (val === 2 && !this.dataForm.processFlowId) {
@ -236,7 +264,9 @@ export default {
if (this.dataForm.priority !== undefined) {
this.dataForm.priority = String(this.dataForm.priority)
}
this.dataForm.priority
if (this.dataForm.roomNameDict !== undefined) {
this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
}
});
} else {
if (this.urlOptions.isGetCode) {
@ -264,19 +294,20 @@ export default {
this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$confirm('是否添加预使用主原料信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log('121', this.dataForm.name)
this.$emit("refreshDataList", {
id: response.data,
name: this.dataForm.name
});
}).catch(() => {
this.$emit("refreshDataList");
});
// this.$confirm('使?', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// console.log('121', this.dataForm.name)
// this.$emit("refreshDataList", {
// id: response.data,
// name: this.dataForm.name
// });
// }).catch(() => {
// this.$emit("refreshDataList");
// });
});
});
},

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-16 09:14:35
* @LastEditTime: 2024-03-15 15:34:58
* @Description:
-->
<template>
@ -17,17 +17,47 @@
</small-title>
<div class="content">
<div class="formContent">
<el-form :model="dataForm" ref="dataForm" label-width="120px" label-position="top" class="demo-ruleForm" :rules="rules">
<el-row :gutter="20">
<el-col :span="12">工单名称:{{ dataForm.name }}</el-col>
<el-col :span="12">工单编码:{{ dataForm.code }}</el-col>
<el-col :span="8">
<el-form-item label="工单名称" prop="name">
<!-- <el-input v-model="dataForm.name" autocomplete="off"></el-input> -->
<span>{{ dataForm.name }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工单编码" prop="code">
<span>{{ dataForm.code }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产品名称" prop="productName">
<span>{{ dataForm.productName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">产品名称:{{ dataForm.productName }}</el-col>
<el-col :span="12">产品规格:{{ dataForm.specifications }}</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">实际生产数量:{{ dataForm.expectedTime }}</el-col>
<el-col :span="8">
<el-form-item label="产品规格" prop="specifications">
<span>{{ dataForm.specifications }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际生产数量" prop="actualQuantity">
<el-input v-model.number="dataForm.actualQuantity" autocomplete="off" style="width: 80%" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际生产完成时间" prop="finishProduceTime">
<el-date-picker
v-model="dataForm.finishProduceTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="attr-list">
@ -41,12 +71,12 @@
<el-table-column prop="priority" label="优先级" />
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
<template slot-scope="scope">
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
</template>
</el-table-column>
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
<template slot-scope="scope">
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
</template>
</el-table-column>
<el-table-column label="操作">
@ -86,11 +116,11 @@
</div>
<div class="drawer-body__footer">
<el-button style="" type="primary" @click="goback()">关闭</el-button>
<el-button style="" @click="goback()">取消</el-button>
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
编辑
</el-button>
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button> -->
</el-button> -->
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</div>
</div>
@ -104,7 +134,7 @@
<script>
import basicAdd from '../../core/mixins/basic-add';
import { getConOrderList, createConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
import { getConOrderList, updateConCoreWOr, getCoreWO, statusChange } from '@/api/base/coreWorkOrder';
import SmallTitle from '../material/SmallTitle';
// import { parseTime } from '../../core/mixins/code-filter';
// import attrAdd from './attr-add';
@ -135,11 +165,43 @@ export default {
tableData: [],
visible: false,
isdetail: false,
idAttrShow: false
idAttrShow: false,
rules: {
name: [{ required: true, message: "工单名称不能为空", trigger: "blur" }],
finishProduceTime: [{ required: true, message: "实际生产完成时间不能为空", trigger: "change" }]
},
};
},
mounted() {},
methods: {
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
//
if (this.dataForm.id) {
statusChange({
id: this.dataForm.id,
status: 4,
finishProduceTime: this.dataForm.finishProduceTime,
actualQuantity: this.dataForm.actualQuantity
}).then(response => {
this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
//
// this.urlOptions.createURL(this.dataForm).then(response => {
// this.$modal.msgSuccess("");
// this.visible = false;
// this.$emit("refreshDataList");
// });
});
},
initData() {
// this.materialAttrList.splice(0);
this.listQuery.total = 0;
@ -159,8 +221,8 @@ export default {
// });
// return;
}
//
createConCoreWOr({
//
updateConCoreWOr({
...row,
workOrderId: this.dataForm.id
}).then((response) => {
@ -173,16 +235,17 @@ export default {
}
},
getList() {
// Bom
//
getConOrderList({
...this.listQuery,
workOrderId: this.dataForm.id
}).then((response) => {
this.tableData = response.data.map(item => {
item.isEdit = false
item.isallocation = item.actualAssignmentQuantity ? true : false
return item
});
this.listQuery.total = response.data.total;
this.listQuery.total = response.data.length;
});
},
//
@ -241,6 +304,9 @@ export default {
};
</script>
<style scoped>
/* .item .el-form-item__label {
color: red;
} */
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
display: flex;
@ -249,6 +315,7 @@ export default {
.drawer >>> .el-form-item__label {
padding: 0;
font-weight: 600;
}
.drawer >>> .el-drawer__header {
@ -295,4 +362,18 @@ export default {
margin-bottom: 10px;
width: 100%;
}
.blodTip {
height: 16px;
font-size: 14px;
font-weight: 600;
color: rgba(0,0,0,0.85);
margin-bottom: 8px;
}
.lightTip {
/* height: 16px; */
font-size: 14px;
font-weight: 400;
color: rgba(102,102,102,0.75);
margin-bottom: 12px;
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-12-26 16:59:25
* @LastEditTime: 2024-03-15 15:40:24
* @Description:
-->
<template>
@ -45,7 +45,7 @@
</el-col>
<el-col :span="3">
<div class="blodTip">工单来源</div>
<div class="lightTip">{{ dataForm.triggerOrigin === 1 ? 'MES' : dataForm.triggerOrigin === 2 ? 'ERP' : ''}}</div>
<div class="lightTip">{{ dataForm.triggerOrigin === 1 ? 'MES-手动' : dataForm.triggerOrigin === 2 ? 'MES-订单下发' : 'ERP'}}</div>
</el-col>
<el-col :span="3">
<div class="blodTip">所属订单</div>
@ -97,6 +97,10 @@
<div class="blodTip">关联工艺</div>
<div class="lightTip">{{ dataForm.processFlowName }}</div>
</el-col>
<el-col :span="3">
<div class="blodTip">车间名称</div>
<div class="lightTip">{{ (dataForm.roomNameDict || dataForm.roomNameDict === 0) ? getDictDataLabel('workshop', dataForm.roomNameDict) : '-' }}</div>
</el-col>
</el-row>
</div>
</div>
@ -218,7 +222,7 @@
<script>
// import basicAdd from '../../core/mixins/basic-add';
import { getCoreWO, getMaterialBomPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
import { getCoreWO, getCoreWOMaPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
// import { orderList } from "@/api/base/orderManage";
import { getProcessFlowList } from '@/api/base/orderManage'
import SmallTitle from './SmallTitle';
@ -261,8 +265,9 @@ const tableProps = [
const tableProps1 = [
{
prop: 'materialName',
label: '物料名称'
prop: 'material',
label: '物料名称',
filter: publicFormatter('material')
},
{
prop: 'unit',
@ -270,9 +275,13 @@ const tableProps1 = [
filter: publicFormatter('unit_dict')
},
{
prop: 'num',
prop: 'remaining',
label: '剩余生产预计消耗'
},
{
prop: 'num',
label: '库存数量'
}
];
export default {
@ -431,11 +440,17 @@ export default {
// this.listQuery.total = response.data.total;
});
// 使
if (this.dataForm.planProductId) {
getMaterialBomPage({
productId: this.dataForm.planProductId,
console.log()
if (this.dataForm.id) {
getCoreWOMaPage({
workOrderId: this.dataForm.id,
pageNo: 1,
pageSize: 100
}).then((response) => {
this.materialList = response.data;
this.materialList = response.data.records.map((item) => {
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
return item
});
// this.listQuery.total = response.data.length;
});
}

View File

@ -60,6 +60,7 @@ import {
getConOrderList,
getCoreWOList
} from '@/api/base/coreWorkOrder';
import { publicFormatter } from '@/utils/dict';
const tableProps = [
@ -82,6 +83,13 @@ const tableProps = [
minWidth: 150,
showOverflowtooltip: true
},
{
prop: 'roomNameDict',
label: '负责车间',
minWidth: 120,
filter: publicFormatter('workshop'),
showOverflowtooltip: true
},
{
prop: 'workers',
label: '负责人',
@ -101,7 +109,7 @@ const tableProps = [
{
prop: 'status',
label: '工单状态',
filter: (val) => ['', '等待', '激活', '暂停', '完成', '', '', '', '', '作废'][val]
filter: (val) => ['', '等待', '激活', '暂停', '完成', '作废', '终止'][val]
},
{
prop: 'planFinishTime',
@ -189,17 +197,7 @@ export default {
{
name: 'status',
type: 'equal',
value: 2
},
{
name: 'status',
type: 'equal',
value: 3
},
{
name: 'status',
type: 'equal',
value: 4
value: 1
}
]
}
@ -223,6 +221,25 @@ export default {
]
}
},
{
type: 'stop',
btnName: '终止',
showParam: {
type: '|',
data: [
{
name: 'status',
type: 'equal',
value: 2
},
{
name: 'status',
type: 'equal',
value: 3
}
]
}
},
this.$auth.hasPermi(`base:core-work-order:detail`)
? {
type: 'detail',
@ -244,23 +261,23 @@ export default {
]
}
}
: undefined,
this.$auth.hasPermi(`base:core-work-order:delete`)
? {
type: 'delete',
btnName: '删除',
showParam: {
type: '|',
data: [
{
name: 'status',
type: 'equal',
value: 1
}
]
}
}
: undefined
// this.$auth.hasPermi(`base:core-work-order:delete`)
// ? {
// type: 'delete',
// btnName: '',
// showParam: {
// type: '|',
// data: [
// {
// name: 'status',
// type: 'equal',
// value: 1
// }
// ]
// }
// }
// : undefined
].filter((v)=>v),
tableData: [],
formConfig: [
@ -289,7 +306,8 @@ export default {
{ id: 2, name: '激活' },
{ id: 3, name: '暂停' },
{ id: 4, name: '完成' },
{ id: 9, name: '作废' }
{ id: 5, name: '作废' },
{ id: 6, name: '终止' }
],
param: 'status',
clearable: true
@ -401,14 +419,19 @@ export default {
opration = '暂停'
}
if (val.type === 'nullify') {
param.status = 9
opration = '废'
param.status = 5
opration = '废'
}
if (val.type === 'finish') {
param.status = 4
opration = '完成'
}
if (val.type === 'stop') {
param.status = 6
opration = '终止'
}
console.log('22',val)
if (param.status !== 4) {
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -423,14 +446,18 @@ export default {
onClose: () => {
this.getDataList();
//
if (param.status === 4) {
this.allocationOrder(param);
}
// if (param.status === 4) {
// this.allocationOrder(param);
// }
},
});
});
})
.catch(() => { });
} else {
//
this.allocationOrder(param);
}
}
},
allocationOrder(val) {
@ -438,7 +465,7 @@ export default {
getConOrderList({
workOrderId: val.id,
}).then((response) => {
if (response.data.length > 0) {
this.$confirm('工单结束,可分配产量', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -447,11 +474,16 @@ export default {
.then(() => {
this.allocationVisible = true;
this.$nextTick(() => {
this.$refs.allocation.init(val.id, true);
if (response.data.length > 0) {
// id
this.$refs.allocation.init(val.id);
} else {
this.$refs.allocation.init();
}
});
})
.catch(() => { });
}
// this.listQuery.total = response.data.total;
});
},

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-12-04 15:10:11
* @LastEditTime: 2024-02-21 09:41:39
* @Description:
-->
<template>
@ -59,7 +59,7 @@
style="width: 100%"
placeholder="请选择物料类型">
<el-option
v-for="dict in materialList"
v-for="dict in getDictDatas('material_type')"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
@ -238,7 +238,7 @@ export default {
remark: undefined,
unit: ''
},
materialList: [],
// materialList: [],
supplierList: [],
materialAttrList: [],
unitList: [],
@ -258,17 +258,18 @@ export default {
methods: {
async getDict() {
//
const res = await listData({
pageNo: 1,
pageSize: 99,
dictType: 'material_type',
});
this.materialList = res.data.list.map(item => {
return {
label: item.label,
value: Number(item.value)
}
});
// const res = await listData({
// pageNo: 1,
// pageSize: 99,
// dictType: 'material_type',
// });
// this.materialList = res.data.list
// this.materialList = res.data.list.map(item => {
// return {
// label: item.label,
// value: Number(item.value)
// }
// });
//
const supplierRes = await getSupplierList();
this.supplierList = supplierRes.data;
@ -348,6 +349,9 @@ export default {
if (this.dataForm.unit) {
this.dataForm.unit = String(this.dataForm.unit)
}
if (this.dataForm.type) {
this.dataForm.type = String(this.dataForm.type)
}
});
//
this.getList();

View File

@ -1,12 +1,13 @@
<!--
* @Author: zhp
* @Date: 2023-10-17 16:50:19
* @LastEditTime: 2023-12-01 16:48:53
* @LastEditTime: 2024-02-28 10:07:29
* @LastEditors: zhp
* @Description:
-->
<template>
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%" show-close="true">
<el-dialog class="baseDialog" :visible.sync="visible" :show-close="false" :wrapper-closable="false" width="40%"
show-close="true">
<small-title slot="title" :no-padding="true">
{{ !dataForm.id ? '新增' : '编辑' }}
</small-title>
@ -44,6 +45,12 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="包装条码" prop="packagingBarCode">
<el-input v-model="dataForm.packagingBarCode" clearable placeholder="请输入包装条码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="标签模板" prop="modelId">
<el-select v-model="dataForm.modelId" style="width: 100%;" placeholder="请选择标签模板" clearable>
@ -186,6 +193,7 @@ export default {
workOrderId: null, // (s)
customerId: '', //
content: '', // id
packagingBarCode: null
},
listQuery: {
pageSize: 10,

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2023-11-24 09:13:50
* @LastEditTime: 2024-02-28 10:38:34
* @Description:
-->
<template>
@ -55,6 +55,10 @@ const tableProps = [
{
prop: 'packagingCode',
label: '包装流水号'
},
{
prop: 'packagingBarCode',
label: '包装条码'
},
{
prop: 'workOrderName',

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-10-17 16:50:19
* @LastEditTime: 2024-01-22 09:55:32
* @LastEditTime: 2024-03-20 08:36:01
* @LastEditors: zhp
* @Description:
-->
@ -23,7 +23,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="标签类型" prop="typeId">
<el-select v-model="dataForm.typeId" style="width: 100%;" placeholder="请选择打印方式" clearable>
<el-select v-model="dataForm.typeId" style="width: 100%;" placeholder="请选择标签类型" clearable>
<el-option v-for="dict in typeList" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>

View File

@ -46,6 +46,7 @@
import BalanceChart from '../balanceChart';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import AnalysisChart from './chart.vue';
import { parseTime } from '@/utils/ruoyi'
export default {
components: {
@ -82,7 +83,7 @@ export default {
{
type: 'datePicker',
label: '时间',
dateType: 'monthrange',
dateType: 'month',
format: 'yyyy-MM',
valueFormat: 'timestamp',
rangeSeparator: '-',
@ -255,13 +256,13 @@ export default {
const date = eq.dynamicName;
eq.children.forEach((sub) => {
if (sub.dynamicName == '设备CT')
row[date + '_eq_ct'] = sub.dynamicValue;
row[date + '_eq_ct'] = sub?.dynamicValue?.toFixed(2);
if (sub.dynamicName == '设备TT')
row[date + '_eq_tt'] = sub.dynamicValue;
row[date + '_eq_tt'] = sub?.dynamicValue?.toFixed(2);
if (sub.dynamicName == '产线CT')
row[date + '_pl_ct'] = sub.dynamicValue;
row[date + '_pl_ct'] = sub.dynamicValue?.toFixed(2);
if (sub.dynamicName == '产线TT')
row[date + '_pl_tt'] = sub.dynamicValue;
row[date + '_pl_tt'] = sub.dynamicValue?.toFixed(2);
});
});
this.tableData.push(row);
@ -369,21 +370,63 @@ export default {
// this.dataListLoading = false;
});
},
changeTime(val) {
console.log(val)
if(val) {
const timeStamp = new Date(val).getMonth(); //
console.log('沃尔沃', timeStamp)
const fullyear = new Date(val).getFullYear()
let days = 0
switch (timeStamp) {
case 0:
case 2:
case 4:
case 6:
case 7:
case 9:
case 11:
days = 31
break
case 3:
case 4:
case 8:
case 10:
days = 30
break
case 1:
if ((fullyear % 400 === 0) || (fullyear % 4 === 0 && fullyear % 100 !== 0)) {
days = 29
} else {
days = 28
}
break
}
this.queryParams.startTime = new Date(fullyear, timeStamp, 1, 0, 0, 0).getTime() //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.queryParams.endTime = new Date(fullyear, timeStamp, days, 23, 59, 59).getTime() //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
} else {
this.queryParams.startTime = undefined
this.queryParams.endTime = undefined
}
},
handleSearchBarBtnClick(btn) {
switch (btn.btnName) {
case 'search':
this.queryParams.lineId = btn.lineIds || null;
this.queryParams.startTime = btn.timeArr ? btn.timeArr[0] : null;
this.queryParams.endTime = btn.timeArr ? btn.timeArr[1] : null;
console.log('2222', new Date(btn.timeArr).getFullYear())
this.changeTime(btn.timeArr)
// this.queryParams.startTime = btn.timeArr ? btn.timeArr[0] : null;
// this.queryParams.endTime = btn.timeArr ? btn.timeArr[1] : null;
if (!btn.lineIds || !btn.timeArr.length) {
if (!btn.lineIds || !btn.timeArr) {
this.$message({
message: '请选择产线和时间',
type: 'warning',
});
}
} else {
this.getList();
}
break;
}
},

View File

@ -2,7 +2,7 @@
/*
* @Date: 2020-12-29 16:49:28
* @LastEditors: DY
* @LastEditTime: 2023-09-12 11:13:34
* @LastEditTime: 2024-02-23 14:50:22
* @FilePath: \basic-admin\src\filters\basicData\index.js
* @Description:
*/
@ -62,6 +62,17 @@ export function parseTime(time, pattern) {
})
return time_str
}
export function toDay(time) {
if (time < 24) {
return time + '小时'
} else {
const day = ~~(time / 24)
const hour = time % 24
return day + '天' + hour + '小时'
}
}
export default function (dictTable) {
return function (val) {
return table?.[dictTable]?.[val]

View File

@ -111,6 +111,7 @@ export default {
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime',
defaultSelect: [],
},
{
type: 'button',
@ -132,6 +133,14 @@ export default {
},
components: {},
created() {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
this.formConfig[2].defaultSelect = [start, end];
this.listQuery.reportTime = [
moment(start).startOf('day').format('x'),
moment(end).endOf('day').format('x'),
];
getEnergyTypeListAll().then((response) => {
this.formConfig[1].selectOptions = response.data;
});

View File

@ -110,6 +110,7 @@ export default {
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'searchTime',
defaultSelect: [],
},
{
type: 'button',
@ -131,6 +132,14 @@ export default {
},
components: {},
created() {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
this.formConfig[2].defaultSelect = [start, end];
this.listQuery.times = [
moment(start).startOf('day').format('x'),
moment(end).endOf('day').format('x'),
];
getHotMaterialList().then((response) => {
this.formConfig[1].selectOptions = response.data;
});

View File

@ -1,8 +1,5 @@
<template>
<div
id="analysischartLine"
style="width: 100%;height: 100%;"
></div>
<div id="analysischartLine" style="width: 100%;height: 100%;"></div>
</template>
<script>
import * as echarts from 'echarts'
@ -60,7 +57,6 @@ export default {
let obj = {
name: '',
type: 'line',
stack: 'Total',
data: []
}
obj.name = keys[k]

View File

@ -4,38 +4,23 @@
<el-col :span='12'>
<el-form-item label="能源类型" prop="energyTypeId">
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" filterable>
<el-option
v-for="item in this.energyTypeList"
:key="item.id"
:label="item.name"
:value="item.id">
<el-option v-for="item in this.energyTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="抄表日期" prop="recordTime">
<el-date-picker
v-model="form.recordTime"
type="date"
format="yyyy-MM-dd"
value-format="timestamp"
placeholder="选择日期"
style="width: 100%;">
<el-date-picker v-model="form.recordTime" type="date" format="yyyy-MM-dd" value-format="timestamp"
placeholder="选择日期" style="width: 100%;">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span='24'>
<base-table
border
:table-props="tableProps"
:table-data="tableData"
:add-button-show="addButtonShow"
@emitFun="inputChange"
@emitButtonClick="emitButtonClick"
/>
<base-table border :table-props="tableProps" :table-data="tableData" :add-button-show="addButtonShow"
@emitFun="inputChange" @emitButtonClick="emitButtonClick" />
</el-col>
</el-row>
</el-form>
@ -48,12 +33,12 @@ import SelectArea from './SelectArea'
const tableProps = [
{
prop: 'tableName',
label: '表名',
label: '表名*',
subcomponent: SelectArea
},
{
prop: 'readingQuantity',
label: '抄表数',
label: '抄表数*',
subcomponent: InputArea
}
]

View File

@ -2,44 +2,20 @@
<div class="app-container">
<!-- 搜索工作栏 -->
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick"
/>
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<!-- 列表 -->
<base-table
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-props="tableProps"
:table-data="list"
:max-height="tableH"
@selection-change="selectChange"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
:max-height="tableH" @selection-change="selectChange">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
:total="total"
@pagination="getList"
/>
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
@pagination="getList" />
<!-- 新增 -->
<base-dialog
:dialogTitle="addOrEditTitle"
:dialogVisible="centervisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
>
<energy-quantity-manual-add ref="energyQuantityManualAdd" :energyTypeList="energyTypeList" @successSubmit="successSubmit" />
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<energy-quantity-manual-add ref="energyQuantityManualAdd" :energyTypeList="energyTypeList"
@successSubmit="successSubmit" />
</base-dialog>
</div>
</template>
@ -68,7 +44,7 @@ const tableProps = [
},
{
prop: 'tableName',
label: '水/气表名',
label: '能源表名',
filter: publicFormatter('table_name'),
minWidth: 110
},
@ -209,7 +185,7 @@ export default {
break
default:
this.$modal.confirm('是否确认导出').then(() => {
return energyQuantityManualExport({...this.queryParams});
return energyQuantityManualExport({ energyTypeId: this.queryParams.energyTypeId, recordTime: this.queryParams.recordTime });
}).then(response => {
this.$download.excel(response, '能源报表.xls');
}).catch(() => { })

View File

@ -2,27 +2,12 @@
<div class="app-container">
<!-- 搜索工作栏 -->
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick"
/>
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<!-- 列表 -->
<base-table
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-props="tableProps"
:table-data="list"
:selectWidth="55"
:max-height="tableH"
@selection-change="selectChange"
/>
<pagination
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
:total="total"
@pagination="getList"
/>
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
:selectWidth="55" :max-height="tableH" @selection-change="selectChange" />
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
@pagination="getList" />
</div>
</template>
@ -71,7 +56,8 @@ export default {
type: 'select',
label: '能源类型',
selectOptions: [],
param: 'energyTypeId'
param: 'energyTypeId',
filterable: true
},
{
type: 'datePicker',
@ -193,7 +179,7 @@ export default {
if (this.exportList.length > 0) {
let body = this.exportList.map((x) => [
x.objName,
x.objRemark,
x.objCode,
x.energyTypeName,
x.startValue,
x.endValue,

View File

@ -16,10 +16,7 @@
<el-col :span="12">
<el-form-item label="单位" prop="unit">
<el-select v-model="form.unit" placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in getDictDatas(DICT_TYPE.ENERGY_UNIT)"
:key="item.value"
:label="item.label"
<el-option v-for="item in getDictDatas(DICT_TYPE.ENERGY_UNIT)" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
@ -38,7 +35,8 @@
<el-row>
<el-col :span="12" v-show="form.pricingMethod === 2">
<el-form-item label="单价(元)" prop="pricingMethod">
<el-input-number v-model="form.singlePrice" :precision="2" :min="0" :max="999999999" style="width: 100%;"></el-input-number>
<el-input-number v-model="form.singlePrice" :precision="2" :min="0" :max="999999999"
style="width: 100%;"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12" v-show="form.pricingMethod === 1">
@ -51,43 +49,19 @@
</el-col>
<el-col :span="24" v-show="form.pricingMethod === 0">
<el-form-item label="时间段" prop="pricingMethod">
<base-table
:key='timeKye'
:table-props="tableProps1"
:table-data="tableData1"
:add-button-show="addButtonShow"
@emitButtonClick="emitButtonClick1"
@emitFun="inputChange1"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="80"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick1"
/>
<base-table :key='timeKye' :table-props="tableProps1" :table-data="tableData1"
:add-button-show="addButtonShow" @emitButtonClick="emitButtonClick1" @emitFun="inputChange1">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
@clickBtn="handleClick1" />
</base-table>
</el-form-item>
</el-col>
<el-col :span="24" v-show="form.pricingMethod === 1">
<el-form-item label="使用量" prop="pricingMethod">
<base-table
:key='usedKye'
:table-props="tableProps2"
:table-data="tableData2"
:add-button-show="addButtonShow"
@emitButtonClick="emitButtonClick2"
@emitFun="inputChange2"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="80"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick2"
/>
<base-table :key='usedKye' :table-props="tableProps2" :table-data="tableData2"
:add-button-show="addButtonShow" @emitButtonClick="emitButtonClick2" @emitFun="inputChange2">
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
@clickBtn="handleClick2" />
</base-table>
</el-form-item>
</el-col>
@ -152,10 +126,12 @@ export default {
id: '',
name: '',
code: '',
nuit: '',
unit: '',
singlePrice: 0,
pricingMethod: 2,
leaderName: '',
push: false
dim: '',
push: false,
description: ''
},
isEdit: false, //
rules: {
@ -186,18 +162,20 @@ export default {
if (res.code === 0) {
this.form.name = res.data.name
this.form.code = res.data.code
this.form.nuit = res.data.nuit
this.form.unit = res.data.unit
this.form.pricingMethod = res.data.pricingMethod
this.form.leaderName = res.data.leaderName
this.form.push = res.data.push ? true : false
this.form.description = res.data.description
switch (this.form.pricingMethod) {
case 0:
this.tableData1 = this.form.segPriceList || []
this.tableData1 = res.data.segPriceList || []
break;
case 1:
this.tableData2 = this.form.usedPriceList || []
this.tableData2 = res.data.usedPriceList || []
this.form.dim = res.data.dim
break;
default:
this.form.singlePrice = res.data.singlePrice || 0
}
}
})
@ -233,10 +211,6 @@ export default {
//
emitButtonClick1() {
let n = this.tableData1.length
// if (n >=3) {
// this.$modal.msgWarning('3')
// return false
// }
let obj = {}
obj.startTime = n === 0 ? '' : this.tableData1[n - 1].endTime
obj.endTime = ''
@ -245,10 +219,6 @@ export default {
},
emitButtonClick2() {
let n = this.tableData2.length
if (n >=3) {
this.$modal.msgWarning('最多可添加3档计价')
return false
}
let obj = {}
obj.startUsed = n === 0 ? 0 : this.tableData2[n - 1].endUsed
obj.endUsed = 0

View File

@ -2,40 +2,22 @@
<div class="app-container energyOverlimitLog">
<!-- 搜索工作栏 -->
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick"
/>
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<el-tabs v-model="activeName" @tab-click="toggleTab">
<el-tab-pane label="自动抄表" name="auto"></el-tab-pane>
<el-tab-pane label="手动抄表" name="manual"></el-tab-pane>
</el-tabs>
<!-- 列表 -->
<div v-if="activeName === 'auto'">
<base-table
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-props="tableProps"
:table-data="list"
:max-height="tableH"
/>
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
:max-height="tableH" />
</div>
<div v-if="activeName === 'manual'">
<base-table
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-props="tableProps2"
:table-data="list2"
:max-height="tableH"
/>
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps2"
:table-data="list2" :max-height="tableH" />
</div>
<pagination
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
:total="total"
@pagination="getList"
/>
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
@pagination="getList" />
</div>
</template>
@ -199,7 +181,13 @@ export default {
item.limitValue = ''
}
})
if (this.queryParams.method === '1') {
this.list = arr
this.list2 = []
} else {
this.list2 = arr
this.list1 = []
}
this.total = response.data.total;
});
},
@ -232,21 +220,27 @@ export default {
height: 2px;
background-color: #e4e7ed;
}
.el-tabs__nav-wrap::after {
width: 0;
}
.el-tabs__item {
padding: 0 10px;
}
.el-tabs__item:hover {
color: rgba(0, 0, 0, 0.85);
}
.el-tabs__item.is-active {
color: rgba(0, 0, 0, 0.85);
}
.el-tabs__item {
color: rgba(0, 0, 0, 0.45);
}
.searchBarBox {
margin-bottom: 0;
}

View File

@ -35,20 +35,20 @@ import {
} from '@/api/equipment/analysis/statistics';
const tableProps = [
{
prop: 'recordTime',
label: '时间段',
filter: (val) => {
if (val && val.length > 0) {
return (
moment(val[0]).format('YYYY-MM-DD HH:mm:ss') +
' ~ ' +
moment(val[1]).format('YYYY-MM-DD HH:mm:ss')
);
}
return '-';
},
},
// {
// prop: 'recordTime',
// label: '',
// filter: (val) => {
// if (val && val.length > 0) {
// return (
// moment(val[0]).format('YYYY-MM-DD HH:mm:ss') +
// ' ~ ' +
// moment(val[1]).format('YYYY-MM-DD HH:mm:ss')
// );
// }
// return '-';
// },
// },
{
prop: 'lineName',
label: '产线',
@ -158,7 +158,7 @@ export default {
: '',
btnName: '导出',
name: 'export',
color: 'warning',
color: 'primary',
plain: true,
},
],

View File

@ -19,6 +19,7 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
max-height="600"
@emitFun="handleEmitFun">
<!-- <method-btn
v-if="tableBtn.length"
@ -93,17 +94,29 @@ export default {
{ prop: 'downCount', label: '故障次数' },
],
searchBarFormConfig: [
// {
// type: 'select',
// label: '',
// placeholder: '',
// param: 'month',
// selectOptions: Array(12)
// .fill(0)
// .map((v, i) => ({
// id: i + 1,
// name: `${i + 1}`,
// })),
// },
{
type: 'select',
label: '请选择月份',
placeholder: '请选择月份',
type: 'datePicker',
label: '时间',
dateType: 'month',
format: 'yyyy-MM',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
width: 240,
param: 'month',
selectOptions: Array(12)
.fill(0)
.map((v, i) => ({
id: i + 1,
name: `${i + 1}`,
})),
},
{
__index: 'line',
@ -111,6 +124,7 @@ export default {
label: '产线',
placeholder: '请选择产线',
param: 'lineId',
filterable: true
},
{
type: 'button',
@ -164,7 +178,13 @@ export default {
},
});
if (code === 0) {
this.list = data;
this.list = data.map(item => {
item.mtbf = item.mtbf?.toFixed(2)
item.mttr = item.mttr?.toFixed(2)
item.workTime = item.workTime?.toFixed(2)
item.downTime = item.downTime?.toFixed(2)
return item
});
} else {
this.list.splice(0);
}
@ -174,12 +194,14 @@ export default {
switch (btn.btnName) {
case 'search':
if (btn.month) {
this.queryParams.recordTime = [
moment()
.month(btn.month - 1)
.format('YYYY-MM') + '-01 00:00:00',
moment().month(btn.month).format('YYYY-MM') + '-01 00:00:00',
];
// this.queryParams.recordTime = [
// moment()
// .month(btn.month - 1)
// .format('YYYY-MM') + '-01 00:00:00',
// moment().month(btn.month).format('YYYY-MM') + '-01 00:00:00',
// ];
this.queryParams.recordTime = [btn.month, moment().month(new Date(btn.month).getMonth() + 1).format('YYYY-MM') + '-01 00:00:00']
console.log(btn.month, moment().month(new Date(btn.month).getMonth() + 1).format('YYYY-MM') + '-01 00:00:00')
} else {
this.queryParams.recordTime = null;
}

View File

@ -38,7 +38,7 @@
import SmallTitle from './SmallTitle';
import { getworkerAll } from '@/api/base/materialUseLog';
import Editor from '@/components/Editor';
import DialogForm from '@/components/DialogForm';
import DialogForm from './DialogForm';
export default {
name: 'AlarmHandle',

View File

@ -0,0 +1,520 @@
<!--
filename: dialogForm.vue
author: liubin
date: 2023-08-15 10:32:36
description: 弹窗的表单组件
-->
<template>
<el-form
ref="form"
:model="form"
:label-width="`${labelWidth}px`"
:size="size"
:label-position="labelPosition"
v-loading="formLoading">
<el-row :gutter="20" v-for="(row, rindex) in rows" :key="rindex">
<el-col v-for="col in row" :key="col.label" :span="24 / row.length">
<el-form-item :label="col.label" :prop="col.prop" :rules="col.rules">
<el-input
v-if="col.input"
v-model="form[col.prop]"
@change="$emit('update', form)"
:placeholder="`请输入${col.label}`"
:disabled="disabled"
v-bind="col.bind" />
<el-input
v-if="col.textarea"
type="textarea"
v-model="form[col.prop]"
:disabled="disabled"
@change="$emit('update', form)"
:placeholder="`请输入${col.label}`"
v-bind="col.bind" />
<el-select
v-if="col.select"
v-model="form[col.prop]"
:placeholder="`请选择${col.label}`"
:disabled="disabled"
@change="$emit('update', form)"
v-bind="col.bind">
<el-option
v-for="opt in optionListOf[col.prop]"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
<el-date-picker
v-if="col.datetime"
v-model="form[col.prop]"
type="datetime"
:disabled="disabled"
:placeholder="`请选择${col.label}`"
value-format="timestamp"
@change="$emit('update', form)"
v-bind="col.bind"></el-date-picker>
<el-switch
v-if="col.switch"
v-model="form[col.prop]"
:disabled="disabled"
active-color="#0b58ff"
inactive-color="#e1e1e1"
@change="$emit('update', form)"
v-bind="col.bind"></el-switch>
<component
v-if="col.subcomponent"
:key="col.key"
:disabled="disabled"
:read-only="disabled"
:is="col.subcomponent"
v-model="form[col.prop]"
:inlineStyle="col.style"
@on-change="$emit('update', form)"
v-bind="col.bind"></component>
<div
class="upload-area"
:class="uploadOpen ? '' : 'height-48'"
ref="uploadArea"
:key="col.prop"
v-if="col.upload">
<span class="close-icon" :class="uploadOpen ? 'open' : ''">
<el-button
type="text"
icon="el-icon-arrow-right"
@click="handleFilesOpen" />
</span>
<!-- :file-list="uploadedFileList" -->
<el-upload
v-if="col.upload"
class="upload-in-dialog"
:key="col.prop + '__el-upload'"
:action="uploadUrl"
:headers="uploadHeaders"
:show-file-list="false"
icon="el-icon-upload2"
:disabled="disabled"
:before-upload="beforeUpload"
:on-success="
(response, file, fileList) => {
handleUploadSuccess(response, file, col.prop);
}
"
v-bind="col.bind">
<el-button
size="mini"
:disabled="disabled || col.bind?.disabled || false">
<svg-icon
icon-class="icon-upload"
style="color: inherit"></svg-icon>
上传文件
</el-button>
<div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
{{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }}
</div>
</el-upload>
<uploadedFile
class="file"
v-for="file in form[col.prop]"
:file="file"
:key="file.fileUrl"
:disabled="disabled"
@delete="!disabled && handleDeleteFile(file, col.prop)" />
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import { getAccessToken } from '@/utils/auth';
import tupleImg from '@/assets/images/tuple.png';
import cache from '@/utils/cache';
/**
* 找到最长的label
* @param {*} options
*/
function findMaxLabelWidth(rows) {
let max = 0;
rows.forEach((row) => {
row.forEach((opt) => {
// debugger;
if (!opt.label) return 0;
if (opt.label.length > max) {
max = opt.label.length;
if (opt.label.includes('(')) {
max = max - 3;
}
}
});
});
return max;
}
const uploadedFile = {
name: 'UploadedFile',
props: ['file', 'disabled'],
data() {
return {};
},
methods: {
handleDelete() {
this.$emit('delete', this.file);
},
async handleDownload() {
const data = await this.$axios({
url: this.file.fileUrl,
method: 'get',
responseType: 'blob',
});
await this.$message.success('开始下载');
// create download link
const url = window.URL.createObjectURL(data);
const link = document.createElement('a');
link.href = url;
link.download = this.file.fileName;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
},
},
mounted() {},
render: function (h) {
return (
<div
title={this.file.fileName}
onClick={this.handleDownload}
style={{
background: `url(${tupleImg}) no-repeat`,
backgroundSize: '14px',
backgroundPosition: '0 55%',
paddingLeft: '20px',
paddingRight: '24px',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
overflow: 'hidden',
cursor: 'pointer',
display: 'inline-block',
}}>
{this.file.fileName}
{!this.disabled && (
<el-button
type="text"
icon="el-icon-close"
style="float: right; position: relative; top: 2px; left: 8px; z-index: 100"
class="dialog__upload_component__close"
onClick={this.handleDelete}
/>
)}
</div>
);
},
};
export default {
name: 'DialogForm',
model: {
prop: 'dataForm',
event: 'update',
},
emits: ['update'],
components: { uploadedFile },
props: {
rows: {
type: Array,
default: () => [],
},
dataForm: {
type: Object,
default: () => ({}),
},
disabled: {
type: Boolean,
default: false,
},
hasFiles: {
type: Boolean | Array,
default: false,
},
labelPosition: {
type: String,
default: 'right',
},
size: {
type: String,
default: '',
},
},
data() {
return {
uploadOpen: false,
form: {},
formLoading: true,
optionListOf: {},
uploadedFileList: [],
dataLoaded: false,
uploadHeaders: { Authorization: 'Bearer ' + getAccessToken() },
uploadUrl: process.env.VUE_APP_BASE_API + '/admin-api/infra/file/upload', // headersurl
};
},
computed: {
labelWidth() {
let max = findMaxLabelWidth(this.rows);
// 20px
return max * 20;
// return max * 20 + 'px';
},
},
watch: {
rows: {
handler() {
this.$nextTick(() => {
this.handleOptions('watch');
});
},
deep: true,
immediate: false,
},
dataForm: {
handler(val) {
this.form = JSON.parse(JSON.stringify(val));
if (this.hasFiles) {
if (typeof this.hasFiles == 'boolean' && this.hasFiles) {
this.form.files = this.form.files ?? [];
} else if (Array.isArray(this.hasFiles)) {
this.hasFiles.forEach((prop) => {
this.form[prop] = this.form[prop] ?? [];
});
}
}
},
deep: true,
immediate: true,
},
},
mounted() {
// options
this.handleOptions();
},
methods: {
/** 模拟透传 ref */
validate(cb) {
return this.$refs.form.validate(cb);
},
resetFields(args) {
return this.$refs.form.resetFields(args);
},
// getCode
async getCode(url) {
const response = await this.$axios(url);
return response.data;
},
async handleOptions(trigger = 'monuted') {
console.log('[dialogForm:handleOptions]');
const promiseList = [];
this.rows.forEach((cols) => {
cols.forEach((opt) => {
if (opt.value && !this.form[opt.prop]) {
//
this.form[opt.prop] = opt.value;
}
if (opt.options) {
this.$set(this.optionListOf, opt.prop, opt.options);
} else if (opt.url) {
// dependswatcher
if (opt.depends) {
this.$watch(
() => this.form[opt.depends],
(id) => {
console.log('<', opt.depends, '>', 'changed', id);
if (id == null) return;
//
this.form[opt.prop] = null;
//
this.$axios({
url: `${opt.url}?id=${id}`,
}).then((res) => {
this.$set(
this.optionListOf,
opt.prop,
res.data.map((item) => ({
label: item[opt.labelKey ?? 'name'],
value: item[opt.valueKey ?? 'id'],
}))
);
});
},
{
immediate: false,
}
);
return;
}
//
if (opt.select || (opt.input && !this.form?.id)) {
promiseList.push(async () => {
const response = await this.$axios(opt.url, {
method: opt.method ?? 'get',
// data: opt.method == 'post' ? opt.queryParams : null
});
// console.log('[dialogForm:handleOptions:response]', response);
if (opt.select) {
//
const list =
'list' in response.data
? response.data.list
: response.data;
if (opt.cache) {
cache.store(opt.cache, list);
}
this.$set(
this.optionListOf,
opt.prop,
list.map((item) => ({
label: item[opt.labelKey ?? 'name'],
value: item[opt.valueKey ?? 'id'],
}))
);
} else if (opt.input) {
console.log('setting code: ', response.data);
//
this.form[opt.prop] = response.data;
// dataFormcodebug
this.$emit('update', this.form);
}
});
}
}
});
});
console.log('[dialogForm:handleOptions] done!');
// watch
if (trigger == 'watch') {
this.formLoading = false;
return;
}
try {
await Promise.all(promiseList.map((fn) => fn()));
this.formLoading = false;
this.dataLoaded = true;
// console.log("[dialogForm:handleOptions:optionListOf]", this.optionListOf)
} catch (error) {
console.log('[dialogForm:handleOptions:error]', error);
this.formLoading = false;
}
if (!promiseList.length) this.formLoading = false;
},
//
beforeUpload(file) {
const checkFileSize = () => {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$modal.msgError('上传文件大小不能超过 2MB!');
}
return isLt2M;
};
const checkFileType = () => {
const isJPG =
file.type === 'image/jpeg' ||
file.type === 'image/png' ||
file.type === 'image/jpg';
return isJPG;
};
// return checkFileSize() && checkFileType();
return checkFileSize();
},
// bind
handleUploadSuccess(response, file, prop) {
console.log('[handleUploadSuccess]', response, file, prop);
this.form[prop].push({
fileName: file.name,
fileUrl: response.data,
fileType: prop == 'files' ? 2 : 1,
});
this.$modal.msgSuccess('上传成功');
this.$emit('update', this.form);
},
getFileName(fileUrl) {
return fileUrl.split('/').pop();
},
handleFilesOpen() {
this.uploadOpen = !this.uploadOpen;
},
handleDeleteFile(file, prop) {
this.form[prop] = this.form[prop].filter(
(item) => item.fileUrl != file.fileUrl
);
this.$emit('update', this.form);
},
},
};
</script>
<style scoped lang="scss">
.el-date-editor,
.el-select {
width: 100%;
}
.upload-area {
// background: #ccc;
// display: grid;
// grid-auto-rows: 34px;
// grid-template-columns: repeat(6, minmax(32px, max-content));
// gap: 8px;
// align-items: center;
position: relative;
overflow: hidden;
transition: height 0.3s ease-out;
}
.upload-in-dialog {
// display: inline-block;
margin-right: 24px;
// background: #ccc;
position: relative;
// top: -13px;
float: left;
}
.close-icon {
// background: #ccc;
position: absolute;
top: 0;
right: 12px;
z-index: 100;
transition: transform 0.3s ease-out;
}
.close-icon.open {
transform: rotateZ(90deg);
}
</style>
<style>
.dialog__upload_component__close {
color: #ccc;
}
.dialog__upload_component__close:hover {
/* color: #777; */
color: red;
}
.height-48 {
height: 35px !important;
}
</style>

View File

@ -28,7 +28,7 @@
<el-form-item
label="报警级别"
prop="grade"
:rules="[{ required: true, message: '报警级别不能为空', trigger: 'blur' }]">
:rules="[{ required: false, message: '报警级别不能为空', trigger: 'blur' }]">
<el-select
:disabled="disabled"
v-model="dataForm.grade"

View File

@ -7,10 +7,11 @@
<template>
<el-drawer
:visible="visible"
:visible.sync="visible"
:show-close="false"
:wrapper-closable="false"
:wrapper-closable="true"
class="drawer"
:before-close="beforeClose"
custom-class="mes-drawer"
:size="size || '50%'"
@closed="$emit('destroy')">
@ -43,7 +44,51 @@
:rows="formRows" /> -->
<!-- <el-row v-if="mode.includes('detail')" style="margin-bottom: 24px"> -->
<el-row style="margin-bottom: 24px">
<el-form
ref="form"
:model="dataForm"
label-width="100px"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="设备"
prop="equipmentId"
:rules="[{ required: true, message: '设备不能为空', trigger: 'change' }]">
<el-select
:disabled="isdetail"
v-model="dataForm.equipmentId"
placeholder="请选择设备"
@change="$emit('update', dataForm)">
<el-option
v-for="opt in equipmentList"
:key="opt.id"
:label="opt.name"
:value="opt.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="报警分组"
prop="groupId"
:rules="[{ required: true, message: '报警分组不能为空', trigger: 'change' }]">
<el-select
:disabled="isdetail"
v-model="dataForm.groupId"
placeholder="请选择报警分组"
@change="$emit('update', dataForm)">
<el-option
v-for="opt in grouList"
:key="opt.id"
:label="opt.name"
:value="opt.id" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- <el-row style="margin-bottom: 24px">
<el-col :span="8">
<div
class="title"
@ -62,7 +107,7 @@
{{ form.code }}
</div>
</el-col>
</el-row>
</el-row> -->
<!-- <el-row v-else style="margin-bottom: 24px" :gutter="20">
<el-form ref="form" :model="form">
<el-col :span="8">
@ -128,12 +173,11 @@
</section>
</div>
<div class="drawer-body__footer">
<div v-if="!mode.includes('detail')" class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button>
<el-button
type="primary"
v-if="!mode.includes('detail')"
@click="handleCancel">
@click="handleSave">
确定
</el-button>
</div>
@ -163,6 +207,8 @@
<script>
import BaseInfoForm from '@/components/DialogForm';
import DialogForm from './dialogForm';
import { getEquipmentList, getgroupAllList } from '@/api/equipment/base/config/config'
import { updateEquipmentBindGroup } from '@/api/base/equipmentBindGroup';
const SmallTitle = {
name: 'SmallTitle',
@ -191,16 +237,21 @@ const SmallTitle = {
export default {
components: { SmallTitle, DialogForm, BaseInfoForm },
props: ['sections', 'defaultMode', 'dataId', 'size'], // dataId id
props: ['sections', 'defaultMode', 'dataId', 'size', 'equipmentId', 'id'], // dataId id
data() {
return {
mode: '',
visible: false,
showForm: false,
isdetail: false,
formLoading: false,
grouList: [],
equipmentList: [],
total: 0,
form: {},
list: [],
attrTitle: '',
dataForm: {},
attrForm: {
id: null,
equipmentGroupId: '',
@ -325,6 +376,34 @@ export default {
}
},
methods: {
// handleSave() {
// updateEquipmentBindGroup(this.form).then((response) => {
// this.$modal.msgSuccess('');
// this.open = false;
// this.getList();
// });
// },
async getDict() {
const res = await getEquipmentList({
pageNo: 1,
pageSize: 100,
special: false
})
this.equipmentList = res.data.list
const groupRes = await getgroupAllList()
this.grouList = groupRes.data
},
beforeClose(done) {
if (this.mode.includes('edit')) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
} else {
done()
}
},
handleTableBtnClick({ type, data }) {
switch (type) {
case 'edit':
@ -342,6 +421,16 @@ export default {
init() {
this.visible = true;
//
// this.dataForm = {
// equipmentId: this.equipmentId,
// groupId: this.dataId
// }
this.getDict()
this.$set(this.dataForm, 'equipmentId', this.equipmentId)
this.$set(this.dataForm, 'groupId', this.dataId)
this.$set(this.dataForm, 'id', this.id)
this.isdetail = this.mode === 'detail' ? true : false
},
async getAttrList() {
@ -360,9 +449,9 @@ export default {
if (valid) {
const isEdit = !this.mode.includes('detail');
await this.$axios({
url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
url: '/base/equipment-bind-group/update',
method: isEdit ? 'put' : 'post',
data: this.form,
data: this.dataForm,
});
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
this.visible = false;

View File

@ -48,6 +48,8 @@
size="45%"
:default-mode="editMode"
:data-id="alarmForm.id"
:equipment-id="equipmentId"
:id="id"
:sections="[
{
name: '基本信息',
@ -220,7 +222,7 @@ export default {
{
select: true,
label: '设备',
url: '/base/core-equipment/page?pageNo=1&pageSize=100',
url: '/base/core-equipment/page?pageNo=1&pageSize=100&special=false',
prop: 'equipmentId',
bind: {
filterable: true,
@ -266,6 +268,8 @@ export default {
equipmentGroupCode: undefined,
equipmentGroupName: undefined,
},
equipmentId: undefined,
id: undefined,
editVisible: false,
editMode: '',
drawerBaseInfoRows: [
@ -440,6 +444,8 @@ export default {
this.alarmForm.id = groupId;
this.alarmForm.equipmentGroupCode = groupCode;
this.alarmForm.equipmentGroupName = groupName;
this.equipmentId = equipmentId;
this.id = id;
this.editVisible = true;
this.$nextTick(() => {
this.$refs['drawer'].init();

View File

@ -41,11 +41,14 @@
<base-dialog
:dialogTitle="title"
:dialogVisible="open"
width="700px"
width="30%"
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
<!-- <DialogForm v-if="open" ref="form" v-model="form" :rows="rows" /> -->
<add-or-update
ref="addOrUpdate"
@refreshDataList="successSubmit" />
</base-dialog>
<!-- 抽屉 详情 -->
@ -123,11 +126,12 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
// import './http';
import BasicDrawer from './components/BasicDrawer.vue';
import { publicFormatter } from '@/utils/dict';
import AddOrUpdate from './add-or-updata';
export default {
name: 'EquipmentPlcConnect',
mixins: [basicPageMixin],
components: { BasicDrawer },
components: { BasicDrawer, AddOrUpdate },
data() {
return {
searchBarKeys: ['equipmentId', 'plcId'],
@ -343,6 +347,10 @@ export default {
this.initSearchOptions();
},
methods: {
successSubmit() {
this.cancel()
this.getList()
},
async getEquipmentOptions() {
const res = await this.$axios({
url: '/base/core-equipment/listAll',
@ -371,7 +379,7 @@ export default {
});
this.searchBarFormConfig[1].selectOptions = plcList.map((item) => {
return {
name: item.name,
name: item.code,
id: item.id,
};
});
@ -455,7 +463,10 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = '添加设备与实时采集关系表(一对多)';
this.title = '添加设备采集配置';
this.$nextTick(() => {
this.$refs.addOrUpdate.init()
})
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -464,31 +475,12 @@ export default {
getEquipmentPlcConnect(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = '修改设备与实时采集关系表(一对多)';
this.title = '修改设备采集配置';
});
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentPlcConnect(this.form).then((response) => {
this.$modal.msgSuccess('修改成功');
this.open = false;
this.getList();
});
return;
}
//
createEquipmentPlcConnect(this.form).then((response) => {
this.$modal.msgSuccess('新增成功');
this.open = false;
this.getList();
});
});
this.$refs.addOrUpdate.dataFormSubmit()
},
//

View File

@ -294,7 +294,7 @@ export default {
name: undefined,
enName: undefined,
description: undefined,
collection: undefined,
collection: 1,
};
this.resetForm('form');
},

View File

@ -0,0 +1,155 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-03-15 18:54:23
* @Description:
-->
<template>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="100px">
<el-form-item label="设备" prop="equipmentId">
<el-cascader
placeholder="请选择设备"
v-model="dataForm.equipmentId"
:options="plLineList"
:props="{value: 'id', label: 'name', children: 'children'}"
style="width: 100%"
filterable />
</el-form-item>
<el-form-item label="关联表名" prop="plcId">
<el-select
v-model="dataForm.plcId"
filterable
placeholder="请选择关联表"
style="width: 100%">
<el-option
v-for="dict in plcList"
:key="dict.id"
:label="dict.plcTableName"
:value="dict.id" />
</el-select>
</el-form-item>
</el-form>
</template>
<script>
import basicAdd from '../../../../core/mixins/basic-add';
import { createCorePL, updateCorePL, getCorePL, getCode } from "@/api/base/coreProductionLine";
import { createEquipmentPlcConnect, updateEquipmentPlcConnect } from '@/api/base/equipmentPlcConnect';
import { getplcAllList, getTree } from "@/api/equipment/base/config/config";
export default {
mixins: [basicAdd],
data() {
return {
urlOptions: {
isGetCode: true,
codeURL: getCode,
createURL: createCorePL,
updateURL: updateCorePL,
infoURL: getCorePL,
},
dataForm: {
id: undefined,
equipmentId: undefined,
plcId: undefined
},
plcList: [],
plLineList: [],
dataRule: {
equipmentId: [{ required: true, message: "设备不能为空", trigger: "blur" }],
plcId: [{ required: true, message: "关联表名不能为空", trigger: "blur" }]
},
options: [{
value: 'zhinan',
label: '指南',
children: [{
value: 'shejiyuanze',
label: '设计原则',
children: [{
value: 'yizhi',
label: '一致'
}, {
value: 'fankui',
label: '反馈'
}, {
value: 'xiaolv',
label: '效率'
}, {
value: 'kekong',
label: '可控'
}]
}, {
value: 'daohang',
label: '导航'
}]
}]
};
},
created() {
this.getDict()
},
methods: {
init() {
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
})
},
async getDict() {
//
const res = await getplcAllList();
this.plcList = res.data;
//
const res1 = await getTree();
this.plLineList = res1.data;
// const res1 = await getCorePLList();
// this.plLineList = res1.data;
// this.plLineList.forEach(item => {
// listByParentId({ id: item.id }).then(resp => {
// if (resp.data.length > 0) {
// // item.children = resp.data
// this.$set(item, 'children', resp.data)
// // this.$forceUpdate()
// }
// })
// })
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
//
if (this.dataForm.id) {
updateEquipmentPlcConnect({
id: this.dataForm.id,
equipmentId: this.dataForm.equipmentId[this.dataForm.equipmentId.length],
plcId: this.dataForm.plcId
}).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
//
createEquipmentPlcConnect({
id: this.dataForm.id,
equipmentId: this.dataForm.equipmentId[this.dataForm.equipmentId.length - 1],
plcId: this.dataForm.plcId
}).then(response => {
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$emit("refreshDataList");
});
});
}
}
};
</script>

View File

@ -99,7 +99,7 @@
<el-option
v-for="plc in plcList"
:key="plc.id"
:label="plc.name"
:label="plc.plcTableName"
:value="plc.id"></el-option>
</el-select>
</el-form-item>
@ -404,9 +404,9 @@ export default {
this.eqList = data;
});
this.$axios({
url: '/base/equipment-plc/page',
url: '/base/equipment-plc/listAll',
}).then(({ code, data }) => {
this.plcList = data.list;
this.plcList = data;
});
}
for (const section of this.sections) {

View File

@ -0,0 +1,65 @@
<!--
* @Author: zwq
* @Date: 2023-08-01 15:27:31
* @LastEditors: zwq
* @LastEditTime: 2023-08-01 16:25:54
* @Description:
-->
<template>
<div :class="[className, { 'p-0': noPadding }]">
<slot />
</div>
</template>
<script>
export default {
props: {
size: {
// : xl lg md sm
type: String,
default: 'de',
validator: function (val) {
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
},
},
noPadding: {
type: Boolean,
default: false,
},
},
computed: {
className: function () {
return `${this.size}-title`;
},
},
};
</script>
<style lang="scss" scoped>
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
$mgr: 8px;
@each $size, $height in $pxls {
.#{$size}-title {
font-size: 18px;
line-height: $height;
color: #000;
font-weight: 500;
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
&::before {
content: '';
display: inline-block;
vertical-align: top;
width: 4px;
height: $height + 2px;
border-radius: 1px;
margin-right: $mgr;
background-color: #0b58ff;
}
}
}
.p-0 {
padding: 0;
}
</style>

View File

@ -0,0 +1,251 @@
<!--
filename: WaitingListTable.vue
author: liubin
date: 2024-02-05 16:12:55
description:
-->
<template>
<el-table
:data="tableDataWithIndex"
:border="true"
@selection-change="handleSelectionChange"
style="width: 100%"
:header-cell-style="{
background: '#f2f4f9',
color: '#606266',
}"
class="waiting-list-table">
<el-table-column
type="selection"
:width="50"
:selectable="checkSelectable" />
<el-table-column prop="_pageIndex" width="80" align="center">
<template slot="header">
<el-popover placement="bottom-start" width="300" trigger="click">
<div class="setting-box" style="max-height: 400px; overflow-y: auto">
<el-checkbox
v-for="(item, index) in tablePropsLabelList"
:key="'cb' + index"
v-model="selectedBox[index]"
:label="item.label" />
</div>
<i slot="reference" class="el-icon-s-tools" />
</el-popover>
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[0]"
label="巡检单名称"
prop="name"></el-table-column>
<el-table-column v-if="selectedBox[1]" label="部门" prop="planName">
<template slot-scope="scope">
{{ scope.row.department || '---' }}
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[2]"
label="巡检时间"
prop="planCheckTime">
<template slot-scope="scope">
{{ scope.row.planCheckTime | timeFilter }}
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[3]"
label="班次"
prop="groupClass">
<template slot-scope="scope">
{{ scope.row.groupClass || '---' }}
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[4]"
label="确认截止时间"
prop="confirmDueTime">
<template slot-scope="scope">
{{ scope.row.confirmDueTime | timeFilter }}
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[5]"
width="150"
label="备注"
prop="remark">
<template slot-scope="scope">
{{ scope.row.remark }}
</template>
</el-table-column>
<!-- <el-table-column v-if="selectedBox[10]" width="60" label="详情">
<template slot-scope="scope">
<el-button type="text" @click="handelDetail(scope.row)">详情</el-button>
</template>
</el-table-column> -->
<!-- btns -->
<el-table-column width="188" label="操作">
<template slot-scope="scope">
<el-tooltip content="确认" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
:disabled="!checkSelectable(scope.row)"
@click="$emit('confirm', scope.row)">
确认
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="查看详情" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@click="$emit('detail', scope.row)">
<i class="iconfont icon-detail primary-color" />
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="编辑" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@click="$emit('edit', scope.row)">
<i class="iconfont icon-edit primary-color" />
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="删除" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@click="$emit('delete', scope.row)">
<i class="iconfont icon-delete delete-color" />
</el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</template>
<script>
import moment from 'moment';
export default {
name: 'WaitingListTable',
components: {},
props: ['tableData', 'page', 'limit'],
filters: {
timeFilter: (val) =>
val ? moment(val).format('yyyy-MM-DD HH:mm:ss') : '---',
relatePlanFilter: (val) =>
val != null ? ['-', '计划型', '非计划型'][val] : '-',
},
data() {
return {
tablePropsLabelList: [
{
label: '巡检单名称',
},
{
label: '部门',
},
{
label: '巡检时间',
},
{
label: '班次',
},
{
label: '确认截止时间',
},
{
label: '备注',
},
],
selectedBox: [
true,
true,
true,
true,
true,
true
],
selectedPlan: [],
};
},
computed: {
tableDataWithIndex() {
return this.tableData.map((item, index) => ({
...item,
_pageIndex: (this.page - 1) * this.limit + index + 1,
}));
},
},
methods: {
checkSelectable(row, index) {
return true;
},
handleSelectionChange(val) {
this.selectedPlan = val;
},
handleDelete(row) {},
handleDetail(row) {},
handleEdit(row) {},
handleConfirm(row) {},
},
};
</script>
<style scoped>
@import './iconfont/iconfont.css';
.delete-color {
color: #ff5454;
}
.primary-color {
color: #0b58ff;
}
.baseTable .show-col-btn {
margin-right: 5px;
line-height: inherit;
cursor: pointer;
}
.baseTable .el-icon-refresh {
cursor: pointer;
}
</style>
<style>
.waiting-list-table .el-table__body tr.current-row > td.el-table__cell {
background-color: #eaf1fc;
}
.waiting-list-table.el-table .el-table__cell {
padding: 0;
height: 35px;
}
.waiting-list-table .addButton {
width: 100%;
height: 35px;
border-top: none;
color: #0b58ff;
border-color: #ebeef5;
border-radius: 0;
}
.waiting-list-table .addButton:hover {
color: #0b58ff;
border-color: #ebeef5;
background-color: #fff;
}
.waiting-list-table .addButton:focus {
border-color: #ebeef5;
background-color: #fff;
}
.el-tooltip__popper.is-dark {
background: rgba(0, 0, 0, 0.6) !important;
}
.el-tooltip__popper .popper__arrow,
.el-tooltip__popper .popper__arrow::after {
border-top-color: rgba(0, 0, 0, 0.4) !important;
}
</style>

View File

@ -0,0 +1,572 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-03-18 15:47:20
* @Description:
-->
<template>
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="true"
:before-close="beforeClose"
class="drawer"
size="60%">
<small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title>
<div class="content">
<div class="visual-part">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="100px"
label-position="top">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="巡检单名称" prop="name">
<el-input v-model="dataForm.name" :disabled="isdetail" placeholder="请输入巡检单名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="部门" prop="departmentId">
<el-select
v-model="dataForm.departmentId"
:disabled="isdetail"
:placeholder="`请选择部门`">
<el-option
v-for="opt in departmentOptions"
:key="opt.id"
:label="opt.name"
:value="opt.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="班次" prop="groupClass">
<el-select
v-model="dataForm.groupClass"
filterable
clearable
multiple
:disabled="isdetail"
style="width: 100%"
placeholder="请选择班次">
<el-option
v-for="d in groupOptions"
:key="d.id"
:label="d.label"
:value="d.label" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="巡检人" prop="checkPerson">
<el-select
v-model="dataForm.checkPerson"
:placeholder="`请选择巡检人`"
multiple
clearable
:disabled="isdetail"
filterable
style="width: 100%">
<el-option
v-for="opt in inspectorOptions"
:key="opt.value"
:label="opt.label"
:value="opt.label" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="巡检时间" prop="planCheckTime">
<el-date-picker
v-model="dataForm.planCheckTime"
type="datetime"
:disabled="isdetail"
placeholder="请选择巡检时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="attr-list" v-if="idAttrShow">
<small-title
style="margin: 16px 0; padding-left: 8px"
:no-padding="true">
巡检内容
</small-title>
<div v-if="!isdetail">
<div>
<SearchBar
:formConfigs="searchBarFormConfig"
ref="attr-search-bar"
@headBtnClick="handleSearchBarBtnClick" />
</div>
<!-- <template>
<span style="display: inline-block;" @click="addNew()">
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
<span class="add">添加</span>
</span>
</template> -->
</div>
<base-table
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="detList">
<method-btn
v-if="!isdetail"
slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
v-show="listQuery.total > 0"
:total="listQuery.total"
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:page-sizes="[5, 10, 15]"
@pagination="getList" />
</div>
</div>
<div v-if="!isdetail" class="drawer-body__footer">
<el-button @click="goback()">取消</el-button>
<!-- <el-button :disabled="isdetail" @click="init(dataForm.id)">重置</el-button> -->
<el-button v-if="isshowConfirm" type="primary" @click="confirmIns()">保存</el-button>
<el-button v-else type="primary" @click="dataFormSubmit()">保存</el-button>
</div>
<attr-add
v-if="addOrUpdateVisible"
ref="addOrUpdate"
:order-id="dataForm.id"
@refreshDataList="getList" />
</el-drawer>
</template>
<script>
import basicAdd from './../../../../core/mixins/basic-add';
import { createCheckOrder, updateCheckOrder, getCheckOrder } from "@/api/equipment/base/inspection/settings";
import { getCheckOrderDetPage, deleteCheckOrderDet } from "@/api/equipment/base/inspection/record";
import SmallTitle from './SmallTitle';
import { parseTime } from '@/utils/ruoyi';
import attrAdd from './attr-add';
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
import { getDictDataLabel } from '@/utils/dict';
const tableBtn = [
{
type: 'edit',
btnName: '编辑',
},
{
type: 'delete',
btnName: '删除',
},
];
const tableProps = [
{
prop: 'equipmentName',
label: '设备名称'
},
{
prop: 'program',
label: '巡检项目',
},
{
prop: 'checkResult',
label: '巡检结果',
},
];
const topBtnConfig = [
{
type: 'add',
btnName: 'btn.add'
}
]
export default {
mixins: [basicAdd],
components: { SmallTitle, attrAdd },
data() {
return {
tableBtn,
tableProps,
topBtnConfig,
addOrUpdateVisible: false,
isshowConfirm: false,
urlOptions: {
isGetCode: false,
createURL: createCheckOrder,
updateURL: updateCheckOrder,
infoURL: getCheckOrder,
},
searchBarFormConfig: [
{
type: 'input',
label: '设备',
placeholder: '请输入设备名称',
param: 'equipmentName',
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'button',
btnName: '新增',
name: 'add',
color: 'success',
plain: true
}
],
listQuery: {
pageSize: 10,
pageNo: 1,
total: 0,
equipmentName: undefined
},
dataForm: {
id: undefined,
name: '',
departmentId: undefined,
groupClass: [],
checkPerson: [],
planCheckTime: undefined
},
detList: [],
groupOptions: [],
// departmentList: [],
departmentOptions: [],
inspectorOptions: [],
visible: false,
isdetail: false,
isedit: false,
idAttrShow: false,
dataRule: {
name: [{ required: true, message: "巡检单名称不能为空", trigger: "blur" }]
}
};
},
mounted() {
this.getDict()
},
methods: {
beforeClose(done) {
if (!this.isdetail) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
} else {
done()
}
},
async getDict() {
//
const res = await groupClassesListAll();
this.groupOptions = res.data.map((item) => {
item.label = item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict)
return item
}) || [];
//
const res1 = await getCoreDepartmentList();
this.departmentOptions = res1.data || []
//
let inspectorList = [];
const userlist = await this.$axios({
url: '/system/user/page',
params: { pageNo: 1, pageSize: 100 },
});
if (userlist.code == 0) {
inspectorList = inspectorList.concat(
(userlist.data?.list || []).map((item) => ({
label: item.username,
value: item.id,
}))
);
}
const workerlist = await this.$axios('/base/core-worker/listAll');
if (workerlist.code == 0) {
inspectorList = inspectorList.concat(
workerlist.data.map((item) => ({
label: item.name,
value: item.id,
}))
);
}
this.inspectorOptions = inspectorList;
// const res1 = await groupClassesListAll();
// this.groupOptions = res1.data || [];
// const res = await getEquipmentAll()
// this.eqList = res.data
},
handleSearchBarBtnClick(btn) {
switch (btn.btnName) {
case 'search':
this.listQuery.equipmentName = btn.equipmentName;
this.getList();
break;
case 'add':
this.addNew()
break;
}
},
initData() {
this.detList.splice(0);
this.listQuery.total = 0;
this.isshowConfirm = false;
},
handleClick(raw) {
if (raw.type === 'delete') {
this.$confirm(
`是否确认删除巡检项目名为"${raw.data.program}"的数据项?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
deleteCheckOrderDet(raw.data.id).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getList();
},
});
});
})
.catch(() => {});
} else {
this.addNew(raw.data.id);
}
},
getList() {
//
getCheckOrderDetPage({
...this.listQuery,
orderId: this.dataForm.id,
}).then((response) => {
this.detList = response.data.list;
this.listQuery.total = response.data.total;
});
},
init(id, isdetail) {
this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = id || undefined;
this.isedit = id ? true : false;
console.log('你好', this.isedit)
this.visible = true;
if (id) {
this.idAttrShow = true
} else {
this.dataForm.checkPerson = [this.$store.getters.nickname]
this.idAttrShow = false
}
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
//
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data
if (this.dataForm.groupClass && this.dataForm.groupClass !== ''){
this.dataForm.groupClass = response.data?.groupClass.split(',')
} else {
this.dataForm.groupClass = []
}
if (this.dataForm.checkPerson && this.dataForm.checkPerson !== '') {
this.dataForm.checkPerson = response.data?.checkPerson.split(',')
} else {
this.dataForm.checkPerson = []
}
});
//
this.getList();
} else {
if (this.urlOptions.isGetCode) {
this.getCode()
}
}
});
},
goback() {
this.$emit('refreshDataList');
this.visible = false;
this.initData();
},
goEdit() {
this.isdetail = false;
},
// /
addNew(id) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id);
});
},
getConfirmed() {
return this.$confirm('是否直接确认巡检单', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
},
async confirmIns() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return;
}
this.$nextTick(() => {
this.getConfirmed().then(confirm => {
// let checkPersonParam = '';
// if (!this.dataForm.checkPerson || this.dataForm.checkPerson.trim() == '') {
// /** */
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
// } else {
// checkPersonParam = `&checkPerson=${this.dataForm.checkPerson}`
// }
this.$axios({
url:
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
method: 'put',
data: [this.dataForm.id],
}).then(res =>{
if (res.code == 0) {
this.visible = false;
this.$emit("refreshDataList");
this.$message.success('已确认');
}
})
}).catch(() => {
this.visible = false;
this.$emit("refreshDataList");
this.$message.success('取消确认');
})
})
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
//
if (this.dataForm.id) {
this.urlOptions.updateURL({
...this.dataForm,
groupClass: this.dataForm.groupClass.join(','),
checkPerson: this.dataForm.checkPerson.join(','),
special: false,
status: 1
}).then(response => {
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
//
this.urlOptions.createURL({
...this.dataForm,
groupClass: this.dataForm.groupClass.join(','),
checkPerson: this.dataForm.checkPerson.join(','),
special: false,
status: 1
}).then(response => {
this.$modal.msgSuccess("新增成功");
this.idAttrShow = true
this.isshowConfirm = true
this.dataForm.id = response.data
// this.visible = false;
this.$emit("refreshDataList");
});
});
}
}
};
</script>
<style scoped>
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
display: flex;
flex-direction: column;
}
.drawer >>> .el-form-item__label {
padding: 0;
}
.drawer >>> .el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
}
.drawer >>> .el-drawer__body {
flex: 1;
height: 1px;
display: flex;
flex-direction: column;
}
.drawer >>> .content {
padding: 30px 24px;
/* flex: 1; */
display: flex;
flex-direction: column;
/* height: 100%; */
}
.drawer >>> .visual-part {
flex: 1 auto;
max-height: 76vh;
overflow: hidden;
overflow-y: scroll;
padding-right: 10px; /* 调整滚动条样式 */
}
.drawer >>> .el-form,
.drawer >>> .attr-list {
padding: 0 16px;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
}
.action_btn {
float: right;
margin: -32px 15px 0;
font-size: 14px;
}
.add {
color: #0b58ff;
}
</style>

View File

@ -0,0 +1,172 @@
<template>
<el-dialog
:visible.sync="visible"
:width="'35%'"
:append-to-body="true"
:close-on-click-modal="false"
class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">
{{ !dataForm.id ? '新增' : '编辑' }}
</div>
</slot>
</template>
<el-form
ref="dataForm"
:model="dataForm"
:rules="dataRule"
label-width="100px"
@keyup.enter.native="dataFormSubmit()">
<el-form-item label="设备名称" prop="equipmentId">
<el-select
v-model="dataForm.equipmentId"
filterable
clearable
placeholder="请选择设备名称"
style="width: 100%">
<el-option
v-for="dict in eqList"
:key="dict.id"
:label="dict.name"
:value="dict.id" />
</el-select>
</el-form-item>
<el-form-item label="巡检项目" prop="program">
<el-input
v-model="dataForm.program"
placeholder="请输入巡检项目"
clearable />
</el-form-item>
<el-form-item label="巡检结果" prop="checkResult">
<el-input
v-model="dataForm.checkResult"
placeholder="请输入巡检结果"
clearable />
</el-form-item>
</el-form>
<el-row style="text-align: right">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</el-row>
</el-dialog>
</template>
<script>
import { createCheckOrderDet, updateCheckOrderDet, getCheckOrderDet } from "@/api/equipment/base/inspection/settings";
import { getEquipmentPage } from '@/api/base/equipment'
export default {
props: {
orderId: {
type: String,
default: '',
},
},
data() {
return {
visible: false,
dataForm: {
id: null,
equipmentId: null,
program: null,
checkResult: null
},
eqList: [],
dataRule: {
equipmentId: [
{ required: true, message: '设备不能为空', trigger: 'blur' },
],
program: [
{ required: true, message: '巡检项目不能为空', trigger: 'blur' },
],
checkResult: [
{ required: true, message: '巡检结果不能为空', trigger: 'blur' },
]
},
};
},
mounted() {
this.getDict();
},
methods: {
async getDict() {
const res = await getEquipmentPage({
pageNo: 1,
pageSize: 100,
special: false
})
this.eqList = res.data.list
},
init(id) {
this.dataForm.id = id || '';
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
getCheckOrderDet(this.dataForm.id).then((res) => {
const { equipmentId, program, checkResult } = res.data;
this.dataForm.equipmentId = equipmentId;
this.dataForm.program = program;
this.dataForm.checkResult = checkResult;
});
}
});
},
//
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
//
if (this.dataForm.id) {
updateCheckOrderDet({
...this.dataForm,
orderId: this.orderId,
}).then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshDataList');
});
return;
}
//
createCheckOrderDet({
...this.dataForm,
orderId: this.orderId,
}).then((response) => {
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshDataList');
});
}
});
},
},
};
</script>
<style scoped>
.dialog >>> .el-dialog__body {
padding: 30px 24px;
}
.dialog >>> .el-dialog__header {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
padding: 13px 24px;
border-bottom: 1px solid #e9e9e9;
}
.dialog >>> .el-dialog__header .titleStyle::before {
content: '';
display: inline-block;
width: 4px;
height: 16px;
background-color: #0b58ff;
border-radius: 1px;
margin-right: 8px;
position: relative;
top: 2px;
}
</style>

View File

@ -0,0 +1,539 @@
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}

View File

@ -0,0 +1,38 @@
@font-face {
font-family: "iconfont"; /* Project id 3821755 */
src: url('iconfont.eot?t=1689233106339'); /* IE9 */
src: url('iconfont.eot?t=1689233106339#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAARgAAsAAAAACcAAAAQUAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDKAqGSIUsATYCJAMYCw4ABCAFhGcHVBtUCMiuMG7hiaIkox1FaBhxvd1fpwAN4YKo1v7tWTr8hBRkBQgO7yqKUJKPUKzDjkixjn7/q0vlANCkEHCJtsMvx2eQn04h5rHEE8593TK2y1SC5nbvNG5gqgZBNEWTqFUQLGVFNnVu1TjyMm3SafEsC3y0myW12KdEh2x+deP/zzHTJeG3AVBm4lrnAxpQN0US7s3ijuSE6Jbh1UGv08cgQEivMg5z6m49Qj77TVxDEZww6gXicNkviSbkxgswNeGCj+CgMw1yFRpAnUNegSv+8+UfU/igsBpjnRV3rRV9+Su8Fk1Agv6CW4eAeyvAAhronJlI1tcrVnIMHZ0cCcsUTrRTnQ0CP50B4KfgEub9Lw80BougQBwGI8bYJU4LPwUbBw0/HXAw8NORUM90wsT9JeIMFACux9QckHyQ9FDYTobcGi+FLSjwMxDe3L5s+w9THFYeEs8H303FWMnZ1JuBWFgNPh3bd5wOvJmKI9aTqXeD8eJ66HnfnV1dJPE8cy4EgqT+s/SbdSWbp9Pn24NbZ1MnGw7CDbvT6+lL1CXVh++hcH56umDT9vOviL/grQ6srHjE57uLHdQn+dtO9x2v94WN6+eXm0HWlZOzta3tUDp1JWjymsiD8r0ViWGkC+n4GeH5aODSM+9COnilpdfdZsRIvMerLmS0uICTplrOnb99LT3NkJNeajPfpDznblq6bXH8efBjlPIUxhQcX+U0qEdt4bjxy6rMdOkbEn0/3mlvrXZL60ysxdwcn/qKLJ/82pnzGS61z5rBeGmrxf33ZXN/IBWUvb8KSvnttbwwq+YTkweZHue0M0+c0ssZGY/Rs+aVF8+3GaW07CkvLC/KcBvP8c2uGpsdm0THlazwlPE22Kdi9ZK4Hdsmtw9eHVQwPjG0p33Q7tGMJ6TUJ2VK1MMw6ftI6qPPtruCvEPmLZqiHcj1Aw3Rup/sdzj+lt/w3f5TrAHgx++nD7A+8xaD4CL8m60Q+KWYO7CgUY3gTFl+OwUBHKteh00BoWmGDIYm301frAJwKAg+BTEoPCpA41OPNNh2sET0g8NnCkI61M6PKKBzREwANBtGIOS6BEU2D0CT6xvSYP+Apdg/cOT6DyErI68W0RzbqhmYOFixuRNLFqoRi839Zh+A2KqYWJH1CTC7hM04My0j664HDVgXY+xtYhbnBBNGVVzH7geKQrHOqA0sPK2Fc70oPZ2UPSTNQlVUjQEmHLDCzDphEgtKQ9zCPP16DwBRK4UJAyKfyBg7jaeaxzKlyQAg6xkaKO9M2tu1EWXhOEL3IxhKhdWpMqCYDgrTy7vZAAsuTUsLm65IOlWIQBlp47PUS9wAhBgHOFGixYgVJx7+dtqutZuY1eXTvXYncJOkOF1Wicd+CnBACA==') format('woff2'),
url('iconfont.woff?t=1689233106339') format('woff'),
url('iconfont.ttf?t=1689233106339') format('truetype'),
url('iconfont.svg?t=1689233106339#iconfont') format('svg');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-downward:before {
content: "\e604";
}
.icon-upward:before {
content: "\e605";
}
.icon-detail:before {
content: "\e601";
}
.icon-edit:before {
content: "\e602";
}
.icon-delete:before {
content: "\e603";
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,44 @@
{
"id": "3821755",
"name": "component",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"description": "封装的组件中的icon",
"glyphs": [
{
"icon_id": "36426261",
"name": "downward",
"font_class": "downward",
"unicode": "e604",
"unicode_decimal": 58884
},
{
"icon_id": "36426301",
"name": "upward",
"font_class": "upward",
"unicode": "e605",
"unicode_decimal": 58885
},
{
"icon_id": "33347867",
"name": "detail",
"font_class": "detail",
"unicode": "e601",
"unicode_decimal": 58881
},
{
"icon_id": "33347918",
"name": "edit",
"font_class": "edit",
"unicode": "e602",
"unicode_decimal": 58882
},
{
"icon_id": "33347930",
"name": "delete",
"font_class": "delete",
"unicode": "e603",
"unicode_decimal": 58883
}
]
}

View File

@ -0,0 +1,29 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Created by iconfont</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024">
<font-face
font-family="iconfont"
font-weight="400"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="downward" unicode="&#58884;" d="M556.942222 144.099556l363.064889 401.806222c24.860444 21.617778 24.860444 56.263111 0 77.880889a68.437333 68.437333 0 0 1-44.942222 16.156444c-16.896 0-33.052444-5.859556-44.885333-16.156444L512 260.949333l-318.236444 362.951111a68.437333 68.437333 0 0 1-44.942223 16.099556c-16.896 0-33.109333-5.802667-44.942222-16.156444-24.746667-21.617778-24.746667-56.206222 0-77.824l363.121778-401.749334c5.973333-5.290667 13.141333-9.443556 21.048889-12.231111 23.722667-8.305778 51.029333-3.527111 68.892444 12.060445z" horiz-adv-x="1024" />
<glyph glyph-name="upward" unicode="&#58885;" d="M556.942222 623.900444l363.064889-401.806222c24.860444-21.617778 24.860444-56.263111 0-77.880889a68.437333 68.437333 0 0 0-44.942222-16.156444c-16.896 0-33.052444 5.859556-44.885333 16.156444L512 507.050667l-318.236444-362.951111a68.437333 68.437333 0 0 0-44.942223-16.099556c-16.896 0-33.109333 5.802667-44.942222 16.156444-24.746667 21.617778-24.746667 56.206222 0 77.824L467.057778 623.729778c5.973333 5.290667 13.141333 9.443556 21.048889 12.231111 23.722667 8.305778 51.029333 3.527111 68.892444-12.060445z" horiz-adv-x="1024" />
<glyph glyph-name="detail" unicode="&#58881;" d="M902.428444 705.251556H332.401778a7.964444 7.964444 0 0 1-7.793778-8.021334v-56.206222a7.964444 7.964444 0 0 1 7.793778-8.078222h570.026666A7.964444 7.964444 0 0 1 910.222222 641.024v56.206222a7.964444 7.964444 0 0 1-7.793778 8.021334z m0-285.127112H332.401778a7.964444 7.964444 0 0 1-7.793778-7.964444v-56.32a7.964444 7.964444 0 0 1 7.793778-7.964444h570.026666a7.964444 7.964444 0 0 1 7.793778 7.964444v56.32a7.964444 7.964444 0 0 1-7.793778 7.964444z m0-285.070222H332.401778a7.964444 7.964444 0 0 1-7.793778-8.078222v-56.206222a7.964444 7.964444 0 0 1 7.793778-8.021334h570.026666a7.964444 7.964444 0 0 1 7.793778 8.021334v56.206222a7.964444 7.964444 0 0 1-7.793778 8.078222zM113.777778 669.127111c0-20.081778 10.410667-38.684444 27.306666-48.696889a53.361778 53.361778 0 0 1 54.670223 0 56.547556 56.547556 0 0 1 27.306666 48.696889 56.547556 56.547556 0 0 1-27.306666 48.696889 53.361778 53.361778 0 0 1-54.613334 0A56.547556 56.547556 0 0 1 113.777778 669.127111zM113.777778 384c0-20.081778 10.410667-38.684444 27.306666-48.696889a53.361778 53.361778 0 0 1 54.670223 0A56.547556 56.547556 0 0 1 223.061333 384a56.547556 56.547556 0 0 1-27.306666 48.696889 53.361778 53.361778 0 0 1-54.613334 0A56.547556 56.547556 0 0 1 113.777778 384z m0-285.127111c0-20.081778 10.410667-38.684444 27.306666-48.696889a53.361778 53.361778 0 0 1 54.670223 0 56.547556 56.547556 0 0 1 27.306666 48.696889 56.547556 56.547556 0 0 1-27.306666 48.696889 53.361778 53.361778 0 0 1-54.613334 0 56.547556 56.547556 0 0 1-27.363555-48.696889z" horiz-adv-x="1024" />
<glyph glyph-name="edit" unicode="&#58882;" d="M873.016889 395.264a32.824889 32.824889 0 0 0 65.649778 0v-273.806222a164.124444 164.124444 0 0 0-164.124445-164.124445h-525.084444A164.124444 164.124444 0 0 0 85.333333 121.457778v525.084444A164.124444 164.124444 0 0 0 249.457778 810.666667h312.32a32.824889 32.824889 0 1 0 0-65.649778h-312.32a98.417778 98.417778 0 0 1-98.474667-98.417778v-525.141333c0-54.385778 44.088889-98.474667 98.417778-98.474667h525.141333a98.417778 98.417778 0 0 1 98.474667 98.417778V395.320889z m-14.222222 362.097778a32.824889 32.824889 0 0 0 48.014222-44.771556L548.750222 328.533333a32.824889 32.824889 0 1 0-48.014222 44.771556l358.115556 384.056889z" horiz-adv-x="1024" />
<glyph glyph-name="delete" unicode="&#58883;" d="M601.024 146.24a29.632 29.632 0 0 0-29.696 29.696V503.04a29.632 29.632 0 1 0 59.456 0v-326.848a29.76 29.76 0 0 0-29.76-29.888z m-178.24 0a29.632 29.632 0 0 0-29.696 29.696V503.04a29.632 29.632 0 1 0 59.392 0v-326.848a29.76 29.76 0 0 0-29.696-29.888z m475.52 505.216h-148.544v59.456c0 49.152-39.616 89.088-88.512 89.088H363.392c-49.216 0-89.152-39.936-89.152-89.088v-59.456H125.696a29.632 29.632 0 1 1 0-59.392h772.608a29.632 29.632 0 1 1 0 59.392z m-564.608 59.456c0 16.256 13.44 29.696 29.696 29.696h297.856c16.32 0 29.056-13.12 29.056-29.696v-59.456H333.696v59.456zM720-32h-416a89.152 89.152 0 0 0-89.088 89.088V503.232a29.632 29.632 0 1 0 59.456 0v-446.08c0-16.512 13.44-29.76 29.696-29.76h416.064a29.632 29.632 0 0 1 29.696 29.696V502.144a29.632 29.632 0 1 0 59.456 0v-445.056A89.536 89.536 0 0 0 720-32z" horiz-adv-x="1024" />
</font>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -0,0 +1,500 @@
<!--
filename: MaintainRecord.vue
author: DY
date: 2023-12-12 13:54:53
description:
-->
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
@select-changed="handleSearchBarChange"
@headBtnClick="handleSearchBarBtnClick" />
<WaitingListTable
ref="waiting-list-table"
:table-data="list"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
@edit="handleEdit"
@detail="handleDetail"
@delete="handleDelete"
@confirm="handleConfirm" />
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList" />
<add-or-update
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getList" />
</div>
</template>
<script>
import AddOrUpdate from './add-or-updata';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import {
exportCheckOrderExcel,
} from '@/api/equipment/base/maintain/record';
import WaitingListTable from './WaitingListTable.vue';
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
const btn = {
name: 'tableBtn',
props: ['injectData'],
data() {
return {};
},
methods: {
handleClick() {
this.$emit('emitData', {
action: this.injectData.label,
value: this.injectData,
});
},
},
render: function (h) {
return (
<el-button type="text" onClick={this.handleClick}>
{this.injectData.name}
</el-button>
);
},
};
export default {
name: 'Confirm',
components: {
WaitingListTable,
AddOrUpdate
},
mixins: [basicPageMixin],
data() {
return {
addOrUpdateVisible: false,
recordDetailVisible: false,
searchBarKeys: [
'name'
],
tobeConfirmedIdList: [],
searchBarFormConfig: [
{
type: 'input',
label: '巡检单名称',
placeholder: '请输入巡检单名称',
param: 'name',
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
{
type: 'button',
btnName: '新增',
name: 'add',
plain: true,
color: 'success',
},
{
type: 'button',
btnName: '批量确认',
name: 'batchConfirm',
color: 'primary',
plain: true,
},
{
type: 'button',
btnName: '导出',
name: 'export',
plain: true,
color: 'primary',
},
// {
// type: this.$auth.hasPermi('equipment:maintain-record:create')
// ? 'button'
// : '',
// btnName: '',
// name: 'add',
// plain: true,
// color: 'success',
// },
],
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
maintainPlanId: null,
startTime: null,
special: false,
status: 1,
},
//
form: {},
basePath: '/base/equipment-check-order',
mode: null,
allSpecialEquipments: [],
openPlannedDrawer: false,
openUnplannedDrawer: false,
openPlannedDrawer: false,
};
},
watch: {
tobeConfirmedIdList: {
handler(val) {
if (val.length == this.list.length) {
this.$refs['table'].toggleAllSelection();
}
},
},
},
created() {
this.getList();
},
methods: {
/** 批量确认 */
async searchBarClicked(btn) {
switch (btn.btnName) {
case 'batchConfirm':
if (this.$refs['waiting-list-table'].selectedPlan.length == 0) {
this.$message.warning('请选择待确认的设备巡检单');
return;
}
this.$modal
.confirm('是否确认所有选中巡检单"?')
.then(() => {
// let checkPersonParam = '';
// if (!row.checkPerson || row.checkPerson.trim() == '') {
// /** */
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
// }
return this.$axios({
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
method: 'put',
data: this.$refs['waiting-list-table'].selectedPlan.map(
(item) => item.id
),
});
})
.then((res) => {
this.getList();
res.code == 0 && this.$modal.msgSuccess('确认成功');
res.code != 0 && this.$modal.msgError('确认失败');
})
.catch(() => {});
break;
}
},
handleSelectionChange(list) {
if (this.tobeConfirmedIdList.length) {
this.tobeConfirmedIdList = [];
this.list.forEach((item) => {
this.handleEmitFun({
action: 'row-selected',
value: { row: item, selected: false },
});
});
console.log(
'清空选择列表',
this.list.map((item) => item._selection)
);
} else {
this.tobeConfirmedIdList = list.map((item) => item.id);
this.list.forEach((item) => {
this.handleEmitFun({
action: 'row-selected',
value: { row: item, selected: true },
});
});
console.log(
'全选',
this.list.map((item) => item._selection)
);
}
},
handleEmitFun({ action, value }) {
switch (action) {
case '详情':
this.recordDetailVisible = true;
this.$nextTick(() => {
this.$refs.recordDetailDrawer.show({
id: value.id,
planMaintainWorker: value.planMaintainWorker,
maintainWorker: value.maintainWorker,
});
});
break;
case 'row-selected':
if (value.selected) {
this.tobeConfirmedIdList.push(value.row.id);
value.row._selection = 0b11;
} else {
const index = this.tobeConfirmedIdList.indexOf(value.row.id);
if (index != -1) {
this.tobeConfirmedIdList.splice(index, 1);
}
}
console.log('tobeConfirmedIdList', this.tobeConfirmedIdList);
break;
}
},
handleSearchBarChange({ param, value }) {
console.log('122', param)
// if ('specialType' === param) {
// if (!value) {
// this.setSearchBarEquipmentList(this.allSpecialEquipments);
// return;
// }
// this.setSearchBarEquipmentList(
// this.allSpecialEquipments.filter((item) => item.specialType == value)
// );
// }
},
/** 查询列表 */
getList() {
this.loading = true;
//
this.recv({
...this.queryParams
}).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.mode = null;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: null,
relatePlan: null,
maintainWorker: [],
maintainOrderNumber: null,
departmentId: null,
lineId: null,
startTime: null,
endTime: null,
planStartTime: null,
planEndTime: null,
confirmed: false,
remark: null,
special: false,
};
this.resetForm('form');
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm');
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
// this.reset();
// this.open = true;
// this.title = '';
// this.addOrEditTitle = '';
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init();
});
},
// /
// addOrUpdateHandle(id) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(id);
// });
// },
getConfirmed() {
return this.$confirm('是否直接确认巡检记录', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
this.put({
...this.form,
maintainWorker: this.form.maintainWorker.join(','),
special: false,
relatePlan: 2,
}).then((response) => {
this.$modal.msgSuccess('修改成功');
this.open = false;
this.getList();
});
return;
}
//
this.getConfirmed()
.then((confirmed) => {
this.post({
...this.form,
maintainWorker: this.form.maintainWorker.join(','),
special: false,
relatePlan: 2,
confirmed: true,
}).then((response) => {
this.$modal.msgSuccess('新增成功');
this.open = false;
this.getList();
});
})
.catch((err) => {
this.post({
...this.form,
maintainWorker: this.form.maintainWorker.join(','),
special: false,
relatePlan: 2,
confirmed: false,
}).then((response) => {
this.$modal.msgSuccess('新增成功');
this.open = false;
this.getList();
});
});
});
},
/** 确认 */
async handleConfirm(row) {
this.$modal
.confirm('是否确认巡检单"' + row.name + '"?')
.then(() => {
// let checkPersonParam = '';
// const nickname = this.$store.getters.nickname;
// if (!row.checkPerson || row.checkPerson.trim() == '') {
// /** */
// checkPersonParam = `&checkPerson=${nickname}`;
// } else {
// checkPersonParam = `&checkPerson=${row.checkPerson}`
// }
return this.$axios({
url:
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
method: 'put',
data: [row.id],
});
})
.then((res) => {
this.getList();
res.code == 0 && this.$modal.msgSuccess('确认成功');
res.code != 0 && this.$modal.msgError('确认失败');
})
.catch(() => {});
},
/** 编辑 */
async handleEdit(row) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(row.id);
});
// this.reset();
// if (row.relatePlan == 1) {
// //
// // const res = await this.info({ id: row.id });
// // this.form = res.data;
// // this.form.maintainWorker = res.data.maintainWorker.split(',');
// this.openPlannedDrawer = true;
// this.$nextTick(() => {
// this.$refs.planned.init(row);
// });
// } else {
// this.openUnplannedDrawer = true;
// this.$nextTick(() => {
// this.$refs.unplanned.init(row);
// });
// }
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal
.confirm(
'是否确认删除巡检单名称为"' + row.name + '"的数据项?'
)
.then(() => {
return this.$axios({
url: '/base/equipment-check-order/delete?id=' + row.id,
method: 'delete',
});
})
.then(() => {
this.getList();
this.$modal.msgSuccess('删除成功');
})
.catch(console.error);
},
handleDetail(row) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(row.id, true);
});
// this.recordDetailVisible = true;
// this.$nextTick(() => {
// this.$refs.recordDetailDrawer.show({
// id: row.id,
// planMaintainWorker: row.planMaintainWorker,
// maintainWorker: row.maintainWorker,
// });
// });
},
/** 导出按钮操作 */
handleExport() {
//
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal
.confirm('是否确认导出所有巡检单?')
.then(() => {
this.exportLoading = true;
return exportCheckOrderExcel(params);
})
.then((response) => {
this.$download.excel(response, '设备巡检单.xls');
this.exportLoading = false;
})
.catch(() => {});
},
},
};
</script>

View File

@ -0,0 +1,312 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-26 09:25:10
* @Description:
-->
<template>
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="isdetail"
class="drawer"
size="60%">
<small-title slot="title" :no-padding="true">
{{ '设备巡检记录详情' }}
</small-title>
<div class="content">
<div class="visual-part">
<el-row :gutter="20">
<el-col :span="8">
<div class="blodTip">巡检单名称</div>
<div class="lightTip">{{ dataForm.name }}</div>
</el-col>
<el-col :span="8">
<div class="blodTip">部门</div>
<div class="lightTip">{{ dataForm.department }}</div>
</el-col>
<el-col :span="8">
<div class="blodTip">班次</div>
<div class="lightTip">{{ dataForm.groupClass }}</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="blodTip">巡检人</div>
<div class="lightTip">{{ dataForm.checkPerson }}</div>
</el-col>
<el-col :span="8">
<div class="blodTip">巡检时间</div>
<div class="lightTip">{{ parseTime(dataForm.actualCheckTime) }}</div>
</el-col>
<el-col :span="8">
<div class="blodTip">确认人</div>
<div class="lightTip">{{ dataForm.confirmPerson }}</div>
</el-col>
</el-row>
</div>
<div class="attr-list" v-if="idAttrShow">
<small-title
style="margin: 16px 0; padding-left: 8px"
:no-padding="true">
巡检内容
</small-title>
<div v-if="!isdetail" class="action_btn">
<template>
<span style="display: inline-block;">
<el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button>
</span>
</template>
</div>
<base-table
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="planList">
<method-btn
v-if="!isdetail"
slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
<pagination
v-show="listQuery.total > 0"
:total="listQuery.total"
:page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize"
:page-sizes="[5, 10, 15]"
@pagination="getList" />
</div>
<div v-if="!isdetail" class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</div>
</div>
<!-- <attr-add
v-if="addOrUpdateVisible"
ref="addOrUpdate"
:plan-id="dataForm.id"
@refreshDataList="getList" /> -->
</el-drawer>
</template>
<script>
import basicAdd from '../../../../core/mixins/basic-add';
import { getEqCheckOrder, deleteCheckOrderDet, getCheckOrderDetPage } from '@/api/equipment/base/inspection/record';
// import { listData } from "@/api/system/dict/data";
import SmallTitle from '../../maintain/PlanConfig/SmallTitle.vue';
import { parseTime } from '../../../../core/mixins/code-filter';
// import attrAdd from './attr-add';
// import { getDictDatas } from "@/utils/dict";
const tableBtn = [
{
type: 'edit',
btnName: '编辑',
},
{
type: 'delete',
btnName: '删除',
},
];
const tableProps = [
{
prop: 'equipmentName',
label: '设备名称',
},
{
prop: 'program',
label: '巡检项目',
},
{
prop: 'checkResult',
label: '巡检结果',
}
];
export default {
mixins: [basicAdd],
components: { SmallTitle },
data() {
return {
tableBtn,
tableProps,
addOrUpdateVisible: false,
urlOptions: {
isGetCode: false,
infoURL: getEqCheckOrder
},
listQuery: {
pageSize: 99,
pageNo: 1,
total: 0
},
dataForm: {},
planList: [],
visible: false,
isdetail: false,
idAttrShow: false
};
},
mounted() {},
methods: {
initData() {
this.planList.splice(0);
this.listQuery.total = 0;
},
handleClick(raw) {
if (raw.type === 'delete') {
this.$confirm(
`是否确认删除保养项目名为"${raw.data.program}"的数据项?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
deleteCheckOrderDet(raw.data.id).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getList();
},
});
});
})
.catch(() => {});
} else {
this.addNew(raw.data.id);
}
},
getList() {
//
getCheckOrderDetPage({
...this.listQuery,
orderId: this.dataForm.id,
}).then((response) => {
this.planList = response.data.list;
this.listQuery.total = response.data.total;
});
},
init(id, isdetail) {
this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = id || undefined;
this.visible = true;
if (id) {
this.idAttrShow = true
} else {
this.idAttrShow = false
}
this.$nextTick(() => {
if (this.dataForm.id) {
//
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data;
});
//
this.getList();
}
});
},
goback() {
this.$emit('refreshDataList');
this.visible = false;
// this.initData();
},
// /
addNew(id) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id);
});
}
}
};
</script>
<style scoped>
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
display: flex;
flex-direction: column;
}
.drawer >>> .el-form-item__label {
padding: 0;
}
.drawer >>> .el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
}
.drawer >>> .el-drawer__body {
flex: 1;
height: 1px;
display: flex;
flex-direction: column;
}
.drawer >>> .content {
padding: 30px 24px;
flex: 1;
display: flex;
flex-direction: column;
/* height: 100%; */
}
.drawer >>> .visual-part {
flex: 1 auto;
max-height: 18vh;
overflow: hidden;
overflow-y: scroll;
padding-right: 10px; /* 调整滚动条样式 */
}
.drawer >>> .el-form,
.drawer >>> .attr-list {
padding: 0 16px;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
}
.action_btn {
float: right;
margin: -40px 15px;
font-size: 14px;
}
.add {
color: #0b58ff;
}
.blodTip {
height: 16px;
font-size: 14px;
font-weight: 600;
color: rgba(0,0,0,0.85);
margin-bottom: 8px;
}
.lightTip {
/* height: 16px; */
font-size: 14px;
font-weight: 400;
color: rgba(102,102,102,0.75);
margin-bottom: 12px;
}
</style>

View File

@ -50,6 +50,11 @@
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getList" />
<add-content
v-if="addContent"
ref="addContent"
@refreshDataList="addContent = false" />
</div>
</template>
@ -57,19 +62,41 @@
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import addRecord from './addRecord.vue';
import { exportCheckLogExcel, deleteEqCheckLog } from '@/api/equipment/base/inspection/record'
import AddContent from './addContent.vue';
import { exportCheckOrderExcel, deleteEqCheckLog } from '@/api/equipment/base/inspection/record'
import { parseTime } from '../../../../core/mixins/code-filter';
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
const btn = {
name: 'tableBtn',
props: ['injectData'],
data() {
return {};
},
methods: {
handleClick() {
this.$emit('emitData', { action: this.injectData.label, value: this.injectData });
},
},
render: function (h) {
return (
<el-button type="text" onClick={this.handleClick}>
{this.injectData.name}
</el-button>
);
},
};
export default {
name: 'EquipmentRepair',
components: { addRecord },
name: 'EquipmentInspectionRecord',
components: { addRecord, AddContent },
mixins: [basicPageMixin],
data() {
return {
addOrUpdateVisible: false,
searchBarKeys: ['equipmentId', 'actualTime'],
addContent: false,
searchBarKeys: ['name', 'actualCheckTime'],
tableBtn: [
this.$auth.hasPermi('equipment:check-record:detail')
? {
@ -77,48 +104,57 @@ export default {
btnName: '详情',
}
: undefined,
this.$auth.hasPermi('equipment:check-record:update')
? {
type: 'edit',
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('equipment:check-record:delete')
? {
type: 'delete',
btnName: '删除',
}
: undefined,
// this.$auth.hasPermi('equipment:check-record:update')
// ? {
// type: 'edit',
// btnName: '',
// }
// : undefined,
// this.$auth.hasPermi('equipment:check-record:delete')
// ? {
// type: 'delete',
// btnName: '',
// }
// : undefined,
].filter((v) => v),
tableProps: [
{ prop: 'configName', label: '配置名称' },
{ prop: 'equipmentName', label: '设备名称' },
{ prop: 'origin', label: '数据来源', filter: (val) => ['', '手动', 'PDA'][val] },
{ prop: 'name', label: '巡检单名称' },
{ prop: 'department', label: '部门' },
{ prop: 'actualCheckTime', label: '巡检时间', filter: parseTime },
{ prop: 'groupClass', label: '班次' },
// { prop: 'opt', label: '', name: '', subcomponent: btn },
{ prop: 'remark', label: '备注' }
// { prop: 'origin', label: '', filter: (val) => ['', '', 'PDA'][val] },
// { prop: 'sectionName', label: '' },
{ prop: 'actualTime', label: '实际巡检时间', filter: parseTime },
// { prop: 'maintenanceDetail', label: '' },
{ prop: 'responsible', label: '巡检人' },
// { prop: 'responsible', label: '' },
],
searchBarFormConfig: [
// {
// type: 'select',
// label: '',
// placeholder: '',
// param: 'name',
// filterable: true
// },
{
type: 'select',
label: '设备',
placeholder: '请选择设备',
param: 'equipmentId',
filterable: true
type: 'input',
label: '巡检单名称',
placeholder: '请输入巡检单',
param: 'name'
},
//
{
type: 'datePicker',
label: '时间',
dateType: 'daterange', // datetimerange
format: 'yyyy-MM-dd',
label: '巡检时间',
dateType: 'datetimerange', // datetimerange
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
defaultTime: ['00:00:00', '23:59:59'],
param: 'actualTime',
param: 'actualCheckTime',
// width: 350,
},
{
@ -138,16 +174,16 @@ export default {
name: 'export',
plain: true,
color: 'primary',
},
{
type: this.$auth.hasPermi('equipment:check-record:create')
? 'button'
: '',
btnName: '新增',
name: 'add',
plain: true,
color: 'success',
},
}
// {
// type: this.$auth.hasPermi('equipment:check-record:create')
// ? 'button'
// : '',
// btnName: '',
// name: 'add',
// plain: true,
// color: 'success',
// },
],
rows: [
[
@ -216,37 +252,54 @@ export default {
pageNo: 1,
pageSize: 10,
special: false,
maintenanceStatus: null,
createTime: null,
equipmentId: null,
name: null,
actualCheckTime: null,
status: 2
},
//
form: {},
basePath: '/base/equipment-check-log',
basePath: '/base/equipment-check-order',
mode: null,
};
},
created() {
this.initSearchBar();
let end = moment().format('YYYY-MM-DD 08:00:00')
const current = new Date()
let start = parseTime(new Date(current.getFullYear(), current.getMonth(), current.getDate() - 3, 8, 0, 0))
this.searchBarFormConfig[1].defaultSelect = [start, end]
this.queryParams.actualCheckTime = [start, end]
// this.initSearchBar();
this.getList();
},
methods: {
initSearchBar() {
this.http('/base/core-equipment/page', 'get', {
special: false,
pageNo: 1,
pageSize: 99,
}).then(({ data }) => {
this.$set(
this.searchBarFormConfig[0],
'selectOptions',
(data?.list || []).map((item) => ({
name: item.name,
id: item.id,
}))
);
handleEmitFun({action, value}) {
switch (action) {
//
case '巡检内容':
this.addContent = true;
this.$nextTick(() => {
this.$refs.addContent.init(value.id, true);
});
break;
}
},
// initSearchBar() {
// this.http('/base/equipment-check-order/page', 'get', {
// special: false,
// pageNo: 1,
// pageSize: 99,
// status: 2
// }).then(({ data }) => {
// this.$set(
// this.searchBarFormConfig[0],
// 'selectOptions',
// (data?.list || []).map((item) => ({
// name: item.name,
// id: item.id,
// }))
// );
// });
// },
/** 查询列表 */
getList() {
this.loading = true;
@ -363,10 +416,14 @@ export default {
.catch(() => {});
},
handleDetail({ id }) {
this.addOrUpdateVisible = true
this.addContent = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id, true);
this.$refs.addContent.init(id, true);
});
// this.addOrUpdateVisible = true
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(id, true);
// });
},
/** 导出按钮操作 */
handleExport() {
@ -378,7 +435,7 @@ export default {
.confirm('是否确认导出所有设备巡检记录?')
.then(() => {
this.exportLoading = true;
return exportCheckLogExcel(params);
return exportCheckOrderExcel(params);
})
.then((response) => {
this.$download.excel(response, '设备巡检记录.xls');

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-12-01 11:02:43
* @LastEditTime: 2024-02-26 08:40:22
* @Description:
-->
<template>
@ -13,34 +13,25 @@
class="drawer"
size="50%">
<small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : '添加巡检' }}
<!-- {{ isdetail ? '详情' : '添加巡检' }} -->
{{ '添加内容' }}
</small-title>
<div class="content">
<div class="visual-part">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="100px"
label-position="top">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="设备名称" prop="equipmentName">
<el-input v-model="dataForm.equipmentName" disabled clearable placeholder="请输入设备名称" />
</el-form-item>
<el-col :span="8">
<div class="blodTip">巡检单名称</div>
<div class="lightTip">{{ dataForm.name }}</div>
</el-col>
<el-col :span="12">
<el-form-item label="设备编码" prop="equipmentCode">
<el-input
v-model="dataForm.equipmentCode"
clearable
disabled
placeholder="请输入设备编码" />
</el-form-item>
<el-col :span="8">
<div class="blodTip">部门</div>
<div class="lightTip">{{ dataForm.department }}</div>
</el-col>
<el-col :span="8">
<div class="blodTip">巡检时间</div>
<div class="lightTip">{{ parseTime(dataForm.planCheckTime) }}</div>
</el-col>
</el-row>
</el-form>
</div>
<el-divider />
@ -49,7 +40,7 @@
<small-title
style="margin: 16px 0; padding-left: 8px"
:no-padding="true">
巡检项目
巡检内容
</small-title>
<div v-if="!isdetail" class="action_btn">
@ -90,16 +81,18 @@
<attr-add
v-if="addOrUpdateVisible"
ref="addOrUpdate"
:config-id="dataForm.id"
:order-id="dataForm.id"
@refreshDataList="getList" />
</el-drawer>
</template>
<script>
import { getEqCheck, getCheckDetPage, deleteCheckDet } from "@/api/equipment/base/inspection/settings";
import { getCheckOrder } from "@/api/equipment/base/inspection/settings";
import { deleteCheckOrderDet, getCheckOrderDetPage } from '@/api/equipment/base/inspection/record';
import SmallTitle from './SmallTitle';
import attrAdd from './attr-add';
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import { parseTime } from '../../../../core/mixins/code-filter';
const tableBtn = [
{
@ -112,22 +105,14 @@ const tableBtn = [
},
];
const tableProps = [
{
prop: 'equipmentName',
label: '设备名称',
},
{
prop: 'program',
label: '巡检项目',
},
{
prop: 'content',
label: '巡检内容',
},
{
prop: 'code',
label: '巡检内容编码',
},
{
prop: 'description',
label: '备注',
},
label: '检查项目',
}
];
export default {
@ -138,7 +123,7 @@ export default {
tableProps,
addOrUpdateVisible: false,
urlOptions: {
infoURL: getEqCheck,
infoURL: getCheckOrder,
},
listQuery: {
pageSize: 10,
@ -147,26 +132,13 @@ export default {
},
dataForm: {
id: undefined,
code: undefined,
name: '',
materialType: undefined,
productType: undefined,
area: undefined,
specifications: undefined,
processTime: 0,
remark: undefined,
unit: undefined
name: undefined,
department: undefined,
planCheckTime: undefined
},
checkDetList: [],
visible: false,
isdetail: false,
dataRule: {
code: [{ required: true, message: "物料编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "物料名称不能为空", trigger: "blur" }],
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }],
processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }]
}
isdetail: false
};
},
mounted() {},
@ -187,7 +159,7 @@ export default {
}
)
.then(() => {
deleteCheckDet(raw.data.id).then(({ data }) => {
deleteCheckOrderDet(raw.data.id).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
@ -205,9 +177,9 @@ export default {
},
getList() {
//
getCheckDetPage({
getCheckOrderDetPage({
...this.listQuery,
configId: this.dataForm.id,
orderId: this.dataForm.id,
}).then((response) => {
this.checkDetList = response.data.list;
this.listQuery.total = response.data.total;
@ -220,7 +192,7 @@ export default {
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
// this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
//
@ -287,7 +259,7 @@ export default {
.drawer >>> .visual-part {
flex: 1 auto;
max-height: 16vh;
max-height: 10vh;
overflow: hidden;
overflow-y: scroll;
padding-right: 10px; /* 调整滚动条样式 */
@ -311,4 +283,18 @@ export default {
.add {
color: #0b58ff;
}
.blodTip {
height: 16px;
font-size: 14px;
font-weight: 600;
color: rgba(0,0,0,0.85);
margin-bottom: 8px;
}
.lightTip {
/* height: 16px; */
font-size: 14px;
font-weight: 400;
color: rgba(102,102,102,0.75);
margin-bottom: 12px;
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2023-11-25 16:23:13
* @LastEditTime: 2024-03-15 18:38:52
* @Description:
-->
<template>
@ -11,43 +11,80 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="80px">
label-width="150px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="配置名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="请输入配置名称" />
<el-form-item label="巡检单名称" prop="name">
<el-input v-model="dataForm.name" placeholder="请输入巡检单名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="配置编码" prop="code">
<el-input
v-model="dataForm.code"
placeholder="请输入配置编码" />
<el-form-item label="巡检单编码" prop="code">
<el-input v-model="dataForm.code" placeholder="请输入巡检单编码" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="设备名称" prop="equipmentId">
<el-form-item
label="部门"
prop="departmentId"
:rules="[{ required: false, message: '请选择部门', trigger: 'blur' }]">
<el-select
v-model="dataForm.equipmentId"
filterable
style="width: 100%"
placeholder="请选择设备名称"
@change="setCode">
v-model="dataForm.departmentId"
:placeholder="`请选择部门`"
style="width: 100%">
<el-option
v-for="dict in eqList"
:key="dict.id"
:label="dict.name"
:value="dict.id" />
v-for="opt in departmentOptions"
:key="opt.id"
:label="opt.name"
:value="opt.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备编码" prop="equipmentCode">
<el-input v-model="dataForm.equipmentCode" disabled placeholder="请输入设备编码" />
<el-form-item label="计划巡检时间" prop="planCheckTime">
<el-date-picker
v-model="dataForm.planCheckTime"
type="datetime"
:placeholder="`请选择计划巡检时间`"
value-format="timestamp"
:default-time="'8:00:00'"
style="width: 100%" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="巡检频率(天/次)" prop="checkPeriod">
<el-input
v-model="dataForm.checkPeriod"
placeholder="请输入巡检频率(天/次)" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="确认时限 (时)" prop="confirmTimeLimit">
<el-input
v-model="dataForm.confirmTimeLimit"
:placeholder="`请输入确认时限`" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="班次" prop="groupClass">
<el-select
v-model="dataForm.groupClass"
filterable
clearable
multiple
style="width: 100%"
placeholder="请选择班次">
<el-option
v-for="d in groupOptions"
:key="d.id"
:label="d.label"
:value="d.label" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入备注" />
</el-form-item>
</el-col>
</el-row>
@ -56,8 +93,16 @@
<script>
import basicAdd from '../../../../core/mixins/basic-add';
import { getEqCheck, getCode, createCheckConfig, updateCheckConfig } from "@/api/equipment/base/inspection/settings";
import { getEquipmentAll } from '@/api/base/equipment'
import {
getCheckOrder,
getOrderCode,
createCheckOrder,
updateCheckOrder,
} from '@/api/equipment/base/inspection/settings';
import { getCoreDepartmentList } from '@/api/base/coreDepartment';
import { groupClassesListAll } from '@/api/monitoring/teamProduction';
import { getDictDataLabel } from '@/utils/dict';
// import { getEquipmentAll } from '@/api/base/equipment'
export default {
mixins: [basicAdd],
@ -65,41 +110,140 @@ export default {
return {
urlOptions: {
isGetCode: true,
codeURL: getCode,
createURL: createCheckConfig,
updateURL: updateCheckConfig,
infoURL: getEqCheck,
codeURL: getOrderCode,
createURL: createCheckOrder,
updateURL: updateCheckOrder,
infoURL: getCheckOrder,
},
dataForm: {
id: undefined,
code: undefined,
name: undefined,
equipmentId: undefined,
equipmentCode: undefined
id: null,
code: null,
name: null,
departmentId: null,
planCheckTime: null,
confirmTimeLimit: null,
groupClass: null,
remark: null,
checkPeriod: null
},
eqList: [],
groupOptions: [],
departmentOptions: [],
dataRule: {
equipmentId: [{ required: true, message: "设备不能为空", trigger: "blur" }],
code: [{ required: true, message: "配置编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "配置名称不能为空", trigger: "blur" }],
confirmTimeLimit: [
{ required: true, message: '确认时限不能为空', trigger: 'blur' },
],
code: [
{ required: true, message: '巡检单编码不能为空', trigger: 'blur' },
],
name: [
{ required: true, message: '巡检单名称不能为空', trigger: 'blur' },
],
planCheckTime: [
{ required: true, message: '计划巡检时间不能为空', trigger: 'blur' }
],
checkPeriod: [
{ required: true, message: '巡检频率不能为空', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字类型',
trigger: 'blur',
transform: (val) => Number(val),
}
]
}
};
},
created() {
const currenttime = new Date();
this.dataForm.planCheckTime = new Date(
currenttime.getFullYear(),
currenttime.getMonth(),
currenttime.getDate(),
8,
0,
0
).getTime();
},
mounted() {
this.getDict()
this.getDict();
},
methods: {
async getDict() {
//
const res = await getEquipmentAll()
this.eqList = res.data
},
setCode() {
const chooseM = this.eqList.filter(item => {
return item.id === this.dataForm.equipmentId
})
this.dataForm.equipmentCode = chooseM[0].code
init(id) {
this.dataForm.id = id || '';
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr();
}
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
this.urlOptions.infoURL(id).then((response) => {
this.dataForm = response.data;
if (response.data?.groupClass === '') {
this.dataForm.groupClass = [];
} else {
this.dataForm.groupClass =
response.data?.groupClass?.split(',') || undefined;
}
});
} else {
if (this.urlOptions.isGetCode) {
this.getCode();
}
}
});
},
async getDict() {
//
const res = await getCoreDepartmentList();
this.departmentOptions = res.data || [];
const res1 = await groupClassesListAll();
this.groupOptions =
res1.data.map((item) => {
item.label =
item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict);
return item;
}) || [];
// const res = await getEquipmentAll()
// this.eqList = res.data
},
//
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false;
}
//
if (this.dataForm.id) {
this.urlOptions
.updateURL({
...this.dataForm,
special: false,
status: 0,
groupClass: this.dataForm.groupClass?.join(','),
})
.then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
this.$emit('refreshDataList');
});
return;
}
//
this.urlOptions
.createURL({
...this.dataForm,
special: false,
status: 0,
groupClass: this.dataForm.groupClass?.join(','),
})
.then((response) => {
this.$modal.msgSuccess('新增成功');
this.visible = false;
this.$emit('refreshDataList');
});
});
},
},
};
</script>

View File

@ -17,18 +17,32 @@
ref="dataForm"
:model="dataForm"
:rules="dataRule"
label-width="60px"
label-width="90px"
@keyup.enter.native="dataFormSubmit()">
<el-form-item label="巡检" prop="checkId">
<el-select v-model="dataForm.checkId" filterable placeholder="请选择巡检" style="width: 100%">
<el-option v-for="dict in checkList" :key="dict.id" :label="dict.content"
<el-form-item label="设备名称" prop="equipmentId">
<el-select
v-model="dataForm.equipmentId"
filterable
clearable
placeholder="请选择设备名称"
style="width: 100%">
<el-option
v-for="dict in equipmentOptions"
:key="dict.id"
:label="dict.name"
:value="dict.id" />
</el-select>
</el-form-item>
<el-form-item label="备注" prop="description">
<el-form-item label="巡检项目" prop="program">
<el-input
v-model="dataForm.description"
placeholder="请输入备注"
v-model="dataForm.program"
placeholder="请输入巡检项目"
clearable />
</el-form-item>
<el-form-item label="巡检结果" prop="checkResult">
<el-input
v-model="dataForm.checkResult"
placeholder="请输入巡检结果"
clearable />
</el-form-item>
</el-form>
@ -41,11 +55,12 @@
</template>
<script>
import { getCheckDet, createCheckDet, updateCheckDet, getcheckList } from "@/api/equipment/base/inspection/settings";
import { getCheckOrderDet, createCheckOrderDet, updateCheckOrderDet } from "@/api/equipment/base/inspection/settings";
import { getEquipmentPage } from '@/api/base/equipment'
export default {
props: {
configId: {
orderId: {
type: String,
default: '',
},
@ -54,14 +69,22 @@ export default {
return {
visible: false,
dataForm: {
id: undefined,
checkId: undefined,
configId: undefined,
description: ''
id: null,
equipmentId: null,
program: null,
checkResult: null
},
checkList: [],
equipmentOptions: [],
dataRule: {
checkId: [{ required: true, message: '巡检不能为空', trigger: 'blur' }],
equipmentId: [
{ required: true, message: '设备不能为空', trigger: 'blur' }
],
program: [
{ required: true, message: '巡检项目不能为空', trigger: 'blur' }
],
checkResult: [
{ required: true, message: '巡检结果不能为空', trigger: 'blur' }
]
},
};
},
@ -70,8 +93,12 @@ export default {
},
methods: {
async getDict() {
const res = await getcheckList()
this.checkList = res.data
const res = await getEquipmentPage({
pageNo: 1,
pageSize: 100,
special: false
})
this.equipmentOptions = res.data.list
},
init(id) {
this.dataForm.id = id || '';
@ -79,7 +106,7 @@ export default {
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
if (this.dataForm.id) {
getCheckDet(this.dataForm.id).then((res) => {
getCheckOrderDet(this.dataForm.id).then((res) => {
// const { name, value } = res.data;
// this.dataForm.name = name;
// this.dataForm.value = value;
@ -94,9 +121,9 @@ export default {
if (valid) {
//
if (this.dataForm.id) {
updateCheckDet({
updateCheckOrderDet({
...this.dataForm,
configId: this.configId
orderId: this.orderId
}).then((response) => {
this.$modal.msgSuccess('修改成功');
this.visible = false;
@ -105,9 +132,9 @@ export default {
return;
}
//
createCheckDet({
createCheckOrderDet({
...this.dataForm,
configId: this.configId,
orderId: this.orderId,
}).then((response) => {
this.$modal.msgSuccess('新增成功');
this.visible = false;

View File

@ -17,7 +17,7 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="180"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -37,9 +37,7 @@
@close="cancel"
@cancel="cancel"
@confirm="handleConfirm">
<add
ref="add"
@refreshDataList="successSubmit" />
<add ref="add" @refreshDataList="successSubmit" />
</base-dialog>
<!-- 添加巡检查看详情 -->
<addOrUpdata
@ -52,7 +50,9 @@
<script>
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import addOrUpdata from './add-or-updata.vue';
import add from './add.vue'
import add from './add.vue';
import { parseTime } from '../../../../core/mixins/code-filter';
import { groupClassesListAll } from '@/api/monitoring/teamProduction';
// import { publicFormatter } from '@/utils/dict';
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
@ -70,7 +70,7 @@ export default {
? {
type: 'add',
btnName: '添加',
showTip: '添加巡检'
showTip: '添加巡检',
}
: undefined,
this.$auth.hasPermi('equipment:check-setting:update')
@ -79,12 +79,12 @@ export default {
btnName: '修改',
}
: undefined,
this.$auth.hasPermi('equipment:check-setting:update')
? {
type: 'detail',
btnName: '查看详情',
}
: undefined,
// this.$auth.hasPermi('equipment:check-setting:update')
// ? {
// type: 'detail',
// btnName: '',
// }
// : undefined,
this.$auth.hasPermi('equipment:check-setting:delete')
? {
type: 'delete',
@ -93,29 +93,61 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
{ prop: 'name', label: '配置名', width: 110, showOverflowtooltip: true },
{ prop: 'code', label: '编码', minWidth: 150, showOverflowtooltip: true },
{ prop: 'lineName', label: '产线', showOverflowtooltip: true },
{ prop: 'sectionName', label: '工段', showOverflowtooltip: true },
{ prop: 'equipmentName', label: '设备', showOverflowtooltip: true },
{ prop: 'equipmentCode', label: '设备编码', minWidth: 150, showOverflowtooltip: true },
{
prop: 'name',
label: '巡检单名称',
width: 110,
showOverflowtooltip: true,
},
{
prop: 'code',
label: '巡检单编码',
minWidth: 150,
showOverflowtooltip: true,
},
{ prop: 'department', label: '部门', showOverflowtooltip: true },
{
prop: 'planCheckTime',
label: '计划巡检时间',
width: 150,
filter: parseTime,
},
{
prop: 'checkPeriod',
label: '巡检频率(天/次)',
width: 150,
showOverflowtooltip: true,
},
{
prop: 'confirmTimeLimit',
label: '确认时限',
showOverflowtooltip: true,
},
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
{ prop: 'creator', label: '创建人', showOverflowtooltip: true },
{
prop: 'createTime',
label: '创建时间',
width: 150,
filter: parseTime,
},
// { prop: 'responsible', label: '' },
{ prop: 'checkNumber', label: '巡检条数' }, // TODO:
{ prop: 'remark', label: '备注' }, // TODO:
],
searchBarFormConfig: [
{
type: 'input',
label: '配置名称',
placeholder: '请输入配置名称',
label: '巡检单名称',
placeholder: '请输入巡检单名称',
param: 'name',
},
{
type: 'select',
label: '设备名称',
placeholder: '请选择设备',
param: 'equipmentId',
filterable: true,
},
// {
// type: 'select',
// label: '',
// placeholder: '',
// param: 'equipmentId',
// filterable: true,
// },
{
type: 'button',
btnName: '查询',
@ -174,7 +206,11 @@ export default {
clearable: true,
},
rules: [
{ required: true, message: '设备名称不能为空', trigger: 'change' },
{
required: true,
message: '设备名称不能为空',
trigger: 'change',
},
],
},
{
@ -192,24 +228,28 @@ export default {
pageSize: 10,
equipmentId: null,
name: null,
special: false,
status: 0,
},
//
form: {},
basePath: '/base/equipment-check-config',
basePath: '/base/equipment-check-order',
mode: null,
groupList: [],
};
},
created() {
this.initSearchBar();
this.getList();
this.getGroup();
},
methods: {
handleConfirm() {
this.$refs.add.dataFormSubmit()
this.$refs.add.dataFormSubmit();
},
successSubmit() {
this.cancel()
this.getList()
this.cancel();
this.getList();
},
initSearchBar() {
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
@ -223,6 +263,11 @@ export default {
);
});
},
getGroup() {
groupClassesListAll().then((res) => {
this.groupList = res.data || [];
});
},
/** 查询列表 */
getList() {
this.loading = true;
@ -235,9 +280,9 @@ export default {
},
/** 取消按钮 */
cancel() {
this.$refs.add.formClear()
this.$refs.add.formClear();
this.open = false;
this.title = ''
this.title = '';
// this.reset();
},
/** 表单重置 */

View File

@ -0,0 +1,444 @@
<!--
filename: PlanConfig--addContent.vue
author: liubin
date: 2024-02-04 09:40:04
description:
-->
<template>
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="true"
class="drawer"
custom-class="mes-drawer"
size="60%">
<SmallTitle slot="title">
{{
mode.includes('detail')
? '详情'
: mode.includes('edit')
? '编辑'
: '新增'
}}
</SmallTitle>
<div class="drawer-body flex">
<div class="drawer-body__content">
<section>
<!-- <SmallTitle>保养信息</SmallTitle> -->
<div class="form-part" style="margin-bottom: 32px">
<el-skeleton v-if="!showForm" animated />
<el-form
v-else
ref="form"
:model="form"
label-position="top"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="8">
<div class="blodTip">计划保养人员</div>
<div class="lightTip">{{ form.planMaintainWorker }}</div>
<!-- <el-form-item label="计划保养人员" prop="planMaintainWorker">
<span>{{ form.planMaintainWorker }}</span>
</el-form-item> -->
</el-col>
<el-col :span="8">
<div class="blodTip">实际保养人员</div>
<div class="lightTip">{{ form.maintainWorker }}</div>
<!-- <el-form-item label="实际保养人员" prop="maintainWorker">
<span>{{ form.maintainWorker }}</span>
</el-form-item> -->
</el-col>
</el-row>
</el-form>
</div>
</section>
<el-divider />
<section>
<SmallTitle>保养详情</SmallTitle>
<div style="margin-top: 12px; position: relative">
<base-table
v-loading="detailLoading"
:table-props="detailTableProps"
:page="detailTableQuery.pageNo || 1"
:limit="detailTableQuery.pageSize || 10"
:table-data="detailList"
@emitFun="handleDetailTableAction">
<!-- <method-btn
slot="handleBtn"
label="操作"
width="100"
:method-list="detailTableBtns"
@clickBtn="handleDetailTableBtnClicked" /> -->
</base-table>
<!-- 分页组件 -->
<pagination
v-show="detailTotal > 0"
:total="detailTotal"
:page.sync="detailTableQuery.pageNo"
:limit.sync="detailTableQuery.pageSize"
@pagination="refreshDetailList" />
</div>
</section>
</div>
</div>
<!-- <div class="drawer-body__footer"> -->
<!-- <el-button style="" @click="cancel">返回</el-button> -->
<!-- <el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
编辑
</el-button>
<el-button v-else type="primary" @click="confirm">保存</el-button> -->
<!-- </div> -->
<!-- 属性对话框 -->
<base-dialog
dialogTitle="保养详情"
:dialogVisible="detailAddVisible"
width="35%"
:append-to-body="true"
custom-class="baseDialog"
@close="closeDetailForm"
@cancel="closeDetailForm"
@confirm="submitDetailForm">
<DialogForm
v-if="detailAddVisible"
ref="detailForm"
v-model="detailForm"
:rows="detailRows" />
</base-dialog>
</el-drawer>
</template>
<script>
import DialogForm from '@/components/DialogForm';
const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default {
name: 'PlanConfig--addContent',
components: { SmallTitle, DialogForm },
props: ['maintainData'],
data() {
return {
visible: false,
mode: 'detail',
showForm: false,
form: {
id: null,
maintainWorker: null,
planMaintainWorker: null,
},
formLoading: false,
equipmentOptions: [],
detailList: [],
detailAddVisible: false,
detailPageProps: ['equipmentName', 'program'],
detailForm: {
planId: null,
equipmentId: null,
program: '',
maintenanceDes: '',
remark: '',
},
detailRows: [
[
{
select: true,
label: '设备',
prop: 'equipmentId',
options: [],
rules: [
{ required: true, message: '设备不能为空', trigger: 'blur' },
],
},
],
[
{
input: true,
label: '保养项目',
prop: 'program',
rules: [
{ required: true, message: '保养项目不能为空', trigger: 'blur' },
],
},
],
[
{
input: true,
label: '保养描述',
prop: 'maintenanceDes',
rules: [
{ required: true, message: '包养描述不能为空', trigger: 'blur' },
],
},
],
],
detailLoading: false,
detailTableProps: [
{ prop: 'equipmentName', label: '设备名称' },
{ prop: 'program', label: '保养项目' },
{ prop: 'maintenanceDes', label: '保养描述' },
// { prop: 'remark', label: '' },
],
detailTableQuery: {
pageNo: 1,
pageSize: 10,
},
detailTableBtns: [
{
type: 'edit',
btnName: '编辑',
},
{
type: 'delete',
btnName: '删除',
},
],
detailTotal: 0,
detailList: [],
equipmentList: [],
};
},
computed: {},
mounted() {
this.loadEquipments();
},
methods: {
handleColse() {},
show({ planMaintainWorker, id, maintainWorker }) {
this.form = Object.assign(
{},
{
planMaintainWorker,
id,
maintainWorker,
}
);
this.$nextTick(() => {
this.refreshDetailList();
});
this.visible = true;
this.showForm = true;
},
cancel() {
this.visible = false;
setTimeout(() => {
this.$emit('closed');
}, 500);
},
confirm() {
this.cancel();
},
toggleEdit() {
this.mode == 'edit' ? 'detail' : 'edit';
},
async loadEquipments() {
// TODO: //100...
const res = await this.$axios('/base/core-equipment/page', {
params: {
pageNo: 1,
pageSize: 100,
special: false,
},
});
this.equipmentList = res.data?.list || [];
this.detailRows[0][0].options = (res.data?.list || []).map((item) => ({
label: item.name,
value: item.id,
}));
},
closeDetailForm() {
this.detailAddVisible = false;
},
async submitDetailForm() {
// validation
this.$refs.detailForm.validate(async (valid) => {
if (!valid) return;
const res = await this.$axios[this.detailForm.id ? 'put' : 'post'](
`/base/equipment-maintain-log-det/create/${
this.detailForm.id ? 'update' : 'create'
}`,
{
...this.detailForm,
logId: this.form.id,
}
);
if (res.code == 0) {
this.detailAddVisible = false;
this.$message.success('添加成功');
this.refreshDetailList();
} else {
this.detailAddVisible = false;
this.$message.error('出错');
}
});
},
async refreshDetailList() {
this.detailLoading = true;
if (!this.form.id) {
this.$message.info('没有找到保养计划相关信息...');
this.detailLoading = false;
}
try {
const res = await this.$axios(
'/base/equipment-maintain-log-det/page',
{
params: {
pageNo: this.detailTableQuery.pageNo,
pageSize: this.detailTableQuery.pageSize,
// planId: this.form.id,
logId: this.form.id,
},
}
);
this.detailList = res.data?.list || [];
this.detailTotal = res.data?.total || 0;
this.detailLoading = false;
} catch (err) {
this.detailLoading = false;
}
},
//
handleDetailTableAction() {},
handleDetailTableBtnClicked({ data, type }) {
switch (type) {
case 'edit':
const { id, equipmentId, planId, program, maintenanceDes, remark } =
data;
this.detailAddVisible = true;
this.$nextTick(() => {
this.detailForm = Object.assign(
{},
{
id,
equipmentId,
planId,
program,
maintenanceDes,
remark,
}
);
});
break;
case 'delete':
if (!data.id) return;
this.$confirm('确认移除该详情吗?', '提示', {
confirmButtonText: '确 认',
cancelButtonText: '取 消',
})
.then(async () => {
const res = await this.$axios.delete(
'/base/equipment-maintain-plan-det/delete',
{
params: {
id: data.id,
},
}
);
if (res.code == 0) {
this.$message.success('删除成功!');
this.refreshDetailList();
}
})
.catch(console.error);
break;
case 'detail':
this.handleDetail(data);
break;
default:
this.handleTableActions({ data, type });
}
},
handleAddDetail() {
this.detailAddVisible = true;
},
},
};
</script>
<style scoped>
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
}
.drawer >>> .el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
margin-bottom: 0px;
}
.small-title::before {
content: '';
display: inline-block;
vertical-align: top;
width: 4px;
height: 22px;
border-radius: 1px;
margin-right: 8px;
background-color: #0b58ff;
}
.drawer-body {
display: flex;
flex-direction: column;
height: calc(100% - 72px);
}
.drawer-body__content {
flex: 1;
/* background: #eee; */
padding: 20px 30px;
overflow-y: auto;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
}
.blodTip {
height: 16px;
font-size: 14px;
font-weight: 600;
color: rgba(0,0,0,0.85);
margin-bottom: 8px;
}
.lightTip {
/* height: 16px; */
font-size: 14px;
font-weight: 400;
color: rgba(102,102,102,0.75);
margin-bottom: 12px;
}
</style>

View File

@ -0,0 +1,368 @@
<!--
filename: dialogForm.vue
author: liubin
date: 2023-08-15 10:32:36
description: 弹窗的表单组件
-->
<template>
<el-form
ref="form"
:model="form"
:size="size"
:label-position="labelPosition"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="设备保养单号"
prop="maintainOrderNumber"
:rules="[
{ required: true, message: '请输入设备保养单号', trigger: 'blur' },
]">
<el-input
v-model="form.maintainOrderNumber"
@change="$emit('update', form)"
:placeholder="`请输入保养计划单号`"
:disabled="disabled" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="保养计划名称" prop="name">
<el-input value="---" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="部门"
prop="departmentId"
:rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
<el-select
v-model="form.departmentId"
:placeholder="`请选择部门`"
:disabled="disabled"
clearable
filterable
@change="$emit('update', form)">
<el-option
v-for="opt in departmentOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
<!-- <el-form-item
label="设备大类"
prop="equipmentCategory"
:rules="[
{ required: true, message: '请选择设备大类', trigger: 'blur' },
]">
<el-select
v-model="form.equipmentCategory"
:placeholder="`请选择设备大类`"
:disabled="disabled"
@change="handleEqTypeChange">
<el-option
v-for="opt in equipmentTypeOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item> -->
</el-col>
<el-col :span="12">
<el-form-item
label="产线"
prop="lineId"
:rules="[{ required: true, message: '请选择产线', trigger: 'blur' }]">
<el-select
v-model="form.lineId"
:placeholder="`请选择产线`"
:disabled="disabled"
clearable
filterable
@change="$emit('update', form)">
<el-option
v-for="opt in lineOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计划保养人员" prop="maintainer">
<el-input value="---" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计划开始时间" prop="planStartTime">
<el-input value="---" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计划结束时间" prop="planEndTime">
<el-input value="---" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="实际开始时间"
prop="startTime"
:rules="[
{ required: true, message: '请选择实际开始时间', trigger: 'blur' },
]">
<el-date-picker
v-model="form.startTime"
type="datetime"
:disabled="edit"
placeholder="请选择实际开始时间"
@change="$emit('update', form)"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="实际结束时间"
prop="endTime"
:rules="[
{ required: true, message: '请选择实际结束时间', trigger: 'blur' },
]">
<el-date-picker
v-model="form.endTime"
type="datetime"
:disabled="edit"
placeholder="请选择实际结束时间"
@change="$emit('update', form)"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="实际保养人员"
prop="maintainWorker"
:rules="[
{ required: true, message: '请选择实际保养人员', trigger: 'blur' },
]">
<el-select
v-model="form.maintainWorker"
:placeholder="`请选择实际保养人员`"
:disabled="disabled"
multiple
clearable
filterable
@change="$emit('update', form)">
<el-option
v-for="opt in maintainerOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
@change="$emit('update', form)"
:placeholder="`请输入备注`"
:disabled="disabled" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
export default {
name: 'DialogForm',
model: {
prop: 'dataForm',
event: 'update',
},
emits: ['update'],
components: {},
props: {
rows: {
type: Array,
default: () => [],
},
dataForm: {
type: Object,
default: () => ({}),
},
disabled: {
type: Boolean,
default: false,
},
edit: {
type: Boolean,
default: false,
},
hasFiles: {
type: Boolean | Array,
default: false,
},
labelPosition: {
type: String,
default: 'right',
},
size: {
type: String,
default: '',
},
},
data() {
return {
form: {},
formLoading: true,
lineList: [],
maintainerList: [],
departmentList: [],
};
},
watch: {
dataForm: {
handler(val) {
this.form = JSON.parse(JSON.stringify(val));
if (typeof val.maintainer == 'string')
this.form.maintainer = val.maintainer.split(',');
if (this.form.equipmentCategory != null) {
setTimeout(() => {
this.equipmentOptions = this.equipmentList
.filter((item) => item.special)
.filter(
(item) => item.specialType === this.form.equipmentCategory
)
.map((item) => ({ label: item.name, value: item.id }));
}, 1000);
}
if (this.hasFiles) {
if (typeof this.hasFiles == 'boolean' && this.hasFiles) {
this.form.files = this.form.files ?? [];
} else if (Array.isArray(this.hasFiles)) {
this.hasFiles.forEach((prop) => {
this.form[prop] = this.form[prop] ?? [];
});
}
}
},
deep: true,
immediate: true,
},
},
mounted() {
// !this.edit && this.getCode('/base/equipment-maintain-log/getCode');
this.getList('maintainer');
this.getList('department');
this.getList('line');
},
computed: {
departmentOptions() {
return (this.departmentList || []).map((item) => ({
id: item.id,
label: item.name,
value: item.id,
}));
},
lineOptions() {
return (this.lineList || []).map((item) => ({
id: item.id,
label: item.name,
value: item.id,
}));
},
maintainerOptions() {
return (this.maintainerList || []).map((item) => ({
id: item.id,
label: item.name,
value: item.name,
}));
},
},
methods: {
/** 模拟透传 ref */
validate(cb) {
return this.$refs.form.validate(cb);
},
resetFields(args) {
return this.$refs.form.resetFields(args);
},
// getCode
async getCode(url) {
this.formLoading = true;
const response = await this.$axios(url);
this.formLoading = false;
this.form.maintainOrderNumber = response.data || '';
},
// initialize
async getEquipmentList() {
this.formLoading = true;
const response = await this.$axios('/base/core-equipment/listAll');
this.equipmentList = response.data || [];
this.equipmentOptions = (response.data || []).map((item) => ({
label: item.name,
value: item.id,
}));
this.formLoading = false;
},
async getList(source = 'department') {
const urls = [
'/base/core-production-line/listAll',
'/base/core-department/listAll',
'/base/core-worker/listAll',
];
let res;
switch (source) {
case 'department':
res = await this.$axios(urls[1]);
this.departmentList = res.data || [];
break;
case 'maintainer':
res = await this.$axios(urls[2]);
this.maintainerList = res.data || [];
break;
case 'line':
res = await this.$axios(urls[0]);
this.lineList = res.data || [];
break;
}
this.formLoading = false;
},
// handlers
handleEqTypeChange(type) {
this.form.equipmentId = null;
if (type) {
this.equipmentOptions = this.equipmentList
.filter((item) => item.special)
.filter((item) => item.specialType === type)
.map((item) => ({ label: item.name, value: item.id }));
} else
this.equipmentOptions = this.equipmentList.map((item) => ({
label: item.name,
value: item.id,
}));
// this.$emit('update', this.form)
},
},
};
</script>
<style scoped lang="scss">
.el-date-editor,
.el-select {
width: 100%;
}
</style>

View File

@ -0,0 +1,758 @@
<!--
filename: WaitingListUnplanned--edit.vue
author: liubin
date: 2023-08-22 14:38:56
description:
-->
<template>
<el-drawer
:visible="visible"
:show-close="false"
:wrapper-closable="false"
class="drawer"
custom-class="mes-drawer"
size="60%"
@closed="$emit('destroy')">
<SmallTitle slot="title">编辑</SmallTitle>
<div class="drawer-body flex">
<div class="drawer-body__content">
<div class="form-part" style="margin-bottom: 32px">
<!-- <el-skeleton v-if="!showForm" animated /> -->
<el-form
class="equipment-info-form"
ref="form"
:model="form"
label-width="200px"
label-position="top"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="保养计划单号" prop="maintainOrderNumber">
<!-- :rules="[
{
required: true,
message: '请输入保养计划单号',
trigger: 'blur',
},
]" -->
<el-input
v-model="form.maintainOrderNumber"
disabled
:placeholder="`请输入保养计划单号`" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="保养计划名称" prop="planName">
<el-input
v-model="form.planName"
placeholder="请输入保养计划名称"
disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="部门" prop="departmentId">
<!-- :rules="[
{ required: true, message: '请选择部门', trigger: 'blur' },
]" -->
<el-select
v-model="form.departmentId"
:placeholder="`请选择部门`"
clearable
disabled
filterable>
<el-option
v-for="opt in departmentOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产线" prop="lineId">
<!-- :rules="[
{ required: true, message: '请选择产线', trigger: 'blur' },
]" -->
<el-select
v-model="form.lineId"
:placeholder="`请选择产线`"
disabled
clearable
filterable>
<el-option
v-for="opt in lineOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划保养人员" prop="maintainer">
<el-select
v-model="form.planMaintainWorker"
placeholder="请选择计划保养人员"
disabled
clearable
filterable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划开始时间" prop="planStartTime">
<el-date-picker
v-model="form.planStartTime"
type="datetime"
disabled
placeholder="请选择计划开始时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划结束时间" prop="planEndTime">
<el-date-picker
v-model="form.planEndTime"
type="datetime"
disabled
placeholder="请选择计划结束时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="实际开始时间"
prop="startTime"
:rules="[
{
required: true,
message: '请选择实际开始时间',
trigger: 'blur',
},
]">
<el-date-picker
v-model="form.startTime"
type="datetime"
placeholder="请选择实际开始时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="实际结束时间"
prop="endTime"
:rules="[
{
required: true,
message: '请选择实际结束时间',
trigger: 'blur',
},
]">
<el-date-picker
v-model="form.endTime"
type="datetime"
placeholder="请选择实际结束时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="实际保养人员"
prop="maintainWorker"
:rules="[
{
required: true,
message: '请选择实际保养人员',
trigger: 'blur',
},
]">
<el-select
v-model="form.maintainWorker"
:placeholder="`请选择实际保养人员`"
multiple
clearable
filterable>
<el-option
v-for="opt in maintainerOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" :placeholder="`请输入备注`" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<SmallTitle>保养内容</SmallTitle>
<div style="margin-top: 12px; position: relative">
<SearchBar
:formConfigs="searchBarFormConfig"
ref="attr-search-bar"
@headBtnClick="handleSearchBarBtnClick" />
</div>
<div style="margin-top: 12px; position: relative">
<div style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i>
添加属性
</el-button>
</div>
<base-table
v-loading="attrListLoading"
:table-props="attrTableProps"
:page="attrQuery?.params.pageNo || 1"
:limit="attrQuery?.params.pageSize || 10"
:table-data="attrList"
@emitFun="handleEmitFun">
<method-btn
slot="handleBtn"
label="操作"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<!-- 分页组件 -->
<pagination
v-show="attrTotal > 0"
:total="attrTotal"
:page.sync="attrQuery.params.pageNo"
:limit.sync="attrQuery.params.pageSize"
@pagination="getAttrList" />
</div>
</div>
<div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleConfirm">保存</el-button>
<!-- sections的第二项必须是 属性列表 -->
<!-- <el-button
v-if="sections[1].allowAdd"
type="primary"
@click="handleAddAttr">
添加属性
</el-button> -->
</div>
</div>
<!-- 属性对话框 -->
<base-dialog
:dialogTitle="attrTitle"
:dialogVisible="attrFormVisible"
width="35%"
:append-to-body="true"
custom-class="baseDialog"
@close="closeAttrForm"
@cancel="closeAttrForm"
@confirm="submitAttrForm">
<DialogForm
v-if="attrFormVisible"
ref="attrForm"
v-model="attrForm"
:rows="attrRows" />
</base-dialog>
</el-drawer>
</template>
<script>
import DialogForm from '../../../../../components/DialogForm/index.vue';
const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default {
components: { SmallTitle, DialogForm },
props: ['dataId'], // dataId id
data() {
return {
visible: false,
btnLoading: false,
form: {},
formLoading: false,
lineList: [],
maintainerList: [],
departmentList: [],
attrTableProps: [
{
prop: 'equipmentName',
label: '设备名称',
},
{
prop: 'program',
label: '保养项目',
},
{
prop: 'maintenanceDes',
label: '保养描述',
},
],
attrList: [],
attrTotal: 0,
attrTitle: '',
attrForm: {
id: null,
logId: null,
program: null,
maintenanceDes: null,
remark: null,
},
attrFormVisible: false,
attrRows: [
[
{
select: true,
label: '设备名称',
prop: 'equipmentId',
url: '/base/core-equipment/page?pageNo=1&pageSize=100&special=false',
// method: 'post',
// queryParams: {
// pageNo: 1,
// pageSize: 100,
// special: true,
// },
rules: [
{ required: true, message: '设备不能为空', trigger: 'blur' },
],
},
],
[
{
input: true,
label: '保养项目',
prop: 'program',
},
],
[
{
input: true,
label: '保养描述',
prop: 'maintenanceDes',
},
],
[
{
input: true,
label: '备注',
prop: 'remark',
},
],
],
attrQuery: {
params: {
pageNo: 1,
pageSize: 10,
equipmentName: null,
},
}, //
searchBarFormConfig: [
{
type: 'input',
label: '设备',
placeholder: '请输入设备名称',
param: 'equipmentName',
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
],
attrFormSubmitting: false,
attrListLoading: false,
// syncFileListFlag: null,
tableBtn: [
{
type: 'edit',
btnName: '编辑',
},
{
type: 'delete',
btnName: '删除',
},
],
row: null,
};
},
computed: {
departmentOptions() {
return (this.departmentList || []).map((item) => ({
id: item.id,
label: item.name,
value: item.id,
}));
},
lineOptions() {
return (this.lineList || []).map((item) => ({
id: item.id,
label: item.name,
value: item.id,
}));
},
maintainerOptions() {
return (this.maintainerList || []).map((item) => ({
id: item.id,
label: item.name,
value: item.name,
}));
},
},
mounted() {
this.getList('maintainer');
this.getList('department');
this.getList('line');
},
methods: {
handleSearchBarBtnClick(btn) {
switch (btn.btnName) {
case 'search':
this.attrQuery.params.equipmentName = btn.equipmentName;
this.getAttrList();
break;
}
},
handleTableBtnClick({ type, data }) {
switch (type) {
case 'edit':
this.handleEditAttr(data.id);
break;
case 'delete':
this.handleDeleteAttr(data.id);
break;
}
},
async handleConfirm() {
this.btnLoading = true;
this.$nextTick(async () => {
const { code, data } = await this.$axios({
url: '/base/equipment-maintain-log/update',
method: 'put',
data: {
...this.form,
maintainWorker: this.form.maintainWorker.join(','),
planMaintainWorker: this.form.planMaintainWorker?.join(','),
},
});
if (code == 0) {
this.$modal.msgSuccess('更新成功');
}
this.btnLoading = false;
this.$emit('refreshDataList');
this.handleCancel();
});
},
handleEmitFun(val) {
console.log('handleEmitFun', val);
},
init(row) {
this.visible = true;
this.row = row;
this.getInfo(row);
this.getAttrList(row);
},
async getInfo(row) {
this.formLoading = true;
const res = await this.$axios(
'/base/equipment-maintain-log/get?id=' + row.id
);
if (res.code == 0) {
this.form = res.data;
this.form.maintainWorker = res.data.maintainWorker.split(',');
this.form.planMaintainWorker = res.data.planMaintainWorker?.split(',');
this.formLoading = false;
}
this.formLoading = false;
},
async getAttrList(row, condition = {}) {
if (!row) row = this.row;
this.attrListLoading = true;
const res = await this.$axios({
url: '/base/equipment-maintain-log-det/page',
method: 'get',
params: {
...this.attrQuery.params,
logId: row.id,
...condition,
},
});
if (res.code == 0) {
this.attrList = res.data.list;
this.attrTotal = res.data.total;
}
this.attrListLoading = false;
},
async getList(source = 'department') {
const urls = [
'/base/core-production-line/listAll',
'/base/core-department/listAll',
'/base/core-worker/listAll',
];
let res;
switch (source) {
case 'department':
res = await this.$axios(urls[1]);
this.departmentList = res.data || [];
break;
case 'maintainer':
res = await this.$axios(urls[2]);
this.maintainerList = res.data || [];
break;
case 'line':
res = await this.$axios(urls[0]);
this.lineList = res.data || [];
break;
}
this.formLoading = false;
},
//
handleSave() {
this.$refs.form.validate(async (valid) => {
if (valid) {
await this.$axios({
url: '/urlupdate', // this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
method: 'post', // isEdit ? 'put' : 'post',
data: this.form,
});
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
this.visible = false;
this.$emit('refreshDataList');
}
});
},
handleCancel() {
this.visible = false;
},
resetAttrform() {
this.attrForm = {
id: null,
logId: this.row.id,
maintenanceDes: '',
program: null,
remark: null,
};
},
//
handleAddAttr() {
if (!this.row.id) return this.$message.error('请先选中保养记录');
this.resetAttrform();
this.attrTitle = '添加属性';
this.attrFormVisible = true;
},
//
async handleEditAttr(attrId) {
const res = await this.$axios({
url: '/base/equipment-maintain-log-det/get',
method: 'get',
params: { id: attrId },
});
if (res.code == 0) {
this.attrForm = res.data;
this.attrTitle = '编辑属性';
this.attrFormVisible = true;
}
},
//
handleDeleteAttr(attrId) {
this.$confirm('确定删除该保养内容?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
const res = await this.$axios({
url: '/base/equipment-maintain-log-det/delete?id=' + attrId,
method: 'delete',
});
if (res.code == 0) {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getAttrList();
},
});
}
})
.catch(() => {});
},
//
submitAttrForm() {
this.$refs['attrForm'].validate(async (valid) => {
if (!valid) {
return;
}
try {
const isEdit = this.attrForm.id != null;
this.attrFormSubmitting = true;
const res = await this.$axios({
url: isEdit
? '/base/equipment-maintain-log-det/update'
: '/base/equipment-maintain-log-det/create',
method: isEdit ? 'put' : 'post',
data: this.attrForm,
});
if (res.code == 0) {
this.closeAttrForm();
this.$message({
message: `${isEdit ? '更新' : '创建'}成功`,
type: 'success',
duration: 1500,
onClose: () => {
this.getAttrList();
},
});
}
this.attrFormSubmitting = false;
} catch (err) {
this.$message({
message: err,
type: 'error',
duration: 1500,
});
this.attrFormSubmitting = false;
}
});
},
closeAttrForm() {
this.attrFormVisible = false;
},
handleClick(raw) {
if (raw.type === 'delete') {
this.$confirm(
`确定对${
raw.data.name
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
deleteProductAttr(raw.data.id).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getList();
},
});
});
})
.catch(() => {});
} else {
this.addNew(raw.data.id);
}
},
},
};
</script>
<style scoped>
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
}
.drawer >>> .el-date-editor,
.drawer >>> .el-select {
width: 100%;
}
.drawer >>> .el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
margin-bottom: 0px;
}
.small-title::before {
content: '';
display: inline-block;
vertical-align: top;
width: 4px;
height: 22px;
border-radius: 1px;
margin-right: 8px;
background-color: #0b58ff;
}
.drawer-body {
display: flex;
flex-direction: column;
height: 100%;
}
.drawer-body__content {
flex: 1;
/* background: #eee; */
padding: 20px 30px;
overflow-y: auto;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
}
</style>

View File

@ -0,0 +1,307 @@
<!--
filename: WaitingListTable.vue
author: liubin
date: 2024-02-05 16:12:55
description:
-->
<template>
<el-table
:data="tableDataWithIndex"
:border="true"
@selection-change="handleSelectionChange"
style="width: 100%"
:header-cell-style="{
background: '#f2f4f9',
color: '#606266',
}"
class="waiting-list-table">
<el-table-column
type="selection"
:width="50"
:selectable="checkSelectable" />
<el-table-column prop="_pageIndex" width="80" align="center">
<template slot="header">
<el-popover placement="bottom-start" width="300" trigger="click">
<div class="setting-box" style="max-height: 400px; overflow-y: auto">
<el-checkbox
v-for="(item, index) in tablePropsLabelList"
:key="'cb' + index"
v-model="selectedBox[index]"
:label="item.label" />
</div>
<i slot="reference" class="el-icon-s-tools" />
</el-popover>
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[0]"
width="128"
label="设备保养单号"
prop="maintainOrderNumber"></el-table-column>
<el-table-column v-if="selectedBox[1]" width="128" label="保养计划名称" prop="planName">
<template slot-scope="scope">
{{ scope.row.planName || '---' }}
</template>
</el-table-column>
<el-table-column v-if="selectedBox[2]" label="部门" prop="departmentName">
<template slot-scope="scope">
{{ scope.row.departmentName || '---' }}
</template>
</el-table-column>
<el-table-column v-if="selectedBox[3]" label="产线名" prop="lineName">
<template slot-scope="scope">
{{ scope.row.lineName || '---' }}
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[4]"
width="150"
label="计划开始时间"
prop="planStartTime">
<template slot-scope="scope">
{{ scope.row.planStartTime | timeFilter }}
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[5]"
width="150"
label="计划结束时间"
prop="planEndTime">
<template slot-scope="scope">
{{ scope.row.planEndTime | timeFilter }}
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[6]"
width="150"
label="实际开始时间"
prop="startTime">
<template slot-scope="scope">
{{ scope.row.startTime | timeFilter }}
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[7]"
width="150"
label="实际结束时间"
prop="endTime">
<template slot-scope="scope">
{{ scope.row.endTime | timeFilter }}
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[8]"
width="150"
label="确认截止时间"
prop="confirmDueTime">
<template slot-scope="scope">
{{ scope.row.confirmDueTime | timeFilter }}
</template>
</el-table-column>
<el-table-column
v-if="selectedBox[9]"
width="150"
label="保养计划类型"
prop="relatePlan">
<template slot-scope="scope">
{{ scope.row.relatePlan | relatePlanFilter }}
</template>
</el-table-column>
<!-- <el-table-column v-if="selectedBox[10]" width="60" label="详情">
<template slot-scope="scope">
<el-button type="text" @click="handelDetail(scope.row)">详情</el-button>
</template>
</el-table-column> -->
<!-- btns -->
<el-table-column width="188" label="操作">
<template slot-scope="scope">
<el-tooltip content="确认" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
:disabled="!checkSelectable(scope.row)"
@click="$emit('confirm', scope.row)">
确认
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="查看详情" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@click="$emit('detail', scope.row)">
<i class="iconfont icon-detail primary-color" />
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="编辑" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@click="$emit('edit', scope.row)">
<i class="iconfont icon-edit primary-color" />
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="删除" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@click="$emit('delete', scope.row)">
<i class="iconfont icon-delete delete-color" />
</el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</template>
<script>
import moment from 'moment';
export default {
name: 'WaitingListTable',
components: {},
props: ['tableData', 'page', 'limit'],
filters: {
timeFilter: (val) =>
val ? moment(val).format('yyyy-MM-DD HH:mm:ss') : '---',
relatePlanFilter: (val) =>
val != null ? ['-', '计划型', '非计划型'][val] : '-',
},
data() {
return {
tablePropsLabelList: [
{
label: '设备保养单号',
},
{
label: '保养计划名称',
},
{
label: '部门',
},
{
label: '产线名',
},
{
label: '计划开始时间',
},
{
label: '计划结束时间',
},
{
label: '实际开始时间',
},
{
label: '实际结束时间',
},
{
label: '确认截止时间',
},
{
label: '保养计划类型',
},
{
label: '详情',
},
],
selectedBox: [
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
],
selectedPlan: [],
};
},
computed: {
tableDataWithIndex() {
return this.tableData.map((item, index) => ({
...item,
_pageIndex: (this.page - 1) * this.limit + index + 1,
}));
},
},
methods: {
checkSelectable(row, index) {
return (
row.relatePlan == 2 ||
(row.relatePlan == 1 &&
(!row.confirmDueTime || +row.confirmDueTime >= new Date().getTime()))
);
},
handleSelectionChange(val) {
this.selectedPlan = val;
},
handleDelete(row) {},
handleDetail(row) {},
handleEdit(row) {},
handleConfirm(row) {},
},
};
</script>
<style scoped>
@import './iconfont/iconfont.css';
.delete-color {
color: #ff5454;
}
.primary-color {
color: #0b58ff;
}
.baseTable .show-col-btn {
margin-right: 5px;
line-height: inherit;
cursor: pointer;
}
.baseTable .el-icon-refresh {
cursor: pointer;
}
</style>
<style>
.waiting-list-table .el-table__body tr.current-row > td.el-table__cell {
background-color: #eaf1fc;
}
.waiting-list-table.el-table .el-table__cell {
padding: 0;
height: 35px;
}
.waiting-list-table .addButton {
width: 100%;
height: 35px;
border-top: none;
color: #0b58ff;
border-color: #ebeef5;
border-radius: 0;
}
.waiting-list-table .addButton:hover {
color: #0b58ff;
border-color: #ebeef5;
background-color: #fff;
}
.waiting-list-table .addButton:focus {
border-color: #ebeef5;
background-color: #fff;
}
.el-tooltip__popper.is-dark {
background: rgba(0, 0, 0, 0.6) !important;
}
.el-tooltip__popper .popper__arrow,
.el-tooltip__popper .popper__arrow::after {
border-top-color: rgba(0, 0, 0, 0.4) !important;
}
</style>

View File

@ -0,0 +1,838 @@
<!--
filename: WaitingListUnplanned--edit.vue
author: liubin
date: 2023-08-22 14:38:56
description:
-->
<template>
<el-drawer
:visible="visible"
:show-close="false"
:wrapper-closable="false"
class="drawer"
custom-class="mes-drawer"
size="60%"
@closed="$emit('destroy')">
<SmallTitle slot="title">{{ showTable ? '编辑' : '新增' }}</SmallTitle>
<div class="drawer-body flex">
<div class="drawer-body__content">
<div class="form-part" style="margin-bottom: 32px">
<!-- <el-skeleton v-if="!showForm" animated /> -->
<el-form
class="equipment-info-form"
ref="form"
:model="form"
label-width="200px"
label-position="top"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item
label="保养计划单号"
prop="maintainOrderNumber"
:rules="[
{
required: true,
message: '请输入保养计划单号',
trigger: 'blur',
},
]">
<el-input
v-model="form.maintainOrderNumber"
:placeholder="`请输入保养计划单号`" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="保养计划名称" prop="name">
<el-input value="---" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="部门"
prop="departmentId"
:rules="[
{ required: true, message: '请选择部门', trigger: 'blur' },
]">
<el-select
v-model="form.departmentId"
:placeholder="`请选择部门`"
clearable
filterable>
<el-option
v-for="opt in departmentOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="产线"
prop="lineId"
:rules="[
{ required: true, message: '请选择产线', trigger: 'blur' },
]">
<el-select
v-model="form.lineId"
:placeholder="`请选择产线`"
clearable
filterable>
<el-option
v-for="opt in lineOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划保养人员" prop="maintainer">
<el-input value="---" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划开始时间" prop="planStartTime">
<el-input value="---" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划结束时间" prop="planEndTime">
<el-input value="---" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="实际开始时间"
prop="startTime"
:rules="[
{
required: true,
message: '请选择实际开始时间',
trigger: 'blur',
},
]">
<el-date-picker
v-model="form.startTime"
type="datetime"
placeholder="请选择实际开始时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="实际结束时间"
prop="endTime"
:rules="[
{
required: true,
message: '请选择实际结束时间',
trigger: 'blur',
},
]">
<el-date-picker
v-model="form.endTime"
type="datetime"
placeholder="请选择实际结束时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="实际保养人员"
prop="maintainWorker"
:rules="[
{
required: true,
message: '请选择实际保养人员',
trigger: 'blur',
},
]">
<el-select
v-model="form.maintainWorker"
:placeholder="`请选择实际保养人员`"
multiple
clearable
filterable>
<el-option
v-for="opt in maintainerOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" :placeholder="`请输入备注`" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div v-if="showTable">
<SmallTitle>保养内容</SmallTitle>
<div style="margin-top: 12px; position: relative">
<SearchBar
:formConfigs="searchBarFormConfig"
ref="attr-search-bar"
@headBtnClick="handleSearchBarBtnClick" />
</div>
<div style="margin-top: 12px; position: relative">
<div style="position: absolute; top: -40px; right: 0">
<el-button @click="handleAddAttr" type="text">
<i class="el-icon-plus"></i>
添加属性
</el-button>
</div>
<base-table
v-loading="attrListLoading"
:table-props="attrTableProps"
:page="attrQuery?.params.pageNo || 1"
:limit="attrQuery?.params.pageSize || 10"
:table-data="attrList"
@emitFun="handleEmitFun">
<method-btn
slot="handleBtn"
label="操作"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
<!-- 分页组件 -->
<pagination
v-show="attrTotal > 0"
:total="attrTotal"
:page.sync="attrQuery.params.pageNo"
:limit.sync="attrQuery.params.pageSize"
@pagination="getAttrList" />
</div>
</div>
</div>
<div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button>
<!-- 新增可确认 -->
<el-button v-if="isAdd" type="primary" @click="addConfirm">保存</el-button>
<el-button v-else type="primary" @click="handleConfirm">保存</el-button>
<!-- sections的第二项必须是 属性列表 -->
<!-- <el-button
v-if="sections[1].allowAdd"
type="primary"
@click="handleAddAttr">
添加属性
</el-button> -->
</div>
</div>
<!-- 属性对话框 -->
<base-dialog
:dialogTitle="attrTitle"
:dialogVisible="attrFormVisible"
width="35%"
:append-to-body="true"
custom-class="baseDialog"
@close="closeAttrForm"
@cancel="closeAttrForm"
@confirm="submitAttrForm">
<DialogForm
v-if="attrFormVisible"
ref="attrForm"
v-model="attrForm"
:rows="attrRows" />
</base-dialog>
</el-drawer>
</template>
<script>
import DialogForm from '../../../../../components/DialogForm/index.vue';
const SmallTitle = {
name: 'SmallTitle',
props: ['size'],
components: {},
data() {
return {};
},
methods: {},
render: function (h) {
return h(
'span',
{
class: 'small-title',
style: {
fontSize: '18px',
lineHeight:
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
fontWeight: 500,
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
},
},
this.$slots.default
);
},
};
export default {
components: { SmallTitle, DialogForm },
props: ['dataId'], // dataId id
data() {
return {
visible: false,
btnLoading: false,
showTable: false,
isAdd: false,
form: {},
formLoading: false,
lineList: [],
maintainerList: [],
departmentList: [],
attrTableProps: [
{
prop: 'equipmentName',
label: '设备名称',
},
{
prop: 'program',
label: '保养项目',
},
{
prop: 'maintenanceDes',
label: '保养描述',
},
],
attrList: [],
attrTotal: 0,
attrTitle: '',
attrForm: {
id: null,
logId: null,
program: null,
maintenanceDes: null,
remark: null,
},
attrFormVisible: false,
attrRows: [
[
{
select: true,
label: '设备名称',
prop: 'equipmentId',
url: '/base/core-equipment/page?pageNo=1&pageSize=100&special=false',
// method: 'post',
// queryParams: {
// pageNo: 1,
// pageSize: 100,
// special: true,
// },
rules: [
{ required: true, message: '设备不能为空', trigger: 'blur' },
],
},
],
[
{
input: true,
label: '保养项目',
prop: 'program',
},
],
[
{
input: true,
label: '保养描述',
prop: 'maintenanceDes',
},
],
[
{
input: true,
label: '备注',
prop: 'remark',
},
],
],
attrQuery: {
params: {
pageNo: 1,
pageSize: 10,
equipmentName: null,
},
}, //
searchBarFormConfig: [
{
type: 'input',
label: '设备',
placeholder: '请输入设备名称',
param: 'equipmentName',
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
],
attrFormSubmitting: false,
attrListLoading: false,
// syncFileListFlag: null,
tableBtn: [],
row: {},
};
},
computed: {
departmentOptions() {
return (this.departmentList || []).map((item) => ({
id: item.id,
label: item.name,
value: item.id,
}));
},
lineOptions() {
return (this.lineList || []).map((item) => ({
id: item.id,
label: item.name,
value: item.id,
}));
},
maintainerOptions() {
return (this.maintainerList || []).map((item) => ({
id: item.id,
label: item.name,
value: item.name,
}));
},
},
mounted() {
!this.edit && this.getCode('/base/equipment-maintain-plan/getCode');
this.getList('maintainer');
this.getList('department');
this.getList('line');
},
methods: {
// getCode
async getCode(url) {
this.formLoading = true;
const response = await this.$axios(url);
this.formLoading = false;
this.form.maintainOrderNumber = response.data || '';
},
handleSearchBarBtnClick(btn) {
console.log('btn', btn);
switch (btn.btnName) {
case 'search':
this.attrQuery.params.equipmentName = btn.equipmentName;
this.getAttrList();
break;
}
},
handleTableBtnClick({ type, data }) {
switch (type) {
case 'edit':
this.handleEditAttr(data.id);
break;
case 'delete':
this.handleDeleteAttr(data.id);
break;
}
},
async addConfirm() {
console.log('11', this.showTable)
this.$refs['form'].validate((valid) => {
if (!valid) {
return;
}
this.$nextTick(() => {
this.getConfirmed().then(confirm => {
console.log('111', confirm)
this.$axios({
url:
'/base/equipment-maintain-log/confirm?confirmPerson=' +
this.$store.getters.userId,
method: 'put',
data: [this.form.id],
}).then(res =>{
if (res.code == 0) {
this.visible = false;
this.$emit("refreshDataList");
this.$message.success('已确认');
}
})
}).catch(() => {
this.visible = false;
this.$emit("refreshDataList");
this.$message.success('取消确认');
})
})
});
},
getConfirmed() {
return this.$confirm('是否直接确认保养记录', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
},
async handleConfirm() {
this.btnLoading = true;
// this.$nextTick(async () => {
// const { code, data } = await this.$axios({
// url: '/base/equipment-maintain-log/update',
// method: 'put',
// data: {
// ...this.form,
// maintainWorker: this.form.maintainWorker.join(',')
// },
// });
// if (code == 0) {
// this.$modal.msgSuccess('');
// }
// this.btnLoading = false;
// this.$emit('refreshDataList');
// this.handleCancel();
// });
this.$refs['form'].validate((valid) => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
this.$axios({
url: '/base/equipment-maintain-log/update',
method: 'put',
data: {
...this.form,
maintainWorker: this.form.maintainWorker.join(','),
special: false,
relatePlan: 2
}
}).then((response) => {
this.$modal.msgSuccess('修改成功');
this.btnLoading = false;
this.$emit('refreshDataList');
this.handleCancel();
});
return;
}
//
this.$axios({
url: '/base/equipment-maintain-log/create',
method: 'post',
data: {
...this.form,
maintainWorker: this.form.maintainWorker.join(','),
special: false,
relatePlan: 2,
confirmed: false,
}
}).then((response) => {
this.$modal.msgSuccess('新增成功');
this.btnLoading = false;
this.form.id = response.data
this.row.id = response.data
this.showTable = true
this.isAdd = true
this.$emit('refreshDataList');
// this.handleCancel();
});
});
},
handleEmitFun(val) {
console.log('handleEmitFun', val);
},
init(row) {
this.visible = true;
if (row) {
this.row = row;
this.showTable = row ? true : false;
this.$nextTick(() => {
if (row.id) {
this.getInfo(row.id);
this.getAttrList(row.id);
}
})
}
},
async getInfo(id) {
this.formLoading = true;
const res = await this.$axios(
'/base/equipment-maintain-log/get?id=' + id
);
if (res.code == 0) {
this.form = res.data;
this.form.maintainWorker = res.data.maintainWorker.split(',');
this.formLoading = false;
}
this.formLoading = false;
},
async getAttrList(id, condition = {}) {
if (!id) id = this.row.id;
this.attrListLoading = true;
const res = await this.$axios({
url: '/base/equipment-maintain-log-det/page',
method: 'get',
params: {
...this.attrQuery.params,
logId: id,
...condition,
},
});
if (res.code == 0) {
this.attrList = res.data.list;
this.attrTotal = res.data.total;
}
this.attrListLoading = false;
},
async getList(source = 'department') {
const urls = [
'/base/core-production-line/listAll',
'/base/core-department/listAll',
'/base/core-worker/listAll',
];
let res;
switch (source) {
case 'department':
res = await this.$axios(urls[1]);
this.departmentList = res.data || [];
break;
case 'maintainer':
res = await this.$axios(urls[2]);
this.maintainerList = res.data || [];
break;
case 'line':
res = await this.$axios(urls[0]);
this.lineList = res.data || [];
break;
}
this.formLoading = false;
},
//
handleSave() {
this.$refs.form.validate(async (valid) => {
if (valid) {
await this.$axios({
url: '/urlupdate', // this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
method: 'post', // isEdit ? 'put' : 'post',
data: this.form,
});
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
this.visible = false;
this.$emit('refreshDataList');
}
});
},
handleCancel() {
this.visible = false;
},
resetAttrform() {
this.attrForm = {
id: null,
logId: this.row.id,
maintenanceDes: '',
program: null,
remark: null,
};
},
//
handleAddAttr() {
if (!this.row.id) return this.$message.error('请先选中保养记录');
this.resetAttrform();
this.attrTitle = '添加设备属性';
this.attrFormVisible = true;
},
//
async handleEditAttr(attrId) {
const res = await this.$axios({
url: '/base/equipment-maintain-log-det/get',
method: 'get',
params: { id: attrId },
});
if (res.code == 0) {
this.attrForm = res.data;
this.attrTitle = '编辑设备属性';
this.attrFormVisible = true;
}
},
//
handleDeleteAttr(attrId) {
this.$confirm('确定删除该属性?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
const res = await this.$axios({
url: 'url delete', // this.sections[1].urlDelete,
method: 'delete',
params: { id: attrId },
});
if (res.code == 0) {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getAttrList();
},
});
}
})
.catch(() => {});
},
//
submitAttrForm() {
this.$refs['attrForm'].validate(async (valid) => {
if (!valid) {
return;
}
try {
const isEdit = this.attrForm.id != null;
this.attrFormSubmitting = true;
const res = await this.$axios({
url: isEdit
? '/base/equipment-maintain-log-det/update'
: '/base/equipment-maintain-log-det/create',
method: isEdit ? 'put' : 'post',
data: this.attrForm,
});
if (res.code == 0) {
this.closeAttrForm();
this.$message({
message: `${isEdit ? '更新' : '创建'}成功`,
type: 'success',
duration: 1500,
onClose: () => {
this.getAttrList();
},
});
}
this.attrFormSubmitting = false;
} catch (err) {
this.$message({
message: err,
type: 'error',
duration: 1500,
});
this.attrFormSubmitting = false;
}
});
},
closeAttrForm() {
this.attrFormVisible = false;
},
handleClick(raw) {
if (raw.type === 'delete') {
this.$confirm(
`确定对${
raw.data.name
? '[名称=' + raw.data.name + ']'
: '[序号=' + raw.data._pageIndex + ']'
}进行删除操作?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
deleteProductAttr(raw.data.id).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getList();
},
});
});
})
.catch(() => {});
} else {
this.addNew(raw.data.id);
}
},
},
};
</script>
<style scoped>
.drawer >>> .el-drawer {
border-radius: 8px 0 0 8px;
}
.drawer >>> .el-date-editor,
.drawer >>> .el-select {
width: 100%;
}
.drawer >>> .el-drawer__header {
margin: 0;
padding: 32px 32px 24px;
border-bottom: 1px solid #dcdfe6;
margin-bottom: 0px;
}
.small-title::before {
content: '';
display: inline-block;
vertical-align: top;
width: 4px;
height: 22px;
border-radius: 1px;
margin-right: 8px;
background-color: #0b58ff;
}
.drawer-body {
display: flex;
flex-direction: column;
height: 100%;
}
.drawer-body__content {
flex: 1;
/* background: #eee; */
padding: 20px 30px;
overflow-y: auto;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;
padding: 18px;
}
</style>

View File

@ -0,0 +1,539 @@
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}

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