index.vue
41.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
<template>
<div class="app-container">
<el-select v-model="queryParams.dept" filterable reserve-keyword @change="getList">
<el-option v-for="item in depts" :label="item.name"
:value="item.code" :key="item.code" >
</el-option>
</el-select>
<el-select v-model="queryParams.role" filterable reserve-keyword @change="getList">
<el-option v-for="item in roles" :label="item.name"
:value="item.code" :key="item.code" >
</el-option>
</el-select>
<taskCard :task="task" v-for="task in taskList" @sendToParent="showTask" />
<pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 审批对话框 -->
<el-dialog :title="title" :visible.sync="open" v-if="open" width="300px" append-to-body>
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button>
<el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button>
</div>
</el-dialog>
<el-dialog :title="title" :visible.sync="open2" width="400px" append-to-body>
<threestepInfo :businessKey="businessKey" v-if="open2" />
<el-form v-if="taskName == '巡查'" :rules="rules" label-width="100px">
<el-row >
<el-form-item label="补充说明">
<el-input type="textarea" v-model="form.subReason" />
</el-form-item>
</el-row>
<el-row >
<el-form-item label="渣管负责人">
<el-input v-model="form.earthPipPerson" />
</el-form-item>
</el-row>
<el-row el-row>
<el-form-item label="执法负责人">
<el-input v-model="form.enforcePerson" />
</el-form-item>
</el-row>
<el-row el-row>
<el-col>
上传补充材料:<a style="color:blue;font-size: 12px;" @click="picSample=true">示意图</a>
</el-col>
</el-row>
<el-row el-row style="margin-top: 20px;">
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(0)">履职情况照片</a>
<el-input v-model="form.sub_img0" type="hidden"></el-input>
<p v-for="img in form.sub_img0">{{img.split(":")[0]}}<a @click="removeImage(0,img)" style="color:red"> x</a>
</p>
</el-col>
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(1)">水枪水嘴照片</a>
<el-input v-model="form.sub_img1" type="hidden"></el-input>
<p v-for="img in form.sub_img1">{{img.split(":")[0]}}<a @click="removeImage(1,img)" style="color:red"> x</a>
</p>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(2)">照明照片</a>
<el-input v-model="form.sub_img2" type="hidden"></el-input>
<p v-for="img in form.sub_img2">{{img.split(":")[0]}}<a @click="removeImage(2,img)" style="color:red"> x</a>
</p>
</el-col>
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(3)">视频监控照片</a>
<el-input v-model="form.sub_img3" type="hidden"></el-input>
<p v-for="img in form.sub_img3">{{img.split(":")[0]}}<a @click="removeImage(3,img)" style="color:red"> x</a>
</p>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(4)">洗车机照片</a>
<el-input v-model="form.sub_img4" type="hidden"></el-input>
<p v-for="img in form.sub_img4">{{img.split(":")[0]}}<a @click="removeImage(4,img)" style="color:red"> x</a>
</p>
</el-col>
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(5)">摄像头视频截图1</a>
<el-input v-model="form.sub_img5" type="hidden"></el-input>
<p v-for="img in form.sub_img5">{{img.split(":")[0]}}<a @click="removeImage(5,img)" style="color:red"> x</a>
</p>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(6)">摄像头视频截图2</a>
<el-input v-model="form.sub_img6" type="hidden"></el-input>
<p v-for="img in form.sub_img6">{{img.split(":")[0]}}<a @click="removeImage(6,img)" style="color:red"> x</a>
</p>
</el-col>
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(7)">摄像头视频截图3</a>
<el-input v-model="form.sub_img7" type="hidden"></el-input>
<p v-for="img in form.sub_img7">{{img.split(":")[0]}}<a @click="removeImage(7,img)" style="color:red"> x</a>
</p>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(8)">其他1</a>
<el-input v-model="form.sub_img8" type="hidden"></el-input>
<p v-for="img in form.sub_img8">{{img.split(":")[0]}}<a @click="removeImage(8,img)" style="color:red"> x</a>
</p>
</el-col>
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(9)">其他2</a>
<el-input v-model="form.sub_img9" type="hidden"></el-input>
<p v-for="img in form.sub_img9">{{img.split(":")[0]}}<a @click="removeImage(9,img)" style="color:red"> x</a>
</p>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(10)">其他3</a>
<el-input v-model="form.sub_img10" type="hidden"></el-input>
<p v-for="img in form.sub_img10">{{img.split(":")[0]}}<a @click="removeImage(10,img)" style="color:red">
x</a>
</p>
</el-col>
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(11)">其他4</a>
<el-input v-model="form.sub_img11" type="hidden"></el-input>
<p v-for="img in form.sub_img11">{{img.split(":")[0]}}<a @click="removeImage(11,img)" style="color:red">
x</a>
</p>
</el-col>
</el-row>
<el-col :span="12">
<a style="color:blue;font-size: 12px;" @click="showFileUpload(12)">其他5</a>
<el-input v-model="form.sub_img12" type="hidden"></el-input>
<p v-for="img in form.sub_img12">{{img.split(":")[0]}}<a @click="removeImage(12,img)" style="color:red">
x</a>
</p>
</el-col>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button>
<el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button>
</div>
</el-dialog>
<el-dialog title="附件" :visible.sync="uploadImageDialog" append-to-body :beforeClose="handleClose" width="300px">
<el-upload multiple :headers="upload.headers" :action="upload.url" :file-list="fileList"
:on-success="uploadSuccess" :before-upload="beforeUpload">
<el-button size="small" type="primary">选择附件</el-button>
<div slot="tip" class="el-upload__tip">只能上传不超过 20MB 的jpg pdf word文件</div>
</el-upload>
<div style="height: 40px;width:100%;">
<el-button type="primary" style="margin-top: 20px;float:right;" @click="handleClose">关闭</el-button>
</div>
</el-dialog>
<el-dialog title="示意图" :visible.sync="picSample" append-to-body>
<img src="../../../assets/logo/logo.jpg" width="100%" height="300px" />
</el-dialog>
<!-- 会议管理 -->
<el-dialog :title="title" :visible.sync="conferenceOpen" width="300px" append-to-body>
<conferenceInfo :idInfo="idInfo" v-if="conferenceOpen"/>
<div slot="footer" class="dialog-footer">
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="conferenceSubmitForm(1)">驳回</el-button>
<el-button type="primary" @click="conferenceSubmitForm(0)">通过</el-button>
</div>
</div>
</el-dialog>
<!-- 请假申请 -->
<el-dialog :title="title" :visible.sync="leaveApplicationOpen" width="300px" append-to-body>
<leaveApplicationInfo :idInfo="idInfo" v-if="leaveApplicationOpen"/>
<div slot="footer" class="dialog-footer">
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="leaveApplicationSubmitForm(1)">驳回</el-button>
<el-button type="primary" @click="leaveApplicationSubmitForm(0)">通过</el-button>
</div>
</div>
</el-dialog>
<el-dialog :title="title" :visible.sync="construct" width="300px" append-to-body>
<constructsiteInfo :businessKey="businessKey" :signData="signData" v-if="construct" />
<el-row>
<el-input v-model="signDataInfo" type="textarea" :rows="4" style="margin-top: 10px;"></el-input>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button>
<el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button>
</div>
</el-dialog>
<el-dialog :title="title" :visible.sync="earthsites" width="300px" append-to-body>
<earthsitesInfo :businessKey="businessKey" v-if="earthsites" />
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button>
<el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button>
</div>
</el-dialog>
<el-dialog :title="title" :visible.sync="contract" width="300px" append-to-body>
<contractInfo :businessKey="businessKey" v-if="contract" />
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button>
<el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button>
</div>
</el-dialog>
<!-- 后勤管理 -->
<el-dialog :title="title" :visible.sync="logisticsInfoOpen" width="300px" append-to-body
:close-on-click-modal="false">
<logisticsInfo :idInfo="idInfo" v-if="logisticsInfoOpen"/>
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="logisticsInfoSubmitForm(1)">驳回</el-button>
<el-button type="primary" @click="logisticsInfoSubmitForm(0)">通过</el-button>
</div>
</el-dialog>
<!-- 办文办事 -->
<el-dialog :title="title" :visible.sync="handleAffairsInfoOpen" width="300px" append-to-body
:close-on-click-modal="false">
<handleInfo ref="handleAffairsInfoRef" :idInfo="idInfo" v-if="handleAffairsInfoOpen"
:businessKey="definitionKey"
:controlId="controlId"/>
<el-form label-width="110px" v-if="definitionKey=='yuelan'">
<el-form-item label="阅览部门:">
<el-select ref="formDeptNameRef" v-model="deptName" placeholder="请选择部门" style="width: 100% "
@change="changeDepts">
<el-option v-for="item in depts" :label="item.name" :value="item.code" :key="item.code"/>
</el-select>
</el-form-item>
<el-form-item label="阅览人:">
<treeselect v-model="users" :multiple="true" :options="options" placeholder="请选择"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="handleAffairsSubmitForm(1)"
v-if="controlId!='FormProperty_11p96vq' && controlId!='FormProperty_0d6ngk1' && definitionKey!='yuelanxuexi' && definitionKey!='yuelan'">驳回
</el-button>
<el-button type="primary" @click="handleAffairsSubmitForm(0)">通过</el-button>
</div>
</div>
</el-dialog>
<!-- 线下案卷交办 -->
<el-dialog :title="title" :visible.sync="caseOffline" width="300px" append-to-body :close-on-click-modal="false">
<caseOfflineInfo :businessKey="businessKey" v-if="caseOffline"/>
<el-input v-model="form.advice" placeholder="请填写审批意见" type="textarea" :rows="3"/>
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="submitForm(form.formData[0].controlId,1)">驳回</el-button>
<el-button type="primary" @click="submitForm(form.formData[0].controlId,0)">通过</el-button>
</div>
</el-dialog>
<!-- 平台违规信息 -->
<el-dialog :title="title" :visible.sync="violationCaseFile" width="300px" append-to-body :close-on-click-modal="false">
<violationCaseFileInfo :idInfo="businessKey" v-if="violationCaseFile"/>
<el-form v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员' && violationCaseFile" :rules="rules" label-width="120px" >
<el-input v-model="form.reply" type="textarea" :rows="3" placeholder="回复意见">
</el-input>
<el-upload
list-type="picture"
action=''
accept=".jpg, .png , .bmp"
:limit="1"
:auto-upload="false"
:file-list="form.replyImg"
:on-change="getFile"
:on-preview="handlePictureCardPreview"
:on-remove="handleUploadRemove"
>
<el-button size="small" type="primary" @click="uploadimg" v-if="form.replyImg == null">选择图片上传</el-button>
<div slot="tip" class="el-upload__tip" v-if="form.replyImg== null">只能上传一张图片文件</div>
</el-upload>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="submitForm(form.formData[0].controlId,1)" v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员'">驳回</el-button>
<el-button type="primary" @click="submitForm(form.formData[0].controlId,0)">通过</el-button>
</div>
</el-dialog>
<!-- 违规预警信息 -->
<el-dialog :title="title" :visible.sync="violationCaseFile1" width="300px" append-to-body :close-on-click-modal="false">
<violationWarningInformationInfo :idInfo="businessKey" v-if="violationCaseFile1"/>
<el-form v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员' && violationCaseFile1" :rules="rules" label-width="120px" >
<el-input v-model="form.reply" type="textarea" :rows="3" placeholder="回复意见">
</el-input>
<el-upload
list-type="picture"
action=''
accept=".jpg, .png , .bmp"
:limit="1"
:auto-upload="false"
:file-list="form.replyImg"
:on-change="getFile"
:on-preview="handlePictureCardPreview"
:on-remove="handleUploadRemove"
>
<el-button size="small" type="primary" @click="uploadimg" v-if="form.replyImg == null">选择图片上传</el-button>
<div slot="tip" class="el-upload__tip" v-if="form.replyImg== null">只能上传一张图片文件</div>
</el-upload>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="submitForm(form.formData[0].controlId,1)" v-if="this.taskName != '车辆所属企业' && this.taskName != '渣土办科员'">驳回</el-button>
<el-button type="primary" @click="submitForm(form.formData[0].controlId,0)">通过</el-button>
</div>
</el-dialog>
<el-dialog :title="title" :visible.sync="supervisionOpen" width="300px" append-to-body :close-on-click-modal="false">
<supervisionInfo :infoData="supervisionData"/>
<div slot="footer" class="dialog-footer">
<el-button type="danger" @click="submitForm(form.formData[0].controlId,1)">驳回</el-button>
<el-button type="primary" @click="submitForm(form.formData[0].controlId,0)">通过</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listTask,
formDataShow,
formDataSave
} from "@/api/activiti/task";
import {getSignByObjId, addSign, updateSign} from "@/api/sign/sign";
import {updateCaseOffline} from "@/api/caseOffline/caseOffline";
import {updateViolationCaseFileReader} from "@/api/casefile/violationCaseFile";
import {updateViolationCaseFileReader1} from "@/api/casefile/violationWarningInformation";
import {
getArea,
getDict,
getUsers
} from "@/api/dict";
import {
updateThreestep,
activeThreestep
} from "@/api/business/threestep";
import {
getToken
} from "@/utils/auth";
import {addReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
import {updateHandleAffairs} from "@/api/office/handle";
import Treeselect from "@riophae/vue-treeselect";
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import pagination from '../Pagination';
import threestepInfo from "@/views/h5/task/threestepInfo";
import taskCard from "@/views/h5/task/taskCard";
import conferenceInfo from "@/views/h5/task/conferenceInfo";
import leaveApplicationInfo from "@/views/h5/leaveApplication/leaveApplicationInfo";
import constructsiteInfo from "@/views/h5/task/constructsiteInfo";
import earthsitesInfo from "@/views/h5/task/earthsitesInfo";
import contractInfo from "@/views/h5/task/contractInfo";
import logisticsInfo from "@/views/h5/task/logisticsInfo";
import handleInfo from "@/views/h5/task/handleInfo";
import caseOfflineInfo from "@/views/h5/caseOffline/caseOfflineInfo";
import violationCaseFileInfo from "@/views/h5/task/violationCaseFileInfo";
import violationWarningInformationInfo from "@/views/h5/task/violationWarningInformationInfo";
import supervisionInfo from "./SupervisionInfo";
export default {
name: "task",
components: {
taskCard,
threestepInfo,
conferenceInfo,
leaveApplicationInfo,
logisticsInfo,
handleInfo,
constructsiteInfo,
Treeselect,
earthsitesInfo,
contractInfo,
caseOfflineInfo,
violationCaseFileInfo,
violationWarningInformationInfo,
supervisionInfo,
pagination,
},
data() {
return {
id: '',
definitionKey: '',
businessKey: '',
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 请假表格数据
taskList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
open2: false,
picSample: false,
taskName: null,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
role: null,
dept: null,
},
// 表单参数
form: {
formData: []
},
needShow: false,
// 表单校验
rules: {
subReason: [{
required: true,
message: '请填写补充说明',
trigger: 'blur'
},],
},
picIndex: 0,
fileList: [],
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: "",
// 是否禁用上传
isUploading: false,
// 设置上传的请求头部
headers: {
Authorization: "Bearer " + getToken()
},
// 上传的地址
url: process.env.VUE_APP_BASE_API + "/business/threestep/upload",
},
uploadImageDialog: false,
conferenceOpen: false,
construct: false,
idInfo: null,
leaveApplicationOpen: false,
signData: null,
areas: [],
roles: [],
depts: [],
signDataInfo: null,
earthsites: false,
contract: false,
logisticsInfoOpen: false,
handleAffairsInfoOpen: false,
caseOffline: false,
violationCaseFile: false,
violationCaseFile1: false,
controlId: null,
users: [],
options: [],
usersName: [],
deptName:null,
};
},
created() {
let dep = {type: "CSUserDepartmentType"};
getDict(dep).then(res => {
this.depts = res.result;
});
let role = {type: "CSUserPostType"};
getDict(role).then(res => {
this.roles = res.result;
});
this.getList();
},
methods: {
handleClose() {
this.uploadImageDialog = false;
this.fileList = [];
},
removeImage(index, img) {
let target = "sub_img" + this.picIndex;
this.form[target].splice(this.form[target].indexOf(img), 1);
},
uploadSuccess(res, file, fileList) {
if(res.code){
this.$message(res.message);
return;
}
let target = "sub_img" + this.picIndex;
if (!this.form[target]) {
this.form[target] = [];
}
this.form[target].push(file.name + ':' + res);
},
showFileUpload(i) {
this.uploadImageDialog = true;
this.picIndex = i;
},
beforeUpload(file) {
let isRightSize = file.size / 1024 / 1024 < 20
if (!isRightSize) {
this.$message.error('文件大小超过 20MB')
return isRightSize;
}
let isAccept = false;
if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file
.name.indexOf('.pdf') > -1) {
isAccept = true;
}
if (!isAccept) {
this.$message.error('应该选择PDF、JPG、WORD类型的文件')
return isAccept;
}
},
getList() {
this.reset();
this.loading = true;
listTask(this.queryParams).then(response => {
this.taskList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.open2 = false;
this.leaveApplicationOpen = false;
this.conferenceOpen = false;
this.construct = false;
this.logisticsInfoOpen = false;
this.handleAffairsInfoOpen = false;
this.earthsites=false;
this.contract=false;
this.caseOffline=false;
this.violationCaseFile=false;
this.violationCaseFile1=false;
this.reset();
},
// 表单重置
reset() {
this.definitionKey = '',
this.businessKey = '',
this.form = {
formData: [],
};
this.resetForm("form");
},
showTask(row, idx) {
this.reset();
this.definitionKey = row.definitionKey;
this.businessKey = row.businessKey;
this.id = row.id;
this.taskName = row.name;
formDataShow(row.id).then(response => {
let datas = response.data;
let formData = []
for (let i = 0; i < datas.length; i++) {
let strings = datas[i].split('--__!!')
let controlValue = null
let controlDefault = null
switch (strings[1]) {
case 'radio':
controlValue = idx;
controlDefault = strings[4]
break;
// default:
}
formData.push({
controlId: strings[0],
controlType: strings[1],
controlLable: strings[2],
controlIsParam: strings[3],
controlValue: controlValue,
controlDefault: controlDefault
})
}
this.form.formData = formData;
if (this.definitionKey == "workflow_threestep") {
this.open2 = true;
return;
}
if (this.definitionKey == "conference") {
this.idInfo = row.businessKey.substring(row.businessKey.indexOf(":") + 1);
this.conferenceOpen = true;
return;
}
if (this.definitionKey == "workflow_leave") {
this.idInfo = row.businessKey.substring(row.businessKey.lastIndexOf(":") + 1);
this.leaveApplicationOpen = true;
return;
}
if (this.definitionKey == "workflow_constructsite") {
getSignByObjId(this.businessKey.split(":")[1]).then(res => {
if (this.definitionKey == "workflow_constructsite") {
this.signDataInfo = "经现场查勘及核对资料,现场设施基本达到净车出场标准,建议按程序办理相关手续,妥否,请批示。";
this.signData = res.data;
this.construct = true;
}
});
return;
}
if (this.definitionKey == "workflow_earthsites") {
this.earthsites = true;
return;
}
if (this.definitionKey == "workflow_conract") {
this.contract = true;
return;
}
if (this.definitionKey == "logistics") {
this.idInfo = row.businessKey.substring(row.businessKey.lastIndexOf(":") + 1);
this.logisticsInfoOpen = true;
return;
}
if (this.definitionKey == "handleAffairs" || this.definitionKey == "gongwenchuli" || this.definitionKey == "yuelan" || this.definitionKey=="yuelanxuexi") {
this.controlId = this.form.formData[0].controlId;
this.idInfo = row.businessKey.split(":")[1];
this.handleAffairsInfoOpen = true;
return;
}
if(this.definitionKey == "workflow_caseoffline"){
this.caseOffline = true;
return;
}
if(this.definitionKey == "workflow_casefile"){
this.violationCaseFile = true;
return;
}
if(this.definitionKey == "violation_warning"){
this.violationCaseFile1 = true;
return;
}
if(this.definitionKey.indexOf("supervision")>-1){
const params = {
id: row.businessKey.split(":")[1],
}
getSupervision(params).then(res=>{
console.log(res)
if(res.result==null){
this.$message.error("获取纪检督察详情失败!请重试")
return;
}
this.supervisionData = res.result;
this.supervisionOpen = true;
})
return;
}
this.open = true;
this.title = "审批";
});
},
/** 提交按钮 */
submitForm(formid, value) {
this.form.formData[0].controlValue = value;
this.form.formData[0].controlId = formid;
this.form.id = this.businessKey.split(":")[1];
if (this.form.formData[0].controlValue == 0) {
this.form.status = 1;
} else {
this.form.status = 2;
}
if (this.definitionKey == "workflow_threestep") {
for (let i = 0; i < 13; i++) {
if (this.form["sub_img" + i]) {
let paths = "";
for (var j = 0; j < this.form["sub_img" + i].length; j++) {
paths += this.form["sub_img" + i][j].split(":")[1] + ",";
}
this.form["sub_img" + i] = paths.substring(0, paths.length - 1);
}
}
if (this.form.status == 1 && this.taskName == "巡查") {
activeThreestep(this.form).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.open2 = false;
this.taskList = [];
this.getList();
});
});
} else {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.open2 = false;
this.taskList = [];
this.getList();
});
}
return;
}
if (this.definitionKey == "workflow_constructsite") {
if (this.form.status == 1) {
let objId = this.businessKey.split(":")[1];
let query = {
objectId: objId,
};
if (this.taskName == "勘察科员") {
query.idx = 0;
query.sign1Text = this.signDataInfo;
} else if (this.taskName == "堪察部长") {
query.idx = 1;
query.sign2Text = this.signDataInfo;
} else if (this.taskName == "堪察分管领导") {
query.idx = 2;
query.sign3Text = this.signDataInfo;
} else if (this.taskName == "中心负责人") {
query.idx = 3;
query.sign4Text = this.signDataInfo;
}
addSign(query).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.open = false;
this.construct = false;
this.getList();
});
})
} else {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.construct = false;
this.getList();
});
}
return;
}
if (this.definitionKey == "workflow_conract") {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.contract = false;
this.getList();
});
}
if (this.definitionKey == "workflow_earthsites") {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.earthsites = false;
this.getList();
});
}
if (this.definitionKey == "workflow_caseoffline") {
let id = this.businessKey.split(":")[1];
let query = {
id: id,
};
let adv = this.form.advice;
if (!adv) {
if (value == 0) {
adv = "审批通过";
} else {
adv = "审批驳回";
}
}
if (this.taskName == "渣土办科员") {
query.advice1 = adv;
} else if (this.taskName == "渣土办分管领导") {
query.advice2 = adv;
} else if (this.taskName == "治理部部长") {
query.advice3 = adv;
} else if (this.taskName == "治理部分管领导") {
query.advice4 = adv;
}
updateCaseOffline(query).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.caseOffline = false;
this.getList();
});
})
return;
}
if (this.definitionKey == "workflow_caseoffline") {
let id = this.businessKey.split(":")[1];
let query = {
id: id,
};
let adv = this.form.advice;
if (!adv) {
if (value == 0) {
adv = "审批通过";
} else {
adv = "审批驳回";
}
}
if (this.taskName == "渣土办科员") {
query.advice1 = adv;
} else if (this.taskName == "渣土办分管领导") {
query.advice2 = adv;
} else if (this.taskName == "治理部部长") {
query.advice3 = adv;
} else if (this.taskName == "治理部分管领导") {
query.advice4 = adv;
}
updateCaseOffline(query).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.caseOffline = false;
this.getList();
});
})
return;
}
if (this.definitionKey == "workflow_casefile") {
if (this.taskName == "车辆所属企业" || this.taskName == "渣土办科员") {
console.log(this.businessKey);
let objId = this.businessKey.split(":")[1];
updateViolationCaseFileReader({id: objId}).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.violationCaseFile = false;
this.getList();
});
})
return;
} else {
let postData = {};
postData.tableName = this.businessKey;
postData.replyImg = this.form.replyImg;
postData.reply = this.form.reply;
addReplyApprovalProcess(postData).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.violationCaseFile = false;
this.getList();
});
});
}
}
if (this.definitionKey == "violation_warning") {
if (this.taskName == "车辆所属企业" || this.taskName == "渣土办科员") {
console.log(this.businessKey);
let objId = this.businessKey.split(":")[1];
updateViolationCaseFileReader1({id: objId}).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.violationCaseFile1 = false;
this.getList();
});
})
return;
} else {
let postData = {};
postData.tableName = this.businessKey;
postData.replyImg = this.form.replyImg;
postData.reply = this.form.reply;
addReplyApprovalProcess(postData).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.violationCaseFile1 = false;
this.getList();
});
});
}
}
},
conferenceSubmitForm(value) {
this.form.formData[0].controlValue = value;
if (value == 0) {
this.form.status = 1;
} else {
this.form.status = 2;
}
//审批or驳回
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.conferenceOpen = false;
this.taskList = [];
this.getList();
});
},
leaveApplicationSubmitForm(value) {
if (value == 0) {
this.form.status = 1;
} else {
this.form.status = 2;
}
this.form.formData[0].controlValue = value;
//审批or驳回
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.leaveApplicationOpen = false;
this.taskList = [];
this.getList();
});
},
logisticsInfoSubmitForm(value) {
if (value == 0) {
this.form.status = 1;
} else {
this.form.status = 2;
}
this.form.formData[0].controlValue = value;
//this.form.formData[0].route = value;
//审批or驳回
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.logisticsInfoOpen = false;
this.taskList = [];
this.getList();
});
},
handleAffairsSubmitForm(value) {
console.log(this.controlId)
if (value == 0) {
this.form.status = 1;
} else {
this.form.status = 2;
}
this.form.formData[0].controlValue = value;
if (this.definitionKey == "yuelan") {
if(this.deptName==null){
this.$message.error("请选择阅览部门!");
return;
}
if(this.users.length==0){
this.$message.error("请选择阅览人!");
return;
}
let userNames = [];
for (let i in this.users) {
for (let j in this.options) {
if (this.users[i] == this.options[j].id) {
userNames.push(this.options[j].label);
}
}
}
const handleAffairsForm = this.$refs.handleAffairsInfoRef.$data.form;
this.form.formData[0].userNames = userNames;
//表里存中文
handleAffairsForm.userNames = userNames.join(",");
console.log(this.form)
console.log(handleAffairsForm)
updateHandleAffairs(handleAffairsForm).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.handleAffairsInfoOpen = false;
this.taskList = [];
this.getList();
});
})
return;
}
//分管领导审批流程时,需要指定部门审批,所以判断当前流程类型和当前控件(表单)id
if ((this.controlId == "FormProperty_214hj4h" || this.controlId == "FormProperty_2vu2250") && value == 0) {
const handleAffairsForm = this.$refs.handleAffairsInfoRef.$data.form;
if (handleAffairsForm.deptId == null) {
this.$message.error("请选择信访部门!");
return;
}
const deptCode = this.$refs.handleAffairsInfoRef.$refs.formDeptNameRef.value;
this.form.formData[0].deptCode = deptCode;
//表里存中文
handleAffairsForm.deptName = this.$refs.handleAffairsInfoRef.$refs.formDeptNameRef.selectedLabel;
const haType = handleAffairsForm.type;
if (haType == 4 || haType == 2 || haType == 3) {
updateHandleAffairs(handleAffairsForm).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.handleAffairsInfoOpen = false;
this.taskList = [];
this.getList();
});
})
}
//回复意见
} else if (this.controlId == "FormProperty_0orjdou" || this.controlId == "FormProperty_05v7lct") {
const handleAffairsForm = this.$refs.handleAffairsInfoRef.$data.form;
updateHandleAffairs(handleAffairsForm).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.handleAffairsInfoOpen = false;
this.taskList = [];
this.getList();
});
})
} else if (this.controlId == "FormProperty_0aq22i0" && value == 0) {
const handleAffairsForm = this.$refs.handleAffairsInfoRef.$data.form;
if (handleAffairsForm.sendObject == null) {
this.$message.error("请选择推送对象!");
return;
}
this.form.formData[0].index = handleAffairsForm.sendObject;
updateHandleAffairs(handleAffairsForm).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.handleAffairsInfoOpen = false;
this.taskList = [];
this.getList();
});
})
} else if ((this.controlId == 'FormProperty_11p96vq' || this.controlId == 'FormProperty_2jvcgq8') && value == 0) {
const reply = {
reply: this.$refs.handleAffairsInfoRef.$data.opinion,
tableName: "handle_affairs",
tableId: this.idInfo
}
const handleAffairsForm = this.$refs.handleAffairsInfoRef.$data.form;
if (handleAffairsForm.deptId == null) {
this.$message.error("请选择处理部门!");
return;
}
const deptCode = this.$refs.handleAffairsInfoRef.$refs.formDeptNameRef.value;
this.form.formData[0].deptCode = deptCode;
//表里存中文
handleAffairsForm.deptName = this.$refs.handleAffairsInfoRef.$refs.formDeptNameRef.selectedLabel;
updateHandleAffairs(handleAffairsForm).then(res => {
addReplyApprovalProcess(reply).then(res => {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.handleAffairsInfoOpen = false;
this.taskList = [];
this.getList();
});
})
})
} else {
formDataSave(this.id, this.form.formData).then(response => {
this.msgSuccess("审批成功");
this.handleAffairsInfoOpen = false;
this.taskList = [];
this.getList();
});
}
},
changeDepts(e) {
this.options = [];
this.roles.forEach((role, index) => {
let area = {
bizAuthCodes: [2],
authPostType: role.code,
authDepartmentType: e
};
getUsers(area).then(res => {
if (res.result.length != 0) {
if (res.result[0].userAuthList.length > 0) {
res.result[0].userAuthList.forEach((user, index) => {
this.options.push({id: user.userId, label: user.username})
});
}
}
});
});
},
getFile(file, fileList) {
this.getBase64(file.raw).then(res => {
const params = res
this.proofImage = params
this.form.replyImg = params;
this.$forceUpdate();
})
},
getBase64(file) {
return new Promise(function (resolve, reject) {
const reader = new FileReader()
let imgResult = ''
reader.readAsDataURL(file)
reader.onload = function () {
imgResult = reader.result
}
reader.onerror = function (error) {
reject(error)
}
reader.onloadend = function () {
resolve(imgResult)
}
})
},
handleUploadRemove(file, fileList) {
this.proofImage = ''
this.form.replyImg = null;
this.$forceUpdate();
},
handlePictureCardPreview(file) {
console.log(this.proofImage)
},
},
}
</script>
<style scoped>
div{
font-size:12px;
}
</style>
<style>
@import '../../../assets/css/task.css'
</style>
<style scope>
.el-select-dropdown__item{
width:300px;
}
</style>