super-page-runtime 2.3.33-sit1 → 2.3.33
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 +131 -131
- package/dist/es/components/runtime/utils/barcode-util.js +5 -5
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +47 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +3 -1
- package/dist/es/components/runtime/utils/charts/chart-util.js +46 -44
- package/dist/es/components/runtime/utils/events/event-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/event-util.js +140 -128
- package/dist/es/components/runtime/utils/events/print-label.js +27 -25
- package/dist/es/components/runtime/utils/events/standard-event.js +738 -726
- package/dist/es/components/runtime/utils/events/validator-util.js +2 -2
- package/dist/es/components/runtime/utils/form/scan-util.js +4 -3
- package/dist/es/components/runtime/utils/page-helper-util.js +219 -219
- package/dist/es/components/runtime/utils/page-init-util.js +130 -125
- package/dist/es/components/runtime/utils/page-store.js +21 -21
- package/dist/es/components/runtime/utils/table-utils.js +4 -4
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +14 -10
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +11 -9
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +13 -12
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +15 -14
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +15 -14
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +16 -15
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +98 -93
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +69 -68
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +27 -23
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +3 -1
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +63 -63
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +29 -26
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +119 -116
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +46 -45
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +4 -3
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +28 -28
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +35 -35
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +9 -9
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -56
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +12 -11
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +4 -3
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +53 -46
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +18 -16
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +32 -27
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/home-chart.vue.js +9 -9
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +5 -4
- package/dist/es/components/runtime/views/super-page.vue2.js +183 -182
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +15 -3
- package/package.json +2 -2
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
import { defineComponent as e, ref as
|
|
1
|
+
import { defineComponent as e, ref as n, watch as t, onMounted as o, nextTick as a, resolveComponent as i, createBlock as c, openBlock as l, unref as u, normalizeClass as r, normalizeStyle as s, withCtx as p, createElementBlock as f, createCommentVNode as d, Fragment as g, renderList as m, createElementVNode as b, toDisplayString as y, withModifiers as v, createTextVNode as h } from "vue";
|
|
2
2
|
import { ElTabs as x, ElTabPane as C } from "element-plus";
|
|
3
3
|
import T from "../../object-render.vue.js";
|
|
4
4
|
import { SuperIcon as E } from "agilebuilder-ui";
|
|
5
|
-
import { handleAfterInitEvent as k, handleEvent as
|
|
6
|
-
import { $t as
|
|
7
|
-
import { isPromise as
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
5
|
+
import { handleAfterInitEvent as k, handleEvent as w } from "../../../../utils/events/event-util.js";
|
|
6
|
+
import { $t as N } from "../../../../utils/i18n-util.js";
|
|
7
|
+
import { isPromise as V } from "../../../../utils/page-helper-util.js";
|
|
8
|
+
const _ = e({ __name: "tabs-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: _2 }) {
|
|
9
|
+
const A = e2, P = n(""), j = n([]);
|
|
10
|
+
A.configure.items.forEach((e3) => {
|
|
11
11
|
e3.code || (e3.code = e3.index);
|
|
12
|
-
}),
|
|
13
|
-
const O =
|
|
14
|
-
function S(e3,
|
|
15
|
-
return
|
|
12
|
+
}), P.value = A.configure.props.defaultOpen ? A.configure.props.defaultOpen : 1;
|
|
13
|
+
const O = n(null), R = A.configure.runtime ? A.configure.runtime : {}, B = R.style, z = R.class, I = R.headerStyle;
|
|
14
|
+
function S(e3, n2) {
|
|
15
|
+
return w(e3, A.pageContext, A.configure, "before-leave", { activeName: e3, oldActiveName: n2 }) ?? true;
|
|
16
16
|
}
|
|
17
|
-
function D(e3,
|
|
18
|
-
const
|
|
19
|
-
return
|
|
17
|
+
function D(e3, n2) {
|
|
18
|
+
const t2 = { pane: e3, ev: n2 }, o2 = e3.paneName;
|
|
19
|
+
return A.pageContext.activeTab = o2, A.pageContext.activeLabel = t2.label, w(o2, A.pageContext, A.configure, "tab-click", t2);
|
|
20
20
|
}
|
|
21
21
|
function F(e3) {
|
|
22
|
-
const
|
|
23
|
-
return
|
|
22
|
+
const n2 = { paneName: e3 };
|
|
23
|
+
return A.pageContext.activeTab = e3, w(e3, A.pageContext, A.configure, "tab-change", n2);
|
|
24
24
|
}
|
|
25
25
|
function L(e3) {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
false !==
|
|
29
|
-
}) : false !==
|
|
26
|
+
const n2 = { paneName: e3 }, t2 = w(e3, A.pageContext, A.configure, "tab-remove", n2);
|
|
27
|
+
V(t2) ? t2.then((n3) => {
|
|
28
|
+
false !== n3 && U(e3);
|
|
29
|
+
}) : false !== t2 && U(e3);
|
|
30
30
|
}
|
|
31
31
|
function U(e3) {
|
|
32
|
-
|
|
33
|
-
if (
|
|
34
|
-
const e4 =
|
|
35
|
-
e4 && void 0 !== e4.code && (
|
|
32
|
+
P.value === e3 && A.configure.items.forEach((n2, t2) => {
|
|
33
|
+
if (n2.code === e3) {
|
|
34
|
+
const e4 = A.configure.items[t2 + 1] || A.configure.items[t2 - 1];
|
|
35
|
+
e4 && void 0 !== e4.code && (P.value = e4.code);
|
|
36
36
|
}
|
|
37
|
-
}),
|
|
37
|
+
}), j.value.includes(e3) || j.value.push(e3);
|
|
38
38
|
}
|
|
39
39
|
function q() {
|
|
40
|
-
return
|
|
40
|
+
return w(null, A.pageContext, A.configure, "tab-add");
|
|
41
41
|
}
|
|
42
|
-
function G(e3,
|
|
43
|
-
const
|
|
44
|
-
return
|
|
42
|
+
function G(e3, n2) {
|
|
43
|
+
const t2 = { paneName: e3, action: n2 };
|
|
44
|
+
return w(e3, A.pageContext, A.configure, "edit", t2);
|
|
45
45
|
}
|
|
46
46
|
function H() {
|
|
47
|
-
const e3 =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}) : false !== e3 && (
|
|
47
|
+
const e3 = w(A.configure.items, A.pageContext, A.configure, "tab-reset");
|
|
48
|
+
V(e3) ? e3.then((e4) => {
|
|
49
|
+
j.value = [];
|
|
50
|
+
}) : false !== e3 && (j.value = []);
|
|
51
51
|
}
|
|
52
|
-
return
|
|
52
|
+
return t(j, (e3) => {
|
|
53
53
|
e3 && e3.length > 0 ? e3.forEach((e4) => {
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
}) :
|
|
57
|
-
const
|
|
58
|
-
|
|
54
|
+
const n2 = document.getElementById("tab-" + e4);
|
|
55
|
+
n2 && (n2.style.display = "none");
|
|
56
|
+
}) : A.configure.items.forEach((e4) => {
|
|
57
|
+
const n2 = document.getElementById("tab-" + e4.code);
|
|
58
|
+
n2 && (n2.style.display = "");
|
|
59
59
|
});
|
|
60
60
|
}, { deep: true }), o(() => {
|
|
61
61
|
a(() => {
|
|
62
62
|
let e3 = [];
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}), k(null,
|
|
63
|
+
A.configure.items.forEach((n2) => {
|
|
64
|
+
n2.code && e3.push(document.getElementById("tab-" + n2.code));
|
|
65
|
+
}), k(null, A.pageContext, A.configure, { componentRef: O.value, tabsDom: e3, entity: A.pageContext.entity.data, pageData: A.pageContext.entity.page });
|
|
66
66
|
});
|
|
67
|
-
}),
|
|
67
|
+
}), _2({ thisRef: O, activeName: P, hiddenPanes: j, resetTab: H, hiddenTabPanes: function(e3) {
|
|
68
68
|
if (Array.isArray(e3)) {
|
|
69
|
-
const
|
|
69
|
+
const n2 = [];
|
|
70
70
|
e3.forEach((e4) => {
|
|
71
|
-
|
|
72
|
-
}),
|
|
73
|
-
}
|
|
71
|
+
j.value.includes(e4) || n2.push(e4);
|
|
72
|
+
}), n2.length > 0 && j.value.push(...n2);
|
|
73
|
+
} else console.warn("hiddenTabs expects an array of pane names.");
|
|
74
74
|
}, showTabPanes: function(e3) {
|
|
75
|
-
Array.isArray(e3)
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
});
|
|
75
|
+
Array.isArray(e3) ? e3.forEach((e4) => {
|
|
76
|
+
const n2 = j.value.indexOf(e4);
|
|
77
|
+
n2 > -1 && j.value.splice(n2, 1);
|
|
78
|
+
}) : console.warn("showTabs expects an array of pane names.");
|
|
79
79
|
}, showTabPanesOnly: function(e3) {
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
e3.includes(
|
|
83
|
-
}),
|
|
80
|
+
const n2 = [];
|
|
81
|
+
A.configure.items.forEach((t2) => {
|
|
82
|
+
e3.includes(t2.code) || n2.push(t2.code);
|
|
83
|
+
}), j.value = [...new Set(n2)];
|
|
84
84
|
}, hiddenTabPanesOnly: function(e3) {
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
e3.includes(
|
|
88
|
-
}),
|
|
89
|
-
} }), (
|
|
90
|
-
const
|
|
91
|
-
return
|
|
85
|
+
const n2 = [];
|
|
86
|
+
A.configure.items.forEach((t2) => {
|
|
87
|
+
e3.includes(t2.code) && n2.push(t2.code);
|
|
88
|
+
}), j.value = [...new Set(n2)];
|
|
89
|
+
} }), (n2, t2) => {
|
|
90
|
+
const o2 = i("el-button");
|
|
91
|
+
return l(), c(u(x), { ref_key: "thisRef", ref: O, modelValue: P.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e3) => P.value = e3), type: e2.configure.props.cardType, "tab-position": e2.configure.props.tabPosition, style: s(u(B)), class: r([u(z), "runtime-page-container-tabs-view"]), closable: e2.configure.props.closable, "before-leave": S, onTabClick: D, onTabChange: F, onTabRemove: L, onTabAdd: q, onEdit: G }, { default: p(() => [(l(true), f(g, null, m(A.configure.items, (n3, t3) => (l(), c(u(C), { key: t3, label: n3.label, name: n3.code, lazy: !!e2.configure.props.lazy }, { label: p(() => [n3.iconType && n3.iconValue ? (l(), c(u(E), { key: 0, iconType: n3.iconType, iconValue: n3.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : d("", true), b("span", { style: s(u(I)) }, y(u(N)(n3.label)), 5)]), default: p(() => [(e2.configure.props.isFullyRendered ?? 1) || n3.code === P.value ? (l(true), f(g, { key: 0 }, m(n3.items, (n4) => (l(), c(T, { key: n4.uuid, pageContext: e2.pageContext, configure: n4 }, null, 8, ["pageContext", "configure"]))), 128)) : d("", true)]), _: 2 }, 1032, ["label", "name", "lazy"]))), 128)), e2.configure.props.resetable ? (l(), c(u(C), { key: 0, disabled: "", name: "-1" }, { label: p(() => [e2.configure.props.resetable ? (l(), c(o2, { key: 0, type: "text", circle: "", onClick: v(H, ["stop"]) }, { default: p(() => [h(y(e2.configure.props.resetButtonName || "重置"), 1)]), _: 1 })) : d("", true)]), _: 1 })) : d("", true)]), _: 1 }, 8, ["modelValue", "type", "tab-position", "style", "class", "closable"]);
|
|
92
92
|
};
|
|
93
93
|
} });
|
|
94
94
|
export {
|
|
95
|
-
|
|
95
|
+
_ as default
|
|
96
96
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, computed as t, ref as
|
|
1
|
+
import { defineComponent as e, computed as t, ref as r, onMounted as a, watch as o, resolveComponent as l, createBlock as n, openBlock as u, normalizeStyle as i, normalizeClass as s, unref as c, withCtx as p, createElementBlock as m, createCommentVNode as f, toDisplayString as g } from "vue";
|
|
2
2
|
import d from "qrcode";
|
|
3
3
|
import v from "jsbarcode";
|
|
4
4
|
import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
|
|
@@ -12,7 +12,7 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
|
|
|
12
12
|
let k = y(q.pageContext, q.configure);
|
|
13
13
|
const A = t({ get: () => x(N, k), set(e3) {
|
|
14
14
|
h(N, k, e3);
|
|
15
|
-
} }), E = q.configure.runtime ? q.configure.runtime : {}, _ =
|
|
15
|
+
} }), E = q.configure.runtime ? q.configure.runtime : {}, _ = r(E.props ? E.props : {}), O = E.style, P = E.class, S = E.headerStyle, $ = r(""), I = r(null), Q = r(_.value.brCodeFormat ?? "CODE128"), V = r([]);
|
|
16
16
|
function F(e3) {
|
|
17
17
|
return h(N, k, e3);
|
|
18
18
|
}
|
|
@@ -22,31 +22,32 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
|
|
|
22
22
|
function L(e3) {
|
|
23
23
|
var t2;
|
|
24
24
|
"QR-code" === _.value.type ? (t2 = e3, d.toDataURL(t2, (e4, t3) => {
|
|
25
|
-
e4
|
|
25
|
+
e4 ? console.error(e4) : $.value = t3;
|
|
26
26
|
})) : function(e4) {
|
|
27
27
|
try {
|
|
28
28
|
v(I.value, e4, { format: Q.value });
|
|
29
29
|
} catch (e5) {
|
|
30
|
+
console.error("生成条形码时发生错误:", e5);
|
|
30
31
|
}
|
|
31
32
|
}(e3);
|
|
32
33
|
}
|
|
33
|
-
return
|
|
34
|
+
return a(() => {
|
|
34
35
|
_.value.generateRule && ("fixed" === _.value.generateRuleType ? (V.value = Array.from(_.value.generateRule.matchAll(/\$\{(\w+)\}/g), (e3) => e3[1]), V.value.forEach((e3) => {
|
|
35
|
-
|
|
36
|
+
o(() => q.pageContext.entity.data[e3], (e4, t2) => {
|
|
36
37
|
null != e4 && function() {
|
|
37
38
|
let e5 = true;
|
|
38
39
|
V.value.forEach((t3) => {
|
|
39
40
|
q.pageContext.entity.data[t3] || (e5 = false);
|
|
40
41
|
}), e5 && J(function(e6, t3) {
|
|
41
|
-
const
|
|
42
|
-
return e6.replace(
|
|
42
|
+
const r2 = /\$\{(\w+)\}/g;
|
|
43
|
+
return e6.replace(r2, (e7, r3) => t3.hasOwnProperty(r3) ? t3[r3] : e7);
|
|
43
44
|
}(_.value.generateRule, q.pageContext.entity.data));
|
|
44
45
|
}();
|
|
45
46
|
});
|
|
46
47
|
})) : w.get(window.$vueApp.config.globalProperties.baseAPI + "/dc/setting-barcode-models/by-code/" + _.value.generateRule).then((e3) => {
|
|
47
48
|
const t2 = JSON.parse(e3.barcodeModelItems);
|
|
48
49
|
t2.forEach((e4) => {
|
|
49
|
-
"-1" !== e4.propDbName && -1 !== e4.propDbName && (V.value.push(e4.propDbName),
|
|
50
|
+
"-1" !== e4.propDbName && -1 !== e4.propDbName && (V.value.push(e4.propDbName), o(() => q.pageContext.entity.data[e4.propDbName], (e5, r2) => {
|
|
50
51
|
if (null != e5) {
|
|
51
52
|
const e6 = b(t2, q.pageContext.entity.data);
|
|
52
53
|
e6 && J(e6);
|
|
@@ -54,12 +55,13 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
|
|
|
54
55
|
}));
|
|
55
56
|
});
|
|
56
57
|
}).catch((e3) => {
|
|
58
|
+
console.error("获取条码规则失败:", e3);
|
|
57
59
|
})), A.value && L(A.value);
|
|
58
60
|
}), D2({ getValue: function() {
|
|
59
61
|
return x(N, k);
|
|
60
62
|
}, setValue: F }), (e3, t2) => {
|
|
61
|
-
const
|
|
62
|
-
return
|
|
63
|
+
const r2 = l("el-form-item");
|
|
64
|
+
return u(), n(r2, { required: !!_.value.required, class: s(c(P)), "label-width": _.value.labelWidth, style: i(c(O)) }, { label: p(() => [_.value.tittleShow ? (u(), m("div", { key: 0, style: i({ ...c(S) }) }, g(c(R)(_.value.title)), 5)) : f("", true)]), default: p(() => ["QR-code" === _.value.type ? (u(), m("img", { key: 0, src: $.value }, null, 8, j)) : (u(), m("canvas", { key: 1, ref_key: "barcode", ref: I }, null, 512))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
63
65
|
};
|
|
64
66
|
} });
|
|
65
67
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
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
|
|
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 D } from "../../../../utils/events/event-util.js";
|
|
3
|
+
import { getBaseUrl as T, getListCode as E, 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 { isMobileBrowser as N, isPromise as P } from "agilebuilder-ui/src/utils/common-util";
|
|
6
6
|
import { getOperationButtons as B, popupToPage as F } from "../../../../utils/table-utils.js";
|
|
7
7
|
import H from "../../../../utils/eventBus.js";
|
|
8
|
-
import { getDefaultValue as
|
|
9
|
-
import { getSizeConfig as
|
|
8
|
+
import { getDefaultValue as M } from "../../../../utils/page-init-util.js";
|
|
9
|
+
import { getSizeConfig as U, caculateShowCondition as $, decomposeVariable as _ } from "../../../../utils/page-helper-util.js";
|
|
10
10
|
import { getComponentRefByCode as A } from "../../../../utils/global-refs.js";
|
|
11
11
|
import { getRowStyleUtil as L, getCellStyleUtil as G, getHeaderCellStyleUtil as z } from "../../chart/table/chart-table-util.js";
|
|
12
12
|
const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}, configure: {} }, emits: ["setSafeDeleteTableCode"], setup(e2, { expose: q2, emit: Q }) {
|
|
@@ -15,15 +15,16 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
15
15
|
const X = t({});
|
|
16
16
|
J.isTest ? X.value = Y.configure.runtime ? Y.configure.runtime : {} : J.tableRuntimes && J.tableRuntimes[K.uuid] && (K = JSON.parse(J.tableRuntimes[K.uuid].configure), X.value = K.runtime ? K.runtime : {});
|
|
17
17
|
const Z = X.value.style, ee = X.value.class, te = J.systemCode, ne = J.backendUrl, oe = K.props && K.props.dataOrigin && K.props.dataOrigin.tableName;
|
|
18
|
-
let ie =
|
|
18
|
+
let ie = T(J.backendUrl, J.isTest);
|
|
19
19
|
ie || (ie = window.$vueApp.config.globalProperties.baseURL);
|
|
20
20
|
const ae = t({}), le = [], re = t({});
|
|
21
21
|
re.value = function() {
|
|
22
|
-
var _a, _b, _c;
|
|
22
|
+
var _a, _b, _c, _d, _e2;
|
|
23
23
|
const e3 = J.systemCode, t2 = J.code;
|
|
24
24
|
let n2 = K.props && K.props.dataOrigin && "[]" !== K.props.dataOrigin.sqlFilterCondition ? K.props.dataOrigin.sqlFilterCondition : null;
|
|
25
25
|
null == n2 && (n2 = []);
|
|
26
|
-
const o2 = (_a = K.props) == null ? void 0 : _a.dataOrigin.principalLinkage, i2 = { isSql: true, optionTableHeight: 0, rowKeyProp: o2, extraParam: { beanName: J.beanName, functionCode: t2 + ".listData", tableName: oe, systemCode: e3, pageCode: J.code, pageVersion: J.version, isMobile: N() }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter:
|
|
26
|
+
const o2 = (_a = K.props) == null ? void 0 : _a.dataOrigin.principalLinkage, i2 = { isSql: true, optionTableHeight: 0, rowKeyProp: o2, extraParam: { beanName: J.beanName, functionCode: t2 + ".listData", tableName: oe, systemCode: e3, pageCode: J.code, pageVersion: J.version, isMobile: N() }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter: Se, esc: Ee }, indexContinuous: !(!K.props || !K.props.otherSettings) && K.props.otherSettings.serialNumberContinuous, initSearch: !K.props || false !== K.props.dataOrigin.initializationQuery, resizeHeight: Ne, pageCode: J.code, pageVersion: J.version, additionalParamMap: I(J), showOverflowTooltip: (_c = (_b = K == null ? void 0 : K.props) == null ? void 0 : _b.otherSettings) == null ? void 0 : _c.showOverflowTooltip, isEnableEnterEvent: K.props && K.props.otherSettings && K.props.otherSettings.isEnableEnterEvent, isWithDataPermission: !!(K.props && K.props.otherSettings && K.props.otherSettings.isWithDataPermission) && K.props.otherSettings.isWithDataPermission, pageDevMode: false, isWorkflowEntity: R(J), tableClass: ee, tableStyle: Z, pageContext: J, configureObj: K, backendUrl: ie, cellStyleRender: Qe, rowStyleRender: qe, titleStyleRender: Ye, validateEitConditions: Ze, showOperationCondition: null };
|
|
27
|
+
((_e2 = (_d = K == null ? void 0 : K.props) == null ? void 0 : _d.base) == null ? void 0 : _e2.showOperationCondition) && (i2.showOperationCondition = K.props.base.showOperationCondition);
|
|
27
28
|
return function(e4) {
|
|
28
29
|
var _a2;
|
|
29
30
|
((_a2 = K.props.highOrder) == null ? void 0 : _a2.mergeFields) && K.props.highOrder.mergeFields.length > 0 && (e4.mergeFields = K.props.highOrder.mergeFields.join(","));
|
|
@@ -59,8 +60,10 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
59
60
|
let e3 = ie + "/dsc/commons/list";
|
|
60
61
|
e3 && (e3 = O(e3, te, ne, J.isTest));
|
|
61
62
|
return e3;
|
|
62
|
-
}(), pe =
|
|
63
|
-
|
|
63
|
+
}(), pe = E(J.code, J.version, K.uuid), de = J.code + "_" + pe, fe = t([]), ge = J.entity.page, me = t({ data: [] }), ve = J.superGridItems, he = ve ? ve[K.uuid] : null;
|
|
64
|
+
console.log("superGridSetting1111===", ve, he);
|
|
65
|
+
const be = t(false), we = Q;
|
|
66
|
+
function Ce() {
|
|
64
67
|
K.props.linkages && K.props.linkages.length > 0 && (K.props.linkages.forEach((e3) => {
|
|
65
68
|
const t2 = _(e3.fieldName);
|
|
66
69
|
t2 && t2.length > 1 && le.push(t2[1]);
|
|
@@ -84,13 +87,13 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
84
87
|
}
|
|
85
88
|
}());
|
|
86
89
|
}
|
|
87
|
-
function
|
|
90
|
+
function Se({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
|
|
88
91
|
ye(null, null, n2, t2, e3);
|
|
89
92
|
}
|
|
90
93
|
function ye(e3, t2, n2, o2, i2) {
|
|
91
94
|
const a2 = ae.value.lineEditSave, l2 = K;
|
|
92
95
|
a2.props.base.tableUuid = l2.uuid, re.value.lineEditOptions.beforeSave = De, J.editData = n2, p({ pageContext: J, configureObj: a2 }).then((l3) => {
|
|
93
|
-
true === l3.canExecute && (re.value.lineEditOptions.saveRow =
|
|
96
|
+
true === l3.canExecute && (re.value.lineEditOptions.saveRow = Te, se.value.saveRow(i2, pe).then(() => {
|
|
94
97
|
d(J, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
|
|
95
98
|
}));
|
|
96
99
|
}).finally(() => {
|
|
@@ -113,7 +116,7 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
113
116
|
o2.props.base.tableUuid = i2.uuid;
|
|
114
117
|
return f(J, o2, { row: e3, columns: t2 });
|
|
115
118
|
}
|
|
116
|
-
function
|
|
119
|
+
function Te({ row: e3, columns: t2, dataTypeMap: n2, dynamicColumnInfo: o2, additionalParamMap: i2, mainDefaultValueColumns: a2 }) {
|
|
117
120
|
const l2 = ae.value.lineEditSave, r2 = K;
|
|
118
121
|
return l2.props.base.tableUuid = r2.uuid, new Promise((t3, n3) => {
|
|
119
122
|
const i3 = { tableName: r2.props.dataOrigin.tableName };
|
|
@@ -124,7 +127,7 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
124
127
|
});
|
|
125
128
|
});
|
|
126
129
|
}
|
|
127
|
-
function
|
|
130
|
+
function Ee({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
|
|
128
131
|
Oe(null, null, n2, t2, e3);
|
|
129
132
|
}
|
|
130
133
|
function Oe(e3, t2, n2, o2, i2) {
|
|
@@ -178,7 +181,7 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
178
181
|
}
|
|
179
182
|
}
|
|
180
183
|
function je(e3) {
|
|
181
|
-
if (!J.dataTypeMaps) return;
|
|
184
|
+
if (!J.dataTypeMaps) return void console.log("!pageContext['dataTypeMaps'] || !pageContext['dataTypeMaps'][tableName]");
|
|
182
185
|
const t2 = J.dataTypeMaps;
|
|
183
186
|
let n2 = [];
|
|
184
187
|
if (e3) for (var o2 in e3) {
|
|
@@ -197,7 +200,7 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
197
200
|
e4.propName = o2, e4.propDbName = o2, e4.dataType = t2[o2] ? t2[o2] : "TEXT", e4.operator = "EQ", e4.propValue = a2, et(e4, o2), e4.rightBracket = ")", e4.joinSign = "and", n2.push(e4);
|
|
198
201
|
}
|
|
199
202
|
}
|
|
200
|
-
se.value.toolbarRefresh(null, null, n2);
|
|
203
|
+
console.log("toolbarRefresh"), se.value.toolbarRefresh(null, null, n2);
|
|
201
204
|
}
|
|
202
205
|
function Ne(e3) {
|
|
203
206
|
const t2 = Pe();
|
|
@@ -208,7 +211,7 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
208
211
|
}
|
|
209
212
|
function Pe() {
|
|
210
213
|
if (!se.value) return;
|
|
211
|
-
const e3 =
|
|
214
|
+
const e3 = U(Y.pageContext, Y.configure);
|
|
212
215
|
if (e3) {
|
|
213
216
|
if (e3.isCalcHeight) {
|
|
214
217
|
let e4 = se.value.$el;
|
|
@@ -230,11 +233,11 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
230
233
|
fe.value = e3;
|
|
231
234
|
g(J, K, { selection: e3, row: t2 });
|
|
232
235
|
}
|
|
233
|
-
function
|
|
236
|
+
function Me(e3) {
|
|
234
237
|
fe.value = e3;
|
|
235
238
|
m(J, K, { selection: e3 });
|
|
236
239
|
}
|
|
237
|
-
function
|
|
240
|
+
function Ue(e3) {
|
|
238
241
|
v(J, K, { newSelection: e3 });
|
|
239
242
|
}
|
|
240
243
|
function $e(e3, t2, n2, o2) {
|
|
@@ -247,10 +250,10 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
247
250
|
w(J, K, { row: e3, column: t2, event: n2 });
|
|
248
251
|
}
|
|
249
252
|
function Le(e3, t2, n2) {
|
|
250
|
-
|
|
253
|
+
C(J, K, { row: e3, column: t2, event: n2 });
|
|
251
254
|
}
|
|
252
255
|
function Ge(e3, t2) {
|
|
253
|
-
|
|
256
|
+
S(J, K, { column: e3, event: t2 });
|
|
254
257
|
}
|
|
255
258
|
function ze() {
|
|
256
259
|
fe.value = [];
|
|
@@ -283,14 +286,14 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
283
286
|
}
|
|
284
287
|
n(() => {
|
|
285
288
|
const e3 = Xe();
|
|
286
|
-
se.value && e3 && e3.distanceToBottom && (se.value.tableHeight = e3.distanceToBottom - 110), Y.pageContext.pageRuntimeStyle, window.addEventListener("message", Fe), H.$on(de + "-close-component-page-dialog", function({ jumpInfo: e4, popEntity: t2, popPageCode: n2 }) {
|
|
289
|
+
se.value && e3 && e3.distanceToBottom && (se.value.tableHeight = e3.distanceToBottom - 110), Y.pageContext.pageRuntimeStyle && console.log("pageContext.pageHeight:", Y.pageContext.pageRuntimeStyle.height), window.addEventListener("message", Fe), H.$on(de + "-close-component-page-dialog", function({ jumpInfo: e4, popEntity: t2, popPageCode: n2 }) {
|
|
287
290
|
se.value.closePageDialog({ entity: t2, pageCode: n2, jumpInfo: e4 });
|
|
288
291
|
}), H.$on(de + "_close-dialog-get-entity", () => {
|
|
289
292
|
H.$emit(de + "_close-super-dialog");
|
|
290
293
|
}), H.$on(pe + "-pickFileDone", (e4) => {
|
|
291
|
-
se.value.pickFileDone(e4);
|
|
294
|
+
console.log("superPage5555---listCode---pickFileDone--listCode=", pe, "data=", e4), se.value.pickFileDone(e4);
|
|
292
295
|
}), H.$on(pe + "-scanDone", (e4) => {
|
|
293
|
-
se.value.scanDone(e4);
|
|
296
|
+
console.log("superPage5555---listCode---scanDone--listCode=", pe, "data=", e4), se.value.scanDone(e4);
|
|
294
297
|
}), re.value.formSetMaxHeight = Pe(), re.value && re.value.configureObj.props.base && re.value.configureObj.props.base.isSafeDelete && we("setSafeDeleteTableCode", re.value.extraParam.tableName);
|
|
295
298
|
}), o(() => Y.pageContext.searchFormData, (e3) => {
|
|
296
299
|
me.value.data = e3;
|
|
@@ -302,7 +305,7 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
302
305
|
const Xe = () => {
|
|
303
306
|
if (!ue.value) return null;
|
|
304
307
|
let e3 = ue.value.closest(".app-container");
|
|
305
|
-
if (!e3) return null;
|
|
308
|
+
if (!e3) return console.warn("未找到.app-container元素"), null;
|
|
306
309
|
const t2 = ue.value.getBoundingClientRect(), n2 = e3.getBoundingClientRect(), o2 = window.scrollY;
|
|
307
310
|
return { distanceToTop: t2.top + o2 - n2.top, distanceToBottom: n2.bottom - t2.top };
|
|
308
311
|
};
|
|
@@ -323,7 +326,7 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
323
326
|
return q2({ refresh: function(e3, t2, n2, o2) {
|
|
324
327
|
return se.value.refresh(e3, t2, n2, o2);
|
|
325
328
|
}, createRow: function() {
|
|
326
|
-
return se.value.createRow(pe, {}, { getDefaultValueFunc:
|
|
329
|
+
return se.value.createRow(pe, {}, { getDefaultValueFunc: M });
|
|
327
330
|
}, clearSelections: ze, getSelections: function() {
|
|
328
331
|
return fe.value;
|
|
329
332
|
}, getSelectionIds: function() {
|
|
@@ -373,7 +376,7 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
373
376
|
return (_a = se.value) == null ? void 0 : _a.getColumns();
|
|
374
377
|
} }), (e3, t2) => {
|
|
375
378
|
const n2 = a("super-grid");
|
|
376
|
-
return r(), l("div", { ref_key: "tableDivRef", ref: ue, id: u(pe) + "_tableDiv" }, [s(n2, { ref_key: "gridRef", ref: se, url: u(ce), options: re.value, code: u(pe), settings: u(he), "search-form-info": me.value, "list-toolbar-form-data": u(ge), isDialog: u(J).isDialog, onSelect: He, onSelectAll:
|
|
379
|
+
return r(), l("div", { ref_key: "tableDivRef", ref: ue, id: u(pe) + "_tableDiv" }, [s(n2, { ref_key: "gridRef", ref: se, url: u(ce), options: re.value, code: u(pe), settings: u(he), "search-form-info": me.value, "list-toolbar-form-data": u(ge), isDialog: u(J).isDialog, onSelect: He, onSelectAll: Me, onSelectionChange: Ue, onCellClick: $e, onCellDblclick: _e, onRowClick: Ae, onRowDblclick: Le, onHeaderClick: Ge, onRefresh: ze, onNewOpenGridDialog: u(F), onCanShowMobileSearch: We, onGridOnmounted: Ce }, null, 8, ["url", "options", "code", "settings", "search-form-info", "list-toolbar-form-data", "isDialog", "onNewOpenGridDialog"])], 8, W);
|
|
377
380
|
};
|
|
378
381
|
} });
|
|
379
382
|
export {
|