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

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 (192) 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 +122 -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/docs/2026-08 xform H5 P0 /345/256/236/347/216/260/350/247/204/346/240/274.md" +528 -0
  44. package/src/components/xform/docs/2026-08 xform H5 P1 /345/256/236/347/216/260/350/247/204/346/240/274.md" +412 -0
  45. package/src/components/xform/docs/2026-08 xform H5 P2 /345/256/236/347/216/260/350/247/204/346/240/274.md" +287 -0
  46. package/src/components/xform/docs/2026-08 xform /347/247/273/345/212/250/347/253/257/345/270/203/345/261/200/345/257/271/351/275/220 bill_setting /346/226/271/346/241/210.md" +400 -0
  47. package/src/components/xform/form-designer/designer.js +51 -52
  48. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  49. package/src/components/xform/form-designer/form-widget/container-widget/detail-h5-widget.vue +18 -2
  50. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  51. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  52. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue +23 -2
  53. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-widget.vue +30 -1
  54. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  55. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  56. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
  57. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  58. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  59. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  60. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  61. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  62. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
  63. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  64. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  65. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
  66. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  67. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
  68. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  69. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  70. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +3 -2
  71. package/src/components/xform/form-designer/indexMixin.js +35 -1
  72. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  73. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
  74. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
  75. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  76. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  77. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  78. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -846
  79. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  80. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  81. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  82. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  83. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  84. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  85. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
  86. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  87. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  88. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  89. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  90. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  91. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  92. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  93. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  94. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +12 -0
  95. package/src/components/xform/form-designer/toolbar-panel/index.vue +884 -874
  96. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +14 -0
  97. package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
  98. package/src/components/xform/form-designer/widget-panel/indexMixin.js +30 -6
  99. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +112 -4
  100. package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
  101. package/src/components/xform/form-render/container-item/detail-h5-item.vue +204 -34
  102. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  103. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  104. package/src/components/xform/form-render/container-item/list-h5-item.vue +1913 -1699
  105. package/src/components/xform/form-render/index.vue +153 -147
  106. package/src/components/xform/form-render/indexMixin.js +35 -3
  107. package/src/components/xform/lang/en-US.js +14 -0
  108. package/src/components/xform/lang/zh-CN.js +17 -0
  109. package/src/components/xform/mixins/defaultHandle.js +707 -707
  110. package/src/components/xform/styles/h5.scss +2238 -0
  111. package/src/components/xform/utils/textMaskUtil.js +182 -179
  112. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  113. package/src/components/xform/utils/util.js +56 -11
  114. package/src/directive/append-to-body/index.js +48 -0
  115. package/src/index.js +13 -4
  116. package/src/layout/components/Sidebar/default.vue +1655 -1655
  117. package/src/layout/components/extractedCode/viewDialog.vue +7 -7
  118. package/src/router/index.js +48 -27
  119. package/src/router/modules/customer.js +71 -14
  120. package/src/store/modules/permission.js +17 -18
  121. package/src/utils/assetUrl.js +19 -0
  122. package/src/utils/pdfUtil.js +429 -429
  123. package/src/utils/resolveViewComponent.js +142 -16
  124. package/src/utils/vab.js +1283 -1279
  125. package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
  126. package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
  127. package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
  128. package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
  129. package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
  130. package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
  131. package/src/views/bd/project/branch/form_script/list.vue +31 -0
  132. package/src/views/bd/project/branch/form_template/list.vue +30 -0
  133. package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
  134. package/src/views/bd/project/common/form_script/list.vue +16 -0
  135. package/src/views/bd/project/common/form_template/list.vue +15 -0
  136. package/src/views/bd/project/common/menu_kind/list.vue +15 -0
  137. package/src/views/bd/project/core/branchContext.js +100 -0
  138. package/src/views/bd/project/core/branchPage.js +78 -0
  139. package/src/views/bd/project/core/branchPageWrap.vue +225 -0
  140. package/src/views/bd/project/core/branchScope.js +44 -0
  141. package/src/views/bd/project/core/branchSearchPage.js +285 -0
  142. package/src/views/bd/project/core/branchSelect.vue +85 -0
  143. package/src/views/bd/project/core/branchTreeBar.vue +81 -0
  144. package/src/views/bd/project/core/httpBranchPatch.js +58 -0
  145. package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
  146. package/src/views/bd/project/datatable/table_model/list.vue +15 -0
  147. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  148. package/src/views/bd/setting/form_template/edit.vue +378 -356
  149. package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
  150. package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
  151. package/src/views/bd/setting/form_template/list.vue +304 -303
  152. package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
  153. package/src/views/bd/setting/form_template/mixins/list.js +748 -721
  154. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  155. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  156. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  157. package/src/views/demo/bizTab/bill/billConfig.js +41 -0
  158. package/src/views/demo/bizTab/bill/detail.vue +436 -0
  159. package/src/views/demo/bizTab/bill/list.vue +288 -0
  160. package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
  161. package/src/views/demo/bizTab/simple/billApi.js +123 -0
  162. package/src/views/demo/bizTab/simple/detail.vue +407 -0
  163. package/src/views/demo/bizTab/simple/list.vue +217 -0
  164. package/src/views/demo/bizTab/standalone/index.vue +121 -0
  165. package/src/views/demo/bizTab/wf/billConfig.js +44 -0
  166. package/src/views/demo/bizTab/wf/detail.vue +661 -0
  167. package/src/views/demo/bizTab/wf/list.vue +242 -0
  168. package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
  169. package/src/views/support/form-dialog-demo/index.vue +537 -0
  170. package/src/views/user/file_view_ins/list.vue +970 -970
  171. package/src/views/user/form/vform/designer.vue +823 -821
  172. package/src/views/user/home/default.vue +1117 -1117
  173. package/src/views/user/home/default2.vue +1 -1
  174. package/src/views/user/home/index.vue +103 -101
  175. package/src/views/user/home/wjl/content.vue +1569 -0
  176. package/src/views/user/notify_message/dialog.vue +139 -137
  177. package/src/views/user/outLink/cc_form_view.vue +188 -0
  178. package/src/views/user/outLink/form_view.vue +202 -202
  179. package/src/views/user/outLink/index.vue +110 -110
  180. package/src/views/user/outLink/view.vue +3 -3
  181. package/src/views/user/role/edit.vue +632 -632
  182. package/src/views/user/role/list.vue +260 -260
  183. package/src/views/user/wf/iframe/index.vue +51 -51
  184. package/src/views/user/wf/iframe/index2.vue +64 -64
  185. package/src/views/user/wf/wf_manage/list.vue +1112 -1116
  186. package/src/views/user/wf/wf_manage/list2.vue +871 -875
  187. package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -131
  188. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +1 -1
  189. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
  190. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
  191. package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
  192. package/src/utils/wf.js +0 -766
package/src/utils/wf.js DELETED
@@ -1,766 +0,0 @@
1
- /**version-1.0*/
2
- import {
3
- getToken
4
- } from './auth';
5
-
6
- let configUtil = {
7
- baseUrl: process.env.VUE_APP_BASE_API,
8
- getToken,
9
- requireView: (url) => {
10
- return require('@/views' + url).default;
11
- }
12
- };
13
-
14
- let wfIndexMixin, wfStartMixin, wfContentMixin, wfModifyMixin;
15
-
16
- function getTarget(t, flag) {
17
- let target;
18
- if (t.parentVue) {
19
- target = t.parentVue;
20
- } else if (flag === 0) {
21
- target = t.$parent.$parent;
22
- } else {
23
- target = t.$parent.$parent.$parent;
24
- }
25
- return target;
26
- }
27
-
28
- wfIndexMixin = {
29
- name: 'wfView',
30
- props: {
31
- objId: [String, Number],
32
- wfCode: String
33
- },
34
- data() {
35
- return {
36
- wfReloadFlag: false,
37
- hasWf: false,
38
- wfStartVisible: false,
39
- paramData: '',
40
- showModifyDialog: false,
41
- showBillEdit: false,
42
- content: '',
43
- wfInfo: '',
44
- currentTask: '',
45
- taskParam: ''
46
- };
47
- },
48
- created() {},
49
- watch: {
50
- wfCode(val) {
51
- this.getWfInfo();
52
- },
53
- objId(val) {
54
- this.getWfInfo();
55
- }
56
- },
57
- async mounted() {
58
- if (this.objId) {
59
- let hasWf = false;
60
- let wfInfo, currentTask, taskParam;
61
- await this.initWfInfo().then(res => {
62
- if (res && res.type == 'success') {
63
- if (res.objx && res.objx.instId) {
64
- hasWf = true;
65
- wfInfo = res.objx;
66
- }
67
- }
68
- });
69
-
70
- if (hasWf) {
71
- await this.getCurrentTask(wfInfo).then(res1 => {
72
- if (res1.type == 'success') {
73
- currentTask = res1.objx;
74
- }
75
- });
76
-
77
- if (currentTask) {
78
- await this.getTaskParams(currentTask).then(res2 => {
79
- if (res2.type == 'success') {
80
- taskParam = res2.objx;
81
- }
82
- });
83
- }
84
- }
85
- this.paramData = taskParam;
86
- this.wfInfo = wfInfo;
87
- this.currentTask = currentTask;
88
- this.taskParam = taskParam;
89
-
90
- let flag = true;
91
- this.$emit('onShow', {
92
- wfInfo: wfInfo,
93
- currentTask: currentTask,
94
- taskParam: taskParam,
95
- hasWf: hasWf,
96
- callback: val => {
97
- flag = false;
98
- if (val !== false && hasWf) {
99
- this.wfReloadFlag = true;
100
- }
101
- }
102
- });
103
- if (flag) {
104
- if (hasWf) {
105
- this.wfReloadFlag = true;
106
- }
107
- }
108
- }
109
- this.$on('toDo', option => {
110
- this.$emit(option.methd, option.param);
111
- });
112
- },
113
- methods: {
114
- getWfInfo() {
115
- if (this.wfCode && this.objId) {
116
- this.reload();
117
- } else {
118
- this.wfReloadFlag = false;
119
- }
120
- },
121
- openStartWfDialog(code) {
122
- this.wfStartVisible = true;
123
- },
124
- reload() {
125
- this.wfReloadFlag = false;
126
- this.$nextTick(() => {
127
- this.wfReloadFlag = true;
128
- });
129
- },
130
- manualCallback() {
131
- this.$emit('manualCallback');
132
- },
133
- async getCurrentTask(obj) {
134
- let that = getTarget(this, 0);
135
- return that.$http({
136
- url: '/agilebpm/wf_task/getCurrentTask',
137
- data: {
138
- instId: obj.instId
139
- },
140
- method: 'post',
141
- async: false,
142
- isLoading: true,
143
- modalStrictly: true
144
- });
145
- },
146
- async initWfInfo() {
147
- let that = getTarget(this, 0);
148
- let id = this.objId;
149
- let code = this.wfCode;
150
- return that.$http({
151
- url: AGILEBPM_PREFIX + '/wf_obj_config/getWfInfo',
152
- method: `post`,
153
- data: {
154
- objTypeCode: code,
155
- businessKey: id
156
- },
157
- isLoading: true,
158
- modalStrictly: true
159
- });
160
- },
161
- async getTaskParams(data) {
162
- let that = getTarget(this, 0);
163
- return that.$http({
164
- url: '/agilebpm/wf_task/getTaskParams',
165
- method: `post`,
166
- data: {
167
- taskId: data.taskId
168
- },
169
- isLoading: true,
170
- modalStrictly: true
171
- });
172
- },
173
- openWfModifyDialog() {
174
- let row = this.paramData;
175
- let url = row.url + '.vue';
176
- this.showModifyDialog = true;
177
- this.content = configUtil.requireView(url);
178
- this.$openEditView('showBillEdit');
179
- },
180
- modfyDialogClose() {
181
- this.showBillEdit = false;
182
- this.content = null;
183
- }
184
- }
185
- };
186
-
187
- wfContentMixin = {
188
- name: 'wfContent',
189
- props: {
190
- objId: [String, Number],
191
- wfCode: String,
192
- _wfInfo: Object,
193
- _currentTask: Object,
194
- _taskParam: Object,
195
- parentVue: Object
196
- },
197
- data() {
198
- return {
199
- fileInfos: [],
200
- showUserDialog: false,
201
- showContent: true,
202
- objTypeCode: '',
203
- businessKey: '',
204
- wfInfo: {},
205
- currentTask: {},
206
- taskParam: {},
207
- wfImage: '',
208
- wfStartBtn: false,
209
- wfManualendBtn: false,
210
- wfSubmitBtn: false,
211
- wfRejectBtn: false,
212
- changeHandlerBtn: false,
213
- wftaskData: [],
214
- vxeOption: {},
215
- rejectNodes: [],
216
- rejectDialogVisible: false,
217
- rejectForm: {},
218
- formLabelWidth: '120px',
219
- agreeDialogVisible: false,
220
- agreeForm: {
221
- opinion: '同意'
222
- },
223
- changeWfDialogVisible: false,
224
- changeWfForm: {},
225
- taskStatuses: {
226
- start: {
227
- class: 'blue',
228
- value: '提交'
229
- },
230
- create: {
231
- class: 'blue',
232
- value: '创建'
233
- },
234
- end: {
235
- class: 'gray',
236
- value: '结束'
237
- },
238
- awaiting_check: {
239
- class: 'orgn',
240
- value: '待审批'
241
- },
242
- agree: {
243
- class: 'green',
244
- value: '同意'
245
- },
246
- oppose: {
247
- class: 'red',
248
- value: '反对'
249
- },
250
- abandon: {
251
- class: 'gray',
252
- value: '弃权'
253
- },
254
- reject: {
255
- class: 'red',
256
- value: '驳回'
257
- },
258
- rejectToStart: {
259
- class: 'red',
260
- value: '驳回到发起人'
261
- },
262
- revoker: {
263
- class: 'red',
264
- value: '撤回'
265
- },
266
- revoker_to_start: {
267
- class: 'red',
268
- value: '撤回到发起人'
269
- },
270
- signPass: {
271
- class: 'green',
272
- value: '会签通过'
273
- },
274
- signNotPass: {
275
- class: 'red',
276
- value: '会签不通过'
277
- },
278
- signRecycle: {
279
- class: '',
280
- value: '会签回收'
281
- },
282
- skip: {
283
- class: '',
284
- value: '跳过执行'
285
- },
286
- turn: {
287
- class: '',
288
- value: '转办'
289
- },
290
- cancelled: {
291
- class: 'gray',
292
- value: '任务取消'
293
- },
294
- manualEnd: {
295
- class: 'gray',
296
- value: '人工终止'
297
- }
298
- },
299
- opinion: ''
300
- };
301
- },
302
- created() {
303
- this.wfInfo = this._wfInfo;
304
- this.currentTask = this._currentTask;
305
- },
306
- mounted() {
307
- this.initForAll();
308
- },
309
- methods: {
310
- initForAll() {
311
- this.initWf(() => {
312
- if (this.wfInfo.instId) {
313
- this.initCurrentTask(this.wfInfo.instId, () => {
314
- this.initWftask(this.wfInfo.instId);
315
- });
316
- }
317
- });
318
- },
319
- initWf(done) {
320
- var data = this.wfInfo;
321
- if (data && data.instId) {
322
- var statuses = {
323
- running: '<span class="tag">审核中</span>',
324
- back: '<span class="tag red">已驳回</span>',
325
- end: '<span class="tag green">已完成</span>'
326
- };
327
- var statusStr = '';
328
- if (data.status != null) {
329
- statusStr = statuses[data.status] || '';
330
- }
331
- data.statusStr = statusStr;
332
- this.wfInfo = data;
333
-
334
- this.wfStartBtn = false;
335
- if (data.status != 'end' && data.starter) {
336
- this.wfManualendBtn = true;
337
- }
338
- this.wfSubmitBtn = false;
339
- this.wfRejectBtn = false;
340
-
341
- var url = AGILEBPM_PREFIX + '/bpm/instance/flowImage?instId=' + data.instId +
342
- '&_r=' + Math.random() + '&access_token=' + configUtil.getToken();
343
- this.wfImage = configUtil.baseUrl + url;
344
- done();
345
- }
346
- },
347
- initCurrentTask(instId, done) {
348
- var data = this.currentTask;
349
- if (data) {
350
- this.wfSubmitBtn = true;
351
- this.wfRejectBtn = true;
352
- this.changeHandlerBtn = true;
353
- }
354
- done();
355
- },
356
- initWftask(instId) {
357
- let that = getTarget(this);
358
- that.$http({
359
- url: '/agilebpm/wf_instance/getInstanceOpinion',
360
- data: {
361
- instId: instId
362
- },
363
- method: 'post',
364
- async: false,
365
- isLoading: true,
366
- modalStrictly: true
367
- }).then(resultmsg => {
368
- if (resultmsg.type == "success") {
369
- var datas = resultmsg.objx || [];
370
- this.wftaskData = datas.reverse();
371
- }
372
- });
373
- },
374
- assignInfo(info) {
375
- if (!info) {
376
- return '';
377
- }
378
- var msg = '';
379
- info.split(',').forEach(function(item) {
380
- if (!item) {
381
- return;
382
- }
383
- if (msg) {
384
- msg += ';';
385
- }
386
- var strs = item.split('-');
387
- var typeName = '';
388
- if (strs[0] === 'user') {
389
- typeName = '';
390
- } else if (strs[0] === 'role') {
391
- typeName = '[角色]';
392
- } else if (strs[0] === 'group') {
393
- typeName = '[组]';
394
- } else if (strs[0] === 'org') {
395
- typeName = '[组织]';
396
- } else if (strs[0] === 'post') {
397
- typeName = '[岗位]';
398
- if (strs[2]) {
399
- return (msg += typeName + strs[1] + '-' + strs[2]);
400
- }
401
- } else if (strs[0] === 'job') {
402
- typeName = '[职称]';
403
- }
404
- msg += typeName + strs[1];
405
- });
406
- return msg;
407
- },
408
- manualEndWf() {
409
- let that = getTarget(this);;
410
- var instId = this.wfInfo.instId;
411
- var taskId = this.currentTask && this.currentTask.id ? this.currentTask.id : '';
412
- var data = JSON.stringify({
413
- instanceId: instId,
414
- taskId: taskId,
415
- action: 'manualEnd'
416
- });
417
- that.$baseConfirm('您确定要中断吗?').then(() => {
418
- that.$http({
419
- url: '/agilebpm/wf_task/doAction',
420
- data: data,
421
- method: 'post',
422
- headers: {
423
- 'Content-Type': 'application/json;charset=utf-8'
424
- },
425
- isLoading: true,
426
- })
427
- .then(resultMsg => {
428
- if (resultMsg.type == 'success') {
429
- that.$message({
430
- message: resultMsg.content,
431
- type: 'success',
432
- duration: 500,
433
- onClose: t => {
434
- this.reloadContent();
435
- }
436
- });
437
- }
438
- });
439
- });
440
- },
441
- async rejectWfTask() {
442
- let that = getTarget(this);;
443
- var instId = this.wfInfo.instId;
444
- var taskId = this.currentTask.id;
445
- var destinations = null;
446
- await that.$http({
447
- url: '/agilebpm/wf_task/getDestinations',
448
- data: {
449
- instId: instId,
450
- taskId: taskId
451
- },
452
- method: 'post',
453
- //contentType: 'application/json;charset=utf-8',
454
- async: false,
455
- isLoading: true,
456
- }).then(resultMsg => {
457
- if (resultMsg.type == 'success') {
458
- destinations = resultMsg.objx || [];
459
- }
460
- });
461
-
462
- if (destinations == null) {
463
- return false;
464
- }
465
- if (destinations.length == 0) {
466
- that.$message({
467
- message: '无法驳回,没有目标节点',
468
- type: 'error',
469
- duration: 2 * 1000
470
- });
471
- return false;
472
- }
473
- this.rejectForm.opinion = this.opinion || '不同意';
474
- this.rejectNodes = destinations;
475
- this.rejectDialogVisible = true;
476
- },
477
- subRejectForm() {
478
- let that = getTarget(this);;
479
- var instId = this.wfInfo.instId;
480
- var taskId = this.currentTask.id;
481
-
482
- var data = JSON.stringify({
483
- instanceId: instId,
484
- taskId: taskId,
485
- action: 'reject',
486
- opinion: this.rejectForm.opinion,
487
- destination: this.rejectForm.nodeId
488
- });
489
- this.rejectDialogVisible = false;
490
- that.$http({
491
- url: '/agilebpm/wf_task/doAction',
492
- data: data,
493
- method: 'post',
494
- headers: {
495
- 'Content-Type': 'application/json;charset=utf-8'
496
- },
497
- isLoading: true,
498
- }).then(resultMsg => {
499
- if (resultMsg.type == 'success') {
500
- that.$message({
501
- message: resultMsg.content,
502
- type: 'success',
503
- duration: 500,
504
- onClose: t => {
505
- this.reloadContent();
506
- }
507
- });
508
- }
509
- });
510
- },
511
- openAgreeDialog() {
512
- this.agreeForm = {
513
- opinion: '同意'
514
- };
515
- this.agreeDialogVisible = true;
516
- },
517
- subAgreeForm() {
518
- let that = getTarget(this);;
519
- that.$baseConfirm('您确定通过流程吗?').then(() => {
520
- var instId = this.wfInfo.instId;
521
- var taskId = this.currentTask.id;
522
- var memo = this.opinion || '同意';
523
- var data = JSON.stringify({
524
- instanceId: instId,
525
- taskId: taskId,
526
- action: 'agree',
527
- opinion: memo
528
- });
529
- this.agreeDialogVisible = false;
530
- that.$http({
531
- url: '/agilebpm/wf_task/doAction',
532
- data: data,
533
- method: 'post',
534
- headers: {
535
- 'Content-Type': 'application/json;charset=utf-8'
536
- },
537
- isLoading: true,
538
- }).then(resultMsg => {
539
- if (resultMsg.type == 'success') {
540
- that.$message({
541
- message: resultMsg.content,
542
- type: 'success',
543
- duration: 500,
544
- onClose: t => {
545
- this.reloadContent();
546
- }
547
- });
548
- }
549
- });
550
- });
551
- },
552
- openChangeWfForm() {
553
- (this.changeWfDialogVisible = true),
554
- (this.changeWfForm = {
555
- opinion: '同意'
556
- });
557
- },
558
- subChangeWfForm() {
559
- let that = getTarget(this);;
560
- var instId = this.wfInfo.instId;
561
- var taskId = this.currentTask.id;
562
- var nodeId = this.currentTask.nodeId;
563
- var userId = this.changeWfForm.userId || '';
564
- var userNickName = this.changeWfForm.userNickName || '';
565
- var opinion = this.changeWfForm.opinion || '';
566
-
567
- if (!userId) {
568
- that.$message({
569
- message: '请选择转交人',
570
- type: 'error',
571
- duration: 2000,
572
- onClose: t => {}
573
- });
574
- return false;
575
- }
576
- var nodeUsers = {};
577
- nodeUsers[nodeId] = [{
578
- id: userId,
579
- name: userNickName,
580
- type: 'user'
581
- }];
582
-
583
- var data = JSON.stringify({
584
- instanceId: instId,
585
- taskId: taskId,
586
- action: 'turn',
587
- opinion: opinion,
588
- nodeId: nodeId,
589
- nodeUsers: nodeUsers
590
- });
591
- this.changeWfDialogVisible = false;
592
- that.$http({
593
- url: '/agilebpm/wf_task/doAction',
594
- data: data,
595
- method: 'post',
596
- headers: {
597
- 'Content-Type': 'application/json;charset=utf-8'
598
- },
599
- isLoading: true,
600
- }).then(resultMsg => {
601
- if (resultMsg.type == 'success') {
602
- that.$message({
603
- message: resultMsg.content,
604
- type: 'success',
605
- duration: 500,
606
- onClose: t => {
607
- this.reloadContent();
608
- }
609
- });
610
- }
611
- });
612
- },
613
- userConfirm(rows) {
614
- if (rows.length > 0) {
615
- let row = rows[0];
616
- this.changeWfForm.userId = row.id;
617
- this.changeWfForm.userNickName = row.nickName;
618
- }
619
- },
620
- reloadContent() {
621
- let that = getTarget(this);
622
- that.$baseReload();
623
- },
624
- manualCallback() {
625
- this.$emit('manualCallback');
626
- }
627
- }
628
- };
629
-
630
- wfStartMixin = {
631
- name: 'wfStartDialog',
632
- props: {
633
- dataId: [String, Number],
634
- code: [String, Number],
635
- visible: Boolean,
636
- parentVue: Object
637
- },
638
- data() {
639
- return {
640
- showDialog: false,
641
- wfStartForm: {},
642
- wfDefItems: []
643
- };
644
- },
645
- async mounted() {
646
- await this.initWfInfo(this.code);
647
- // this.showDialog = true;
648
- },
649
- methods: {
650
- async initWfInfo(code) {
651
- let that = getTarget(this);
652
- var wfDefItems = null;
653
- await that.$http({
654
- url: '/agilebpm/wf_definition/getDefListByObjTypeCode',
655
- data: {
656
- objTypeCode: code
657
- },
658
- method: 'post',
659
- //contentType: 'application/json;charset=utf-8',
660
- async: false,
661
- isLoading: true,
662
- error: error => {
663
- this.close();
664
- }
665
- }).then(resultMsg => {
666
- if (resultMsg.type == "success") {
667
- wfDefItems = resultMsg.objx || [];
668
- }
669
- });
670
-
671
- if (!wfDefItems || wfDefItems.length == 0) {
672
- that.$baseAlert('无法启动,没有流程单据');
673
- this.close();
674
- return false;
675
- }
676
- this.showDialog = true;
677
-
678
- (this.wfStartForm = {
679
- wfCode: code
680
- }), (this.wfDefItems = wfDefItems);
681
- // this.wfStartForm.defId = wfDefItems[0].id;
682
- this.$set(this.wfStartForm, 'defId', wfDefItems[0].id);
683
- },
684
- subWfStartForm() {
685
- let that = getTarget(this);
686
- var defId = this.wfStartForm.defId;
687
- if (!defId) {
688
- that.$baseAlert('请选择流程模版');
689
- return false;
690
- }
691
- this.showDialog = false;
692
-
693
- var businessKey = this.dataId;
694
-
695
- var data = JSON.stringify({
696
- defId: defId,
697
- businessKey: businessKey,
698
- action: 'start'
699
- });
700
- that.$http({
701
- url: '/agilebpm/wf_instance/doAction',
702
- data: data,
703
- method: 'post',
704
- headers: {
705
- 'Content-Type': 'application/json;charset=utf-8'
706
- },
707
- isLoading: true,
708
- }).then(resultMsg => {
709
- if (resultMsg.type == 'success') {
710
- that.$message({
711
- message: resultMsg.content,
712
- type: 'success',
713
- duration: 500,
714
- onClose: t => {
715
- that.$baseReload();
716
- }
717
- });
718
- }
719
- });
720
- },
721
- close() {
722
- this.$emit('update:visible', false);
723
- }
724
- }
725
- };
726
-
727
- wfModifyMixin = {
728
- name: 'wfModifyMixin',
729
- props: {
730
- dataId: [String, Number],
731
- code: [String, Number],
732
- visible: Boolean,
733
- paramData: Object,
734
- parentVue: Object
735
- },
736
- data() {
737
- return {
738
- showModifyDialog: false,
739
- showBillEdit: false,
740
- content: '',
741
- };
742
- },
743
- async mounted() {
744
- this.openWfModifyDialog(this.code);
745
- },
746
- methods: {
747
- openWfModifyDialog() {
748
- let row = this.paramData;
749
- let url = row.url + '.vue';
750
- this.showModifyDialog = true;
751
- this.content = configUtil.requireView(url);
752
- this.$openEditView('showBillEdit');
753
- },
754
- modfyDialogClose() {
755
- this.showBillEdit = false;
756
- this.content = null;
757
- }
758
- }
759
- };
760
-
761
- export {
762
- wfIndexMixin,
763
- wfStartMixin,
764
- wfContentMixin,
765
- wfModifyMixin
766
- }