super-page-designer 2.0.79 → 2.0.83

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 (72) hide show
  1. package/dist/es/components/design/utils/assemblys-config.js +24 -24
  2. package/dist/es/components/design/utils/form-design-util.d.ts +17 -1
  3. package/dist/es/components/design/utils/form-design-util.js +112 -4
  4. package/dist/es/components/design/utils/interfaces/page-design-types.d.ts +2 -1
  5. package/dist/es/components/design/utils/page-design-util.d.ts +1 -0
  6. package/dist/es/components/design/utils/page-design-util.js +27 -0
  7. package/dist/es/components/design/utils/page-table-util.js +31 -10
  8. package/dist/es/components/design/views/assemblys/button/button/button-attr-advanced.vue.js +9 -13
  9. package/dist/es/components/design/views/assemblys/button/button-group/buttongroup-design.vue2.js +3 -18
  10. package/dist/es/components/design/views/assemblys/button/component/combination.vue.js +15 -13
  11. package/dist/es/components/design/views/assemblys/button/component/set-dialog.vue.js +13 -6
  12. package/dist/es/components/design/views/assemblys/button/export-pdf/exportpdf-attr-advanced.vue.js +2 -2
  13. package/dist/es/components/design/views/assemblys/button/print-label/printlabel-attr-advanced.vue.js +2 -2
  14. package/dist/es/components/design/views/assemblys/chart/column-line/column-line-design.vue2.js +2 -0
  15. package/dist/es/components/design/views/assemblys/common/common-advanced-basic-showcondition.vue.js +8 -7
  16. package/dist/es/components/design/views/assemblys/common/common-variable-bind-option.js +4 -0
  17. package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.d.ts +1 -1
  18. package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.js +1 -1
  19. package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue3.js +6 -3
  20. package/dist/es/components/design/views/assemblys/container/card/card-design.vue2.js +3 -20
  21. package/dist/es/components/design/views/assemblys/container/collapse/collapse-design.vue2.js +3 -20
  22. package/dist/es/components/design/views/assemblys/container/container/container-design.vue2.js +3 -20
  23. package/dist/es/components/design/views/assemblys/container/flex/flex-design.vue2.js +3 -20
  24. package/dist/es/components/design/views/assemblys/container/form/form-design.vue2.js +3 -20
  25. package/dist/es/components/design/views/assemblys/container/tabs/tabs-design.vue2.js +4 -20
  26. package/dist/es/components/design/views/assemblys/container/tools/tools-design.vue2.js +3 -20
  27. package/dist/es/components/design/views/assemblys/data/component/column-config.vue.js +1 -1
  28. package/dist/es/components/design/views/assemblys/data/component/data-origin.vue.js +1 -1
  29. package/dist/es/components/design/views/assemblys/data/component/data-origin.vue2.js +2 -3
  30. package/dist/es/components/design/views/assemblys/data/component/dynamic-column.vue.js +3 -5
  31. package/dist/es/components/design/views/assemblys/data/table/table-attr.vue2.js +16 -16
  32. package/dist/es/components/design/views/assemblys/data/table/table-design.vue.js +1 -1
  33. package/dist/es/components/design/views/assemblys/data/table/table-design.vue2.js +5 -3
  34. package/dist/es/components/design/views/assemblys/data/table/tablecolumn-attr-base.vue.js +5 -1560
  35. package/dist/es/components/design/views/assemblys/data/table/tablecolumn-attr-base.vue2.js +1908 -1
  36. package/dist/es/components/design/views/assemblys/form/checkbox/checkbox-attr-base.vue.js +9 -12
  37. package/dist/es/components/design/views/assemblys/form/common/condition.vue.js +11 -7
  38. package/dist/es/components/design/views/assemblys/form/common/data-format.vue.js +1 -1
  39. package/dist/es/components/design/views/assemblys/form/common/data-origin.vue.js +1 -1
  40. package/dist/es/components/design/views/assemblys/form/common/data-origin.vue2.js +36 -92
  41. package/dist/es/components/design/views/assemblys/form/common/dataorigin-input-table.vue.js +1 -152
  42. package/dist/es/components/design/views/assemblys/form/common/dataorigin-input-table.vue2.js +152 -1
  43. package/dist/es/components/design/views/assemblys/form/common/suffixmodule.vue.js +2 -1
  44. package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-attr-base.vue.js +13 -14
  45. package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-design.vue2.js +5 -0
  46. package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-attr-base.vue.js +9 -12
  47. package/dist/es/components/design/views/assemblys/form/divider/divider-attr-base.vue.js +2 -1
  48. package/dist/es/components/design/views/assemblys/form/file-upload/fileupload-attr-base.vue.js +5 -10
  49. package/dist/es/components/design/views/assemblys/form/input-number/input-number-attr-base.vue.js +7 -11
  50. package/dist/es/components/design/views/assemblys/form/input-text/inputtext-attr-base.vue.js +13 -11
  51. package/dist/es/components/design/views/assemblys/form/label/label-attr-base.vue.js +7 -11
  52. package/dist/es/components/design/views/assemblys/form/link/link-attr-base.vue.js +7 -11
  53. package/dist/es/components/design/views/assemblys/form/placeholder/placeholder-attr-base.vue.js +5 -10
  54. package/dist/es/components/design/views/assemblys/form/radio/radio-attr-base.vue.js +7 -11
  55. package/dist/es/components/design/views/assemblys/form/rich-text/richtext-attr-base.vue.js +7 -11
  56. package/dist/es/components/design/views/assemblys/form/select/select-attr-base.vue.js +7 -11
  57. package/dist/es/components/design/views/assemblys/form/switch/switch-attr-base.vue.js +7 -11
  58. package/dist/es/components/design/views/assemblys/form/tag/tag-attr-base.vue.js +7 -11
  59. package/dist/es/components/design/views/assemblys/form/textarea/textarea-attr-base.vue.js +7 -11
  60. package/dist/es/components/design/views/assemblys/object-design.vue.js +14 -2
  61. package/dist/es/components/design/views/assemblys/page/component/setting-form-rule-base-input.vue.d.ts +9 -0
  62. package/dist/es/components/design/views/assemblys/page/component/setting-form-rule-base-input.vue.js +21 -10
  63. package/dist/es/components/design/views/assemblys/page/page-attr-advanced.vue.js +8 -3
  64. package/dist/es/components/design/views/assemblys/workflow/component/combination.vue.js +9 -7
  65. package/dist/es/components/design/views/design/page-design.vue.js +4 -0
  66. package/dist/es/components/design/views/design/page-event/page-event-content.vue.js +32 -3
  67. package/dist/es/components/design/views/design/view/attr-container.vue.js +1 -1
  68. package/dist/es/components/design/views/design/view/page-switch.vue.js +1 -1
  69. package/dist/es/components/design/views/design/view/page-switch.vue2.js +1 -3
  70. package/dist/es/components/design/views/design/view/view-design-display.vue.js +3 -20
  71. package/dist/es/style.css +17 -12
  72. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import { defineAsyncComponent } from "vue";
2
- import { getUuidv4, deepCopy } from "./common-util.js";
2
+ import { deepCopy, getUuidv4 } from "./common-util.js";
3
3
  import groupContainer from "../../../assets/images/group-container.png.js";
4
4
  import containerForm from "../../../assets/images/container/container-form.png.js";
5
5
  import containerFLex from "../../../assets/images/container/container-flex.png.js";
@@ -46,7 +46,7 @@ import formCustom from "../../../assets/images/form/form-custom.png.js";
46
46
  import barcode from "../../../assets/images/data/barcode.png.js";
47
47
  import workflowHistoryImg from "../../../assets/images/workflow/workflow-history-img.png.js";
48
48
  const tableOperateColumnConf = {
49
- uuid: getUuidv4(),
49
+ uuid: "",
50
50
  name: "",
51
51
  props: {
52
52
  base: {
@@ -104,7 +104,7 @@ const tableOperateColumnConf = {
104
104
  }
105
105
  };
106
106
  const tableIndexColumnConf = {
107
- uuid: getUuidv4(),
107
+ uuid: "",
108
108
  name: "",
109
109
  props: {
110
110
  base: {
@@ -161,7 +161,7 @@ const tableIndexColumnConf = {
161
161
  }
162
162
  };
163
163
  const tableSelectionColumnConf = {
164
- uuid: getUuidv4(),
164
+ uuid: "",
165
165
  name: "",
166
166
  props: {
167
167
  base: {
@@ -216,9 +216,14 @@ const tableSelectionColumnConf = {
216
216
  tittleClass: ""
217
217
  }
218
218
  };
219
+ function getCopyColumn(columnConf) {
220
+ let copyColumn = deepCopy(columnConf);
221
+ copyColumn.uuid = getUuidv4();
222
+ return copyColumn;
223
+ }
219
224
  function getTableColumnConf(fieldInfo) {
220
- return {
221
- uuid: getUuidv4(),
225
+ const columnConf = {
226
+ uuid: "",
222
227
  isTable: true,
223
228
  // 是否是表格组件
224
229
  name: "",
@@ -274,6 +279,7 @@ function getTableColumnConf(fieldInfo) {
274
279
  tittleClass: ""
275
280
  }
276
281
  };
282
+ return getCopyColumn(columnConf);
277
283
  }
278
284
  const assemblyGroups = [{
279
285
  name: "container",
@@ -283,7 +289,7 @@ const assemblyGroups = [{
283
289
  name: "form",
284
290
  label: "表单",
285
291
  icon: containerForm,
286
- props: { size: { widthType: "flex", flexSpan: 24 } },
292
+ props: { base: {}, size: { widthType: "flex", flexSpan: 24 } },
287
293
  style: {},
288
294
  events: [
289
295
  { name: "beforeFormLoad", label: "加载表单数据前", tip: "还没有加载表单数据时" },
@@ -1236,9 +1242,9 @@ const assemblyGroups = [{
1236
1242
  }
1237
1243
  ],
1238
1244
  items: [
1239
- tableSelectionColumnConf,
1240
- tableIndexColumnConf,
1241
- tableOperateColumnConf
1245
+ getTableSelectionConf(),
1246
+ getTableIndexConf(),
1247
+ getTableOperateConf()
1242
1248
  ],
1243
1249
  modelFields: [],
1244
1250
  props: {
@@ -2479,19 +2485,13 @@ function getPageConf() {
2479
2485
  return tempConf;
2480
2486
  }
2481
2487
  function getTableOperateConf() {
2482
- const conf = deepCopy(tableOperateColumnConf);
2483
- conf.uuid = getUuidv4();
2484
- return conf;
2488
+ return getCopyColumn(tableOperateColumnConf);
2485
2489
  }
2486
2490
  function getTableIndexConf() {
2487
- const conf = deepCopy(tableIndexColumnConf);
2488
- conf.uuid = getUuidv4();
2489
- return conf;
2491
+ return getCopyColumn(tableIndexColumnConf);
2490
2492
  }
2491
2493
  function getTableSelectionConf() {
2492
- const conf = deepCopy(tableSelectionColumnConf);
2493
- conf.uuid = getUuidv4();
2494
- return conf;
2494
+ return getCopyColumn(tableSelectionColumnConf);
2495
2495
  }
2496
2496
  const standardButtonOperations = [
2497
2497
  {
@@ -2678,9 +2678,9 @@ function getInitialInformationByName(name) {
2678
2678
  for (let j = 0; j < items.length; j++) {
2679
2679
  let item = items[j];
2680
2680
  if (item.name == name) {
2681
- initUse.props = item.props;
2682
- initUse.style = item.style;
2683
- initUse.events = item.events;
2681
+ initUse.props = deepCopy(item.props);
2682
+ initUse.style = deepCopy(item.style);
2683
+ initUse.events = deepCopy(item.events);
2684
2684
  initUse.label = item.label;
2685
2685
  return initUse;
2686
2686
  }
@@ -2694,8 +2694,8 @@ function getDesignEvents(name) {
2694
2694
  let items = assemblyGroups[i].items;
2695
2695
  for (let j = 0; j < items.length; j++) {
2696
2696
  let item = items[j];
2697
- if (item.name == name) {
2698
- return item.events;
2697
+ if (item.name == name && item.events) {
2698
+ return deepCopy(item.events);
2699
2699
  }
2700
2700
  }
2701
2701
  }
@@ -182,4 +182,20 @@ export declare function deleteRule(pageDesign: any, configure: any): void;
182
182
  * @param {*}
183
183
  * @return {*}
184
184
  */
185
- export declare function resetConfigIndo(configure: object, val: string): void;
185
+ export declare function resetConfigIndo(configure: any, val: string): boolean;
186
+ export declare function componentNameChange(configure: Component, componentName: any, emit: any): void;
187
+ /**
188
+ * 获得引用表字段集合(例如:1对1子表字段、主表字段)
189
+ * @param configure 字段配置,主要使用prop属性名,例如:data.DEMO_SUPPPLIER.MY_NAME
190
+ * @param runtimePropMap
191
+ * @param oldProp 修改之前的属性名
192
+ * @return {tableName:[字段名,... ...],tableName:[字段名,... ...]}
193
+ */
194
+ export declare function getRefrencePropMap(newProp: string, oldProp: string, runtimePropMap: any): void;
195
+ /**
196
+ * 删除指定引用字段
197
+ * @param prop
198
+ * @param runtimePropMap
199
+ * @returns
200
+ */
201
+ export declare function removePropFromRefrencePropMap(prop: string, runtimePropMap: any): void;
@@ -1,6 +1,9 @@
1
1
  import { usePageContextStore } from "../../../stores/page-store.js";
2
2
  import { getComponentOptionConfigs } from "super-page-runtime";
3
3
  import { getInitialInformationByName } from "./assemblys-config.js";
4
+ import { deepCopy } from "./common-util.js";
5
+ import { ElMessage } from "element-plus";
6
+ import { tableResetConfigIndo } from "./page-table-util.js";
4
7
  function caculateDetailComponentStyle(configure, designStyle, designClass, designHeaderStyle) {
5
8
  const tempStyle = {};
6
9
  const tempHeaderStyle = {};
@@ -463,17 +466,122 @@ function packageStringRuleByDataType(fieldInfo, type, rule) {
463
466
  }
464
467
  function resetConfigIndo(configure, val) {
465
468
  let moduleInfo = getInitialInformationByName(val);
466
- configure.props = moduleInfo.props;
467
- configure.style = moduleInfo.style;
468
- configure.events = moduleInfo.events;
469
- configure.label = moduleInfo.label;
469
+ if (moduleInfo) {
470
+ const eventMap = changeEventToMap(moduleInfo.events);
471
+ let newEvents = {};
472
+ let isCanRest = true;
473
+ const bindEvents = configure.events.filter((event) => {
474
+ return !event.isStandard && event.jsContent || event.isStandard && event.eventName;
475
+ });
476
+ if (bindEvents) {
477
+ for (let i = 0; i < bindEvents.length; i++) {
478
+ const item = bindEvents[i];
479
+ const event = eventMap[item.name];
480
+ if (event) {
481
+ newEvents[item.name] = deepCopy(item);
482
+ } else {
483
+ isCanRest = false;
484
+ ElMessage({
485
+ showClose: true,
486
+ message: "事件:[" + item.name + "]已绑定事件,请先备份事件内容,并清除绑定的事件,再切换组件类型",
487
+ type: "warning",
488
+ duration: 5e3
489
+ });
490
+ break;
491
+ }
492
+ }
493
+ }
494
+ if (isCanRest) {
495
+ let newEventsArr = [];
496
+ moduleInfo.events.forEach((item) => {
497
+ const eventName = item.name;
498
+ if (newEvents[eventName]) {
499
+ newEvents[eventName].componentUuid = configure.uuid;
500
+ newEvents[eventName].componentLabel = val;
501
+ newEvents[eventName].title = configure.props.base.title;
502
+ newEventsArr.push(newEvents[item.name]);
503
+ } else {
504
+ newEventsArr.push(item);
505
+ }
506
+ });
507
+ configure.name = val;
508
+ configure.events = newEventsArr;
509
+ Object.assign(moduleInfo.props, deepCopy(configure.props));
510
+ configure.props = moduleInfo.props;
511
+ Object.assign(moduleInfo.style, deepCopy(configure.style));
512
+ configure.style = moduleInfo.style;
513
+ configure.label = moduleInfo.label;
514
+ return true;
515
+ } else {
516
+ return false;
517
+ }
518
+ } else {
519
+ return false;
520
+ }
521
+ }
522
+ function changeEventToMap(events) {
523
+ let eventMap = {};
524
+ if (events) {
525
+ events.forEach((item) => {
526
+ eventMap[item.name] = item;
527
+ });
528
+ }
529
+ return eventMap;
530
+ }
531
+ function componentNameChange(configure, componentName, emit) {
532
+ let isCanReset = true;
533
+ if (configure.isTable) {
534
+ tableResetConfigIndo(configure, componentName);
535
+ } else {
536
+ isCanReset = resetConfigIndo(configure, componentName);
537
+ }
538
+ if (isCanReset) {
539
+ emit("changeAssembly", configure);
540
+ }
541
+ }
542
+ function getRefrencePropMap(newProp, oldProp, runtimePropMap) {
543
+ removePropFromRefrencePropMap(oldProp, runtimePropMap);
544
+ let props = [];
545
+ if (newProp) {
546
+ props = newProp.split(".");
547
+ }
548
+ if (props.length >= 3) {
549
+ const refrenceTableName = props[1];
550
+ const fieldName = props[2].substring(0, props[2].lastIndexOf("}"));
551
+ if (!runtimePropMap[refrenceTableName]) {
552
+ runtimePropMap[refrenceTableName] = [];
553
+ }
554
+ if (runtimePropMap[refrenceTableName].indexOf(fieldName) < 0) {
555
+ runtimePropMap[refrenceTableName].push(fieldName);
556
+ }
557
+ }
558
+ }
559
+ function removePropFromRefrencePropMap(prop, runtimePropMap) {
560
+ let props = [];
561
+ if (prop) {
562
+ props = prop.split(".");
563
+ }
564
+ if (props.length >= 3) {
565
+ const refrenceTableName = props[1];
566
+ const fieldName = props[2].substring(0, props[2].lastIndexOf("}"));
567
+ if (!runtimePropMap[refrenceTableName]) {
568
+ return;
569
+ }
570
+ if (runtimePropMap[refrenceTableName].indexOf(fieldName) > 0) {
571
+ const newArr = runtimePropMap[refrenceTableName].filter((item) => item !== fieldName);
572
+ runtimePropMap[refrenceTableName] = newArr;
573
+ }
574
+ }
470
575
  }
471
576
  export {
472
577
  caculateComponentProps,
473
578
  caculateDetailComponentStyle,
474
579
  columnCustomTittleClass,
475
580
  columnTittleStyle,
581
+ componentNameChange,
582
+ getRefrencePropMap,
476
583
  removComponentOptionConfigs,
584
+ removePropFromRefrencePropMap,
477
585
  resetConfigIndo,
478
586
  watchMaxOrMinValidate,
479
587
  watchPatternValidate,
@@ -97,6 +97,7 @@ export interface ComponentEvent extends Object {
97
97
  name: string;
98
98
  label: string;
99
99
  params?: ComponentEventParam[];
100
+ componentUuid?: string;
100
101
  }
101
102
  /**
102
103
  * 事件对象
@@ -248,7 +249,7 @@ export interface ListColumn {
248
249
  displayOrder: number;
249
250
  fileSet: string | null | undefined;
250
251
  orgTreeSet: string | null | undefined;
251
- dynamicColumnJson?: string;
252
+ dynamicColumnJson?: string | null | undefined;
252
253
  valueSetOptions: string | null | undefined;
253
254
  required: boolean;
254
255
  pattern: string;
@@ -2,3 +2,4 @@ export declare function queryWorkflowsRequest(tableName: any, systemCode: any, p
2
2
  export declare function createWorkflowRequest(tableName: any, pageName: any, systemCode: any, publishVersion: any): any;
3
3
  export declare function getHighestVersionDefinition(wfDefinitionCode: any, defVersion: any, publishVersion: any): any;
4
4
  export declare function getPublishVersionsByCode(systemCode: any): any;
5
+ export declare function deleteDesignItem(items: any, sourceItem: any, isShowChildrenTip: any, isDeleteSourceItem: boolean): void;
@@ -1,4 +1,6 @@
1
1
  import http from "agilebuilder-ui/src/utils/request";
2
+ import { ElMessageBox } from "element-plus";
3
+ import eventBus from "./eventBus.js";
2
4
  function queryWorkflowsRequest(tableName, systemCode, publishVersion) {
3
5
  const params = {
4
6
  appCode: systemCode,
@@ -32,8 +34,33 @@ function getHighestVersionDefinition(wfDefinitionCode, defVersion, publishVersio
32
34
  params
33
35
  );
34
36
  }
37
+ function deleteDesignItem(items, sourceItem, isShowChildrenTip, isDeleteSourceItem) {
38
+ if (isShowChildrenTip) {
39
+ ElMessageBox.confirm("还有子元素,确定要删除吗?", "删除", {
40
+ confirmButtonText: "确认",
41
+ cancelButtonText: "取消",
42
+ type: "warning"
43
+ }).then(() => {
44
+ _deleteItem(items, sourceItem);
45
+ }).catch((err) => {
46
+ console.log(err);
47
+ });
48
+ } else if (isDeleteSourceItem) {
49
+ _deleteItem(items, sourceItem);
50
+ }
51
+ }
52
+ function _deleteItem(items, sourceItem) {
53
+ if (sourceItem && sourceItem.name === "table") {
54
+ eventBus.$off("reloadTable-" + sourceItem.uuid);
55
+ }
56
+ const index = items.indexOf(sourceItem);
57
+ if (index > -1) {
58
+ items.splice(index, 1);
59
+ }
60
+ }
35
61
  export {
36
62
  createWorkflowRequest,
63
+ deleteDesignItem,
37
64
  getHighestVersionDefinition,
38
65
  queryWorkflowsRequest
39
66
  };
@@ -35,11 +35,14 @@ function setTableRuntimesFromConfigure(tableConfigure, pageDesign) {
35
35
  }
36
36
  pageDesign.tableRuntimes[configureCopy.uuid] = getListView(configureCopy, pageDesign, tableConfigureStr);
37
37
  delete tableConfigure.btnList;
38
- delete tableConfigure.events;
39
38
  delete tableConfigure.items;
40
39
  delete tableConfigure.modelFields;
41
- delete tableConfigure.props;
42
- delete tableConfigure.runtime;
40
+ if (tableConfigure.runtime && tableConfigure.runtime.events) {
41
+ const { events } = tableConfigure.runtime;
42
+ tableConfigure.runtime = { events };
43
+ } else {
44
+ delete tableConfigure.runtime;
45
+ }
43
46
  }
44
47
  function getListView(configureCopy, pageDesign, tableConfigureStr) {
45
48
  const listCode = "V" + pageDesign.version + "__" + pageDesign.code + "__" + configureCopy.uuid;
@@ -158,7 +161,7 @@ function getListColumns(configure, pageDesign) {
158
161
  // 控件属性配置
159
162
  controlConfig: getControlConfig(item),
160
163
  //事件类型,json格式,格式为:{input:funName1,blur:funName2,focus:funName3,...},funName1、funName2等方法名,通过列表的options.eventCallBack传入
161
- // eventType: string
164
+ eventType: getListColumnEvent(item),
162
165
  /**
163
166
  * 显示顺序,多层级关系,可能值有重复
164
167
  * 如有第一层级的顺序1,有第二层级的顺序1
@@ -169,7 +172,7 @@ function getListColumns(configure, pageDesign) {
169
172
  //组织结构树参数设置
170
173
  orgTreeSet: getOrgTreeSet(item),
171
174
  // 字段为动态列时,json
172
- // dynamicColumnJson: string
175
+ dynamicColumnJson: getDynamicColumnJson(item),
173
176
  // 值设置,设置多个
174
177
  valueSetOptions: getValueSetOptions(item),
175
178
  // 是否必填
@@ -189,9 +192,6 @@ function getListColumns(configure, pageDesign) {
189
192
  */
190
193
  // ifMultiData: boolean
191
194
  };
192
- if (item.props.base.prop && item.props.base.prop === "dynamicColumnSelect") {
193
- formatDynamicColumnData(item, temp);
194
- }
195
195
  listColumns.push(temp);
196
196
  });
197
197
  return listColumns;
@@ -426,8 +426,28 @@ function getNameFromProp(prop) {
426
426
  }
427
427
  return prop;
428
428
  }
429
- function formatDynamicColumnData(item, temp) {
430
- temp.dynamicColumnJson = JSON.stringify(item.props.dataOrigin.dynamicColumnJson);
429
+ function getListColumnEvent(item, pageDesign) {
430
+ let result = null;
431
+ if (item.events) {
432
+ item.events.forEach((event) => {
433
+ if (event.jsContent && event.jsContent.trim()) {
434
+ if (!result) {
435
+ result = {};
436
+ }
437
+ result[event.name] = event.componentUuid + "_" + event.name;
438
+ }
439
+ });
440
+ if (result) {
441
+ return JSON.stringify(result);
442
+ }
443
+ }
444
+ return result;
445
+ }
446
+ function getDynamicColumnJson(item) {
447
+ if (item.props.base.prop && item.props.base.prop === "dynamicColumnSelect") {
448
+ return JSON.stringify(item.props.dynamicColumnData);
449
+ }
450
+ return null;
431
451
  }
432
452
  function tableResetConfigIndo(configure, moduleValue) {
433
453
  let newColumnInfo = {
@@ -450,6 +470,7 @@ function tableResetConfigIndo(configure, moduleValue) {
450
470
  configure.props.verification = newColumnInfo.verification;
451
471
  configure.props.definition = newColumnInfo.definition;
452
472
  configure.events = getDesignEvents(moduleValue);
473
+ configure.name = "table";
453
474
  }
454
475
  export {
455
476
  querySublist,
@@ -91,7 +91,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
91
91
  combinationVisible.value = false;
92
92
  }
93
93
  function saveCondition(table) {
94
- props.configure.props.base.showCondition = JSON.stringify(table);
94
+ props.configure.props.base.showConditions = JSON.stringify(table);
95
95
  }
96
96
  return (_ctx, _cache) => {
97
97
  const _component_el_option = resolveComponent("el-option");
@@ -108,7 +108,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
108
108
  default: withCtx(() => [
109
109
  createVNode(_component_el_collapse, {
110
110
  modelValue: openCollapseItems.value,
111
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => openCollapseItems.value = $event),
111
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => openCollapseItems.value = $event),
112
112
  style: { "margin-top": "6px" }
113
113
  }, {
114
114
  default: withCtx(() => [
@@ -230,15 +230,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
230
230
  class: "amb-design-attr-item"
231
231
  }, {
232
232
  default: withCtx(() => [
233
- createVNode(_component_el_button, {
234
- type: "primary",
235
- onClick: _cache[4] || (_cache[4] = ($event) => combinationVisible.value = true)
236
- }, {
237
- default: withCtx(() => [
238
- createTextVNode("编辑")
239
- ]),
240
- _: 1
241
- })
233
+ (openBlock(), createBlock(_sfc_main$1, {
234
+ key: __props.configure.uuid + "_show",
235
+ configure: __props.configure,
236
+ type: "showConditions"
237
+ }, null, 8, ["configure"]))
242
238
  ]),
243
239
  _: 1
244
240
  }),
@@ -249,7 +245,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
249
245
  default: withCtx(() => [
250
246
  createVNode(_component_el_button, {
251
247
  type: "primary",
252
- onClick: _cache[5] || (_cache[5] = ($event) => journalSetVisible.value = true)
248
+ onClick: _cache[4] || (_cache[4] = ($event) => journalSetVisible.value = true)
253
249
  }, {
254
250
  default: withCtx(() => [
255
251
  createTextVNode("编辑")
@@ -278,7 +274,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
278
274
  }, null, 8, ["pageDesign", "configure"])) : createCommentVNode("", true),
279
275
  combinationVisible.value ? (openBlock(), createBlock(_sfc_main$4, {
280
276
  key: 2,
281
- conditionList: __props.configure.props.base.showCondition,
277
+ conditionList: __props.configure.props.base.showConditions,
282
278
  fieldNameList: __props.pageDesign.modelFields,
283
279
  fieldMap: __props.pageDesign.modelFieldsMap,
284
280
  onSave: saveCondition,
@@ -2,7 +2,8 @@ import { defineComponent, ref, watch, resolveComponent, openBlock, createBlock,
2
2
  import _sfc_main$1 from "../../object-design.vue.js";
3
3
  import { caculateDetailComponentStyle, caculateComponentProps } from "../../../../utils/form-design-util.js";
4
4
  import { useDraggable } from "vue-draggable-plus";
5
- import { ElMessageBox } from "element-plus";
5
+ import "element-plus";
6
+ import { deleteDesignItem } from "../../../../utils/page-design-util.js";
6
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
8
  __name: "buttongroup-design",
8
9
  props: {
@@ -68,23 +69,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
68
69
  items.splice(index, 0, copyObj);
69
70
  }
70
71
  function deleteItem(sourceItem) {
71
- let items = btnItems;
72
- ElMessageBox.confirm(
73
- "还有子元素,确定要删除吗?",
74
- "删除",
75
- {
76
- confirmButtonText: "确认",
77
- cancelButtonText: "取消",
78
- type: "warning"
79
- }
80
- ).then(() => {
81
- const index = items.indexOf(sourceItem);
82
- if (index > -1) {
83
- items.splice(index, 1);
84
- }
85
- }).catch((err) => {
86
- console.log(err);
87
- });
72
+ deleteDesignItem(btnItems, sourceItem, true, false);
88
73
  }
89
74
  return (_ctx, _cache) => {
90
75
  const _component_el_button_group = resolveComponent("el-button-group");
@@ -38,8 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38
38
  onMounted(() => {
39
39
  if (props.conditionList) {
40
40
  tableData.value = JSON.parse(props.conditionList);
41
- }
42
- if (props.list) {
41
+ } else if (props.list) {
43
42
  tableData.value = props.list;
44
43
  }
45
44
  });
@@ -60,18 +59,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
59
  operationArr.value.push([]);
61
60
  }
62
61
  function afterBindDefaultValue(modelValue, row) {
63
- row.defaultValue = modelValue;
62
+ row.propValue = modelValue;
64
63
  }
65
- function changeFieldName(index, propName) {
66
- const item = props.fieldMap[propName];
64
+ function changeFieldName(index, row, propDbName) {
65
+ const item = props.fieldMap[propDbName];
66
+ row["dataType"] = item.dataType;
67
+ row["propName"] = item.name;
67
68
  operationArr.value[index] = getOperators(item);
68
69
  }
69
70
  function savebuttonSetting() {
70
71
  if (tableData.value && tableData.value.length > 0) {
71
- for (var i = 0; i < tableData.value.length; i++) {
72
+ for (let i = 0; i < tableData.value.length; i++) {
72
73
  const item = tableData.value[i];
73
- if (!item.propName) {
74
- return ElMessage.warning("字段名或值有空白");
74
+ if (!item.propName || !item.propValue) {
75
+ return ElMessage.warning("" + i + "行字段名或值有空白");
75
76
  }
76
77
  }
77
78
  }
@@ -180,11 +181,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
180
181
  }, {
181
182
  default: withCtx((scope) => [
182
183
  createVNode(_component_el_select, {
183
- modelValue: scope.row.propName,
184
- "onUpdate:modelValue": ($event) => scope.row.propName = $event,
184
+ modelValue: scope.row.propDbName,
185
+ "onUpdate:modelValue": ($event) => scope.row.propDbName = $event,
185
186
  clearable: "",
187
+ filterable: "",
186
188
  size: "default",
187
- onChange: ($event) => changeFieldName(scope.$index, scope.row.propName)
189
+ onChange: ($event) => changeFieldName(scope.$index, scope.row, scope.row.propDbName)
188
190
  }, {
189
191
  default: withCtx(() => [
190
192
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.fieldNameList, (item) => {
@@ -212,7 +214,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
212
214
  size: "default"
213
215
  }, {
214
216
  default: withCtx(() => [
215
- (openBlock(true), createElementBlock(Fragment, null, renderList(operationArr.value[scope.$index], (option) => {
217
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOperators)(scope.row), (option) => {
216
218
  return openBlock(), createBlock(_component_el_option, {
217
219
  key: option.name,
218
220
  label: option.label,
@@ -231,7 +233,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
231
233
  }, {
232
234
  default: withCtx((scope) => [
233
235
  createVNode(BindVariable, {
234
- modelValue: scope.row.defaultValue,
236
+ modelValue: scope.row.propValue,
235
237
  "onUpdate:modelValue": (data) => afterBindDefaultValue(data, scope.row)
236
238
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
237
239
  ]),
@@ -47,7 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47
47
  combinationVisible.value = true;
48
48
  }
49
49
  function afterBindDefaultValue(modelValue, row) {
50
- row.defaultValue = modelValue;
50
+ row.autoValue = modelValue;
51
51
  }
52
52
  function selectRow(row) {
53
53
  tableRef.value.setCurrentRow(row);
@@ -61,6 +61,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
61
  function add() {
62
62
  tableData.value.push({});
63
63
  }
64
+ function changeField(row, propDbName) {
65
+ console.log("changeField----props.pageDesign.modelFieldsMap=", props.pageDesign.modelFieldsMap, "propDbName=", propDbName);
66
+ const item = props.pageDesign.modelFieldsMap[propDbName];
67
+ row.field = item.name;
68
+ row.dataType = item.dataType;
69
+ }
64
70
  return (_ctx, _cache) => {
65
71
  const _component_el_button = resolveComponent("el-button");
66
72
  const _component_el_row = resolveComponent("el-row");
@@ -197,11 +203,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
197
203
  }, {
198
204
  default: withCtx((scope) => [
199
205
  createVNode(_component_el_select, {
200
- modelValue: scope.row.field,
201
- "onUpdate:modelValue": ($event) => scope.row.field = $event,
206
+ modelValue: scope.row.propDbName,
207
+ "onUpdate:modelValue": ($event) => scope.row.propDbName = $event,
202
208
  clearable: "",
203
209
  size: "default",
204
- onFocus: ($event) => selectRow(scope.row)
210
+ onFocus: ($event) => selectRow(scope.row),
211
+ onChange: ($event) => changeField(scope.row, scope.row.propDbName)
205
212
  }, {
206
213
  default: withCtx(() => [
207
214
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.pageDesign.modelFields, (item) => {
@@ -213,7 +220,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
213
220
  }), 128))
214
221
  ]),
215
222
  _: 2
216
- }, 1032, ["modelValue", "onUpdate:modelValue", "onFocus"])
223
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onFocus", "onChange"])
217
224
  ]),
218
225
  _: 1
219
226
  }),
@@ -225,7 +232,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
225
232
  default: withCtx((scope) => [
226
233
  createVNode(BindVariable, {
227
234
  onFocus: ($event) => selectRow(scope.row),
228
- modelValue: scope.row.defaultValue,
235
+ modelValue: scope.row.autoValue,
229
236
  "onUpdate:modelValue": (data) => afterBindDefaultValue(data, scope.row)
230
237
  }, null, 8, ["onFocus", "modelValue", "onUpdate:modelValue"])
231
238
  ]),
@@ -75,7 +75,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
75
75
  combinationVisible.value = false;
76
76
  }
77
77
  function saveCondition(table) {
78
- props.configure.props.base.showCondition = JSON.stringify(table);
78
+ props.configure.props.base.showConditions = JSON.stringify(table);
79
79
  }
80
80
  return (_ctx, _cache) => {
81
81
  const _component_el_option = resolveComponent("el-option");
@@ -216,7 +216,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
216
216
  }, null, 8, ["configure"])) : createCommentVNode("", true),
217
217
  combinationVisible.value ? (openBlock(), createBlock(_sfc_main$4, {
218
218
  key: 2,
219
- conditionList: __props.configure.props.base.showCondition,
219
+ conditionList: __props.configure.props.base.showConditions,
220
220
  fieldNameList: attributeMap.value,
221
221
  fieldMap: fieldMap.value,
222
222
  onSave: saveCondition,