super-page-runtime 2.3.0-sit8 → 2.3.0-tmp2

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.
@@ -1,50 +1,50 @@
1
- import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as a, createElementBlock as i, openBlock as l, createBlock as u, createCommentVNode as r, unref as s } from "vue";
2
- import { setTableEvents as c, gridSelectRecord as p, gridSelectAllRecords as f, gridSelectionChange as d, cellClick as v, cellDblClick as b, rowClick as g, rowDblClick as m, headerClick as h, getHandleEvent as S } from "../../../../utils/events/event-util.js";
3
- import { caculateShowCondition as w, setVariableValue as T, getVariableValue as x, getSizeConfig as C } from "../../../../utils/page-helper-util.js";
1
+ import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as i, createElementBlock as a, openBlock as l, 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 v, rowClick as g, rowDblClick as m, headerClick as h, getHandleEvent as S } from "../../../../utils/events/event-util.js";
3
+ import { caculateShowCondition as w, setVariableValue as x, getVariableValue as T, 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";
6
- import { popupToPage as R, getOperationButtons as I } from "../../../../utils/table-utils.js";
6
+ import { popupToPage as I, getOperationButtons as R } from "../../../../utils/table-utils.js";
7
7
  import { getListCode as O, getBaseUrl as _ } from "../../../../utils/common-util.js";
8
8
  import { getAdditionalParamMap as k } from "../../../../utils/events/standard-event.js";
9
9
  import { getRowStyleUtil as M, getCellStyleUtil as F, getHeaderCellStyleUtil as $ } from "../../chart/table/chart-table-util.js";
10
10
  const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure: {} }, emits: ["setSafeDeleteTableCode"], setup(e2, { expose: j2, emit: A }) {
11
- const L = e2, B = L.pageContext;
12
- let N = L.configure;
13
- const E = L.configure.runtime ? L.configure.runtime : {};
14
- B.isTest ? E.value = L.configure.runtime ? L.configure.runtime : {} : B.tableRuntimes && B.tableRuntimes[N.uuid] && (N = JSON.parse(B.tableRuntimes[N.uuid].configure), E.value = N.runtime ? N.runtime : {});
15
- const G = O(B.code, B.version, N.uuid), H = B.entity.data, V = N.code ? N.code : G, U = k(B), z = E && E.events ? E.events : [], J = t([]), q = B.superGridItems, K = q ? q[N.uuid] : null, Q = E.style, W = E.class, X = L.pageContext.entity ? L.pageContext.entity : {};
16
- let Y = D(L.configure, V), Z = _(B.backendUrl, B.isTest);
11
+ const N = e2, E = N.pageContext;
12
+ let H = N.configure;
13
+ const L = N.configure.runtime ? N.configure.runtime : {};
14
+ E.isTest ? L.value = N.configure.runtime ? N.configure.runtime : {} : E.tableRuntimes && E.tableRuntimes[H.uuid] && (H = JSON.parse(E.tableRuntimes[H.uuid].configure), L.value = H.runtime ? H.runtime : {});
15
+ const B = O(E.code, E.version, H.uuid), U = E.entity.data, z = H.code ? H.code : B, V = k(E), G = L && L.events ? L.events : [], J = t([]), q = E.superGridItems, K = q ? q[H.uuid] : null, Q = L.style, W = L.class, X = N.pageContext.entity ? N.pageContext.entity : {};
16
+ let Y = D(N.configure, z), Z = _(E.backendUrl, E.isTest);
17
17
  Z || (Z = window.$vueApp.config.globalProperties.baseURL);
18
18
  const ee = t(false);
19
19
  let te = t(0);
20
- const ne = N.props.dataOrigin.principalLinkage, oe = t({ isSql: true, subTableData: null, rowKeyProp: ne, extraParam: {}, operations: {}, hiddenColumns: [], pageCode: B.code, pageVersion: B.version, pageContext: B, configureObj: N, showPageArea: false, showRowForm: false, showOverflowTooltip: !(!N.props || !N.props.otherSettings || void 0 !== N.props.otherSettings.isBreakLine && false !== N.props.otherSettings.isBreakLine), backendUrl: Z, cellStyleRender: function(e3) {
21
- return F(e3, e3.cellStyle, L);
20
+ const ne = H.props.dataOrigin.principalLinkage, oe = t({ isSql: true, subTableData: null, rowKeyProp: ne, extraParam: {}, operations: {}, hiddenColumns: [], pageCode: E.code, pageVersion: E.version, pageContext: E, configureObj: H, showPageArea: false, showRowForm: false, showOverflowTooltip: !(!H.props || !H.props.otherSettings || void 0 !== H.props.otherSettings.isBreakLine && false !== H.props.otherSettings.isBreakLine), backendUrl: Z, cellStyleRender: function(e3) {
21
+ return F(e3, e3.cellStyle, N);
22
22
  }, rowStyleRender: function(e3) {
23
- return M(e3, null, L);
23
+ return M(e3, null, N);
24
24
  }, titleStyleRender: function(e3) {
25
- const t2 = e3.titleStyle, n2 = L.configure.style.titleStyle;
26
- return $(e3, { cellTitleStyle: t2, titleStyle: n2 }, L);
27
- } }), ae = A;
28
- Q && (oe.value.tableStyle = Q), W && (oe.value.tableClass = W), N.props && N.props.base && true === N.props.base.subPaging ? oe.value.showPageArea = true : oe.value.showPageArea = false, N.props.base.showRowForm && (oe.value.showRowForm = N.props.base.showRowForm);
29
- const ie = t(null);
25
+ const t2 = e3.titleStyle, n2 = N.configure.style.titleStyle;
26
+ return $(e3, { cellTitleStyle: t2, titleStyle: n2 }, N);
27
+ } }), ie = A;
28
+ Q && (oe.value.tableStyle = Q), W && (oe.value.tableClass = W), H.props && H.props.base && true === H.props.base.subPaging ? oe.value.showPageArea = true : oe.value.showPageArea = false, H.props.base.showRowForm && (oe.value.showRowForm = H.props.base.showRowForm);
29
+ const ae = t(null);
30
30
  function le() {
31
- ie.value && (oe.value.subTableData = null, ie.value.reloadSubTableData(G));
31
+ ae.value && (oe.value.subTableData = null, ae.value.reloadSubTableData(B));
32
32
  }
33
33
  function ue(e3) {
34
- if (void 0 === e3 && (e3 = re()), oe.value.isPageInfo = false, oe.value.isFormSubTable = true, oe.value.canRrefreshSubtableData = e3, oe.value.getFormData = se, oe.value.getGridData = ce, oe.value.extraParam.subTableListViewCode = G, oe.value.extraParam.beanName = B.beanName, oe.value.extraParam.subtableSetting = N.props && N.props.otherSettings ? JSON.stringify(N.props.otherSettings) : null, oe.value.extraParam.additionalParamMap = U, oe.value.extraParam.entityMap = B.entity.data, oe.value.extraParam.contextMap = B.entity.context, oe.value.extraParam.taskMap = B.entity.task, !(N.props && N.props.base && N.props.base.showOperation)) {
34
+ if (void 0 === e3 && (e3 = re()), oe.value.isPageInfo = false, oe.value.isFormSubTable = true, oe.value.canRrefreshSubtableData = e3, oe.value.getFormData = se, oe.value.getGridData = ce, oe.value.extraParam.subTableListViewCode = B, oe.value.extraParam.beanName = E.beanName, oe.value.extraParam.subtableSetting = H.props && H.props.otherSettings ? JSON.stringify(H.props.otherSettings) : null, oe.value.extraParam.additionalParamMap = V, oe.value.extraParam.entityMap = E.entity.data, oe.value.extraParam.contextMap = E.entity.context, oe.value.extraParam.taskMap = E.entity.task, !(H.props && H.props.base && H.props.base.showOperation)) {
35
35
  let e4 = oe.value.hiddenColumns;
36
36
  e4 ? e4.push("operation") : e4 = ["operation"], oe.value.hiddenColumns = e4;
37
37
  }
38
- oe.value.showOperationButton = !(!N.props || !N.props.base) && N.props.base.showOperation, oe.value.isPdfEditor = false, oe.value.tableRecordMaxNum = N.props && N.props.otherSettings ? N.props.otherSettings.tableRecordMaxNum : null;
39
- let t2 = C(B, N);
40
- t2 && t2.fixHeight && (oe.value.formSetHeight = t2.fixHeight), t2 && t2.maxHeight && (oe.value.formSetMaxHeight = t2.maxHeight), oe.value.validateEitConditions = Ge;
38
+ oe.value.showOperationButton = !(!H.props || !H.props.base) && H.props.base.showOperation, oe.value.isPdfEditor = false, oe.value.tableRecordMaxNum = H.props && H.props.otherSettings ? H.props.otherSettings.tableRecordMaxNum : null;
39
+ let t2 = C(E, H);
40
+ t2 && t2.fixHeight && (oe.value.formSetHeight = t2.fixHeight), t2 && t2.maxHeight && (oe.value.formSetMaxHeight = t2.maxHeight), oe.value.validateEitConditions = Be;
41
41
  }
42
42
  function re() {
43
- if (N.props && N.props.otherSettings) {
44
- if (N.props.otherSettings.sourceQueryTableData && N.props.otherSettings.timeToInitializeSubTable && N.props.otherSettings.timeToInitializeSubTable.length > 0) {
43
+ if (H.props && H.props.otherSettings) {
44
+ if (H.props.otherSettings.sourceQueryTableData && H.props.otherSettings.timeToInitializeSubTable && H.props.otherSettings.timeToInitializeSubTable.length > 0) {
45
45
  let e3 = false;
46
- if (-1 !== N.props.otherSettings.timeToInitializeSubTable.indexOf("create") && (e3 = !H.id && !H.ID), -1 !== N.props.otherSettings.timeToInitializeSubTable.indexOf("noData")) {
47
- const t2 = H[V];
46
+ if (-1 !== H.props.otherSettings.timeToInitializeSubTable.indexOf("create") && (e3 = !U.id && !U.ID), -1 !== H.props.otherSettings.timeToInitializeSubTable.indexOf("noData")) {
47
+ const t2 = U[z];
48
48
  (!t2 || t2.length <= 0) && (e3 = true);
49
49
  }
50
50
  return e3;
@@ -53,22 +53,22 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
53
53
  }
54
54
  }
55
55
  function se() {
56
- return B.entity.data;
56
+ return E.entity.data;
57
57
  }
58
58
  function ce() {
59
- return x(X, Y);
59
+ return T(X, Y);
60
60
  }
61
- let pe, fe;
62
- function de(e3) {
63
- ue(e3), oe.value.subTableData = null, ve(), ee.value = false, pe = setTimeout(() => {
64
- ee.value = true, te.value = te.value + 1, be();
61
+ let pe, de;
62
+ function fe(e3) {
63
+ ue(e3), oe.value.subTableData = null, be(), ee.value = false, pe = setTimeout(() => {
64
+ ee.value = true, te.value = te.value + 1, ve();
65
65
  }, 10);
66
66
  }
67
- function ve() {
67
+ function be() {
68
68
  !function() {
69
- const e4 = B.fieldPermissionMap, t2 = B.actionPermissionMap;
69
+ const e4 = E.fieldPermissionMap, t2 = E.actionPermissionMap;
70
70
  if (e4 && null != e4) {
71
- let t3 = e4.get(V);
71
+ let t3 = e4.get(z);
72
72
  if (!t3) {
73
73
  const n3 = e4.get("all_fields");
74
74
  n3 && (t3 = [n3]);
@@ -76,32 +76,32 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
76
76
  oe.value.validateRules = t3 || null;
77
77
  }
78
78
  if (t2 && null != t2) {
79
- let e5 = t2.get(V);
79
+ let e5 = t2.get(z);
80
80
  e5 || (e5 = t2.get("all_sub_tables")), oe.value.actionPermission = e5;
81
81
  }
82
82
  oe.value.operations || (oe.value.operations = {});
83
83
  const n2 = function() {
84
- let e5 = [], t3 = w(L.pageContext, N.props.base.showOperationCondition);
84
+ let e5 = [], t3 = w(N.pageContext, H.props.base.showOperationCondition);
85
85
  if (t3 && Se()) {
86
86
  const t4 = { props: { elementType: "el-button", icon: "Plus", type: "primary", circle: true, size: "mini", permission: "true" }, onClick: Ce, isShow: we };
87
87
  e5.push(t4);
88
88
  }
89
- if (t3 && Te(null, null, null, null, null, true)) {
90
- const t4 = { props: { elementType: "el-button", icon: "Minus", type: "danger", circle: true, size: "mini", permission: "true" }, onClick: De, isShow: xe };
89
+ if (t3 && xe(null, null, null, null, null, true)) {
90
+ const t4 = { props: { elementType: "el-button", icon: "Minus", type: "danger", circle: true, size: "mini", permission: "true" }, onClick: De, isShow: Te };
91
91
  e5.push(t4);
92
92
  }
93
- return I(B, N, e5, me), e5;
93
+ return R(E, H, e5, me), e5;
94
94
  }();
95
95
  oe.value.operations.operation = n2, oe.value.subTableCanAdd = Se();
96
- }(), c(oe.value, z, B, N);
97
- const e3 = B.customEvents;
98
- e3 && (oe.value.eventCallBack = e3), ee.value = true, be();
96
+ }(), c(oe.value, G, E, H);
97
+ const e3 = E.customEvents;
98
+ e3 && (oe.value.eventCallBack = e3), ee.value = true, ve();
99
99
  }
100
- function be() {
101
- B.tableUuids || (B.tableUuids = []), B.tableUuids.indexOf(N.uuid) < 0 && B.tableUuids.push(N.uuid);
100
+ function ve() {
101
+ E.tableUuids || (E.tableUuids = []), E.tableUuids.indexOf(H.uuid) < 0 && E.tableUuids.push(H.uuid);
102
102
  }
103
103
  n(() => {
104
- const e3 = N.uuid, t2 = B.subTableWatchProps;
104
+ const e3 = H.uuid, t2 = E.subTableWatchProps;
105
105
  P.$on("_refreshSubTable_" + e3, (n2) => {
106
106
  const o2 = n2.propName;
107
107
  if (t2 && t2[e3] && t2[e3].length > 0) {
@@ -111,57 +111,57 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
111
111
  le();
112
112
  }), P.$on("_refreshChildData_" + e3, (e4) => {
113
113
  !function(e5) {
114
- Ee(e5), fe = setTimeout(() => {
115
- ie.value && (ie.value.refreshChildData(G, e5, N.props && N.props.base && true === N.props.base.subPaging), oe.value.extraParam.entityMap = B.entity.data);
114
+ Le(e5), de = setTimeout(() => {
115
+ ae.value && (ae.value.refreshChildData(B, e5, H.props && H.props.base && true === H.props.base.subPaging), oe.value.extraParam.entityMap = E.entity.data);
116
116
  }, 10);
117
117
  }(e4);
118
- }), P.$on(G + "-pickFileDone", (e4) => {
119
- ie.value.pickFileDone(e4);
120
- }), P.$on(G + "-scanDone", (e4) => {
121
- ie.value.scanDone(e4);
122
- }), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete && ae("setSafeDeleteTableCode", oe.value.extraParam.tableName);
118
+ }), P.$on(B + "-pickFileDone", (e4) => {
119
+ ae.value.pickFileDone(e4);
120
+ }), P.$on(B + "-scanDone", (e4) => {
121
+ ae.value.scanDone(e4);
122
+ }), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete && ie("setSafeDeleteTableCode", oe.value.extraParam.tableName);
123
123
  }), o(() => {
124
- pe && clearTimeout(pe), fe && clearTimeout(fe);
125
- const e3 = N.uuid;
126
- P.$off("_refreshSubTable_" + e3), P.$off("_refreshSubTableHandle_" + e3), P.$off("_refreshChildData_" + e3), P.$off(G + "-pickFileDone"), P.$off(G + "-scanDone");
124
+ pe && clearTimeout(pe), de && clearTimeout(de);
125
+ const e3 = H.uuid;
126
+ P.$off("_refreshSubTable_" + e3), P.$off("_refreshSubTableHandle_" + e3), P.$off("_refreshChildData_" + e3), P.$off(B + "-pickFileDone"), P.$off(B + "-scanDone");
127
127
  });
128
128
  const ge = t({});
129
129
  function me(e3) {
130
130
  if (!e3) return;
131
131
  return ge.value[e3.uuid] = e3, he;
132
132
  }
133
- function he(e3, t2, n2, o2, a2, i2) {
134
- const l2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: a2, button: i2, id: n2.ID ? n2.ID : n2.id }, u2 = ge.value[i2.sourceButton.uuid], r2 = N;
135
- u2.props.base.tableUuid = r2.uuid, S(null, B, u2, "click", l2);
133
+ function he(e3, t2, n2, o2, i2, a2) {
134
+ const l2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2, button: a2, id: n2.ID ? n2.ID : n2.id }, u2 = ge.value[a2.sourceButton.uuid], r2 = H;
135
+ u2.props.base.tableUuid = r2.uuid, S(null, E, u2, "click", l2);
136
136
  }
137
- function Se(e3, t2, n2, o2, a2, i2) {
138
- if (!w(L.pageContext, N.props.base.showOperationCondition)) return false;
139
- const l2 = B.fieldPermissionMap, u2 = B.actionPermissionMap;
137
+ function Se(e3, t2, n2, o2, i2, a2) {
138
+ if (!w(N.pageContext, H.props.base.showOperationCondition)) return false;
139
+ const l2 = E.fieldPermissionMap, u2 = E.actionPermissionMap;
140
140
  let r2 = true;
141
141
  if (l2 && null !== l2) {
142
142
  const e4 = l2.get("all_fields");
143
143
  void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (r2 = false);
144
144
  }
145
- if (true === r2 && V && u2 && null !== u2) {
146
- let e4 = u2.get(V);
145
+ if (true === r2 && z && u2 && null !== u2) {
146
+ let e4 = u2.get(z);
147
147
  e4 || (e4 = u2.get("all_sub_tables")), e4 && void 0 !== e4.canAdd && false === e4.canAdd && (r2 = false);
148
148
  }
149
149
  return r2;
150
150
  }
151
- function we(e3, t2, n2, o2, a2, i2) {
151
+ function we(e3, t2, n2, o2, i2, a2) {
152
152
  let l2 = Se();
153
- return true === l2 && (l2 = w(L.pageContext, N.props.base.showAddBtnCondition, n2)), l2;
153
+ return true === l2 && (l2 = w(N.pageContext, H.props.base.showAddBtnCondition, n2)), l2;
154
154
  }
155
- function Te(e3, t2, n2, o2, a2, i2) {
156
- const l2 = B.fieldPermissionMap, u2 = B.actionPermissionMap;
155
+ function xe(e3, t2, n2, o2, i2, a2) {
156
+ const l2 = E.fieldPermissionMap, u2 = E.actionPermissionMap;
157
157
  let r2 = true;
158
158
  if (l2 && null !== l2) {
159
159
  const e4 = l2.get("all_fields");
160
160
  void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (r2 = false);
161
161
  }
162
- if (true === r2 && V && u2 && null !== u2) {
163
- let e4 = u2.get(V);
164
- 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;
162
+ if (true === r2 && z && u2 && null !== u2) {
163
+ let e4 = u2.get(z);
164
+ 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;
165
165
  else {
166
166
  const t3 = function(e5) {
167
167
  return e5 && e5.id ? e5.id : e5 && e5.ID ? e5.ID : void 0;
@@ -172,80 +172,80 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
172
172
  }
173
173
  return r2;
174
174
  }
175
- function xe(e3, t2, n2, o2, a2, i2) {
176
- let l2 = Te(0, 0, n2, 0, 0, i2);
177
- return true === l2 && (l2 = w(L.pageContext, N.props.base.showDeleteBtnCondition, n2)), l2;
175
+ function Te(e3, t2, n2, o2, i2, a2) {
176
+ let l2 = xe(0, 0, n2, 0, 0, a2);
177
+ return true === l2 && (l2 = w(N.pageContext, H.props.base.showDeleteBtnCondition, n2)), l2;
178
178
  }
179
- function Ce(e3, t2, n2, o2, a2) {
180
- ie.value.createRow(G, {}, { getDefaultValueFunc: y }, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: a2 });
179
+ function Ce(e3, t2, n2, o2, i2) {
180
+ ae.value.createRow(B, {}, { getDefaultValueFunc: y });
181
181
  }
182
- function De(e3, t2, n2, o2, a2) {
183
- ie.value.deleteRow(a2, G, false);
182
+ function De(e3, t2, n2, o2, i2) {
183
+ ae.value.deleteRow(i2, B, false);
184
184
  }
185
185
  function ye(e3) {
186
- T(X, Y, e3);
186
+ x(X, Y, e3);
187
187
  }
188
188
  function Pe(e3) {
189
- B.subTablePageInfo || (B.subTablePageInfo = {}), B.subTablePageInfo[V] = { pageSize: e3 };
189
+ E.subTablePageInfo || (E.subTablePageInfo = {}), E.subTablePageInfo[z] = { pageSize: e3 };
190
190
  }
191
- function Re(e3) {
191
+ function Ie(e3) {
192
192
  const t2 = e3.key, n2 = e3.value;
193
- B.selectOptions || (B.selectOptions = {}), B.selectOptions[t2] = n2;
193
+ E.selectOptions || (E.selectOptions = {}), E.selectOptions[t2] = n2;
194
194
  }
195
- function Ie(e3) {
196
- const t2 = B.code + "_";
195
+ function Re(e3) {
196
+ const t2 = E.code + "_";
197
197
  P.$emit(t2 + "prohibit-edit", e3);
198
198
  }
199
199
  function Oe(e3) {
200
- const t2 = B.entity.data;
200
+ const t2 = E.entity.data;
201
201
  if (e3) for (const n2 in e3) t2[n2] = e3[n2];
202
202
  }
203
203
  function _e(e3, t2) {
204
204
  if (void 0 !== t2) {
205
205
  J.value = e3;
206
- p(B, N, { selection: e3, row: t2 });
206
+ p(E, H, { selection: e3, row: t2 });
207
207
  }
208
208
  }
209
209
  function ke(e3) {
210
210
  J.value = e3;
211
- f(B, N, { selection: e3 });
211
+ d(E, H, { selection: e3 });
212
212
  }
213
213
  function Me(e3) {
214
- d(B, N, { newSelection: e3 });
214
+ f(E, H, { newSelection: e3 });
215
215
  }
216
216
  function Fe(e3, t2, n2, o2) {
217
- v(B, N, { row: e3, column: t2, cell: n2, event: o2 });
217
+ b(E, H, { row: e3, column: t2, cell: n2, event: o2 });
218
218
  }
219
219
  function $e(e3, t2, n2, o2) {
220
- b(B, N, { row: e3, column: t2, cell: n2, event: o2 });
220
+ v(E, H, { row: e3, column: t2, cell: n2, event: o2 });
221
221
  }
222
222
  function je(e3, t2, n2) {
223
- g(B, N, { row: e3, column: t2, event: n2 });
223
+ g(E, H, { row: e3, column: t2, event: n2 });
224
224
  }
225
225
  function Ae(e3, t2, n2) {
226
- m(B, N, { row: e3, column: t2, event: n2 });
226
+ m(E, H, { row: e3, column: t2, event: n2 });
227
227
  }
228
- function Le(e3, t2) {
229
- h(B, N, { column: e3, event: t2 });
228
+ function Ne(e3, t2) {
229
+ h(E, H, { column: e3, event: t2 });
230
230
  }
231
- function Be(e3) {
232
- B.entity.data = e3;
231
+ function Ee(e3) {
232
+ E.entity.data = e3;
233
233
  }
234
- function Ne() {
235
- return x(X, Y);
234
+ function He() {
235
+ return T(X, Y);
236
236
  }
237
- function Ee(e3) {
238
- return T(X, Y, e3);
237
+ function Le(e3) {
238
+ return x(X, Y, e3);
239
239
  }
240
- function Ge({ row: e3, editConditions: t2 }) {
240
+ function Be({ row: e3, editConditions: t2 }) {
241
241
  let n2 = true;
242
- return t2 && t2.length > 0 && (n2 = w(L.pageContext, t2, e3)), n2;
242
+ return t2 && t2.length > 0 && (n2 = w(N.pageContext, t2, e3)), n2;
243
243
  }
244
244
  return function() {
245
245
  const e3 = re();
246
- e3 ? de(e3) : (ue(e3), oe.value.isPageInfo = false, oe.value.subTableData = Ne(), ve());
246
+ e3 ? fe(e3) : (ue(e3), oe.value.isPageInfo = false, oe.value.subTableData = He(), be());
247
247
  }(), j2({ createRow: function() {
248
- return ie.value.createRow(G);
248
+ return ae.value.createRow(B);
249
249
  }, getSelections: function() {
250
250
  return J.value;
251
251
  }, getSelectionIds: function() {
@@ -256,36 +256,20 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
256
256
  }, clearSelections: function() {
257
257
  J.value = [];
258
258
  }, getTableConfigure: function() {
259
- return N;
259
+ return H;
260
260
  }, validatorSunTableListData: function() {
261
- return ie.value.validatorSunTableListData();
262
- }, getValue: Ne, setValue: Ee, getTableSelectOptions: function() {
263
- if (ie.value) return ie.value.getTableSelectOptions(G);
261
+ return ae.value.validatorSunTableListData();
262
+ }, getValue: He, setValue: Le, getTableSelectOptions: function() {
263
+ if (ae.value) return ae.value.getTableSelectOptions(B);
264
264
  }, dynamicControlTableEdit: function(e3, t2, n2) {
265
- ie.value && ie.value.dynamicControlTableEdit(e3, t2, n2);
265
+ ae.value && ae.value.dynamicControlTableEdit(e3, t2, n2);
266
266
  }, doLayout: function(e3) {
267
- ie.value && ie.value.doLayout(e3);
267
+ ae.value && ae.value.doLayout(e3);
268
268
  }, changeOperationAddState: function(e3) {
269
- ie.value && ie.value.changeOperationAddState(e3);
270
- }, scrollTo: function(e3, t2) {
271
- ie.value && ie.value.scrollTo(e3, t2);
272
- }, setScrollTop: function(e3) {
273
- ie.value && ie.value.setScrollTop(e3);
274
- }, setScrollLeft: function(e3) {
275
- ie.value && ie.value.setScrollLeft(e3);
276
- }, getSuperGridRef: function() {
277
- return ie.value;
278
- }, getSuperGridTableRef: function() {
279
- return ie.value.getSuperGridRef();
280
- }, setCurrentRowIndex: function(e3) {
281
- var _a;
282
- (_a = ie.value) == null ? void 0 : _a.setCurrentRowIndex(e3);
283
- }, setScrollTopByRowIndex: function(e3) {
284
- var _a;
285
- (_a = ie.value) == null ? void 0 : _a.setScrollTopByRowIndex(e3);
269
+ ae.value && ae.value.changeOperationAddState(e3);
286
270
  } }), (e3, t2) => {
287
- const n2 = a("super-grid");
288
- return l(), i("div", null, [ee.value ? (l(), 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), onSelect: _e, onSelectAll: ke, onSelectionChange: Me, onCellClick: Fe, onCellDblclick: $e, onRowClick: je, onRowDblclick: Ae, onHeaderClick: Le, onFnProhibitToEdit: Ie, onChangeGridData: ye, onReloadGrid: de, onRefresMainTableFields: Oe, onSetSelectOptions: Re, onChangeRowsPerPage: Pe, onNewOpenGridDialog: s(R), onChangeFormData: Be }, null, 8, ["url", "options", "code", "settings", "onNewOpenGridDialog"])) : r("", true)]);
271
+ const n2 = i("super-grid");
272
+ return l(), a("div", null, [ee.value ? (l(), u(n2, { key: 0, ref_key: "gridRef", ref: ae, url: s(Z) + "/dsc/commons/sub-table", options: oe.value, code: s(B), settings: s(K), onSelect: _e, onSelectAll: ke, onSelectionChange: Me, onCellClick: Fe, onCellDblclick: $e, onRowClick: je, onRowDblclick: Ae, onHeaderClick: Ne, onFnProhibitToEdit: Re, onChangeGridData: ye, onReloadGrid: fe, onRefresMainTableFields: Oe, onSetSelectOptions: Ie, onChangeRowsPerPage: Pe, onNewOpenGridDialog: s(I), onChangeFormData: Ee }, null, 8, ["url", "options", "code", "settings", "onNewOpenGridDialog"])) : r("", true)]);
289
273
  };
290
274
  } });
291
275
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent as e, ref as t, createElementBlock as n, openBlock as u, createBlock as o, unref as l } from "vue";
1
+ import { defineComponent as e, ref as t, createElementBlock as n, openBlock as u, createBlock as i, unref as a } from "vue";
2
2
  import "agilebuilder-ui";
3
3
  import "agilebuilder-ui/src/utils/request";
4
4
  import "dayjs";
@@ -6,18 +6,18 @@ import "agilebuilder-ui/src/utils/calculator/calculator-util";
6
6
  import "../../../../utils/global-refs.js";
7
7
  import "agilebuilder-ui/src/utils/common-util";
8
8
  import "agilebuilder-ui/src/utils/util";
9
- import r from "./sub-table-runtime.vue.js";
10
- import i from "./main-table-runtime.vue.js";
11
- const a = e({ __name: "table-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: a2 }) {
9
+ import o from "./sub-table-runtime.vue.js";
10
+ import l from "./main-table-runtime.vue.js";
11
+ const r = e({ __name: "table-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: r2 }) {
12
12
  const c = e2, f = c.pageContext.pageType, s = t(null), g = c.configure.uuid, p = c.pageContext.superGridItems, d = p ? p[g] : null;
13
13
  s.value = d ? d.configure ? JSON.parse(d.configure) : null : c.configure;
14
- const S = c.configure.runtime ? c.configure.runtime : {};
15
- S.style, S.class;
14
+ const m = c.configure.runtime ? c.configure.runtime : {};
15
+ m.style, m.class;
16
16
  const v = t(null);
17
- function m(e3) {
17
+ function S(e3) {
18
18
  c.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES ? c.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES.push(e3) : c.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES = [e3];
19
19
  }
20
- return a2({ refresh: function(e3, t2, n2, u2) {
20
+ return r2({ refresh: function(e3, t2, n2, u2) {
21
21
  if (f && "list" === f) return v.value.refresh(e3, t2, n2, u2);
22
22
  }, createRow: function() {
23
23
  return v.value.createRow();
@@ -45,29 +45,8 @@ const a = e({ __name: "table-runtime", props: { pageContext: {}, configure: {} }
45
45
  v.value && v.value.doLayout(e3);
46
46
  }, changeOperationAddState: function(e3) {
47
47
  v.value && v.value.changeOperationAddState(e3);
48
- }, scrollTo: function(e3, t2) {
49
- var _a;
50
- (_a = v.value) == null ? void 0 : _a.scrollTo(e3, t2);
51
- }, setScrollTop: function(e3) {
52
- var _a;
53
- (_a = v.value) == null ? void 0 : _a.setScrollTop(e3);
54
- }, setScrollLeft: function(e3) {
55
- var _a;
56
- (_a = v.value) == null ? void 0 : _a.setScrollLeft(e3);
57
- }, getSuperGridRef: function() {
58
- var _a;
59
- return (_a = v.value) == null ? void 0 : _a.getSuperGridRef();
60
- }, getSuperGridTableRef: function() {
61
- var _a;
62
- return (_a = v.value) == null ? void 0 : _a.getSuperGridTableRef();
63
- }, setCurrentRowIndex: function(e3) {
64
- var _a;
65
- (_a = v.value) == null ? void 0 : _a.setCurrentRowIndex(e3);
66
- }, setScrollTopByRowIndex: function(e3) {
67
- var _a;
68
- (_a = v.value) == null ? void 0 : _a.setScrollTopByRowIndex(e3);
69
- } }), (e3, t2) => (u(), n("div", null, [l(f) && "form" === l(f) ? (u(), o(r, { key: 0, ref_key: "gridRef", ref: v, pageContext: e3.pageContext, configure: s.value, onSetSafeDeleteTableCode: m }, null, 8, ["pageContext", "configure"])) : (u(), o(i, { key: 1, ref_key: "gridRef", ref: v, pageContext: e3.pageContext, configure: s.value, onSetSafeDeleteTableCode: m }, null, 8, ["pageContext", "configure"]))]));
48
+ } }), (e3, t2) => (u(), n("div", null, [a(f) && "form" === a(f) ? (u(), i(o, { key: 0, ref_key: "gridRef", ref: v, pageContext: e3.pageContext, configure: s.value, onSetSafeDeleteTableCode: S }, null, 8, ["pageContext", "configure"])) : (u(), i(l, { key: 1, ref_key: "gridRef", ref: v, pageContext: e3.pageContext, configure: s.value, onSetSafeDeleteTableCode: S }, null, 8, ["pageContext", "configure"]))]));
70
49
  } });
71
50
  export {
72
- a as default
51
+ r as default
73
52
  };
@@ -2,9 +2,9 @@ import { defineComponent as e, ref as t, computed as a, onMounted as n, nextTick
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";
5
- import { setVariableValue as b, getVariableValue as L } from "../../../../utils/page-helper-util.js";
6
- import { getMenuTreeData as M, createTreeNode as w, updateTreeNode as E, deleteNode as K } from "../../../../utils/tree-utils.js";
7
- import { handleAfterInitEvent as _, handleFormEvent as j } from "../../../../utils/events/event-util.js";
5
+ import { setVariableValue as b, getVariableValue as _ } from "../../../../utils/page-helper-util.js";
6
+ import { getMenuTreeData as L, createTreeNode as M, updateTreeNode as w, deleteNode as E } from "../../../../utils/tree-utils.js";
7
+ import { handleAfterInitEvent as K, handleFormEvent as j } from "../../../../utils/events/event-util.js";
8
8
  import { ElMessageBox as S, ElMessage as z } from "element-plus";
9
9
  import { checkPermission as B } from "agilebuilder-ui/src/utils/permission";
10
10
  const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, class: "item-row" }, D = { class: "item-side" }, H = { key: 1, class: "item-side", style: { display: "flex", "align-items": "center" } }, O = ["onClick"], U = e({ __name: "tree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: U2 }) {
@@ -18,15 +18,15 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
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 = a({ get: () => _(Y, F), set(e3) {
22
22
  b(Y, F, e3);
23
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([]), ue = t(null), de = t(""), ie = t(false), se = t(""), re = t(""), ce = t("");
24
24
  n(() => {
25
25
  l(() => {
26
26
  const e3 = G.value;
27
- _(e3, X.pageContext, X.configure, { componentRef: te.value, value: e3, entity: X.pageContext.entity.data, pageData: X.pageContext.entity.page });
27
+ K(e3, X.pageContext, X.configure, { componentRef: te.value, value: e3, entity: X.pageContext.entity.data, pageData: X.pageContext.entity.page });
28
28
  });
29
- }), J.value ? le.value = true : M(X.pageContext, X.configure).then((e3) => {
29
+ }), J.value ? le.value = true : L(X.pageContext, X.configure).then((e3) => {
30
30
  oe.value = e3, le.value = true;
31
31
  }), o(de, (e3) => {
32
32
  ie.value = true, te.value.filter(e3);
@@ -39,11 +39,11 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
39
39
  let a2 = "0";
40
40
  a2 = 0 === e3.level ? "0" : e3.data.nodeId, function(e4, t3, a3) {
41
41
  const n2 = { parentNodeId: e4, data: t3.data, searchValue: de, isSearch: ie.value };
42
- M(X.pageContext, X.configure, e4, t3, n2).then((n3) => {
42
+ L(X.pageContext, X.configure, e4, t3, n2).then((n3) => {
43
43
  if (ie.value = false, a3(n3), "0" === e4) {
44
44
  !function(e5, t4) {
45
45
  const a4 = { parentNodeId: e5, data: t4.data, searchValue: de, isSearch: ie.value };
46
- M(X.pageContext, X.configure, e5, t4, a4).then((t5) => {
46
+ L(X.pageContext, X.configure, e5, t4, a4).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
49
  }(n3[0].nodeId, t3);
@@ -75,12 +75,12 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
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(() => {
78
- K(ge.value, X.configure, X.pageContext).then(() => {
78
+ E(ge.value, X.configure, X.pageContext).then(() => {
79
79
  z.success("删除成功!"), Ne(), ge.value = null;
80
80
  });
81
81
  }).catch(() => {
82
82
  ge.value = null;
83
- }) : K(ge.value, X.configure, X.pageContext).then(() => {
83
+ }) : E(ge.value, X.configure, X.pageContext).then(() => {
84
84
  z.success("删除成功!"), Ne(), ge.value = null;
85
85
  });
86
86
  }
@@ -93,7 +93,7 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
93
93
  }, expandNode: function(e3) {
94
94
  e3.loaded = false, e3.expand();
95
95
  }, loadTreeNodes: function() {
96
- M(X.pageContext, X.configure).then((e3) => {
96
+ L(X.pageContext, X.configure).then((e3) => {
97
97
  ie.value = false, oe.value = e3;
98
98
  });
99
99
  }, getNode: function(e3) {
@@ -108,14 +108,14 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
108
108
  var _a2;
109
109
  const a2 = u("el-input"), n2 = u("el-button"), l2 = u("SuperIcon"), o2 = u("el-tree");
110
110
  return i(), d("div", { class: s(["amb-tree-runtime-main", r(ee)]) }, [ae.value.filter ? (i(), c(a2, { key: 0, modelValue: de.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => de.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: u2 }) => [u2.nodeId === se.value ? (i(), d("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) => {
111
+ "" !== ce.value ? (e5.data.name = ce.value, re.value && e5.data.nodeId === re.value ? M(e5, X.configure, X.pageContext).then((t3) => {
112
112
  ye(e5, t3.currentNode), Ce(), z.success("保存成功!");
113
- }) : E(e5, X.configure, X.pageContext).then((t3) => {
113
+ }) : w(e5, X.configure, X.pageContext).then((t3) => {
114
114
  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) => {
116
+ })(o3) }, { default: g(() => t2[2] || (t2[2] = [y(" 保存 ")])), _: 2, __: [2] }, 1032, ["onClick"]), m(n2, { style: { "margin-left": "4px" }, type: "primary", link: "", onClick: (t3) => ((e4) => {
117
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(), d("span", { key: 1, title: o3.label, class: "ellipsis" }, [u2.iconValue ? (i(), c(l2, { key: 0, iconType: u2.iconType, iconValue: u2.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(), d(C, { key: 2 }, [u2.isLeaf ? (i(), d("div", H, [t2[5] || (t2[5] = h("img", { src: I, class: "file" }, null, -1)), h("span", null, x(u2.name), 1)])) : (i(), d("div", R, [h("div", D, [t2[4] || (t2[4] = h("img", { src: T, class: "file" }, null, -1)), h("span", null, x(u2.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), d(C, null, k(q.value, (e4, t3) => (i(), d("li", { key: t3, tabindex: "-1", class: "menu__item", onClick: (t4) => ((e5) => {
118
+ })(o3, e3.configure, e3.pageContext) }, { default: g(() => t2[3] || (t2[3] = [y(" 撤销 ")])), _: 2, __: [3] }, 1032, ["onClick"])])])) : (i(), d("span", { key: 1, title: o3.label, class: "ellipsis" }, [u2.iconValue ? (i(), c(l2, { key: 0, iconType: u2.iconType, iconValue: u2.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(), d(C, { key: 2 }, [u2.isLeaf ? (i(), d("div", H, [t2[5] || (t2[5] = h("img", { src: I, class: "file" }, null, -1)), h("span", null, x(u2.name), 1)])) : (i(), d("div", R, [h("div", D, [t2[4] || (t2[4] = h("img", { src: T, class: "file" }, null, -1)), h("span", null, x(u2.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), d(C, null, k(q.value, (e4, t3) => (i(), d("li", { key: t3, tabindex: "-1", class: "menu__item", onClick: (t4) => ((e5) => {
119
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;
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);