cloud-web-corejs 1.0.54-dev.607 → 1.0.54-dev.609

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.
@@ -5,28 +5,35 @@ import tableForm from "@base/components/table/tableForm.vue";
5
5
  import projectTagDialog from "@base/views/user/project_tag/dialog.vue";
6
6
  import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
7
7
  import editView from "@base/views/bd/setting/form_script/edit1.vue";
8
- import {treeScollx} from "@base/utils/global";
9
- import {getBdFlag} from "@base/api/user";
10
- import {getJsxBtn, getJsxStatus} from "@base/views/bd/setting/utils/index";
8
+ import { treeScollx } from "@base/utils/global";
9
+ import { getBdFlag } from "@base/api/user";
10
+ import { getJsxBtn, getJsxStatus } from "@base/views/bd/setting/utils/index";
11
+ import formVersionButton from "@base/views/bd/setting/formVersion/link.vue";
11
12
 
12
13
  let modules = {};
13
14
  modules = {
14
- name: 'form_script:list1',
15
+ name: "form_script:list1",
15
16
  components: {
16
17
  projectTagView,
17
- projectTagAddButton, projectTagDeleteButton, tableForm, projectTagDialog, MenuKindDialog, editView
18
+ projectTagAddButton,
19
+ projectTagDeleteButton,
20
+ tableForm,
21
+ projectTagDialog,
22
+ MenuKindDialog,
23
+ editView,
24
+ formVersionButton,
18
25
  },
19
26
  data() {
20
27
  return {
21
- activeName: 'second',
28
+ activeName: "second",
22
29
  dataId: 0,
23
30
  showEdit: false,
24
31
  vxeOption: {},
25
32
  formData: {},
26
33
  defaultProps: {
27
- label: 'name', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
34
+ label: "name", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
28
35
  children: [],
29
- isLeaf: 'leaf'
36
+ isLeaf: "leaf",
30
37
  },
31
38
  currentFormType: {},
32
39
  addProjectTagOption: {
@@ -35,17 +42,17 @@ modules = {
35
42
  return this.$refs["table-m1"].getCheckboxRecords(true);
36
43
  },
37
44
  reqData: (tagDatas, tableDatas) => {
38
- let sids = tableDatas.map(item => item.sid);
39
- let tagCodes = tagDatas.map(item => item.tagCode);
45
+ let sids = tableDatas.map((item) => item.sid);
46
+ let tagCodes = tagDatas.map((item) => item.tagCode);
40
47
  let reqData = {
41
48
  tagCodes,
42
- sids
49
+ sids,
43
50
  };
44
51
  return reqData;
45
52
  },
46
53
  callback: () => {
47
- this.searchEvent()
48
- }
54
+ this.searchEvent();
55
+ },
49
56
  },
50
57
  deleteProjectTagOption: {
51
58
  url: USER_PREFIX + `/formScript/deleteTag`,
@@ -53,50 +60,49 @@ modules = {
53
60
  return this.$refs["table-m1"].getCheckboxRecords(true);
54
61
  },
55
62
  reqData: (tagDatas, tableDatas) => {
56
- let sids = tableDatas.map(item => item.sid);
57
- let tagCodes = tagDatas.map(item => item.tagCode);
63
+ let sids = tableDatas.map((item) => item.sid);
64
+ let tagCodes = tagDatas.map((item) => item.tagCode);
58
65
  let reqData = {
59
66
  tagCodes,
60
- sids
67
+ sids,
61
68
  };
62
69
  return reqData;
63
70
  },
64
71
  callback: () => {
65
- this.searchEvent()
66
- }
72
+ this.searchEvent();
73
+ },
67
74
  },
68
75
  showProjectTagDialog3: false,
69
76
  checkTags: [],
70
77
  isDev: true,
71
78
  menuKindAuth: {},
72
- showTree: false
79
+ showTree: false,
73
80
  };
74
81
  },
75
82
  computed: {
76
83
  currentMenuKindId() {
77
- return this.currentFormType?.id || null
84
+ return this.currentFormType?.id || null;
78
85
  },
79
86
  currentMenuKindName() {
80
- return this.currentFormType?.name || null
87
+ return this.currentFormType?.name || null;
81
88
  },
82
89
  otherFlag() {
83
- return this.currentFormType?.menuKindCode == "other"
84
- }
85
-
90
+ return this.currentFormType?.menuKindCode == "other";
91
+ },
86
92
  },
87
93
  mounted() {
88
- treeScollx({target: this, type: 'default'});
94
+ treeScollx({ target: this, type: "default" });
89
95
  this.getBdEnv();
90
96
  this.initTableList();
91
97
  },
92
98
  methods: {
93
99
  searchEvent() {
94
- this.$refs['table-m1'].commitProxy('reload');
100
+ this.$refs["table-m1"].commitProxy("reload");
95
101
  },
96
102
  resetEvent() {
97
103
  this.formData = {};
98
104
  this.checkTags = [];
99
- this.$refs['table-m1'].commitProxy('reload');
105
+ this.$refs["table-m1"].commitProxy("reload");
100
106
  },
101
107
  openEditDialog(row) {
102
108
  /*this.dataId = !id || typeof id == 'object' ? 0 : id;
@@ -106,8 +112,8 @@ modules = {
106
112
  let dataId = row?.id || 0;
107
113
  if (!dataId) {
108
114
  this.dataId = dataId;
109
- this.activeName = 'first';
110
- this.$openEditView('showEdit');
115
+ this.activeName = "first";
116
+ this.$openEditView("showEdit");
111
117
  } else {
112
118
  this.$refs.xTabs.openEditTab(row);
113
119
  }
@@ -115,27 +121,30 @@ modules = {
115
121
  getSearchParam() {
116
122
  let tagCodes = null;
117
123
  if (this.checkTags.length) {
118
- tagCodes = this.checkTags.map(item => item.tagCode);
124
+ tagCodes = this.checkTags.map((item) => item.tagCode);
119
125
  }
120
- let currentFormType = this.currentFormType || {}
121
- let menuKindCode = currentFormType.menuKindCode && !this.otherFlag ? currentFormType.menuKindCode : null;
126
+ let currentFormType = this.currentFormType || {};
127
+ let menuKindCode =
128
+ currentFormType.menuKindCode && !this.otherFlag
129
+ ? currentFormType.menuKindCode
130
+ : null;
122
131
  return {
123
132
  ...this.formData,
124
133
  tagCodes,
125
134
  menuKindCode,
126
- scriptType: 1
135
+ scriptType: 1,
127
136
  };
128
137
  },
129
138
  initTableList() {
130
139
  let that = this;
131
140
  let tableOption = {
132
141
  vue: this,
133
- tableRef: 'table-m1',
134
- tableName: 'bd_form_script_list1-m1',
142
+ tableRef: "table-m1",
143
+ tableName: "bd_form_script_list1-m1",
135
144
  path: () => {
136
- let url = USER_PREFIX + '/formScript/listPage';
145
+ let url = USER_PREFIX + "/formScript/listPage";
137
146
  if (this.otherFlag) {
138
- url = USER_PREFIX + '/formScript/listOtherPage';
147
+ url = USER_PREFIX + "/formScript/listOtherPage";
139
148
  }
140
149
  return url;
141
150
  },
@@ -143,59 +152,65 @@ modules = {
143
152
  return this.getSearchParam();
144
153
  },
145
154
  columns: [
146
- {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
155
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
147
156
  {
148
- title: this.$t1('脚本名称'),
149
- field: 'scriptName',
157
+ title: this.$t1("脚本名称"),
158
+ field: "scriptName",
150
159
  width: 180,
151
- fixed: 'left'
160
+ fixed: "left",
152
161
  },
153
162
  {
154
- title: this.$t1('项目标签'), field: 'tag', width: 250, slots: {default: "tag"}, params: {
155
- exportVal: ({row}) => {
163
+ title: this.$t1("项目标签"),
164
+ field: "tag",
165
+ width: 250,
166
+ slots: { default: "tag" },
167
+ params: {
168
+ exportVal: ({ row }) => {
156
169
  if (row.formScriptTagDTOs) {
157
- return row.formScriptTagDTOs.map(item => item.tagName).join(",")
170
+ return row.formScriptTagDTOs
171
+ .map((item) => item.tagName)
172
+ .join(",");
158
173
  }
159
- }
160
- }
174
+ },
175
+ },
161
176
  },
162
177
  {
163
- title: this.$t1('脚本编码'),
164
- field: 'scriptCode',
165
- width: 180
178
+ title: this.$t1("脚本编码"),
179
+ field: "scriptCode",
180
+ width: 180,
166
181
  },
167
- {title: this.$t1('表单分类'), field: 'menuKindName', width: 150},
182
+ { title: this.$t1("表单分类"), field: "menuKindName", width: 150 },
168
183
  {
169
- title: this.$t1('表单模板编码'),
170
- field: 'formCode',
171
- width: 150
184
+ title: this.$t1("表单模板编码"),
185
+ field: "formCode",
186
+ width: 150,
172
187
  },
173
188
  {
174
- title: this.$t1('Url路径'),
175
- field: 'url',
189
+ title: this.$t1("Url路径"),
190
+ field: "url",
176
191
  width: 200,
177
192
  slots: {
178
- default: ({row}) => {
193
+ default: ({ row }) => {
179
194
  return `/${row.formCode}/${row.scriptCode}`;
180
- }
181
- }
195
+ },
196
+ },
182
197
  },
183
198
  {
184
- title: this.$t1('脚本说明'),
185
- field: 'scriptRemark',
186
- width: 250
199
+ title: this.$t1("脚本说明"),
200
+ field: "scriptRemark",
201
+ width: 250,
187
202
  },
188
203
  {
189
- title: this.$t1('自定义URL'),
190
- field: 'uri',
191
- width: 250
204
+ title: this.$t1("自定义URL"),
205
+ field: "uri",
206
+ width: 250,
192
207
  },
193
208
  {
194
209
  title: this.$t1("是否启用"),
195
210
  field: "enabled",
196
211
  width: 150,
197
212
  slots: {
198
- default: ({row}) => {
213
+ default: ({ row }) => {
199
214
  if (row.enabled) {
200
215
  return getJsxStatus(null, this.$t1("启用"));
201
216
  } else {
@@ -205,144 +220,185 @@ modules = {
205
220
  },
206
221
  },
207
222
  {
208
- field: 'transactions',
209
- title: this.$t1('开启事务'),
223
+ field: "transactions",
224
+ title: this.$t1("开启事务"),
210
225
  width: 150,
211
226
  slots: {
212
- default: ({row}) => {
227
+ default: ({ row }) => {
213
228
  if (row.transactions == 1) {
214
- return getJsxStatus(null, this.$t1(''))
229
+ return getJsxStatus(null, this.$t1(""));
215
230
  } else {
216
- return getJsxStatus('s-3', this.$t1(''))
231
+ return getJsxStatus("s-3", this.$t1(""));
217
232
  }
218
- }
219
- }
233
+ },
234
+ },
220
235
  },
221
- {field: 'serviceName', title: this.$t1('服务名'), width: 150},
222
- {field: 'version', title: this.$t1('版本号'), width: 150},
236
+ { field: "serviceName", title: this.$t1("服务名"), width: 150 },
237
+ { field: "version", title: this.$t1("版本号"), width: 150 },
223
238
  {
224
- field: 'sid',
225
- title: this.$t1('唯一标识'),
226
- width: 280
239
+ field: "sid",
240
+ title: this.$t1("唯一标识"),
241
+ width: 280,
227
242
  },
228
243
  {
229
- field: 'createBy',
230
- title: this.$t1('创建人'),
231
- width: 150
244
+ field: "createBy",
245
+ title: this.$t1("创建人"),
246
+ width: 150,
232
247
  },
233
248
  {
234
- field: 'createDate',
235
- title: this.$t1('创建时间'),
236
- width: 150
249
+ field: "createDate",
250
+ title: this.$t1("创建时间"),
251
+ width: 150,
237
252
  },
238
253
  {
239
- field: 'modifyBy',
240
- title: this.$t1('更新人'),
241
- width: 150
254
+ field: "modifyBy",
255
+ title: this.$t1("更新人"),
256
+ width: 150,
242
257
  },
243
258
  {
244
- field: 'modifyDate',
245
- title: this.$t1('更新时间'),
246
- width: 150
259
+ field: "modifyDate",
260
+ title: this.$t1("更新时间"),
261
+ width: 150,
247
262
  },
248
263
  {
249
- width: 47,
250
- fixed: 'right',
251
- title: '',
264
+ width: 100,
265
+ fixed: "right",
266
+ title: "",
252
267
  sortable: false,
253
268
  slots: {
254
- default: ({row}) => {
255
- return getJsxBtn({
256
- iconName: "el-icon-edit",
257
- content: this.$t1('查看'),
258
- onclick: () => {
259
- this.openEditDialog(row);
260
- }
261
- });
262
- }
263
- }
264
- }
269
+ default: "operation"
270
+ },
271
+ },
265
272
  ],
266
273
  searchColumns: [
267
274
  {
268
- title: this.$t1('表单分类'),
275
+ title: this.$t1("表单分类"),
269
276
  field: "menuKindName",
270
277
  type: "input",
271
278
  common: true,
272
279
  disabled: true,
273
280
  defaultValueEnabled: false,
274
- slot: "menuKindName"
281
+ slot: "menuKindName",
282
+ },
283
+ {
284
+ title: this.$t1("脚本名称"),
285
+ field: "scriptName",
286
+ type: "input",
287
+ common: true,
288
+ },
289
+ {
290
+ title: this.$t1("脚本编码"),
291
+ field: "scriptCode",
292
+ type: "input",
293
+ common: true,
275
294
  },
276
- {title: this.$t1('脚本名称'), field: "scriptName", type: "input", common: true},
277
- {title: this.$t1('脚本编码'), field: "scriptCode", type: "input", common: true},
278
295
  {
279
296
  title: this.$t1("是否启用"),
280
297
  field: "enabled",
281
298
  type: "select",
282
299
  common: true,
283
300
  itemOption: [
284
- {label: this.$t1("启用"), value: true},
285
- {label: this.$t1("禁用"), value: false},
301
+ { label: this.$t1("启用"), value: true },
302
+ { label: this.$t1("禁用"), value: false },
286
303
  ],
287
304
  },
288
- {title: this.$t1('脚本说明'), field: "scriptRemark", type: "input", common: true},
289
- {title: this.$t1('脚本'), field: "script", type: "input", common: true},
290
- {title: this.$t1('表单模板编码'), field: "formCode", type: "input", common: true},
291
- {title: this.$t1('项目标签'), field: "tag", type: "input", common: true, slot: "tag"},
292
- {title: this.$t1('创建人'), field: "createBy", type: "input", common: false},
293
- {title: this.$t1('更新人'), field: "modifyBy", type: "input", common: false},
294
305
  {
295
- title: this.$t1('创建时间'),
306
+ title: this.$t1("脚本说明"),
307
+ field: "scriptRemark",
308
+ type: "input",
309
+ common: true,
310
+ },
311
+ {
312
+ title: this.$t1("脚本"),
313
+ field: "script",
314
+ type: "input",
315
+ common: true,
316
+ },
317
+ {
318
+ title: this.$t1("表单模板编码"),
319
+ field: "formCode",
320
+ type: "input",
321
+ common: true,
322
+ },
323
+ {
324
+ title: this.$t1("项目标签"),
325
+ field: "tag",
326
+ type: "input",
327
+ common: true,
328
+ slot: "tag",
329
+ },
330
+ {
331
+ title: this.$t1("创建人"),
332
+ field: "createBy",
333
+ type: "input",
334
+ common: false,
335
+ },
336
+ {
337
+ title: this.$t1("更新人"),
338
+ field: "modifyBy",
339
+ type: "input",
340
+ common: false,
341
+ },
342
+ {
343
+ title: this.$t1("操作日志"),
344
+ field: "logContent",
345
+ type: "input",
346
+ common: false,
347
+ },
348
+ {
349
+ title: this.$t1("创建时间"),
296
350
  field: "startCreateDate",
297
351
  field2: "endCreateDate",
298
352
  type: "dateRange",
299
353
  common: false,
300
354
  widgetType: "datetime",
301
- valueFormat: "yyyy-MM-dd HH:mm:ss"
355
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
302
356
  },
303
357
  {
304
- title: this.$t1('更新时间'),
358
+ title: this.$t1("更新时间"),
305
359
  field: "startModifyDate",
306
360
  field2: "endModifyDate",
307
361
  type: "dateRange",
308
362
  common: false,
309
363
  widgetType: "datetime",
310
- valueFormat: "yyyy-MM-dd HH:mm:ss"
311
- }
364
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
365
+ },
312
366
  ],
313
367
  config: {
314
368
  proxyConfig: {
315
- autoLoad: false
316
- }
369
+ autoLoad: false,
370
+ },
317
371
  },
318
372
  };
319
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
373
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
320
374
  this.vxeOption = opts;
321
375
  this.showTree = true;
322
376
  });
323
377
  },
324
378
  handleNodeClick(data, node, v) {
325
- this.handleNodeData(node)
379
+ this.handleNodeData(node);
326
380
  this.$forceUpdate();
327
381
  this.searchEvent();
328
382
  },
329
383
  // 异步树叶子节点懒加载逻辑
330
384
  loadNode(node, resolve) {
331
- let id = node && node.data && node.data.id ? node.data.id || '' : 0;
332
- let param = {enabled: true};
333
- let url = !id ? USER_PREFIX + '/menuKind/getAllList' : USER_PREFIX + '/menuKind/getChildren';
385
+ let id = node && node.data && node.data.id ? node.data.id || "" : 0;
386
+ let param = { enabled: true };
387
+ let url = !id
388
+ ? USER_PREFIX + "/menuKind/getAllList"
389
+ : USER_PREFIX + "/menuKind/getChildren";
334
390
  this.$http({
335
391
  aes: true,
336
392
  url: url,
337
- method: 'post',
393
+ method: "post",
338
394
  data: {
339
395
  parent: id,
340
396
  enabled: true,
341
- dataType: 3
397
+ dataType: 3,
342
398
  },
343
- success: res => {
399
+ success: (res) => {
344
400
  let rows = res.objx || [];
345
- rows.forEach(value => {
401
+ rows.forEach((value) => {
346
402
  value.leaf = !value.hasChild;
347
403
  });
348
404
  if (node.level === 0) {
@@ -350,8 +406,8 @@ modules = {
350
406
  id: "other",
351
407
  menuKindCode: "other",
352
408
  name: "其他分类",
353
- leaf: true
354
- })
409
+ leaf: true,
410
+ });
355
411
  if (rows.length > 0) {
356
412
  this.$nextTick(() => {
357
413
  let firstNode = node.childNodes[0];
@@ -359,12 +415,12 @@ modules = {
359
415
  firstNode.expand();
360
416
  }
361
417
  this.$refs.tree.setCurrentKey(firstNode.data);
362
- this.handleNodeClick(firstNode.data, firstNode, this)
418
+ this.handleNodeClick(firstNode.data, firstNode, this);
363
419
  });
364
420
  }
365
421
  }
366
422
  resolve(rows);
367
- }
423
+ },
368
424
  });
369
425
  },
370
426
  handleNodeData(node) {
@@ -378,47 +434,47 @@ modules = {
378
434
  this.checkTags = rows;
379
435
  },
380
436
  getTabNames() {
381
- return this.checkTags.map(item => item.tagName).join(",");
437
+ return this.checkTags.map((item) => item.tagName).join(",");
382
438
  },
383
439
  jsonImport() {
384
440
  this.$jsonImport({
385
- saveUrl: USER_PREFIX + '/form_develop/importFormScript',
441
+ saveUrl: USER_PREFIX + "/form_develop/importFormScript",
386
442
  showResult: true,
387
443
  resultColumns: [
388
444
  {
389
- title: this.$t1('脚本名称'),
390
- field: 'scriptName',
445
+ title: this.$t1("脚本名称"),
446
+ field: "scriptName",
391
447
  width: 180,
392
- fixed: 'left'
448
+ fixed: "left",
393
449
  },
394
450
  {
395
- title: this.$t1('脚本编码'),
396
- field: 'scriptCode',
397
- width: 180
398
- }
451
+ title: this.$t1("脚本编码"),
452
+ field: "scriptCode",
453
+ width: 180,
454
+ },
399
455
  ],
400
456
  callback: () => {
401
457
  this.searchEvent();
402
- }
458
+ },
403
459
  });
404
460
  },
405
461
  jsonExport() {
406
462
  this.$jsonExport({
407
- title:"逻辑脚本",
463
+ title: "逻辑脚本",
408
464
  targetRef: "table-m1",
409
465
  url: USER_PREFIX + "/form_develop/exportFormScript",
410
466
  abcEnabled: true,
411
467
  editAuth: this.currentFormType.editAuth,
412
- selectTypeAuth: this.currentFormType.selectTypeAuth
413
- })
468
+ selectTypeAuth: this.currentFormType.selectTypeAuth,
469
+ });
414
470
  },
415
471
  getBdEnv() {
416
472
  getBdFlag({
417
- success: res => {
418
- this.isDev = res.objx == 1
419
- }
473
+ success: (res) => {
474
+ this.isDev = res.objx == 1;
475
+ },
420
476
  });
421
- }
422
- }
477
+ },
478
+ },
423
479
  };
424
- export default modules
480
+ export default modules;