super-page-runtime 2.3.4 → 2.3.5
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.
- package/dist/es/components/runtime/utils/barcode-util.js +5 -5
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +45 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +14 -16
- package/dist/es/components/runtime/utils/charts/chart-util.js +24 -26
- package/dist/es/components/runtime/utils/events/event-util.js +116 -116
- package/dist/es/components/runtime/utils/events/print-label.js +0 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +463 -475
- package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
- package/dist/es/components/runtime/utils/form/scan-util.js +3 -4
- package/dist/es/components/runtime/utils/page-helper-util.js +275 -275
- package/dist/es/components/runtime/utils/page-init-util.js +44 -47
- package/dist/es/components/runtime/utils/page-store.js +10 -10
- package/dist/es/components/runtime/utils/table-utils.js +30 -30
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +12 -16
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -6
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +14 -15
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +11 -12
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +17 -18
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +18 -19
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +18 -19
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +19 -21
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +63 -63
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +35 -37
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +120 -123
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +57 -58
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +29 -29
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +30 -27
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +6 -6
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -10
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +15 -15
- package/dist/es/components/runtime/views/home-chart.vue.js +4 -4
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +6 -6
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +138 -140
- package/dist/es/style.css +76 -76
- package/dist/es.zip +0 -0
- package/package.json +2 -2
|
@@ -1,52 +1,50 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as
|
|
2
|
-
import { setTableEvents as c, gridSelectRecord as p, gridSelectAllRecords as
|
|
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
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";
|
|
6
6
|
import { popupToPage as R, getOperationButtons as I } from "../../../../utils/table-utils.js";
|
|
7
|
-
import { getListCode as
|
|
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,
|
|
12
|
-
let
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const Q = G.style, W = G.class, X = L.pageContext.entity ? L.pageContext.entity : {};
|
|
18
|
-
let Y = D(L.configure, E), Z = O(U.backendUrl, U.isTest);
|
|
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);
|
|
19
17
|
Z || (Z = window.$vueApp.config.globalProperties.baseURL);
|
|
20
18
|
const ee = t(false);
|
|
21
19
|
let te = t(0);
|
|
22
|
-
const ne =
|
|
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) {
|
|
23
21
|
return F(e3, e3.cellStyle, L);
|
|
24
22
|
}, rowStyleRender: function(e3) {
|
|
25
23
|
return M(e3, null, L);
|
|
26
24
|
}, titleStyleRender: function(e3) {
|
|
27
25
|
const t2 = e3.titleStyle, n2 = L.configure.style.titleStyle;
|
|
28
26
|
return $(e3, { cellTitleStyle: t2, titleStyle: n2 }, L);
|
|
29
|
-
} }),
|
|
30
|
-
Q && (oe.value.tableStyle = Q), W && (oe.value.tableClass = W),
|
|
31
|
-
const
|
|
32
|
-
function
|
|
33
|
-
|
|
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);
|
|
30
|
+
function le() {
|
|
31
|
+
ie.value && (oe.value.subTableData = null, ie.value.reloadSubTableData(G));
|
|
34
32
|
}
|
|
35
33
|
function ue(e3) {
|
|
36
|
-
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 =
|
|
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)) {
|
|
37
35
|
let e4 = oe.value.hiddenColumns;
|
|
38
36
|
e4 ? e4.push("operation") : e4 = ["operation"], oe.value.hiddenColumns = e4;
|
|
39
37
|
}
|
|
40
|
-
oe.value.showOperationButton = !(!
|
|
41
|
-
let t2 = C(
|
|
42
|
-
t2 && t2.fixHeight && (oe.value.formSetHeight = t2.fixHeight), t2 && t2.maxHeight && (oe.value.formSetMaxHeight = t2.maxHeight), oe.value.validateEitConditions =
|
|
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;
|
|
43
41
|
}
|
|
44
42
|
function re() {
|
|
45
|
-
if (
|
|
46
|
-
if (
|
|
43
|
+
if (N.props && N.props.otherSettings) {
|
|
44
|
+
if (N.props.otherSettings.sourceQueryTableData && N.props.otherSettings.timeToInitializeSubTable && N.props.otherSettings.timeToInitializeSubTable.length > 0) {
|
|
47
45
|
let e3 = false;
|
|
48
|
-
if (-1 !==
|
|
49
|
-
const t2 =
|
|
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];
|
|
50
48
|
(!t2 || t2.length <= 0) && (e3 = true);
|
|
51
49
|
}
|
|
52
50
|
return e3;
|
|
@@ -55,22 +53,22 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
55
53
|
}
|
|
56
54
|
}
|
|
57
55
|
function se() {
|
|
58
|
-
return
|
|
56
|
+
return B.entity.data;
|
|
59
57
|
}
|
|
60
58
|
function ce() {
|
|
61
59
|
return x(X, Y);
|
|
62
60
|
}
|
|
63
|
-
let pe,
|
|
64
|
-
function
|
|
65
|
-
ue(e3), oe.value.subTableData = null,
|
|
66
|
-
ee.value = true, te.value = te.value + 1,
|
|
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();
|
|
67
65
|
}, 10);
|
|
68
66
|
}
|
|
69
|
-
function
|
|
67
|
+
function ve() {
|
|
70
68
|
!function() {
|
|
71
|
-
const e4 =
|
|
69
|
+
const e4 = B.fieldPermissionMap, t2 = B.actionPermissionMap;
|
|
72
70
|
if (e4 && null != e4) {
|
|
73
|
-
let t3 = e4.get(
|
|
71
|
+
let t3 = e4.get(V);
|
|
74
72
|
if (!t3) {
|
|
75
73
|
const n3 = e4.get("all_fields");
|
|
76
74
|
n3 && (t3 = [n3]);
|
|
@@ -78,12 +76,12 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
78
76
|
oe.value.validateRules = t3 || null;
|
|
79
77
|
}
|
|
80
78
|
if (t2 && null != t2) {
|
|
81
|
-
let e5 = t2.get(
|
|
79
|
+
let e5 = t2.get(V);
|
|
82
80
|
e5 || (e5 = t2.get("all_sub_tables")), oe.value.actionPermission = e5;
|
|
83
81
|
}
|
|
84
82
|
oe.value.operations || (oe.value.operations = {});
|
|
85
83
|
const n2 = function() {
|
|
86
|
-
let e5 = [], t3 = w(L.pageContext,
|
|
84
|
+
let e5 = [], t3 = w(L.pageContext, N.props.base.showOperationCondition);
|
|
87
85
|
if (t3 && Se()) {
|
|
88
86
|
const t4 = { props: { elementType: "el-button", icon: "Plus", type: "primary", circle: true, size: "mini", permission: "true" }, onClick: Ce, isShow: we };
|
|
89
87
|
e5.push(t4);
|
|
@@ -92,79 +90,78 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
92
90
|
const t4 = { props: { elementType: "el-button", icon: "Minus", type: "danger", circle: true, size: "mini", permission: "true" }, onClick: De, isShow: xe };
|
|
93
91
|
e5.push(t4);
|
|
94
92
|
}
|
|
95
|
-
return I(
|
|
93
|
+
return I(B, N, e5, me), e5;
|
|
96
94
|
}();
|
|
97
95
|
oe.value.operations.operation = n2, oe.value.subTableCanAdd = Se();
|
|
98
|
-
}(), c(oe.value, z,
|
|
99
|
-
const e3 =
|
|
100
|
-
e3 && (oe.value.eventCallBack = e3), ee.value = true,
|
|
96
|
+
}(), c(oe.value, z, B, N);
|
|
97
|
+
const e3 = B.customEvents;
|
|
98
|
+
e3 && (oe.value.eventCallBack = e3), ee.value = true, be();
|
|
101
99
|
}
|
|
102
|
-
function
|
|
103
|
-
|
|
100
|
+
function be() {
|
|
101
|
+
B.tableUuids || (B.tableUuids = []), B.tableUuids.indexOf(N.uuid) < 0 && B.tableUuids.push(N.uuid);
|
|
104
102
|
}
|
|
105
103
|
n(() => {
|
|
106
|
-
const e3 =
|
|
104
|
+
const e3 = N.uuid, t2 = B.subTableWatchProps;
|
|
107
105
|
P.$on("_refreshSubTable_" + e3, (n2) => {
|
|
108
|
-
console.log("-_refreshSubTable--tableUuid=", e3, "params=", n2);
|
|
109
106
|
const o2 = n2.propName;
|
|
110
107
|
if (t2 && t2[e3] && t2[e3].length > 0) {
|
|
111
|
-
t2[e3].indexOf(o2) >= 0 &&
|
|
108
|
+
t2[e3].indexOf(o2) >= 0 && le();
|
|
112
109
|
}
|
|
113
|
-
}), P.$on("_refreshSubTableHandle_" + e3, (
|
|
114
|
-
|
|
115
|
-
}), P.$on("_refreshChildData_" + e3, (
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
110
|
+
}), P.$on("_refreshSubTableHandle_" + e3, (e4) => {
|
|
111
|
+
le();
|
|
112
|
+
}), P.$on("_refreshChildData_" + e3, (e4) => {
|
|
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);
|
|
119
116
|
}, 10);
|
|
120
|
-
}(
|
|
121
|
-
}), P.$on(
|
|
122
|
-
|
|
123
|
-
}), P.$on(
|
|
124
|
-
|
|
125
|
-
}), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete &&
|
|
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);
|
|
126
123
|
}), o(() => {
|
|
127
|
-
pe && clearTimeout(pe),
|
|
128
|
-
const e3 =
|
|
129
|
-
P.$off("_refreshSubTable_" + e3), P.$off("_refreshSubTableHandle_" + e3), P.$off("_refreshChildData_" + e3), P.$off(
|
|
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");
|
|
130
127
|
});
|
|
131
128
|
const ge = t({});
|
|
132
129
|
function me(e3) {
|
|
133
130
|
if (!e3) return;
|
|
134
131
|
return ge.value[e3.uuid] = e3, he;
|
|
135
132
|
}
|
|
136
|
-
function he(e3, t2, n2, o2,
|
|
137
|
-
const
|
|
138
|
-
u2.props.base.tableUuid = r2.uuid, S(null,
|
|
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);
|
|
139
136
|
}
|
|
140
|
-
function Se(e3, t2, n2, o2,
|
|
141
|
-
if (!w(L.pageContext,
|
|
142
|
-
const
|
|
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;
|
|
143
140
|
let r2 = true;
|
|
144
|
-
if (
|
|
145
|
-
const e4 =
|
|
141
|
+
if (l2 && null !== l2) {
|
|
142
|
+
const e4 = l2.get("all_fields");
|
|
146
143
|
void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (r2 = false);
|
|
147
144
|
}
|
|
148
|
-
if (true === r2 &&
|
|
149
|
-
let e4 = u2.get(
|
|
145
|
+
if (true === r2 && V && u2 && null !== u2) {
|
|
146
|
+
let e4 = u2.get(V);
|
|
150
147
|
e4 || (e4 = u2.get("all_sub_tables")), e4 && void 0 !== e4.canAdd && false === e4.canAdd && (r2 = false);
|
|
151
148
|
}
|
|
152
149
|
return r2;
|
|
153
150
|
}
|
|
154
|
-
function we(e3, t2, n2, o2,
|
|
155
|
-
let
|
|
156
|
-
return true ===
|
|
151
|
+
function we(e3, t2, n2, o2, a2, i2) {
|
|
152
|
+
let l2 = Se();
|
|
153
|
+
return true === l2 && (l2 = w(L.pageContext, N.props.base.showAddBtnCondition, n2)), l2;
|
|
157
154
|
}
|
|
158
|
-
function Te(e3, t2, n2, o2,
|
|
159
|
-
const
|
|
155
|
+
function Te(e3, t2, n2, o2, a2, i2) {
|
|
156
|
+
const l2 = B.fieldPermissionMap, u2 = B.actionPermissionMap;
|
|
160
157
|
let r2 = true;
|
|
161
|
-
if (
|
|
162
|
-
const e4 =
|
|
158
|
+
if (l2 && null !== l2) {
|
|
159
|
+
const e4 = l2.get("all_fields");
|
|
163
160
|
void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (r2 = false);
|
|
164
161
|
}
|
|
165
|
-
if (true === r2 &&
|
|
166
|
-
let e4 = u2.get(
|
|
167
|
-
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 (
|
|
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;
|
|
168
165
|
else {
|
|
169
166
|
const t3 = function(e5) {
|
|
170
167
|
return e5 && e5.id ? e5.id : e5 && e5.ID ? e5.ID : void 0;
|
|
@@ -175,80 +172,80 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
175
172
|
}
|
|
176
173
|
return r2;
|
|
177
174
|
}
|
|
178
|
-
function xe(e3, t2, n2, o2,
|
|
179
|
-
let
|
|
180
|
-
return true ===
|
|
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;
|
|
181
178
|
}
|
|
182
|
-
function Ce(e3, t2, n2, o2,
|
|
183
|
-
|
|
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 });
|
|
184
181
|
}
|
|
185
|
-
function De(e3, t2, n2, o2,
|
|
186
|
-
|
|
182
|
+
function De(e3, t2, n2, o2, a2) {
|
|
183
|
+
ie.value.deleteRow(a2, G, false);
|
|
187
184
|
}
|
|
188
185
|
function ye(e3) {
|
|
189
186
|
T(X, Y, e3);
|
|
190
187
|
}
|
|
191
188
|
function Pe(e3) {
|
|
192
|
-
|
|
189
|
+
B.subTablePageInfo || (B.subTablePageInfo = {}), B.subTablePageInfo[V] = { pageSize: e3 };
|
|
193
190
|
}
|
|
194
191
|
function Re(e3) {
|
|
195
192
|
const t2 = e3.key, n2 = e3.value;
|
|
196
|
-
|
|
193
|
+
B.selectOptions || (B.selectOptions = {}), B.selectOptions[t2] = n2;
|
|
197
194
|
}
|
|
198
195
|
function Ie(e3) {
|
|
199
|
-
const t2 =
|
|
196
|
+
const t2 = B.code + "_";
|
|
200
197
|
P.$emit(t2 + "prohibit-edit", e3);
|
|
201
198
|
}
|
|
202
|
-
function
|
|
203
|
-
const t2 =
|
|
199
|
+
function Oe(e3) {
|
|
200
|
+
const t2 = B.entity.data;
|
|
204
201
|
if (e3) for (const n2 in e3) t2[n2] = e3[n2];
|
|
205
202
|
}
|
|
206
|
-
function
|
|
203
|
+
function _e(e3, t2) {
|
|
207
204
|
if (void 0 !== t2) {
|
|
208
205
|
J.value = e3;
|
|
209
|
-
p(
|
|
206
|
+
p(B, N, { selection: e3, row: t2 });
|
|
210
207
|
}
|
|
211
208
|
}
|
|
212
209
|
function ke(e3) {
|
|
213
210
|
J.value = e3;
|
|
214
|
-
|
|
211
|
+
f(B, N, { selection: e3 });
|
|
215
212
|
}
|
|
216
213
|
function Me(e3) {
|
|
217
|
-
|
|
214
|
+
d(B, N, { newSelection: e3 });
|
|
218
215
|
}
|
|
219
216
|
function Fe(e3, t2, n2, o2) {
|
|
220
|
-
|
|
217
|
+
v(B, N, { row: e3, column: t2, cell: n2, event: o2 });
|
|
221
218
|
}
|
|
222
219
|
function $e(e3, t2, n2, o2) {
|
|
223
|
-
|
|
220
|
+
b(B, N, { row: e3, column: t2, cell: n2, event: o2 });
|
|
224
221
|
}
|
|
225
222
|
function je(e3, t2, n2) {
|
|
226
|
-
g(
|
|
223
|
+
g(B, N, { row: e3, column: t2, event: n2 });
|
|
227
224
|
}
|
|
228
225
|
function Ae(e3, t2, n2) {
|
|
229
|
-
m(
|
|
226
|
+
m(B, N, { row: e3, column: t2, event: n2 });
|
|
230
227
|
}
|
|
231
228
|
function Le(e3, t2) {
|
|
232
|
-
h(
|
|
229
|
+
h(B, N, { column: e3, event: t2 });
|
|
233
230
|
}
|
|
234
|
-
function
|
|
235
|
-
|
|
231
|
+
function Be(e3) {
|
|
232
|
+
B.entity.data = e3;
|
|
236
233
|
}
|
|
237
|
-
function
|
|
234
|
+
function Ne() {
|
|
238
235
|
return x(X, Y);
|
|
239
236
|
}
|
|
240
|
-
function
|
|
237
|
+
function Ee(e3) {
|
|
241
238
|
return T(X, Y, e3);
|
|
242
239
|
}
|
|
243
|
-
function
|
|
240
|
+
function Ge({ row: e3, editConditions: t2 }) {
|
|
244
241
|
let n2 = true;
|
|
245
242
|
return t2 && t2.length > 0 && (n2 = w(L.pageContext, t2, e3)), n2;
|
|
246
243
|
}
|
|
247
244
|
return function() {
|
|
248
245
|
const e3 = re();
|
|
249
|
-
e3 ?
|
|
246
|
+
e3 ? de(e3) : (ue(e3), oe.value.isPageInfo = false, oe.value.subTableData = Ne(), ve());
|
|
250
247
|
}(), j2({ createRow: function() {
|
|
251
|
-
return
|
|
248
|
+
return ie.value.createRow(G);
|
|
252
249
|
}, getSelections: function() {
|
|
253
250
|
return J.value;
|
|
254
251
|
}, getSelectionIds: function() {
|
|
@@ -259,36 +256,36 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
259
256
|
}, clearSelections: function() {
|
|
260
257
|
J.value = [];
|
|
261
258
|
}, getTableConfigure: function() {
|
|
262
|
-
return
|
|
259
|
+
return N;
|
|
263
260
|
}, validatorSunTableListData: function() {
|
|
264
|
-
return
|
|
265
|
-
}, getValue:
|
|
266
|
-
if (
|
|
261
|
+
return ie.value.validatorSunTableListData();
|
|
262
|
+
}, getValue: Ne, setValue: Ee, getTableSelectOptions: function() {
|
|
263
|
+
if (ie.value) return ie.value.getTableSelectOptions(G);
|
|
267
264
|
}, dynamicControlTableEdit: function(e3, t2, n2) {
|
|
268
|
-
|
|
265
|
+
ie.value && ie.value.dynamicControlTableEdit(e3, t2, n2);
|
|
269
266
|
}, doLayout: function(e3) {
|
|
270
|
-
|
|
267
|
+
ie.value && ie.value.doLayout(e3);
|
|
271
268
|
}, changeOperationAddState: function(e3) {
|
|
272
|
-
|
|
269
|
+
ie.value && ie.value.changeOperationAddState(e3);
|
|
273
270
|
}, scrollTo: function(e3, t2) {
|
|
274
|
-
|
|
271
|
+
ie.value && ie.value.scrollTo(e3, t2);
|
|
275
272
|
}, setScrollTop: function(e3) {
|
|
276
|
-
|
|
273
|
+
ie.value && ie.value.setScrollTop(e3);
|
|
277
274
|
}, setScrollLeft: function(e3) {
|
|
278
|
-
|
|
275
|
+
ie.value && ie.value.setScrollLeft(e3);
|
|
279
276
|
}, getSuperGridRef: function() {
|
|
280
|
-
return
|
|
277
|
+
return ie.value;
|
|
281
278
|
}, getSuperGridTableRef: function() {
|
|
282
|
-
return
|
|
279
|
+
return ie.value.getSuperGridRef();
|
|
283
280
|
}, setCurrentRowIndex: function(e3) {
|
|
284
281
|
var _a;
|
|
285
|
-
(_a =
|
|
282
|
+
(_a = ie.value) == null ? void 0 : _a.setCurrentRowIndex(e3);
|
|
286
283
|
}, setScrollTopByRowIndex: function(e3) {
|
|
287
284
|
var _a;
|
|
288
|
-
(_a =
|
|
285
|
+
(_a = ie.value) == null ? void 0 : _a.setScrollTopByRowIndex(e3);
|
|
289
286
|
} }), (e3, t2) => {
|
|
290
|
-
const n2 =
|
|
291
|
-
return
|
|
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)]);
|
|
292
289
|
};
|
|
293
290
|
} });
|
|
294
291
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as
|
|
1
|
+
import { defineComponent as e, ref as t, computed as a, onMounted as n, nextTick as l, watch as o, resolveComponent as u, createElementBlock as d, 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";
|
|
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";
|
|
@@ -9,69 +9,69 @@ 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 }) {
|
|
11
11
|
var _a, _b, _c;
|
|
12
|
-
const $ =
|
|
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
|
-
if (e3.functionCodes && e3.functionCodes.length > 0) for (let
|
|
15
|
-
const
|
|
16
|
-
if (B(
|
|
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)) 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 =
|
|
21
|
+
const G = a({ get: () => L(Y, F), set(e3) {
|
|
22
22
|
b(Y, F, e3);
|
|
23
|
-
} }), J =
|
|
24
|
-
|
|
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
|
+
n(() => {
|
|
25
25
|
l(() => {
|
|
26
26
|
const e3 = G.value;
|
|
27
|
-
_(e3, X.pageContext, X.configure, { componentRef:
|
|
27
|
+
_(e3, X.pageContext, X.configure, { componentRef: te.value, value: e3, entity: X.pageContext.entity.data, pageData: X.pageContext.entity.page });
|
|
28
28
|
});
|
|
29
29
|
}), J.value ? le.value = true : M(X.pageContext, X.configure).then((e3) => {
|
|
30
30
|
oe.value = e3, le.value = true;
|
|
31
31
|
}), o(de, (e3) => {
|
|
32
|
-
ie.value = true,
|
|
32
|
+
ie.value = true, te.value.filter(e3);
|
|
33
33
|
});
|
|
34
|
-
const pe = (e3,
|
|
35
|
-
function ve(e3,
|
|
36
|
-
ue.value =
|
|
34
|
+
const pe = (e3, t2) => !e3 || t2.name.includes(e3);
|
|
35
|
+
function ve(e3, t2, a2) {
|
|
36
|
+
ue.value = t2, j(null, X.pageContext, X.configure, "node-click", { data: e3, node: t2, nodeTree: a2 });
|
|
37
37
|
}
|
|
38
|
-
function fe(e3,
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
M(X.pageContext, X.configure, e4,
|
|
43
|
-
if (ie.value = false,
|
|
44
|
-
!function(e5,
|
|
45
|
-
const
|
|
46
|
-
M(X.pageContext, X.configure, e5,
|
|
47
|
-
ie.value = false,
|
|
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: de, isSearch: ie.value };
|
|
42
|
+
M(X.pageContext, X.configure, e4, t3, n2).then((n3) => {
|
|
43
|
+
if (ie.value = false, a3(n3), "0" === e4) {
|
|
44
|
+
!function(e5, t4) {
|
|
45
|
+
const a4 = { parentNodeId: e5, data: t4.data, searchValue: de, isSearch: ie.value };
|
|
46
|
+
M(X.pageContext, X.configure, e5, t4, a4).then((t5) => {
|
|
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);
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
}(
|
|
52
|
+
}(a2, e3, t2);
|
|
53
53
|
}
|
|
54
|
-
const ge =
|
|
54
|
+
const ge = t({}), me = (e3, t2, a2, n2) => {
|
|
55
55
|
if (se.value) return void z.warning("请先保存当前编辑节点!");
|
|
56
|
-
document.removeEventListener("click", he), ge.value =
|
|
56
|
+
document.removeEventListener("click", he), ge.value = a2, A.value = true;
|
|
57
57
|
const { clientX: l2, clientY: o2 } = e3, u2 = $.value;
|
|
58
58
|
if (u2) {
|
|
59
|
-
const { innerWidth: e4, innerHeight:
|
|
59
|
+
const { innerWidth: e4, innerHeight: t3 } = window, { offsetWidth: a3, offsetHeight: n3 } = u2, d2 = l2 + a3 > e4 ? l2 - a3 : l2, i2 = o2 + n3 > t3 ? o2 - n3 : o2;
|
|
60
60
|
u2.style.left = `${d2}px`, u2.style.top = `${i2}px`, u2.style.display = "block";
|
|
61
61
|
}
|
|
62
62
|
document.addEventListener("click", he);
|
|
63
63
|
}, he = () => {
|
|
64
64
|
A.value = false, document.removeEventListener("click", he);
|
|
65
|
-
}, ye = (e3,
|
|
65
|
+
}, ye = (e3, t2) => {
|
|
66
66
|
if (e3.parent && e3.parent.level > 0) {
|
|
67
|
-
const
|
|
68
|
-
e3.parent.data.children[
|
|
67
|
+
const a2 = e3.parent.data.children.findIndex((t3) => t3.nodeId === e3.data.nodeId);
|
|
68
|
+
e3.parent.data.children[a2] = t2, e3.data = t2;
|
|
69
69
|
} else {
|
|
70
|
-
const
|
|
71
|
-
e3.parent.data[
|
|
70
|
+
const a2 = e3.parent.data.findIndex((t3) => t3.nodeId === e3.data.nodeId);
|
|
71
|
+
e3.parent.data[a2] = t2, e3.data = t2;
|
|
72
72
|
}
|
|
73
73
|
}, Ce = () => {
|
|
74
|
-
se.value = "",
|
|
74
|
+
se.value = "", ce.value = "", re.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,14 +79,14 @@ 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;
|
|
83
83
|
}) : K(ge.value, X.configure, X.pageContext).then(() => {
|
|
84
84
|
z.success("删除成功!"), Ne(), ge.value = null;
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
const Ne = () => {
|
|
88
88
|
const e3 = ge.value.parent;
|
|
89
|
-
|
|
89
|
+
te.value.remove(ge.value), e3.childNodes && 0 === e3.childNodes.length && (e3.data.isLeaf = true), e3.data.children && e3.data.children.length > 0 && (e3.data.children = e3.data.children.filter((e4) => e4.nodeId !== ge.value.data.nodeId));
|
|
90
90
|
};
|
|
91
91
|
return U2({ getSelectNode: function() {
|
|
92
92
|
return ue.value;
|
|
@@ -97,36 +97,35 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
|
|
|
97
97
|
ie.value = false, oe.value = e3;
|
|
98
98
|
});
|
|
99
99
|
}, getNode: function(e3) {
|
|
100
|
-
|
|
101
|
-
}, getCheckedNodes: (e3,
|
|
102
|
-
|
|
103
|
-
}, getCheckedKeys: (e3) =>
|
|
104
|
-
|
|
105
|
-
}, setChecked: (e3,
|
|
106
|
-
|
|
107
|
-
}, getCurrentKey: () =>
|
|
100
|
+
te.value.getNode(e3);
|
|
101
|
+
}, getCheckedNodes: (e3, t2) => te.value.getCheckedNodes(e3, t2), setCheckedNodes: (e3) => {
|
|
102
|
+
te.value.setCheckedNodes(e3);
|
|
103
|
+
}, getCheckedKeys: (e3) => te.value.getCheckedKeysleafOnly(), setCheckedKeys: (e3, t2) => {
|
|
104
|
+
te.value.setCheckedKeys(e3, t2);
|
|
105
|
+
}, setChecked: (e3, t2, a2) => {
|
|
106
|
+
te.value.setChecked(e3, t2, a2);
|
|
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
|
|
110
|
-
return i(), d("div", { class: s(["amb-tree-runtime-main",
|
|
111
|
-
"" !==
|
|
112
|
-
ye(e5,
|
|
113
|
-
}) : E(e5, X.configure, X.pageContext).then((
|
|
114
|
-
|
|
109
|
+
const a2 = u("el-input"), n2 = u("el-button"), l2 = u("SuperIcon"), o2 = u("el-tree");
|
|
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) => {
|
|
112
|
+
ye(e5, t3.currentNode), Ce(), z.success("保存成功!");
|
|
113
|
+
}) : E(e5, X.configure, X.pageContext).then((t3) => {
|
|
114
|
+
ye(e5, t3.currentNode), Ce(), z.success("保存成功!");
|
|
115
115
|
})) : z.warning("请输入节点名称");
|
|
116
|
-
})(o3) }, { default: g(() =>
|
|
117
|
-
|
|
118
|
-
})(o3, e3.configure, e3.pageContext) }, { default: g(() =>
|
|
119
|
-
if (ge.value
|
|
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(), 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
|
+
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);
|
|
122
122
|
}).catch(() => {
|
|
123
|
-
ge.value = null
|
|
123
|
+
ge.value = null;
|
|
124
124
|
})) : ke(e5);
|
|
125
125
|
else {
|
|
126
|
-
const
|
|
127
|
-
se.value =
|
|
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));
|
|
128
128
|
}
|
|
129
|
-
else console.log("自定义事件", e5);
|
|
130
129
|
})(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);
|
|
131
130
|
};
|
|
132
131
|
} });
|