cloud-web-corejs 1.1.0-dev.34 → 1.1.0-dev.35

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 (31) hide show
  1. package/bin/core-resources.js +16 -0
  2. package/docs/child-app/README.md +6 -3
  3. package/docs/child-app/activiti-resources.md +63 -0
  4. package/docs/child-app/generate-prompt.md +7 -1
  5. package/docs/child-app/luckysheet-resources.md +80 -0
  6. package/docs/child-app/public-resources-plan.md +288 -0
  7. package/docs/child-app/resources-implementation.md +101 -0
  8. package/docs/child-app/tinymce-resources.md +88 -0
  9. package/docs/child-app/validation.md +4 -3
  10. package/package.json +10 -2
  11. package/resource-tools/index.js +126 -0
  12. package/src/app-bootstrap.js +7 -2
  13. package/src/components/Tinymce/dynamicLoadScript.js +51 -59
  14. package/src/components/Tinymce/index.vue +382 -339
  15. package/src/components/code-editor/index.vue +361 -343
  16. package/src/components/luckysheet/loadResources.js +64 -0
  17. package/src/components/luckysheet/view.vue +239 -210
  18. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +34 -3
  19. package/src/utils/featureResources.js +57 -0
  20. package/src/views/bd/setting/form_template/mixins/list.js +7 -6
  21. package/src/views/bd/setting/form_template/mixins/list2.js +412 -411
  22. package/src/views/bd/setting/form_template/mixins/wf_list.js +431 -430
  23. package/src/views/user/form/form_template/list.vue +513 -512
  24. package/src/views/user/wf/wf_obj_config/activiti_wf.vue +134 -133
  25. package/src/views/user/wf/wf_obj_config/list.vue +747 -746
  26. package/src/views/user/wf/wf_obj_config/list_form.vue +374 -373
  27. package/templates/child-app/README.md +2 -0
  28. package/templates/child-app/core-resources.config.js +15 -0
  29. package/templates/child-app/gitignore +1 -0
  30. package/templates/child-app/package.json +5 -0
  31. package/templates/child-app/vue.config.js +2 -1
@@ -1,411 +1,412 @@
1
- import tableForm from "@base/components/table/tableForm.vue";
2
- import editView from "@base/views/bd/setting/form_template/edit.vue";
3
- import itemList from "@base/views/bd/setting/form_template/itemList.vue";
4
- import formScriptList from "@base/views/bd/setting/form_script/form_list.vue";
5
- import indexUtil from "@base/utils";
6
- import {getBdFlag} from "@base/api/user";
7
- import designer from "@base/views/user/form/vform/designer.vue";
8
- import {getJsxBtnList, getJsxStatus} from "@base/views/bd/setting/utils/index";
9
-
10
- let modules = {};
11
- modules = {
12
- name: 'bd_form_template:list',
13
- components: {
14
-
15
- tableForm,
16
- editView,
17
- itemList,
18
- formScriptList,
19
- designer
20
- },
21
- data() {
22
- return {
23
- isFullscreen: false,
24
- formDesTabs: 'first',
25
- activeName: 'second',
26
- dataId: 0,
27
- showEdit: false,
28
- vxeOption: {},
29
- formData: {},
30
- showDesingerDialog: false,
31
- formCode: null,
32
- formName: null,
33
- templateId: null,
34
- currentFormTemplate: null,
35
-
36
- showItemEdit: false,
37
- showParamEdit: false,
38
- vxeOption1: {},
39
- editId: '',
40
- itemEditId: '',
41
- pRow: null,
42
- currentRow: {},
43
- serviceId: null,
44
- itemServiceId: null,
45
-
46
- showWfDialog: false,
47
- wfUrl: '',
48
- ph: '',
49
- dialogActiveName: 'first',
50
- showFunctionScriptList: false,
51
- showUserDialog: false,
52
- wfAssignData: [],
53
- wfAssignCallback: null,
54
- wfAssignMulti: true,
55
-
56
- showPositionDialog: false,
57
- wfAssignPositionData: [],
58
- wfAssignPositionCallback: null,
59
-
60
- showFormTemplateDialog: false,
61
- wfAssignFormTemplateCallback: null,
62
-
63
- showScriptDescriptionDialog: false,
64
- showWfDiyAttributeEdit: false,
65
-
66
- showFtHistoryDialog: false,
67
- operateFtHistory: null,
68
-
69
- defaultProps: {
70
- label: 'name', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
71
- children: [],
72
- isLeaf: 'leaf'
73
- },
74
- showItemView: false,
75
-
76
- currentFormType: {},
77
- editFormTypeId: null,
78
- showFormTypeDialog: false,
79
- showFormScriptList: false,
80
- addProjectTagOption: {
81
- url: USER_PREFIX + `/formTemplate/saveTag`,
82
- tableDatas: () => {
83
- return this.$refs["table-m1"].getCheckboxRecords(true);
84
- },
85
- reqData: (tagDatas, tableDatas) => {
86
- let sids = tableDatas.map(item => item.sid);
87
- let tagCodes = tagDatas.map(item => item.tagCode);
88
- let reqData = {
89
- tagCodes,
90
- sids
91
- };
92
- return reqData;
93
- },
94
- callback: () => {
95
- this.searchEvent()
96
- }
97
- },
98
- deleteProjectTagOption: {
99
- url: USER_PREFIX + `/formTemplate/deleteTag`,
100
- tableDatas: () => {
101
- return this.$refs["table-m1"].getCheckboxRecords(true);
102
- },
103
- reqData: (tagDatas, tableDatas) => {
104
- let sids = tableDatas.map(item => item.sid);
105
- let tagCodes = tagDatas.map(item => item.tagCode);
106
- let reqData = {
107
- tagCodes,
108
- sids
109
- };
110
- return reqData;
111
- },
112
- callback: () => {
113
- this.searchEvent()
114
- }
115
- },
116
- showProjectTagDialog3: false,
117
- checkTags: [],
118
- isDev: true,
119
- menuKindAuth: {},
120
- showTree: false,
121
-
122
- showWfObjConfigDialog: false,
123
- formTemplate: null
124
- };
125
- },
126
- computed: {
127
- currentMenuKindId() {
128
- return this.currentFormType?.id || null
129
- },
130
- currentMenuKindName() {
131
- return this.currentFormType?.name || null
132
- }
133
- },
134
- watch: {
135
- formDesTabs(val) {
136
- if (this.showFormScriptList === false && val === 'second') {
137
- this.showFormScriptList = true;
138
- }
139
- }
140
- },
141
- mounted() {
142
- this.getBdEnv();
143
- this.initTableList();
144
- this.initWfWinParam();
145
- },
146
- methods: {
147
- searchEvent() {
148
- this.$refs['table-m1'].commitProxy('reload');
149
- },
150
- resetEvent() {
151
- this.formData = {};
152
- this.checkTags = [];
153
- this.$refs['table-m1'].commitProxy('reload');
154
- },
155
- openEditDialog(row) {
156
- let dataId = row?.id || 0;
157
- /*this.dataId = !id || typeof id === 'object' ? 0 : id;
158
- this.activeName = 'first';
159
- this.showItemEdit = false;
160
- this.$openEditView('showEdit');*/
161
- if (!dataId) {
162
- this.dataId = dataId;
163
- this.activeName = 'first';
164
- this.$openEditView('showEdit');
165
- } else {
166
- this.$refs.xTabs.openEditTab(row);
167
- }
168
-
169
- },
170
- openDesingerDialog(row, callback) {
171
- this.formCode = row.formCode;
172
- this.formName = row.formName;
173
- this.currentFormTemplate = row;
174
- this.isFullscreen = false;
175
- this.showDesingerDialog = true;
176
- this.designerSaveCallback = callback ?? null;
177
- },
178
- openDesingerDialogByChild({row, callback}) {
179
- this.openDesingerDialog(row, callback)
180
- },
181
- reflushTemplateList() {
182
- this.searchEvent();
183
- this.designerSaveCallback && this.designerSaveCallback();
184
- },
185
- handleFullscreen() {
186
- let isFullscreen = this.isFullscreen;
187
- if (!isFullscreen) {
188
- indexUtil.addClass(document.body, "hideMenu");
189
- } else {
190
- indexUtil.removeClass(document.body, "hideMenu");
191
- }
192
- this.isFullscreen = !isFullscreen;
193
- },
194
- openFtHistoryDialog(row) {
195
- this.operateFtHistory = row;
196
- this.showFtHistoryDialog = true;
197
- },
198
- confirmFtHistoryDialog(row) {
199
- this.searchEvent();
200
- },
201
- closeFormDesignwinEvent(done) {
202
- this.$baseConfirm(this.$t1('请确认"已保存"报表模板,是否继续关闭?')).then(() => {
203
- indexUtil.removeClass(document.body, "hideMenu");
204
- done && done();
205
- });
206
- },
207
- getSearchParam() {
208
- let tagCodes = null;
209
- if (this.checkTags.length) {
210
- tagCodes = this.checkTags.map(item => item.tagCode);
211
- }
212
- let currentFormType = this.currentFormType || {}
213
- return {
214
- ...this.formData,
215
- tagCodes,
216
- menuKindCode: currentFormType.menuKindCode || null,
217
- history: false
218
- };
219
- },
220
- initTableList() {
221
- let that = this;
222
- let tableOption = {
223
- vue: this,
224
- tableRef: 'table-m1',
225
- tableName: 'bd_form_template_list-m2',
226
- path: USER_PREFIX + '/formTemplate/listPageWf',
227
- param: () => {
228
- return this.getSearchParam();
229
- },
230
- columns: [
231
- {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
232
- {
233
- title: this.$t1('模板名称'),
234
- field: 'formName',
235
- width: 250,
236
- fixed: 'left'
237
- },
238
- {
239
- title: this.$t1('模板编码'),
240
- field: 'formCode',
241
- width: 250
242
- },
243
- {field: 'serviceName', title: this.$t1('服务名'), width: 150},
244
- {
245
- title: this.$t1('更新时间'),
246
- field: 'modifyDate',
247
- width: 150
248
- },
249
- {
250
- title: this.$t1('创建时间'),
251
- field: 'createDate',
252
- width: 150
253
- },
254
- {
255
- width: 120,
256
- fixed: 'right',
257
- title: '',
258
- sortable: false,
259
- slots: {
260
- default: ({row}) => {
261
- return getJsxBtnList([
262
- {
263
- iconName: "iconfont icon-liuchengguanli-shejiqi_liucheng",
264
- content: this.$t1('流程单据维护'),
265
- onclick: () => {
266
- this.openWfObjConfigDialog(row);
267
- }
268
- }
269
- ]);
270
- }
271
- }
272
- }
273
- ],
274
- searchColumns: [
275
- {title: this.$t1('模板名称'), field: "formName", type: "input", common: true},
276
- {title: this.$t1('模板编码'), field: "formCode", type: "input", common: true}
277
- ],
278
- config: {
279
-
280
- },
281
- };
282
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
283
- this.vxeOption = opts;
284
- this.showTree = true;
285
- });
286
- },
287
- chooseCellM1(row) {
288
- this.currentRow = row;
289
- this.showItemView = true;
290
- },
291
- openWfDesignDialog(actModelId) {
292
- //wfType 0:单据流程,1:场景流程
293
- let serviceId = this.currentRow.serviceName;
294
- this.wfUrl = WEB_PREFIX + '/activiti-explorer/modeler.html?wfType=0&serviceId=' + serviceId + '&modelId=' + actModelId;
295
- this.dialogActiveName = 'first';
296
- this.showWfDialog = true;
297
- },
298
- closeDesignwinEvent(done) {
299
- this.$baseConfirm(this.$t1('请确认"已保存"流程模板,是否继续关闭?')).then(() => {
300
- this.showWfDialog = false;
301
- // this.showDesingerDialog = false;
302
- });
303
- },
304
- initWfWinParam() {
305
- this.initCloseWfDesignWin();
306
- this.initWinUserDialog();
307
- this.initWinPositionDialog();
308
- this.initSysParamForWf();
309
- this.initWinFormTemplateDialog();
310
- this.initWinScriptDescriptionDialog();
311
- },
312
- initCloseWfDesignWin() {
313
- window.closeWfDesignWin = () => {
314
- this.showWfDialog = false;
315
- };
316
- },
317
- initWinUserDialog() {
318
- window.openAssignUserDialog = opts => {
319
- this.wfAssignMulti = opts.multi;
320
- this.wfAssignData = opts.data || [];
321
- this.wfAssignCallback = opts.callback;
322
- this.showUserDialog = true;
323
- };
324
- },
325
- confirmUser(rows) {
326
- this.wfAssignCallback(rows);
327
- },
328
- initWinPositionDialog() {
329
- window.openAssignPositionDialog = opts => {
330
- this.wfAssignPositionData = opts.data || [];
331
- this.wfAssignPositionCallback = opts.callback;
332
- this.showPositionDialog = true;
333
- };
334
- },
335
- initSysParamForWf() {
336
- let webPrefix = WEB_PREFIX;
337
- let baseApi = process.env.VUE_APP_BASE_API;
338
- window.sysParamForWf = {
339
- webPrefix,
340
- baseApi
341
- }
342
- },
343
- confirmPosition(rows) {
344
- this.wfAssignPositionCallback(rows);
345
- },
346
- initWinFormTemplateDialog() {
347
- window.openAssignFormTemplateDialog = opts => {
348
- this.wfAssignFormTemplateCallback = opts.callback;
349
- this.showFormTemplateDialog = true;
350
- };
351
- },
352
- confirmFormTemplate(rows) {
353
- this.wfAssignFormTemplateCallback(rows);
354
- },
355
- initWinScriptDescriptionDialog() {
356
- window.openScriptDescriptionDialog = opts => {
357
- this.showScriptDescriptionDialog = true;
358
- };
359
- },
360
- handleFormDesignClose() {
361
- this.formDesTabs = 'first';
362
- this.showFormScriptList = false;
363
- },
364
- openProjectTagDialog3() {
365
- this.showProjectTagDialog3 = true;
366
- },
367
- confirmProjectTagDialog3(rows) {
368
- this.checkTags = rows;
369
- },
370
- getTabNames() {
371
- return this.checkTags.map(item => item.tagName).join(",");
372
- },
373
- jsonImport() {
374
- this.$jsonImport({
375
- saveUrl: USER_PREFIX + '/form_develop/importFormTemplate',
376
- showResult: true,
377
- resultColumns: [
378
- {title: this.$t1('模板名称'), field: "formName", type: "input", common: true},
379
- {title: this.$t1('模板编码'), field: "formCode", type: "input", common: true},
380
- ],
381
- callback: () => {
382
- this.searchEvent();
383
- }
384
- });
385
- },
386
- jsonExport() {
387
- this.$jsonExport({
388
- targetRef: "table-m1",
389
- url: USER_PREFIX + "/form_develop/exportFormTemplate",
390
- abcEnabled: true,
391
- editAuth: this.currentFormType.editAuth,
392
- selectTypeAuth: this.currentFormType.selectTypeAuth
393
- })
394
- },
395
- getBdEnv() {
396
- getBdFlag({
397
- success: res => {
398
- this.isDev = res.objx === 1
399
- }
400
- });
401
- },
402
- openWfObjConfigDialog(row) {
403
- this.formTemplate = row;
404
- this.showWfObjConfigDialog = true;
405
-
406
- },
407
- confirmWfObjConfigDialog() {
408
- }
409
- }
410
- };
411
- export default modules
1
+ import tableForm from "@base/components/table/tableForm.vue";
2
+ import editView from "@base/views/bd/setting/form_template/edit.vue";
3
+ import itemList from "@base/views/bd/setting/form_template/itemList.vue";
4
+ import formScriptList from "@base/views/bd/setting/form_script/form_list.vue";
5
+ import indexUtil from "@base/utils";
6
+ import {getBdFlag} from "@base/api/user";
7
+ import designer from "@base/views/user/form/vform/designer.vue";
8
+ import {getJsxBtnList, getJsxStatus} from "@base/views/bd/setting/utils/index";
9
+ import { workflowDesignerUrl } from "@base/utils/featureResources";
10
+
11
+ let modules = {};
12
+ modules = {
13
+ name: 'bd_form_template:list',
14
+ components: {
15
+
16
+ tableForm,
17
+ editView,
18
+ itemList,
19
+ formScriptList,
20
+ designer
21
+ },
22
+ data() {
23
+ return {
24
+ isFullscreen: false,
25
+ formDesTabs: 'first',
26
+ activeName: 'second',
27
+ dataId: 0,
28
+ showEdit: false,
29
+ vxeOption: {},
30
+ formData: {},
31
+ showDesingerDialog: false,
32
+ formCode: null,
33
+ formName: null,
34
+ templateId: null,
35
+ currentFormTemplate: null,
36
+
37
+ showItemEdit: false,
38
+ showParamEdit: false,
39
+ vxeOption1: {},
40
+ editId: '',
41
+ itemEditId: '',
42
+ pRow: null,
43
+ currentRow: {},
44
+ serviceId: null,
45
+ itemServiceId: null,
46
+
47
+ showWfDialog: false,
48
+ wfUrl: '',
49
+ ph: '',
50
+ dialogActiveName: 'first',
51
+ showFunctionScriptList: false,
52
+ showUserDialog: false,
53
+ wfAssignData: [],
54
+ wfAssignCallback: null,
55
+ wfAssignMulti: true,
56
+
57
+ showPositionDialog: false,
58
+ wfAssignPositionData: [],
59
+ wfAssignPositionCallback: null,
60
+
61
+ showFormTemplateDialog: false,
62
+ wfAssignFormTemplateCallback: null,
63
+
64
+ showScriptDescriptionDialog: false,
65
+ showWfDiyAttributeEdit: false,
66
+
67
+ showFtHistoryDialog: false,
68
+ operateFtHistory: null,
69
+
70
+ defaultProps: {
71
+ label: 'name', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
72
+ children: [],
73
+ isLeaf: 'leaf'
74
+ },
75
+ showItemView: false,
76
+
77
+ currentFormType: {},
78
+ editFormTypeId: null,
79
+ showFormTypeDialog: false,
80
+ showFormScriptList: false,
81
+ addProjectTagOption: {
82
+ url: USER_PREFIX + `/formTemplate/saveTag`,
83
+ tableDatas: () => {
84
+ return this.$refs["table-m1"].getCheckboxRecords(true);
85
+ },
86
+ reqData: (tagDatas, tableDatas) => {
87
+ let sids = tableDatas.map(item => item.sid);
88
+ let tagCodes = tagDatas.map(item => item.tagCode);
89
+ let reqData = {
90
+ tagCodes,
91
+ sids
92
+ };
93
+ return reqData;
94
+ },
95
+ callback: () => {
96
+ this.searchEvent()
97
+ }
98
+ },
99
+ deleteProjectTagOption: {
100
+ url: USER_PREFIX + `/formTemplate/deleteTag`,
101
+ tableDatas: () => {
102
+ return this.$refs["table-m1"].getCheckboxRecords(true);
103
+ },
104
+ reqData: (tagDatas, tableDatas) => {
105
+ let sids = tableDatas.map(item => item.sid);
106
+ let tagCodes = tagDatas.map(item => item.tagCode);
107
+ let reqData = {
108
+ tagCodes,
109
+ sids
110
+ };
111
+ return reqData;
112
+ },
113
+ callback: () => {
114
+ this.searchEvent()
115
+ }
116
+ },
117
+ showProjectTagDialog3: false,
118
+ checkTags: [],
119
+ isDev: true,
120
+ menuKindAuth: {},
121
+ showTree: false,
122
+
123
+ showWfObjConfigDialog: false,
124
+ formTemplate: null
125
+ };
126
+ },
127
+ computed: {
128
+ currentMenuKindId() {
129
+ return this.currentFormType?.id || null
130
+ },
131
+ currentMenuKindName() {
132
+ return this.currentFormType?.name || null
133
+ }
134
+ },
135
+ watch: {
136
+ formDesTabs(val) {
137
+ if (this.showFormScriptList === false && val === 'second') {
138
+ this.showFormScriptList = true;
139
+ }
140
+ }
141
+ },
142
+ mounted() {
143
+ this.getBdEnv();
144
+ this.initTableList();
145
+ this.initWfWinParam();
146
+ },
147
+ methods: {
148
+ searchEvent() {
149
+ this.$refs['table-m1'].commitProxy('reload');
150
+ },
151
+ resetEvent() {
152
+ this.formData = {};
153
+ this.checkTags = [];
154
+ this.$refs['table-m1'].commitProxy('reload');
155
+ },
156
+ openEditDialog(row) {
157
+ let dataId = row?.id || 0;
158
+ /*this.dataId = !id || typeof id === 'object' ? 0 : id;
159
+ this.activeName = 'first';
160
+ this.showItemEdit = false;
161
+ this.$openEditView('showEdit');*/
162
+ if (!dataId) {
163
+ this.dataId = dataId;
164
+ this.activeName = 'first';
165
+ this.$openEditView('showEdit');
166
+ } else {
167
+ this.$refs.xTabs.openEditTab(row);
168
+ }
169
+
170
+ },
171
+ openDesingerDialog(row, callback) {
172
+ this.formCode = row.formCode;
173
+ this.formName = row.formName;
174
+ this.currentFormTemplate = row;
175
+ this.isFullscreen = false;
176
+ this.showDesingerDialog = true;
177
+ this.designerSaveCallback = callback ?? null;
178
+ },
179
+ openDesingerDialogByChild({row, callback}) {
180
+ this.openDesingerDialog(row, callback)
181
+ },
182
+ reflushTemplateList() {
183
+ this.searchEvent();
184
+ this.designerSaveCallback && this.designerSaveCallback();
185
+ },
186
+ handleFullscreen() {
187
+ let isFullscreen = this.isFullscreen;
188
+ if (!isFullscreen) {
189
+ indexUtil.addClass(document.body, "hideMenu");
190
+ } else {
191
+ indexUtil.removeClass(document.body, "hideMenu");
192
+ }
193
+ this.isFullscreen = !isFullscreen;
194
+ },
195
+ openFtHistoryDialog(row) {
196
+ this.operateFtHistory = row;
197
+ this.showFtHistoryDialog = true;
198
+ },
199
+ confirmFtHistoryDialog(row) {
200
+ this.searchEvent();
201
+ },
202
+ closeFormDesignwinEvent(done) {
203
+ this.$baseConfirm(this.$t1('请确认"已保存"报表模板,是否继续关闭?')).then(() => {
204
+ indexUtil.removeClass(document.body, "hideMenu");
205
+ done && done();
206
+ });
207
+ },
208
+ getSearchParam() {
209
+ let tagCodes = null;
210
+ if (this.checkTags.length) {
211
+ tagCodes = this.checkTags.map(item => item.tagCode);
212
+ }
213
+ let currentFormType = this.currentFormType || {}
214
+ return {
215
+ ...this.formData,
216
+ tagCodes,
217
+ menuKindCode: currentFormType.menuKindCode || null,
218
+ history: false
219
+ };
220
+ },
221
+ initTableList() {
222
+ let that = this;
223
+ let tableOption = {
224
+ vue: this,
225
+ tableRef: 'table-m1',
226
+ tableName: 'bd_form_template_list-m2',
227
+ path: USER_PREFIX + '/formTemplate/listPageWf',
228
+ param: () => {
229
+ return this.getSearchParam();
230
+ },
231
+ columns: [
232
+ {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
233
+ {
234
+ title: this.$t1('模板名称'),
235
+ field: 'formName',
236
+ width: 250,
237
+ fixed: 'left'
238
+ },
239
+ {
240
+ title: this.$t1('模板编码'),
241
+ field: 'formCode',
242
+ width: 250
243
+ },
244
+ {field: 'serviceName', title: this.$t1('服务名'), width: 150},
245
+ {
246
+ title: this.$t1('更新时间'),
247
+ field: 'modifyDate',
248
+ width: 150
249
+ },
250
+ {
251
+ title: this.$t1('创建时间'),
252
+ field: 'createDate',
253
+ width: 150
254
+ },
255
+ {
256
+ width: 120,
257
+ fixed: 'right',
258
+ title: '',
259
+ sortable: false,
260
+ slots: {
261
+ default: ({row}) => {
262
+ return getJsxBtnList([
263
+ {
264
+ iconName: "iconfont icon-liuchengguanli-shejiqi_liucheng",
265
+ content: this.$t1('流程单据维护'),
266
+ onclick: () => {
267
+ this.openWfObjConfigDialog(row);
268
+ }
269
+ }
270
+ ]);
271
+ }
272
+ }
273
+ }
274
+ ],
275
+ searchColumns: [
276
+ {title: this.$t1('模板名称'), field: "formName", type: "input", common: true},
277
+ {title: this.$t1('模板编码'), field: "formCode", type: "input", common: true}
278
+ ],
279
+ config: {
280
+
281
+ },
282
+ };
283
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
284
+ this.vxeOption = opts;
285
+ this.showTree = true;
286
+ });
287
+ },
288
+ chooseCellM1(row) {
289
+ this.currentRow = row;
290
+ this.showItemView = true;
291
+ },
292
+ openWfDesignDialog(actModelId) {
293
+ //wfType 0:单据流程,1:场景流程
294
+ let serviceId = this.currentRow.serviceName;
295
+ this.wfUrl = workflowDesignerUrl({ wfType: 0, serviceId, modelId: actModelId, baseApi: process.env.VUE_APP_BASE_API });
296
+ this.dialogActiveName = 'first';
297
+ this.showWfDialog = true;
298
+ },
299
+ closeDesignwinEvent(done) {
300
+ this.$baseConfirm(this.$t1('请确认"已保存"流程模板,是否继续关闭?')).then(() => {
301
+ this.showWfDialog = false;
302
+ // this.showDesingerDialog = false;
303
+ });
304
+ },
305
+ initWfWinParam() {
306
+ this.initCloseWfDesignWin();
307
+ this.initWinUserDialog();
308
+ this.initWinPositionDialog();
309
+ this.initSysParamForWf();
310
+ this.initWinFormTemplateDialog();
311
+ this.initWinScriptDescriptionDialog();
312
+ },
313
+ initCloseWfDesignWin() {
314
+ window.closeWfDesignWin = () => {
315
+ this.showWfDialog = false;
316
+ };
317
+ },
318
+ initWinUserDialog() {
319
+ window.openAssignUserDialog = opts => {
320
+ this.wfAssignMulti = opts.multi;
321
+ this.wfAssignData = opts.data || [];
322
+ this.wfAssignCallback = opts.callback;
323
+ this.showUserDialog = true;
324
+ };
325
+ },
326
+ confirmUser(rows) {
327
+ this.wfAssignCallback(rows);
328
+ },
329
+ initWinPositionDialog() {
330
+ window.openAssignPositionDialog = opts => {
331
+ this.wfAssignPositionData = opts.data || [];
332
+ this.wfAssignPositionCallback = opts.callback;
333
+ this.showPositionDialog = true;
334
+ };
335
+ },
336
+ initSysParamForWf() {
337
+ let webPrefix = WEB_PREFIX;
338
+ let baseApi = process.env.VUE_APP_BASE_API;
339
+ window.sysParamForWf = {
340
+ webPrefix,
341
+ baseApi
342
+ }
343
+ },
344
+ confirmPosition(rows) {
345
+ this.wfAssignPositionCallback(rows);
346
+ },
347
+ initWinFormTemplateDialog() {
348
+ window.openAssignFormTemplateDialog = opts => {
349
+ this.wfAssignFormTemplateCallback = opts.callback;
350
+ this.showFormTemplateDialog = true;
351
+ };
352
+ },
353
+ confirmFormTemplate(rows) {
354
+ this.wfAssignFormTemplateCallback(rows);
355
+ },
356
+ initWinScriptDescriptionDialog() {
357
+ window.openScriptDescriptionDialog = opts => {
358
+ this.showScriptDescriptionDialog = true;
359
+ };
360
+ },
361
+ handleFormDesignClose() {
362
+ this.formDesTabs = 'first';
363
+ this.showFormScriptList = false;
364
+ },
365
+ openProjectTagDialog3() {
366
+ this.showProjectTagDialog3 = true;
367
+ },
368
+ confirmProjectTagDialog3(rows) {
369
+ this.checkTags = rows;
370
+ },
371
+ getTabNames() {
372
+ return this.checkTags.map(item => item.tagName).join(",");
373
+ },
374
+ jsonImport() {
375
+ this.$jsonImport({
376
+ saveUrl: USER_PREFIX + '/form_develop/importFormTemplate',
377
+ showResult: true,
378
+ resultColumns: [
379
+ {title: this.$t1('模板名称'), field: "formName", type: "input", common: true},
380
+ {title: this.$t1('模板编码'), field: "formCode", type: "input", common: true},
381
+ ],
382
+ callback: () => {
383
+ this.searchEvent();
384
+ }
385
+ });
386
+ },
387
+ jsonExport() {
388
+ this.$jsonExport({
389
+ targetRef: "table-m1",
390
+ url: USER_PREFIX + "/form_develop/exportFormTemplate",
391
+ abcEnabled: true,
392
+ editAuth: this.currentFormType.editAuth,
393
+ selectTypeAuth: this.currentFormType.selectTypeAuth
394
+ })
395
+ },
396
+ getBdEnv() {
397
+ getBdFlag({
398
+ success: res => {
399
+ this.isDev = res.objx === 1
400
+ }
401
+ });
402
+ },
403
+ openWfObjConfigDialog(row) {
404
+ this.formTemplate = row;
405
+ this.showWfObjConfigDialog = true;
406
+
407
+ },
408
+ confirmWfObjConfigDialog() {
409
+ }
410
+ }
411
+ };
412
+ export default modules