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