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

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