cloud-web-corejs 1.0.163 → 1.0.165

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 (66) 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/bd/setting/config_manage/list.vue +7 -0
  59. package/src/views/user/area/dialog.vue +223 -116
  60. package/src/views/user/area/list.vue +318 -0
  61. package/src/views/user/form/vform/render.vue +54 -36
  62. package/src/views/user/form/view/list.vue +103 -10
  63. package/src/views/user/menu/list.vue +24 -1
  64. package/src/views/user/role/authConfig.vue +89 -0
  65. package/src/views/user/role/dialog.vue +70 -48
  66. package/src/views/user/role/edit.vue +114 -4
@@ -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 {