super-page-runtime 2.3.3 → 2.3.4
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 +46 -45
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +16 -14
- package/dist/es/components/runtime/utils/charts/chart-util.js +26 -24
- package/dist/es/components/runtime/utils/events/event-util.js +116 -116
- package/dist/es/components/runtime/utils/events/print-label.js +1 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +475 -463
- package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
- package/dist/es/components/runtime/utils/form/scan-util.js +4 -3
- package/dist/es/components/runtime/utils/page-helper-util.js +275 -275
- package/dist/es/components/runtime/utils/page-init-util.js +47 -44
- 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 +16 -12
- 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 +15 -14
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +12 -11
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +18 -17
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +19 -18
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +19 -18
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +21 -19
- 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.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +55 -55
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +37 -35
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +123 -120
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +58 -57
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +1 -0
- 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 +27 -27
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +27 -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 +1 -0
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/home-chart.vue.d.ts +3 -3
- package/dist/es/components/runtime/views/home-chart.vue.js +25 -23
- 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 +131 -130
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +87 -87
- package/package.json +2 -2
|
@@ -1,50 +1,52 @@
|
|
|
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 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 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
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 _, getBaseUrl as O } 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
|
-
|
|
11
|
+
const L = e2, U = L.pageContext;
|
|
12
|
+
let B = L.configure;
|
|
13
|
+
const G = L.configure.runtime ? L.configure.runtime : {};
|
|
14
|
+
U.isTest ? G.value = L.configure.runtime ? L.configure.runtime : {} : U.tableRuntimes && U.tableRuntimes[B.uuid] && (B = JSON.parse(U.tableRuntimes[B.uuid].configure), G.value = B.runtime ? B.runtime : {});
|
|
15
|
+
const H = _(U.code, U.version, B.uuid), N = U.entity.data, E = B.code ? B.code : H, V = k(U), z = G && G.events ? G.events : [], J = t([]), q = U.superGridItems, K = q ? q[B.uuid] : null;
|
|
16
|
+
console.log("superGridSetting===", q, K);
|
|
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);
|
|
17
19
|
Z || (Z = window.$vueApp.config.globalProperties.baseURL);
|
|
18
20
|
const ee = t(false);
|
|
19
21
|
let te = t(0);
|
|
20
|
-
const ne =
|
|
22
|
+
const ne = B.props.dataOrigin.principalLinkage, oe = t({ isSql: true, subTableData: null, rowKeyProp: ne, extraParam: {}, operations: {}, hiddenColumns: [], pageCode: U.code, pageVersion: U.version, pageContext: U, configureObj: B, showPageArea: false, showRowForm: false, showOverflowTooltip: !(!B.props || !B.props.otherSettings || void 0 !== B.props.otherSettings.isBreakLine && false !== B.props.otherSettings.isBreakLine), backendUrl: Z, cellStyleRender: function(e3) {
|
|
21
23
|
return F(e3, e3.cellStyle, L);
|
|
22
24
|
}, rowStyleRender: function(e3) {
|
|
23
25
|
return M(e3, null, L);
|
|
24
26
|
}, titleStyleRender: function(e3) {
|
|
25
27
|
const t2 = e3.titleStyle, n2 = L.configure.style.titleStyle;
|
|
26
28
|
return $(e3, { cellTitleStyle: t2, titleStyle: n2 }, L);
|
|
27
|
-
} }),
|
|
28
|
-
Q && (oe.value.tableStyle = Q), W && (oe.value.tableClass = W),
|
|
29
|
-
const
|
|
30
|
-
function
|
|
31
|
-
|
|
29
|
+
} }), le = A;
|
|
30
|
+
Q && (oe.value.tableStyle = Q), W && (oe.value.tableClass = W), B.props && B.props.base && true === B.props.base.subPaging ? oe.value.showPageArea = true : oe.value.showPageArea = false, B.props.base.showRowForm && (oe.value.showRowForm = B.props.base.showRowForm);
|
|
31
|
+
const ae = t(null);
|
|
32
|
+
function ie() {
|
|
33
|
+
ae.value && (oe.value.subTableData = null, ae.value.reloadSubTableData(H));
|
|
32
34
|
}
|
|
33
35
|
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 =
|
|
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 = H, oe.value.extraParam.beanName = U.beanName, oe.value.extraParam.subtableSetting = B.props && B.props.otherSettings ? JSON.stringify(B.props.otherSettings) : null, oe.value.extraParam.additionalParamMap = V, oe.value.extraParam.entityMap = U.entity.data, oe.value.extraParam.contextMap = U.entity.context, oe.value.extraParam.taskMap = U.entity.task, !(B.props && B.props.base && B.props.base.showOperation)) {
|
|
35
37
|
let e4 = oe.value.hiddenColumns;
|
|
36
38
|
e4 ? e4.push("operation") : e4 = ["operation"], oe.value.hiddenColumns = e4;
|
|
37
39
|
}
|
|
38
|
-
oe.value.showOperationButton = !(!
|
|
39
|
-
let t2 = C(
|
|
40
|
-
t2 && t2.fixHeight && (oe.value.formSetHeight = t2.fixHeight), t2 && t2.maxHeight && (oe.value.formSetMaxHeight = t2.maxHeight), oe.value.validateEitConditions =
|
|
40
|
+
oe.value.showOperationButton = !(!B.props || !B.props.base) && B.props.base.showOperation, oe.value.isPdfEditor = false, oe.value.tableRecordMaxNum = B.props && B.props.otherSettings ? B.props.otherSettings.tableRecordMaxNum : null;
|
|
41
|
+
let t2 = C(U, B);
|
|
42
|
+
t2 && t2.fixHeight && (oe.value.formSetHeight = t2.fixHeight), t2 && t2.maxHeight && (oe.value.formSetMaxHeight = t2.maxHeight), oe.value.validateEitConditions = He;
|
|
41
43
|
}
|
|
42
44
|
function re() {
|
|
43
|
-
if (
|
|
44
|
-
if (
|
|
45
|
+
if (B.props && B.props.otherSettings) {
|
|
46
|
+
if (B.props.otherSettings.sourceQueryTableData && B.props.otherSettings.timeToInitializeSubTable && B.props.otherSettings.timeToInitializeSubTable.length > 0) {
|
|
45
47
|
let e3 = false;
|
|
46
|
-
if (-1 !==
|
|
47
|
-
const t2 =
|
|
48
|
+
if (-1 !== B.props.otherSettings.timeToInitializeSubTable.indexOf("create") && (e3 = !N.id && !N.ID), -1 !== B.props.otherSettings.timeToInitializeSubTable.indexOf("noData")) {
|
|
49
|
+
const t2 = N[E];
|
|
48
50
|
(!t2 || t2.length <= 0) && (e3 = true);
|
|
49
51
|
}
|
|
50
52
|
return e3;
|
|
@@ -53,22 +55,22 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
function se() {
|
|
56
|
-
return
|
|
58
|
+
return U.entity.data;
|
|
57
59
|
}
|
|
58
60
|
function ce() {
|
|
59
61
|
return x(X, Y);
|
|
60
62
|
}
|
|
61
|
-
let pe,
|
|
62
|
-
function
|
|
63
|
-
ue(e3), oe.value.subTableData = null,
|
|
64
|
-
ee.value = true, te.value = te.value + 1,
|
|
63
|
+
let pe, de;
|
|
64
|
+
function fe(e3) {
|
|
65
|
+
ue(e3), oe.value.subTableData = null, be(), ee.value = false, pe = setTimeout(() => {
|
|
66
|
+
ee.value = true, te.value = te.value + 1, ve();
|
|
65
67
|
}, 10);
|
|
66
68
|
}
|
|
67
|
-
function
|
|
69
|
+
function be() {
|
|
68
70
|
!function() {
|
|
69
|
-
const e4 =
|
|
71
|
+
const e4 = U.fieldPermissionMap, t2 = U.actionPermissionMap;
|
|
70
72
|
if (e4 && null != e4) {
|
|
71
|
-
let t3 = e4.get(
|
|
73
|
+
let t3 = e4.get(E);
|
|
72
74
|
if (!t3) {
|
|
73
75
|
const n3 = e4.get("all_fields");
|
|
74
76
|
n3 && (t3 = [n3]);
|
|
@@ -76,12 +78,12 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
76
78
|
oe.value.validateRules = t3 || null;
|
|
77
79
|
}
|
|
78
80
|
if (t2 && null != t2) {
|
|
79
|
-
let e5 = t2.get(
|
|
81
|
+
let e5 = t2.get(E);
|
|
80
82
|
e5 || (e5 = t2.get("all_sub_tables")), oe.value.actionPermission = e5;
|
|
81
83
|
}
|
|
82
84
|
oe.value.operations || (oe.value.operations = {});
|
|
83
85
|
const n2 = function() {
|
|
84
|
-
let e5 = [], t3 = w(L.pageContext,
|
|
86
|
+
let e5 = [], t3 = w(L.pageContext, B.props.base.showOperationCondition);
|
|
85
87
|
if (t3 && Se()) {
|
|
86
88
|
const t4 = { props: { elementType: "el-button", icon: "Plus", type: "primary", circle: true, size: "mini", permission: "true" }, onClick: Ce, isShow: we };
|
|
87
89
|
e5.push(t4);
|
|
@@ -90,78 +92,79 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
90
92
|
const t4 = { props: { elementType: "el-button", icon: "Minus", type: "danger", circle: true, size: "mini", permission: "true" }, onClick: De, isShow: xe };
|
|
91
93
|
e5.push(t4);
|
|
92
94
|
}
|
|
93
|
-
return I(
|
|
95
|
+
return I(U, B, e5, me), e5;
|
|
94
96
|
}();
|
|
95
97
|
oe.value.operations.operation = n2, oe.value.subTableCanAdd = Se();
|
|
96
|
-
}(), c(oe.value, z,
|
|
97
|
-
const e3 =
|
|
98
|
-
e3 && (oe.value.eventCallBack = e3), ee.value = true,
|
|
98
|
+
}(), c(oe.value, z, U, B);
|
|
99
|
+
const e3 = U.customEvents;
|
|
100
|
+
e3 && (oe.value.eventCallBack = e3), ee.value = true, ve();
|
|
99
101
|
}
|
|
100
|
-
function
|
|
101
|
-
|
|
102
|
+
function ve() {
|
|
103
|
+
U.tableUuids || (U.tableUuids = []), U.tableUuids.indexOf(B.uuid) < 0 && U.tableUuids.push(B.uuid);
|
|
102
104
|
}
|
|
103
105
|
n(() => {
|
|
104
|
-
const e3 =
|
|
106
|
+
const e3 = B.uuid, t2 = U.subTableWatchProps;
|
|
105
107
|
P.$on("_refreshSubTable_" + e3, (n2) => {
|
|
108
|
+
console.log("-_refreshSubTable--tableUuid=", e3, "params=", n2);
|
|
106
109
|
const o2 = n2.propName;
|
|
107
110
|
if (t2 && t2[e3] && t2[e3].length > 0) {
|
|
108
|
-
t2[e3].indexOf(o2) >= 0 &&
|
|
111
|
+
t2[e3].indexOf(o2) >= 0 && ie();
|
|
109
112
|
}
|
|
110
|
-
}), P.$on("_refreshSubTableHandle_" + e3, (
|
|
111
|
-
|
|
112
|
-
}), P.$on("_refreshChildData_" + e3, (
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
}), P.$on("_refreshSubTableHandle_" + e3, (t3) => {
|
|
114
|
+
console.log("-_refreshSubTableHandle_--tableUuid=", e3, "params=", t3), ie();
|
|
115
|
+
}), P.$on("_refreshChildData_" + e3, (t3) => {
|
|
116
|
+
console.log("-_refreshChildData_--tableUuid=", e3), function(e4) {
|
|
117
|
+
Ge(e4), de = setTimeout(() => {
|
|
118
|
+
ae.value && (ae.value.refreshChildData(H, e4, B.props && B.props.base && true === B.props.base.subPaging), oe.value.extraParam.entityMap = U.entity.data);
|
|
116
119
|
}, 10);
|
|
117
|
-
}(
|
|
118
|
-
}), P.$on(
|
|
119
|
-
|
|
120
|
-
}), P.$on(
|
|
121
|
-
|
|
122
|
-
}), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete &&
|
|
120
|
+
}(t3);
|
|
121
|
+
}), P.$on(H + "-pickFileDone", (e4) => {
|
|
122
|
+
console.log("superPage5555---listCode---pickFileDone--listCode=", H, "data=", e4), ae.value.pickFileDone(e4);
|
|
123
|
+
}), P.$on(H + "-scanDone", (e4) => {
|
|
124
|
+
console.log("superPage5555---listCode---scanDone--listCode=", H, "data=", e4), ae.value.scanDone(e4);
|
|
125
|
+
}), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete && le("setSafeDeleteTableCode", oe.value.extraParam.tableName);
|
|
123
126
|
}), o(() => {
|
|
124
|
-
pe && clearTimeout(pe),
|
|
125
|
-
const e3 =
|
|
126
|
-
P.$off("_refreshSubTable_" + e3), P.$off("_refreshSubTableHandle_" + e3), P.$off("_refreshChildData_" + e3), P.$off(
|
|
127
|
+
pe && clearTimeout(pe), de && clearTimeout(de);
|
|
128
|
+
const e3 = B.uuid;
|
|
129
|
+
P.$off("_refreshSubTable_" + e3), P.$off("_refreshSubTableHandle_" + e3), P.$off("_refreshChildData_" + e3), P.$off(H + "-pickFileDone"), P.$off(H + "-scanDone");
|
|
127
130
|
});
|
|
128
131
|
const ge = t({});
|
|
129
132
|
function me(e3) {
|
|
130
133
|
if (!e3) return;
|
|
131
134
|
return ge.value[e3.uuid] = e3, he;
|
|
132
135
|
}
|
|
133
|
-
function he(e3, t2, n2, o2,
|
|
134
|
-
const
|
|
135
|
-
u2.props.base.tableUuid = r2.uuid, S(null,
|
|
136
|
+
function he(e3, t2, n2, o2, l2, a2) {
|
|
137
|
+
const i2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: l2, button: a2, id: n2.ID ? n2.ID : n2.id }, u2 = ge.value[a2.sourceButton.uuid], r2 = B;
|
|
138
|
+
u2.props.base.tableUuid = r2.uuid, S(null, U, u2, "click", i2);
|
|
136
139
|
}
|
|
137
|
-
function Se(e3, t2, n2, o2,
|
|
138
|
-
if (!w(L.pageContext,
|
|
139
|
-
const
|
|
140
|
+
function Se(e3, t2, n2, o2, l2, a2) {
|
|
141
|
+
if (!w(L.pageContext, B.props.base.showOperationCondition)) return false;
|
|
142
|
+
const i2 = U.fieldPermissionMap, u2 = U.actionPermissionMap;
|
|
140
143
|
let r2 = true;
|
|
141
|
-
if (
|
|
142
|
-
const e4 =
|
|
144
|
+
if (i2 && null !== i2) {
|
|
145
|
+
const e4 = i2.get("all_fields");
|
|
143
146
|
void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (r2 = false);
|
|
144
147
|
}
|
|
145
|
-
if (true === r2 &&
|
|
146
|
-
let e4 = u2.get(
|
|
148
|
+
if (true === r2 && E && u2 && null !== u2) {
|
|
149
|
+
let e4 = u2.get(E);
|
|
147
150
|
e4 || (e4 = u2.get("all_sub_tables")), e4 && void 0 !== e4.canAdd && false === e4.canAdd && (r2 = false);
|
|
148
151
|
}
|
|
149
152
|
return r2;
|
|
150
153
|
}
|
|
151
|
-
function we(e3, t2, n2, o2,
|
|
152
|
-
let
|
|
153
|
-
return true ===
|
|
154
|
+
function we(e3, t2, n2, o2, l2, a2) {
|
|
155
|
+
let i2 = Se();
|
|
156
|
+
return true === i2 && (i2 = w(L.pageContext, B.props.base.showAddBtnCondition, n2)), i2;
|
|
154
157
|
}
|
|
155
|
-
function Te(e3, t2, n2, o2,
|
|
156
|
-
const
|
|
158
|
+
function Te(e3, t2, n2, o2, l2, a2) {
|
|
159
|
+
const i2 = U.fieldPermissionMap, u2 = U.actionPermissionMap;
|
|
157
160
|
let r2 = true;
|
|
158
|
-
if (
|
|
159
|
-
const e4 =
|
|
161
|
+
if (i2 && null !== i2) {
|
|
162
|
+
const e4 = i2.get("all_fields");
|
|
160
163
|
void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (r2 = false);
|
|
161
164
|
}
|
|
162
|
-
if (true === r2 &&
|
|
163
|
-
let e4 = u2.get(
|
|
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 (
|
|
165
|
+
if (true === r2 && E && u2 && null !== u2) {
|
|
166
|
+
let e4 = u2.get(E);
|
|
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 (a2) r2 = true;
|
|
165
168
|
else {
|
|
166
169
|
const t3 = function(e5) {
|
|
167
170
|
return e5 && e5.id ? e5.id : e5 && e5.ID ? e5.ID : void 0;
|
|
@@ -172,80 +175,80 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
172
175
|
}
|
|
173
176
|
return r2;
|
|
174
177
|
}
|
|
175
|
-
function xe(e3, t2, n2, o2,
|
|
176
|
-
let
|
|
177
|
-
return true ===
|
|
178
|
+
function xe(e3, t2, n2, o2, l2, a2) {
|
|
179
|
+
let i2 = Te(0, 0, n2, 0, 0, a2);
|
|
180
|
+
return true === i2 && (i2 = w(L.pageContext, B.props.base.showDeleteBtnCondition, n2)), i2;
|
|
178
181
|
}
|
|
179
|
-
function Ce(e3, t2, n2, o2,
|
|
180
|
-
|
|
182
|
+
function Ce(e3, t2, n2, o2, l2) {
|
|
183
|
+
ae.value.createRow(H, {}, { getDefaultValueFunc: y }, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: l2 });
|
|
181
184
|
}
|
|
182
|
-
function De(e3, t2, n2, o2,
|
|
183
|
-
|
|
185
|
+
function De(e3, t2, n2, o2, l2) {
|
|
186
|
+
ae.value.deleteRow(l2, H, false);
|
|
184
187
|
}
|
|
185
188
|
function ye(e3) {
|
|
186
189
|
T(X, Y, e3);
|
|
187
190
|
}
|
|
188
191
|
function Pe(e3) {
|
|
189
|
-
|
|
192
|
+
console.log("表单组件--Item--changeRowsPerpage==pageSize=", e3), U.subTablePageInfo || (U.subTablePageInfo = {}), U.subTablePageInfo[E] = { pageSize: e3 };
|
|
190
193
|
}
|
|
191
194
|
function Re(e3) {
|
|
192
195
|
const t2 = e3.key, n2 = e3.value;
|
|
193
|
-
|
|
196
|
+
U.selectOptions || (U.selectOptions = {}), U.selectOptions[t2] = n2;
|
|
194
197
|
}
|
|
195
198
|
function Ie(e3) {
|
|
196
|
-
const t2 =
|
|
199
|
+
const t2 = U.code + "_";
|
|
197
200
|
P.$emit(t2 + "prohibit-edit", e3);
|
|
198
201
|
}
|
|
199
|
-
function
|
|
200
|
-
const t2 =
|
|
202
|
+
function _e(e3) {
|
|
203
|
+
const t2 = U.entity.data;
|
|
201
204
|
if (e3) for (const n2 in e3) t2[n2] = e3[n2];
|
|
202
205
|
}
|
|
203
|
-
function
|
|
206
|
+
function Oe(e3, t2) {
|
|
204
207
|
if (void 0 !== t2) {
|
|
205
208
|
J.value = e3;
|
|
206
|
-
p(
|
|
209
|
+
p(U, B, { selection: e3, row: t2 });
|
|
207
210
|
}
|
|
208
211
|
}
|
|
209
212
|
function ke(e3) {
|
|
210
213
|
J.value = e3;
|
|
211
|
-
|
|
214
|
+
d(U, B, { selection: e3 });
|
|
212
215
|
}
|
|
213
216
|
function Me(e3) {
|
|
214
|
-
|
|
217
|
+
f(U, B, { newSelection: e3 });
|
|
215
218
|
}
|
|
216
219
|
function Fe(e3, t2, n2, o2) {
|
|
217
|
-
|
|
220
|
+
b(U, B, { row: e3, column: t2, cell: n2, event: o2 });
|
|
218
221
|
}
|
|
219
222
|
function $e(e3, t2, n2, o2) {
|
|
220
|
-
|
|
223
|
+
v(U, B, { row: e3, column: t2, cell: n2, event: o2 });
|
|
221
224
|
}
|
|
222
225
|
function je(e3, t2, n2) {
|
|
223
|
-
g(
|
|
226
|
+
g(U, B, { row: e3, column: t2, event: n2 });
|
|
224
227
|
}
|
|
225
228
|
function Ae(e3, t2, n2) {
|
|
226
|
-
m(
|
|
229
|
+
m(U, B, { row: e3, column: t2, event: n2 });
|
|
227
230
|
}
|
|
228
231
|
function Le(e3, t2) {
|
|
229
|
-
h(
|
|
232
|
+
h(U, B, { column: e3, event: t2 });
|
|
230
233
|
}
|
|
231
|
-
function
|
|
232
|
-
|
|
234
|
+
function Ue(e3) {
|
|
235
|
+
U.entity.data = e3;
|
|
233
236
|
}
|
|
234
|
-
function
|
|
237
|
+
function Be() {
|
|
235
238
|
return x(X, Y);
|
|
236
239
|
}
|
|
237
|
-
function
|
|
240
|
+
function Ge(e3) {
|
|
238
241
|
return T(X, Y, e3);
|
|
239
242
|
}
|
|
240
|
-
function
|
|
243
|
+
function He({ row: e3, editConditions: t2 }) {
|
|
241
244
|
let n2 = true;
|
|
242
245
|
return t2 && t2.length > 0 && (n2 = w(L.pageContext, t2, e3)), n2;
|
|
243
246
|
}
|
|
244
247
|
return function() {
|
|
245
248
|
const e3 = re();
|
|
246
|
-
e3 ?
|
|
249
|
+
e3 ? fe(e3) : (ue(e3), oe.value.isPageInfo = false, oe.value.subTableData = Be(), be());
|
|
247
250
|
}(), j2({ createRow: function() {
|
|
248
|
-
return
|
|
251
|
+
return ae.value.createRow(H);
|
|
249
252
|
}, getSelections: function() {
|
|
250
253
|
return J.value;
|
|
251
254
|
}, getSelectionIds: function() {
|
|
@@ -256,36 +259,36 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
256
259
|
}, clearSelections: function() {
|
|
257
260
|
J.value = [];
|
|
258
261
|
}, getTableConfigure: function() {
|
|
259
|
-
return
|
|
262
|
+
return B;
|
|
260
263
|
}, validatorSunTableListData: function() {
|
|
261
|
-
return
|
|
262
|
-
}, getValue:
|
|
263
|
-
if (
|
|
264
|
+
return ae.value.validatorSunTableListData();
|
|
265
|
+
}, getValue: Be, setValue: Ge, getTableSelectOptions: function() {
|
|
266
|
+
if (ae.value) return ae.value.getTableSelectOptions(H);
|
|
264
267
|
}, dynamicControlTableEdit: function(e3, t2, n2) {
|
|
265
|
-
|
|
268
|
+
ae.value && ae.value.dynamicControlTableEdit(e3, t2, n2);
|
|
266
269
|
}, doLayout: function(e3) {
|
|
267
|
-
|
|
270
|
+
ae.value && ae.value.doLayout(e3);
|
|
268
271
|
}, changeOperationAddState: function(e3) {
|
|
269
|
-
|
|
272
|
+
ae.value && ae.value.changeOperationAddState(e3);
|
|
270
273
|
}, scrollTo: function(e3, t2) {
|
|
271
|
-
|
|
274
|
+
ae.value && ae.value.scrollTo(e3, t2);
|
|
272
275
|
}, setScrollTop: function(e3) {
|
|
273
|
-
|
|
276
|
+
ae.value && ae.value.setScrollTop(e3);
|
|
274
277
|
}, setScrollLeft: function(e3) {
|
|
275
|
-
|
|
278
|
+
ae.value && ae.value.setScrollLeft(e3);
|
|
276
279
|
}, getSuperGridRef: function() {
|
|
277
|
-
return
|
|
280
|
+
return ae.value;
|
|
278
281
|
}, getSuperGridTableRef: function() {
|
|
279
|
-
return
|
|
282
|
+
return ae.value.getSuperGridRef();
|
|
280
283
|
}, setCurrentRowIndex: function(e3) {
|
|
281
284
|
var _a;
|
|
282
|
-
(_a =
|
|
285
|
+
(_a = ae.value) == null ? void 0 : _a.setCurrentRowIndex(e3);
|
|
283
286
|
}, setScrollTopByRowIndex: function(e3) {
|
|
284
287
|
var _a;
|
|
285
|
-
(_a =
|
|
288
|
+
(_a = ae.value) == null ? void 0 : _a.setScrollTopByRowIndex(e3);
|
|
286
289
|
} }), (e3, t2) => {
|
|
287
|
-
const n2 =
|
|
288
|
-
return
|
|
290
|
+
const n2 = l("super-grid");
|
|
291
|
+
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(H), settings: s(K), onSelect: Oe, onSelectAll: ke, onSelectionChange: Me, onCellClick: Fe, onCellDblclick: $e, onRowClick: je, onRowDblclick: Ae, onHeaderClick: Le, onFnProhibitToEdit: Ie, onChangeGridData: ye, onReloadGrid: fe, onRefresMainTableFields: _e, onSetSelectOptions: Re, onChangeRowsPerPage: Pe, onNewOpenGridDialog: s(R), onChangeFormData: Ue }, null, 8, ["url", "options", "code", "settings", "onNewOpenGridDialog"])) : r("", true)]);
|
|
289
292
|
};
|
|
290
293
|
} });
|
|
291
294
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as
|
|
1
|
+
import { defineComponent as e, ref as n, computed as t, onMounted as a, nextTick as l, watch as o, resolveComponent as u, createElementBlock as d, 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";
|
|
@@ -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 $ = n(), A = n(false), X = e2, Y = X.pageContext.entity ? X.pageContext.entity : {}, q = n([]);
|
|
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 n2 = 0; n2 < e3.functionCodes.length; n2++) {
|
|
15
|
+
const t2 = e3.functionCodes[n2];
|
|
16
|
+
if (B(t2)) 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 = t({ get: () => L(Y, F), set(e3) {
|
|
22
22
|
b(Y, F, e3);
|
|
23
|
-
} }), J =
|
|
24
|
-
|
|
23
|
+
} }), J = n(!!((_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, ne = n(), te = n(Q.props ? Q.props : {}), ae = n({ id: "nodeId", label: "name", children: "children", isLeaf: "leaf", disabled: "disabled", nodeType: "nodeType", iconType: "iconType", iconValue: "iconValue" }), le = n(false), oe = n([]), ue = n(null), de = n(""), ie = n(false), se = n(""), ce = n(""), re = n("");
|
|
24
|
+
a(() => {
|
|
25
25
|
l(() => {
|
|
26
26
|
const e3 = G.value;
|
|
27
|
-
_(e3, X.pageContext, X.configure, { componentRef:
|
|
27
|
+
_(e3, X.pageContext, X.configure, { componentRef: ne.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, ne.value.filter(e3);
|
|
33
33
|
});
|
|
34
|
-
const pe = (e3,
|
|
35
|
-
function ve(e3,
|
|
36
|
-
ue.value =
|
|
34
|
+
const pe = (e3, n2) => !e3 || n2.name.includes(e3);
|
|
35
|
+
function ve(e3, n2, t2) {
|
|
36
|
+
ue.value = n2, j(null, X.pageContext, X.configure, "node-click", { data: e3, node: n2, nodeTree: t2 });
|
|
37
37
|
}
|
|
38
|
-
function fe(e3,
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
M(X.pageContext, X.configure, e4,
|
|
43
|
-
if (ie.value = false, a3
|
|
44
|
-
!function(e5,
|
|
45
|
-
const
|
|
46
|
-
M(X.pageContext, X.configure, e5,
|
|
47
|
-
ie.value = false,
|
|
38
|
+
function fe(e3, n2) {
|
|
39
|
+
let t2 = "0";
|
|
40
|
+
t2 = 0 === e3.level ? "0" : e3.data.nodeId, function(e4, n3, t3) {
|
|
41
|
+
const a2 = { parentNodeId: e4, data: n3.data, searchValue: de, isSearch: ie.value };
|
|
42
|
+
M(X.pageContext, X.configure, e4, n3, a2).then((a3) => {
|
|
43
|
+
if (ie.value = false, t3(a3), "0" === e4) {
|
|
44
|
+
!function(e5, n4) {
|
|
45
|
+
const t4 = { parentNodeId: e5, data: n4.data, searchValue: de, isSearch: ie.value };
|
|
46
|
+
M(X.pageContext, X.configure, e5, n4, t4).then((n5) => {
|
|
47
|
+
ie.value = false, ne.value.updateKeyChildren(e5, n5), ne.value.store.nodesMap[e5] && (ne.value.store.nodesMap[e5].expanded = true);
|
|
48
48
|
});
|
|
49
|
-
}(
|
|
49
|
+
}(a3[0].nodeId, n3);
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
}(
|
|
52
|
+
}(t2, e3, n2);
|
|
53
53
|
}
|
|
54
|
-
const ge =
|
|
54
|
+
const ge = n({}), me = (e3, n2, t2, a2) => {
|
|
55
55
|
if (se.value) return void z.warning("请先保存当前编辑节点!");
|
|
56
|
-
document.removeEventListener("click", he), ge.value =
|
|
56
|
+
document.removeEventListener("click", he), ge.value = t2, 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: n3 } = window, { offsetWidth: t3, offsetHeight: a3 } = u2, d2 = l2 + t3 > e4 ? l2 - t3 : l2, i2 = o2 + a3 > n3 ? o2 - a3 : 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, n2) => {
|
|
66
66
|
if (e3.parent && e3.parent.level > 0) {
|
|
67
|
-
const
|
|
68
|
-
e3.parent.data.children[
|
|
67
|
+
const t2 = e3.parent.data.children.findIndex((n3) => n3.nodeId === e3.data.nodeId);
|
|
68
|
+
e3.parent.data.children[t2] = n2, e3.data = n2;
|
|
69
69
|
} else {
|
|
70
|
-
const
|
|
71
|
-
e3.parent.data[
|
|
70
|
+
const t2 = e3.parent.data.findIndex((n3) => n3.nodeId === e3.data.nodeId);
|
|
71
|
+
e3.parent.data[t2] = n2, e3.data = n2;
|
|
72
72
|
}
|
|
73
73
|
}, Ce = () => {
|
|
74
|
-
se.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,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, console.log("取消");
|
|
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
|
+
ne.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,35 +97,36 @@ 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
|
+
ne.value.getNode(e3);
|
|
101
|
+
}, getCheckedNodes: (e3, n2) => ne.value.getCheckedNodes(e3, n2), setCheckedNodes: (e3) => {
|
|
102
|
+
ne.value.setCheckedNodes(e3);
|
|
103
|
+
}, getCheckedKeys: (e3) => ne.value.getCheckedKeysleafOnly(), setCheckedKeys: (e3, n2) => {
|
|
104
|
+
ne.value.setCheckedKeys(e3, n2);
|
|
105
|
+
}, setChecked: (e3, n2, t2) => {
|
|
106
|
+
ne.value.setChecked(e3, n2, t2);
|
|
107
|
+
}, getCurrentKey: () => ne.value.getCurrentKey(), getCurrentNode: () => ne.value.getCurrentNode(), setCurrentKey: (e3, n2 = true) => ne.value.setCurrentKey(e3, n2), setCurrentNode: (e3, n2 = true) => ne.value.setCurrentNode(e3, n2) }), (e3, n2) => {
|
|
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
|
-
ye(e5,
|
|
109
|
+
const t2 = u("el-input"), a2 = u("el-button"), l2 = u("SuperIcon"), o2 = u("el-tree");
|
|
110
|
+
return i(), d("div", { class: s(["amb-tree-runtime-main", c(ee)]) }, [te.value.filter ? (i(), r(t2, { key: 0, modelValue: de.value, "onUpdate:modelValue": n2[0] || (n2[0] = (e4) => de.value = e4), style: { width: "100%" }, placeholder: "请输入查询条件" }, null, 8, ["modelValue"])) : p("", true), le.value ? (i(), r(o2, { key: 1, ref_key: "menuTreeRef", ref: ne, style: f(c(Z)), load: fe, data: oe.value, "node-key": "nodeId", props: ae.value, "default-expand-all": te.value.defaultExpandAll, "expand-on-click-node": te.value.expandOnClickNode, indent: te.value.retractWidth ? te.value.retractWidth : 18, accordion: te.value.accordion, "show-checkbox": !!te.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(t2, { modelValue: re.value, "onUpdate:modelValue": n2[1] || (n2[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((n3) => {
|
|
112
|
+
ye(e5, n3.currentNode), Ce(), z.success("保存成功!");
|
|
113
|
+
}) : E(e5, X.configure, X.pageContext).then((n3) => {
|
|
114
|
+
console.log(n3), ye(e5, n3.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(() => n2[2] || (n2[2] = [y(" 保存 ")])), _: 2 }, 1032, ["onClick"]), m(a2, { style: { "margin-left": "4px" }, type: "primary", link: "", onClick: (n3) => ((e4) => {
|
|
117
|
+
ce.value && e4.data.nodeId === ce.value && ne.value.remove(e4), Ce();
|
|
118
|
+
})(o3, e3.configure, e3.pageContext) }, { default: g(() => n2[3] || (n2[3] = [y(" 撤销 ")])), _: 2 }, 1032, ["onClick"])])])) : (i(), d("span", { key: 1, title: o3.label, class: "ellipsis" }, [u2.iconValue ? (i(), r(l2, { key: 0, iconType: u2.iconType, iconValue: u2.iconValue }, null, 8, ["iconType", "iconValue"])) : te.value.iconValue ? (i(), r(l2, { key: 1, iconType: te.value.iconType, iconValue: te.value.iconValue }, null, 8, ["iconType", "iconValue"])) : (i(), d(C, { key: 2 }, [u2.isLeaf ? (i(), d("div", H, [n2[5] || (n2[5] = h("img", { src: I, class: "file" }, null, -1)), h("span", null, x(u2.name), 1)])) : (i(), d("div", R, [h("div", D, [n2[4] || (n2[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, n3) => (i(), d("li", { key: n3, tabindex: "-1", class: "menu__item", onClick: (n4) => ((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
|
-
const
|
|
127
|
-
se.value =
|
|
126
|
+
const n5 = xe();
|
|
127
|
+
se.value = n5.nodeId, ce.value = n5.nodeId, re.value = n5.name, "addSiblingNode" === e5.standardEvent ? (n5.isLeaf = ge.value.data.isLeaf, ge.value.parent && ge.value.parent.level > 0 ? ne.value.append(n5, ge.value.parent) : oe.value.push(n5)) : "addChildNode" === e5.standardEvent && (n5.isLeaf = true, ge.value.data.isLeaf = false, ne.value.append(n5, ge.value), ne.value.setCurrentKey(n5.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
|
} });
|