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

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 (175) 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 +45 -3
  4. package/src/components/VabUpload/mixins.js +126 -19
  5. package/src/components/VabUpload/view.vue +248 -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/excelImport/index.vue +156 -156
  18. package/src/components/jsonImport/index.vue +1 -1
  19. package/src/components/langImport/index.vue +1 -1
  20. package/src/components/mobile/statusTag/mixins.js +1 -61
  21. package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
  22. package/src/components/mobile/wf/content.vue +1705 -1556
  23. package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
  24. package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
  25. package/src/components/mobile/wf/selectUserDialog.vue +118 -0
  26. package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
  27. package/src/components/mobile/wf/urgingDialog.vue +26 -3
  28. package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
  29. package/src/components/obsUpload/index.vue +1 -1
  30. package/src/components/table/config.js +78 -78
  31. package/src/components/table/index.js +1276 -1276
  32. package/src/components/table/plugins/cell-area/index.js +1055 -0
  33. package/src/components/table/plugins/cell-area/index.scss +77 -0
  34. package/src/components/table/plugins/cell-area/util.js +224 -0
  35. package/src/components/table/tableForm.vue +330 -330
  36. package/src/components/table/tableFormMixin.js +318 -318
  37. package/src/components/table/vxeFilter/index.js +163 -163
  38. package/src/components/table/vxeFilter/mixin.js +316 -316
  39. package/src/components/wf/content.vue +1188 -1188
  40. package/src/components/wf/wf.js +40 -20
  41. package/src/components/wf/wfActionDropdown.vue +1 -1
  42. package/src/components/wf/wfActionItems.js +1 -1
  43. package/src/components/xform/form-designer/designer.js +51 -52
  44. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  45. package/src/components/xform/form-designer/form-widget/container-widget/detail-h5-widget.vue +18 -2
  46. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  47. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  48. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue +23 -2
  49. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-widget.vue +30 -1
  50. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  51. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  52. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
  53. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  54. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  55. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  56. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  57. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  58. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
  59. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  60. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  61. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
  62. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  63. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
  64. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  65. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  66. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +3 -2
  67. package/src/components/xform/form-designer/indexMixin.js +35 -1
  68. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  69. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
  70. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
  71. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  72. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  73. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  74. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -846
  75. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  76. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  77. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  78. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  79. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  80. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  81. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
  82. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  83. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  84. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  85. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  86. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  87. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  88. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  89. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  90. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +12 -0
  91. package/src/components/xform/form-designer/toolbar-panel/index.vue +884 -874
  92. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +14 -0
  93. package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
  94. package/src/components/xform/form-designer/widget-panel/indexMixin.js +30 -6
  95. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +112 -4
  96. package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
  97. package/src/components/xform/form-render/container-item/detail-h5-item.vue +204 -34
  98. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  99. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  100. package/src/components/xform/form-render/container-item/list-h5-item.vue +1913 -1699
  101. package/src/components/xform/form-render/index.vue +153 -147
  102. package/src/components/xform/form-render/indexMixin.js +35 -3
  103. package/src/components/xform/lang/en-US.js +14 -0
  104. package/src/components/xform/lang/zh-CN.js +17 -0
  105. package/src/components/xform/mixins/defaultHandle.js +707 -707
  106. package/src/components/xform/styles/h5.scss +2262 -0
  107. package/src/components/xform/utils/textMaskUtil.js +182 -179
  108. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  109. package/src/components/xform/utils/util.js +56 -11
  110. package/src/directive/append-to-body/index.js +48 -0
  111. package/src/index.js +13 -4
  112. package/src/layout/components/Sidebar/default.vue +1655 -1655
  113. package/src/layout/components/extractedCode/viewDialog.vue +7 -7
  114. package/src/router/index.js +48 -27
  115. package/src/router/modules/customer.js +71 -14
  116. package/src/store/modules/permission.js +17 -18
  117. package/src/utils/assetUrl.js +19 -0
  118. package/src/utils/pdfUtil.js +429 -429
  119. package/src/utils/resolveViewComponent.js +142 -16
  120. package/src/utils/vab.js +1283 -1279
  121. package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
  122. package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
  123. package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
  124. package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
  125. package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
  126. package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
  127. package/src/views/bd/project/branch/form_script/list.vue +31 -0
  128. package/src/views/bd/project/branch/form_template/list.vue +30 -0
  129. package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
  130. package/src/views/bd/project/common/form_script/list.vue +16 -0
  131. package/src/views/bd/project/common/form_template/list.vue +15 -0
  132. package/src/views/bd/project/common/menu_kind/list.vue +15 -0
  133. package/src/views/bd/project/core/branchContext.js +100 -0
  134. package/src/views/bd/project/core/branchPage.js +78 -0
  135. package/src/views/bd/project/core/branchPageWrap.vue +225 -0
  136. package/src/views/bd/project/core/branchScope.js +44 -0
  137. package/src/views/bd/project/core/branchSearchPage.js +285 -0
  138. package/src/views/bd/project/core/branchSelect.vue +85 -0
  139. package/src/views/bd/project/core/branchTreeBar.vue +81 -0
  140. package/src/views/bd/project/core/httpBranchPatch.js +58 -0
  141. package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
  142. package/src/views/bd/project/datatable/table_model/list.vue +15 -0
  143. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  144. package/src/views/bd/setting/form_template/edit.vue +378 -356
  145. package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
  146. package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
  147. package/src/views/bd/setting/form_template/list.vue +304 -303
  148. package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
  149. package/src/views/bd/setting/form_template/mixins/list.js +748 -721
  150. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  151. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  152. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  153. package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
  154. package/src/views/support/form-dialog-demo/index.vue +537 -0
  155. package/src/views/user/file_view_ins/list.vue +970 -970
  156. package/src/views/user/form/vform/designer.vue +823 -821
  157. package/src/views/user/home/default.vue +1117 -1117
  158. package/src/views/user/home/default2.vue +1 -1
  159. package/src/views/user/home/index.vue +103 -101
  160. package/src/views/user/notify_message/dialog.vue +139 -137
  161. package/src/views/user/outLink/form_view.vue +202 -202
  162. package/src/views/user/outLink/index.vue +110 -110
  163. package/src/views/user/outLink/view.vue +3 -3
  164. package/src/views/user/role/edit.vue +632 -632
  165. package/src/views/user/role/list.vue +260 -260
  166. package/src/views/user/wf/iframe/index.vue +51 -51
  167. package/src/views/user/wf/iframe/index2.vue +64 -64
  168. package/src/views/user/wf/wf_manage/list.vue +1112 -1116
  169. package/src/views/user/wf/wf_manage/list2.vue +871 -875
  170. package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -131
  171. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +1 -1
  172. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
  173. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
  174. package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
  175. package/src/utils/wf.js +0 -766
@@ -1,875 +1,871 @@
1
- <template>
2
- <div id="containt">
3
- <el-tabs v-model="activeName" class="tab-box">
4
- <el-tab-pane :label="$t1('常规2')" 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('我的流程2')" 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('全部流程2')" 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
- </div>
222
- <div class="fr">
223
- <vxe-button
224
- icon="el-icon-brush"
225
- class="button-sty"
226
- @click="resetEvent2"
227
- type="text"
228
- status="primary"
229
- plain
230
- >{{ $t1("刷新") }}
231
- </vxe-button>
232
- <vxe-button
233
- status="warning"
234
- icon="el-icon-search"
235
- class="button-sty"
236
- @click="searchEvent2"
237
- >
238
- {{ $t1("搜索") }}
239
- </vxe-button>
240
- </div>
241
- </div>
242
- <vxe-form
243
- ref="form"
244
- class="screen-box"
245
- title-width="92px"
246
- title-align="right"
247
- :data="formData2"
248
- @submit="searchEvent2"
249
- @reset="searchEvent2"
250
- >
251
- <vxe-form-item :title="$t1('流程主题') + ':'" field="name">
252
- <template v-slot>
253
- <el-input v-model="formData2.name" size="small" clearable />
254
- </template>
255
- </vxe-form-item>
256
- <vxe-form-item
257
- :title="$t1('单据类型') + ':'"
258
- field="objTypeName"
259
- >
260
- <template v-slot>
261
- <el-input
262
- class="search-input"
263
- max="200"
264
- v-model="formData2.objTypeName"
265
- @clear="
266
- formData2.objTypeCode = null;
267
- $forceUpdate();
268
- "
269
- v-el-readonly
270
- clearable
271
- >
272
- <i
273
- slot="suffix"
274
- class="el-input__icon el-icon-search"
275
- @click="showWfObjConfigDialog2 = true"
276
- ></i>
277
- </el-input>
278
- </template>
279
- </vxe-form-item>
280
- <vxe-form-item :title="$t1('流程状态') + ':'" field="stat">
281
- <template v-slot>
282
- <el-select v-model="formData2.stat" clearable>
283
- <el-option :value="1" :label="$t1('审核中')"></el-option>
284
- <el-option :value="2" :label="$t1('已完成')"></el-option>
285
- <el-option :value="3" :label="$t1('已驳回')"></el-option>
286
- </el-select>
287
- </template>
288
- </vxe-form-item>
289
- <vxe-form-item
290
- :title="$t1('当前任务用户') + ':'"
291
- field="candidateNames"
292
- >
293
- <template v-slot>
294
- <el-input
295
- v-model="formData2.candidateNames"
296
- size="small"
297
- clearable
298
- />
299
- </template>
300
- </vxe-form-item>
301
- </vxe-form>
302
- </template>
303
- </vxe-grid>
304
- </div>
305
- </el-tab-pane>
306
- </el-tabs>
307
- <wfObjConfigDialog
308
- v-if="showWfObjConfigDialog"
309
- :visiable.sync="showWfObjConfigDialog"
310
- :type.sync="type"
311
- @confirm="confirmInsertWfObjConfig"
312
- :multi="false"
313
- ></wfObjConfigDialog>
314
- <wfObjConfigDialog
315
- v-if="showWfObjConfigDialog2"
316
- :visiable.sync="showWfObjConfigDialog2"
317
- :type="99"
318
- @confirm="confirmInsertWfObjConfig2"
319
- :multi="false"
320
- ></wfObjConfigDialog>
321
- </div>
322
- </template>
323
- <script>
324
- import { treeScollx } from "@base/utils/global.js";
325
- import wfObjConfigDialog from "../wf_obj_config/dialog.vue";
326
- import { loadViewComponent } from "@base/utils/resolveViewComponent";
327
-
328
- export default {
329
- name: "wf_manage:list2",
330
- components: { wfObjConfigDialog },
331
- created() {},
332
- async mounted() {
333
- treeScollx({ target: this, type: "default" });
334
- await this.initWfParam();
335
- this.initTableList();
336
- this.initRole();
337
- },
338
- data() {
339
- return {
340
- activeName: "second",
341
- // dataId: 0,
342
- // showEdit: false,
343
- vxeOption: {},
344
- formData: {},
345
- checkNode: {},
346
- defaultProps: {
347
- label: "label", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
348
- children: [],
349
- isLeaf: "leaf",
350
- },
351
- wfObjTypes: [],
352
- showWfObjConfigDialog: false,
353
- showWfObjConfigDialog2: false,
354
- flag: 0,
355
- vxeOption2: {},
356
- formData2: {},
357
-
358
- param: {},
359
- wfContent: null,
360
- remoteView: null,
361
- showWfContent: false,
362
- };
363
- },
364
- computed: {
365
- type() {
366
- return this.checkNode && this.checkNode.data
367
- ? this.checkNode.data.type
368
- : "";
369
- },
370
- checkNodeData() {
371
- return this.checkNode && this.checkNode.data ? this.checkNode.data : {};
372
- },
373
- },
374
- methods: {
375
- searchEvent() {
376
- this.$refs["table-m1"].commitProxy("reload");
377
- },
378
- resetEvent() {
379
- this.formData = {};
380
- this.$refs["table-m1"].commitProxy("reload");
381
- },
382
-
383
- initTableList() {
384
- let that = this;
385
- let paramColumns = this.wfParamDTOs.map((item) => {
386
- let flag = item.paramName == "单号";
387
- return {
388
- title: this.$t1(item.paramName),
389
- field: item.paramKey,
390
- width: 150,
391
- fixed: flag ? "left" : "",
392
- slots: flag
393
- ? {
394
- default: ({ row }) => {
395
- return [
396
- <div>
397
- <a
398
- href="javascript:void(0);"
399
- class="a-link"
400
- onclick={() => {
401
- this.openEditDialog(row);
402
- }}
403
- style="font-weight:bold; text-decoration: underline"
404
- >
405
- <el-tooltip
406
- class="item"
407
- effect="dark"
408
- content={this.$t1("查看")}
409
- placement="top-start"
410
- >
411
- <span>{row.param1}</span>
412
- </el-tooltip>
413
- </a>
414
- </div>,
415
- ];
416
- },
417
- }
418
- : "",
419
- };
420
- });
421
-
422
- // let statuses = {0: '未启动', 1: '审核中', 2: '已完成', 3: '已驳回', 4: '中断'};
423
- var statuses = {
424
- 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
425
- 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
426
- 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
427
- 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
428
- 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
429
- };
430
- let tableOption = {
431
- vue: this,
432
- tableRef: "table-m1",
433
- tableName: "user-wf-wf_manage-list-m2",
434
- path: USER_PREFIX + "/wf_info/listPage",
435
- param: () => {
436
- return {
437
- type: this.type,
438
- ...this.formData,
439
- };
440
- },
441
- /*config: {
442
- proxyConfig: {
443
- autoLoad: false
444
- }
445
- },*/
446
- columns: [
447
- { type: "checkbox", width: 48, resizable: false, fixed: "left" },
448
- {
449
- title: this.$t1("流程主题"),
450
- field: "name",
451
- width: 150,
452
- fixed: "left",
453
- },
454
- {
455
- title: this.$t1("单据类型"),
456
- field: "objTypeName",
457
- width: 150,
458
- },
459
- {
460
- title: this.$t1("启动人"),
461
- field: "starterName",
462
- width: 150,
463
- },
464
- {
465
- title: this.$t1("当前任务"),
466
- field: "taskName",
467
- width: 150,
468
- },
469
- {
470
- title: this.$t1("当前任务用户"),
471
- field: "candidateNames",
472
- width: 150,
473
- },
474
- {
475
- title: this.$t1("流程状态"),
476
- field: "stat",
477
- width: 150,
478
- slots: {
479
- default: ({ row }) => {
480
- let html = statuses[row.stat] || "";
481
- return html;
482
- },
483
- },
484
- },
485
- {
486
- title: this.$t1("启动时间"),
487
- field: "createDate",
488
- width: 150,
489
- },
490
- ...paramColumns,
491
- {
492
- width: 47,
493
- fixed: "right",
494
- title: "",
495
- sortable: false,
496
- slots: {
497
- default: ({ row }) => {
498
- return [
499
- <a
500
- href="javascript:void(0);"
501
- class="a-link"
502
- onclick={() => {
503
- // this.$refs["wfIframeDialog"].wfEdit(row);
504
- this.openEditDialog(row);
505
- }}
506
- >
507
- <el-tooltip
508
- enterable={false}
509
- effect="dark"
510
- content={this.$t1("查看")}
511
- placement="top"
512
- popper-class="tooltip-skin"
513
- >
514
- <i class="el-icon-edit" />
515
- </el-tooltip>
516
- </a>,
517
- ];
518
- },
519
- },
520
- },
521
- ],
522
- };
523
- this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
524
- this.vxeOption = opts;
525
- });
526
- },
527
- openEditDialog(row) {
528
- /*let a = 1;
529
- let url = row.url + '.vue';
530
- let id = row.objId;
531
- this.dataId = !id || typeof id == 'object' ? 0 : id;
532
- this.content = require('@/views' + url).default;*/
533
- // this.activeName = 'first';
534
- // this.$openEditView('showEdit');
535
-
536
- let id = row.objId;
537
- let wfDataId = !id || typeof id == "object" ? 0 : Number(id);
538
-
539
- if (row.url == "form") {
540
- let formCode = null;
541
- if (row.formCode) {
542
- formCode = row.formCode;
543
- } else {
544
- formCode = row.objTypeCode.substr(9);
545
- }
546
- this.param = {
547
- formCode: formCode,
548
- dataId: wfDataId,
549
- };
550
- let url = "/user/form/vform/render.vue";
551
- this.wfContent = require("@base/views" + url).default;
552
- } else {
553
- this.param = {
554
- _dataId: wfDataId,
555
- };
556
- let url = row.url + ".vue";
557
- let res = loadViewComponent(url);
558
- this.remoteView =
559
- res.kind === "remote"
560
- ? {
561
- owner: res.owner,
562
- targetPath: res.targetPath,
563
- bizParams: this.param,
564
- viewMeta: { visibleKey: "showWfContent", defaultShowWfContent: true, viewType: 1 },
565
- }
566
- : null;
567
- this.wfContent = res.component;
568
- }
569
- this.activeName = "first";
570
- this.$openEditView("showWfContent");
571
- },
572
- guid() {
573
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
574
- /[xy]/g,
575
- function (c) {
576
- var r = (Math.random() * 16) | 0,
577
- v = c == "x" ? r : (r & 0x3) | 0x8;
578
- return v.toString(16);
579
- }
580
- );
581
- },
582
- clearNodeClick() {
583
- /* this.formData.saleOrgId = '';
584
- this.formData.saleOrgName = '';
585
- this.$refs.tree.setCurrentKey();
586
- this.searchEvent(); */
587
- },
588
- handleNodeClick(data, node, v) {
589
- this.checkNode = node;
590
- this.formData.objTypeName = null;
591
- this.formData.objTypeCode = null;
592
- this.$forceUpdate();
593
- this.searchEvent();
594
- },
595
- // 异步树叶子节点懒加载逻辑
596
- loadNode(node, resolve) {
597
- if (!node || !node.data || node.data.type === undefined) {
598
- this.initNodeData(node, resolve);
599
- return;
600
- }
601
- this.$http({
602
- url: USER_PREFIX + "/wf_obj_config/getWfGroups",
603
- method: "post",
604
- data: {
605
- type: node.data.type,
606
- },
607
- success: (res) => {
608
- let rows = res.objx || [];
609
- rows.forEach((item) => {
610
- item.leaf = true;
611
- item.label = item.objTypeName + "(" + item.num + ")";
612
- item.type = node.data.type;
613
- item.uuid = this.guid();
614
- });
615
- resolve(rows);
616
- },
617
- });
618
- },
619
- initNodeData(node, resolve) {
620
- let data = [
621
- {
622
- uuid: -1,
623
- label: this.$t1("待审批的"),
624
- type: 0,
625
- leaf: true,
626
- },
627
- {
628
- uuid: -2,
629
- label: this.$t1("我发起的"),
630
- type: 1,
631
- leaf: true,
632
- },
633
- {
634
- uuid: -3,
635
- label: this.$t1("已审批的"),
636
- type: 2,
637
- leaf: true,
638
- },
639
- {
640
- uuid: -4,
641
- label: this.$t1("已完成的"),
642
- type: "3",
643
- leaf: true,
644
- },
645
- {
646
- uuid: -5,
647
- label: this.$t1("我转办的"),
648
- type: "4",
649
- leaf: true,
650
- },
651
- ];
652
- resolve(data);
653
- this.$nextTick(() => {
654
- if (node.childNodes.length) {
655
- let firstNode = node.childNodes[0];
656
- this.$refs.tree.setCurrentKey(firstNode.data.uuid);
657
- this.checkNode = firstNode;
658
- this.$forceUpdate();
659
- // this.handleNodeClick(firstNode.data, firstNode);
660
- }
661
- });
662
- /*this.$nextTick(() => {
663
- if (node.childNodes.length) {
664
- let nodedata = node.childNodes[0];
665
- nodedata.expanded = true;
666
- nodedata.loadData(arr => {
667
- if (arr.length) {
668
- setTimeout(() => {
669
- this.$refs.tree.setCurrentKey(arr[0].uuid);
670
- let node = this.$refs.tree.getNode(arr[0]);
671
- this.handleNodeClick(arr[0], node);
672
- }, 50);
673
- }
674
- });
675
- }
676
- });*/
677
- },
678
- confirmInsertWfObjConfig(rows) {
679
- if (rows.length) {
680
- let row = rows[0];
681
- this.$set(this.formData, "objTypeName", row.objTypeName);
682
- this.$set(this.formData, "objTypeCode", row.objTypeCode);
683
- }
684
- },
685
- async initWfParam() {
686
- return this.$http({
687
- url: USER_PREFIX + "/wf_param/list",
688
- method: `post`,
689
- data: {},
690
- success: (res) => {
691
- this.wfParamDTOs = res.objx || [];
692
- },
693
- });
694
- },
695
- //m2
696
- initRole() {
697
- this.$http({
698
- url: USER_PREFIX + "/user/currentUser",
699
- method: "post",
700
- success: (res) => {
701
- let userInfo = res.objx;
702
- this.getIsAdmin(userInfo);
703
- },
704
- });
705
- },
706
- getIsAdmin(userInfo) {
707
- this.$http({
708
- url: USER_PREFIX + "/userb/getUserRole",
709
- method: `post`,
710
- data: { id: userInfo.id },
711
- success: (res2) => {
712
- let rows = res2.objx || [];
713
- let codes = rows.map((row) => row.roleCode);
714
- if (codes.includes("superadmin") || codes.includes("wfadmin")) {
715
- this.flag = 1;
716
- setTimeout(() => {
717
- this.initTableList2();
718
- }, 200);
719
- }
720
- },
721
- });
722
- },
723
- searchEvent2() {
724
- this.$refs["table-m2"].commitProxy("reload");
725
- },
726
- resetEvent2() {
727
- this.formData2 = {};
728
- this.$refs["table-m2"].commitProxy("reload");
729
- },
730
- initTableList2() {
731
- let that = this;
732
- let paramColumns = this.wfParamDTOs.map((item) => {
733
- let flag = item.paramName == "单号";
734
- return {
735
- title: this.$t1(item.paramName),
736
- field: item.paramKey,
737
- width: 150,
738
- fixed: flag ? "left" : "",
739
- slots: flag
740
- ? {
741
- default: ({ row }) => {
742
- return [
743
- <div>
744
- <a
745
- href="javascript:void(0);"
746
- class="a-link"
747
- onclick={() => {
748
- this.openEditDialog(row);
749
- }}
750
- style="font-weight:bold; text-decoration: underline"
751
- >
752
- <el-tooltip
753
- class="item"
754
- effect="dark"
755
- content={this.$t1("查看")}
756
- placement="top-start"
757
- >
758
- <span>{row.param1}</span>
759
- </el-tooltip>
760
- </a>
761
- </div>,
762
- ];
763
- },
764
- }
765
- : "",
766
- };
767
- });
768
-
769
- var statuses = {
770
- 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
771
- 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
772
- 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
773
- 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
774
- 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
775
- };
776
- let tableOption = {
777
- vue: this,
778
- tableRef: "table-m2",
779
- tableName: "user-wf-wf_manage-list-m3",
780
- path: USER_PREFIX + "/wf_info/listPageAll",
781
- param: () => {
782
- return {
783
- ...this.formData2,
784
- };
785
- },
786
- columns: [
787
- { type: "checkbox", width: 48, resizable: false, fixed: "left" },
788
- {
789
- title: this.$t1("流程主题"),
790
- field: "name",
791
- width: 150,
792
- fixed: "left",
793
- },
794
- {
795
- title: this.$t1("单据类型"),
796
- field: "objTypeName",
797
- width: 150,
798
- },
799
- {
800
- title: this.$t1("启动人"),
801
- field: "starterName",
802
- width: 150,
803
- },
804
- {
805
- title: this.$t1("当前任务"),
806
- field: "taskName",
807
- width: 150,
808
- },
809
- {
810
- title: this.$t1("当前任务用户"),
811
- field: "candidateNames",
812
- width: 150,
813
- },
814
- {
815
- title: this.$t1("流程状态"),
816
- field: "stat",
817
- width: 150,
818
- slots: {
819
- default: ({ row }) => {
820
- let html = statuses[row.stat] || "";
821
- return html;
822
- },
823
- },
824
- },
825
- {
826
- title: this.$t1("启动时间"),
827
- field: "createDate",
828
- width: 150,
829
- },
830
- ...paramColumns,
831
- {
832
- width: 47,
833
- fixed: "right",
834
- title: "",
835
- sortable: false,
836
- slots: {
837
- default: ({ row }) => {
838
- return [
839
- <a
840
- href="javascript:void(0);"
841
- class="a-link"
842
- onclick={() => {
843
- this.openEditDialog(row);
844
- }}
845
- >
846
- <el-tooltip
847
- enterable={false}
848
- effect="dark"
849
- content={this.$t1("查看")}
850
- placement="top"
851
- popper-class="tooltip-skin"
852
- >
853
- <i class="el-icon-edit" />
854
- </el-tooltip>
855
- </a>,
856
- ];
857
- },
858
- },
859
- },
860
- ],
861
- };
862
- this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
863
- this.vxeOption2 = opts;
864
- });
865
- },
866
- confirmInsertWfObjConfig2(rows) {
867
- if (rows.length) {
868
- let row = rows[0];
869
- this.$set(this.formData2, "objTypeName", row.objTypeName);
870
- this.$set(this.formData2, "objTypeCode", row.objTypeCode);
871
- }
872
- },
873
- },
874
- };
875
- </script>
1
+ <template>
2
+ <div id="containt">
3
+ <el-tabs v-model="activeName" class="tab-box">
4
+ <el-tab-pane :label="$t1('常规2')" 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('我的流程2')" 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('全部流程2')" 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
+ </div>
222
+ <div class="fr">
223
+ <vxe-button
224
+ icon="el-icon-brush"
225
+ class="button-sty"
226
+ @click="resetEvent2"
227
+ type="text"
228
+ status="primary"
229
+ plain
230
+ >{{ $t1("刷新") }}
231
+ </vxe-button>
232
+ <vxe-button
233
+ status="warning"
234
+ icon="el-icon-search"
235
+ class="button-sty"
236
+ @click="searchEvent2"
237
+ >
238
+ {{ $t1("搜索") }}
239
+ </vxe-button>
240
+ </div>
241
+ </div>
242
+ <vxe-form
243
+ ref="form"
244
+ class="screen-box"
245
+ title-width="92px"
246
+ title-align="right"
247
+ :data="formData2"
248
+ @submit="searchEvent2"
249
+ @reset="searchEvent2"
250
+ >
251
+ <vxe-form-item :title="$t1('流程主题') + ':'" field="name">
252
+ <template v-slot>
253
+ <el-input v-model="formData2.name" size="small" clearable />
254
+ </template>
255
+ </vxe-form-item>
256
+ <vxe-form-item
257
+ :title="$t1('单据类型') + ':'"
258
+ field="objTypeName"
259
+ >
260
+ <template v-slot>
261
+ <el-input
262
+ class="search-input"
263
+ max="200"
264
+ v-model="formData2.objTypeName"
265
+ @clear="
266
+ formData2.objTypeCode = null;
267
+ $forceUpdate();
268
+ "
269
+ v-el-readonly
270
+ clearable
271
+ >
272
+ <i
273
+ slot="suffix"
274
+ class="el-input__icon el-icon-search"
275
+ @click="showWfObjConfigDialog2 = true"
276
+ ></i>
277
+ </el-input>
278
+ </template>
279
+ </vxe-form-item>
280
+ <vxe-form-item :title="$t1('流程状态') + ':'" field="stat">
281
+ <template v-slot>
282
+ <el-select v-model="formData2.stat" clearable>
283
+ <el-option :value="1" :label="$t1('审核中')"></el-option>
284
+ <el-option :value="2" :label="$t1('已完成')"></el-option>
285
+ <el-option :value="3" :label="$t1('已驳回')"></el-option>
286
+ </el-select>
287
+ </template>
288
+ </vxe-form-item>
289
+ <vxe-form-item
290
+ :title="$t1('当前任务用户') + ':'"
291
+ field="candidateNames"
292
+ >
293
+ <template v-slot>
294
+ <el-input
295
+ v-model="formData2.candidateNames"
296
+ size="small"
297
+ clearable
298
+ />
299
+ </template>
300
+ </vxe-form-item>
301
+ </vxe-form>
302
+ </template>
303
+ </vxe-grid>
304
+ </div>
305
+ </el-tab-pane>
306
+ </el-tabs>
307
+ <wfObjConfigDialog
308
+ v-if="showWfObjConfigDialog"
309
+ :visiable.sync="showWfObjConfigDialog"
310
+ :type.sync="type"
311
+ @confirm="confirmInsertWfObjConfig"
312
+ :multi="false"
313
+ ></wfObjConfigDialog>
314
+ <wfObjConfigDialog
315
+ v-if="showWfObjConfigDialog2"
316
+ :visiable.sync="showWfObjConfigDialog2"
317
+ :type="99"
318
+ @confirm="confirmInsertWfObjConfig2"
319
+ :multi="false"
320
+ ></wfObjConfigDialog>
321
+ </div>
322
+ </template>
323
+ <script>
324
+ import { treeScollx } from "@base/utils/global.js";
325
+ import wfObjConfigDialog from "../wf_obj_config/dialog.vue";
326
+ import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
327
+
328
+ export default {
329
+ name: "wf_manage:list2",
330
+ components: { wfObjConfigDialog },
331
+ created() {},
332
+ async mounted() {
333
+ treeScollx({ target: this, type: "default" });
334
+ await this.initWfParam();
335
+ this.initTableList();
336
+ this.initRole();
337
+ },
338
+ data() {
339
+ return {
340
+ activeName: "second",
341
+ // dataId: 0,
342
+ // showEdit: false,
343
+ vxeOption: {},
344
+ formData: {},
345
+ checkNode: {},
346
+ defaultProps: {
347
+ label: "label", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
348
+ children: [],
349
+ isLeaf: "leaf",
350
+ },
351
+ wfObjTypes: [],
352
+ showWfObjConfigDialog: false,
353
+ showWfObjConfigDialog2: false,
354
+ flag: 0,
355
+ vxeOption2: {},
356
+ formData2: {},
357
+
358
+ param: {},
359
+ wfContent: null,
360
+ remoteView: null,
361
+ showWfContent: false,
362
+ };
363
+ },
364
+ computed: {
365
+ type() {
366
+ return this.checkNode && this.checkNode.data
367
+ ? this.checkNode.data.type
368
+ : "";
369
+ },
370
+ checkNodeData() {
371
+ return this.checkNode && this.checkNode.data ? this.checkNode.data : {};
372
+ },
373
+ },
374
+ methods: {
375
+ searchEvent() {
376
+ this.$refs["table-m1"].commitProxy("reload");
377
+ },
378
+ resetEvent() {
379
+ this.formData = {};
380
+ this.$refs["table-m1"].commitProxy("reload");
381
+ },
382
+
383
+ initTableList() {
384
+ let that = this;
385
+ let paramColumns = this.wfParamDTOs.map((item) => {
386
+ let flag = item.paramName == "单号";
387
+ return {
388
+ title: this.$t1(item.paramName),
389
+ field: item.paramKey,
390
+ width: 150,
391
+ fixed: flag ? "left" : "",
392
+ slots: flag
393
+ ? {
394
+ default: ({ row }) => {
395
+ return [
396
+ <div>
397
+ <a
398
+ href="javascript:void(0);"
399
+ class="a-link"
400
+ onclick={() => {
401
+ this.openEditDialog(row);
402
+ }}
403
+ style="font-weight:bold; text-decoration: underline"
404
+ >
405
+ <el-tooltip
406
+ class="item"
407
+ effect="dark"
408
+ content={this.$t1("查看")}
409
+ placement="top-start"
410
+ >
411
+ <span>{row.param1}</span>
412
+ </el-tooltip>
413
+ </a>
414
+ </div>,
415
+ ];
416
+ },
417
+ }
418
+ : "",
419
+ };
420
+ });
421
+
422
+ // let statuses = {0: '未启动', 1: '审核中', 2: '已完成', 3: '已驳回', 4: '中断'};
423
+ var statuses = {
424
+ 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
425
+ 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
426
+ 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
427
+ 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
428
+ 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
429
+ };
430
+ let tableOption = {
431
+ vue: this,
432
+ tableRef: "table-m1",
433
+ tableName: "user-wf-wf_manage-list-m2",
434
+ path: USER_PREFIX + "/wf_info/listPage",
435
+ param: () => {
436
+ return {
437
+ type: this.type,
438
+ ...this.formData,
439
+ };
440
+ },
441
+ /*config: {
442
+ proxyConfig: {
443
+ autoLoad: false
444
+ }
445
+ },*/
446
+ columns: [
447
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
448
+ {
449
+ title: this.$t1("流程主题"),
450
+ field: "name",
451
+ width: 150,
452
+ fixed: "left",
453
+ },
454
+ {
455
+ title: this.$t1("单据类型"),
456
+ field: "objTypeName",
457
+ width: 150,
458
+ },
459
+ {
460
+ title: this.$t1("启动人"),
461
+ field: "starterName",
462
+ width: 150,
463
+ },
464
+ {
465
+ title: this.$t1("当前任务"),
466
+ field: "taskName",
467
+ width: 150,
468
+ },
469
+ {
470
+ title: this.$t1("当前任务用户"),
471
+ field: "candidateNames",
472
+ width: 150,
473
+ },
474
+ {
475
+ title: this.$t1("流程状态"),
476
+ field: "stat",
477
+ width: 150,
478
+ slots: {
479
+ default: ({ row }) => {
480
+ let html = statuses[row.stat] || "";
481
+ return html;
482
+ },
483
+ },
484
+ },
485
+ {
486
+ title: this.$t1("启动时间"),
487
+ field: "createDate",
488
+ width: 150,
489
+ },
490
+ ...paramColumns,
491
+ {
492
+ width: 47,
493
+ fixed: "right",
494
+ title: "",
495
+ sortable: false,
496
+ slots: {
497
+ default: ({ row }) => {
498
+ return [
499
+ <a
500
+ href="javascript:void(0);"
501
+ class="a-link"
502
+ onclick={() => {
503
+ // this.$refs["wfIframeDialog"].wfEdit(row);
504
+ this.openEditDialog(row);
505
+ }}
506
+ >
507
+ <el-tooltip
508
+ enterable={false}
509
+ effect="dark"
510
+ content={this.$t1("查看")}
511
+ placement="top"
512
+ popper-class="tooltip-skin"
513
+ >
514
+ <i class="el-icon-edit" />
515
+ </el-tooltip>
516
+ </a>,
517
+ ];
518
+ },
519
+ },
520
+ },
521
+ ],
522
+ };
523
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
524
+ this.vxeOption = opts;
525
+ });
526
+ },
527
+ // 异步:await 之后才置 activeName / 调 $openEditView,否则弹窗先开出空壳
528
+ // ($openEditView 200ms 定时放行,冷启动拉 chunk 常超过它)
529
+ async openEditDialog(row) {
530
+ let id = row.objId;
531
+ let wfDataId = !id || typeof id == "object" ? 0 : Number(id);
532
+
533
+ if (row.url == "form") {
534
+ let formCode = null;
535
+ if (row.formCode) {
536
+ formCode = row.formCode;
537
+ } else {
538
+ formCode = row.objTypeCode.substr(9);
539
+ }
540
+ this.param = {
541
+ formCode: formCode,
542
+ dataId: wfDataId,
543
+ };
544
+ // 路径是常量,用字面量 import:生成普通 ImportDependency,不参与 views context
545
+ this.wfContent = (
546
+ await import("@base/views/user/form/vform/render.vue")
547
+ ).default;
548
+ } else {
549
+ this.param = {
550
+ _dataId: wfDataId,
551
+ };
552
+ let url = row.url + ".vue";
553
+ const res = await loadViewComponentAsync(url);
554
+ this.remoteView =
555
+ res.kind === "remote"
556
+ ? {
557
+ owner: res.owner,
558
+ targetPath: res.targetPath,
559
+ bizParams: this.param,
560
+ viewMeta: { visibleKey: "showWfContent", defaultShowWfContent: true, viewType: 1 },
561
+ }
562
+ : null;
563
+ this.wfContent = res.component;
564
+ }
565
+ this.activeName = "first";
566
+ this.$openEditView("showWfContent");
567
+ },
568
+ guid() {
569
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
570
+ /[xy]/g,
571
+ function (c) {
572
+ var r = (Math.random() * 16) | 0,
573
+ v = c == "x" ? r : (r & 0x3) | 0x8;
574
+ return v.toString(16);
575
+ }
576
+ );
577
+ },
578
+ clearNodeClick() {
579
+ /* this.formData.saleOrgId = '';
580
+ this.formData.saleOrgName = '';
581
+ this.$refs.tree.setCurrentKey();
582
+ this.searchEvent(); */
583
+ },
584
+ handleNodeClick(data, node, v) {
585
+ this.checkNode = node;
586
+ this.formData.objTypeName = null;
587
+ this.formData.objTypeCode = null;
588
+ this.$forceUpdate();
589
+ this.searchEvent();
590
+ },
591
+ // 异步树叶子节点懒加载逻辑
592
+ loadNode(node, resolve) {
593
+ if (!node || !node.data || node.data.type === undefined) {
594
+ this.initNodeData(node, resolve);
595
+ return;
596
+ }
597
+ this.$http({
598
+ url: USER_PREFIX + "/wf_obj_config/getWfGroups",
599
+ method: "post",
600
+ data: {
601
+ type: node.data.type,
602
+ },
603
+ success: (res) => {
604
+ let rows = res.objx || [];
605
+ rows.forEach((item) => {
606
+ item.leaf = true;
607
+ item.label = item.objTypeName + "(" + item.num + ")";
608
+ item.type = node.data.type;
609
+ item.uuid = this.guid();
610
+ });
611
+ resolve(rows);
612
+ },
613
+ });
614
+ },
615
+ initNodeData(node, resolve) {
616
+ let data = [
617
+ {
618
+ uuid: -1,
619
+ label: this.$t1("待审批的"),
620
+ type: 0,
621
+ leaf: true,
622
+ },
623
+ {
624
+ uuid: -2,
625
+ label: this.$t1("我发起的"),
626
+ type: 1,
627
+ leaf: true,
628
+ },
629
+ {
630
+ uuid: -3,
631
+ label: this.$t1("已审批的"),
632
+ type: 2,
633
+ leaf: true,
634
+ },
635
+ {
636
+ uuid: -4,
637
+ label: this.$t1("已完成的"),
638
+ type: "3",
639
+ leaf: true,
640
+ },
641
+ {
642
+ uuid: -5,
643
+ label: this.$t1("我转办的"),
644
+ type: "4",
645
+ leaf: true,
646
+ },
647
+ ];
648
+ resolve(data);
649
+ this.$nextTick(() => {
650
+ if (node.childNodes.length) {
651
+ let firstNode = node.childNodes[0];
652
+ this.$refs.tree.setCurrentKey(firstNode.data.uuid);
653
+ this.checkNode = firstNode;
654
+ this.$forceUpdate();
655
+ // this.handleNodeClick(firstNode.data, firstNode);
656
+ }
657
+ });
658
+ /*this.$nextTick(() => {
659
+ if (node.childNodes.length) {
660
+ let nodedata = node.childNodes[0];
661
+ nodedata.expanded = true;
662
+ nodedata.loadData(arr => {
663
+ if (arr.length) {
664
+ setTimeout(() => {
665
+ this.$refs.tree.setCurrentKey(arr[0].uuid);
666
+ let node = this.$refs.tree.getNode(arr[0]);
667
+ this.handleNodeClick(arr[0], node);
668
+ }, 50);
669
+ }
670
+ });
671
+ }
672
+ });*/
673
+ },
674
+ confirmInsertWfObjConfig(rows) {
675
+ if (rows.length) {
676
+ let row = rows[0];
677
+ this.$set(this.formData, "objTypeName", row.objTypeName);
678
+ this.$set(this.formData, "objTypeCode", row.objTypeCode);
679
+ }
680
+ },
681
+ async initWfParam() {
682
+ return this.$http({
683
+ url: USER_PREFIX + "/wf_param/list",
684
+ method: `post`,
685
+ data: {},
686
+ success: (res) => {
687
+ this.wfParamDTOs = res.objx || [];
688
+ },
689
+ });
690
+ },
691
+ //m2
692
+ initRole() {
693
+ this.$http({
694
+ url: USER_PREFIX + "/user/currentUser",
695
+ method: "post",
696
+ success: (res) => {
697
+ let userInfo = res.objx;
698
+ this.getIsAdmin(userInfo);
699
+ },
700
+ });
701
+ },
702
+ getIsAdmin(userInfo) {
703
+ this.$http({
704
+ url: USER_PREFIX + "/userb/getUserRole",
705
+ method: `post`,
706
+ data: { id: userInfo.id },
707
+ success: (res2) => {
708
+ let rows = res2.objx || [];
709
+ let codes = rows.map((row) => row.roleCode);
710
+ if (codes.includes("superadmin") || codes.includes("wfadmin")) {
711
+ this.flag = 1;
712
+ setTimeout(() => {
713
+ this.initTableList2();
714
+ }, 200);
715
+ }
716
+ },
717
+ });
718
+ },
719
+ searchEvent2() {
720
+ this.$refs["table-m2"].commitProxy("reload");
721
+ },
722
+ resetEvent2() {
723
+ this.formData2 = {};
724
+ this.$refs["table-m2"].commitProxy("reload");
725
+ },
726
+ initTableList2() {
727
+ let that = this;
728
+ let paramColumns = this.wfParamDTOs.map((item) => {
729
+ let flag = item.paramName == "单号";
730
+ return {
731
+ title: this.$t1(item.paramName),
732
+ field: item.paramKey,
733
+ width: 150,
734
+ fixed: flag ? "left" : "",
735
+ slots: flag
736
+ ? {
737
+ default: ({ row }) => {
738
+ return [
739
+ <div>
740
+ <a
741
+ href="javascript:void(0);"
742
+ class="a-link"
743
+ onclick={() => {
744
+ this.openEditDialog(row);
745
+ }}
746
+ style="font-weight:bold; text-decoration: underline"
747
+ >
748
+ <el-tooltip
749
+ class="item"
750
+ effect="dark"
751
+ content={this.$t1("查看")}
752
+ placement="top-start"
753
+ >
754
+ <span>{row.param1}</span>
755
+ </el-tooltip>
756
+ </a>
757
+ </div>,
758
+ ];
759
+ },
760
+ }
761
+ : "",
762
+ };
763
+ });
764
+
765
+ var statuses = {
766
+ 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
767
+ 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
768
+ 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
769
+ 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
770
+ 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
771
+ };
772
+ let tableOption = {
773
+ vue: this,
774
+ tableRef: "table-m2",
775
+ tableName: "user-wf-wf_manage-list-m3",
776
+ path: USER_PREFIX + "/wf_info/listPageAll",
777
+ param: () => {
778
+ return {
779
+ ...this.formData2,
780
+ };
781
+ },
782
+ columns: [
783
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
784
+ {
785
+ title: this.$t1("流程主题"),
786
+ field: "name",
787
+ width: 150,
788
+ fixed: "left",
789
+ },
790
+ {
791
+ title: this.$t1("单据类型"),
792
+ field: "objTypeName",
793
+ width: 150,
794
+ },
795
+ {
796
+ title: this.$t1("启动人"),
797
+ field: "starterName",
798
+ width: 150,
799
+ },
800
+ {
801
+ title: this.$t1("当前任务"),
802
+ field: "taskName",
803
+ width: 150,
804
+ },
805
+ {
806
+ title: this.$t1("当前任务用户"),
807
+ field: "candidateNames",
808
+ width: 150,
809
+ },
810
+ {
811
+ title: this.$t1("流程状态"),
812
+ field: "stat",
813
+ width: 150,
814
+ slots: {
815
+ default: ({ row }) => {
816
+ let html = statuses[row.stat] || "";
817
+ return html;
818
+ },
819
+ },
820
+ },
821
+ {
822
+ title: this.$t1("启动时间"),
823
+ field: "createDate",
824
+ width: 150,
825
+ },
826
+ ...paramColumns,
827
+ {
828
+ width: 47,
829
+ fixed: "right",
830
+ title: "",
831
+ sortable: false,
832
+ slots: {
833
+ default: ({ row }) => {
834
+ return [
835
+ <a
836
+ href="javascript:void(0);"
837
+ class="a-link"
838
+ onclick={() => {
839
+ this.openEditDialog(row);
840
+ }}
841
+ >
842
+ <el-tooltip
843
+ enterable={false}
844
+ effect="dark"
845
+ content={this.$t1("查看")}
846
+ placement="top"
847
+ popper-class="tooltip-skin"
848
+ >
849
+ <i class="el-icon-edit" />
850
+ </el-tooltip>
851
+ </a>,
852
+ ];
853
+ },
854
+ },
855
+ },
856
+ ],
857
+ };
858
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
859
+ this.vxeOption2 = opts;
860
+ });
861
+ },
862
+ confirmInsertWfObjConfig2(rows) {
863
+ if (rows.length) {
864
+ let row = rows[0];
865
+ this.$set(this.formData2, "objTypeName", row.objTypeName);
866
+ this.$set(this.formData2, "objTypeCode", row.objTypeCode);
867
+ }
868
+ },
869
+ },
870
+ };
871
+ </script>