cloud-web-corejs 1.0.163 → 1.0.164

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 (63) hide show
  1. package/package.json +2 -1
  2. package/src/components/vb-tabs/x-tabs.vue +30 -13
  3. package/src/components/xform/form-designer/designer.js +1 -1
  4. package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +419 -0
  5. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +1 -1
  6. package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog copy.vue +971 -0
  7. package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue +971 -0
  8. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +71 -50
  9. package/src/components/xform/form-designer/form-widget/dialog/formulaDialog.vue +799 -0
  10. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +1639 -0
  11. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +102 -73
  12. package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +19 -1
  13. package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +41 -27
  14. package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +4 -1
  15. package/src/components/xform/form-designer/form-widget/field-widget/color-widget.vue +4 -1
  16. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +13 -2
  17. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +9 -2
  18. package/src/components/xform/form-designer/form-widget/field-widget/download-button-widget.vue +133 -0
  19. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +2 -1
  20. package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +962 -0
  21. package/src/components/xform/form-designer/form-widget/field-widget/input-widget.vue +7 -2
  22. package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +1 -1
  23. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +7 -0
  24. package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +1 -0
  25. package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +44 -27
  26. package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +19 -11
  27. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +19 -1
  28. package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +11 -7
  29. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +11 -8
  30. package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +1 -1
  31. package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +1 -1
  32. package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +1 -1
  33. package/src/components/xform/form-designer/setting-panel/form-setting.vue +106 -76
  34. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +13 -263
  35. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +47 -81
  36. package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +32 -0
  37. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +14 -7
  38. package/src/components/xform/form-designer/setting-panel/property-editor/field-gantt/gantt-editor.vue +36 -0
  39. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +37 -16
  40. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +42 -18
  41. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +2 -2
  42. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +57 -34
  43. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +84 -53
  44. package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +35 -44
  45. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +2 -0
  46. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +68 -3
  47. package/src/components/xform/form-render/container-item/containerItemMixin.js +2 -2
  48. package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -1
  49. package/src/components/xform/form-render/container-item/tab-item.vue +64 -32
  50. package/src/components/xform/form-render/index.vue +69 -23
  51. package/src/components/xform/form-render/indexMixin.js +18 -17
  52. package/src/components/xform/lang/zh-CN.js +8 -2
  53. package/src/components/xform/utils/formula-util.js +306 -5
  54. package/src/components/xform/utils/util.js +1 -1
  55. package/src/components/xform/utils/vue2js-generator.js +2 -2
  56. package/src/utils/request.js +1 -1
  57. package/src/utils/vab.js +1 -1
  58. package/src/views/user/form/vform/render.vue +54 -36
  59. package/src/views/user/form/view/list.vue +103 -10
  60. package/src/views/user/menu/list.vue +24 -1
  61. package/src/views/user/role/authConfig.vue +89 -0
  62. package/src/views/user/role/dialog.vue +70 -48
  63. package/src/views/user/role/edit.vue +114 -4
@@ -12,7 +12,7 @@
12
12
  v-el-drag-dialog
13
13
  v-el-dialog-center
14
14
  >
15
- <div class="cont" style="height:65vh">
15
+ <div class="cont" style="height: 65vh">
16
16
  <vxe-grid
17
17
  class="is-pointer"
18
18
  ref="table-m1"
@@ -26,24 +26,41 @@
26
26
  <template #form>
27
27
  <div class="clearfix screen-btns">
28
28
  <div class="fr">
29
- <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
30
- plain>{{ $t1('重置') }}
29
+ <vxe-button
30
+ icon="el-icon-brush"
31
+ class="button-sty"
32
+ @click="resetEvent"
33
+ type="text"
34
+ status="primary"
35
+ plain
36
+ >{{ $t1("重置") }}
31
37
  </vxe-button>
32
- <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
33
- {{ $t1('搜索') }}
38
+ <vxe-button
39
+ status="warning"
40
+ icon="el-icon-search"
41
+ class="button-sty"
42
+ @click="searchEvent"
43
+ >
44
+ {{ $t1("搜索") }}
34
45
  </vxe-button>
35
46
  </div>
36
47
  </div>
37
- <vxe-form class="screen-box" title-width="92px" title-align="right" :data="formData" @submit="searchEvent"
38
- @reset="resetEvent">
39
- <vxe-form-item :title="$t1('用户角色')+':'" field="name">
48
+ <vxe-form
49
+ class="screen-box"
50
+ title-width="92px"
51
+ title-align="right"
52
+ :data="formData"
53
+ @submit="searchEvent"
54
+ @reset="resetEvent"
55
+ >
56
+ <vxe-form-item :title="$t1('用户角色') + ':'" field="name">
40
57
  <template v-slot>
41
- <el-input v-model="formData.name" size="small" clearable/>
58
+ <el-input v-model="formData.name" size="small" clearable />
42
59
  </template>
43
60
  </vxe-form-item>
44
- <vxe-form-item :title="$t1('角色编码')+':'" field="code">
61
+ <vxe-form-item :title="$t1('角色编码') + ':'" field="code">
45
62
  <template v-slot>
46
- <el-input v-model="formData.code" size="small" clearable/>
63
+ <el-input v-model="formData.code" size="small" clearable />
47
64
  </template>
48
65
  </vxe-form-item>
49
66
  <vxe-button type="submit" @click="searchEvent" v-show="false"></vxe-button>
@@ -58,9 +75,12 @@
58
75
  </div>
59
76
  </label>
60
77
  <div class="multipleChoice">
61
- <el-tooltip :enterable="false" effect="dark" :content="$t1('全部删除')" placement="top"><a
62
- class="allDel icon-quanbushanchu"
63
- @click="clearChecked()"></a>
78
+ <el-tooltip
79
+ :enterable="false"
80
+ effect="dark"
81
+ :content="$t1('全部删除')"
82
+ placement="top"
83
+ ><a class="allDel icon-quanbushanchu" @click="clearChecked()"></a>
64
84
  </el-tooltip>
65
85
  <div class="list">
66
86
  <div class="item" v-for="(checkRow, index) in checkRows" :key="index">
@@ -70,25 +90,27 @@
70
90
  </div>
71
91
  </div>
72
92
  <span slot="footer" class="dialog-footer">
73
- <span class="fl tips" v-if="!selectMulti">{{ $t1('注:双击确认选择(单选)') }}</span>
93
+ <span class="fl tips" v-if="!selectMulti">{{
94
+ $t1("注:双击确认选择(单选)")
95
+ }}</span>
74
96
  <el-button type="primary" plain class="button-sty" @click="dialogClose">
75
97
  <i class="el-icon-close el-icon"></i>
76
- {{ $t1('取 消') }}
98
+ {{ $t1("取 消") }}
77
99
  </el-button>
78
100
  <el-button type="primary" @click="dialogPrimary" class="button-sty">
79
101
  <i class="el-icon-check el-icon"></i>
80
- {{ $t1('确 定') }}
102
+ {{ $t1("确 定") }}
81
103
  </el-button>
82
104
  </span>
83
105
  </el-dialog>
84
106
  </template>
85
107
 
86
108
  <script>
87
- import {selectDialogMixins} from '@base/mixins/selectDialog/index.js';
109
+ import { selectDialogMixins } from "@base/mixins/selectDialog/index.js";
88
110
 
89
111
  export default {
90
- name: 'roleDialog',
91
- props: ['visiable', 'multi', 'rows', 'param'],
112
+ name: "roleDialog",
113
+ props: ["visiable", "multi", "rows", "param"],
92
114
  mixins: [selectDialogMixins],
93
115
  created() {
94
116
  this.initSetting();
@@ -103,64 +125,64 @@ export default {
103
125
  falseValue: false,
104
126
  selectMulti: true,
105
127
  formData: {},
106
- vxeOption: {}
128
+ vxeOption: {},
107
129
  };
108
130
  },
109
131
  methods: {
110
132
  initTableM1() {
111
133
  let that = this;
112
- let url = USER_PREFIX + '/role/listCurrentPage';
134
+ let url = USER_PREFIX + "/role/listCurrentPage";
113
135
  let tableOption = {
114
136
  vue: that,
115
- tableRef: 'table-m1',
116
- tableName: 'basic_role_dialog-m1',
137
+ tableRef: "table-m1",
138
+ tableName: "basic_role_dialog-m1",
117
139
  path: url,
118
140
  param: () => {
119
141
  return {
120
142
  ...this.formData,
121
- ...this.param
143
+ ...this.param,
122
144
  };
123
145
  },
124
146
  columns: [
125
- {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
126
- {title: this.$t1('用户角色'), field: 'name', width: 250, fixed: 'left'},
127
- {title: this.$t1('角色编码'), field: 'code', width: 150},
128
- {title: this.$t1('角色描述'), field: 'description', width: 150},
147
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
148
+ { title: this.$t1("用户角色"), field: "name", width: 250, fixed: "left" },
149
+ { title: this.$t1("角色编码"), field: "code", width: 150 },
150
+ { title: this.$t1("角色描述"), field: "description", width: 150 },
129
151
  {
130
- title: this.$t1('是否内置'),
131
- field: 'systems',
152
+ title: this.$t1("是否内置"),
153
+ field: "systems",
132
154
  width: 150,
133
155
  slots: {
134
- default: ({row}) => {
156
+ default: ({ row }) => {
135
157
  if (row.systems) {
136
- return this.$t1('');
158
+ return this.$t1("");
137
159
  } else {
138
- return this.$t1('');
160
+ return this.$t1("");
139
161
  }
140
- }
141
- }
162
+ },
163
+ },
142
164
  },
143
- {title: this.$t1('所属组织'), field: 'companyName', width: 150},
144
- {title: this.$t1('创建时间'), field: 'createDate', width: 150},
165
+ { title: this.$t1("所属组织"), field: "companyName", width: 150 },
166
+ { title: this.$t1("创建时间"), field: "createDate", width: 150 },
145
167
  {
146
168
  width: 47,
147
- fixed: 'right',
148
- title: '',
149
- sortable: false
150
- }
169
+ fixed: "right",
170
+ title: "",
171
+ sortable: false,
172
+ },
151
173
  ],
152
174
  config: {
153
175
  checkboxConfig: {
154
176
  checkStrictly: true,
155
177
  showHeader: this.selectMulti,
156
- trigger: 'row'
157
- }
158
- }
178
+ trigger: "row",
179
+ },
180
+ },
159
181
  };
160
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
182
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
161
183
  that.vxeOption = opts;
162
184
  });
163
- }
164
- }
185
+ },
186
+ },
165
187
  };
166
188
  </script>
@@ -150,8 +150,16 @@
150
150
  v-model="fourthItem.hasAuth"
151
151
  @change="changeBtnSelect(subItem, index3, index4)"
152
152
  ></el-checkbox>
153
+ <authConfig
154
+ v-if="thrItem.checkPermission"
155
+ :formData="thrItem"
156
+ ></authConfig>
153
157
  </div>
154
158
  </div>
159
+ <authConfig
160
+ v-if="subItem.checkPermission"
161
+ :formData="subItem"
162
+ ></authConfig>
155
163
  </div>
156
164
  </div>
157
165
  </div>
@@ -219,10 +227,13 @@
219
227
  </template>
220
228
 
221
229
  <script>
230
+ import authConfig from "./authConfig.vue";
222
231
  export default {
223
232
  name: "roleEdit",
224
233
  props: ["_dataId"],
225
- components: {},
234
+ components: {
235
+ authConfig,
236
+ },
226
237
  data() {
227
238
  return {
228
239
  tabIndex: 0,
@@ -231,6 +242,8 @@ export default {
231
242
  role: {
232
243
  menus: [],
233
244
  mobileMenuIds: [],
245
+ menuRolePermDTOs: [],
246
+ menuRolePermOrgDTOs: [],
234
247
  },
235
248
  allMenus: [],
236
249
  allMobileMenus: [],
@@ -267,14 +280,51 @@ export default {
267
280
  isLoading: true,
268
281
  modalStrictly: true,
269
282
  success: (res) => {
270
- this.role = res.objx || {};
271
- this.initMenuData();
283
+ let role = res.objx || {};
284
+ this.getPermissionData((rows, orgRows) => {
285
+ role.menuRolePermDTOs = rows;
286
+ role.menuRolePermOrgDTOs = orgRows;
287
+ this.role = role;
288
+ this.initMenuData();
289
+ });
272
290
  },
273
291
  });
274
292
  } else {
275
293
  this.initMenuData();
276
294
  }
277
295
  },
296
+ getPermissionData(callback) {
297
+ this.$http({
298
+ url: USER_PREFIX + `/menu_role_perm/listPerms`,
299
+ method: `post`,
300
+ data: {
301
+ id: this.dataId,
302
+ },
303
+ isLoading: true,
304
+ modalStrictly: true,
305
+ success: (res) => {
306
+ let rows = res.objx || [];
307
+ this.getListPermOrgs((orgRows) => {
308
+ callback(rows, orgRows);
309
+ });
310
+ },
311
+ });
312
+ },
313
+ getListPermOrgs(callback) {
314
+ this.$http({
315
+ url: USER_PREFIX + `/menu_role_perm/listPermOrgs`,
316
+ method: `post`,
317
+ data: {
318
+ id: this.dataId,
319
+ },
320
+ isLoading: true,
321
+ modalStrictly: true,
322
+ success: (res) => {
323
+ let rows = res.objx || [];
324
+ callback(rows);
325
+ },
326
+ });
327
+ },
278
328
  saveData() {
279
329
  this.$refs.editForm.$baseValidate((valid) => {
280
330
  if (valid) {
@@ -284,6 +334,9 @@ export default {
284
334
  formData.menuIds = this.getMenuFormData();
285
335
  formData.mobileMenuIds = this.getMobileMenuFormData();
286
336
 
337
+ //处理权限数据
338
+ this.handleDataBeforeSubmit();
339
+
287
340
  this.$http({
288
341
  url: url,
289
342
  method: `post`,
@@ -394,7 +447,7 @@ export default {
394
447
  subItem.hasAuth = isCheckSubItem;
395
448
  this.$forceUpdate();
396
449
  },
397
- getMenuFormData() {
450
+ getMenuFormData(item, menuRolePermDTOs, menuRolePermOrgDTOs) {
398
451
  let selectIds = [];
399
452
  let menus = this.allMenus;
400
453
  menus.forEach(function (item) {
@@ -425,6 +478,41 @@ export default {
425
478
  });
426
479
  return selectIds;
427
480
  },
481
+ handlePermission(item, menuRolePermDTOs, menuRolePermOrgDTOs) {
482
+ if (item.checkPermission) {
483
+ if (item.permissions) {
484
+ menuRolePermDTOs.push({
485
+ menus: item.id,
486
+ permissions: item.permissions,
487
+ });
488
+
489
+ if (item.permissions === 2 && item.menuRolePermOrgDTOs.length) {
490
+ menuRolePermOrgDTOs.push(...item.menuRolePermOrgDTOs);
491
+ }
492
+ }
493
+ }
494
+ },
495
+ handleDataBeforeSubmit() {
496
+ let menuRolePermDTOs = [];
497
+ let menuRolePermOrgDTOs = [];
498
+ let that = this;
499
+ let menus = this.allMenus;
500
+ menus.forEach(function (item) {
501
+ that.handlePermission(item, menuRolePermDTOs, menuRolePermOrgDTOs);
502
+ if (item.children) {
503
+ item.children.forEach(function (subItem) {
504
+ that.handlePermission(subItem, menuRolePermDTOs, menuRolePermOrgDTOs);
505
+ if (subItem.children) {
506
+ subItem.children.forEach(function (thrItem) {
507
+ that.handlePermission(thrItem, menuRolePermDTOs, menuRolePermOrgDTOs);
508
+ });
509
+ }
510
+ });
511
+ }
512
+ });
513
+ this.role.menuRolePermDTOs = menuRolePermDTOs;
514
+ this.role.menuRolePermOrgDTOs = menuRolePermOrgDTOs;
515
+ },
428
516
  getMobileMenuFormData() {
429
517
  let selectIds = [];
430
518
  let menus = this.allMobileMenus;
@@ -457,9 +545,31 @@ export default {
457
545
  return selectIds;
458
546
  },
459
547
  handleRoles(rows, menuIds) {
548
+ let menuRolePermDTOs = this.role.menuRolePermDTOs || [];
549
+ let menuRolePermOrgDTOs = this.role.menuRolePermOrgDTOs || [];
460
550
  let newRows = [];
461
551
  for (let i = 0; i < rows.length; i++) {
462
552
  let row = rows[i];
553
+ let permissions = null;
554
+ let permOrgDTOs = [];
555
+ if (row.checkPermission) {
556
+ menuRolePermDTOs.find((item) => {
557
+ if (item.menus == row.id) {
558
+ permissions = item.permissions;
559
+ return true;
560
+ }
561
+ return false;
562
+ });
563
+
564
+ menuRolePermOrgDTOs.forEach((item) => {
565
+ if (item.menus == row.id) {
566
+ permOrgDTOs.push(item);
567
+ }
568
+ });
569
+ }
570
+
571
+ row.permissions = permissions;
572
+ row.menuRolePermOrgDTOs = permOrgDTOs;
463
573
  if (menuIds.includes(row.id)) {
464
574
  row.hasAuth = true;
465
575
  } else {