cloud-web-corejs 1.0.281 → 1.1.0-dev.4

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 (158) hide show
  1. package/package.json +6 -2
  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/bizTab/BizBillActions.vue +129 -0
  8. package/src/components/bizTab/BizTabListPage.vue +391 -0
  9. package/src/components/bizTab/README.md +378 -0
  10. package/src/components/bizTab/billTableUtil.js +48 -0
  11. package/src/components/bizTab/billValidators.js +136 -0
  12. package/src/components/bizTab/bizBillDetailMixin.js +705 -0
  13. package/src/components/bizTab/index.js +24 -0
  14. package/src/components/excelExport/exportFieldDialog.vue +23 -12
  15. package/src/components/excelExport/exportItemConfigUtil.js +30 -0
  16. package/src/components/excelExport/mixins.js +3 -3
  17. package/src/components/mobile/statusTag/mixins.js +1 -61
  18. package/src/components/mobile/wf/content.vue +1662 -1556
  19. package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
  20. package/src/components/table/config.js +78 -78
  21. package/src/components/table/index.js +1276 -1276
  22. package/src/components/table/plugins/cell-area/index.js +1055 -0
  23. package/src/components/table/plugins/cell-area/index.scss +77 -0
  24. package/src/components/table/plugins/cell-area/util.js +224 -0
  25. package/src/components/table/tableForm.vue +330 -330
  26. package/src/components/table/tableFormMixin.js +318 -318
  27. package/src/components/table/vxeFilter/index.js +163 -163
  28. package/src/components/table/vxeFilter/mixin.js +316 -316
  29. package/src/components/wf/content.vue +1188 -1188
  30. package/src/components/wf/wf.js +40 -20
  31. package/src/components/wf/wfActionDropdown.vue +1 -1
  32. package/src/components/wf/wfActionItems.js +1 -1
  33. 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
  34. 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
  35. 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
  36. 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
  37. package/src/components/xform/form-designer/designer.js +15 -0
  38. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  39. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  40. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  41. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  42. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  43. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  44. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  45. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  46. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  47. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  48. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
  49. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  50. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  51. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
  52. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  53. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  54. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  55. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +1 -0
  56. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  57. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
  58. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
  59. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  60. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  61. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  62. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +19 -5
  63. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  64. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  65. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  66. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  67. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  68. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  69. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
  70. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  71. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  72. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  73. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  74. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  75. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  76. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  77. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  78. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +4 -0
  79. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +59 -3
  80. package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
  81. package/src/components/xform/form-render/container-item/detail-h5-item.vue +183 -32
  82. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  83. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  84. package/src/components/xform/form-render/container-item/list-h5-item.vue +1688 -1700
  85. package/src/components/xform/form-render/index.vue +153 -147
  86. package/src/components/xform/form-render/indexMixin.js +12 -0
  87. package/src/components/xform/lang/en-US.js +10 -0
  88. package/src/components/xform/lang/zh-CN.js +12 -0
  89. package/src/components/xform/mixins/defaultHandle.js +707 -707
  90. package/src/components/xform/styles/h5.scss +1992 -0
  91. package/src/components/xform/utils/textMaskUtil.js +182 -179
  92. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  93. package/src/components/xform/utils/util.js +56 -11
  94. package/src/index.js +9 -4
  95. package/src/layout/components/extractedCode/viewDialog.vue +7 -7
  96. package/src/router/index.js +21 -0
  97. package/src/router/modules/customer.js +71 -14
  98. package/src/store/modules/permission.js +17 -18
  99. package/src/utils/pdfUtil.js +429 -429
  100. package/src/utils/resolveViewComponent.js +142 -16
  101. package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
  102. package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
  103. package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
  104. package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
  105. package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
  106. package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
  107. package/src/views/bd/project/branch/form_script/list.vue +31 -0
  108. package/src/views/bd/project/branch/form_template/list.vue +30 -0
  109. package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
  110. package/src/views/bd/project/common/form_script/list.vue +16 -0
  111. package/src/views/bd/project/common/form_template/list.vue +15 -0
  112. package/src/views/bd/project/common/menu_kind/list.vue +15 -0
  113. package/src/views/bd/project/core/branchContext.js +100 -0
  114. package/src/views/bd/project/core/branchPage.js +78 -0
  115. package/src/views/bd/project/core/branchPageWrap.vue +225 -0
  116. package/src/views/bd/project/core/branchScope.js +44 -0
  117. package/src/views/bd/project/core/branchSearchPage.js +285 -0
  118. package/src/views/bd/project/core/branchSelect.vue +85 -0
  119. package/src/views/bd/project/core/branchTreeBar.vue +81 -0
  120. package/src/views/bd/project/core/httpBranchPatch.js +58 -0
  121. package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
  122. package/src/views/bd/project/datatable/table_model/list.vue +15 -0
  123. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  124. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  125. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  126. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  127. package/src/views/demo/bizTab/bill/billConfig.js +41 -0
  128. package/src/views/demo/bizTab/bill/detail.vue +436 -0
  129. package/src/views/demo/bizTab/bill/list.vue +288 -0
  130. package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
  131. package/src/views/demo/bizTab/simple/billApi.js +123 -0
  132. package/src/views/demo/bizTab/simple/detail.vue +407 -0
  133. package/src/views/demo/bizTab/simple/list.vue +217 -0
  134. package/src/views/demo/bizTab/standalone/index.vue +121 -0
  135. package/src/views/demo/bizTab/wf/billConfig.js +44 -0
  136. package/src/views/demo/bizTab/wf/detail.vue +661 -0
  137. package/src/views/demo/bizTab/wf/list.vue +242 -0
  138. package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
  139. package/src/views/support/form-dialog-demo/index.vue +537 -0
  140. package/src/views/user/file_view_ins/list.vue +3 -3
  141. package/src/views/user/home/index.vue +8 -6
  142. package/src/views/user/home/wjl/content.vue +1569 -0
  143. package/src/views/user/notify_message/dialog.vue +7 -5
  144. package/src/views/user/outLink/cc_form_view.vue +188 -0
  145. package/src/views/user/outLink/form_view.vue +2 -2
  146. package/src/views/user/outLink/index.vue +4 -4
  147. package/src/views/user/outLink/view.vue +3 -3
  148. package/src/views/user/role/edit.vue +632 -632
  149. package/src/views/user/role/list.vue +260 -260
  150. package/src/views/user/wf/iframe/index.vue +3 -3
  151. package/src/views/user/wf/iframe/index2.vue +3 -3
  152. package/src/views/user/wf/wf_manage/list.vue +1112 -1116
  153. package/src/views/user/wf/wf_manage/list2.vue +9 -13
  154. package/src/views/user/wf/wf_manage/wfContentDialog.vue +8 -5
  155. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
  156. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
  157. package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
  158. package/src/utils/wf.js +0 -766
@@ -1,1116 +1,1112 @@
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 { loadViewComponentAsync } 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
+ // 异步:await 之后才置 activeName / 调 $openEditView,否则弹窗先开出空壳
654
+ // ($openEditView 200ms 定时放行,冷启动拉 chunk 常超过它)
655
+ async openEditDialog(row) {
656
+ let id = row.objId;
657
+ let wfDataId = !id || typeof id == "object" ? 0 : Number(id);
658
+
659
+ if (row.url == "form") {
660
+ let formCode = null;
661
+ if (row.formCode) {
662
+ formCode = row.formCode;
663
+ } else {
664
+ formCode = row.objTypeCode.substr(9);
665
+ }
666
+ this.param = {
667
+ formCode: formCode,
668
+ dataId: wfDataId,
669
+ };
670
+ // 路径是常量,用字面量 import:生成普通 ImportDependency,不参与 views context
671
+ this.wfContent = (
672
+ await import("@base/views/user/form/vform/render.vue")
673
+ ).default;
674
+ } else {
675
+ this.param = {
676
+ _dataId: wfDataId,
677
+ };
678
+ let url = row.url + ".vue";
679
+ const res = await loadViewComponentAsync(url);
680
+ this.remoteView =
681
+ res.kind === "remote"
682
+ ? {
683
+ owner: res.owner,
684
+ targetPath: res.targetPath,
685
+ bizParams: this.param,
686
+ viewMeta: {
687
+ visibleKey: "showWfContent",
688
+ defaultShowWfContent: true,
689
+ viewType: 1,
690
+ },
691
+ }
692
+ : null;
693
+ this.wfContent = res.component;
694
+ }
695
+ this.activeName = "first";
696
+ this.$openEditView("showWfContent");
697
+ },
698
+ guid() {
699
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
700
+ /[xy]/g,
701
+ function (c) {
702
+ var r = (Math.random() * 16) | 0,
703
+ v = c == "x" ? r : (r & 0x3) | 0x8;
704
+ return v.toString(16);
705
+ }
706
+ );
707
+ },
708
+ clearNodeClick() {
709
+ /* this.formData.saleOrgId = '';
710
+ this.formData.saleOrgName = '';
711
+ this.$refs.tree.setCurrentKey();
712
+ this.searchEvent(); */
713
+ },
714
+ handleNodeClick(data, node, v) {
715
+ this.checkNode = node;
716
+ this.formData.objTypeName = null;
717
+ this.formData.objTypeCode = null;
718
+ this.$forceUpdate();
719
+ this.searchEvent();
720
+ },
721
+ // 异步树叶子节点懒加载逻辑
722
+ loadNode(node, resolve) {
723
+ if (!node || !node.data || node.data.type === undefined) {
724
+ this.initNodeData(node, resolve);
725
+ return;
726
+ }
727
+ this.$http({
728
+ url: USER_PREFIX + "/wf_obj_config/getWfGroups",
729
+ method: "post",
730
+ data: {
731
+ type: node.data.type,
732
+ },
733
+ success: (res) => {
734
+ let rows = res.objx || [];
735
+ rows.forEach((item) => {
736
+ item.leaf = true;
737
+ item.label = item.objTypeName + "(" + item.num + ")";
738
+ item.type = node.data.type;
739
+ item.uuid = this.guid();
740
+ });
741
+ resolve(rows);
742
+ },
743
+ });
744
+ },
745
+ initNodeData(node, resolve) {
746
+ let data = [
747
+ {
748
+ uuid: -1,
749
+ label: this.$t1("待审批的"),
750
+ type: 0,
751
+ leaf: true,
752
+ },
753
+ {
754
+ uuid: -2,
755
+ label: this.$t1("我发起的"),
756
+ type: 1,
757
+ leaf: true,
758
+ },
759
+ {
760
+ uuid: -3,
761
+ label: this.$t1("已审批的"),
762
+ type: 2,
763
+ leaf: true,
764
+ },
765
+ {
766
+ uuid: -4,
767
+ label: this.$t1("已完成的"),
768
+ type: "3",
769
+ leaf: true,
770
+ },
771
+ {
772
+ uuid: -5,
773
+ label: this.$t1("我转办的"),
774
+ type: "4",
775
+ leaf: true,
776
+ },
777
+ ];
778
+ resolve(data);
779
+ this.$nextTick(() => {
780
+ if (node.childNodes.length) {
781
+ let firstNode = node.childNodes[0];
782
+ this.$refs.tree.setCurrentKey(firstNode.data.uuid);
783
+ this.checkNode = firstNode;
784
+ this.$forceUpdate();
785
+ // this.handleNodeClick(firstNode.data, firstNode);
786
+ }
787
+ });
788
+ /*this.$nextTick(() => {
789
+ if (node.childNodes.length) {
790
+ let nodedata = node.childNodes[0];
791
+ nodedata.expanded = true;
792
+ nodedata.loadData(arr => {
793
+ if (arr.length) {
794
+ setTimeout(() => {
795
+ this.$refs.tree.setCurrentKey(arr[0].uuid);
796
+ let node = this.$refs.tree.getNode(arr[0]);
797
+ this.handleNodeClick(arr[0], node);
798
+ }, 50);
799
+ }
800
+ });
801
+ }
802
+ });*/
803
+ },
804
+ confirmInsertWfObjConfig(rows) {
805
+ if (rows.length) {
806
+ let row = rows[0];
807
+ this.$set(this.formData, "objTypeName", row.objTypeName);
808
+ this.$set(this.formData, "objTypeCode", row.objTypeCode);
809
+ }
810
+ },
811
+ async initWfParam() {
812
+ return this.$http({
813
+ url: USER_PREFIX + "/wf_param/list",
814
+ method: `post`,
815
+ data: {},
816
+ success: (res) => {
817
+ this.wfParamDTOs = res.objx || [];
818
+ },
819
+ });
820
+ },
821
+ //m2
822
+ initRole() {
823
+ this.$http({
824
+ url: USER_PREFIX + "/user/currentUser",
825
+ method: "post",
826
+ success: (res) => {
827
+ let userInfo = res.objx;
828
+ this.getIsAdmin(userInfo);
829
+ },
830
+ });
831
+ },
832
+ getIsAdmin(userInfo) {
833
+ this.$http({
834
+ url: USER_PREFIX + "/userb/getUserRole",
835
+ method: `post`,
836
+ data: { id: userInfo.id },
837
+ success: (res2) => {
838
+ let rows = res2.objx || [];
839
+ let codes = rows.map((row) => row.roleCode);
840
+ if (codes.includes("superadmin") || codes.includes("wfadmin")) {
841
+ this.flag = 1;
842
+ setTimeout(() => {
843
+ this.initTableList2();
844
+ }, 200);
845
+ }
846
+ },
847
+ });
848
+ },
849
+ searchEvent2() {
850
+ this.$refs["table-m2"].commitProxy("reload");
851
+ },
852
+ resetEvent2() {
853
+ this.formData2 = {};
854
+ this.$refs["table-m2"].commitProxy("reload");
855
+ },
856
+ initTableList2() {
857
+ let that = this;
858
+ let paramColumns = this.wfParamDTOs.map((item) => {
859
+ let flag = item.paramName == "单号";
860
+ return {
861
+ title: this.$t1(item.paramName),
862
+ field: item.paramKey,
863
+ width: 150,
864
+ fixed: flag ? "left" : "",
865
+ slots: flag
866
+ ? {
867
+ default: ({ row }) => {
868
+ return [
869
+ <div>
870
+ <a
871
+ href="javascript:void(0);"
872
+ class="a-link"
873
+ onclick={() => {
874
+ this.openEditDialog(row);
875
+ }}
876
+ style="font-weight:bold; text-decoration: underline"
877
+ >
878
+ <el-tooltip
879
+ class="item"
880
+ effect="dark"
881
+ content={this.$t1("查看")}
882
+ placement="top-start"
883
+ >
884
+ <span>{row.param1}</span>
885
+ </el-tooltip>
886
+ </a>
887
+ </div>,
888
+ ];
889
+ },
890
+ }
891
+ : "",
892
+ };
893
+ });
894
+
895
+ var statuses = {
896
+ 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
897
+ 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
898
+ 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
899
+ 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
900
+ 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
901
+ };
902
+ let tableOption = {
903
+ vue: this,
904
+ tableRef: "table-m2",
905
+ tableName: "user-wf-wf_manage-list-m3",
906
+ path: USER_PREFIX + "/wf_info/listPageAll",
907
+ param: () => {
908
+ return {
909
+ ...this.formData2,
910
+ };
911
+ },
912
+ columns: [
913
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
914
+ {
915
+ title: this.$t1("流程主题"),
916
+ field: "name",
917
+ width: 150,
918
+ fixed: "left",
919
+ },
920
+ {
921
+ title: this.$t1("单据类型"),
922
+ field: "objTypeName",
923
+ width: 150,
924
+ },
925
+ {
926
+ title: this.$t1("启动人"),
927
+ field: "starterName",
928
+ width: 150,
929
+ },
930
+ {
931
+ title: this.$t1("当前任务"),
932
+ field: "taskName",
933
+ width: 150,
934
+ },
935
+ {
936
+ title: this.$t1("当前任务用户"),
937
+ field: "candidateNames",
938
+ width: 150,
939
+ },
940
+ {
941
+ title: this.$t1("禁用用户"),
942
+ field: "disabledUserNames",
943
+ width: 200,
944
+ },
945
+ {
946
+ title: this.$t1("流程状态"),
947
+ field: "stat",
948
+ width: 150,
949
+ slots: {
950
+ default: ({ row }) => {
951
+ let html = statuses[row.stat] || "";
952
+ return html;
953
+ },
954
+ },
955
+ },
956
+ {
957
+ title: this.$t1("启动时间"),
958
+ field: "createDate",
959
+ width: 150,
960
+ },
961
+ ...paramColumns,
962
+ {
963
+ width: 47,
964
+ fixed: "right",
965
+ title: "",
966
+ sortable: false,
967
+ slots: {
968
+ default: ({ row }) => {
969
+ return [
970
+ <a
971
+ href="javascript:void(0);"
972
+ class="a-link"
973
+ onclick={() => {
974
+ this.openEditDialog(row);
975
+ }}
976
+ >
977
+ <el-tooltip
978
+ enterable={false}
979
+ effect="dark"
980
+ content={this.$t1("查看")}
981
+ placement="top"
982
+ popper-class="tooltip-skin"
983
+ >
984
+ <i class="el-icon-edit" />
985
+ </el-tooltip>
986
+ </a>,
987
+ ];
988
+ },
989
+ },
990
+ },
991
+ ],
992
+ };
993
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
994
+ this.vxeOption2 = opts;
995
+ });
996
+ },
997
+ confirmInsertWfObjConfig2(rows) {
998
+ if (rows.length) {
999
+ let row = rows[0];
1000
+ this.$set(this.formData2, "objTypeName", row.objTypeName);
1001
+ this.$set(this.formData2, "objTypeCode", row.objTypeCode);
1002
+ }
1003
+ },
1004
+ openCurrentTaskUserDialog() {
1005
+ let checkRows = this.$refs["table-m2"].getCheckboxRecords(true) || [];
1006
+ if (!checkRows.length) {
1007
+ this.$baseAlert(this.$t1("请勾选需要处理的数据"));
1008
+ return;
1009
+ }
1010
+ this.currentTaskUserUuids = checkRows.map((row) => row.uuid);
1011
+ this.currentTaskUserForm = {
1012
+ delUserIds: [],
1013
+ delUserNames: "",
1014
+ delUserRows: [],
1015
+ addUserIds: [],
1016
+ addUserNames: "",
1017
+ addUserRows: [],
1018
+ };
1019
+ this.showCurrentTaskUserDialog = true;
1020
+ this.initDelUsers();
1021
+ },
1022
+ initDelUsers() {
1023
+ this.$http({
1024
+ url: USER_PREFIX + "/wf_info/getDelUsers",
1025
+ method: "post",
1026
+ data: {
1027
+ uuid: this.currentTaskUserUuids,
1028
+ flag: 1,
1029
+ },
1030
+ success: (res) => {
1031
+ let rows = (res.objx || []).map((row) => {
1032
+ return { ...row, nickName: row.nickName || row.nick_name };
1033
+ });
1034
+ this.confirmDelUsers(rows);
1035
+ },
1036
+ });
1037
+ },
1038
+ closeCurrentTaskUserDialog() {
1039
+ this.showCurrentTaskUserDialog = false;
1040
+ },
1041
+ openDelUserDialog() {
1042
+ this.showDelUserDialog = true;
1043
+ },
1044
+ openAddUserDialog() {
1045
+ this.showAddUserDialog = true;
1046
+ },
1047
+ clearDelUsers() {
1048
+ this.currentTaskUserForm.delUserIds = [];
1049
+ this.currentTaskUserForm.delUserNames = "";
1050
+ this.currentTaskUserForm.delUserRows = [];
1051
+ },
1052
+ clearAddUsers() {
1053
+ this.currentTaskUserForm.addUserIds = [];
1054
+ this.currentTaskUserForm.addUserNames = "";
1055
+ this.currentTaskUserForm.addUserRows = [];
1056
+ },
1057
+ confirmDelUsers(rows) {
1058
+ if (!rows || !rows.length) {
1059
+ this.clearDelUsers();
1060
+ return;
1061
+ }
1062
+ this.currentTaskUserForm.delUserIds = rows.map((row) => row.id);
1063
+ this.currentTaskUserForm.delUserRows = rows;
1064
+ this.currentTaskUserForm.delUserNames = rows
1065
+ .map((row) => row.nickName)
1066
+ .join(",");
1067
+ },
1068
+ confirmAddUsers(rows) {
1069
+ if (!rows || !rows.length) {
1070
+ this.clearAddUsers();
1071
+ return;
1072
+ }
1073
+ this.currentTaskUserForm.addUserIds = rows.map((row) => row.id);
1074
+ this.currentTaskUserForm.addUserRows = rows;
1075
+ this.currentTaskUserForm.addUserNames = rows
1076
+ .map((row) => row.nickName)
1077
+ .join(",");
1078
+ },
1079
+ confirmCurrentTaskUser() {
1080
+ let delUserIds = this.currentTaskUserForm.delUserIds || [];
1081
+ let addUserIds = this.currentTaskUserForm.addUserIds || [];
1082
+ if (!delUserIds.length) {
1083
+ this.$message.error(this.$t1("请选择删除用户"));
1084
+ return;
1085
+ }
1086
+ this.$baseConfirm(this.$t1("您确定要处理任务用户吗?")).then(() => {
1087
+ this.$http({
1088
+ url: USER_PREFIX + "/wf_info/updateCurrentTaskUsers",
1089
+ method: "post",
1090
+ data: {
1091
+ uuid: this.currentTaskUserUuids,
1092
+ delUserIds: delUserIds,
1093
+ addUserIds: addUserIds,
1094
+ },
1095
+ isLoading: true,
1096
+ success: (res) => {
1097
+ this.$message({
1098
+ message: res.content || this.$t1("操作成功"),
1099
+ type: "success",
1100
+ duration: 500,
1101
+ onClose: () => {
1102
+ this.closeCurrentTaskUserDialog();
1103
+ this.searchEvent2();
1104
+ },
1105
+ });
1106
+ },
1107
+ });
1108
+ });
1109
+ },
1110
+ },
1111
+ };
1112
+ </script>