super-page-runtime 2.3.0-tmp2 → 2.3.2
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/api/page-expose-util.js +25 -25
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +4 -1
- package/dist/es/components/runtime/utils/page-helper-util.js +152 -152
- package/dist/es/components/runtime/utils/page-init-util.js +5 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +185 -158
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +130 -114
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +31 -10
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +41 -25
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +21 -21
- package/package.json +2 -2
package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js
CHANGED
|
@@ -14,50 +14,50 @@ import "../../../../utils/page-store.js";
|
|
|
14
14
|
import "agilebuilder-ui/src/utils/i18n-util";
|
|
15
15
|
import "vue-i18n";
|
|
16
16
|
import "../../../../utils/events/print-label.js";
|
|
17
|
-
const
|
|
18
|
-
} } }, setup(e2, { expose:
|
|
19
|
-
const
|
|
17
|
+
const b = { style: { overflow: "auto", height: "calc(100vh - 140px)" }, ref: "dialogBody" }, O = { class: "dialog-footer" }, x = e({ __name: "common-homepage-search", props: { configure: { type: Object, required: true }, pageContext: { type: Object, default: () => {
|
|
18
|
+
} } }, setup(e2, { expose: x2 }) {
|
|
19
|
+
const N = e2, _ = t(false), J = t({}), j = t(0);
|
|
20
20
|
let I;
|
|
21
21
|
o(() => {
|
|
22
22
|
I = setTimeout(() => {
|
|
23
|
-
J.value = JSON.parse(JSON.stringify(
|
|
23
|
+
J.value = JSON.parse(JSON.stringify(N.pageContext.entity));
|
|
24
24
|
}, 200);
|
|
25
25
|
}), i(() => {
|
|
26
26
|
I && clearTimeout(I);
|
|
27
27
|
});
|
|
28
28
|
const k = t([]), w = () => {
|
|
29
|
-
|
|
29
|
+
_.value = false;
|
|
30
30
|
}, T = () => {
|
|
31
31
|
const e3 = y.service({ lock: true, text: "Loading", background: "rgba(0, 0, 0, 0.7)" });
|
|
32
|
-
v(
|
|
33
|
-
|
|
32
|
+
v(N.pageContext, N.pageContext.initChartServiceConfigs, null, false).then(() => {
|
|
33
|
+
_.value = false;
|
|
34
34
|
}).finally(() => {
|
|
35
|
-
|
|
35
|
+
_.value = false, e3.close();
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
function H() {
|
|
39
|
-
|
|
39
|
+
N.pageContext.entity = JSON.parse(JSON.stringify(J.value)), j.value++;
|
|
40
40
|
}
|
|
41
41
|
function A() {
|
|
42
42
|
const e3 = {};
|
|
43
|
-
|
|
43
|
+
N.pageContext.variables.forEach((t3) => {
|
|
44
44
|
const o3 = "${page." + t3.name + "}";
|
|
45
|
-
e3[o3] = h(
|
|
45
|
+
e3[o3] = h(N.pageContext.entity, o3, null);
|
|
46
46
|
});
|
|
47
47
|
let t2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS"), o2 = {};
|
|
48
|
-
t2 && (o2 = JSON.parse(t2)), o2[
|
|
48
|
+
t2 && (o2 = JSON.parse(t2)), o2[N.configure.homeChartSettingUserId] = e3;
|
|
49
49
|
const i2 = JSON.stringify(e3);
|
|
50
|
-
window.localStorage.setItem("HOME_MY_CHARTS_CONDITIONS", JSON.stringify(o2)), J.value = JSON.parse(JSON.stringify(
|
|
50
|
+
window.localStorage.setItem("HOME_MY_CHARTS_CONDITIONS", JSON.stringify(o2)), J.value = JSON.parse(JSON.stringify(N.pageContext.entity)), S.post(window.$vueApp.config.globalProperties.baseAPI + "/component/home-chart-settings/search-conditions", { id: N.configure.homeChartSettingUserId, searchConditionsJson: i2 }).then((e4) => {
|
|
51
51
|
C.success("保存成功"), T();
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
return
|
|
55
|
-
|
|
54
|
+
return x2({ openSearch: () => {
|
|
55
|
+
_.value = true, k.value = N.configure.pushHomepage.searchConditions;
|
|
56
56
|
} }), (t2, o2) => {
|
|
57
57
|
const i2 = l("el-empty"), v2 = l("el-form"), h2 = l("el-button"), y2 = l("el-dialog");
|
|
58
|
-
return r(), a(y2, { modelValue:
|
|
58
|
+
return r(), a(y2, { modelValue: _.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => _.value = e3), title: "筛选", close: w, "append-to-body": "", fullscreen: "", top: "40vh", append: "", width: "70%", draggable: "" }, { default: n(() => [u("div", b, [k.value && 0 !== k.value.length ? c("", true) : (r(), a(i2, { key: 0, description: "未设置筛选条件", "image-size": 50 })), (r(), a(v2, { key: j.value }, { default: n(() => [(r(true), g(m, null, d(k.value, (t3) => (r(), a(f, { key: t3.uuid, configure: t3, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"]))), 128))]), _: 1 }))], 512)]), footer: n(() => [u("div", O, [s(h2, { type: "primary", onClick: T }, { default: n(() => o2[1] || (o2[1] = [p(" 确定 ")])), _: 1 }), s(h2, { type: "default", onClick: H }, { default: n(() => o2[2] || (o2[2] = [p("重置")])), _: 1 }), s(h2, { type: "primary", onClick: A }, { default: n(() => o2[3] || (o2[3] = [p(" 保存为默认条件 ")])), _: 1 })])]), _: 1 }, 8, ["modelValue"]);
|
|
59
59
|
};
|
|
60
60
|
} });
|
|
61
61
|
export {
|
|
62
|
-
|
|
62
|
+
x as default
|
|
63
63
|
};
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
import { defineComponent as e, ref as t, onMounted as n, watch as o, onUnmounted as i, resolveComponent as a, createElementBlock as l, openBlock as r, unref as u, createVNode as s } from "vue";
|
|
2
|
-
import { setTableEvents as c, canExecuteButton as p, doAfterClickEvent as d, doBeforeClickEvent as f, gridSelectRecord as g, gridSelectAllRecords as m, gridSelectionChange as v, cellClick as h, cellDblClick as b, rowClick as w, rowDblClick as
|
|
3
|
-
import { getBaseUrl as D, getListCode as
|
|
2
|
+
import { setTableEvents as c, canExecuteButton as p, doAfterClickEvent as d, doBeforeClickEvent as f, gridSelectRecord as g, gridSelectAllRecords as m, gridSelectionChange as v, cellClick as h, cellDblClick as b, rowClick as w, rowDblClick as S, headerClick as C, getEventNameByType as y, getEventFuncByType as x, getHandleEvent as E } from "../../../../utils/events/event-util.js";
|
|
3
|
+
import { getBaseUrl as D, getListCode as T, getRealRestApiPath as O, isWorkflowPage as R, isVariableInvalidValue as k } from "../../../../utils/common-util.js";
|
|
4
4
|
import { getAdditionalParamMap as I, getSaveFormRequestWithRow as V, standardEvents as j } from "../../../../utils/events/standard-event.js";
|
|
5
5
|
import { isPromise as N } from "agilebuilder-ui/src/utils/common-util";
|
|
6
|
-
import { getOperationButtons as
|
|
6
|
+
import { getOperationButtons as B, popupToPage as P } from "../../../../utils/table-utils.js";
|
|
7
7
|
import F from "../../../../utils/eventBus.js";
|
|
8
8
|
import { getDefaultValue as H } from "../../../../utils/page-init-util.js";
|
|
9
|
-
import { getSizeConfig as U, caculateShowCondition as
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
import { getSizeConfig as U, caculateShowCondition as L, decomposeVariable as M } from "../../../../utils/page-helper-util.js";
|
|
10
|
+
import { getComponentRefByCode as $ } from "../../../../utils/global-refs.js";
|
|
11
|
+
import { getRowStyleUtil as _, getCellStyleUtil as A, getHeaderCellStyleUtil as G } from "../../chart/table/chart-table-util.js";
|
|
12
|
+
const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}, configure: {} }, emits: ["setSafeDeleteTableCode"], setup(e2, { expose: W2, emit: q }) {
|
|
13
|
+
const Q = e2, Y = Q.pageContext;
|
|
14
|
+
let J = Q.configure;
|
|
14
15
|
const K = t({});
|
|
15
|
-
|
|
16
|
-
const X = K.value.style,
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
const e3 =
|
|
16
|
+
Y.isTest ? K.value = Q.configure.runtime ? Q.configure.runtime : {} : Y.tableRuntimes && Y.tableRuntimes[J.uuid] && (J = JSON.parse(Y.tableRuntimes[J.uuid].configure), K.value = J.runtime ? J.runtime : {});
|
|
17
|
+
const X = K.value.style, Z = K.value.class, ee = Y.systemCode, te = Y.backendUrl, ne = J.props && J.props.dataOrigin && J.props.dataOrigin.tableName;
|
|
18
|
+
let oe = D(Y.backendUrl, Y.isTest);
|
|
19
|
+
oe || (oe = window.$vueApp.config.globalProperties.baseURL);
|
|
20
|
+
const ie = t({}), ae = [], le = t({});
|
|
21
|
+
le.value = function() {
|
|
22
|
+
const e3 = Y.systemCode, t2 = Y.code;
|
|
22
23
|
let n2 = J.props && J.props.dataOrigin && "[]" !== J.props.dataOrigin.sqlFilterCondition ? J.props.dataOrigin.sqlFilterCondition : null;
|
|
23
24
|
null == n2 && (n2 = []);
|
|
24
|
-
const o2 = { isSql: true, optionTableHeight: 0, rowKeyProp: J.props.dataOrigin.principalLinkage, extraParam: { beanName:
|
|
25
|
+
const o2 = { isSql: true, optionTableHeight: 0, rowKeyProp: J.props.dataOrigin.principalLinkage, extraParam: { beanName: Y.beanName, functionCode: t2 + ".listData", tableName: ne, systemCode: e3, pageCode: Y.code, pageVersion: Y.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter: Se, esc: De }, indexContinuous: !(!J.props || !J.props.otherSettings) && J.props.otherSettings.serialNumberContinuous, initSearch: !J.props || false !== J.props.dataOrigin.initializationQuery, resizeHeight: je, pageCode: Y.code, pageVersion: Y.version, additionalParamMap: I(Y), showOverflowTooltip: !(!J.props || !J.props.otherSettings || void 0 !== J.props.otherSettings.isBreakLine && false !== J.props.otherSettings.isBreakLine), isEnableEnterEvent: J.props && J.props.otherSettings && J.props.otherSettings.isEnableEnterEvent, isWithDataPermission: !!(J.props && J.props.otherSettings && J.props.otherSettings.isWithDataPermission) && J.props.otherSettings.isWithDataPermission, pageDevMode: false, isWorkflowEntity: R(Y), tableClass: Z, tableStyle: X, pageContext: Y, configureObj: J, backendUrl: oe, cellStyleRender: qe, rowStyleRender: We, titleStyleRender: Qe, validateEitConditions: Xe };
|
|
25
26
|
return function(e4) {
|
|
26
27
|
var _a;
|
|
27
28
|
((_a = J.props.highOrder) == null ? void 0 : _a.mergeFields) && J.props.highOrder.mergeFields.length > 0 && (e4.mergeFields = J.props.highOrder.mergeFields.join(","));
|
|
28
29
|
}(o2), function(e4) {
|
|
29
30
|
const t3 = [];
|
|
30
31
|
e4.operations || (e4.operations = {});
|
|
31
|
-
|
|
32
|
+
B(Y, J, t3, ye), e4.operations.operation = t3;
|
|
32
33
|
}(o2), function(e4) {
|
|
33
34
|
J.props && J.props.dataOrigin && J.props.dataOrigin.sortField && (e4.initSortInfo = [], J.props.dataOrigin.sortField.forEach((t3) => {
|
|
34
35
|
const n3 = { order: "desc" === t3.type ? "desc" : "asc" };
|
|
@@ -43,141 +44,141 @@ const z = ["id"], G = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
43
44
|
const o4 = t3.lazy, i2 = t3.defaultExpandAll;
|
|
44
45
|
e4.lazy = null == o4 || o4, e4.defaultExpandAll = null != i2 && i2;
|
|
45
46
|
const a2 = { parentProp: n3, lazy: e4.lazy, defaultExpandAll: e4.defaultExpandAll };
|
|
46
|
-
e4.extraParam.listViewTreeSetting = JSON.stringify(a2), e4.subRowUrl =
|
|
47
|
+
e4.extraParam.listViewTreeSetting = JSON.stringify(a2), e4.subRowUrl = oe + "/dsc/commons/list-subs";
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
}(o2), function(e4) {
|
|
50
51
|
const t3 = J.runtime && J.runtime.events ? J.runtime.events : [];
|
|
51
|
-
c(e4, t3,
|
|
52
|
-
const n3 =
|
|
52
|
+
c(e4, t3, Y, J);
|
|
53
|
+
const n3 = Y.customEvents;
|
|
53
54
|
n3 && (e4.eventCallBack = n3);
|
|
54
55
|
}(o2), o2;
|
|
55
56
|
}();
|
|
56
|
-
const
|
|
57
|
-
let e3 =
|
|
58
|
-
e3 && (e3 =
|
|
57
|
+
const re = t(), ue = t(), se = function() {
|
|
58
|
+
let e3 = oe + "/dsc/commons/list";
|
|
59
|
+
e3 && (e3 = O(e3, ee, te, Y.isTest));
|
|
59
60
|
return e3;
|
|
60
|
-
}(),
|
|
61
|
-
function
|
|
61
|
+
}(), ce = T(Y.code, Y.version, J.uuid), pe = Y.code + "_" + ce, de = t([]), fe = Y.entity.page, ge = t({ data: [] }), me = Y.superGridItems, ve = me ? me[J.uuid] : null, he = t(false), be = q;
|
|
62
|
+
function we() {
|
|
62
63
|
J.props.linkages && J.props.linkages.length > 0 && (J.props.linkages.forEach((e3) => {
|
|
63
|
-
const t2 =
|
|
64
|
-
t2 && t2.length > 1 &&
|
|
65
|
-
}),
|
|
64
|
+
const t2 = M(e3.fieldName);
|
|
65
|
+
t2 && t2.length > 1 && ae.push(t2[1]);
|
|
66
|
+
}), ae.length > 0 && function() {
|
|
66
67
|
let e3 = [];
|
|
67
|
-
|
|
68
|
+
Q.pageContext.toolsInputComponents && Q.pageContext.toolsInputComponents.length > 0 && Q.pageContext.toolsInputComponents.forEach((t2) => {
|
|
68
69
|
if (J.props.linkages.some((e4) => e4.fieldName === t2.prop) && t2.defaultValue) {
|
|
69
|
-
const n2 =
|
|
70
|
+
const n2 = M(t2.prop);
|
|
70
71
|
n2 && n2.length > 1 && e3.push(n2[1]);
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
74
|
if (0 === e3.length) Je();
|
|
74
75
|
else {
|
|
75
|
-
const t2 =
|
|
76
|
-
e3 = e3.filter((e4) =>
|
|
77
|
-
o(() =>
|
|
78
|
-
const t4 =
|
|
79
|
-
0 === e3.length ?
|
|
76
|
+
const t2 = Ye();
|
|
77
|
+
e3 = e3.filter((e4) => k(t2, e4)), 0 === e3.length ? (Ve(t2), Je()) : ae.forEach((t3) => {
|
|
78
|
+
o(() => Q.pageContext.entity.page[t3], () => {
|
|
79
|
+
const t4 = Ye();
|
|
80
|
+
0 === e3.length ? Ve(t4) : (e3 = e3.filter((e4) => k(t4, e4)), 0 === e3.length && Ve(t4));
|
|
80
81
|
}, { immediate: true });
|
|
81
82
|
});
|
|
82
83
|
}
|
|
83
84
|
}());
|
|
84
85
|
}
|
|
85
|
-
function
|
|
86
|
+
function Se({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
|
|
86
87
|
Ce(null, null, n2, t2, e3);
|
|
87
88
|
}
|
|
88
89
|
function Ce(e3, t2, n2, o2, i2) {
|
|
89
|
-
const a2 =
|
|
90
|
-
a2.props.base.tableUuid = l2.uuid,
|
|
91
|
-
true === l3.canExecute && (
|
|
92
|
-
d(
|
|
90
|
+
const a2 = ie.value.lineEditSave, l2 = J;
|
|
91
|
+
a2.props.base.tableUuid = l2.uuid, le.value.lineEditOptions.beforeSave = xe, Y.editData = n2, p({ pageContext: Y, configureObj: a2 }).then((l3) => {
|
|
92
|
+
true === l3.canExecute && (le.value.lineEditOptions.saveRow = Ee, ue.value.saveRow(i2, ce).then(() => {
|
|
93
|
+
d(Y, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
|
|
93
94
|
}));
|
|
94
95
|
}).finally(() => {
|
|
95
|
-
|
|
96
|
+
Y.editData = null;
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
|
-
function
|
|
99
|
+
function ye(e3) {
|
|
99
100
|
if (!e3) return;
|
|
100
101
|
let t2;
|
|
101
102
|
const n2 = y(e3.events, "click");
|
|
102
103
|
if (n2) {
|
|
103
|
-
if (
|
|
104
|
-
t2 = x(
|
|
104
|
+
if (ie.value[n2] = e3, "lineEditSave" === n2 ? t2 = Ce : "restoreEdit" === n2 ? t2 = Te : "lineEditUpdate" === n2 ? t2 = Oe : "lineEditDelete" === n2 && (t2 = ke), !t2) {
|
|
105
|
+
t2 = x(Y, e3.events, "click");
|
|
105
106
|
}
|
|
106
|
-
} else
|
|
107
|
+
} else ie.value[e3.uuid] = e3, t2 = Be;
|
|
107
108
|
return { onClick: t2, eventName: n2 };
|
|
108
109
|
}
|
|
109
|
-
function
|
|
110
|
-
const o2 =
|
|
110
|
+
function xe({ row: e3, columns: t2, additionalParamMap: n2 }) {
|
|
111
|
+
const o2 = ie.value.lineEditSave, i2 = J;
|
|
111
112
|
o2.props.base.tableUuid = i2.uuid;
|
|
112
|
-
return f(
|
|
113
|
+
return f(Y, o2, { row: e3, columns: t2 });
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
-
const l2 =
|
|
115
|
+
function Ee({ row: e3, columns: t2, dataTypeMap: n2, dynamicColumnInfo: o2, additionalParamMap: i2, mainDefaultValueColumns: a2 }) {
|
|
116
|
+
const l2 = ie.value.lineEditSave, r2 = J;
|
|
116
117
|
return l2.props.base.tableUuid = r2.uuid, new Promise((t3, n3) => {
|
|
117
118
|
const i3 = { tableName: r2.props.dataOrigin.tableName };
|
|
118
|
-
V(
|
|
119
|
+
V(Y, l2, "/dsc/commons", false, a2, o2, e3, i3).then((e4) => {
|
|
119
120
|
t3(e4 ? e4.entity : {});
|
|
120
121
|
}).catch((e4) => {
|
|
121
122
|
n3(e4);
|
|
122
123
|
});
|
|
123
124
|
});
|
|
124
125
|
}
|
|
125
|
-
function
|
|
126
|
-
|
|
126
|
+
function De({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
|
|
127
|
+
Te(null, null, n2, t2, e3);
|
|
127
128
|
}
|
|
128
|
-
function
|
|
129
|
-
const a2 =
|
|
129
|
+
function Te(e3, t2, n2, o2, i2) {
|
|
130
|
+
const a2 = ie.value.restoreEdit, l2 = J;
|
|
130
131
|
a2.props.base.tableUuid = l2.uuid;
|
|
131
|
-
const r2 = f(
|
|
132
|
+
const r2 = f(Y, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
|
|
132
133
|
if (!r2) return;
|
|
133
134
|
N(r2) ? r2.then((e4) => {
|
|
134
|
-
e4 &&
|
|
135
|
-
}) :
|
|
136
|
-
d(
|
|
135
|
+
e4 && ue.value.restoreRow(i2, ce);
|
|
136
|
+
}) : ue.value.restoreRow(i2, ce);
|
|
137
|
+
d(Y, J, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
|
|
137
138
|
}
|
|
138
139
|
function Oe(e3, t2, n2, o2, i2) {
|
|
139
|
-
const a2 =
|
|
140
|
+
const a2 = ie.value.lineEditUpdate, l2 = J;
|
|
140
141
|
a2.props.base.tableUuid = l2.uuid;
|
|
141
|
-
const r2 = f(
|
|
142
|
+
const r2 = f(Y, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
|
|
142
143
|
r2 && (N(r2) ? r2.then((l3) => {
|
|
143
|
-
l3 &&
|
|
144
|
-
}) :
|
|
144
|
+
l3 && Re(e3, t2, n2, o2, i2, a2);
|
|
145
|
+
}) : Re(e3, t2, n2, o2, i2, a2));
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
-
|
|
147
|
+
function Re(e3, t2, n2, o2, i2, a2) {
|
|
148
|
+
Y.editData = n2, p({ pageContext: Y, configureObj: a2 }).then((a3) => {
|
|
148
149
|
if (true === a3.canExecute) {
|
|
149
|
-
|
|
150
|
-
d(
|
|
150
|
+
ue.value.editRow(i2, ce);
|
|
151
|
+
d(Y, J, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
|
|
151
152
|
}
|
|
152
153
|
}).finally(() => {
|
|
153
|
-
|
|
154
|
+
Y.editData = null;
|
|
154
155
|
});
|
|
155
156
|
}
|
|
156
|
-
function
|
|
157
|
-
const a2 =
|
|
157
|
+
function ke(e3, t2, n2, o2, i2) {
|
|
158
|
+
const a2 = ie.value.lineEditDelete, l2 = J;
|
|
158
159
|
a2.props.base.tableUuid = l2.uuid;
|
|
159
|
-
const r2 = f(
|
|
160
|
+
const r2 = f(Y, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
|
|
160
161
|
r2 && (N(r2) ? r2.then((l3) => {
|
|
161
|
-
l3 &&
|
|
162
|
-
}) :
|
|
162
|
+
l3 && Ie(e3, t2, n2, o2, i2, a2);
|
|
163
|
+
}) : Ie(e3, t2, n2, o2, i2, a2));
|
|
163
164
|
}
|
|
164
|
-
function
|
|
165
|
-
if (n2.id || n2.ID)
|
|
165
|
+
function Ie(e3, t2, n2, o2, i2, a2) {
|
|
166
|
+
if (n2.id || n2.ID) Y.editData = n2, p({ pageContext: Y, configureObj: a2 }).then((e4) => {
|
|
166
167
|
if (true === e4.canExecute) {
|
|
167
168
|
const e5 = [];
|
|
168
|
-
n2.id ? e5.push(n2.id) : e5.push(n2.ID), j.delete({ pageContext:
|
|
169
|
+
n2.id ? e5.push(n2.id) : e5.push(n2.ID), j.delete({ pageContext: Y, configureObj: a2, ids: e5 });
|
|
169
170
|
}
|
|
170
171
|
}).finally(() => {
|
|
171
|
-
|
|
172
|
+
Y.editData = null;
|
|
172
173
|
});
|
|
173
174
|
else {
|
|
174
|
-
|
|
175
|
-
d(
|
|
175
|
+
Te(e3, t2, n2, o2, i2);
|
|
176
|
+
d(Y, J, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
|
-
function
|
|
179
|
-
if (!
|
|
180
|
-
const t2 =
|
|
179
|
+
function Ve(e3) {
|
|
180
|
+
if (!Y.dataTypeMaps) return;
|
|
181
|
+
const t2 = Y.dataTypeMaps;
|
|
181
182
|
let n2 = [];
|
|
182
183
|
if (e3) for (var o2 in e3) {
|
|
183
184
|
const a2 = e3[o2];
|
|
@@ -192,153 +193,179 @@ const z = ["id"], G = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
192
193
|
}
|
|
193
194
|
} else {
|
|
194
195
|
const e4 = { leftBracket: "(" };
|
|
195
|
-
e4.propName = o2, e4.propDbName = o2, e4.dataType = t2[o2] ? t2[o2] : "TEXT", e4.operator = "EQ", e4.propValue = a2, e4.rightBracket = ")", e4.joinSign = "and", n2.push(e4);
|
|
196
|
+
e4.propName = o2, e4.propDbName = o2, e4.dataType = t2[o2] ? t2[o2] : "TEXT", e4.operator = "EQ", e4.propValue = a2, Ze(e4, o2), e4.rightBracket = ")", e4.joinSign = "and", n2.push(e4);
|
|
196
197
|
}
|
|
197
198
|
}
|
|
198
|
-
|
|
199
|
+
ue.value.toolbarRefresh(null, null, n2);
|
|
199
200
|
}
|
|
200
|
-
function
|
|
201
|
-
const t2 =
|
|
201
|
+
function je(e3) {
|
|
202
|
+
const t2 = Ne();
|
|
202
203
|
if (t2) {
|
|
203
204
|
let n2 = 0;
|
|
204
205
|
return e3.searchHeight && (n2 = e3.searchHeight), t2 - 20 - n2;
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
|
-
function
|
|
208
|
-
if (!
|
|
209
|
-
const e3 = U(
|
|
208
|
+
function Ne() {
|
|
209
|
+
if (!ue.value) return;
|
|
210
|
+
const e3 = U(Q.pageContext, Q.configure);
|
|
210
211
|
if (e3) {
|
|
211
212
|
if (e3.isCalcHeight) {
|
|
212
|
-
let e4 =
|
|
213
|
-
if (e4 || (e4 =
|
|
213
|
+
let e4 = ue.value.$el;
|
|
214
|
+
if (e4 || (e4 = ue.value), !e4) return;
|
|
214
215
|
const t2 = e4.getBoundingClientRect();
|
|
215
216
|
return window.innerHeight - t2.y - 90;
|
|
216
217
|
}
|
|
217
|
-
if (e3.fixHeight &&
|
|
218
|
+
if (e3.fixHeight && ue.value && (ue.value.tableHeight = e3.fixHeight), e3.maxHeight) return e3.maxHeight;
|
|
218
219
|
}
|
|
219
220
|
}
|
|
220
|
-
function
|
|
221
|
-
const l2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2, button: a2, id: n2.ID ? n2.ID : n2.id }, r2 =
|
|
222
|
-
r2.props.base.tableUuid = u2.uuid, E(null,
|
|
221
|
+
function Be(e3, t2, n2, o2, i2, a2) {
|
|
222
|
+
const l2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2, button: a2, id: n2.ID ? n2.ID : n2.id }, r2 = ie.value[a2.sourceButton.uuid], u2 = J;
|
|
223
|
+
r2.props.base.tableUuid = u2.uuid, E(null, Y, r2, "click", l2);
|
|
223
224
|
}
|
|
224
225
|
function Pe(e3) {
|
|
225
|
-
"close_open_win" === e3.data &&
|
|
226
|
-
}
|
|
227
|
-
function Be(e3, t2) {
|
|
228
|
-
pe.value = e3;
|
|
229
|
-
g(Q, J, { selection: e3, row: t2 });
|
|
226
|
+
"close_open_win" === e3.data && ue.value && ue.value.refresh();
|
|
230
227
|
}
|
|
231
|
-
function Fe(e3) {
|
|
232
|
-
|
|
233
|
-
|
|
228
|
+
function Fe(e3, t2) {
|
|
229
|
+
de.value = e3;
|
|
230
|
+
g(Y, J, { selection: e3, row: t2 });
|
|
234
231
|
}
|
|
235
232
|
function He(e3) {
|
|
236
|
-
|
|
233
|
+
de.value = e3;
|
|
234
|
+
m(Y, J, { selection: e3 });
|
|
235
|
+
}
|
|
236
|
+
function Ue(e3) {
|
|
237
|
+
v(Y, J, { newSelection: e3 });
|
|
237
238
|
}
|
|
238
|
-
function
|
|
239
|
-
h(
|
|
239
|
+
function Le(e3, t2, n2, o2) {
|
|
240
|
+
h(Y, J, { row: e3, column: t2, cell: n2, event: o2 });
|
|
240
241
|
}
|
|
241
242
|
function Me(e3, t2, n2, o2) {
|
|
242
|
-
b(
|
|
243
|
+
b(Y, J, { row: e3, column: t2, cell: n2, event: o2 });
|
|
243
244
|
}
|
|
244
245
|
function $e(e3, t2, n2) {
|
|
245
|
-
w(
|
|
246
|
+
w(Y, J, { row: e3, column: t2, event: n2 });
|
|
246
247
|
}
|
|
247
248
|
function _e(e3, t2, n2) {
|
|
248
|
-
|
|
249
|
+
S(Y, J, { row: e3, column: t2, event: n2 });
|
|
249
250
|
}
|
|
250
|
-
function
|
|
251
|
-
|
|
251
|
+
function Ae(e3, t2) {
|
|
252
|
+
C(Y, J, { column: e3, event: t2 });
|
|
252
253
|
}
|
|
253
|
-
function
|
|
254
|
-
|
|
254
|
+
function Ge() {
|
|
255
|
+
de.value = [];
|
|
255
256
|
}
|
|
256
257
|
function ze(e3) {
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
function Ge(e3) {
|
|
260
|
-
return _(e3, [], q);
|
|
258
|
+
he.value = true;
|
|
261
259
|
}
|
|
262
260
|
function We(e3) {
|
|
263
|
-
return
|
|
261
|
+
return _(e3, [], Q);
|
|
264
262
|
}
|
|
265
263
|
function qe(e3) {
|
|
266
|
-
|
|
267
|
-
|
|
264
|
+
return A(e3, e3.cellStyle, Q);
|
|
265
|
+
}
|
|
266
|
+
function Qe(e3) {
|
|
267
|
+
const t2 = e3.titleStyle, n2 = Q.configure.style.titleStyle;
|
|
268
|
+
return G(e3, { cellTitleStyle: t2, titleStyle: n2 }, Q);
|
|
268
269
|
}
|
|
269
|
-
function
|
|
270
|
+
function Ye() {
|
|
270
271
|
const e3 = {};
|
|
271
|
-
return
|
|
272
|
-
e3[t2] =
|
|
272
|
+
return ae.forEach((t2) => {
|
|
273
|
+
e3[t2] = Q.pageContext.entity.page[t2];
|
|
273
274
|
}), e3;
|
|
274
275
|
}
|
|
275
276
|
function Je() {
|
|
276
|
-
|
|
277
|
-
o(() =>
|
|
278
|
-
|
|
277
|
+
ae.forEach((e3) => {
|
|
278
|
+
o(() => Q.pageContext.entity.page[e3], () => {
|
|
279
|
+
Ve(Ye());
|
|
279
280
|
});
|
|
280
281
|
});
|
|
281
282
|
}
|
|
282
283
|
n(() => {
|
|
283
284
|
const e3 = Ke();
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}), F.$on(
|
|
287
|
-
F.$emit(
|
|
288
|
-
}), F.$on(
|
|
289
|
-
|
|
290
|
-
}), F.$on(
|
|
291
|
-
|
|
292
|
-
}),
|
|
293
|
-
}), o(() =>
|
|
294
|
-
|
|
295
|
-
}), o(() =>
|
|
296
|
-
|
|
285
|
+
ue.value && e3 && e3.distanceToBottom && (ue.value.tableHeight = e3.distanceToBottom - 110), Q.pageContext.pageRuntimeStyle, window.addEventListener("message", Pe), F.$on(pe + "-close-component-page-dialog", function({ jumpInfo: e4, popEntity: t2, popPageCode: n2 }) {
|
|
286
|
+
ue.value.closePageDialog({ entity: t2, pageCode: n2, jumpInfo: e4 });
|
|
287
|
+
}), F.$on(pe + "_close-dialog-get-entity", () => {
|
|
288
|
+
F.$emit(pe + "_close-super-dialog");
|
|
289
|
+
}), F.$on(ce + "-pickFileDone", (e4) => {
|
|
290
|
+
ue.value.pickFileDone(e4);
|
|
291
|
+
}), F.$on(ce + "-scanDone", (e4) => {
|
|
292
|
+
ue.value.scanDone(e4);
|
|
293
|
+
}), le.value.formSetMaxHeight = Ne(), le.value && le.value.configureObj.props.base && le.value.configureObj.props.base.isSafeDelete && be("setSafeDeleteTableCode", le.value.extraParam.tableName);
|
|
294
|
+
}), o(() => Q.pageContext.searchFormData, (e3) => {
|
|
295
|
+
ge.value.data = e3;
|
|
296
|
+
}), o(() => Q.pageContext.entity.data, (e3) => {
|
|
297
|
+
Ve(Q.pageContext.entity.data);
|
|
297
298
|
}), i(() => {
|
|
298
|
-
window.removeEventListener("message", Pe), F.$off(
|
|
299
|
+
window.removeEventListener("message", Pe), F.$off(pe + "-close-component-page-dialog"), F.$off(pe + "_close-dialog-get-entity"), F.$off(ce + "-pickFileDone"), F.$off(ce + "-scanDone");
|
|
299
300
|
});
|
|
300
301
|
const Ke = () => {
|
|
301
|
-
if (!
|
|
302
|
-
let e3 =
|
|
302
|
+
if (!re.value) return null;
|
|
303
|
+
let e3 = re.value.closest(".app-container");
|
|
303
304
|
if (!e3) return null;
|
|
304
|
-
const t2 =
|
|
305
|
+
const t2 = re.value.getBoundingClientRect(), n2 = e3.getBoundingClientRect(), o2 = window.scrollY;
|
|
305
306
|
return { distanceToTop: t2.top + o2 - n2.top, distanceToBottom: n2.bottom - t2.top };
|
|
306
307
|
};
|
|
307
308
|
function Xe({ row: e3, editConditions: t2 }) {
|
|
308
309
|
let n2 = true;
|
|
309
|
-
return t2 && t2.length > 0 && (n2 =
|
|
310
|
+
return t2 && t2.length > 0 && (n2 = L(Q.pageContext, t2, e3)), n2;
|
|
311
|
+
}
|
|
312
|
+
function Ze(e3, t2) {
|
|
313
|
+
const n2 = $(Q.pageContext, t2);
|
|
314
|
+
if (n2) {
|
|
315
|
+
const t3 = n2.getConfigure();
|
|
316
|
+
if ("datePicker" === t3.name) {
|
|
317
|
+
const n3 = t3.runtime.props.dateType;
|
|
318
|
+
e3.dateFormatType = "year" === n3 ? "YEAR" : "month" === n3 ? "MONTH" : "DAY";
|
|
319
|
+
}
|
|
320
|
+
}
|
|
310
321
|
}
|
|
311
|
-
return
|
|
312
|
-
return
|
|
322
|
+
return W2({ refresh: function(e3, t2, n2, o2) {
|
|
323
|
+
return ue.value.refresh(e3, t2, n2, o2);
|
|
313
324
|
}, createRow: function() {
|
|
314
|
-
return
|
|
315
|
-
}, clearSelections:
|
|
316
|
-
return
|
|
325
|
+
return ue.value.createRow(ce, {}, { getDefaultValueFunc: H });
|
|
326
|
+
}, clearSelections: Ge, getSelections: function() {
|
|
327
|
+
return de.value;
|
|
317
328
|
}, getSelectionIds: function() {
|
|
318
329
|
const e3 = [];
|
|
319
|
-
return null !==
|
|
330
|
+
return null !== de.value && de.value.forEach((t2) => {
|
|
320
331
|
e3.push(t2.id ? t2.id : t2.ID ? t2.ID : null);
|
|
321
332
|
}), e3;
|
|
322
333
|
}, getTableConfigure: function() {
|
|
323
334
|
return J;
|
|
324
335
|
}, isDeleteChange: function(e3) {
|
|
325
|
-
|
|
336
|
+
ue.value.isDeleteChange(e3);
|
|
326
337
|
}, validatorSunTableListData: function() {
|
|
327
|
-
return
|
|
338
|
+
return ue.value.validatorSunTableListData();
|
|
328
339
|
}, showMobileSearch: function() {
|
|
329
|
-
|
|
340
|
+
he.value && ue.value.showMobileSearch();
|
|
330
341
|
}, getTableSelectOptions: function() {
|
|
331
|
-
if (
|
|
342
|
+
if (ue.value) return ue.value.getTableSelectOptions(ce);
|
|
332
343
|
}, dynamicControlTableEdit: function(e3, t2, n2) {
|
|
333
|
-
|
|
344
|
+
ue.value && ue.value.dynamicControlTableEdit(e3, t2, n2);
|
|
334
345
|
}, doLayout: function(e3) {
|
|
335
|
-
|
|
346
|
+
ue.value && ue.value.doLayout(e3);
|
|
336
347
|
}, changeOperationAddState: function(e3) {
|
|
348
|
+
}, scrollTo: function(e3, t2) {
|
|
349
|
+
ue.value && ue.value.scrollTo(e3, t2);
|
|
350
|
+
}, setScrollTop: function(e3) {
|
|
351
|
+
ue.value && ue.value.setScrollTop(e3);
|
|
352
|
+
}, setScrollLeft: function(e3) {
|
|
353
|
+
ue.value && ue.value.setScrollLeft(e3);
|
|
354
|
+
}, getSuperGridRef: function() {
|
|
355
|
+
return ue.value.getSuperGridRef();
|
|
356
|
+
}, getSuperGridTableRef: function() {
|
|
357
|
+
return ue.value.getSuperGridTableRef();
|
|
358
|
+
}, setCurrentRowIndex: function(e3) {
|
|
359
|
+
var _a;
|
|
360
|
+
(_a = ue.value) == null ? void 0 : _a.setCurrentRowIndex(e3);
|
|
361
|
+
}, setScrollTopByRowIndex: function(e3) {
|
|
362
|
+
var _a;
|
|
363
|
+
(_a = ue.value) == null ? void 0 : _a.setScrollTopByRowIndex(e3);
|
|
337
364
|
} }), (e3, t2) => {
|
|
338
365
|
const n2 = a("super-grid");
|
|
339
|
-
return r(), l("div", { ref_key: "tableDivRef", ref:
|
|
366
|
+
return r(), l("div", { ref_key: "tableDivRef", ref: re, id: u(ce) + "_tableDiv" }, [s(n2, { ref_key: "gridRef", ref: ue, url: u(se), options: le.value, code: u(ce), settings: u(ve), "search-form-info": ge.value, "list-toolbar-form-data": u(fe), onSelect: Fe, onSelectAll: He, onSelectionChange: Ue, onCellClick: Le, onCellDblclick: Me, onRowClick: $e, onRowDblclick: _e, onHeaderClick: Ae, onRefresh: Ge, onNewOpenGridDialog: u(P), onCanShowMobileSearch: ze, onGridOnmounted: we }, null, 8, ["url", "options", "code", "settings", "search-form-info", "list-toolbar-form-data", "onNewOpenGridDialog"])], 8, z);
|
|
340
367
|
};
|
|
341
368
|
} });
|
|
342
369
|
export {
|
|
343
|
-
|
|
370
|
+
W as default
|
|
344
371
|
};
|