cloud-web-corejs-haier 1.0.43 → 1.0.45

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 (228) hide show
  1. package/package.json +8 -6
  2. package/src/api/user.js +54 -46
  3. package/src/components/baseAlert/index.vue +57 -53
  4. package/src/components/baseInputExport/index.vue +3 -3
  5. package/src/components/baseTabs/mixins.js +12 -1
  6. package/src/components/errorMsg/index.vue +78 -78
  7. package/src/components/excelExport/button.vue +54 -45
  8. package/src/components/excelExport/exportFieldDialog.vue +3 -3
  9. package/src/components/excelExport/index.js +1 -43
  10. package/src/components/excelExport/index.vue +62 -34
  11. package/src/components/excelExport/mixins.js +74 -87
  12. package/src/components/excelImport/index.js +1 -62
  13. package/src/components/excelImport/mixins.js +1 -774
  14. package/src/components/fileLibrary/index.vue +113 -33
  15. package/src/components/fileLibrary/propertiesDialog.vue +6 -0
  16. package/src/components/hiprint/view/design/index.vue +139 -47
  17. package/src/components/hiprint/view/design/preview.vue +75 -52
  18. package/src/components/hiprint/view/json-view.vue +31 -31
  19. package/src/components/luckysheet/dialog.vue +159 -0
  20. package/src/components/luckysheet/export.js +595 -0
  21. package/src/components/luckysheet/fileUtils.js +147 -0
  22. package/src/components/luckysheet/index.js +69 -0
  23. package/src/components/luckysheet/templateJson.js +12078 -0
  24. package/src/components/luckysheet/view.vue +210 -0
  25. package/src/components/onlineTalk/index.vue +328 -6
  26. package/src/components/onlineTalk/talkUserDialog.vue +280 -0
  27. package/src/components/wf/addTaskUserdialog.vue +5 -5
  28. package/src/components/wf/content.vue +1244 -1169
  29. package/src/components/wf/content2.vue +604 -604
  30. package/src/components/wf/mixins/setCandidateDialog.js +228 -2
  31. package/src/components/wf/mixins/setCandidateDialog2.js +116 -101
  32. package/src/components/wf/mixins/wfTaskUserRangeDialog.js +67 -1
  33. package/src/components/wf/setCandidateDialog.vue +5 -7
  34. package/src/components/wf/setCandidateDialog2.vue +14 -10
  35. package/src/components/wf/wf.js +2325 -2209
  36. package/src/components/wf/wfTaskUserRangeDialog.vue +1 -1
  37. package/src/components/wf/wfUtil.js +129 -91
  38. package/src/components/xform/form-designer/designer.js +1994 -9
  39. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +10 -0
  40. package/src/components/xform/form-designer/form-widget/container-widget/detail-pane-widget.vue +3 -2
  41. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +5 -1
  42. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +1639 -0
  43. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1756 -2
  44. package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +1 -0
  45. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +10 -1
  46. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +170 -0
  47. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1630 -1
  48. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +153 -40
  49. package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +65 -46
  50. package/src/components/xform/form-designer/form-widget/field-widget/vue-page-widget.vue +231 -0
  51. package/src/components/xform/form-designer/setting-panel/form-setting.vue +7 -4
  52. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/edit-tree-button-group-config-dialog.vue +281 -0
  53. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +659 -221
  54. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +3 -3
  55. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +133 -0
  56. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +14 -6
  57. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +1 -1
  58. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +1 -1
  59. package/src/components/xform/form-designer/setting-panel/property-editor/field-vue-page/vue-page-editor.vue +48 -0
  60. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +18 -17
  61. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +26 -26
  62. package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +67 -13
  63. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +2 -0
  64. package/src/components/xform/form-designer/setting-panel/property-editor/showViewButton-editor.vue +29 -0
  65. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +8 -6
  66. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
  67. package/src/components/xform/form-render/container-item/data-table-mixin.js +20 -17
  68. package/src/components/xform/form-render/container-item/detail-item.vue +72 -48
  69. package/src/components/xform/form-render/container-item/sub-form-item.vue +10 -2
  70. package/src/components/xform/form-render/container-item/table2-item.vue +40 -10
  71. package/src/components/xform/form-render/indexMixin.js +3705 -1
  72. package/src/components/xform/icon-picker/icons.json +284 -0
  73. package/src/components/xform/icon-picker/index.vue +145 -0
  74. package/src/components/xform/lang/zh-CN.js +2 -1
  75. package/src/components/xform/mixins/defaultHandle.js +366 -2
  76. package/src/components/xform/utils/formula-util.js +3 -0
  77. package/src/components/xform/utils/sfc-generator.js +2 -2
  78. package/src/components/xform/utils/smart-vue-i18n/index.js +2 -1
  79. package/src/components/xform/utils/tableColumnHelper.js +54 -10
  80. package/src/components/xform/utils/util.js +1547 -1
  81. package/src/index.js +190 -211
  82. package/src/lang/locale/en/login.js +26 -19
  83. package/src/lang/locale/zh/login.js +25 -19
  84. package/src/layout/components/Sidebar/default.vue +252 -71
  85. package/src/layout/components/Sidebar/index.vue +6 -1
  86. package/src/layout/components/TagsView/index.vue +6 -0
  87. package/src/layout/components/langTool.vue +32 -29
  88. package/src/layout/defaultLayout.vue +16 -8
  89. package/src/layout/index.vue +5 -3
  90. package/src/permission.js +135 -1
  91. package/src/router/index.js +1 -4
  92. package/src/store/config/index.js +667 -1
  93. package/src/store/getters.js +2 -1
  94. package/src/store/modules/permission.js +332 -1
  95. package/src/store/modules/settings.js +26 -1
  96. package/src/store/modules/tagsView.js +190 -1
  97. package/src/store/modules/user.js +358 -1
  98. package/src/utils/aes.js +15 -1
  99. package/src/utils/auth.js +27 -1
  100. package/src/utils/componentDialog.js +217 -0
  101. package/src/utils/request.js +368 -1
  102. package/src/utils/vab.js +1256 -7
  103. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  104. package/src/views/bd/setting/bd_company_env/edit.vue +193 -193
  105. package/src/views/bd/setting/formVersion/button.vue +55 -0
  106. package/src/views/bd/setting/formVersion/compareBasicSection.vue +125 -0
  107. package/src/views/bd/setting/formVersion/compareCodeSection.vue +539 -0
  108. package/src/views/bd/setting/formVersion/compareContMixin.scss +65 -0
  109. package/src/views/bd/setting/formVersion/compareContent.vue +63 -0
  110. package/src/views/bd/setting/formVersion/compareDialog.vue +88 -0
  111. package/src/views/bd/setting/formVersion/compareMixin.js +93 -0
  112. package/src/views/bd/setting/formVersion/fieldCompare.vue +54 -0
  113. package/src/views/bd/setting/formVersion/formScriptCompareView.vue +94 -0
  114. package/src/views/bd/setting/formVersion/formTemplateCompareView.vue +74 -0
  115. package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +491 -0
  116. package/src/views/bd/setting/formVersion/link.vue +58 -0
  117. package/src/views/bd/setting/formVersion/preformDialog.vue +87 -0
  118. package/src/views/bd/setting/formVersion/reverButton.vue +82 -0
  119. package/src/views/bd/setting/formVersion/tableDetailDiff.js +99 -0
  120. package/src/views/bd/setting/formVersion/tableModelCompareView.vue +514 -0
  121. package/src/views/bd/setting/formVersion/textDiff.js +102 -0
  122. package/src/views/bd/setting/form_import_log/edit.vue +6 -3
  123. package/src/views/bd/setting/form_import_log/list.vue +5 -0
  124. package/src/views/bd/setting/form_script/edit.vue +196 -83
  125. package/src/views/bd/setting/form_script/edit1.vue +410 -220
  126. package/src/views/bd/setting/form_script/form_list.vue +19 -0
  127. package/src/views/bd/setting/form_script/list.vue +95 -21
  128. package/src/views/bd/setting/form_script/list1.vue +24 -0
  129. package/src/views/bd/setting/form_script/mixins/dialog.js +2 -2
  130. package/src/views/bd/setting/form_script/mixins/edit.js +265 -207
  131. package/src/views/bd/setting/form_script/mixins/edit1.js +259 -201
  132. package/src/views/bd/setting/form_script/mixins/form_list.js +322 -296
  133. package/src/views/bd/setting/form_script/mixins/list.js +163 -95
  134. package/src/views/bd/setting/form_script/mixins/list1.js +244 -155
  135. package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +1 -1
  136. package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +1 -1
  137. package/src/views/bd/setting/form_template/edit.vue +355 -205
  138. package/src/views/bd/setting/form_template/formDesignerDialog.vue +171 -0
  139. package/src/views/bd/setting/form_template/list.vue +49 -74
  140. package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +3 -3
  141. package/src/views/bd/setting/form_template/mixins/edit.js +51 -8
  142. package/src/views/bd/setting/form_template/mixins/itemList.js +1 -1
  143. package/src/views/bd/setting/form_template/mixins/list.js +114 -82
  144. package/src/views/bd/setting/form_template/mixins/list2.js +3 -3
  145. package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +1 -1
  146. package/src/views/bd/setting/form_template/mixins/wf_list.js +3 -7
  147. package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +254 -254
  148. package/src/views/bd/setting/form_template/wf_list.vue +161 -127
  149. package/src/views/bd/setting/request_async_setting/edit.vue +320 -320
  150. package/src/views/bd/setting/request_setting/edit.vue +300 -300
  151. package/src/views/bd/setting/request_setting/list.vue +15 -25
  152. package/src/views/bd/setting/table_model/edit.vue +702 -498
  153. package/src/views/bd/setting/table_model/list.vue +28 -0
  154. package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
  155. package/src/views/bd/setting/table_model/mixins/edit copy.js +903 -0
  156. package/src/views/bd/setting/table_model/mixins/edit.js +228 -121
  157. package/src/views/bd/setting/table_model/mixins/list.js +55 -20
  158. package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +1 -1
  159. package/src/views/bd/setting/table_model/mixins/zdDialog.js +50 -46
  160. package/src/views/bd/setting/utils/index.js +15 -0
  161. package/src/views/user/api_request/list.vue +203 -203
  162. package/src/views/user/bill_setting/list.vue +345 -345
  163. package/src/views/user/code_rules/list.vue +204 -204
  164. package/src/views/user/common_attribute/list.vue +378 -378
  165. package/src/views/user/common_script/list.vue +341 -341
  166. package/src/views/user/company_info/dialog.vue +80 -49
  167. package/src/views/user/country/list.vue +197 -197
  168. package/src/views/user/extend_datasource/dialog.vue +0 -3
  169. package/src/views/user/extend_datasource/edit.vue +1 -2
  170. package/src/views/user/extend_datasource/list.vue +221 -224
  171. package/src/views/user/fieldTranslation/editDialog.vue +1 -1
  172. package/src/views/user/fieldTranslation/list.vue +473 -473
  173. package/src/views/user/field_values_invisible/list.vue +207 -207
  174. package/src/views/user/file_type/list.vue +271 -271
  175. package/src/views/user/file_view_area/list.vue +331 -331
  176. package/src/views/user/form/vform/designer.vue +303 -287
  177. package/src/views/user/form/vform/formFieldMapping.js +2 -3
  178. package/src/views/user/form/view/edit.vue +19 -1
  179. package/src/views/user/form/view/list.vue +59 -17
  180. package/src/views/user/groups/list.vue +158 -158
  181. package/src/views/user/home/default.vue +274 -182
  182. package/src/views/user/home/default2.vue +1148 -0
  183. package/src/views/user/home/index.vue +2 -1
  184. package/src/views/user/lang_tag/list.vue +170 -170
  185. package/src/views/user/language_setting/list.vue +208 -208
  186. package/src/views/user/ledger_library/list.vue +12 -10
  187. package/src/views/user/login/default.vue +1 -1
  188. package/src/views/user/login/indexMixin.js +204 -169
  189. package/src/views/user/menu/list.vue +575 -575
  190. package/src/views/user/notify_message/dialog.vue +7 -1
  191. package/src/views/user/notify_template/list.vue +192 -192
  192. package/src/views/user/notify_template/list2.vue +190 -190
  193. package/src/views/user/position/list.vue +188 -188
  194. package/src/views/user/project_tag/list.vue +175 -175
  195. package/src/views/user/push_setting/list.vue +236 -236
  196. package/src/views/user/request_setting/list.vue +248 -248
  197. package/src/views/user/role/list.vue +182 -182
  198. package/src/views/user/system_notice/infoDialog.vue +61 -2
  199. package/src/views/user/system_notice/list.vue +203 -203
  200. package/src/views/user/system_parameter/list.vue +141 -141
  201. package/src/views/user/user/edit.vue +45 -0
  202. package/src/views/user/user/form_list.vue +245 -245
  203. package/src/views/user/user/info.vue +253 -140
  204. package/src/views/user/user_log_classify/list.vue +197 -197
  205. package/src/views/user/wf/iframe/index.vue +46 -46
  206. package/src/views/user/wf/wfReport/index.vue +1 -1
  207. package/src/views/user/wf/wf_auto_submit_data/list.vue +659 -659
  208. package/src/views/user/wf/wf_diy_attribute/edit.vue +1 -1
  209. package/src/views/user/wf/wf_manage/list.vue +795 -795
  210. package/src/views/user/wf/wf_manage/wfContentDialog.vue +106 -106
  211. package/src/views/user/wf/wf_obj_config/dialog.vue +2 -2
  212. package/src/views/user/wf/wf_obj_config/edit.vue +1 -1
  213. package/src/views/user/wf/wf_obj_config/edit_form.vue +2 -2
  214. package/src/views/user/wf/wf_obj_config/itemEdit.vue +1 -1
  215. package/src/views/user/wf/wf_obj_config/itemEdit_form.vue +1 -1
  216. package/src/views/user/wf/wf_obj_config/itemOperateDialog.vue +4 -4
  217. package/src/views/user/wf/wf_obj_config/list.vue +28 -28
  218. package/src/views/user/wf/wf_obj_config/list_form.vue +5 -5
  219. package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +292 -292
  220. package/src/views/user/wf/wf_param/edit.vue +1 -1
  221. package/src/views/user/wf/wf_transfer_setting/edit.vue +1 -1
  222. package/src/views/user/wf/wf_transfer_setting/list.vue +321 -319
  223. package/src/views/user/wf/wf_work_calendar/components/calendar.vue +369 -367
  224. package/src/views/user/wf/wf_work_calendar/components/calendar2.vue +401 -399
  225. package/src/views/user/wf/wf_work_calendar/configDialog.vue +6 -6
  226. package/src/views/user/wf/wf_work_calendar/date.js +84 -83
  227. package/src/views/user/wf/wf_work_calendar/list.vue +6 -6
  228. package/src/views/user/workbench_menu/list.vue +555 -0
@@ -1,795 +1,795 @@
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
- </el-tab-pane>
16
- <el-tab-pane :label="$t1('我的流程')" name="second">
17
- <div class="tree-box fl">
18
- <div class="tit">
19
- <b>{{ $t1("待办类型") }}</b>
20
- </div>
21
- <el-tree
22
- :props="defaultProps"
23
- :load="loadNode"
24
- node-key="uuid"
25
- ref="tree"
26
- highlight-current
27
- lazy
28
- :expand-on-click-node="false"
29
- @node-click="handleNodeClick"
30
- class="tree-list"
31
- icon-class="el-icon-arrow-down"
32
- ></el-tree>
33
- </div>
34
- <label id="labBtn">
35
- <div class="icon">
36
- <i class="el-icon-more"></i>
37
- <i class="el-icon-more"></i>
38
- </div>
39
- </label>
40
- <div class="main-right fr" style="padding-left: 6px">
41
- <div class="grid-height">
42
- <vxe-grid
43
- ref="table-m1"
44
- v-bind="vxeOption"
45
- @resizable-change="$vxeTableUtil.onColumnWitchChange"
46
- @custom="$vxeTableUtil.customHandle"
47
- >
48
- <template #form>
49
- <div class="clearfix screen-btns">
50
- <div class="fl">
51
- <base-table-export
52
- :option="{ title: $t1('流程待办导出'), targetRef: 'table-m1' }"
53
- :parent-target="_self"
54
- />
55
- </div>
56
- <div class="fr">
57
- <vxe-button
58
- icon="el-icon-brush"
59
- class="button-sty"
60
- @click="resetEvent"
61
- type="text"
62
- status="primary"
63
- plain
64
- >{{ $t1("重置") }}
65
- </vxe-button>
66
- <vxe-button
67
- status="warning"
68
- icon="el-icon-search"
69
- class="button-sty"
70
- @click="searchEvent"
71
- >
72
- {{ $t1("搜索") }}
73
- </vxe-button>
74
- </div>
75
- </div>
76
- <vxe-form
77
- ref="form"
78
- class="screen-box"
79
- title-width="92px"
80
- title-align="right"
81
- :data="formData"
82
- @submit="searchEvent"
83
- @reset="searchEvent"
84
- >
85
- <vxe-form-item :title="$t1('待办类型') + ':'">
86
- <template v-slot>
87
- <el-input v-model="checkNodeData.label" size="small" disabled />
88
- </template>
89
- </vxe-form-item>
90
- <vxe-form-item :title="$t1('流程主题') + ':'" field="name">
91
- <template v-slot>
92
- <el-input v-model="formData.name" size="small" clearable />
93
- </template>
94
- </vxe-form-item>
95
- <vxe-form-item :title="$t1('单据类型') + ':'" field="objTypeName">
96
- <template v-slot>
97
- <el-input
98
- class="search-input"
99
- max="200"
100
- v-model="formData.objTypeName"
101
- @clear="
102
- formData.objTypeCode = null;
103
- $forceUpdate();
104
- "
105
- v-el-readonly
106
- clearable
107
- >
108
- <i
109
- slot="suffix"
110
- class="el-input__icon el-icon-search"
111
- @click="showWfObjConfigDialog = true"
112
- ></i>
113
- </el-input>
114
- </template>
115
- </vxe-form-item>
116
- <vxe-form-item :title="$t1('流程状态') + ':'" field="stat">
117
- <template v-slot>
118
- <el-select v-model="formData.stat" clearable>
119
- <el-option :value="1" :label="$t1('审核中')"></el-option>
120
- <el-option :value="2" :label="$t1('已完成')"></el-option>
121
- <el-option :value="3" :label="$t1('已驳回')"></el-option>
122
- </el-select>
123
- </template>
124
- </vxe-form-item>
125
- <vxe-form-item :title="$t1('启动人') + ':'" field="starterName">
126
- <template v-slot>
127
- <el-input v-model="formData.starterName" size="small" clearable />
128
- </template>
129
- </vxe-form-item>
130
- <vxe-form-item title="启动时间:">
131
- <template v-slot>
132
- <el-date-picker
133
- v-model="formData.startTime"
134
- type="datetime"
135
- placeholder=""
136
- size="small"
137
- clearable
138
- value-format="yyyy-MM-dd HH:mm:ss"
139
- :picker-options="$baseStartPickerOptions(formData.endTime)"
140
- ></el-date-picker>
141
- <span>-</span>
142
- <el-date-picker
143
- v-model="formData.endTime"
144
- type="datetime"
145
- placeholder=""
146
- size="small"
147
- clearable
148
- value-format="yyyy-MM-dd HH:mm:ss"
149
- default-time="23:59:59"
150
- :picker-options="$baseEndPickerOptions(formData.startTime)"
151
- ></el-date-picker>
152
- </template>
153
- </vxe-form-item>
154
- </vxe-form>
155
- </template>
156
- </vxe-grid>
157
- </div>
158
- </div>
159
- </el-tab-pane>
160
- <el-tab-pane :label="$t1('全部流程')" name="third" v-if="flag == 1">
161
- <div class="grid-height">
162
- <vxe-grid
163
- ref="table-m2"
164
- v-bind="vxeOption2"
165
- @resizable-change="$vxeTableUtil.onColumnWitchChange"
166
- @custom="$vxeTableUtil.customHandle"
167
- >
168
- <template #form>
169
- <div class="clearfix screen-btns">
170
- <div class="fl">
171
- <base-table-export
172
- :option="{ title: $t1('流程待办导出'), targetRef: 'table-m2' }"
173
- :parent-target="_self"
174
- />
175
- </div>
176
- <div class="fr">
177
- <vxe-button
178
- icon="el-icon-brush"
179
- class="button-sty"
180
- @click="resetEvent2"
181
- type="text"
182
- status="primary"
183
- plain
184
- >{{ $t1("重置") }}
185
- </vxe-button>
186
- <vxe-button
187
- status="warning"
188
- icon="el-icon-search"
189
- class="button-sty"
190
- @click="searchEvent2"
191
- >
192
- {{ $t1("搜索") }}
193
- </vxe-button>
194
- </div>
195
- </div>
196
- <vxe-form
197
- ref="form"
198
- class="screen-box"
199
- title-width="92px"
200
- title-align="right"
201
- :data="formData2"
202
- @submit="searchEvent2"
203
- @reset="searchEvent2"
204
- >
205
- <vxe-form-item :title="$t1('流程主题') + ':'" field="name">
206
- <template v-slot>
207
- <el-input v-model="formData2.name" size="small" clearable />
208
- </template>
209
- </vxe-form-item>
210
- <vxe-form-item :title="$t1('单据类型') + ':'" field="objTypeName">
211
- <template v-slot>
212
- <el-input
213
- class="search-input"
214
- max="200"
215
- v-model="formData2.objTypeName"
216
- @clear="
217
- formData2.objTypeCode = null;
218
- $forceUpdate();
219
- "
220
- v-el-readonly
221
- clearable
222
- >
223
- <i
224
- slot="suffix"
225
- class="el-input__icon el-icon-search"
226
- @click="showWfObjConfigDialog2 = true"
227
- ></i>
228
- </el-input>
229
- </template>
230
- </vxe-form-item>
231
- <vxe-form-item :title="$t1('流程状态') + ':'" field="stat">
232
- <template v-slot>
233
- <el-select v-model="formData2.stat" clearable>
234
- <el-option :value="1" :label="$t1('审核中')"></el-option>
235
- <el-option :value="2" :label="$t1('已完成')"></el-option>
236
- <el-option :value="3" :label="$t1('已驳回')"></el-option>
237
- </el-select>
238
- </template>
239
- </vxe-form-item>
240
- <vxe-form-item :title="$t1('当前任务用户') + ':'" field="candidateNames">
241
- <template v-slot>
242
- <el-input v-model="formData2.candidateNames" size="small" clearable />
243
- </template>
244
- </vxe-form-item>
245
- </vxe-form>
246
- </template>
247
- </vxe-grid>
248
- </div>
249
- </el-tab-pane>
250
- </el-tabs>
251
- <wfObjConfigDialog
252
- v-if="showWfObjConfigDialog"
253
- :visiable.sync="showWfObjConfigDialog"
254
- :type.sync="type"
255
- @confirm="confirmInsertWfObjConfig"
256
- :multi="false"
257
- ></wfObjConfigDialog>
258
- <wfObjConfigDialog
259
- v-if="showWfObjConfigDialog2"
260
- :visiable.sync="showWfObjConfigDialog2"
261
- :type="99"
262
- @confirm="confirmInsertWfObjConfig2"
263
- :multi="false"
264
- ></wfObjConfigDialog>
265
- </div>
266
- </template>
267
- <script>
268
- import { treeScollx } from "@base/utils/global.js";
269
- import wfObjConfigDialog from "../../../../views/user/wf/wf_obj_config/dialog.vue";
270
-
271
- export default {
272
- name: "wf_manage:list",
273
- components: { wfObjConfigDialog },
274
- created() {},
275
- async mounted() {
276
- treeScollx({ target: this, type: "default" });
277
- await this.initWfParam();
278
- this.initTableList();
279
- this.initRole();
280
- },
281
- data() {
282
- return {
283
- activeName: "second",
284
- // dataId: 0,
285
- // showEdit: false,
286
- vxeOption: {},
287
- formData: {},
288
- checkNode: {},
289
- defaultProps: {
290
- label: "label", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
291
- children: [],
292
- isLeaf: "leaf",
293
- },
294
- wfObjTypes: [],
295
- showWfObjConfigDialog: false,
296
- showWfObjConfigDialog2: false,
297
- flag: 0,
298
- vxeOption2: {},
299
- formData2: {},
300
-
301
- param: {},
302
- wfContent: null,
303
- showWfContent: false,
304
- };
305
- },
306
- computed: {
307
- type() {
308
- return this.checkNode && this.checkNode.data ? this.checkNode.data.type : "";
309
- },
310
- checkNodeData() {
311
- return this.checkNode && this.checkNode.data ? this.checkNode.data : {};
312
- },
313
- },
314
- methods: {
315
- searchEvent() {
316
- this.$refs["table-m1"].commitProxy("reload");
317
- },
318
- resetEvent() {
319
- this.formData = {};
320
- this.$refs["table-m1"].commitProxy("reload");
321
- },
322
-
323
- initTableList() {
324
- let that = this;
325
- let paramColumns = this.wfParamDTOs.map((item) => {
326
- let flag = item.paramName == "单号";
327
- return {
328
- title: this.$t1(item.paramName),
329
- field: item.paramKey,
330
- width: 150,
331
- fixed: flag ? "left" : "",
332
- slots: flag
333
- ? {
334
- default: ({ row }) => {
335
- return [
336
- <div>
337
- <a
338
- href="javascript:void(0);"
339
- class="a-link"
340
- onclick={() => {
341
- this.openEditDialog(row);
342
- }}
343
- style="font-weight:bold; text-decoration: underline"
344
- >
345
- <el-tooltip
346
- class="item"
347
- effect="dark"
348
- content={this.$t1("查看")}
349
- placement="top-start"
350
- >
351
- <span>{row.param1}</span>
352
- </el-tooltip>
353
- </a>
354
- </div>,
355
- ];
356
- },
357
- }
358
- : "",
359
- };
360
- });
361
-
362
- // let statuses = {0: '未启动', 1: '审核中', 2: '已完成', 3: '已驳回', 4: '中断'};
363
- var statuses = {
364
- 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
365
- 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
366
- 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
367
- 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
368
- 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
369
- };
370
- let tableOption = {
371
- vue: this,
372
- tableRef: "table-m1",
373
- tableName: "user-wf-wf_manage-list-m2",
374
- path: USER_PREFIX + "/wf_info/listPage",
375
- param: () => {
376
- return {
377
- type: this.type,
378
- ...this.formData,
379
- };
380
- },
381
- /*config: {
382
- proxyConfig: {
383
- autoLoad: false
384
- }
385
- },*/
386
- columns: [
387
- { type: "checkbox", width: 48, resizable: false, fixed: "left" },
388
- {
389
- title: this.$t1("流程主题"),
390
- field: "name",
391
- width: 150,
392
- fixed: "left",
393
- },
394
- {
395
- title: this.$t1("单据类型"),
396
- field: "objTypeName",
397
- width: 150,
398
- },
399
- {
400
- title: this.$t1("启动人"),
401
- field: "starterName",
402
- width: 150,
403
- },
404
- {
405
- title: this.$t1("当前任务"),
406
- field: "taskName",
407
- width: 150,
408
- },
409
- {
410
- title: this.$t1("当前任务用户"),
411
- field: "candidateNames",
412
- width: 150,
413
- },
414
- {
415
- title: this.$t1("流程状态"),
416
- field: "stat",
417
- width: 150,
418
- slots: {
419
- default: ({ row }) => {
420
- let html = statuses[row.stat] || "";
421
- return html;
422
- },
423
- },
424
- },
425
- {
426
- title: this.$t1("启动时间"),
427
- field: "createDate",
428
- width: 150,
429
- },
430
- ...paramColumns,
431
- {
432
- width: 47,
433
- fixed: "right",
434
- title: "",
435
- sortable: false,
436
- slots: {
437
- default: ({ row }) => {
438
- return [
439
- <a
440
- href="javascript:void(0);"
441
- class="a-link"
442
- onclick={() => {
443
- // this.$refs["wfIframeDialog"].wfEdit(row);
444
- this.openEditDialog(row);
445
- }}
446
- >
447
- <el-tooltip
448
- enterable={false}
449
- effect="dark"
450
- content={this.$t1("查看")}
451
- placement="top"
452
- popper-class="tooltip-skin"
453
- >
454
- <i class="el-icon-edit" />
455
- </el-tooltip>
456
- </a>,
457
- ];
458
- },
459
- },
460
- },
461
- ],
462
- };
463
- this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
464
- this.vxeOption = opts;
465
- });
466
- },
467
- openEditDialog(row) {
468
- /*let a = 1;
469
- let url = row.url + '.vue';
470
- let id = row.objId;
471
- this.dataId = !id || typeof id == 'object' ? 0 : id;
472
- this.content = require('@/views' + url).default;*/
473
- // this.activeName = 'first';
474
- // this.$openEditView('showEdit');
475
-
476
- let id = row.objId;
477
- let wfDataId = !id || typeof id == "object" ? 0 : Number(id);
478
- if (row.url == "form") {
479
- this.param = {
480
- formCode: row.objTypeCode.substr(9),
481
- dataId: wfDataId,
482
- };
483
- let url = "/user/form/vform/render.vue";
484
- this.wfContent = require("@base/views" + url).default;
485
- } else {
486
- this.param = {
487
- _dataId: wfDataId,
488
- };
489
- let url = row.url + ".vue";
490
- this.wfContent = require("@/views" + url).default;
491
- }
492
- this.activeName = "first";
493
- this.$openEditView("showWfContent");
494
- },
495
- guid() {
496
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
497
- var r = (Math.random() * 16) | 0,
498
- v = c == "x" ? r : (r & 0x3) | 0x8;
499
- return v.toString(16);
500
- });
501
- },
502
- clearNodeClick() {
503
- /* this.formData.saleOrgId = '';
504
- this.formData.saleOrgName = '';
505
- this.$refs.tree.setCurrentKey();
506
- this.searchEvent(); */
507
- },
508
- handleNodeClick(data, node, v) {
509
- this.checkNode = node;
510
- this.formData.objTypeName = null;
511
- this.formData.objTypeCode = null;
512
- this.$forceUpdate();
513
- this.searchEvent();
514
- },
515
- // 异步树叶子节点懒加载逻辑
516
- loadNode(node, resolve) {
517
- if (!node || !node.data || node.data.type === undefined) {
518
- this.initNodeData(node, resolve);
519
- return;
520
- }
521
- this.$http({
522
- url: USER_PREFIX + "/wf_obj_config/getWfGroups",
523
- method: "post",
524
- data: {
525
- type: node.data.type,
526
- },
527
- success: (res) => {
528
- let rows = res.objx || [];
529
- rows.forEach((item) => {
530
- item.leaf = true;
531
- item.label = item.objTypeName + "(" + item.num + ")";
532
- item.type = node.data.type;
533
- item.uuid = this.guid();
534
- });
535
- resolve(rows);
536
- },
537
- });
538
- },
539
- initNodeData(node, resolve) {
540
- let data = [
541
- {
542
- uuid: -1,
543
- label: this.$t1("待审批的"),
544
- type: 0,
545
- leaf: true,
546
- },
547
- {
548
- uuid: -2,
549
- label: this.$t1("我发起的"),
550
- type: 1,
551
- leaf: true,
552
- },
553
- {
554
- uuid: -3,
555
- label: this.$t1("已审批的"),
556
- type: 2,
557
- leaf: true,
558
- },
559
- {
560
- uuid: -4,
561
- label: this.$t1("已完成的"),
562
- type: "3",
563
- leaf: true,
564
- },
565
- {
566
- uuid: -5,
567
- label: this.$t1("我转办的"),
568
- type: "4",
569
- leaf: true,
570
- },
571
- ];
572
- resolve(data);
573
- this.$nextTick(() => {
574
- if (node.childNodes.length) {
575
- let firstNode = node.childNodes[0];
576
- this.$refs.tree.setCurrentKey(firstNode.data.uuid);
577
- this.checkNode = firstNode;
578
- this.$forceUpdate();
579
- // this.handleNodeClick(firstNode.data, firstNode);
580
- }
581
- });
582
- /*this.$nextTick(() => {
583
- if (node.childNodes.length) {
584
- let nodedata = node.childNodes[0];
585
- nodedata.expanded = true;
586
- nodedata.loadData(arr => {
587
- if (arr.length) {
588
- setTimeout(() => {
589
- this.$refs.tree.setCurrentKey(arr[0].uuid);
590
- let node = this.$refs.tree.getNode(arr[0]);
591
- this.handleNodeClick(arr[0], node);
592
- }, 50);
593
- }
594
- });
595
- }
596
- });*/
597
- },
598
- confirmInsertWfObjConfig(rows) {
599
- if (rows.length) {
600
- let row = rows[0];
601
- this.$set(this.formData, "objTypeName", row.objTypeName);
602
- this.$set(this.formData, "objTypeCode", row.objTypeCode);
603
- }
604
- },
605
- async initWfParam() {
606
- return this.$http({
607
- url: USER_PREFIX + "/wf_param/list",
608
- method: `post`,
609
- data: {},
610
- success: (res) => {
611
- this.wfParamDTOs = res.objx || [];
612
- },
613
- });
614
- },
615
- //m2
616
- initRole() {
617
- this.$http({
618
- url: USER_PREFIX + "/user/currentUser",
619
- method: "post",
620
- success: (res) => {
621
- let userInfo = res.objx;
622
- this.getIsAdmin(userInfo);
623
- },
624
- });
625
- },
626
- getIsAdmin(userInfo) {
627
- this.$http({
628
- url: USER_PREFIX + "/userb/getUserRole",
629
- method: `post`,
630
- data: { id: userInfo.id },
631
- success: (res2) => {
632
- let rows = res2.objx || [];
633
- let codes = rows.map((row) => row.roleCode);
634
- if (codes.includes("superadmin") || codes.includes("wfadmin")) {
635
- this.flag = 1;
636
- setTimeout(() => {
637
- this.initTableList2();
638
- }, 200);
639
- }
640
- },
641
- });
642
- },
643
- searchEvent2() {
644
- this.$refs["table-m2"].commitProxy("reload");
645
- },
646
- resetEvent2() {
647
- this.formData2 = {};
648
- this.$refs["table-m2"].commitProxy("reload");
649
- },
650
- initTableList2() {
651
- let that = this;
652
- let paramColumns = this.wfParamDTOs.map((item) => {
653
- let flag = item.paramName == "单号";
654
- return {
655
- title: this.$t1(item.paramName),
656
- field: item.paramKey,
657
- width: 150,
658
- fixed: flag ? "left" : "",
659
- slots: flag
660
- ? {
661
- default: ({ row }) => {
662
- return [
663
- <div>
664
- <a
665
- href="javascript:void(0);"
666
- class="a-link"
667
- onclick={() => {
668
- this.openEditDialog(row);
669
- }}
670
- style="font-weight:bold; text-decoration: underline"
671
- >
672
- <el-tooltip
673
- class="item"
674
- effect="dark"
675
- content={this.$t1("查看")}
676
- placement="top-start"
677
- >
678
- <span>{row.param1}</span>
679
- </el-tooltip>
680
- </a>
681
- </div>,
682
- ];
683
- },
684
- }
685
- : "",
686
- };
687
- });
688
-
689
- var statuses = {
690
- 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
691
- 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
692
- 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
693
- 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
694
- 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
695
- };
696
- let tableOption = {
697
- vue: this,
698
- tableRef: "table-m2",
699
- tableName: "user-wf-wf_manage-list-m3",
700
- path: USER_PREFIX + "/wf_info/listPageAll",
701
- param: () => {
702
- return {
703
- ...this.formData2,
704
- };
705
- },
706
- columns: [
707
- { type: "checkbox", width: 48, resizable: false, fixed: "left" },
708
- {
709
- title: this.$t1("流程主题"),
710
- field: "name",
711
- width: 150,
712
- fixed: "left",
713
- },
714
- {
715
- title: this.$t1("单据类型"),
716
- field: "objTypeName",
717
- width: 150,
718
- },
719
- {
720
- title: this.$t1("启动人"),
721
- field: "starterName",
722
- width: 150,
723
- },
724
- {
725
- title: this.$t1("当前任务"),
726
- field: "taskName",
727
- width: 150,
728
- },
729
- {
730
- title: this.$t1("当前任务用户"),
731
- field: "candidateNames",
732
- width: 150,
733
- },
734
- {
735
- title: this.$t1("流程状态"),
736
- field: "stat",
737
- width: 150,
738
- slots: {
739
- default: ({ row }) => {
740
- let html = statuses[row.stat] || "";
741
- return html;
742
- },
743
- },
744
- },
745
- {
746
- title: this.$t1("启动时间"),
747
- field: "createDate",
748
- width: 150,
749
- },
750
- ...paramColumns,
751
- {
752
- width: 47,
753
- fixed: "right",
754
- title: "",
755
- sortable: false,
756
- slots: {
757
- default: ({ row }) => {
758
- return [
759
- <a
760
- href="javascript:void(0);"
761
- class="a-link"
762
- onclick={() => {
763
- this.openEditDialog(row);
764
- }}
765
- >
766
- <el-tooltip
767
- enterable={false}
768
- effect="dark"
769
- content={this.$t1("查看")}
770
- placement="top"
771
- popper-class="tooltip-skin"
772
- >
773
- <i class="el-icon-edit" />
774
- </el-tooltip>
775
- </a>,
776
- ];
777
- },
778
- },
779
- },
780
- ],
781
- };
782
- this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
783
- this.vxeOption2 = opts;
784
- });
785
- },
786
- confirmInsertWfObjConfig2(rows) {
787
- if (rows.length) {
788
- let row = rows[0];
789
- this.$set(this.formData2, "objTypeName", row.objTypeName);
790
- this.$set(this.formData2, "objTypeCode", row.objTypeCode);
791
- }
792
- },
793
- },
794
- };
795
- </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
+ </el-tab-pane>
16
+ <el-tab-pane :label="$t1('我的流程')" name="second" class="flex">
17
+ <div class="tree-box fl">
18
+ <div class="tit">
19
+ <b>{{ $t1("待办类型") }}</b>
20
+ </div>
21
+ <el-tree
22
+ :props="defaultProps"
23
+ :load="loadNode"
24
+ node-key="uuid"
25
+ ref="tree"
26
+ highlight-current
27
+ lazy
28
+ :expand-on-click-node="false"
29
+ @node-click="handleNodeClick"
30
+ class="tree-list"
31
+ icon-class="el-icon-arrow-down"
32
+ ></el-tree>
33
+ </div>
34
+ <label id="labBtn">
35
+ <div class="icon">
36
+ <i class="el-icon-more"></i>
37
+ <i class="el-icon-more"></i>
38
+ </div>
39
+ </label>
40
+ <div class="main-right fr" style="padding-left: 6px">
41
+ <div class="grid-height">
42
+ <vxe-grid
43
+ ref="table-m1"
44
+ v-bind="vxeOption"
45
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
46
+ @custom="$vxeTableUtil.customHandle"
47
+ >
48
+ <template #form>
49
+ <div class="clearfix screen-btns">
50
+ <div class="fl">
51
+ <base-table-export
52
+ :option="{ title: $t1('流程待办导出'), targetRef: 'table-m1' }"
53
+ :parent-target="_self"
54
+ />
55
+ </div>
56
+ <div class="fr">
57
+ <vxe-button
58
+ icon="el-icon-brush"
59
+ class="button-sty"
60
+ @click="resetEvent"
61
+ type="text"
62
+ status="primary"
63
+ plain
64
+ >{{ $t1("重置") }}
65
+ </vxe-button>
66
+ <vxe-button
67
+ status="warning"
68
+ icon="el-icon-search"
69
+ class="button-sty"
70
+ @click="searchEvent"
71
+ >
72
+ {{ $t1("搜索") }}
73
+ </vxe-button>
74
+ </div>
75
+ </div>
76
+ <vxe-form
77
+ ref="form"
78
+ class="screen-box"
79
+ title-width="92px"
80
+ title-align="right"
81
+ :data="formData"
82
+ @submit="searchEvent"
83
+ @reset="searchEvent"
84
+ >
85
+ <vxe-form-item :title="$t1('待办类型') + ':'">
86
+ <template v-slot>
87
+ <el-input v-model="checkNodeData.label" size="small" disabled />
88
+ </template>
89
+ </vxe-form-item>
90
+ <vxe-form-item :title="$t1('流程主题') + ':'" field="name">
91
+ <template v-slot>
92
+ <el-input v-model="formData.name" size="small" clearable />
93
+ </template>
94
+ </vxe-form-item>
95
+ <vxe-form-item :title="$t1('单据类型') + ':'" field="objTypeName">
96
+ <template v-slot>
97
+ <el-input
98
+ class="search-input"
99
+ max="200"
100
+ v-model="formData.objTypeName"
101
+ @clear="
102
+ formData.objTypeCode = null;
103
+ $forceUpdate();
104
+ "
105
+ v-el-readonly
106
+ clearable
107
+ >
108
+ <i
109
+ slot="suffix"
110
+ class="el-input__icon el-icon-search"
111
+ @click="showWfObjConfigDialog = true"
112
+ ></i>
113
+ </el-input>
114
+ </template>
115
+ </vxe-form-item>
116
+ <vxe-form-item :title="$t1('流程状态') + ':'" field="stat">
117
+ <template v-slot>
118
+ <el-select v-model="formData.stat" clearable>
119
+ <el-option :value="1" :label="$t1('审核中')"></el-option>
120
+ <el-option :value="2" :label="$t1('已完成')"></el-option>
121
+ <el-option :value="3" :label="$t1('已驳回')"></el-option>
122
+ </el-select>
123
+ </template>
124
+ </vxe-form-item>
125
+ <vxe-form-item :title="$t1('启动人') + ':'" field="starterName">
126
+ <template v-slot>
127
+ <el-input v-model="formData.starterName" size="small" clearable />
128
+ </template>
129
+ </vxe-form-item>
130
+ <vxe-form-item title="启动时间:">
131
+ <template v-slot>
132
+ <el-date-picker
133
+ v-model="formData.startTime"
134
+ type="datetime"
135
+ placeholder=""
136
+ size="small"
137
+ clearable
138
+ value-format="yyyy-MM-dd HH:mm:ss"
139
+ :picker-options="$baseStartPickerOptions(formData.endTime)"
140
+ ></el-date-picker>
141
+ <span>-</span>
142
+ <el-date-picker
143
+ v-model="formData.endTime"
144
+ type="datetime"
145
+ placeholder=""
146
+ size="small"
147
+ clearable
148
+ value-format="yyyy-MM-dd HH:mm:ss"
149
+ default-time="23:59:59"
150
+ :picker-options="$baseEndPickerOptions(formData.startTime)"
151
+ ></el-date-picker>
152
+ </template>
153
+ </vxe-form-item>
154
+ </vxe-form>
155
+ </template>
156
+ </vxe-grid>
157
+ </div>
158
+ </div>
159
+ </el-tab-pane>
160
+ <el-tab-pane :label="$t1('全部流程')" name="third" v-if="flag === 1">
161
+ <div class="grid-height">
162
+ <vxe-grid
163
+ ref="table-m2"
164
+ v-bind="vxeOption2"
165
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
166
+ @custom="$vxeTableUtil.customHandle"
167
+ >
168
+ <template #form>
169
+ <div class="clearfix screen-btns">
170
+ <div class="fl">
171
+ <base-table-export
172
+ :option="{ title: $t1('流程待办导出'), targetRef: 'table-m2' }"
173
+ :parent-target="_self"
174
+ />
175
+ </div>
176
+ <div class="fr">
177
+ <vxe-button
178
+ icon="el-icon-brush"
179
+ class="button-sty"
180
+ @click="resetEvent2"
181
+ type="text"
182
+ status="primary"
183
+ plain
184
+ >{{ $t1("重置") }}
185
+ </vxe-button>
186
+ <vxe-button
187
+ status="warning"
188
+ icon="el-icon-search"
189
+ class="button-sty"
190
+ @click="searchEvent2"
191
+ >
192
+ {{ $t1("搜索") }}
193
+ </vxe-button>
194
+ </div>
195
+ </div>
196
+ <vxe-form
197
+ ref="form"
198
+ class="screen-box"
199
+ title-width="92px"
200
+ title-align="right"
201
+ :data="formData2"
202
+ @submit="searchEvent2"
203
+ @reset="searchEvent2"
204
+ >
205
+ <vxe-form-item :title="$t1('流程主题') + ':'" field="name">
206
+ <template v-slot>
207
+ <el-input v-model="formData2.name" size="small" clearable />
208
+ </template>
209
+ </vxe-form-item>
210
+ <vxe-form-item :title="$t1('单据类型') + ':'" field="objTypeName">
211
+ <template v-slot>
212
+ <el-input
213
+ class="search-input"
214
+ max="200"
215
+ v-model="formData2.objTypeName"
216
+ @clear="
217
+ formData2.objTypeCode = null;
218
+ $forceUpdate();
219
+ "
220
+ v-el-readonly
221
+ clearable
222
+ >
223
+ <i
224
+ slot="suffix"
225
+ class="el-input__icon el-icon-search"
226
+ @click="showWfObjConfigDialog2 = true"
227
+ ></i>
228
+ </el-input>
229
+ </template>
230
+ </vxe-form-item>
231
+ <vxe-form-item :title="$t1('流程状态') + ':'" field="stat">
232
+ <template v-slot>
233
+ <el-select v-model="formData2.stat" clearable>
234
+ <el-option :value="1" :label="$t1('审核中')"></el-option>
235
+ <el-option :value="2" :label="$t1('已完成')"></el-option>
236
+ <el-option :value="3" :label="$t1('已驳回')"></el-option>
237
+ </el-select>
238
+ </template>
239
+ </vxe-form-item>
240
+ <vxe-form-item :title="$t1('当前任务用户') + ':'" field="candidateNames">
241
+ <template v-slot>
242
+ <el-input v-model="formData2.candidateNames" size="small" clearable />
243
+ </template>
244
+ </vxe-form-item>
245
+ </vxe-form>
246
+ </template>
247
+ </vxe-grid>
248
+ </div>
249
+ </el-tab-pane>
250
+ </el-tabs>
251
+ <wfObjConfigDialog
252
+ v-if="showWfObjConfigDialog"
253
+ :visiable.sync="showWfObjConfigDialog"
254
+ :type.sync="type"
255
+ @confirm="confirmInsertWfObjConfig"
256
+ :multi="false"
257
+ ></wfObjConfigDialog>
258
+ <wfObjConfigDialog
259
+ v-if="showWfObjConfigDialog2"
260
+ :visiable.sync="showWfObjConfigDialog2"
261
+ :type="99"
262
+ @confirm="confirmInsertWfObjConfig2"
263
+ :multi="false"
264
+ ></wfObjConfigDialog>
265
+ </div>
266
+ </template>
267
+ <script>
268
+ import { treeScollx } from "@base/utils/global.js";
269
+ import wfObjConfigDialog from "../../../../views/user/wf/wf_obj_config/dialog.vue";
270
+
271
+ export default {
272
+ name: "wf_manage:list",
273
+ components: { wfObjConfigDialog },
274
+ created() {},
275
+ async mounted() {
276
+ treeScollx({ target: this, type: "default" });
277
+ await this.initWfParam();
278
+ this.initTableList();
279
+ this.initRole();
280
+ },
281
+ data() {
282
+ return {
283
+ activeName: "second",
284
+ // dataId: 0,
285
+ // showEdit: false,
286
+ vxeOption: {},
287
+ formData: {},
288
+ checkNode: {},
289
+ defaultProps: {
290
+ label: "label", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
291
+ children: [],
292
+ isLeaf: "leaf",
293
+ },
294
+ wfObjTypes: [],
295
+ showWfObjConfigDialog: false,
296
+ showWfObjConfigDialog2: false,
297
+ flag: 0,
298
+ vxeOption2: {},
299
+ formData2: {},
300
+
301
+ param: {},
302
+ wfContent: null,
303
+ showWfContent: false,
304
+ };
305
+ },
306
+ computed: {
307
+ type() {
308
+ return this.checkNode && this.checkNode.data ? this.checkNode.data.type : "";
309
+ },
310
+ checkNodeData() {
311
+ return this.checkNode && this.checkNode.data ? this.checkNode.data : {};
312
+ },
313
+ },
314
+ methods: {
315
+ searchEvent() {
316
+ this.$refs["table-m1"].commitProxy("reload");
317
+ },
318
+ resetEvent() {
319
+ this.formData = {};
320
+ this.$refs["table-m1"].commitProxy("reload");
321
+ },
322
+
323
+ initTableList() {
324
+ let that = this;
325
+ let paramColumns = this.wfParamDTOs.map((item) => {
326
+ let flag = item.paramName === "单号";
327
+ return {
328
+ title: this.$t1(item.paramName),
329
+ field: item.paramKey,
330
+ width: 150,
331
+ fixed: flag ? "left" : "",
332
+ slots: flag
333
+ ? {
334
+ default: ({ row }) => {
335
+ return [
336
+ <div>
337
+ <a
338
+ href="javascript:void(0);"
339
+ class="a-link"
340
+ onclick={() => {
341
+ this.openEditDialog(row);
342
+ }}
343
+ style="font-weight:bold; text-decoration: underline"
344
+ >
345
+ <el-tooltip
346
+ class="item"
347
+ effect="dark"
348
+ content={this.$t1("查看")}
349
+ placement="top-start"
350
+ >
351
+ <span>{row.param1}</span>
352
+ </el-tooltip>
353
+ </a>
354
+ </div>,
355
+ ];
356
+ },
357
+ }
358
+ : "",
359
+ };
360
+ });
361
+
362
+ // let statuses = {0: '未启动', 1: '审核中', 2: '已完成', 3: '已驳回', 4: '中断'};
363
+ let statuses = {
364
+ 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
365
+ 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
366
+ 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
367
+ 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
368
+ 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
369
+ };
370
+ let tableOption = {
371
+ vue: this,
372
+ tableRef: "table-m1",
373
+ tableName: "user-wf-wf_manage-list-m2",
374
+ path: USER_PREFIX + "/wf_info/listPage",
375
+ param: () => {
376
+ return {
377
+ type: this.type,
378
+ ...this.formData,
379
+ };
380
+ },
381
+ /*config: {
382
+ proxyConfig: {
383
+ autoLoad: false
384
+ }
385
+ },*/
386
+ columns: [
387
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
388
+ {
389
+ title: this.$t1("流程主题"),
390
+ field: "name",
391
+ width: 150,
392
+ fixed: "left",
393
+ },
394
+ {
395
+ title: this.$t1("单据类型"),
396
+ field: "objTypeName",
397
+ width: 150,
398
+ },
399
+ {
400
+ title: this.$t1("启动人"),
401
+ field: "starterName",
402
+ width: 150,
403
+ },
404
+ {
405
+ title: this.$t1("当前任务"),
406
+ field: "nodeName",
407
+ width: 150,
408
+ },
409
+ {
410
+ title: this.$t1("当前任务用户"),
411
+ field: "candidateNames",
412
+ width: 150,
413
+ },
414
+ {
415
+ title: this.$t1("流程状态"),
416
+ field: "stat",
417
+ width: 150,
418
+ slots: {
419
+ default: ({ row }) => {
420
+ let html = statuses[row.stat] || "";
421
+ return html;
422
+ },
423
+ },
424
+ },
425
+ {
426
+ title: this.$t1("启动时间"),
427
+ field: "createDate",
428
+ width: 150,
429
+ },
430
+ ...paramColumns,
431
+ {
432
+ width: 47,
433
+ fixed: "right",
434
+ title: "",
435
+ sortable: false,
436
+ slots: {
437
+ default: ({ row }) => {
438
+ return [
439
+ <a
440
+ href="javascript:void(0);"
441
+ class="a-link"
442
+ onclick={() => {
443
+ // this.$refs["wfIframeDialog"].wfEdit(row);
444
+ this.openEditDialog(row);
445
+ }}
446
+ >
447
+ <el-tooltip
448
+ enterable={false}
449
+ effect="dark"
450
+ content={this.$t1("查看")}
451
+ placement="top"
452
+ popper-class="tooltip-skin"
453
+ >
454
+ <i class="el-icon-view" />
455
+ </el-tooltip>
456
+ </a>,
457
+ ];
458
+ },
459
+ },
460
+ },
461
+ ],
462
+ };
463
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
464
+ this.vxeOption = opts;
465
+ });
466
+ },
467
+ openEditDialog(row) {
468
+ /*let a = 1;
469
+ let url = row.url + '.vue';
470
+ let id = row.objId;
471
+ this.dataId = !id || typeof id === 'object' ? 0 : id;
472
+ this.content = require('@/views' + url).default;*/
473
+ // this.activeName = 'first';
474
+ // this.$openEditView('showEdit');
475
+
476
+ let id = row.objId;
477
+ let wfDataId = !id || typeof id === "object" ? 0 : Number(id);
478
+ if (row.url === "form") {
479
+ this.param = {
480
+ formCode: row.objTypeCode.substr(9),
481
+ dataId: wfDataId,
482
+ };
483
+ let url = "/user/form/vform/render.vue";
484
+ this.wfContent = require("@base/views" + url).default;
485
+ } else {
486
+ this.param = {
487
+ _dataId: wfDataId,
488
+ };
489
+ let url = row.url + ".vue";
490
+ this.wfContent = require("@/views" + url).default;
491
+ }
492
+ this.activeName = "first";
493
+ this.$openEditView("showWfContent");
494
+ },
495
+ guid() {
496
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
497
+ let r = (Math.random() * 16) | 0,
498
+ v = c === "x" ? r : (r & 0x3) | 0x8;
499
+ return v.toString(16);
500
+ });
501
+ },
502
+ clearNodeClick() {
503
+ /* this.formData.saleOrgId = '';
504
+ this.formData.saleOrgName = '';
505
+ this.$refs.tree.setCurrentKey();
506
+ this.searchEvent(); */
507
+ },
508
+ handleNodeClick(data, node, v) {
509
+ this.checkNode = node;
510
+ this.formData.objTypeName = null;
511
+ this.formData.objTypeCode = null;
512
+ this.$forceUpdate();
513
+ this.searchEvent();
514
+ },
515
+ // 异步树叶子节点懒加载逻辑
516
+ loadNode(node, resolve) {
517
+ if (!node || !node.data || node.data.type === undefined) {
518
+ this.initNodeData(node, resolve);
519
+ return;
520
+ }
521
+ this.$http({
522
+ url: USER_PREFIX + "/wf_obj_config/getWfGroups",
523
+ method: "post",
524
+ data: {
525
+ type: node.data.type,
526
+ },
527
+ success: (res) => {
528
+ let rows = res.objx || [];
529
+ rows.forEach((item) => {
530
+ item.leaf = true;
531
+ item.label = item.objTypeName + "(" + item.num + ")";
532
+ item.type = node.data.type;
533
+ item.uuid = this.guid();
534
+ });
535
+ resolve(rows);
536
+ },
537
+ });
538
+ },
539
+ initNodeData(node, resolve) {
540
+ let data = [
541
+ {
542
+ uuid: -1,
543
+ label: this.$t1("待审批的"),
544
+ type: 0,
545
+ leaf: true,
546
+ },
547
+ {
548
+ uuid: -2,
549
+ label: this.$t1("我发起的"),
550
+ type: 1,
551
+ leaf: true,
552
+ },
553
+ {
554
+ uuid: -3,
555
+ label: this.$t1("已审批的"),
556
+ type: 2,
557
+ leaf: true,
558
+ },
559
+ {
560
+ uuid: -4,
561
+ label: this.$t1("已完成的"),
562
+ type: "3",
563
+ leaf: true,
564
+ },
565
+ {
566
+ uuid: -5,
567
+ label: this.$t1("我转办的"),
568
+ type: "4",
569
+ leaf: true,
570
+ },
571
+ ];
572
+ resolve(data);
573
+ this.$nextTick(() => {
574
+ if (node.childNodes.length) {
575
+ let firstNode = node.childNodes[0];
576
+ this.$refs.tree.setCurrentKey(firstNode.data.uuid);
577
+ this.checkNode = firstNode;
578
+ this.$forceUpdate();
579
+ // this.handleNodeClick(firstNode.data, firstNode);
580
+ }
581
+ });
582
+ /*this.$nextTick(() => {
583
+ if (node.childNodes.length) {
584
+ let nodedata = node.childNodes[0];
585
+ nodedata.expanded = true;
586
+ nodedata.loadData(arr => {
587
+ if (arr.length) {
588
+ setTimeout(() => {
589
+ this.$refs.tree.setCurrentKey(arr[0].uuid);
590
+ let node = this.$refs.tree.getNode(arr[0]);
591
+ this.handleNodeClick(arr[0], node);
592
+ }, 50);
593
+ }
594
+ });
595
+ }
596
+ });*/
597
+ },
598
+ confirmInsertWfObjConfig(rows) {
599
+ if (rows.length) {
600
+ let row = rows[0];
601
+ this.$set(this.formData, "objTypeName", row.objTypeName);
602
+ this.$set(this.formData, "objTypeCode", row.objTypeCode);
603
+ }
604
+ },
605
+ async initWfParam() {
606
+ return this.$http({
607
+ url: USER_PREFIX + "/wf_param/list",
608
+ method: `post`,
609
+ data: {},
610
+ success: (res) => {
611
+ this.wfParamDTOs = res.objx || [];
612
+ },
613
+ });
614
+ },
615
+ //m2
616
+ initRole() {
617
+ this.$http({
618
+ url: USER_PREFIX + "/user/currentUser",
619
+ method: "post",
620
+ success: (res) => {
621
+ let userInfo = res.objx;
622
+ this.getIsAdmin(userInfo);
623
+ },
624
+ });
625
+ },
626
+ getIsAdmin(userInfo) {
627
+ this.$http({
628
+ url: USER_PREFIX + "/userb/getUserRole",
629
+ method: `post`,
630
+ data: { id: userInfo.id },
631
+ success: (res2) => {
632
+ let rows = res2.objx || [];
633
+ let codes = rows.map((row) => row.roleCode);
634
+ if (codes.includes("superadmin") || codes.includes("wfadmin")) {
635
+ this.flag = 1;
636
+ setTimeout(() => {
637
+ this.initTableList2();
638
+ }, 200);
639
+ }
640
+ },
641
+ });
642
+ },
643
+ searchEvent2() {
644
+ this.$refs["table-m2"].commitProxy("reload");
645
+ },
646
+ resetEvent2() {
647
+ this.formData2 = {};
648
+ this.$refs["table-m2"].commitProxy("reload");
649
+ },
650
+ initTableList2() {
651
+ let that = this;
652
+ let paramColumns = this.wfParamDTOs.map((item) => {
653
+ let flag = item.paramName === "单号";
654
+ return {
655
+ title: this.$t1(item.paramName),
656
+ field: item.paramKey,
657
+ width: 150,
658
+ fixed: flag ? "left" : "",
659
+ slots: flag
660
+ ? {
661
+ default: ({ row }) => {
662
+ return [
663
+ <div>
664
+ <a
665
+ href="javascript:void(0);"
666
+ class="a-link"
667
+ onclick={() => {
668
+ this.openEditDialog(row);
669
+ }}
670
+ style="font-weight:bold; text-decoration: underline"
671
+ >
672
+ <el-tooltip
673
+ class="item"
674
+ effect="dark"
675
+ content={this.$t1("查看")}
676
+ placement="top-start"
677
+ >
678
+ <span>{row.param1}</span>
679
+ </el-tooltip>
680
+ </a>
681
+ </div>,
682
+ ];
683
+ },
684
+ }
685
+ : "",
686
+ };
687
+ });
688
+
689
+ let statuses = {
690
+ 0: [<el-tag type="warning">{this.$t1("未启动")}</el-tag>],
691
+ 1: [<el-tag>{this.$t1("审核中")}</el-tag>],
692
+ 2: [<el-tag type="success">{this.$t1("已完成")}</el-tag>],
693
+ 3: [<el-tag type="danger">{this.$t1("已驳回")}</el-tag>],
694
+ 4: [<el-tag type="danger">{this.$t1("中断")}</el-tag>],
695
+ };
696
+ let tableOption = {
697
+ vue: this,
698
+ tableRef: "table-m2",
699
+ tableName: "user-wf-wf_manage-list-m3",
700
+ path: USER_PREFIX + "/wf_info/listPageAll",
701
+ param: () => {
702
+ return {
703
+ ...this.formData2,
704
+ };
705
+ },
706
+ columns: [
707
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
708
+ {
709
+ title: this.$t1("流程主题"),
710
+ field: "name",
711
+ width: 150,
712
+ fixed: "left",
713
+ },
714
+ {
715
+ title: this.$t1("单据类型"),
716
+ field: "objTypeName",
717
+ width: 150,
718
+ },
719
+ {
720
+ title: this.$t1("启动人"),
721
+ field: "starterName",
722
+ width: 150,
723
+ },
724
+ {
725
+ title: this.$t1("当前任务"),
726
+ field: "nodeName",
727
+ width: 150,
728
+ },
729
+ {
730
+ title: this.$t1("当前任务用户"),
731
+ field: "candidateNames",
732
+ width: 150,
733
+ },
734
+ {
735
+ title: this.$t1("流程状态"),
736
+ field: "stat",
737
+ width: 150,
738
+ slots: {
739
+ default: ({ row }) => {
740
+ let html = statuses[row.stat] || "";
741
+ return html;
742
+ },
743
+ },
744
+ },
745
+ {
746
+ title: this.$t1("启动时间"),
747
+ field: "createDate",
748
+ width: 150,
749
+ },
750
+ ...paramColumns,
751
+ {
752
+ width: 47,
753
+ fixed: "right",
754
+ title: "",
755
+ sortable: false,
756
+ slots: {
757
+ default: ({ row }) => {
758
+ return [
759
+ <a
760
+ href="javascript:void(0);"
761
+ class="a-link"
762
+ onclick={() => {
763
+ this.openEditDialog(row);
764
+ }}
765
+ >
766
+ <el-tooltip
767
+ enterable={false}
768
+ effect="dark"
769
+ content={this.$t1("查看")}
770
+ placement="top"
771
+ popper-class="tooltip-skin"
772
+ >
773
+ <i class="el-icon-view" />
774
+ </el-tooltip>
775
+ </a>,
776
+ ];
777
+ },
778
+ },
779
+ },
780
+ ],
781
+ };
782
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
783
+ this.vxeOption2 = opts;
784
+ });
785
+ },
786
+ confirmInsertWfObjConfig2(rows) {
787
+ if (rows.length) {
788
+ let row = rows[0];
789
+ this.$set(this.formData2, "objTypeName", row.objTypeName);
790
+ this.$set(this.formData2, "objTypeCode", row.objTypeCode);
791
+ }
792
+ },
793
+ },
794
+ };
795
+ </script>