super-page-runtime 2.3.37-sit2 → 2.3.37-sit4

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 (58) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +131 -131
  2. package/dist/es/components/runtime/utils/barcode-util.js +5 -5
  3. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +47 -46
  4. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +3 -1
  5. package/dist/es/components/runtime/utils/charts/chart-util.js +46 -44
  6. package/dist/es/components/runtime/utils/events/event-util.js +121 -121
  7. package/dist/es/components/runtime/utils/events/print-label.js +35 -33
  8. package/dist/es/components/runtime/utils/events/standard-event.js +600 -588
  9. package/dist/es/components/runtime/utils/events/validator-util.js +154 -150
  10. package/dist/es/components/runtime/utils/form/scan-util.js +4 -3
  11. package/dist/es/components/runtime/utils/page-helper-util.js +219 -219
  12. package/dist/es/components/runtime/utils/page-init-util.js +125 -120
  13. package/dist/es/components/runtime/utils/page-store.js +21 -21
  14. package/dist/es/components/runtime/utils/table-utils.js +4 -4
  15. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +1 -1
  16. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +16 -12
  17. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
  18. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +11 -9
  19. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +13 -12
  20. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +1 -1
  21. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +26 -25
  22. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +15 -14
  23. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +16 -15
  24. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +100 -95
  25. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +67 -67
  26. package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
  27. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +27 -23
  28. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +3 -1
  29. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +5 -5
  30. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +63 -63
  31. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +11 -9
  32. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +22 -20
  33. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +123 -120
  34. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +39 -38
  35. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +7 -6
  36. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +22 -22
  37. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
  38. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +9 -9
  39. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +36 -35
  40. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +4 -4
  41. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +56 -55
  42. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +1 -1
  43. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +12 -10
  44. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +14 -12
  45. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -2
  46. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +1 -1
  47. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +15 -15
  48. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +1 -1
  49. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +28 -27
  50. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +5 -5
  51. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +1 -1
  52. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +5 -5
  53. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +25 -23
  54. package/dist/es/components/runtime/views/home-chart.vue.js +9 -9
  55. package/dist/es/components/runtime/views/super-page-dialog.vue.js +5 -4
  56. package/dist/es/components/runtime/views/super-page.vue2.js +191 -190
  57. package/dist/es/style.css +71 -71
  58. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
- import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as l, createElementBlock as i, openBlock as a, createBlock as u, createCommentVNode as r, unref as s } from "vue";
2
- import { setTableEvents as c, gridSelectRecord as p, gridSelectAllRecords as d, gridSelectionChange as f, cellClick as b, cellDblClick as g, rowClick as m, rowDblClick as v, headerClick as h, getHandleEvent as S } from "../../../../utils/events/event-util.js";
1
+ import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as l, createElementBlock as a, openBlock as i, createBlock as u, createCommentVNode as r, unref as s } from "vue";
2
+ import { setTableEvents as c, gridSelectRecord as d, gridSelectAllRecords as p, gridSelectionChange as f, cellClick as b, cellDblClick as g, rowClick as m, rowDblClick as v, headerClick as h, getHandleEvent as S } from "../../../../utils/events/event-util.js";
3
3
  import { caculateShowCondition as w, setVariableValue as T, getVariableValue as x, getSizeConfig as C } from "../../../../utils/page-helper-util.js";
4
4
  import { getModelFields as D, getDefaultValue as y } from "../../../../utils/page-init-util.js";
5
5
  import P from "../../../../utils/eventBus.js";
@@ -9,52 +9,54 @@ import { getAdditionalParamMap as k } from "../../../../utils/events/standard-ev
9
9
  import { getRowStyleUtil as A, getCellStyleUtil as M, getHeaderCellStyleUtil as E } from "../../chart/table/chart-table-util.js";
10
10
  const N = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure: {} }, emits: ["setSafeDeleteTableCode"], setup(e2, { expose: N2, emit: F }) {
11
11
  var _a;
12
- const $ = e2, j = $.pageContext;
13
- let z = $.configure;
14
- const V = $.configure.runtime ? $.configure.runtime : {};
15
- j.isTest ? V.value = $.configure.runtime ? $.configure.runtime : {} : j.tableRuntimes && j.tableRuntimes[z.uuid] && (z = JSON.parse(j.tableRuntimes[z.uuid].configure), V.value = z.runtime ? z.runtime : {});
16
- const G = O(j.code, j.version, z.uuid), H = j.entity.data, L = z.code ? z.code : G, U = k(j), B = V && V.events ? V.events : [], q = t([]), J = j.superGridItems, K = J ? J[z.uuid] : null, Q = V.style, W = V.class, X = $.pageContext.entity ? $.pageContext.entity : {};
17
- let Y = D($.configure, L), Z = _(j.backendUrl, j.isTest);
12
+ const z = e2, U = z.pageContext;
13
+ let $ = z.configure;
14
+ const j = z.configure.runtime ? z.configure.runtime : {};
15
+ U.isTest ? j.value = z.configure.runtime ? z.configure.runtime : {} : U.tableRuntimes && U.tableRuntimes[$.uuid] && ($ = JSON.parse(U.tableRuntimes[$.uuid].configure), j.value = $.runtime ? $.runtime : {});
16
+ const G = O(U.code, U.version, $.uuid), H = U.entity.data, V = $.code ? $.code : G, L = k(U), B = j && j.events ? j.events : [], q = t([]), J = U.superGridItems, K = J ? J[$.uuid] : null;
17
+ console.log("superGridSetting===", J, K);
18
+ const Q = j.style, W = j.class, X = z.pageContext.entity ? z.pageContext.entity : {};
19
+ let Y = D(z.configure, V), Z = _(U.backendUrl, U.isTest);
18
20
  Z || (Z = window.$vueApp.config.globalProperties.baseURL);
19
21
  const ee = t(false);
20
22
  let te = t(0);
21
- const ne = (_a = z.props) == null ? void 0 : _a.dataOrigin.principalLinkage, oe = t({}), le = F;
23
+ const ne = (_a = $.props) == null ? void 0 : _a.dataOrigin.principalLinkage, oe = t({}), le = F;
22
24
  oe.value = function() {
23
25
  var _a2, _b, _c, _d;
24
- const e3 = { title: (z == null ? void 0 : z.title) || null, isSql: true, subTableData: null, rowKeyProp: ne, extraParam: {}, operations: {}, hiddenColumns: [], pageCode: j.code, pageVersion: j.version, pageContext: j, configureObj: z, showPageArea: false, showRowForm: false, showOverflowTooltip: (_b = (_a2 = z == null ? void 0 : z.props) == null ? void 0 : _a2.otherSettings) == null ? void 0 : _b.showOverflowTooltip, backendUrl: Z, cellStyleRender: He, rowStyleRender: Ge, titleStyleRender: Le, allEditable: (_d = (_c = z.props) == null ? void 0 : _c.base) == null ? void 0 : _d.allEditable };
25
- return Q && (e3.tableStyle = Q), W && (e3.tableClass = W), z.props && z.props.base && true === z.props.base.subPaging ? e3.showPageArea = true : e3.showPageArea = false, z.props.base.showRowForm && (e3.showRowForm = z.props.base.showRowForm), function(e4) {
26
- const t2 = z.props ? z.props.dataOrigin : {};
26
+ const e3 = { title: ($ == null ? void 0 : $.title) || null, isSql: true, subTableData: null, rowKeyProp: ne, extraParam: {}, operations: {}, hiddenColumns: [], pageCode: U.code, pageVersion: U.version, pageContext: U, configureObj: $, showPageArea: false, showRowForm: false, showOverflowTooltip: (_b = (_a2 = $ == null ? void 0 : $.props) == null ? void 0 : _a2.otherSettings) == null ? void 0 : _b.showOverflowTooltip, backendUrl: Z, cellStyleRender: He, rowStyleRender: Ge, titleStyleRender: Ve, allEditable: (_d = (_c = $.props) == null ? void 0 : _c.base) == null ? void 0 : _d.allEditable };
27
+ return Q && (e3.tableStyle = Q), W && (e3.tableClass = W), $.props && $.props.base && true === $.props.base.subPaging ? e3.showPageArea = true : e3.showPageArea = false, $.props.base.showRowForm && (e3.showRowForm = $.props.base.showRowForm), function(e4) {
28
+ const t2 = $.props ? $.props.dataOrigin : {};
27
29
  if (t2.treeTable) {
28
30
  let n2;
29
31
  const o2 = t2.rowKey;
30
32
  if (n2 = o2 && o2.indexOf("~~") > 0 ? o2.substring(o2.indexOf("~~") + 2) : o2, e4.parentProp = n2, t2.checkStrictly && (e4.checkStrictly = t2.checkStrictly), e4.parentProp) {
31
33
  const o3 = t2.lazy, l2 = t2.defaultExpandAll;
32
34
  e4.lazy = null == o3 || o3, e4.defaultExpandAll = null != l2 && l2;
33
- const i2 = { parentProp: n2, lazy: e4.lazy, defaultExpandAll: e4.defaultExpandAll };
34
- e4.extraParam.listViewTreeSetting = JSON.stringify(i2), e4.subRowUrl = Z + "/dsc/commons/list-subs";
35
+ const a2 = { parentProp: n2, lazy: e4.lazy, defaultExpandAll: e4.defaultExpandAll };
36
+ e4.extraParam.listViewTreeSetting = JSON.stringify(a2), e4.subRowUrl = Z + "/dsc/commons/list-subs";
35
37
  }
36
38
  }
37
39
  }(e3), e3;
38
40
  }();
39
- const ie = t(null);
40
- function ae() {
41
- ie.value && (oe.value.subTableData = null, ie.value.reloadSubTableData(G));
41
+ const ae = t(null);
42
+ function ie() {
43
+ ae.value && (oe.value.subTableData = null, ae.value.reloadSubTableData(G));
42
44
  }
43
45
  function ue(e3, t2) {
44
- if (t2 || (t2 = oe.value), void 0 === e3 && (e3 = re()), t2.isPageInfo = false, t2.isFormSubTable = true, t2.canRrefreshSubtableData = e3, t2.getFormData = se, t2.getGridData = ce, t2.extraParam.subTableListViewCode = G, t2.extraParam.beanName = j.beanName, t2.extraParam.subtableSetting = z.props && z.props.otherSettings ? JSON.stringify(z.props.otherSettings) : null, t2.extraParam.additionalParamMap = U, t2.extraParam.entityMap = j.entity.data, t2.extraParam.contextMap = j.entity.context, t2.extraParam.taskMap = j.entity.task, !(z.props && z.props.base && z.props.base.showOperation)) {
46
+ if (t2 || (t2 = oe.value), void 0 === e3 && (e3 = re()), t2.isPageInfo = false, t2.isFormSubTable = true, t2.canRrefreshSubtableData = e3, t2.getFormData = se, t2.getGridData = ce, t2.extraParam.subTableListViewCode = G, t2.extraParam.beanName = U.beanName, t2.extraParam.subtableSetting = $.props && $.props.otherSettings ? JSON.stringify($.props.otherSettings) : null, t2.extraParam.additionalParamMap = L, t2.extraParam.entityMap = U.entity.data, t2.extraParam.contextMap = U.entity.context, t2.extraParam.taskMap = U.entity.task, !($.props && $.props.base && $.props.base.showOperation)) {
45
47
  let e4 = t2.hiddenColumns;
46
48
  e4 ? e4.push("operation") : e4 = ["operation"], t2.hiddenColumns = e4;
47
49
  }
48
- t2.showOperationButton = !(!z.props || !z.props.base) && z.props.base.showOperation, t2.isPdfEditor = false, t2.tableRecordMaxNum = z.props && z.props.otherSettings ? z.props.otherSettings.tableRecordMaxNum : null;
49
- let n2 = C(j, z);
50
- n2 && n2.fixHeight && (t2.formSetHeight = n2.fixHeight), n2 && n2.maxHeight && (t2.formSetMaxHeight = n2.maxHeight), t2.validateEitConditions = Ue;
50
+ t2.showOperationButton = !(!$.props || !$.props.base) && $.props.base.showOperation, t2.isPdfEditor = false, t2.tableRecordMaxNum = $.props && $.props.otherSettings ? $.props.otherSettings.tableRecordMaxNum : null;
51
+ let n2 = C(U, $);
52
+ n2 && n2.fixHeight && (t2.formSetHeight = n2.fixHeight), n2 && n2.maxHeight && (t2.formSetMaxHeight = n2.maxHeight), t2.validateEitConditions = Le;
51
53
  }
52
54
  function re() {
53
- if (z.props && z.props.otherSettings) {
54
- if (z.props.otherSettings.sourceQueryTableData && z.props.otherSettings.timeToInitializeSubTable && z.props.otherSettings.timeToInitializeSubTable.length > 0) {
55
+ if ($.props && $.props.otherSettings) {
56
+ if ($.props.otherSettings.sourceQueryTableData && $.props.otherSettings.timeToInitializeSubTable && $.props.otherSettings.timeToInitializeSubTable.length > 0) {
55
57
  let e3 = false;
56
- if (-1 !== z.props.otherSettings.timeToInitializeSubTable.indexOf("create") && (e3 = !H.id && !H.ID), -1 !== z.props.otherSettings.timeToInitializeSubTable.indexOf("noData")) {
57
- const t2 = H[L];
58
+ if (-1 !== $.props.otherSettings.timeToInitializeSubTable.indexOf("create") && (e3 = !H.id && !H.ID), -1 !== $.props.otherSettings.timeToInitializeSubTable.indexOf("noData")) {
59
+ const t2 = H[V];
58
60
  (!t2 || t2.length <= 0) && (e3 = true);
59
61
  }
60
62
  return e3;
@@ -63,23 +65,23 @@ const N = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
63
65
  }
64
66
  }
65
67
  function se() {
66
- return j.entity.data;
68
+ return U.entity.data;
67
69
  }
68
70
  function ce() {
69
71
  return x(X, Y);
70
72
  }
71
- let pe, de;
73
+ let de, pe;
72
74
  function fe(e3, t2) {
73
- t2 || (t2 = oe.value), ue(e3, t2), t2.subTableData = null, be(t2), ee.value = false, pe = setTimeout(() => {
75
+ t2 || (t2 = oe.value), ue(e3, t2), t2.subTableData = null, be(t2), ee.value = false, de = setTimeout(() => {
74
76
  ee.value = true, te.value = te.value + 1, ge();
75
77
  }, 10);
76
78
  }
77
79
  function be(e3) {
78
80
  e3 || (e3 = oe.value), function(e4) {
79
81
  e4 || (e4 = oe.value);
80
- const t3 = j.fieldPermissionMap, n2 = j.actionPermissionMap;
82
+ const t3 = U.fieldPermissionMap, n2 = U.actionPermissionMap;
81
83
  if (t3 && null != t3) {
82
- let n3 = t3.get(L);
84
+ let n3 = t3.get(V);
83
85
  if (!n3) {
84
86
  const e5 = t3.get("all_fields");
85
87
  e5 && (n3 = [e5]);
@@ -87,12 +89,12 @@ const N = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
87
89
  e4.validateRules = n3 || null;
88
90
  }
89
91
  if (n2 && null != n2) {
90
- let t4 = n2.get(L);
92
+ let t4 = n2.get(V);
91
93
  t4 || (t4 = n2.get("all_sub_tables")), e4.actionPermission = t4;
92
94
  }
93
95
  e4.operations || (e4.operations = {});
94
96
  const o2 = function() {
95
- let e5 = [], t4 = w($.pageContext, z.props.base.showOperationCondition);
97
+ let e5 = [], t4 = w(z.pageContext, $.props.base.showOperationCondition);
96
98
  if (t4 && Se(null, null, null, null, null, true, "canAdd")) {
97
99
  const t5 = { props: { elementType: "el-button", icon: "Plus", type: "primary", circle: true, size: "mini", permission: "true" }, onClick: Ce, isShow: we, isStandard: true };
98
100
  e5.push(t5);
@@ -101,39 +103,40 @@ const N = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
101
103
  const t5 = { props: { elementType: "el-button", icon: "Minus", type: "danger", circle: true, size: "mini", permission: "true" }, onClick: De, isShow: xe, isStandard: true };
102
104
  e5.push(t5);
103
105
  }
104
- return R(j, z, e5, ve), e5;
106
+ return R(U, $, e5, ve), e5;
105
107
  }();
106
108
  e4.operations.operation = o2, e4.subTableCanAdd = Se(null, null, null, null, null, true, "canAdd"), e4.subTableCanDelete = Se(null, null, null, null, null, true, "canDelete");
107
- }(e3), c(e3, B, j, z);
108
- const t2 = j.customEvents;
109
+ }(e3), c(e3, B, U, $);
110
+ const t2 = U.customEvents;
109
111
  t2 && (e3.eventCallBack = t2), ee.value = true, ge();
110
112
  }
111
113
  function ge() {
112
- j.tableUuids || (j.tableUuids = []), j.tableUuids.indexOf(z.uuid) < 0 && j.tableUuids.push(z.uuid);
114
+ U.tableUuids || (U.tableUuids = []), U.tableUuids.indexOf($.uuid) < 0 && U.tableUuids.push($.uuid);
113
115
  }
114
116
  n(() => {
115
- const e3 = z.uuid, t2 = j.subTableWatchProps;
117
+ const e3 = $.uuid, t2 = U.subTableWatchProps;
116
118
  P.$on("_refreshSubTable_" + e3, (n2) => {
119
+ console.log("-_refreshSubTable--tableUuid=", e3, "params=", n2);
117
120
  const o2 = n2.propName;
118
121
  if (t2 && t2[e3] && t2[e3].length > 0) {
119
- t2[e3].indexOf(o2) >= 0 && ae();
122
+ t2[e3].indexOf(o2) >= 0 && ie();
120
123
  }
121
- }), P.$on("_refreshSubTableHandle_" + e3, (e4) => {
122
- ae();
123
- }), P.$on("_refreshChildData_" + e3, (e4) => {
124
- !function(e5) {
125
- Ve(e5), de = setTimeout(() => {
126
- ie.value && (ie.value.refreshChildData(G, e5, z.props && z.props.base && true === z.props.base.subPaging), oe.value.extraParam.entityMap = j.entity.data);
124
+ }), P.$on("_refreshSubTableHandle_" + e3, (t3) => {
125
+ console.log("-_refreshSubTableHandle_--tableUuid=", e3, "params=", t3), ie();
126
+ }), P.$on("_refreshChildData_" + e3, (t3) => {
127
+ console.log("-_refreshChildData_--tableUuid=", e3), function(e4) {
128
+ je(e4), pe = setTimeout(() => {
129
+ ae.value && (ae.value.refreshChildData(G, e4, $.props && $.props.base && true === $.props.base.subPaging), oe.value.extraParam.entityMap = U.entity.data);
127
130
  }, 10);
128
- }(e4);
131
+ }(t3);
129
132
  }), P.$on(G + "-pickFileDone", (e4) => {
130
- ie.value.pickFileDone(e4);
133
+ console.log("superPage5555---listCode---pickFileDone--listCode=", G, "data=", e4), ae.value.pickFileDone(e4);
131
134
  }), P.$on(G + "-scanDone", (e4) => {
132
- ie.value.scanDone(e4);
135
+ console.log("superPage5555---listCode---scanDone--listCode=", G, "data=", e4), ae.value.scanDone(e4);
133
136
  }), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete && le("setSafeDeleteTableCode", oe.value.extraParam.tableName);
134
137
  }), o(() => {
135
- pe && clearTimeout(pe), de && clearTimeout(de);
136
- const e3 = z.uuid;
138
+ de && clearTimeout(de), pe && clearTimeout(pe);
139
+ const e3 = $.uuid;
137
140
  P.$off("_refreshSubTable_" + e3), P.$off("_refreshSubTableHandle_" + e3), P.$off("_refreshChildData_" + e3), P.$off(G + "-pickFileDone"), P.$off(G + "-scanDone");
138
141
  });
139
142
  const me = t({});
@@ -141,39 +144,39 @@ const N = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
141
144
  if (!e3) return;
142
145
  return me.value[e3.uuid] = e3, he;
143
146
  }
144
- function he(e3, t2, n2, o2, l2, i2) {
145
- const a2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: l2, button: i2, id: n2.ID ? n2.ID : n2.id }, u2 = me.value[i2.sourceButton.uuid], r2 = z;
146
- u2.props.base.tableUuid = r2.uuid, S(null, j, u2, "click", a2);
147
+ function he(e3, t2, n2, o2, l2, a2) {
148
+ const i2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: l2, button: a2, id: n2.ID ? n2.ID : n2.id }, u2 = me.value[a2.sourceButton.uuid], r2 = $;
149
+ u2.props.base.tableUuid = r2.uuid, S(null, U, u2, "click", i2);
147
150
  }
148
- function Se(e3, t2, n2, o2, l2, i2, a2) {
149
- a2 || (a2 = "canAdd");
150
- if (!w($.pageContext, z.props.base.showOperationCondition)) return false;
151
- const u2 = j.fieldPermissionMap, r2 = j.actionPermissionMap;
151
+ function Se(e3, t2, n2, o2, l2, a2, i2) {
152
+ i2 || (i2 = "canAdd");
153
+ if (!w(z.pageContext, $.props.base.showOperationCondition)) return false;
154
+ const u2 = U.fieldPermissionMap, r2 = U.actionPermissionMap;
152
155
  let s2 = true;
153
156
  if (u2 && null !== u2) {
154
157
  const e4 = u2.get("all_fields");
155
158
  void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (s2 = false);
156
159
  }
157
- if (true === s2 && L && r2 && null !== r2) {
158
- let e4 = r2.get(L);
159
- e4 || (e4 = r2.get("all_sub_tables")), e4 && void 0 !== e4[a2] && false === e4[a2] && (s2 = false);
160
+ if (true === s2 && V && r2 && null !== r2) {
161
+ let e4 = r2.get(V);
162
+ e4 || (e4 = r2.get("all_sub_tables")), e4 && void 0 !== e4[i2] && false === e4[i2] && (s2 = false);
160
163
  }
161
164
  return s2;
162
165
  }
163
- function we(e3, t2, n2, o2, l2, i2) {
164
- let a2 = Se(0, 0, 0, 0, 0, 0, "canAdd");
165
- return true === a2 && (a2 = w($.pageContext, z.props.base.showAddBtnCondition, n2)), a2;
166
+ function we(e3, t2, n2, o2, l2, a2) {
167
+ let i2 = Se(0, 0, 0, 0, 0, 0, "canAdd");
168
+ return true === i2 && (i2 = w(z.pageContext, $.props.base.showAddBtnCondition, n2)), i2;
166
169
  }
167
- function Te(e3, t2, n2, o2, l2, i2) {
168
- const a2 = j.fieldPermissionMap, u2 = j.actionPermissionMap;
170
+ function Te(e3, t2, n2, o2, l2, a2) {
171
+ const i2 = U.fieldPermissionMap, u2 = U.actionPermissionMap;
169
172
  let r2 = true;
170
- if (a2 && null !== a2) {
171
- const e4 = a2.get("all_fields");
173
+ if (i2 && null !== i2) {
174
+ const e4 = i2.get("all_fields");
172
175
  void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (r2 = false);
173
176
  }
174
- if (true === r2 && L && u2 && null !== u2) {
175
- let e4 = u2.get(L);
176
- if (e4 || (e4 = u2.get("all_sub_tables")), e4 && void 0 !== e4.canDelete && false === e4.canDelete && (r2 = false), e4 && void 0 !== e4.canDelete && true === e4.canDelete && e4.deleteRowIndexes) if (e4.deleteRowIndexes.length > 0) if (i2) r2 = true;
177
+ if (true === r2 && V && u2 && null !== u2) {
178
+ let e4 = u2.get(V);
179
+ if (e4 || (e4 = u2.get("all_sub_tables")), e4 && void 0 !== e4.canDelete && false === e4.canDelete && (r2 = false), e4 && void 0 !== e4.canDelete && true === e4.canDelete && e4.deleteRowIndexes) if (e4.deleteRowIndexes.length > 0) if (a2) r2 = true;
177
180
  else {
178
181
  const t3 = function(e5) {
179
182
  return e5 && e5.id ? e5.id : e5 && e5.ID ? e5.ID : void 0;
@@ -184,96 +187,96 @@ const N = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
184
187
  }
185
188
  return r2;
186
189
  }
187
- function xe(e3, t2, n2, o2, l2, i2) {
188
- let a2 = Te(0, 0, n2, 0, 0, i2);
189
- return true === a2 && (a2 = w($.pageContext, z.props.base.showDeleteBtnCondition, n2)), a2;
190
+ function xe(e3, t2, n2, o2, l2, a2) {
191
+ let i2 = Te(0, 0, n2, 0, 0, a2);
192
+ return true === i2 && (i2 = w(z.pageContext, $.props.base.showDeleteBtnCondition, n2)), i2;
190
193
  }
191
194
  function Ce(e3, t2, n2, o2, l2) {
192
- ie.value.createRow(G, {}, { getDefaultValueFunc: y }, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: l2 }).then(() => {
195
+ ae.value.createRow(G, {}, { getDefaultValueFunc: y }, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: l2 }).then(() => {
193
196
  Be(l2);
194
197
  });
195
198
  }
196
- function De(e3, t2, n2, o2, l2, i2, a2, u2) {
197
- ie.value.deleteRow(l2, G, false, a2, u2);
199
+ function De(e3, t2, n2, o2, l2, a2, i2, u2) {
200
+ ae.value.deleteRow(l2, G, false, i2, u2);
198
201
  }
199
202
  function ye(e3) {
200
203
  T(X, Y, e3);
201
204
  }
202
205
  function Pe(e3) {
203
- j.subTablePageInfo || (j.subTablePageInfo = {}), j.subTablePageInfo[L] || (j.subTablePageInfo[L] = {}), j.subTablePageInfo[L].title = z.title ? z.title : z.code, j.subTablePageInfo[L].pageSize = e3;
206
+ console.log("表单组件--Item--changeRowsPerpage==pageSize=", e3), U.subTablePageInfo || (U.subTablePageInfo = {}), U.subTablePageInfo[V] || (U.subTablePageInfo[V] = {}), U.subTablePageInfo[V].title = $.title ? $.title : $.code, U.subTablePageInfo[V].pageSize = e3;
204
207
  }
205
208
  function Ie(e3) {
206
209
  const t2 = e3.key, n2 = e3.value;
207
- j.selectOptions || (j.selectOptions = {}), j.selectOptions[t2] = n2;
210
+ U.selectOptions || (U.selectOptions = {}), U.selectOptions[t2] = n2;
208
211
  }
209
212
  function Re(e3) {
210
- const t2 = j.code + "_";
213
+ const t2 = U.code + "_";
211
214
  P.$emit(t2 + "prohibit-edit", e3);
212
215
  }
213
216
  function Oe(e3) {
214
- const t2 = j.entity.data;
217
+ const t2 = U.entity.data;
215
218
  if (e3) for (const n2 in e3) t2[n2] = e3[n2];
216
219
  }
217
220
  function _e(e3, t2) {
218
221
  if (void 0 !== t2) {
219
222
  q.value = e3;
220
- p(j, z, { selection: e3, row: t2 });
223
+ d(U, $, { selection: e3, row: t2 });
221
224
  }
222
225
  }
223
226
  function ke(e3) {
224
227
  q.value = e3;
225
- d(j, z, { selection: e3 });
228
+ p(U, $, { selection: e3 });
226
229
  }
227
230
  function Ae(e3) {
228
- f(j, z, { newSelection: e3 });
231
+ f(U, $, { newSelection: e3 });
229
232
  }
230
233
  function Me(e3, t2, n2, o2) {
231
- b(j, z, { row: e3, column: t2, cell: n2, event: o2 });
234
+ b(U, $, { row: e3, column: t2, cell: n2, event: o2 });
232
235
  }
233
236
  function Ee(e3, t2, n2, o2) {
234
- g(j, z, { row: e3, column: t2, cell: n2, event: o2 });
237
+ g(U, $, { row: e3, column: t2, cell: n2, event: o2 });
235
238
  }
236
239
  function Ne(e3, t2, n2) {
237
- m(j, z, { row: e3, column: t2, event: n2 });
240
+ m(U, $, { row: e3, column: t2, event: n2 });
238
241
  }
239
242
  function Fe(e3, t2, n2) {
240
- v(j, z, { row: e3, column: t2, event: n2 });
243
+ v(U, $, { row: e3, column: t2, event: n2 });
241
244
  }
242
- function $e(e3, t2) {
243
- h(j, z, { column: e3, event: t2 });
245
+ function ze(e3, t2) {
246
+ h(U, $, { column: e3, event: t2 });
244
247
  }
245
- function je(e3) {
246
- j.entity.data = e3;
248
+ function Ue(e3) {
249
+ U.entity.data = e3;
247
250
  }
248
- function ze() {
251
+ function $e() {
249
252
  return x(X, Y);
250
253
  }
251
- function Ve(e3) {
254
+ function je(e3) {
252
255
  return T(X, Y, e3);
253
256
  }
254
257
  function Ge(e3) {
255
- return A(e3, null, $);
258
+ return A(e3, null, z);
256
259
  }
257
260
  function He(e3) {
258
- return M(e3, e3.cellStyle, $);
261
+ return M(e3, e3.cellStyle, z);
259
262
  }
260
- function Le(e3) {
261
- const t2 = e3.titleStyle, n2 = $.configure.style.titleStyle;
262
- return E(e3, { cellTitleStyle: t2, titleStyle: n2 }, $);
263
+ function Ve(e3) {
264
+ const t2 = e3.titleStyle, n2 = z.configure.style.titleStyle;
265
+ return E(e3, { cellTitleStyle: t2, titleStyle: n2 }, z);
263
266
  }
264
- function Ue({ row: e3, editConditions: t2 }) {
267
+ function Le({ row: e3, editConditions: t2 }) {
265
268
  let n2 = true;
266
- return t2 && t2.length > 0 && (n2 = w($.pageContext, t2, e3)), n2;
269
+ return t2 && t2.length > 0 && (n2 = w(z.pageContext, t2, e3)), n2;
267
270
  }
268
271
  function Be(e3) {
269
272
  var _a2;
270
- (_a2 = ie.value) == null ? void 0 : _a2.setScrollTopByRowIndex(e3);
273
+ (_a2 = ae.value) == null ? void 0 : _a2.setScrollTopByRowIndex(e3);
271
274
  }
272
275
  return function(e3) {
273
276
  const t2 = re();
274
- t2 ? fe(t2, e3) : (ue(t2, e3), e3.isPageInfo = false, e3.subTableData = ze(), be(e3));
277
+ t2 ? fe(t2, e3) : (ue(t2, e3), e3.isPageInfo = false, e3.subTableData = $e(), be(e3));
275
278
  }(oe.value), N2({ createRow: function() {
276
- return ie.value.createRow(G);
279
+ return ae.value.createRow(G);
277
280
  }, getSelections: function() {
278
281
  return q.value;
279
282
  }, getSelectionIds: function() {
@@ -284,45 +287,45 @@ const N = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
284
287
  }, clearSelections: function() {
285
288
  q.value = [];
286
289
  }, getTableConfigure: function() {
287
- return z;
290
+ return $;
288
291
  }, validatorSunTableListData: function() {
289
- return ie.value.validatorSunTableListData();
290
- }, getValue: ze, setValue: Ve, getTableSelectOptions: function() {
291
- if (ie.value) return ie.value.getTableSelectOptions(G);
292
+ return ae.value.validatorSunTableListData();
293
+ }, getValue: $e, setValue: je, getTableSelectOptions: function() {
294
+ if (ae.value) return ae.value.getTableSelectOptions(G);
292
295
  }, dynamicControlTableEdit: function(e3, t2, n2) {
293
- ie.value && ie.value.dynamicControlTableEdit(e3, t2, n2);
296
+ ae.value && ae.value.dynamicControlTableEdit(e3, t2, n2);
294
297
  }, doLayout: function(e3) {
295
- ie.value && ie.value.doLayout(e3);
298
+ ae.value && ae.value.doLayout(e3);
296
299
  }, changeOperationAddState: function(e3) {
297
- ie.value && ie.value.changeOperationAddState(e3);
300
+ ae.value && ae.value.changeOperationAddState(e3);
298
301
  }, scrollTo: function(e3, t2) {
299
- ie.value && ie.value.scrollTo(e3, t2);
302
+ ae.value && ae.value.scrollTo(e3, t2);
300
303
  }, setScrollTop: function(e3) {
301
- ie.value && ie.value.setScrollTop(e3);
304
+ ae.value && ae.value.setScrollTop(e3);
302
305
  }, setScrollLeft: function(e3) {
303
- ie.value && ie.value.setScrollLeft(e3);
306
+ ae.value && ae.value.setScrollLeft(e3);
304
307
  }, getSuperGridRef: function() {
305
- return ie.value;
308
+ return ae.value;
306
309
  }, getSuperGridTableRef: function() {
307
- return ie.value.getSuperGridTableRef();
310
+ return ae.value.getSuperGridTableRef();
308
311
  }, setCurrentRowIndex: function(e3) {
309
312
  var _a2;
310
- (_a2 = ie.value) == null ? void 0 : _a2.setCurrentRowIndex(e3);
313
+ (_a2 = ae.value) == null ? void 0 : _a2.setCurrentRowIndex(e3);
311
314
  }, setScrollTopByRowIndex: Be, getTableData: function() {
312
315
  var _a2;
313
- return (_a2 = ie.value) == null ? void 0 : _a2.getTableData();
316
+ return (_a2 = ae.value) == null ? void 0 : _a2.getTableData();
314
317
  }, addRequiredClass: function(e3, t2, n2) {
315
318
  var _a2;
316
- (_a2 = ie.value) == null ? void 0 : _a2.addRequiredClass(e3, G, t2, n2);
319
+ (_a2 = ae.value) == null ? void 0 : _a2.addRequiredClass(e3, G, t2, n2);
317
320
  }, getColumns: function() {
318
321
  var _a2;
319
- return (_a2 = ie.value) == null ? void 0 : _a2.getColumns();
322
+ return (_a2 = ae.value) == null ? void 0 : _a2.getColumns();
320
323
  }, scrollToCell: function({ fieldName: e3, rowIndex: t2, pageNum: n2 }) {
321
324
  var _a2;
322
- (_a2 = ie.value) == null ? void 0 : _a2.scrollToCell({ fieldName: e3, rowIndex: t2, pageNum: n2 });
325
+ (_a2 = ae.value) == null ? void 0 : _a2.scrollToCell({ fieldName: e3, rowIndex: t2, pageNum: n2 });
323
326
  } }), (e3, t2) => {
324
327
  const n2 = l("super-grid");
325
- return a(), i("div", null, [ee.value ? (a(), u(n2, { key: 0, ref_key: "gridRef", ref: ie, url: s(Z) + "/dsc/commons/sub-table", options: oe.value, code: s(G), settings: s(K), isDialog: s(j).isDialog, onSelect: _e, onSelectAll: ke, onSelectionChange: Ae, onCellClick: Me, onCellDblclick: Ee, onRowClick: Ne, onRowDblclick: Fe, onHeaderClick: $e, onFnProhibitToEdit: Re, onChangeGridData: ye, onReloadGrid: fe, onRefresMainTableFields: Oe, onSetSelectOptions: Ie, onChangeRowsPerPage: Pe, onNewOpenGridDialog: s(I), onChangeFormData: je }, null, 8, ["url", "options", "code", "settings", "isDialog", "onNewOpenGridDialog"])) : r("", true)]);
328
+ return i(), a("div", null, [ee.value ? (i(), u(n2, { key: 0, ref_key: "gridRef", ref: ae, url: s(Z) + "/dsc/commons/sub-table", options: oe.value, code: s(G), settings: s(K), isDialog: s(U).isDialog, onSelect: _e, onSelectAll: ke, onSelectionChange: Ae, onCellClick: Me, onCellDblclick: Ee, onRowClick: Ne, onRowDblclick: Fe, onHeaderClick: ze, onFnProhibitToEdit: Re, onChangeGridData: ye, onReloadGrid: fe, onRefresMainTableFields: Oe, onSetSelectOptions: Ie, onChangeRowsPerPage: Pe, onNewOpenGridDialog: s(I), onChangeFormData: Ue }, null, 8, ["url", "options", "code", "settings", "isDialog", "onNewOpenGridDialog"])) : r("", true)]);
326
329
  };
327
330
  } });
328
331
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent as e, ref as t, computed as a, onMounted as n, nextTick as l, watch as o, resolveComponent as d, createElementBlock as u, openBlock as i, normalizeClass as s, unref as r, createBlock as c, createCommentVNode as p, withDirectives as v, normalizeStyle as f, withCtx as g, createVNode as m, createElementVNode as h, createTextVNode as y, Fragment as C, toDisplayString as x, renderList as k, vShow as N } from "vue";
1
+ import { defineComponent as e, ref as t, computed as n, onMounted as a, nextTick as l, watch as o, resolveComponent as d, createElementBlock as u, openBlock as i, normalizeClass as s, unref as c, createBlock as r, createCommentVNode as p, withDirectives as v, normalizeStyle as f, withCtx as g, createVNode as m, createElementVNode as h, createTextVNode as y, Fragment as C, toDisplayString as x, renderList as k, vShow as N } from "vue";
2
2
  import T from "../../../../../../assets/folder.png.js";
3
3
  import I from "../../../../../../assets/file.png.js";
4
4
  import { getFormModelFields as V } from "../../../../utils/page-init-util.js";
@@ -12,16 +12,16 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
12
12
  const $ = t(), A = t(false), X = e2, Y = X.pageContext.entity ? X.pageContext.entity : {}, q = t([]);
13
13
  ((_a = X.configure.props) == null ? void 0 : _a.contextMenus) && (X.pageContext && X.configure && !X.pageContext.isTest ? X.configure.props.contextMenus.forEach((e3) => {
14
14
  if (e3.functionCodes && e3.functionCodes.length > 0) for (let t2 = 0; t2 < e3.functionCodes.length; t2++) {
15
- const a2 = e3.functionCodes[t2];
16
- if (B(a2, X.pageContext.systemCode)) return void q.value.push(e3);
15
+ const n2 = e3.functionCodes[t2];
16
+ if (B(n2, X.pageContext.systemCode)) return void q.value.push(e3);
17
17
  }
18
18
  else q.value.push(e3);
19
19
  }) : q.value = X.configure.props.contextMenus);
20
20
  let F = V(X.pageContext, X.configure);
21
- const G = a({ get: () => L(Y, F), set(e3) {
21
+ const G = n({ get: () => L(Y, F), set(e3) {
22
22
  b(Y, F, e3);
23
- } }), J = t(!!((_c = (_b = X.configure.props) == null ? void 0 : _b.base) == null ? void 0 : _c.lazy)), Q = X.configure.runtime ? X.configure.runtime : {}, Z = Q.style, ee = Q.class, te = t(), ae = t(Q.props ? Q.props : {}), ne = t({ id: "nodeId", label: "name", children: "children", isLeaf: "leaf", disabled: "disabled", nodeType: "nodeType", iconType: "iconType", iconValue: "iconValue" }), le = t(false), oe = t([]), de = t(null), ue = t(""), ie = t(false), se = t(""), re = t(""), ce = t("");
24
- n(() => {
23
+ } }), J = t(!!((_c = (_b = X.configure.props) == null ? void 0 : _b.base) == null ? void 0 : _c.lazy)), Q = X.configure.runtime ? X.configure.runtime : {}, Z = Q.style, ee = Q.class, te = t(), ne = t(Q.props ? Q.props : {}), ae = t({ id: "nodeId", label: "name", children: "children", isLeaf: "leaf", disabled: "disabled", nodeType: "nodeType", iconType: "iconType", iconValue: "iconValue" }), le = t(false), oe = t([]), de = t(null), ue = t(""), ie = t(false), se = t(""), ce = t(""), re = t("");
24
+ a(() => {
25
25
  l(() => {
26
26
  const e3 = G.value;
27
27
  _(e3, X.pageContext, X.configure, { componentRef: te.value, value: e3, entity: X.pageContext.entity.data, pageData: X.pageContext.entity.page });
@@ -32,31 +32,31 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
32
32
  ie.value = true, te.value.filter(e3);
33
33
  });
34
34
  const pe = (e3, t2) => !e3 || t2.name.includes(e3);
35
- function ve(e3, t2, a2) {
36
- de.value = t2, j(null, X.pageContext, X.configure, "node-click", { data: e3, node: t2, nodeTree: a2 });
35
+ function ve(e3, t2, n2) {
36
+ de.value = t2, j(null, X.pageContext, X.configure, "node-click", { data: e3, node: t2, nodeTree: n2 });
37
37
  }
38
38
  function fe(e3, t2) {
39
- let a2 = "0";
40
- a2 = 0 === e3.level ? "0" : e3.data.nodeId, function(e4, t3, a3) {
41
- const n2 = { parentNodeId: e4, data: t3.data, searchValue: ue, isSearch: ie.value };
42
- M(X.pageContext, X.configure, e4, t3, n2).then((n3) => {
43
- if (ie.value = false, a3(n3), "0" === e4) {
39
+ let n2 = "0";
40
+ n2 = 0 === e3.level ? "0" : e3.data.nodeId, function(e4, t3, n3) {
41
+ const a2 = { parentNodeId: e4, data: t3.data, searchValue: ue, isSearch: ie.value };
42
+ M(X.pageContext, X.configure, e4, t3, a2).then((a3) => {
43
+ if (ie.value = false, n3(a3), "0" === e4) {
44
44
  !function(e5, t4) {
45
- const a4 = { parentNodeId: e5, data: t4.data, searchValue: ue, isSearch: ie.value };
46
- M(X.pageContext, X.configure, e5, t4, a4).then((t5) => {
45
+ const n4 = { parentNodeId: e5, data: t4.data, searchValue: ue, isSearch: ie.value };
46
+ M(X.pageContext, X.configure, e5, t4, n4).then((t5) => {
47
47
  ie.value = false, te.value.updateKeyChildren(e5, t5), te.value.store.nodesMap[e5] && (te.value.store.nodesMap[e5].expanded = true);
48
48
  });
49
- }(n3[0].nodeId, t3);
49
+ }(a3[0].nodeId, t3);
50
50
  }
51
51
  });
52
- }(a2, e3, t2);
52
+ }(n2, e3, t2);
53
53
  }
54
- const ge = t({}), me = (e3, t2, a2, n2) => {
54
+ const ge = t({}), me = (e3, t2, n2, a2) => {
55
55
  if (se.value) return void z.warning("请先保存当前编辑节点!");
56
- document.removeEventListener("click", he), ge.value = a2, A.value = true;
56
+ document.removeEventListener("click", he), ge.value = n2, A.value = true;
57
57
  const { clientX: l2, clientY: o2 } = e3, d2 = $.value;
58
58
  if (d2) {
59
- const { innerWidth: e4, innerHeight: t3 } = window, { offsetWidth: a3, offsetHeight: n3 } = d2, u2 = l2 + a3 > e4 ? l2 - a3 : l2, i2 = o2 + n3 > t3 ? o2 - n3 : o2;
59
+ const { innerWidth: e4, innerHeight: t3 } = window, { offsetWidth: n3, offsetHeight: a3 } = d2, u2 = l2 + n3 > e4 ? l2 - n3 : l2, i2 = o2 + a3 > t3 ? o2 - a3 : o2;
60
60
  d2.style.left = `${u2}px`, d2.style.top = `${i2}px`, d2.style.display = "block";
61
61
  }
62
62
  document.addEventListener("click", he);
@@ -64,14 +64,14 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
64
64
  A.value = false, document.removeEventListener("click", he);
65
65
  }, ye = (e3, t2) => {
66
66
  if (e3.parent && e3.parent.level > 0) {
67
- const a2 = e3.parent.data.children.findIndex((t3) => t3.nodeId === e3.data.nodeId);
68
- e3.parent.data.children[a2] = t2, e3.data = t2;
67
+ const n2 = e3.parent.data.children.findIndex((t3) => t3.nodeId === e3.data.nodeId);
68
+ e3.parent.data.children[n2] = t2, e3.data = t2;
69
69
  } else {
70
- const a2 = e3.parent.data.findIndex((t3) => t3.nodeId === e3.data.nodeId);
71
- e3.parent.data[a2] = t2, e3.data = t2;
70
+ const n2 = e3.parent.data.findIndex((t3) => t3.nodeId === e3.data.nodeId);
71
+ e3.parent.data[n2] = t2, e3.data = t2;
72
72
  }
73
73
  }, Ce = () => {
74
- se.value = "", ce.value = "", re.value = "";
74
+ se.value = "", re.value = "", ce.value = "";
75
75
  }, xe = () => ({ nodeId: "primary" + (/* @__PURE__ */ new Date()).getTime(), name: "新增节点", disabled: false, iconType: "custom", isLeaf: true });
76
76
  function ke(e3) {
77
77
  e3.tipMessage ? S.confirm(e3.tipMessage, { confirmButtonText: "确定", cancelButtonText: "取消", type: "error" }).then(() => {
@@ -79,7 +79,7 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
79
79
  z.success("删除成功!"), Ne(), ge.value = null;
80
80
  });
81
81
  }).catch(() => {
82
- ge.value = null;
82
+ ge.value = null, console.log("取消");
83
83
  }) : K(ge.value, X.configure, X.pageContext).then(() => {
84
84
  z.success("删除成功!"), Ne(), ge.value = null;
85
85
  });
@@ -102,30 +102,31 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
102
102
  te.value.setCheckedNodes(e3);
103
103
  }, getCheckedKeys: (e3) => te.value.getCheckedKeysleafOnly(), setCheckedKeys: (e3, t2) => {
104
104
  te.value.setCheckedKeys(e3, t2);
105
- }, setChecked: (e3, t2, a2) => {
106
- te.value.setChecked(e3, t2, a2);
105
+ }, setChecked: (e3, t2, n2) => {
106
+ te.value.setChecked(e3, t2, n2);
107
107
  }, getCurrentKey: () => te.value.getCurrentKey(), getCurrentNode: () => te.value.getCurrentNode(), setCurrentKey: (e3, t2 = true) => te.value.setCurrentKey(e3, t2), setCurrentNode: (e3, t2 = true) => te.value.setCurrentNode(e3, t2) }), (e3, t2) => {
108
108
  var _a2;
109
- const a2 = d("el-input"), n2 = d("el-button"), l2 = d("SuperIcon"), o2 = d("el-tree");
110
- return i(), u("div", { class: s(["amb-tree-runtime-main", r(ee)]) }, [ae.value.filter ? (i(), c(a2, { key: 0, modelValue: ue.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => ue.value = e4), style: { width: "100%" }, placeholder: "请输入查询条件" }, null, 8, ["modelValue"])) : p("", true), le.value ? (i(), c(o2, { key: 1, ref_key: "menuTreeRef", ref: te, style: f(r(Z)), load: fe, data: oe.value, "node-key": "nodeId", props: ne.value, "default-expand-all": ae.value.defaultExpandAll, "expand-on-click-node": ae.value.expandOnClickNode, indent: ae.value.retractWidth ? ae.value.retractWidth : 18, accordion: ae.value.accordion, "show-checkbox": !!ae.value.showCheckbox, "highlight-current": "", lazy: J.value, "filter-node-method": pe, onNodeClick: ve, onNodeContextmenu: me }, { default: g(({ node: o3, data: d2 }) => [d2.nodeId === se.value ? (i(), u("div", P, [m(a2, { modelValue: ce.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => ce.value = e4), size: "small" }, null, 8, ["modelValue"]), h("div", null, [m(n2, { type: "primary", link: "", onClick: (e4) => ((e5) => {
111
- "" !== ce.value ? (e5.data.name = ce.value, re.value && e5.data.nodeId === re.value ? w(e5, X.configure, X.pageContext).then((t3) => {
109
+ const n2 = d("el-input"), a2 = d("el-button"), l2 = d("SuperIcon"), o2 = d("el-tree");
110
+ return i(), u("div", { class: s(["amb-tree-runtime-main", c(ee)]) }, [ne.value.filter ? (i(), r(n2, { key: 0, modelValue: ue.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => ue.value = e4), style: { width: "100%" }, placeholder: "请输入查询条件" }, null, 8, ["modelValue"])) : p("", true), le.value ? (i(), r(o2, { key: 1, ref_key: "menuTreeRef", ref: te, style: f(c(Z)), load: fe, data: oe.value, "node-key": "nodeId", props: ae.value, "default-expand-all": ne.value.defaultExpandAll, "expand-on-click-node": ne.value.expandOnClickNode, indent: ne.value.retractWidth ? ne.value.retractWidth : 18, accordion: ne.value.accordion, "show-checkbox": !!ne.value.showCheckbox, "highlight-current": "", lazy: J.value, "filter-node-method": pe, onNodeClick: ve, onNodeContextmenu: me }, { default: g(({ node: o3, data: d2 }) => [d2.nodeId === se.value ? (i(), u("div", P, [m(n2, { modelValue: re.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => re.value = e4), size: "small" }, null, 8, ["modelValue"]), h("div", null, [m(a2, { type: "primary", link: "", onClick: (e4) => ((e5) => {
111
+ "" !== re.value ? (e5.data.name = re.value, ce.value && e5.data.nodeId === ce.value ? w(e5, X.configure, X.pageContext).then((t3) => {
112
112
  ye(e5, t3.currentNode), Ce(), z.success("保存成功!");
113
113
  }) : E(e5, X.configure, X.pageContext).then((t3) => {
114
- ye(e5, t3.currentNode), Ce(), z.success("保存成功!");
114
+ console.log(t3), ye(e5, t3.currentNode), Ce(), z.success("保存成功!");
115
115
  })) : z.warning("请输入节点名称");
116
- })(o3) }, { default: g(() => t2[2] || (t2[2] = [y(" 保存 ")])), _: 2 }, 1032, ["onClick"]), m(n2, { style: { "margin-left": "4px" }, type: "primary", link: "", onClick: (t3) => ((e4) => {
117
- re.value && e4.data.nodeId === re.value && te.value.remove(e4), Ce();
118
- })(o3, e3.configure, e3.pageContext) }, { default: g(() => t2[3] || (t2[3] = [y(" 撤销 ")])), _: 2 }, 1032, ["onClick"])])])) : (i(), u("span", { key: 1, title: o3.label, class: "ellipsis" }, [d2.iconValue ? (i(), c(l2, { key: 0, iconType: d2.iconType, iconValue: d2.iconValue }, null, 8, ["iconType", "iconValue"])) : ae.value.iconValue ? (i(), c(l2, { key: 1, iconType: ae.value.iconType, iconValue: ae.value.iconValue }, null, 8, ["iconType", "iconValue"])) : (i(), u(C, { key: 2 }, [d2.isLeaf ? (i(), u("div", H, [t2[5] || (t2[5] = h("img", { src: I, class: "file" }, null, -1)), h("span", null, x(d2.name), 1)])) : (i(), u("div", R, [h("div", D, [t2[4] || (t2[4] = h("img", { src: T, class: "file" }, null, -1)), h("span", null, x(d2.name), 1)])]))], 64))], 8, W))]), _: 1 }, 8, ["style", "data", "props", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "lazy"])) : p("", true), v(h("div", null, [h("ul", { ref_key: "contxtMenuRef", ref: $, class: "context-menu" }, [(i(true), u(C, null, k(q.value, (e4, t3) => (i(), u("li", { key: t3, tabindex: "-1", class: "menu__item", onClick: (t4) => ((e5) => {
119
- if (ge.value && "standard" === e5.type && e5.standardEvent) if ("edit" === e5.standardEvent) se.value = ge.value.data.nodeId, ce.value = ge.value.data.name;
116
+ })(o3) }, { default: g(() => t2[2] || (t2[2] = [y(" 保存 ")])), _: 2 }, 1032, ["onClick"]), m(a2, { style: { "margin-left": "4px" }, type: "primary", link: "", onClick: (t3) => ((e4) => {
117
+ ce.value && e4.data.nodeId === ce.value && te.value.remove(e4), Ce();
118
+ })(o3, e3.configure, e3.pageContext) }, { default: g(() => t2[3] || (t2[3] = [y(" 撤销 ")])), _: 2 }, 1032, ["onClick"])])])) : (i(), u("span", { key: 1, title: o3.label, class: "ellipsis" }, [d2.iconValue ? (i(), r(l2, { key: 0, iconType: d2.iconType, iconValue: d2.iconValue }, null, 8, ["iconType", "iconValue"])) : ne.value.iconValue ? (i(), r(l2, { key: 1, iconType: ne.value.iconType, iconValue: ne.value.iconValue }, null, 8, ["iconType", "iconValue"])) : (i(), u(C, { key: 2 }, [d2.isLeaf ? (i(), u("div", H, [t2[5] || (t2[5] = h("img", { src: I, class: "file" }, null, -1)), h("span", null, x(d2.name), 1)])) : (i(), u("div", R, [h("div", D, [t2[4] || (t2[4] = h("img", { src: T, class: "file" }, null, -1)), h("span", null, x(d2.name), 1)])]))], 64))], 8, W))]), _: 1 }, 8, ["style", "data", "props", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "lazy"])) : p("", true), v(h("div", null, [h("ul", { ref_key: "contxtMenuRef", ref: $, class: "context-menu" }, [(i(true), u(C, null, k(q.value, (e4, t3) => (i(), u("li", { key: t3, tabindex: "-1", class: "menu__item", onClick: (t4) => ((e5) => {
119
+ if (ge.value) if ("standard" === e5.type && e5.standardEvent) if ("edit" === e5.standardEvent) se.value = ge.value.data.nodeId, re.value = ge.value.data.name;
120
120
  else if ("delete" === e5.standardEvent) ge.value.childNodes && ge.value.childNodes.length > 0 && e5.deleteParentNodeTip ? (e5.deleteParentNodeTipMessage || (e5.deleteParentNodeTipMessage = "当前节点下有子节点,确认删除?"), S.confirm(e5.deleteParentNodeTipMessage, { confirmButtonText: "确定", cancelButtonText: "取消", type: "error" }).then(() => {
121
121
  ke(e5);
122
122
  }).catch(() => {
123
- ge.value = null;
123
+ ge.value = null, console.log("取消");
124
124
  })) : ke(e5);
125
125
  else {
126
126
  const t5 = xe();
127
- se.value = t5.nodeId, re.value = t5.nodeId, ce.value = t5.name, "addSiblingNode" === e5.standardEvent ? (t5.isLeaf = ge.value.data.isLeaf, ge.value.parent && ge.value.parent.level > 0 ? te.value.append(t5, ge.value.parent) : oe.value.push(t5)) : "addChildNode" === e5.standardEvent && (t5.isLeaf = true, ge.value.data.isLeaf = false, te.value.append(t5, ge.value), te.value.setCurrentKey(t5.nodeId, true));
127
+ se.value = t5.nodeId, ce.value = t5.nodeId, re.value = t5.name, "addSiblingNode" === e5.standardEvent ? (t5.isLeaf = ge.value.data.isLeaf, ge.value.parent && ge.value.parent.level > 0 ? te.value.append(t5, ge.value.parent) : oe.value.push(t5)) : "addChildNode" === e5.standardEvent && (t5.isLeaf = true, ge.value.data.isLeaf = false, te.value.append(t5, ge.value), te.value.setCurrentKey(t5.nodeId, true));
128
128
  }
129
+ else console.log("自定义事件", e5);
129
130
  })(e4) }, [h("span", null, x(e4.name), 1)], 8, O))), 128))], 512)], 512), [[N, A.value && ((_a2 = q.value) == null ? void 0 : _a2.length) > 0]])], 2);
130
131
  };
131
132
  } });