cloud-web-corejs 1.0.54-dev.810 → 1.0.54-dev.812

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/package.json +1 -1
  2. package/src/components/VabUpload/image-viewer.vue +442 -442
  3. package/src/components/VabUpload/index.vue +44 -2
  4. package/src/components/VabUpload/mixins.js +126 -19
  5. package/src/components/VabUpload/view.vue +247 -209
  6. package/src/components/baseTabs/mixins.js +181 -181
  7. package/src/components/mobile/wf/content.vue +1665 -1556
  8. package/src/components/table/config.js +78 -78
  9. package/src/components/table/index.js +1276 -1276
  10. package/src/components/table/tableForm.vue +330 -330
  11. package/src/components/table/tableFormMixin.js +318 -318
  12. package/src/components/table/vxeFilter/index.js +163 -163
  13. package/src/components/table/vxeFilter/mixin.js +316 -316
  14. package/src/components/wf/content.vue +1188 -1188
  15. package/src/components/wf/wf.js +29 -12
  16. package/src/components/wf/wfActionDropdown.vue +1 -1
  17. package/src/components/wf/wfActionItems.js +1 -1
  18. package/src/components/xform/docs/2026-08 xform H5 P0 /345/256/236/347/216/260/350/247/204/346/240/274.md" +528 -0
  19. package/src/components/xform/docs/2026-08 xform H5 P1 /345/256/236/347/216/260/350/247/204/346/240/274.md" +412 -0
  20. package/src/components/xform/docs/2026-08 xform H5 P2 /345/256/236/347/216/260/350/247/204/346/240/274.md" +287 -0
  21. package/src/components/xform/docs/2026-08 xform /347/247/273/345/212/250/347/253/257/345/270/203/345/261/200/345/257/271/351/275/220 bill_setting /346/226/271/346/241/210.md" +400 -0
  22. package/src/components/xform/form-designer/designer.js +15 -0
  23. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  24. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  25. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  26. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  27. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  28. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  29. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  30. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  31. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  32. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  33. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +29 -1
  34. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  35. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  36. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  37. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  38. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  39. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +1 -0
  40. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  41. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -438
  42. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  43. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  44. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  45. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  46. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  47. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  48. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  49. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  50. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  51. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  52. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  53. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  54. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  55. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  56. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  57. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  58. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  59. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +4 -0
  60. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +55 -3
  61. package/src/components/xform/form-render/container-item/data-table-mixin.js +33 -12
  62. package/src/components/xform/form-render/container-item/detail-h5-item.vue +183 -32
  63. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  64. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  65. package/src/components/xform/form-render/container-item/list-h5-item.vue +1642 -1700
  66. package/src/components/xform/form-render/index.vue +153 -147
  67. package/src/components/xform/form-render/indexMixin.js +12 -0
  68. package/src/components/xform/lang/en-US.js +10 -0
  69. package/src/components/xform/lang/zh-CN.js +12 -0
  70. package/src/components/xform/mixins/defaultHandle.js +707 -707
  71. package/src/components/xform/styles/h5.scss +1634 -0
  72. package/src/components/xform/utils/textMaskUtil.js +182 -182
  73. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  74. package/src/components/xform/utils/util.js +56 -11
  75. package/src/utils/pdfUtil.js +429 -429
  76. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  77. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  78. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  79. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  80. package/src/views/user/home/wjl/content.vue +394 -31
  81. package/src/views/user/role/edit.vue +632 -632
  82. package/src/views/user/role/list.vue +260 -260
  83. package/src/views/user/wf/wf_manage/list.vue +1116 -1116
@@ -1,1116 +1,1116 @@
1
- <template>
2
- <div id="containt">
3
- <el-tabs v-model="activeName" class="tab-box">
4
- <el-tab-pane :label="$t1('常规')" name="first">
5
- <component
6
- v-if="showWfContent && wfContent"
7
- :is="wfContent"
8
- visible-key="showWfContent"
9
- v-bind="param"
10
- :parent-target="_self"
11
- :defaultShowWfContent="true"
12
- :_viewType="1"
13
- @reload="$reloadHandle"
14
- ></component>
15
- <micro-view-host
16
- v-else-if="showWfContent && remoteView"
17
- :owner="remoteView.owner"
18
- :target-path="remoteView.targetPath"
19
- :biz-params="remoteView.bizParams"
20
- :view-meta="remoteView.viewMeta"
21
- @reload="$reloadHandle"
22
- @close="showWfContent = false"
23
- ></micro-view-host>
24
- </el-tab-pane>
25
- <el-tab-pane :label="$t1('我的流程')" name="second">
26
- <div class="tree-box fl">
27
- <div class="tit">
28
- <b>{{ $t1("待办类型") }}</b>
29
- </div>
30
- <el-tree
31
- :props="defaultProps"
32
- :load="loadNode"
33
- node-key="uuid"
34
- ref="tree"
35
- highlight-current
36
- lazy
37
- :expand-on-click-node="false"
38
- @node-click="handleNodeClick"
39
- class="tree-list"
40
- icon-class="el-icon-arrow-down"
41
- ></el-tree>
42
- </div>
43
- <label id="labBtn">
44
- <div class="icon">
45
- <i class="el-icon-more"></i>
46
- <i class="el-icon-more"></i>
47
- </div>
48
- </label>
49
- <div class="main-right fr" style="padding-left: 6px">
50
- <div class="grid-height">
51
- <vxe-grid
52
- ref="table-m1"
53
- v-bind="vxeOption"
54
- @resizable-change="$vxeTableUtil.onColumnWitchChange"
55
- @custom="$vxeTableUtil.customHandle"
56
- >
57
- <template #form>
58
- <div class="clearfix screen-btns">
59
- <div class="fl">
60
- <base-table-export
61
- :option="{
62
- title: $t1('流程待办导出'),
63
- targetRef: 'table-m1',
64
- }"
65
- :parent-target="_self"
66
- />
67
- </div>
68
- <div class="fr">
69
- <vxe-button
70
- icon="el-icon-brush"
71
- class="button-sty"
72
- @click="resetEvent"
73
- type="text"
74
- status="primary"
75
- plain
76
- >{{ $t1("刷新") }}
77
- </vxe-button>
78
- <vxe-button
79
- status="warning"
80
- icon="el-icon-search"
81
- class="button-sty"
82
- @click="searchEvent"
83
- >
84
- {{ $t1("搜索") }}
85
- </vxe-button>
86
- </div>
87
- </div>
88
- <vxe-form
89
- ref="form"
90
- class="screen-box"
91
- title-width="92px"
92
- title-align="right"
93
- :data="formData"
94
- @submit="searchEvent"
95
- @reset="searchEvent"
96
- >
97
- <vxe-form-item :title="$t1('待办类型') + ':'">
98
- <template v-slot>
99
- <el-input
100
- v-model="checkNodeData.label"
101
- size="small"
102
- disabled
103
- />
104
- </template>
105
- </vxe-form-item>
106
- <vxe-form-item :title="$t1('流程主题') + ':'" field="name">
107
- <template v-slot>
108
- <el-input
109
- v-model="formData.name"
110
- size="small"
111
- clearable
112
- />
113
- </template>
114
- </vxe-form-item>
115
- <vxe-form-item
116
- :title="$t1('单据类型') + ':'"
117
- field="objTypeName"
118
- >
119
- <template v-slot>
120
- <el-input
121
- class="search-input"
122
- max="200"
123
- v-model="formData.objTypeName"
124
- @clear="
125
- formData.objTypeCode = null;
126
- $forceUpdate();
127
- "
128
- v-el-readonly
129
- clearable
130
- >
131
- <i
132
- slot="suffix"
133
- class="el-input__icon el-icon-search"
134
- @click="showWfObjConfigDialog = true"
135
- ></i>
136
- </el-input>
137
- </template>
138
- </vxe-form-item>
139
- <vxe-form-item :title="$t1('流程状态') + ':'" field="stat">
140
- <template v-slot>
141
- <el-select v-model="formData.stat" clearable>
142
- <el-option
143
- :value="1"
144
- :label="$t1('审核中')"
145
- ></el-option>
146
- <el-option
147
- :value="2"
148
- :label="$t1('已完成')"
149
- ></el-option>
150
- <el-option
151
- :value="3"
152
- :label="$t1('已驳回')"
153
- ></el-option>
154
- </el-select>
155
- </template>
156
- </vxe-form-item>
157
- <vxe-form-item
158
- :title="$t1('启动人') + ':'"
159
- field="starterName"
160
- >
161
- <template v-slot>
162
- <el-input
163
- v-model="formData.starterName"
164
- size="small"
165
- clearable
166
- />
167
- </template>
168
- </vxe-form-item>
169
- <vxe-form-item title="启动时间:">
170
- <template v-slot>
171
- <el-date-picker
172
- v-model="formData.startTime"
173
- type="datetime"
174
- placeholder=""
175
- size="small"
176
- clearable
177
- value-format="yyyy-MM-dd HH:mm:ss"
178
- :picker-options="
179
- $baseStartPickerOptions(formData.endTime)
180
- "
181
- ></el-date-picker>
182
- <span>-</span>
183
- <el-date-picker
184
- v-model="formData.endTime"
185
- type="datetime"
186
- placeholder=""
187
- size="small"
188
- clearable
189
- value-format="yyyy-MM-dd HH:mm:ss"
190
- default-time="23:59:59"
191
- :picker-options="
192
- $baseEndPickerOptions(formData.startTime)
193
- "
194
- ></el-date-picker>
195
- </template>
196
- </vxe-form-item>
197
- </vxe-form>
198
- </template>
199
- </vxe-grid>
200
- </div>
201
- </div>
202
- </el-tab-pane>
203
- <el-tab-pane :label="$t1('全部流程')" name="third" v-if="flag == 1">
204
- <div class="grid-height">
205
- <vxe-grid
206
- ref="table-m2"
207
- v-bind="vxeOption2"
208
- @resizable-change="$vxeTableUtil.onColumnWitchChange"
209
- @custom="$vxeTableUtil.customHandle"
210
- >
211
- <template #form>
212
- <div class="clearfix screen-btns">
213
- <div class="fl">
214
- <base-table-export
215
- :option="{
216
- title: $t1('流程待办导出'),
217
- targetRef: 'table-m2',
218
- }"
219
- :parent-target="_self"
220
- />
221
- <el-button
222
- type="primary"
223
- class="button-sty"
224
- @click="openCurrentTaskUserDialog"
225
- >{{ $t1("处理任务用户") }}
226
- </el-button>
227
- </div>
228
- <div class="fr">
229
- <vxe-button
230
- icon="el-icon-brush"
231
- class="button-sty"
232
- @click="resetEvent2"
233
- type="text"
234
- status="primary"
235
- plain
236
- >{{ $t1("刷新") }}
237
- </vxe-button>
238
- <vxe-button
239
- status="warning"
240
- icon="el-icon-search"
241
- class="button-sty"
242
- @click="searchEvent2"
243
- >
244
- {{ $t1("搜索") }}
245
- </vxe-button>
246
- </div>
247
- </div>
248
- <vxe-form
249
- ref="form"
250
- class="screen-box"
251
- title-width="92px"
252
- title-align="right"
253
- :data="formData2"
254
- @submit="searchEvent2"
255
- @reset="searchEvent2"
256
- >
257
- <vxe-form-item :title="$t1('流程主题') + ':'" field="name">
258
- <template v-slot>
259
- <el-input v-model="formData2.name" size="small" clearable />
260
- </template>
261
- </vxe-form-item>
262
- <vxe-form-item
263
- :title="$t1('单据类型') + ':'"
264
- field="objTypeName"
265
- >
266
- <template v-slot>
267
- <el-input
268
- class="search-input"
269
- max="200"
270
- v-model="formData2.objTypeName"
271
- @clear="
272
- formData2.objTypeCode = null;
273
- $forceUpdate();
274
- "
275
- v-el-readonly
276
- clearable
277
- >
278
- <i
279
- slot="suffix"
280
- class="el-input__icon el-icon-search"
281
- @click="showWfObjConfigDialog2 = true"
282
- ></i>
283
- </el-input>
284
- </template>
285
- </vxe-form-item>
286
- <vxe-form-item :title="$t1('流程状态') + ':'" field="stat">
287
- <template v-slot>
288
- <el-select v-model="formData2.stat" clearable>
289
- <el-option :value="1" :label="$t1('审核中')"></el-option>
290
- <el-option :value="2" :label="$t1('已完成')"></el-option>
291
- <el-option :value="3" :label="$t1('已驳回')"></el-option>
292
- </el-select>
293
- </template>
294
- </vxe-form-item>
295
- <vxe-form-item
296
- :title="$t1('当前任务用户') + ':'"
297
- field="candidateNames"
298
- >
299
- <template v-slot>
300
- <el-input
301
- v-model="formData2.candidateNames"
302
- size="small"
303
- clearable
304
- />
305
- </template>
306
- </vxe-form-item>
307
- <vxe-form-item :title="$t1('禁用用户流程') + ':'">
308
- <template v-slot>
309
- <el-select v-model="formData2.filterDisabledUser" clearable>
310
- <el-option :value="1" :label="$t1('是')"></el-option>
311
- <el-option :value="0" :label="$t1('否')"></el-option>
312
- </el-select>
313
- </template>
314
- </vxe-form-item>
315
- <vxe-form-item
316
- :title="$t1('禁用用户') + ':'"
317
- field="disabledUserName"
318
- >
319
- <template v-slot>
320
- <el-input
321
- v-model="formData2.disabledUserName"
322
- size="small"
323
- clearable
324
- />
325
- </template>
326
- </vxe-form-item>
327
- </vxe-form>
328
- </template>
329
- </vxe-grid>
330
- </div>
331
- </el-tab-pane>
332
- </el-tabs>
333
- <wfObjConfigDialog
334
- v-if="showWfObjConfigDialog"
335
- :visiable.sync="showWfObjConfigDialog"
336
- :type.sync="type"
337
- @confirm="confirmInsertWfObjConfig"
338
- :multi="false"
339
- ></wfObjConfigDialog>
340
- <wfObjConfigDialog
341
- v-if="showWfObjConfigDialog2"
342
- :visiable.sync="showWfObjConfigDialog2"
343
- :type="99"
344
- @confirm="confirmInsertWfObjConfig2"
345
- :multi="false"
346
- ></wfObjConfigDialog>
347
- <el-dialog
348
- :title="$t1('处理任务用户')"
349
- :append-to-body="true"
350
- :modal-append-to-body="true"
351
- :close-on-click-modal="false"
352
- :visible.sync="showCurrentTaskUserDialog"
353
- :modal="false"
354
- custom-class="dialog-style list-dialog pd_0"
355
- width="300px"
356
- @close="closeCurrentTaskUserDialog"
357
- v-el-drag-dialog
358
- v-el-dialog-center
359
- >
360
- <div class="cont" style="padding: 16px 20px">
361
- <el-form
362
- ref="currentTaskUserForm"
363
- :model="currentTaskUserForm"
364
- label-width="100px"
365
- >
366
- <el-form-item :label="$t1('删除用户')">
367
- <el-input
368
- class="search-input"
369
- v-model="currentTaskUserForm.delUserNames"
370
- clearable
371
- @clear="clearDelUsers"
372
- v-el-readonly
373
- >
374
- <i
375
- slot="suffix"
376
- class="el-input__icon el-icon-search"
377
- @click="openDelUserDialog"
378
- ></i>
379
- </el-input>
380
- </el-form-item>
381
- <el-form-item :label="$t1('新增用户')">
382
- <el-input
383
- class="search-input"
384
- v-model="currentTaskUserForm.addUserNames"
385
- clearable
386
- @clear="clearAddUsers"
387
- v-el-readonly
388
- >
389
- <i
390
- slot="suffix"
391
- class="el-input__icon el-icon-search"
392
- @click="openAddUserDialog"
393
- ></i>
394
- </el-input>
395
- </el-form-item>
396
- </el-form>
397
- </div>
398
- <span slot="footer" class="dialog-footer">
399
- <el-button
400
- type="primary"
401
- plain
402
- class="button-sty"
403
- @click="closeCurrentTaskUserDialog"
404
- >
405
- <i class="el-icon-close el-icon"></i>
406
- {{ $t1("取 消") }}
407
- </el-button>
408
- <el-button
409
- type="primary"
410
- class="button-sty"
411
- @click="confirmCurrentTaskUser"
412
- >
413
- <i class="el-icon-check el-icon"></i>
414
- {{ $t1("确 定") }}
415
- </el-button>
416
- </span>
417
- </el-dialog>
418
- <userDialog
419
- v-if="showDelUserDialog"
420
- :visiable.sync="showDelUserDialog"
421
- @confirm="confirmDelUsers"
422
- :multi="true"
423
- :param="{ enabled: null }"
424
- :rows="currentTaskUserForm.delUserRows"
425
- />
426
- <userDialog
427
- v-if="showAddUserDialog"
428
- :visiable.sync="showAddUserDialog"
429
- @confirm="confirmAddUsers"
430
- :multi="true"
431
- :rows="currentTaskUserForm.addUserRows"
432
- />
433
- </div>
434
- </template>
435
- <script>
436
- import { treeScollx } from "@base/utils/global.js";
437
- import wfObjConfigDialog from "../../../../views/user/wf/wf_obj_config/dialog.vue";
438
- import userDialog from "@base/views/user/user/dialog";
439
- import { loadViewComponent } from "@base/utils/resolveViewComponent";
440
-
441
- export default {
442
- name: "wf_manage:list",
443
- components: { wfObjConfigDialog, userDialog },
444
- created() {},
445
- async mounted() {
446
- treeScollx({ target: this, type: "default" });
447
- await this.initWfParam();
448
- this.initTableList();
449
- this.initRole();
450
- },
451
- data() {
452
- return {
453
- activeName: "second",
454
- // dataId: 0,
455
- // showEdit: false,
456
- vxeOption: {},
457
- formData: {},
458
- checkNode: {},
459
- defaultProps: {
460
- label: "label", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
461
- children: [],
462
- isLeaf: "leaf",
463
- },
464
- wfObjTypes: [],
465
- showWfObjConfigDialog: false,
466
- showWfObjConfigDialog2: false,
467
- flag: 0,
468
- vxeOption2: {},
469
- formData2: {},
470
-
471
- param: {},
472
- wfContent: null,
473
- remoteView: null,
474
- showWfContent: false,
475
-
476
- showCurrentTaskUserDialog: false,
477
- showDelUserDialog: false,
478
- showAddUserDialog: false,
479
- currentTaskUserUuids: [],
480
- currentTaskUserForm: {
481
- delUserIds: [],
482
- delUserNames: "",
483
- delUserRows: [],
484
- addUserIds: [],
485
- addUserNames: "",
486
- addUserRows: [],
487
- },
488
- };
489
- },
490
- computed: {
491
- type() {
492
- return this.checkNode && this.checkNode.data
493
- ? this.checkNode.data.type
494
- : "";
495
- },
496
- checkNodeData() {
497
- return this.checkNode && this.checkNode.data ? this.checkNode.data : {};
498
- },
499
- },
500
- methods: {
501
- searchEvent() {
502
- this.$refs["table-m1"].commitProxy("reload");
503
- },
504
- resetEvent() {
505
- this.formData = {};
506
- this.$refs["table-m1"].commitProxy("reload");
507
- },
508
-
509
- initTableList() {
510
- let that = this;
511
- let paramColumns = this.wfParamDTOs.map((item) => {
512
- let flag = item.paramName == "单号";
513
- return {
514
- title: this.$t1(item.paramName),
515
- field: item.paramKey,
516
- width: 150,
517
- fixed: flag ? "left" : "",
518
- slots: flag
519
- ? {
520
- default: ({ row }) => {
521
- return [
522
- <div>
523
- <a
524
- href="javascript:void(0);"
525
- class="a-link"
526
- onclick={() => {
527
- this.openEditDialog(row);
528
- }}
529
- style="font-weight:bold; text-decoration: underline"
530
- >
531
- <el-tooltip
532
- class="item"
533
- effect="dark"
534
- content={this.$t1("查看")}
535
- placement="top-start"
536
- >
537
- <span>{row.param1}</span>
538
- </el-tooltip>
539
- </a>
540
- </div>,
541
- ];
542
- },
543
- }
544
- : "",
545
- };
546
- });
547
-
548
- // let statuses = {0: '未启动', 1: '审核中', 2: '已完成', 3: '已驳回', 4: '中断'};
549
- var statuses = {
550
- 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
551
- 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
552
- 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
553
- 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
554
- 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
555
- };
556
- let tableOption = {
557
- vue: this,
558
- tableRef: "table-m1",
559
- tableName: "user-wf-wf_manage-list-m2",
560
- path: USER_PREFIX + "/wf_info/listPage",
561
- param: () => {
562
- return {
563
- type: this.type,
564
- ...this.formData,
565
- };
566
- },
567
- /*config: {
568
- proxyConfig: {
569
- autoLoad: false
570
- }
571
- },*/
572
- columns: [
573
- { type: "checkbox", width: 48, resizable: false, fixed: "left" },
574
- {
575
- title: this.$t1("流程主题"),
576
- field: "name",
577
- width: 150,
578
- fixed: "left",
579
- },
580
- {
581
- title: this.$t1("单据类型"),
582
- field: "objTypeName",
583
- width: 150,
584
- },
585
- {
586
- title: this.$t1("启动人"),
587
- field: "starterName",
588
- width: 150,
589
- },
590
- {
591
- title: this.$t1("当前任务"),
592
- field: "taskName",
593
- width: 150,
594
- },
595
- {
596
- title: this.$t1("当前任务用户"),
597
- field: "candidateNames",
598
- width: 150,
599
- },
600
- {
601
- title: this.$t1("流程状态"),
602
- field: "stat",
603
- width: 150,
604
- slots: {
605
- default: ({ row }) => {
606
- let html = statuses[row.stat] || "";
607
- return html;
608
- },
609
- },
610
- },
611
- {
612
- title: this.$t1("启动时间"),
613
- field: "createDate",
614
- width: 150,
615
- },
616
- ...paramColumns,
617
- {
618
- width: 47,
619
- fixed: "right",
620
- title: "",
621
- sortable: false,
622
- slots: {
623
- default: ({ row }) => {
624
- return [
625
- <a
626
- href="javascript:void(0);"
627
- class="a-link"
628
- onclick={() => {
629
- // this.$refs["wfIframeDialog"].wfEdit(row);
630
- this.openEditDialog(row);
631
- }}
632
- >
633
- <el-tooltip
634
- enterable={false}
635
- effect="dark"
636
- content={this.$t1("查看")}
637
- placement="top"
638
- popper-class="tooltip-skin"
639
- >
640
- <i class="el-icon-edit" />
641
- </el-tooltip>
642
- </a>,
643
- ];
644
- },
645
- },
646
- },
647
- ],
648
- };
649
- this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
650
- this.vxeOption = opts;
651
- });
652
- },
653
- openEditDialog(row) {
654
- /*let a = 1;
655
- let url = row.url + '.vue';
656
- let id = row.objId;
657
- this.dataId = !id || typeof id == 'object' ? 0 : id;
658
- this.content = require('@/views' + url).default;*/
659
- // this.activeName = 'first';
660
- // this.$openEditView('showEdit');
661
-
662
- let id = row.objId;
663
- let wfDataId = !id || typeof id == "object" ? 0 : Number(id);
664
-
665
- if (row.url == "form") {
666
- let formCode = null;
667
- if (row.formCode) {
668
- formCode = row.formCode;
669
- } else {
670
- formCode = row.objTypeCode.substr(9);
671
- }
672
- this.param = {
673
- formCode: formCode,
674
- dataId: wfDataId,
675
- };
676
- let url = "/user/form/vform/render.vue";
677
- this.wfContent = require("@base/views" + url).default;
678
- } else {
679
- this.param = {
680
- _dataId: wfDataId,
681
- };
682
- let url = row.url + ".vue";
683
- let res = loadViewComponent(url);
684
- this.remoteView =
685
- res.kind === "remote"
686
- ? {
687
- owner: res.owner,
688
- targetPath: res.targetPath,
689
- bizParams: this.param,
690
- viewMeta: {
691
- visibleKey: "showWfContent",
692
- defaultShowWfContent: true,
693
- viewType: 1,
694
- },
695
- }
696
- : null;
697
- this.wfContent = res.component;
698
- }
699
- this.activeName = "first";
700
- this.$openEditView("showWfContent");
701
- },
702
- guid() {
703
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
704
- /[xy]/g,
705
- function (c) {
706
- var r = (Math.random() * 16) | 0,
707
- v = c == "x" ? r : (r & 0x3) | 0x8;
708
- return v.toString(16);
709
- }
710
- );
711
- },
712
- clearNodeClick() {
713
- /* this.formData.saleOrgId = '';
714
- this.formData.saleOrgName = '';
715
- this.$refs.tree.setCurrentKey();
716
- this.searchEvent(); */
717
- },
718
- handleNodeClick(data, node, v) {
719
- this.checkNode = node;
720
- this.formData.objTypeName = null;
721
- this.formData.objTypeCode = null;
722
- this.$forceUpdate();
723
- this.searchEvent();
724
- },
725
- // 异步树叶子节点懒加载逻辑
726
- loadNode(node, resolve) {
727
- if (!node || !node.data || node.data.type === undefined) {
728
- this.initNodeData(node, resolve);
729
- return;
730
- }
731
- this.$http({
732
- url: USER_PREFIX + "/wf_obj_config/getWfGroups",
733
- method: "post",
734
- data: {
735
- type: node.data.type,
736
- },
737
- success: (res) => {
738
- let rows = res.objx || [];
739
- rows.forEach((item) => {
740
- item.leaf = true;
741
- item.label = item.objTypeName + "(" + item.num + ")";
742
- item.type = node.data.type;
743
- item.uuid = this.guid();
744
- });
745
- resolve(rows);
746
- },
747
- });
748
- },
749
- initNodeData(node, resolve) {
750
- let data = [
751
- {
752
- uuid: -1,
753
- label: this.$t1("待审批的"),
754
- type: 0,
755
- leaf: true,
756
- },
757
- {
758
- uuid: -2,
759
- label: this.$t1("我发起的"),
760
- type: 1,
761
- leaf: true,
762
- },
763
- {
764
- uuid: -3,
765
- label: this.$t1("已审批的"),
766
- type: 2,
767
- leaf: true,
768
- },
769
- {
770
- uuid: -4,
771
- label: this.$t1("已完成的"),
772
- type: "3",
773
- leaf: true,
774
- },
775
- {
776
- uuid: -5,
777
- label: this.$t1("我转办的"),
778
- type: "4",
779
- leaf: true,
780
- },
781
- ];
782
- resolve(data);
783
- this.$nextTick(() => {
784
- if (node.childNodes.length) {
785
- let firstNode = node.childNodes[0];
786
- this.$refs.tree.setCurrentKey(firstNode.data.uuid);
787
- this.checkNode = firstNode;
788
- this.$forceUpdate();
789
- // this.handleNodeClick(firstNode.data, firstNode);
790
- }
791
- });
792
- /*this.$nextTick(() => {
793
- if (node.childNodes.length) {
794
- let nodedata = node.childNodes[0];
795
- nodedata.expanded = true;
796
- nodedata.loadData(arr => {
797
- if (arr.length) {
798
- setTimeout(() => {
799
- this.$refs.tree.setCurrentKey(arr[0].uuid);
800
- let node = this.$refs.tree.getNode(arr[0]);
801
- this.handleNodeClick(arr[0], node);
802
- }, 50);
803
- }
804
- });
805
- }
806
- });*/
807
- },
808
- confirmInsertWfObjConfig(rows) {
809
- if (rows.length) {
810
- let row = rows[0];
811
- this.$set(this.formData, "objTypeName", row.objTypeName);
812
- this.$set(this.formData, "objTypeCode", row.objTypeCode);
813
- }
814
- },
815
- async initWfParam() {
816
- return this.$http({
817
- url: USER_PREFIX + "/wf_param/list",
818
- method: `post`,
819
- data: {},
820
- success: (res) => {
821
- this.wfParamDTOs = res.objx || [];
822
- },
823
- });
824
- },
825
- //m2
826
- initRole() {
827
- this.$http({
828
- url: USER_PREFIX + "/user/currentUser",
829
- method: "post",
830
- success: (res) => {
831
- let userInfo = res.objx;
832
- this.getIsAdmin(userInfo);
833
- },
834
- });
835
- },
836
- getIsAdmin(userInfo) {
837
- this.$http({
838
- url: USER_PREFIX + "/userb/getUserRole",
839
- method: `post`,
840
- data: { id: userInfo.id },
841
- success: (res2) => {
842
- let rows = res2.objx || [];
843
- let codes = rows.map((row) => row.roleCode);
844
- if (codes.includes("superadmin") || codes.includes("wfadmin")) {
845
- this.flag = 1;
846
- setTimeout(() => {
847
- this.initTableList2();
848
- }, 200);
849
- }
850
- },
851
- });
852
- },
853
- searchEvent2() {
854
- this.$refs["table-m2"].commitProxy("reload");
855
- },
856
- resetEvent2() {
857
- this.formData2 = {};
858
- this.$refs["table-m2"].commitProxy("reload");
859
- },
860
- initTableList2() {
861
- let that = this;
862
- let paramColumns = this.wfParamDTOs.map((item) => {
863
- let flag = item.paramName == "单号";
864
- return {
865
- title: this.$t1(item.paramName),
866
- field: item.paramKey,
867
- width: 150,
868
- fixed: flag ? "left" : "",
869
- slots: flag
870
- ? {
871
- default: ({ row }) => {
872
- return [
873
- <div>
874
- <a
875
- href="javascript:void(0);"
876
- class="a-link"
877
- onclick={() => {
878
- this.openEditDialog(row);
879
- }}
880
- style="font-weight:bold; text-decoration: underline"
881
- >
882
- <el-tooltip
883
- class="item"
884
- effect="dark"
885
- content={this.$t1("查看")}
886
- placement="top-start"
887
- >
888
- <span>{row.param1}</span>
889
- </el-tooltip>
890
- </a>
891
- </div>,
892
- ];
893
- },
894
- }
895
- : "",
896
- };
897
- });
898
-
899
- var statuses = {
900
- 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
901
- 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
902
- 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
903
- 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
904
- 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
905
- };
906
- let tableOption = {
907
- vue: this,
908
- tableRef: "table-m2",
909
- tableName: "user-wf-wf_manage-list-m3",
910
- path: USER_PREFIX + "/wf_info/listPageAll",
911
- param: () => {
912
- return {
913
- ...this.formData2,
914
- };
915
- },
916
- columns: [
917
- { type: "checkbox", width: 48, resizable: false, fixed: "left" },
918
- {
919
- title: this.$t1("流程主题"),
920
- field: "name",
921
- width: 150,
922
- fixed: "left",
923
- },
924
- {
925
- title: this.$t1("单据类型"),
926
- field: "objTypeName",
927
- width: 150,
928
- },
929
- {
930
- title: this.$t1("启动人"),
931
- field: "starterName",
932
- width: 150,
933
- },
934
- {
935
- title: this.$t1("当前任务"),
936
- field: "taskName",
937
- width: 150,
938
- },
939
- {
940
- title: this.$t1("当前任务用户"),
941
- field: "candidateNames",
942
- width: 150,
943
- },
944
- {
945
- title: this.$t1("禁用用户"),
946
- field: "disabledUserNames",
947
- width: 200,
948
- },
949
- {
950
- title: this.$t1("流程状态"),
951
- field: "stat",
952
- width: 150,
953
- slots: {
954
- default: ({ row }) => {
955
- let html = statuses[row.stat] || "";
956
- return html;
957
- },
958
- },
959
- },
960
- {
961
- title: this.$t1("启动时间"),
962
- field: "createDate",
963
- width: 150,
964
- },
965
- ...paramColumns,
966
- {
967
- width: 47,
968
- fixed: "right",
969
- title: "",
970
- sortable: false,
971
- slots: {
972
- default: ({ row }) => {
973
- return [
974
- <a
975
- href="javascript:void(0);"
976
- class="a-link"
977
- onclick={() => {
978
- this.openEditDialog(row);
979
- }}
980
- >
981
- <el-tooltip
982
- enterable={false}
983
- effect="dark"
984
- content={this.$t1("查看")}
985
- placement="top"
986
- popper-class="tooltip-skin"
987
- >
988
- <i class="el-icon-edit" />
989
- </el-tooltip>
990
- </a>,
991
- ];
992
- },
993
- },
994
- },
995
- ],
996
- };
997
- this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
998
- this.vxeOption2 = opts;
999
- });
1000
- },
1001
- confirmInsertWfObjConfig2(rows) {
1002
- if (rows.length) {
1003
- let row = rows[0];
1004
- this.$set(this.formData2, "objTypeName", row.objTypeName);
1005
- this.$set(this.formData2, "objTypeCode", row.objTypeCode);
1006
- }
1007
- },
1008
- openCurrentTaskUserDialog() {
1009
- let checkRows = this.$refs["table-m2"].getCheckboxRecords(true) || [];
1010
- if (!checkRows.length) {
1011
- this.$baseAlert(this.$t1("请勾选需要处理的数据"));
1012
- return;
1013
- }
1014
- this.currentTaskUserUuids = checkRows.map((row) => row.uuid);
1015
- this.currentTaskUserForm = {
1016
- delUserIds: [],
1017
- delUserNames: "",
1018
- delUserRows: [],
1019
- addUserIds: [],
1020
- addUserNames: "",
1021
- addUserRows: [],
1022
- };
1023
- this.showCurrentTaskUserDialog = true;
1024
- this.initDelUsers();
1025
- },
1026
- initDelUsers() {
1027
- this.$http({
1028
- url: USER_PREFIX + "/wf_info/getDelUsers",
1029
- method: "post",
1030
- data: {
1031
- uuid: this.currentTaskUserUuids,
1032
- flag: 1,
1033
- },
1034
- success: (res) => {
1035
- let rows = (res.objx || []).map((row) => {
1036
- return { ...row, nickName: row.nickName || row.nick_name };
1037
- });
1038
- this.confirmDelUsers(rows);
1039
- },
1040
- });
1041
- },
1042
- closeCurrentTaskUserDialog() {
1043
- this.showCurrentTaskUserDialog = false;
1044
- },
1045
- openDelUserDialog() {
1046
- this.showDelUserDialog = true;
1047
- },
1048
- openAddUserDialog() {
1049
- this.showAddUserDialog = true;
1050
- },
1051
- clearDelUsers() {
1052
- this.currentTaskUserForm.delUserIds = [];
1053
- this.currentTaskUserForm.delUserNames = "";
1054
- this.currentTaskUserForm.delUserRows = [];
1055
- },
1056
- clearAddUsers() {
1057
- this.currentTaskUserForm.addUserIds = [];
1058
- this.currentTaskUserForm.addUserNames = "";
1059
- this.currentTaskUserForm.addUserRows = [];
1060
- },
1061
- confirmDelUsers(rows) {
1062
- if (!rows || !rows.length) {
1063
- this.clearDelUsers();
1064
- return;
1065
- }
1066
- this.currentTaskUserForm.delUserIds = rows.map((row) => row.id);
1067
- this.currentTaskUserForm.delUserRows = rows;
1068
- this.currentTaskUserForm.delUserNames = rows
1069
- .map((row) => row.nickName)
1070
- .join(",");
1071
- },
1072
- confirmAddUsers(rows) {
1073
- if (!rows || !rows.length) {
1074
- this.clearAddUsers();
1075
- return;
1076
- }
1077
- this.currentTaskUserForm.addUserIds = rows.map((row) => row.id);
1078
- this.currentTaskUserForm.addUserRows = rows;
1079
- this.currentTaskUserForm.addUserNames = rows
1080
- .map((row) => row.nickName)
1081
- .join(",");
1082
- },
1083
- confirmCurrentTaskUser() {
1084
- let delUserIds = this.currentTaskUserForm.delUserIds || [];
1085
- let addUserIds = this.currentTaskUserForm.addUserIds || [];
1086
- if (!delUserIds.length) {
1087
- this.$message.error(this.$t1("请选择删除用户"));
1088
- return;
1089
- }
1090
- this.$baseConfirm(this.$t1("您确定要处理任务用户吗?")).then(() => {
1091
- this.$http({
1092
- url: USER_PREFIX + "/wf_info/updateCurrentTaskUsers",
1093
- method: "post",
1094
- data: {
1095
- uuid: this.currentTaskUserUuids,
1096
- delUserIds: delUserIds,
1097
- addUserIds: addUserIds,
1098
- },
1099
- isLoading: true,
1100
- success: (res) => {
1101
- this.$message({
1102
- message: res.content || this.$t1("操作成功"),
1103
- type: "success",
1104
- duration: 500,
1105
- onClose: () => {
1106
- this.closeCurrentTaskUserDialog();
1107
- this.searchEvent2();
1108
- },
1109
- });
1110
- },
1111
- });
1112
- });
1113
- },
1114
- },
1115
- };
1116
- </script>
1
+ <template>
2
+ <div id="containt">
3
+ <el-tabs v-model="activeName" class="tab-box">
4
+ <el-tab-pane :label="$t1('常规')" name="first">
5
+ <component
6
+ v-if="showWfContent && wfContent"
7
+ :is="wfContent"
8
+ visible-key="showWfContent"
9
+ v-bind="param"
10
+ :parent-target="_self"
11
+ :defaultShowWfContent="true"
12
+ :_viewType="1"
13
+ @reload="$reloadHandle"
14
+ ></component>
15
+ <micro-view-host
16
+ v-else-if="showWfContent && remoteView"
17
+ :owner="remoteView.owner"
18
+ :target-path="remoteView.targetPath"
19
+ :biz-params="remoteView.bizParams"
20
+ :view-meta="remoteView.viewMeta"
21
+ @reload="$reloadHandle"
22
+ @close="showWfContent = false"
23
+ ></micro-view-host>
24
+ </el-tab-pane>
25
+ <el-tab-pane :label="$t1('我的流程')" name="second">
26
+ <div class="tree-box fl">
27
+ <div class="tit">
28
+ <b>{{ $t1("待办类型") }}</b>
29
+ </div>
30
+ <el-tree
31
+ :props="defaultProps"
32
+ :load="loadNode"
33
+ node-key="uuid"
34
+ ref="tree"
35
+ highlight-current
36
+ lazy
37
+ :expand-on-click-node="false"
38
+ @node-click="handleNodeClick"
39
+ class="tree-list"
40
+ icon-class="el-icon-arrow-down"
41
+ ></el-tree>
42
+ </div>
43
+ <label id="labBtn">
44
+ <div class="icon">
45
+ <i class="el-icon-more"></i>
46
+ <i class="el-icon-more"></i>
47
+ </div>
48
+ </label>
49
+ <div class="main-right fr" style="padding-left: 6px">
50
+ <div class="grid-height">
51
+ <vxe-grid
52
+ ref="table-m1"
53
+ v-bind="vxeOption"
54
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
55
+ @custom="$vxeTableUtil.customHandle"
56
+ >
57
+ <template #form>
58
+ <div class="clearfix screen-btns">
59
+ <div class="fl">
60
+ <base-table-export
61
+ :option="{
62
+ title: $t1('流程待办导出'),
63
+ targetRef: 'table-m1',
64
+ }"
65
+ :parent-target="_self"
66
+ />
67
+ </div>
68
+ <div class="fr">
69
+ <vxe-button
70
+ icon="el-icon-brush"
71
+ class="button-sty"
72
+ @click="resetEvent"
73
+ type="text"
74
+ status="primary"
75
+ plain
76
+ >{{ $t1("刷新") }}
77
+ </vxe-button>
78
+ <vxe-button
79
+ status="warning"
80
+ icon="el-icon-search"
81
+ class="button-sty"
82
+ @click="searchEvent"
83
+ >
84
+ {{ $t1("搜索") }}
85
+ </vxe-button>
86
+ </div>
87
+ </div>
88
+ <vxe-form
89
+ ref="form"
90
+ class="screen-box"
91
+ title-width="92px"
92
+ title-align="right"
93
+ :data="formData"
94
+ @submit="searchEvent"
95
+ @reset="searchEvent"
96
+ >
97
+ <vxe-form-item :title="$t1('待办类型') + ':'">
98
+ <template v-slot>
99
+ <el-input
100
+ v-model="checkNodeData.label"
101
+ size="small"
102
+ disabled
103
+ />
104
+ </template>
105
+ </vxe-form-item>
106
+ <vxe-form-item :title="$t1('流程主题') + ':'" field="name">
107
+ <template v-slot>
108
+ <el-input
109
+ v-model="formData.name"
110
+ size="small"
111
+ clearable
112
+ />
113
+ </template>
114
+ </vxe-form-item>
115
+ <vxe-form-item
116
+ :title="$t1('单据类型') + ':'"
117
+ field="objTypeName"
118
+ >
119
+ <template v-slot>
120
+ <el-input
121
+ class="search-input"
122
+ max="200"
123
+ v-model="formData.objTypeName"
124
+ @clear="
125
+ formData.objTypeCode = null;
126
+ $forceUpdate();
127
+ "
128
+ v-el-readonly
129
+ clearable
130
+ >
131
+ <i
132
+ slot="suffix"
133
+ class="el-input__icon el-icon-search"
134
+ @click="showWfObjConfigDialog = true"
135
+ ></i>
136
+ </el-input>
137
+ </template>
138
+ </vxe-form-item>
139
+ <vxe-form-item :title="$t1('流程状态') + ':'" field="stat">
140
+ <template v-slot>
141
+ <el-select v-model="formData.stat" clearable>
142
+ <el-option
143
+ :value="1"
144
+ :label="$t1('审核中')"
145
+ ></el-option>
146
+ <el-option
147
+ :value="2"
148
+ :label="$t1('已完成')"
149
+ ></el-option>
150
+ <el-option
151
+ :value="3"
152
+ :label="$t1('已驳回')"
153
+ ></el-option>
154
+ </el-select>
155
+ </template>
156
+ </vxe-form-item>
157
+ <vxe-form-item
158
+ :title="$t1('启动人') + ':'"
159
+ field="starterName"
160
+ >
161
+ <template v-slot>
162
+ <el-input
163
+ v-model="formData.starterName"
164
+ size="small"
165
+ clearable
166
+ />
167
+ </template>
168
+ </vxe-form-item>
169
+ <vxe-form-item title="启动时间:">
170
+ <template v-slot>
171
+ <el-date-picker
172
+ v-model="formData.startTime"
173
+ type="datetime"
174
+ placeholder=""
175
+ size="small"
176
+ clearable
177
+ value-format="yyyy-MM-dd HH:mm:ss"
178
+ :picker-options="
179
+ $baseStartPickerOptions(formData.endTime)
180
+ "
181
+ ></el-date-picker>
182
+ <span>-</span>
183
+ <el-date-picker
184
+ v-model="formData.endTime"
185
+ type="datetime"
186
+ placeholder=""
187
+ size="small"
188
+ clearable
189
+ value-format="yyyy-MM-dd HH:mm:ss"
190
+ default-time="23:59:59"
191
+ :picker-options="
192
+ $baseEndPickerOptions(formData.startTime)
193
+ "
194
+ ></el-date-picker>
195
+ </template>
196
+ </vxe-form-item>
197
+ </vxe-form>
198
+ </template>
199
+ </vxe-grid>
200
+ </div>
201
+ </div>
202
+ </el-tab-pane>
203
+ <el-tab-pane :label="$t1('全部流程')" name="third" v-if="flag == 1">
204
+ <div class="grid-height">
205
+ <vxe-grid
206
+ ref="table-m2"
207
+ v-bind="vxeOption2"
208
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
209
+ @custom="$vxeTableUtil.customHandle"
210
+ >
211
+ <template #form>
212
+ <div class="clearfix screen-btns">
213
+ <div class="fl">
214
+ <base-table-export
215
+ :option="{
216
+ title: $t1('流程待办导出'),
217
+ targetRef: 'table-m2',
218
+ }"
219
+ :parent-target="_self"
220
+ />
221
+ <el-button
222
+ type="primary"
223
+ class="button-sty"
224
+ @click="openCurrentTaskUserDialog"
225
+ >{{ $t1("处理任务用户") }}
226
+ </el-button>
227
+ </div>
228
+ <div class="fr">
229
+ <vxe-button
230
+ icon="el-icon-brush"
231
+ class="button-sty"
232
+ @click="resetEvent2"
233
+ type="text"
234
+ status="primary"
235
+ plain
236
+ >{{ $t1("刷新") }}
237
+ </vxe-button>
238
+ <vxe-button
239
+ status="warning"
240
+ icon="el-icon-search"
241
+ class="button-sty"
242
+ @click="searchEvent2"
243
+ >
244
+ {{ $t1("搜索") }}
245
+ </vxe-button>
246
+ </div>
247
+ </div>
248
+ <vxe-form
249
+ ref="form"
250
+ class="screen-box"
251
+ title-width="92px"
252
+ title-align="right"
253
+ :data="formData2"
254
+ @submit="searchEvent2"
255
+ @reset="searchEvent2"
256
+ >
257
+ <vxe-form-item :title="$t1('流程主题') + ':'" field="name">
258
+ <template v-slot>
259
+ <el-input v-model="formData2.name" size="small" clearable />
260
+ </template>
261
+ </vxe-form-item>
262
+ <vxe-form-item
263
+ :title="$t1('单据类型') + ':'"
264
+ field="objTypeName"
265
+ >
266
+ <template v-slot>
267
+ <el-input
268
+ class="search-input"
269
+ max="200"
270
+ v-model="formData2.objTypeName"
271
+ @clear="
272
+ formData2.objTypeCode = null;
273
+ $forceUpdate();
274
+ "
275
+ v-el-readonly
276
+ clearable
277
+ >
278
+ <i
279
+ slot="suffix"
280
+ class="el-input__icon el-icon-search"
281
+ @click="showWfObjConfigDialog2 = true"
282
+ ></i>
283
+ </el-input>
284
+ </template>
285
+ </vxe-form-item>
286
+ <vxe-form-item :title="$t1('流程状态') + ':'" field="stat">
287
+ <template v-slot>
288
+ <el-select v-model="formData2.stat" clearable>
289
+ <el-option :value="1" :label="$t1('审核中')"></el-option>
290
+ <el-option :value="2" :label="$t1('已完成')"></el-option>
291
+ <el-option :value="3" :label="$t1('已驳回')"></el-option>
292
+ </el-select>
293
+ </template>
294
+ </vxe-form-item>
295
+ <vxe-form-item
296
+ :title="$t1('当前任务用户') + ':'"
297
+ field="candidateNames"
298
+ >
299
+ <template v-slot>
300
+ <el-input
301
+ v-model="formData2.candidateNames"
302
+ size="small"
303
+ clearable
304
+ />
305
+ </template>
306
+ </vxe-form-item>
307
+ <vxe-form-item :title="$t1('禁用用户流程') + ':'">
308
+ <template v-slot>
309
+ <el-select v-model="formData2.filterDisabledUser" clearable>
310
+ <el-option :value="1" :label="$t1('是')"></el-option>
311
+ <el-option :value="0" :label="$t1('否')"></el-option>
312
+ </el-select>
313
+ </template>
314
+ </vxe-form-item>
315
+ <vxe-form-item
316
+ :title="$t1('禁用用户') + ':'"
317
+ field="disabledUserName"
318
+ >
319
+ <template v-slot>
320
+ <el-input
321
+ v-model="formData2.disabledUserName"
322
+ size="small"
323
+ clearable
324
+ />
325
+ </template>
326
+ </vxe-form-item>
327
+ </vxe-form>
328
+ </template>
329
+ </vxe-grid>
330
+ </div>
331
+ </el-tab-pane>
332
+ </el-tabs>
333
+ <wfObjConfigDialog
334
+ v-if="showWfObjConfigDialog"
335
+ :visiable.sync="showWfObjConfigDialog"
336
+ :type.sync="type"
337
+ @confirm="confirmInsertWfObjConfig"
338
+ :multi="false"
339
+ ></wfObjConfigDialog>
340
+ <wfObjConfigDialog
341
+ v-if="showWfObjConfigDialog2"
342
+ :visiable.sync="showWfObjConfigDialog2"
343
+ :type="99"
344
+ @confirm="confirmInsertWfObjConfig2"
345
+ :multi="false"
346
+ ></wfObjConfigDialog>
347
+ <el-dialog
348
+ :title="$t1('处理任务用户')"
349
+ :append-to-body="true"
350
+ :modal-append-to-body="true"
351
+ :close-on-click-modal="false"
352
+ :visible.sync="showCurrentTaskUserDialog"
353
+ :modal="false"
354
+ custom-class="dialog-style list-dialog pd_0"
355
+ width="300px"
356
+ @close="closeCurrentTaskUserDialog"
357
+ v-el-drag-dialog
358
+ v-el-dialog-center
359
+ >
360
+ <div class="cont" style="padding: 16px 20px">
361
+ <el-form
362
+ ref="currentTaskUserForm"
363
+ :model="currentTaskUserForm"
364
+ label-width="100px"
365
+ >
366
+ <el-form-item :label="$t1('删除用户')">
367
+ <el-input
368
+ class="search-input"
369
+ v-model="currentTaskUserForm.delUserNames"
370
+ clearable
371
+ @clear="clearDelUsers"
372
+ v-el-readonly
373
+ >
374
+ <i
375
+ slot="suffix"
376
+ class="el-input__icon el-icon-search"
377
+ @click="openDelUserDialog"
378
+ ></i>
379
+ </el-input>
380
+ </el-form-item>
381
+ <el-form-item :label="$t1('新增用户')">
382
+ <el-input
383
+ class="search-input"
384
+ v-model="currentTaskUserForm.addUserNames"
385
+ clearable
386
+ @clear="clearAddUsers"
387
+ v-el-readonly
388
+ >
389
+ <i
390
+ slot="suffix"
391
+ class="el-input__icon el-icon-search"
392
+ @click="openAddUserDialog"
393
+ ></i>
394
+ </el-input>
395
+ </el-form-item>
396
+ </el-form>
397
+ </div>
398
+ <span slot="footer" class="dialog-footer">
399
+ <el-button
400
+ type="primary"
401
+ plain
402
+ class="button-sty"
403
+ @click="closeCurrentTaskUserDialog"
404
+ >
405
+ <i class="el-icon-close el-icon"></i>
406
+ {{ $t1("取 消") }}
407
+ </el-button>
408
+ <el-button
409
+ type="primary"
410
+ class="button-sty"
411
+ @click="confirmCurrentTaskUser"
412
+ >
413
+ <i class="el-icon-check el-icon"></i>
414
+ {{ $t1("确 定") }}
415
+ </el-button>
416
+ </span>
417
+ </el-dialog>
418
+ <userDialog
419
+ v-if="showDelUserDialog"
420
+ :visiable.sync="showDelUserDialog"
421
+ @confirm="confirmDelUsers"
422
+ :multi="true"
423
+ :param="{ enabled: null }"
424
+ :rows="currentTaskUserForm.delUserRows"
425
+ />
426
+ <userDialog
427
+ v-if="showAddUserDialog"
428
+ :visiable.sync="showAddUserDialog"
429
+ @confirm="confirmAddUsers"
430
+ :multi="true"
431
+ :rows="currentTaskUserForm.addUserRows"
432
+ />
433
+ </div>
434
+ </template>
435
+ <script>
436
+ import { treeScollx } from "@base/utils/global.js";
437
+ import wfObjConfigDialog from "../../../../views/user/wf/wf_obj_config/dialog.vue";
438
+ import userDialog from "@base/views/user/user/dialog";
439
+ import { loadViewComponent } from "@base/utils/resolveViewComponent";
440
+
441
+ export default {
442
+ name: "wf_manage:list",
443
+ components: { wfObjConfigDialog, userDialog },
444
+ created() {},
445
+ async mounted() {
446
+ treeScollx({ target: this, type: "default" });
447
+ await this.initWfParam();
448
+ this.initTableList();
449
+ this.initRole();
450
+ },
451
+ data() {
452
+ return {
453
+ activeName: "second",
454
+ // dataId: 0,
455
+ // showEdit: false,
456
+ vxeOption: {},
457
+ formData: {},
458
+ checkNode: {},
459
+ defaultProps: {
460
+ label: "label", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
461
+ children: [],
462
+ isLeaf: "leaf",
463
+ },
464
+ wfObjTypes: [],
465
+ showWfObjConfigDialog: false,
466
+ showWfObjConfigDialog2: false,
467
+ flag: 0,
468
+ vxeOption2: {},
469
+ formData2: {},
470
+
471
+ param: {},
472
+ wfContent: null,
473
+ remoteView: null,
474
+ showWfContent: false,
475
+
476
+ showCurrentTaskUserDialog: false,
477
+ showDelUserDialog: false,
478
+ showAddUserDialog: false,
479
+ currentTaskUserUuids: [],
480
+ currentTaskUserForm: {
481
+ delUserIds: [],
482
+ delUserNames: "",
483
+ delUserRows: [],
484
+ addUserIds: [],
485
+ addUserNames: "",
486
+ addUserRows: [],
487
+ },
488
+ };
489
+ },
490
+ computed: {
491
+ type() {
492
+ return this.checkNode && this.checkNode.data
493
+ ? this.checkNode.data.type
494
+ : "";
495
+ },
496
+ checkNodeData() {
497
+ return this.checkNode && this.checkNode.data ? this.checkNode.data : {};
498
+ },
499
+ },
500
+ methods: {
501
+ searchEvent() {
502
+ this.$refs["table-m1"].commitProxy("reload");
503
+ },
504
+ resetEvent() {
505
+ this.formData = {};
506
+ this.$refs["table-m1"].commitProxy("reload");
507
+ },
508
+
509
+ initTableList() {
510
+ let that = this;
511
+ let paramColumns = this.wfParamDTOs.map((item) => {
512
+ let flag = item.paramName == "单号";
513
+ return {
514
+ title: this.$t1(item.paramName),
515
+ field: item.paramKey,
516
+ width: 150,
517
+ fixed: flag ? "left" : "",
518
+ slots: flag
519
+ ? {
520
+ default: ({ row }) => {
521
+ return [
522
+ <div>
523
+ <a
524
+ href="javascript:void(0);"
525
+ class="a-link"
526
+ onclick={() => {
527
+ this.openEditDialog(row);
528
+ }}
529
+ style="font-weight:bold; text-decoration: underline"
530
+ >
531
+ <el-tooltip
532
+ class="item"
533
+ effect="dark"
534
+ content={this.$t1("查看")}
535
+ placement="top-start"
536
+ >
537
+ <span>{row.param1}</span>
538
+ </el-tooltip>
539
+ </a>
540
+ </div>,
541
+ ];
542
+ },
543
+ }
544
+ : "",
545
+ };
546
+ });
547
+
548
+ // let statuses = {0: '未启动', 1: '审核中', 2: '已完成', 3: '已驳回', 4: '中断'};
549
+ var statuses = {
550
+ 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
551
+ 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
552
+ 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
553
+ 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
554
+ 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
555
+ };
556
+ let tableOption = {
557
+ vue: this,
558
+ tableRef: "table-m1",
559
+ tableName: "user-wf-wf_manage-list-m2",
560
+ path: USER_PREFIX + "/wf_info/listPage",
561
+ param: () => {
562
+ return {
563
+ type: this.type,
564
+ ...this.formData,
565
+ };
566
+ },
567
+ /*config: {
568
+ proxyConfig: {
569
+ autoLoad: false
570
+ }
571
+ },*/
572
+ columns: [
573
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
574
+ {
575
+ title: this.$t1("流程主题"),
576
+ field: "name",
577
+ width: 150,
578
+ fixed: "left",
579
+ },
580
+ {
581
+ title: this.$t1("单据类型"),
582
+ field: "objTypeName",
583
+ width: 150,
584
+ },
585
+ {
586
+ title: this.$t1("启动人"),
587
+ field: "starterName",
588
+ width: 150,
589
+ },
590
+ {
591
+ title: this.$t1("当前任务"),
592
+ field: "taskName",
593
+ width: 150,
594
+ },
595
+ {
596
+ title: this.$t1("当前任务用户"),
597
+ field: "candidateNames",
598
+ width: 150,
599
+ },
600
+ {
601
+ title: this.$t1("流程状态"),
602
+ field: "stat",
603
+ width: 150,
604
+ slots: {
605
+ default: ({ row }) => {
606
+ let html = statuses[row.stat] || "";
607
+ return html;
608
+ },
609
+ },
610
+ },
611
+ {
612
+ title: this.$t1("启动时间"),
613
+ field: "createDate",
614
+ width: 150,
615
+ },
616
+ ...paramColumns,
617
+ {
618
+ width: 47,
619
+ fixed: "right",
620
+ title: "",
621
+ sortable: false,
622
+ slots: {
623
+ default: ({ row }) => {
624
+ return [
625
+ <a
626
+ href="javascript:void(0);"
627
+ class="a-link"
628
+ onclick={() => {
629
+ // this.$refs["wfIframeDialog"].wfEdit(row);
630
+ this.openEditDialog(row);
631
+ }}
632
+ >
633
+ <el-tooltip
634
+ enterable={false}
635
+ effect="dark"
636
+ content={this.$t1("查看")}
637
+ placement="top"
638
+ popper-class="tooltip-skin"
639
+ >
640
+ <i class="el-icon-edit" />
641
+ </el-tooltip>
642
+ </a>,
643
+ ];
644
+ },
645
+ },
646
+ },
647
+ ],
648
+ };
649
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
650
+ this.vxeOption = opts;
651
+ });
652
+ },
653
+ openEditDialog(row) {
654
+ /*let a = 1;
655
+ let url = row.url + '.vue';
656
+ let id = row.objId;
657
+ this.dataId = !id || typeof id == 'object' ? 0 : id;
658
+ this.content = require('@/views' + url).default;*/
659
+ // this.activeName = 'first';
660
+ // this.$openEditView('showEdit');
661
+
662
+ let id = row.objId;
663
+ let wfDataId = !id || typeof id == "object" ? 0 : Number(id);
664
+
665
+ if (row.url == "form") {
666
+ let formCode = null;
667
+ if (row.formCode) {
668
+ formCode = row.formCode;
669
+ } else {
670
+ formCode = row.objTypeCode.substr(9);
671
+ }
672
+ this.param = {
673
+ formCode: formCode,
674
+ dataId: wfDataId,
675
+ };
676
+ let url = "/user/form/vform/render.vue";
677
+ this.wfContent = require("@base/views" + url).default;
678
+ } else {
679
+ this.param = {
680
+ _dataId: wfDataId,
681
+ };
682
+ let url = row.url + ".vue";
683
+ let res = loadViewComponent(url);
684
+ this.remoteView =
685
+ res.kind === "remote"
686
+ ? {
687
+ owner: res.owner,
688
+ targetPath: res.targetPath,
689
+ bizParams: this.param,
690
+ viewMeta: {
691
+ visibleKey: "showWfContent",
692
+ defaultShowWfContent: true,
693
+ viewType: 1,
694
+ },
695
+ }
696
+ : null;
697
+ this.wfContent = res.component;
698
+ }
699
+ this.activeName = "first";
700
+ this.$openEditView("showWfContent");
701
+ },
702
+ guid() {
703
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
704
+ /[xy]/g,
705
+ function (c) {
706
+ var r = (Math.random() * 16) | 0,
707
+ v = c == "x" ? r : (r & 0x3) | 0x8;
708
+ return v.toString(16);
709
+ }
710
+ );
711
+ },
712
+ clearNodeClick() {
713
+ /* this.formData.saleOrgId = '';
714
+ this.formData.saleOrgName = '';
715
+ this.$refs.tree.setCurrentKey();
716
+ this.searchEvent(); */
717
+ },
718
+ handleNodeClick(data, node, v) {
719
+ this.checkNode = node;
720
+ this.formData.objTypeName = null;
721
+ this.formData.objTypeCode = null;
722
+ this.$forceUpdate();
723
+ this.searchEvent();
724
+ },
725
+ // 异步树叶子节点懒加载逻辑
726
+ loadNode(node, resolve) {
727
+ if (!node || !node.data || node.data.type === undefined) {
728
+ this.initNodeData(node, resolve);
729
+ return;
730
+ }
731
+ this.$http({
732
+ url: USER_PREFIX + "/wf_obj_config/getWfGroups",
733
+ method: "post",
734
+ data: {
735
+ type: node.data.type,
736
+ },
737
+ success: (res) => {
738
+ let rows = res.objx || [];
739
+ rows.forEach((item) => {
740
+ item.leaf = true;
741
+ item.label = item.objTypeName + "(" + item.num + ")";
742
+ item.type = node.data.type;
743
+ item.uuid = this.guid();
744
+ });
745
+ resolve(rows);
746
+ },
747
+ });
748
+ },
749
+ initNodeData(node, resolve) {
750
+ let data = [
751
+ {
752
+ uuid: -1,
753
+ label: this.$t1("待审批的"),
754
+ type: 0,
755
+ leaf: true,
756
+ },
757
+ {
758
+ uuid: -2,
759
+ label: this.$t1("我发起的"),
760
+ type: 1,
761
+ leaf: true,
762
+ },
763
+ {
764
+ uuid: -3,
765
+ label: this.$t1("已审批的"),
766
+ type: 2,
767
+ leaf: true,
768
+ },
769
+ {
770
+ uuid: -4,
771
+ label: this.$t1("已完成的"),
772
+ type: "3",
773
+ leaf: true,
774
+ },
775
+ {
776
+ uuid: -5,
777
+ label: this.$t1("我转办的"),
778
+ type: "4",
779
+ leaf: true,
780
+ },
781
+ ];
782
+ resolve(data);
783
+ this.$nextTick(() => {
784
+ if (node.childNodes.length) {
785
+ let firstNode = node.childNodes[0];
786
+ this.$refs.tree.setCurrentKey(firstNode.data.uuid);
787
+ this.checkNode = firstNode;
788
+ this.$forceUpdate();
789
+ // this.handleNodeClick(firstNode.data, firstNode);
790
+ }
791
+ });
792
+ /*this.$nextTick(() => {
793
+ if (node.childNodes.length) {
794
+ let nodedata = node.childNodes[0];
795
+ nodedata.expanded = true;
796
+ nodedata.loadData(arr => {
797
+ if (arr.length) {
798
+ setTimeout(() => {
799
+ this.$refs.tree.setCurrentKey(arr[0].uuid);
800
+ let node = this.$refs.tree.getNode(arr[0]);
801
+ this.handleNodeClick(arr[0], node);
802
+ }, 50);
803
+ }
804
+ });
805
+ }
806
+ });*/
807
+ },
808
+ confirmInsertWfObjConfig(rows) {
809
+ if (rows.length) {
810
+ let row = rows[0];
811
+ this.$set(this.formData, "objTypeName", row.objTypeName);
812
+ this.$set(this.formData, "objTypeCode", row.objTypeCode);
813
+ }
814
+ },
815
+ async initWfParam() {
816
+ return this.$http({
817
+ url: USER_PREFIX + "/wf_param/list",
818
+ method: `post`,
819
+ data: {},
820
+ success: (res) => {
821
+ this.wfParamDTOs = res.objx || [];
822
+ },
823
+ });
824
+ },
825
+ //m2
826
+ initRole() {
827
+ this.$http({
828
+ url: USER_PREFIX + "/user/currentUser",
829
+ method: "post",
830
+ success: (res) => {
831
+ let userInfo = res.objx;
832
+ this.getIsAdmin(userInfo);
833
+ },
834
+ });
835
+ },
836
+ getIsAdmin(userInfo) {
837
+ this.$http({
838
+ url: USER_PREFIX + "/userb/getUserRole",
839
+ method: `post`,
840
+ data: { id: userInfo.id },
841
+ success: (res2) => {
842
+ let rows = res2.objx || [];
843
+ let codes = rows.map((row) => row.roleCode);
844
+ if (codes.includes("superadmin") || codes.includes("wfadmin")) {
845
+ this.flag = 1;
846
+ setTimeout(() => {
847
+ this.initTableList2();
848
+ }, 200);
849
+ }
850
+ },
851
+ });
852
+ },
853
+ searchEvent2() {
854
+ this.$refs["table-m2"].commitProxy("reload");
855
+ },
856
+ resetEvent2() {
857
+ this.formData2 = {};
858
+ this.$refs["table-m2"].commitProxy("reload");
859
+ },
860
+ initTableList2() {
861
+ let that = this;
862
+ let paramColumns = this.wfParamDTOs.map((item) => {
863
+ let flag = item.paramName == "单号";
864
+ return {
865
+ title: this.$t1(item.paramName),
866
+ field: item.paramKey,
867
+ width: 150,
868
+ fixed: flag ? "left" : "",
869
+ slots: flag
870
+ ? {
871
+ default: ({ row }) => {
872
+ return [
873
+ <div>
874
+ <a
875
+ href="javascript:void(0);"
876
+ class="a-link"
877
+ onclick={() => {
878
+ this.openEditDialog(row);
879
+ }}
880
+ style="font-weight:bold; text-decoration: underline"
881
+ >
882
+ <el-tooltip
883
+ class="item"
884
+ effect="dark"
885
+ content={this.$t1("查看")}
886
+ placement="top-start"
887
+ >
888
+ <span>{row.param1}</span>
889
+ </el-tooltip>
890
+ </a>
891
+ </div>,
892
+ ];
893
+ },
894
+ }
895
+ : "",
896
+ };
897
+ });
898
+
899
+ var statuses = {
900
+ 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
901
+ 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
902
+ 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
903
+ 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
904
+ 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
905
+ };
906
+ let tableOption = {
907
+ vue: this,
908
+ tableRef: "table-m2",
909
+ tableName: "user-wf-wf_manage-list-m3",
910
+ path: USER_PREFIX + "/wf_info/listPageAll",
911
+ param: () => {
912
+ return {
913
+ ...this.formData2,
914
+ };
915
+ },
916
+ columns: [
917
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
918
+ {
919
+ title: this.$t1("流程主题"),
920
+ field: "name",
921
+ width: 150,
922
+ fixed: "left",
923
+ },
924
+ {
925
+ title: this.$t1("单据类型"),
926
+ field: "objTypeName",
927
+ width: 150,
928
+ },
929
+ {
930
+ title: this.$t1("启动人"),
931
+ field: "starterName",
932
+ width: 150,
933
+ },
934
+ {
935
+ title: this.$t1("当前任务"),
936
+ field: "taskName",
937
+ width: 150,
938
+ },
939
+ {
940
+ title: this.$t1("当前任务用户"),
941
+ field: "candidateNames",
942
+ width: 150,
943
+ },
944
+ {
945
+ title: this.$t1("禁用用户"),
946
+ field: "disabledUserNames",
947
+ width: 200,
948
+ },
949
+ {
950
+ title: this.$t1("流程状态"),
951
+ field: "stat",
952
+ width: 150,
953
+ slots: {
954
+ default: ({ row }) => {
955
+ let html = statuses[row.stat] || "";
956
+ return html;
957
+ },
958
+ },
959
+ },
960
+ {
961
+ title: this.$t1("启动时间"),
962
+ field: "createDate",
963
+ width: 150,
964
+ },
965
+ ...paramColumns,
966
+ {
967
+ width: 47,
968
+ fixed: "right",
969
+ title: "",
970
+ sortable: false,
971
+ slots: {
972
+ default: ({ row }) => {
973
+ return [
974
+ <a
975
+ href="javascript:void(0);"
976
+ class="a-link"
977
+ onclick={() => {
978
+ this.openEditDialog(row);
979
+ }}
980
+ >
981
+ <el-tooltip
982
+ enterable={false}
983
+ effect="dark"
984
+ content={this.$t1("查看")}
985
+ placement="top"
986
+ popper-class="tooltip-skin"
987
+ >
988
+ <i class="el-icon-edit" />
989
+ </el-tooltip>
990
+ </a>,
991
+ ];
992
+ },
993
+ },
994
+ },
995
+ ],
996
+ };
997
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
998
+ this.vxeOption2 = opts;
999
+ });
1000
+ },
1001
+ confirmInsertWfObjConfig2(rows) {
1002
+ if (rows.length) {
1003
+ let row = rows[0];
1004
+ this.$set(this.formData2, "objTypeName", row.objTypeName);
1005
+ this.$set(this.formData2, "objTypeCode", row.objTypeCode);
1006
+ }
1007
+ },
1008
+ openCurrentTaskUserDialog() {
1009
+ let checkRows = this.$refs["table-m2"].getCheckboxRecords(true) || [];
1010
+ if (!checkRows.length) {
1011
+ this.$baseAlert(this.$t1("请勾选需要处理的数据"));
1012
+ return;
1013
+ }
1014
+ this.currentTaskUserUuids = checkRows.map((row) => row.uuid);
1015
+ this.currentTaskUserForm = {
1016
+ delUserIds: [],
1017
+ delUserNames: "",
1018
+ delUserRows: [],
1019
+ addUserIds: [],
1020
+ addUserNames: "",
1021
+ addUserRows: [],
1022
+ };
1023
+ this.showCurrentTaskUserDialog = true;
1024
+ this.initDelUsers();
1025
+ },
1026
+ initDelUsers() {
1027
+ this.$http({
1028
+ url: USER_PREFIX + "/wf_info/getDelUsers",
1029
+ method: "post",
1030
+ data: {
1031
+ uuid: this.currentTaskUserUuids,
1032
+ flag: 1,
1033
+ },
1034
+ success: (res) => {
1035
+ let rows = (res.objx || []).map((row) => {
1036
+ return { ...row, nickName: row.nickName || row.nick_name };
1037
+ });
1038
+ this.confirmDelUsers(rows);
1039
+ },
1040
+ });
1041
+ },
1042
+ closeCurrentTaskUserDialog() {
1043
+ this.showCurrentTaskUserDialog = false;
1044
+ },
1045
+ openDelUserDialog() {
1046
+ this.showDelUserDialog = true;
1047
+ },
1048
+ openAddUserDialog() {
1049
+ this.showAddUserDialog = true;
1050
+ },
1051
+ clearDelUsers() {
1052
+ this.currentTaskUserForm.delUserIds = [];
1053
+ this.currentTaskUserForm.delUserNames = "";
1054
+ this.currentTaskUserForm.delUserRows = [];
1055
+ },
1056
+ clearAddUsers() {
1057
+ this.currentTaskUserForm.addUserIds = [];
1058
+ this.currentTaskUserForm.addUserNames = "";
1059
+ this.currentTaskUserForm.addUserRows = [];
1060
+ },
1061
+ confirmDelUsers(rows) {
1062
+ if (!rows || !rows.length) {
1063
+ this.clearDelUsers();
1064
+ return;
1065
+ }
1066
+ this.currentTaskUserForm.delUserIds = rows.map((row) => row.id);
1067
+ this.currentTaskUserForm.delUserRows = rows;
1068
+ this.currentTaskUserForm.delUserNames = rows
1069
+ .map((row) => row.nickName)
1070
+ .join(",");
1071
+ },
1072
+ confirmAddUsers(rows) {
1073
+ if (!rows || !rows.length) {
1074
+ this.clearAddUsers();
1075
+ return;
1076
+ }
1077
+ this.currentTaskUserForm.addUserIds = rows.map((row) => row.id);
1078
+ this.currentTaskUserForm.addUserRows = rows;
1079
+ this.currentTaskUserForm.addUserNames = rows
1080
+ .map((row) => row.nickName)
1081
+ .join(",");
1082
+ },
1083
+ confirmCurrentTaskUser() {
1084
+ let delUserIds = this.currentTaskUserForm.delUserIds || [];
1085
+ let addUserIds = this.currentTaskUserForm.addUserIds || [];
1086
+ if (!delUserIds.length) {
1087
+ this.$message.error(this.$t1("请选择删除用户"));
1088
+ return;
1089
+ }
1090
+ this.$baseConfirm(this.$t1("您确定要处理任务用户吗?")).then(() => {
1091
+ this.$http({
1092
+ url: USER_PREFIX + "/wf_info/updateCurrentTaskUsers",
1093
+ method: "post",
1094
+ data: {
1095
+ uuid: this.currentTaskUserUuids,
1096
+ delUserIds: delUserIds,
1097
+ addUserIds: addUserIds,
1098
+ },
1099
+ isLoading: true,
1100
+ success: (res) => {
1101
+ this.$message({
1102
+ message: res.content || this.$t1("操作成功"),
1103
+ type: "success",
1104
+ duration: 500,
1105
+ onClose: () => {
1106
+ this.closeCurrentTaskUserDialog();
1107
+ this.searchEvent2();
1108
+ },
1109
+ });
1110
+ },
1111
+ });
1112
+ });
1113
+ },
1114
+ },
1115
+ };
1116
+ </script>