super-page-runtime 2.3.33 → 2.3.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/runtime/utils/barcode-util.js +5 -5
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +46 -47
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +1 -3
- package/dist/es/components/runtime/utils/charts/chart-util.js +44 -46
- package/dist/es/components/runtime/utils/events/event-util.js +18 -18
- package/dist/es/components/runtime/utils/events/print-label.js +0 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +708 -720
- package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
- package/dist/es/components/runtime/utils/form/scan-util.js +3 -4
- package/dist/es/components/runtime/utils/page-helper-util.js +219 -219
- package/dist/es/components/runtime/utils/page-init-util.js +124 -127
- 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/chart/column-line/column-line-runtime.vue2.js +10 -14
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -6
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +12 -13
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +14 -15
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +14 -15
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +15 -16
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +67 -67
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +22 -24
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +62 -62
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +20 -22
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +117 -120
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +39 -40
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +26 -26
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +52 -52
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +6 -6
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -10
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +13 -13
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +5 -5
- package/dist/es/components/runtime/views/home-chart.vue.js +4 -4
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +4 -4
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +182 -182
- package/dist/es/style.css +76 -76
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as e, ref as r, onMounted as
|
|
2
|
-
import { getCustomTheme as f, initChartOption as
|
|
3
|
-
import { getChartDatasFromPage as
|
|
1
|
+
import { defineComponent as e, ref as r, onMounted as t, watch as o, createElementBlock as a, openBlock as n, normalizeClass as s, normalizeStyle as u, unref as i, withDirectives as c, createVNode as p, vShow as m } from "vue";
|
|
2
|
+
import { getCustomTheme as f, initChartOption as h, exportCommonChart as l } from "../../../../utils/charts/chart-util.js";
|
|
3
|
+
import { getChartDatasFromPage as g, updateChartDatasources as d, monitorFieldChange as x } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { updateChartOption as C } from "../../../../utils/charts/chart-gauge-util.js";
|
|
5
5
|
import v from "../common/common-chart-header.vue.js";
|
|
6
6
|
import { use as y } from "echarts/core";
|
|
@@ -10,26 +10,25 @@ import { GridComponent as V, TitleComponent as _, TooltipComponent as j, Toolbox
|
|
|
10
10
|
import I from "vue-echarts";
|
|
11
11
|
const k = e({ __name: "gauge-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: k2 }) {
|
|
12
12
|
y([R, b, V, _, j, w]);
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const e3 =
|
|
13
|
+
const A = e2, H = r(null), O = r(), z = r(null), D = A.configure.runtime ? A.configure.runtime : {}, F = D.style, P = D.class, S = D.dataConfig, T = D.headerInfo ? D.headerInfo : {}, q = D.chartOption, B = A.configure.props ? A.configure.props : {}, E = f(B.customTheme);
|
|
14
|
+
h(A.configure, q), t(() => {
|
|
15
|
+
const e3 = g(A.pageContext, A.configure);
|
|
16
16
|
e3 && L(e3);
|
|
17
17
|
});
|
|
18
18
|
let G = T.groupValue;
|
|
19
19
|
function J() {
|
|
20
|
-
S
|
|
20
|
+
S && d(A.pageContext, [S], T.drillParams);
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
o(T, () => {
|
|
23
23
|
G != T.groupValue && (G = T.groupValue, S && (S.services[0].groupValue = T.groupValue), J());
|
|
24
24
|
});
|
|
25
25
|
const K = T.monitorFields;
|
|
26
26
|
function L(e3) {
|
|
27
|
-
|
|
28
|
-
e3.hasRender = true, console.log("gauge resultData", e3), C(O.pageContext, O.configure, q, e3), console.log("chartOption", q), D.value && D.value.setOption(q, true);
|
|
27
|
+
e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender ? e3.hasRender = true : (e3.hasRender = true, C(A.pageContext, A.configure, q, e3), O.value && O.value.setOption(q, true));
|
|
29
28
|
}
|
|
30
|
-
return x(
|
|
31
|
-
return
|
|
32
|
-
} }), (r2,
|
|
29
|
+
return x(A.pageContext, K, J), k2({ updateChartDatas: L, exportChart: function() {
|
|
30
|
+
return l(O.value, T);
|
|
31
|
+
} }), (r2, t2) => (n(), a("div", { style: u(i(F)), class: s([i(P), "amb-widget-chart amb-widget-flex amb-chart-container"]), ref_key: "thisRef", ref: H }, [c(p(v, { ref_key: "headerRef", ref: z, headerInfo: i(T), configure: e2.configure, pageContext: e2.pageContext, class: "amb-chart-header" }, null, 8, ["headerInfo", "configure", "pageContext"]), [[m, i(T).showHeader || e2.pageContext.showHomepageSearch]]), p(i(I), { ref_key: "chartRef", ref: O, class: "amb-chart-content", theme: i(E), option: i(q), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
33
32
|
} });
|
|
34
33
|
export {
|
|
35
34
|
k as default
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as r, onMounted as o, watch as t, createElementBlock as a, openBlock as n, normalizeClass as u, normalizeStyle as
|
|
1
|
+
import { defineComponent as e, ref as r, onMounted as o, watch as t, createElementBlock as a, openBlock as n, normalizeClass as u, normalizeStyle as i, unref as l, withDirectives as c, createVNode as s, vShow as p } from "vue";
|
|
2
2
|
import { getCustomTheme as f, initChartOption as g, monitorChartClickToVariable as h, clearChartSelected as m, exportCommonChart as d } from "../../../../utils/charts/chart-util.js";
|
|
3
3
|
import { updateChartOption as v } from "../../../../utils/charts/chart-pie-util.js";
|
|
4
4
|
import { doClickJumpPageEvent as x } from "../../../../utils/events/event-util.js";
|
|
@@ -9,39 +9,38 @@ import { CanvasRenderer as y } from "echarts/renderers";
|
|
|
9
9
|
import { PieChart as D } from "echarts/charts";
|
|
10
10
|
import { GridComponent as V, LegendComponent as _, TitleComponent as w, TooltipComponent as I, ToolboxComponent as P } from "echarts/components";
|
|
11
11
|
import E from "vue-echarts";
|
|
12
|
-
const
|
|
12
|
+
const A = e({ __name: "pie-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: A2 }) {
|
|
13
13
|
b([y, D, V, _, w, I, P]);
|
|
14
|
-
const
|
|
14
|
+
const H = e2, O = r(null), S = r(), T = r(null), U = H.configure.props ? H.configure.props.enableDrill : null, z = H.configure.props ? H.configure.props.drillEndTrigger : null, F = H.configure.props ? H.configure.props.linkPage : null, q = H.configure.runtime ? H.configure.runtime : {}, B = q.style, G = q.class, J = q.dataConfig, K = q.headerInfo ? q.headerInfo : {}, L = q.chartOption, M = H.configure.props ? H.configure.props : {}, N = f(M.customTheme);
|
|
15
15
|
function Q(e3) {
|
|
16
16
|
"clearDrill" == z ? T.value && T.value.closeDrill && T.value.closeDrill(0) : "clickEvent" == z && W();
|
|
17
17
|
}
|
|
18
18
|
function W() {
|
|
19
|
-
F && F.jumpPageUrl && x(
|
|
19
|
+
F && F.jumpPageUrl && x(H.pageContext, H.configure, void 0);
|
|
20
20
|
}
|
|
21
|
-
g(
|
|
22
|
-
const e3 = C(
|
|
21
|
+
g(H.configure, L), o(() => {
|
|
22
|
+
const e3 = C(H.pageContext, H.configure);
|
|
23
23
|
e3 && $(e3), S.value && (U || F && F.jumpPageUrl) && S.value.chart.on("click", function(e4) {
|
|
24
|
-
U ? T.value && T.value.drill && T.value.drill(e4,
|
|
25
|
-
}), !U &&
|
|
24
|
+
U ? T.value && T.value.drill && T.value.drill(e4, H.configure.cacheDatas) : W();
|
|
25
|
+
}), !U && H.configure.clickSet && S.value && h(H.pageContext, H.configure, S.value.chart);
|
|
26
26
|
});
|
|
27
27
|
let X = K.groupValue;
|
|
28
28
|
function Y(e3) {
|
|
29
|
-
J
|
|
29
|
+
J && (true !== e3 && (J.autoRefresh = true), R(H.pageContext, [J], K.drillParams));
|
|
30
30
|
}
|
|
31
31
|
t(K, () => {
|
|
32
32
|
X != K.groupValue && (X = K.groupValue, J && (J.services[0].groupValue = K.groupValue), Y(false));
|
|
33
33
|
});
|
|
34
34
|
const Z = K.monitorFields;
|
|
35
35
|
function $(e3) {
|
|
36
|
-
|
|
37
|
-
e3.hasRender = true, J.autoRefresh || (X = e3.groupValue, X && "checkbox" !== K.groupComponent && (X = X.join(",")), K.groupValue = X), J.autoRefresh && U || m(A.pageContext, A.configure, S.value.chart), J.autoRefresh = false, v(A.pageContext, A.configure, L, e3), console.log("chartOption--pie", L), S.value && S.value.setOption(L, true);
|
|
36
|
+
e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender ? e3.hasRender = true : (e3.hasRender = true, J.autoRefresh || (X = e3.groupValue, X && "checkbox" !== K.groupComponent && (X = X.join(",")), K.groupValue = X), J.autoRefresh && U || m(H.pageContext, H.configure, S.value.chart), J.autoRefresh = false, v(H.pageContext, H.configure, L, e3), S.value && S.value.setOption(L, true));
|
|
38
37
|
}
|
|
39
|
-
return j(
|
|
38
|
+
return j(H.pageContext, Z, () => {
|
|
40
39
|
Y(true);
|
|
41
|
-
}),
|
|
40
|
+
}), A2({ updateChartDatas: $, exportChart: function() {
|
|
42
41
|
return d(S.value, K);
|
|
43
|
-
} }), (r2, o2) => (n(), a("div", { style: l(
|
|
42
|
+
} }), (r2, o2) => (n(), a("div", { style: i(l(B)), class: u([l(G), "amb-widget-chart amb-widget-flex amb-chart-container"]), ref_key: "thisRef", ref: O }, [c(s(k, { ref_key: "headerRef", ref: T, headerInfo: l(K), configure: e2.configure, pageContext: e2.pageContext, onDrillEnd: Q, class: "amb-chart-header" }, null, 8, ["headerInfo", "configure", "pageContext"]), [[p, l(K).showHeader || e2.pageContext.showHomepageSearch]]), s(l(E), { ref_key: "chartRef", ref: S, class: "amb-chart-content", theme: l(N), option: l(L), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
44
43
|
} });
|
|
45
44
|
export {
|
|
46
|
-
|
|
45
|
+
A as default
|
|
47
46
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as e, ref as r, onMounted as
|
|
2
|
-
import { getCustomTheme as f, initChartOption as
|
|
1
|
+
import { defineComponent as e, ref as r, onMounted as t, watch as o, createElementBlock as a, openBlock as n, normalizeClass as s, normalizeStyle as u, unref as i, withDirectives as c, createVNode as p, vShow as m } from "vue";
|
|
2
|
+
import { getCustomTheme as f, initChartOption as h, exportCommonChart as l } from "../../../../utils/charts/chart-util.js";
|
|
3
3
|
import { getChartDatasFromPage as g, updateChartDatasources as d, monitorFieldChange as x } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { updateChartOption as C } from "../../../../utils/charts/chart-radar-util.js";
|
|
5
5
|
import v from "../common/common-chart-header.vue.js";
|
|
@@ -7,30 +7,29 @@ import { use as y } from "echarts/core";
|
|
|
7
7
|
import { CanvasRenderer as R } from "echarts/renderers";
|
|
8
8
|
import { RadarChart as b } from "echarts/charts";
|
|
9
9
|
import { GridComponent as V, TitleComponent as _, TooltipComponent as j, ToolboxComponent as w, LegendComponent as I } from "echarts/components";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
10
|
+
import k from "vue-echarts";
|
|
11
|
+
const A = e({ __name: "radar-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: A2 }) {
|
|
12
12
|
y([R, b, V, _, j, w, I]);
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const e3 = g(
|
|
13
|
+
const H = e2, O = r(null), z = r(), D = r(null), F = H.configure.runtime ? H.configure.runtime : {}, P = F.style, S = F.class, T = F.dataConfig, q = F.headerInfo ? F.headerInfo : {}, B = F.chartOption, E = H.configure.props ? H.configure.props : {}, G = f(E.customTheme);
|
|
14
|
+
h(H.configure, B), t(() => {
|
|
15
|
+
const e3 = g(H.pageContext, H.configure);
|
|
16
16
|
e3 && M(e3);
|
|
17
17
|
});
|
|
18
18
|
let J = q.groupValue;
|
|
19
19
|
function K() {
|
|
20
|
-
T
|
|
20
|
+
T && d(H.pageContext, [T], q.drillParams);
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
o(q, () => {
|
|
23
23
|
J != q.groupValue && (J = q.groupValue, T && (T.services[0].groupValue = q.groupValue), K());
|
|
24
24
|
});
|
|
25
25
|
const L = q.monitorFields;
|
|
26
26
|
function M(e3) {
|
|
27
|
-
|
|
28
|
-
e3.hasRender = true, C(A.pageContext, A.configure, B, e3), console.log("chartOption", B), z.value && z.value.setOption(B, true);
|
|
27
|
+
e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender ? e3.hasRender = true : (e3.hasRender = true, C(H.pageContext, H.configure, B, e3), z.value && z.value.setOption(B, true));
|
|
29
28
|
}
|
|
30
|
-
return x(
|
|
31
|
-
return
|
|
32
|
-
} }), (r2,
|
|
29
|
+
return x(H.pageContext, L, K), A2({ updateChartDatas: M, exportChart: function() {
|
|
30
|
+
return l(z.value, q);
|
|
31
|
+
} }), (r2, t2) => (n(), a("div", { style: u(i(P)), class: s([i(S), "amb-widget-chart amb-widget-flex amb-chart-container"]), ref_key: "thisRef", ref: O }, [c(p(v, { ref_key: "headerRef", ref: D, headerInfo: i(q), configure: e2.configure, pageContext: e2.pageContext, class: "amb-chart-header" }, null, 8, ["headerInfo", "configure", "pageContext"]), [[m, i(q).showHeader || e2.pageContext.showHomepageSearch]]), p(i(k), { ref_key: "chartRef", ref: z, class: "amb-chart-content", theme: i(G), option: i(B), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
33
32
|
} });
|
|
34
33
|
export {
|
|
35
|
-
|
|
34
|
+
A as default
|
|
36
35
|
};
|
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
import { defineComponent as e, ref as r, onMounted as t, watch as o, createElementBlock as a, openBlock as n, normalizeClass as s, normalizeStyle as c, unref as
|
|
2
|
-
import { getCustomTheme as f, initChartOption as
|
|
1
|
+
import { defineComponent as e, ref as r, onMounted as t, watch as o, createElementBlock as a, openBlock as n, normalizeClass as s, normalizeStyle as c, unref as u, withDirectives as i, createVNode as p, vShow as m } from "vue";
|
|
2
|
+
import { getCustomTheme as f, initChartOption as h, exportCommonChart as l } from "../../../../utils/charts/chart-util.js";
|
|
3
3
|
import { getChartDatasFromPage as g, updateChartDatasources as d, monitorFieldChange as x } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { updateChartOption as C } from "../../../../utils/charts/chart-scatter-util.js";
|
|
5
5
|
import v from "../common/common-chart-header.vue.js";
|
|
6
6
|
import { use as y } from "echarts/core";
|
|
7
7
|
import { CanvasRenderer as R } from "echarts/renderers";
|
|
8
8
|
import { ScatterChart as b } from "echarts/charts";
|
|
9
|
-
import { GridComponent as V, LegendComponent as _, TitleComponent as j, TooltipComponent as w, ToolboxComponent as I, DataZoomComponent as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
y([R, b, V, _, j, w, I,
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const e3 = g(
|
|
9
|
+
import { GridComponent as V, LegendComponent as _, TitleComponent as j, TooltipComponent as w, ToolboxComponent as I, DataZoomComponent as k } from "echarts/components";
|
|
10
|
+
import A from "vue-echarts";
|
|
11
|
+
const H = e({ __name: "scatter-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: H2 }) {
|
|
12
|
+
y([R, b, V, _, j, w, I, k]);
|
|
13
|
+
const O = e2, z = r(null), D = r(), F = r(null), P = O.configure.runtime ? O.configure.runtime : {}, S = P.style, T = P.class, q = P.dataConfig, B = P.headerInfo ? P.headerInfo : {}, E = P.chartOption, G = O.configure.props ? O.configure.props : {}, J = f(G.customTheme);
|
|
14
|
+
h(O.configure, E), t(() => {
|
|
15
|
+
const e3 = g(O.pageContext, O.configure);
|
|
16
16
|
e3 && N(e3);
|
|
17
17
|
});
|
|
18
18
|
let K = B.groupValue;
|
|
19
19
|
function L() {
|
|
20
|
-
q
|
|
20
|
+
q && d(O.pageContext, [q], B.drillParams);
|
|
21
21
|
}
|
|
22
22
|
o(B, () => {
|
|
23
23
|
K != B.groupValue && (K = B.groupValue, q && (q.services[0].groupValue = B.groupValue), L());
|
|
24
24
|
});
|
|
25
25
|
const M = B.monitorFields;
|
|
26
26
|
function N(e3) {
|
|
27
|
-
|
|
28
|
-
e3.hasRender = true, C(H.pageContext, H.configure, E, e3), console.log("chartOption scatter", E), D.value && D.value.setOption(E, true);
|
|
27
|
+
e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender ? e3.hasRender = true : (e3.hasRender = true, C(O.pageContext, O.configure, E, e3), D.value && D.value.setOption(E, true));
|
|
29
28
|
}
|
|
30
|
-
return x(
|
|
31
|
-
return
|
|
32
|
-
} }), (r2, t2) => (n(), a("div", { style: c(
|
|
29
|
+
return x(O.pageContext, M, L), H2({ updateChartDatas: N, exportChart: function() {
|
|
30
|
+
return l(D.value, B);
|
|
31
|
+
} }), (r2, t2) => (n(), a("div", { style: c(u(S)), class: s([u(T), "amb-widget-chart amb-widget-flex amb-chart-container"]), ref_key: "thisRef", ref: z }, [i(p(v, { ref_key: "headerRef", ref: F, headerInfo: u(B), configure: e2.configure, pageContext: e2.pageContext, class: "amb-chart-header" }, null, 8, ["headerInfo", "configure", "pageContext"]), [[m, u(B).showHeader || e2.pageContext.showHomepageSearch]]), p(u(A), { ref_key: "chartRef", ref: D, class: "amb-chart-content", theme: u(J), option: u(E), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
33
32
|
} });
|
|
34
33
|
export {
|
|
35
|
-
|
|
34
|
+
H as default
|
|
36
35
|
};
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { defineComponent as e, ref as o, computed as r, onMounted as
|
|
1
|
+
import { defineComponent as e, ref as o, computed as r, onMounted as t, watch as n, resolveComponent as i, createElementBlock as a, openBlock as u, normalizeClass as p, normalizeStyle as l, unref as s, withDirectives as c, createVNode as g, createBlock as f, createCommentVNode as m, vShow as d, withCtx as h, Fragment as v, renderList as y, h as C } from "vue";
|
|
2
2
|
import b from "../common/common-chart-header.vue.js";
|
|
3
3
|
import { getSizeConfig as x, getChartDatasFromPage as O, getValueFromVariable as S, caculateShowCondition as w, isPromise as E, setValueForVariableName as j, updateChartDatasourcesByComponent as $ } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleChartEvent as F, getCustomFunc as k } from "../../../../utils/events/event-util.js";
|
|
5
5
|
import N from "./group-column.vue.js";
|
|
6
6
|
import I from "./normal-column.vue.js";
|
|
7
7
|
import R from "./table-pageination.vue.js";
|
|
8
|
-
import { getSummaryTitleColumn as T, getSummaryDataColumn as H, rowDataToColumn as D, getColumnToRowTableConfig as J, colDataToRow as U, computeFormula as
|
|
8
|
+
import { getSummaryTitleColumn as T, getSummaryDataColumn as H, rowDataToColumn as D, getColumnToRowTableConfig as J, colDataToRow as U, computeFormula as _, getNewColumnConfig as z, summaryStatistics as A, replacePlaceholders as P, getIndexColumn as V, getHeaderCellStyleUtil as G, getRowStyleUtil as K, getCellStyleUtil as L, mergeRowByProperty as q, formatColContent as B } from "./chart-table-util.js";
|
|
9
9
|
import { deepCopy as M } from "../../../../utils/common-util.js";
|
|
10
10
|
const Q = e({ __name: "table-runtime", props: { configure: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) } }, setup(e2, { expose: Q2 }) {
|
|
11
11
|
var _a;
|
|
12
|
-
const W = e2, X = W.configure.runtime ? W.configure.runtime : {}, Y = X.style, Z = X.class, ee = X.dataConfig, oe = X.headerInfo ? X.headerInfo : {}, re = o(null),
|
|
12
|
+
const W = e2, X = W.configure.runtime ? W.configure.runtime : {}, Y = X.style, Z = X.class, ee = X.dataConfig, oe = X.headerInfo ? X.headerInfo : {}, re = o(null), te = o(X.props.isEnableGroupHeader), ne = o([]), ie = o([]), ae = o([]), ue = o([]), pe = o({}), le = o(false), se = o({}), ce = o({}), ge = o({}), fe = [], me = o({}), de = o({}), he = o(null), ve = r(() => te.value ? ue.value.filter((e3) => !e3.isLeaf || De(pe[e3.columnUuid])) : ie.value.filter((e3) => De(e3))), ye = o(0);
|
|
13
13
|
let Ce = [];
|
|
14
14
|
if (!W.configure.props.modelCustom) {
|
|
15
|
-
if (
|
|
15
|
+
if (te.value) {
|
|
16
16
|
const e3 = [];
|
|
17
17
|
W.configure.props.groupHeaders.forEach((o2) => {
|
|
18
18
|
o2.parentUuid || e3.push(o2);
|
|
19
19
|
}), e3.sort((e4, o2) => e4.displayOrder - o2.displayOrder), ue.value = e3, function() {
|
|
20
20
|
if (W.configure.props.base.showIndex) {
|
|
21
21
|
ue.value.unshift({ columnUuid: "$index", displayOrder: 0, isLeaf: true, prop: "$index", titleText: "序号", uuid: "$index" });
|
|
22
|
-
const e4 =
|
|
23
|
-
e4 && (
|
|
22
|
+
const e4 = V();
|
|
23
|
+
e4 && (pe.value.$index = e4);
|
|
24
24
|
}
|
|
25
25
|
}();
|
|
26
26
|
} else ie.value = W.configure.items;
|
|
27
27
|
(_a = W.configure.items) == null ? void 0 : _a.forEach((e3) => {
|
|
28
|
-
|
|
28
|
+
pe.value[e3.uuid] = e3, Object.keys(e3.style).length > 0 && (me.value[e3.props.base.prop] = { cellStyle: e3.style, titleStyle: e3.titleStyle }), e3.formula && "" !== e3.formula.trim() && (de.value[e3.props.base.prop] = e3.formula);
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
le.value = W.configure.props.base.showSummary, (le.value || W.configure.props.highOrder.groupField && W.configure.props.highOrder.groupField.length > 0) && (se.value = T(W.configure), le.value && (ce.value = H(W.configure, "table")), W.configure.props.highOrder.groupField && W.configure.props.highOrder.groupField.length > 0 && (ge.value = H(W.configure, "group")));
|
|
32
32
|
let be = 300, xe = x(W.pageContext, W.configure);
|
|
33
33
|
function Oe(e3) {
|
|
34
|
-
if (e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender) return e3.hasRender = true
|
|
35
|
-
const o2 =
|
|
34
|
+
if (e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender) return void (e3.hasRender = true);
|
|
35
|
+
const o2 = te.value ? ue.value : ve;
|
|
36
36
|
F(W.pageContext, W.configure, "beforeUpdateChart", o2, { resultData: e3 }), function(e4) {
|
|
37
37
|
var _a2;
|
|
38
38
|
Je(e4), "service" === W.configure.props.dataOrigin.dataSource && e4.result ? Ce = e4.result[W.configure.props.dataOrigin.service.serviceDataField] : "variable" === W.configure.props.dataOrigin.dataSource && (Ce = S(W.pageContext.entity, W.configure.props.dataOrigin.variable));
|
|
@@ -41,9 +41,9 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
41
41
|
if ("fix" === W.configure.props.dataOrigin.itemNumSource) o3 = W.configure.props.dataOrigin.itemNumFix;
|
|
42
42
|
else if ("variable" === W.configure.props.dataOrigin.itemNumSource) {
|
|
43
43
|
o3 = Number(S(W.pageContext.entity, W.configure.props.dataOrigin.itemNumVariable));
|
|
44
|
-
const r2 = W.configure.props.dataOrigin.itemNumVariable.match(/\${(.*?)}/),
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
const r2 = W.configure.props.dataOrigin.itemNumVariable.match(/\${(.*?)}/), t2 = r2 ? r2[1].split(".") : [], i2 = JSON.parse(JSON.stringify(Ce));
|
|
45
|
+
n(() => t2.reduce((e5, o4) => e5[o4], W.pageContext.entity), (o4) => {
|
|
46
|
+
Se(o4, i2, e4);
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
Se(o3, Ce, e4);
|
|
@@ -53,21 +53,21 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
53
53
|
function Se(e3, o2, r2) {
|
|
54
54
|
var _a2;
|
|
55
55
|
if (e3 && e3 < o2.length) {
|
|
56
|
-
let
|
|
57
|
-
if (((_a2 = W.configure.props.dataOrigin.limitCountColumns) == null ? void 0 : _a2.length) > 0)
|
|
56
|
+
let t2 = [];
|
|
57
|
+
if (((_a2 = W.configure.props.dataOrigin.limitCountColumns) == null ? void 0 : _a2.length) > 0) t2 = W.configure.props.dataOrigin.limitCountColumns;
|
|
58
58
|
else {
|
|
59
59
|
ie.value.filter((e4) => "number" === e4.props.base.dataType).forEach((e4) => {
|
|
60
|
-
|
|
60
|
+
t2.push(e4.props.base.prop);
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
if ((
|
|
64
|
-
const r3 = o2.slice(e3 - 1, o2.length),
|
|
63
|
+
if ((t2 == null ? void 0 : t2.length) > 0) {
|
|
64
|
+
const r3 = o2.slice(e3 - 1, o2.length), n2 = {};
|
|
65
65
|
let i2 = ie.value[0].props.base.prop;
|
|
66
66
|
"$index" === i2 && (i2 = ie.value[1].props.base.prop), r3.forEach((e4) => {
|
|
67
|
-
|
|
68
|
-
void 0 ===
|
|
67
|
+
t2.forEach((o3) => {
|
|
68
|
+
void 0 === n2[o3] && (n2[o3] = 0), n2[o3] = n2[o3] + e4[o3];
|
|
69
69
|
});
|
|
70
|
-
}), o2.length > e3 && (o2 = o2.slice(0, e3 - 1)),
|
|
70
|
+
}), o2.length > e3 && (o2 = o2.slice(0, e3 - 1)), n2[i2] = W.configure.props.dataOrigin.overItemAlias, o2.push(n2);
|
|
71
71
|
}
|
|
72
72
|
we(o2, r2);
|
|
73
73
|
} else we(o2, r2);
|
|
@@ -75,32 +75,32 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
75
75
|
function we(e3, o2) {
|
|
76
76
|
var _a2, _b, _c, _d, _e, _f, _g;
|
|
77
77
|
if (Ee("rowToColumn")) {
|
|
78
|
-
if (ae.value = JSON.parse(JSON.stringify(W.configure.items)), e3 = D(e3, W.configure, ae.value), !
|
|
78
|
+
if (ae.value = JSON.parse(JSON.stringify(W.configure.items)), e3 = D(e3, W.configure, ae.value), !te.value) {
|
|
79
79
|
const o3 = function(e4, o4, r2) {
|
|
80
|
-
const
|
|
80
|
+
const t2 = W.configure.props.dataOrigin.rowToColumn.titleColumns, n2 = W.configure.props.dataOrigin.rowToColumn.dataColumns, i2 = e4.props.dataOrigin.groupField;
|
|
81
81
|
if ((!i2 || 0 === i2.length) && r2.length > 0) {
|
|
82
82
|
const e5 = [];
|
|
83
|
-
return e5.push(
|
|
83
|
+
return e5.push(z("$GroupColumn", W.configure.props.dataOrigin.rowToColumn.firstColumnTitle, 0, "string")), Object.keys(r2[0]).forEach((o5, r3) => {
|
|
84
84
|
if ("$GroupColumn" === o5) return;
|
|
85
|
-
const
|
|
86
|
-
e5.push(
|
|
85
|
+
const t3 = z(o5, o5, r3 + 1, "string");
|
|
86
|
+
e5.push(t3);
|
|
87
87
|
}), e5;
|
|
88
88
|
}
|
|
89
89
|
{
|
|
90
|
-
const e5 = [...o4].filter((e6) => !
|
|
90
|
+
const e5 = [...o4].filter((e6) => !t2.includes(e6.props.base.prop) && !n2.includes(e6.props.base.prop)), i3 = new RegExp(`(${n2.join("|")})$`), a2 = /* @__PURE__ */ new Set();
|
|
91
91
|
return r2.forEach((e6) => {
|
|
92
92
|
Object.keys(e6).forEach((e7) => {
|
|
93
|
-
if (
|
|
93
|
+
if (n2.some((o5) => e7.includes(o5))) {
|
|
94
94
|
const o5 = e7.split(i3)[0];
|
|
95
95
|
a2.add(o5);
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
}), a2.forEach((o5) => {
|
|
99
|
-
|
|
99
|
+
n2.forEach((t3) => {
|
|
100
100
|
var _a3;
|
|
101
|
-
let
|
|
102
|
-
null ==
|
|
103
|
-
const i4 =
|
|
101
|
+
let n3 = (_a3 = ie.value.find((e6) => e6.props.base.prop === t3)) == null ? void 0 : _a3.props.base.name;
|
|
102
|
+
null == n3 && (n3 = "");
|
|
103
|
+
const i4 = z(`${o5}${t3}`, `${o5}${n3}`, e5.length + 1, "number" == typeof r2[0][`${o5}${t3}`] ? "number" : "string");
|
|
104
104
|
e5.push(i4);
|
|
105
105
|
});
|
|
106
106
|
}), e5;
|
|
@@ -108,7 +108,7 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
108
108
|
}(W.configure, ae.value, e3);
|
|
109
109
|
ie.value = o3;
|
|
110
110
|
}
|
|
111
|
-
} else Ee("columnToRow") && (
|
|
111
|
+
} else Ee("columnToRow") && (te.value || (ie.value = J(W.configure)), e3 = U(e3, W.configure));
|
|
112
112
|
if ((_b = (_a2 = W.configure.props) == null ? void 0 : _a2.dataOrigin) == null ? void 0 : _b.dataFormatting) {
|
|
113
113
|
const o3 = k(W.pageContext, W.configure.props.dataOrigin.dataFormatting);
|
|
114
114
|
if (o3) {
|
|
@@ -116,14 +116,14 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
116
116
|
r2 && (e3 = r2);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
if (Object.keys(de.value).length > 0 && e3 && e3.length > 0 &&
|
|
120
|
-
"frontend" === W.configure.pageination.type ? (ye.value = Ce.length, Te(1, W.configure.pageination.pageSize)) : "backend" === W.configure.pageination.type && (
|
|
121
|
-
}(o2) :
|
|
119
|
+
if (Object.keys(de.value).length > 0 && e3 && e3.length > 0 && _(de.value, e3, W.pageContext.entity), ((_c = W.configure.pageination) == null ? void 0 : _c.enable) ? function(e4) {
|
|
120
|
+
"frontend" === W.configure.pageination.type ? (ye.value = Ce.length, Te(1, W.configure.pageination.pageSize)) : "backend" === W.configure.pageination.type && (ne.value = Ce, W.configure.pageination.totalFrom && (ye.value = e4.result[W.configure.pageination.totalFrom]));
|
|
121
|
+
}(o2) : ne.value = e3, ((_e = (_d = W.configure.props) == null ? void 0 : _d.highOrder) == null ? void 0 : _e.groupField) && ((_g = (_f = W.configure.props) == null ? void 0 : _f.highOrder) == null ? void 0 : _g.groupField.length) > 0) {
|
|
122
122
|
const e4 = W.configure.props.highOrder.groupField;
|
|
123
|
-
|
|
123
|
+
ne.value = function(e5, o3) {
|
|
124
124
|
var _a3, _b2;
|
|
125
125
|
if (0 === ge.value.length) return e5;
|
|
126
|
-
const r2 = [],
|
|
126
|
+
const r2 = [], t2 = (_a3 = W.configure.items) == null ? void 0 : _a3.filter((e6) => o3.includes(e6.props.base.prop)), n2 = (_b2 = W.configure.items) == null ? void 0 : _b2.filter((e6) => true === e6.props.base.groupSummary), i2 = {};
|
|
127
127
|
e5.forEach((e6) => {
|
|
128
128
|
const r3 = o3.map((o4) => e6[o4]).join("|");
|
|
129
129
|
i2[r3] || (i2[r3] = []), i2[r3].push(e6);
|
|
@@ -131,20 +131,20 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
131
131
|
const a2 = Object.values(i2);
|
|
132
132
|
for (let e6 = 0; e6 < a2.length; e6++) {
|
|
133
133
|
const o4 = a2[e6], i3 = {};
|
|
134
|
-
|
|
135
|
-
const r3 = e7.props.base.prop,
|
|
136
|
-
i3[r3] =
|
|
137
|
-
}), r2.push(...o4),
|
|
134
|
+
n2 == null ? void 0 : n2.forEach((e7) => {
|
|
135
|
+
const r3 = e7.props.base.prop, t3 = A(ge.value[r3], o4, r3, W.pageContext);
|
|
136
|
+
i3[r3] = t3;
|
|
137
|
+
}), r2.push(...o4), t2 == null ? void 0 : t2.forEach((e7) => {
|
|
138
138
|
const r3 = e7.props.base.prop;
|
|
139
|
-
i3[r3] =
|
|
139
|
+
i3[r3] = P(e7.props.base.summaryTitle, o4[0]);
|
|
140
140
|
}), r2.push(i3), fe.push(r2.length - 1);
|
|
141
141
|
}
|
|
142
142
|
return r2;
|
|
143
|
-
}(
|
|
143
|
+
}(ne.value, e4);
|
|
144
144
|
}
|
|
145
145
|
!function(e4) {
|
|
146
146
|
if (W.configure.props.base.showIndex && -1 === e4.findIndex((e5) => "$index" === e5.props.base.prop)) {
|
|
147
|
-
const o3 =
|
|
147
|
+
const o3 = V();
|
|
148
148
|
o3 && e4.unshift(o3);
|
|
149
149
|
}
|
|
150
150
|
}(ie.value);
|
|
@@ -163,14 +163,14 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
163
163
|
const o2 = me.value[e3.column.property] ? me.value[e3.column.property].cellStyle : null;
|
|
164
164
|
return L(e3, o2, W);
|
|
165
165
|
}
|
|
166
|
-
xe && xe.fixHeight && (be = xe.fixHeight), xe && xe.maxHeight && (be = xe.maxHeight), be && (be = Number(be + "")),
|
|
166
|
+
xe && xe.fixHeight && (be = xe.fixHeight), xe && xe.maxHeight && (be = xe.maxHeight), be && (be = Number(be + "")), t(() => {
|
|
167
167
|
const e3 = O(W.pageContext, W.configure);
|
|
168
168
|
if (e3) Oe(e3);
|
|
169
169
|
else if ("variable" === W.configure.props.dataOrigin.dataSource) {
|
|
170
170
|
!function() {
|
|
171
171
|
const e4 = W.configure.props.dataOrigin.variable.match(/\${(.*?)}/), o3 = e4 ? e4[1].split(".") : [];
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
n(() => o3.reduce((e5, o4) => e5[o4], W.pageContext.entity), (e5) => {
|
|
173
|
+
e5 ? Oe(JSON.parse(JSON.stringify(e5))) : (ne.value = [], W.configure.props.modelCustom ? Je(null) : te.value ? ue.value = W.configure.props.groupHeaders : ie.value = W.configure.items);
|
|
174
174
|
});
|
|
175
175
|
}();
|
|
176
176
|
const o2 = S(W.pageContext.entity, W.configure.props.dataOrigin.variable);
|
|
@@ -178,27 +178,27 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
180
|
const ke = (e3) => {
|
|
181
|
-
const { columns: o2, data: r2 } = e3,
|
|
181
|
+
const { columns: o2, data: r2 } = e3, t2 = [];
|
|
182
182
|
return o2.forEach((e4, o3) => {
|
|
183
183
|
if (se.value[e4.property]) {
|
|
184
|
-
const
|
|
185
|
-
return void (
|
|
184
|
+
const n2 = se.value[e4.property].label;
|
|
185
|
+
return void (t2[o3] = C("div", {}, [P(n2, r2)]));
|
|
186
186
|
}
|
|
187
187
|
if (ce.value[e4.property]) {
|
|
188
|
-
const
|
|
189
|
-
|
|
188
|
+
const n2 = r2.filter((e5, o4) => !fe.includes(o4));
|
|
189
|
+
t2[o3] = A(ce.value[e4.property], n2, e4.property, W.pageContext);
|
|
190
190
|
}
|
|
191
|
-
}),
|
|
191
|
+
}), t2;
|
|
192
192
|
};
|
|
193
|
-
function Ne({ row: e3, column: o2, rowIndex: r2, columnIndex:
|
|
194
|
-
const
|
|
193
|
+
function Ne({ row: e3, column: o2, rowIndex: r2, columnIndex: t2 }) {
|
|
194
|
+
const n2 = o2.property, i2 = W.configure.props.highOrder;
|
|
195
195
|
if (i2.scopeFunc) {
|
|
196
|
-
const
|
|
197
|
-
if (
|
|
198
|
-
const i3 =
|
|
196
|
+
const n3 = k(W.pageContext, i2.scopeFunc);
|
|
197
|
+
if (n3) {
|
|
198
|
+
const i3 = n3.apply(n3, [{ tableData: ne.value, row: e3, column: o2, rowIndex: r2, columnIndex: t2 }]);
|
|
199
199
|
if (i3) return i3;
|
|
200
200
|
}
|
|
201
|
-
} else if (i2 && i2.mergeColumn, i2 && i2.mergeRow && i2.mergeRow.includes(
|
|
201
|
+
} else if (i2 && i2.mergeColumn, i2 && i2.mergeRow && i2.mergeRow.includes(n2)) return q(e3, o2, r2, n2, ne.value);
|
|
202
202
|
}
|
|
203
203
|
function Ie(e3, o2) {
|
|
204
204
|
"frontend" === W.configure.pageination.type ? Te(e3, o2) : He(e3, o2);
|
|
@@ -207,7 +207,7 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
207
207
|
"frontend" === W.configure.pageination.type ? Te(e3, o2) : He(e3, o2);
|
|
208
208
|
}
|
|
209
209
|
function Te(e3, o2) {
|
|
210
|
-
Ce && (
|
|
210
|
+
Ce && (ne.value = Ce.slice((e3 - 1) * o2, e3 * o2));
|
|
211
211
|
}
|
|
212
212
|
function He(e3, o2) {
|
|
213
213
|
W.configure.pageination.currentPageSet && j(W.pageContext.entity, W.configure.pageination.currentPageSet, e3), W.configure.pageination.pageSizeSet && j(W.pageContext.entity, W.configure.pageination.pageSizeSet, o2), $(W.pageContext, W.configure.uuid);
|
|
@@ -229,19 +229,19 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
229
229
|
}
|
|
230
230
|
function Ue(e3, o2, r2) {
|
|
231
231
|
e3.forEach((e4) => {
|
|
232
|
-
const
|
|
233
|
-
let i2 = { name:
|
|
232
|
+
const t2 = e4.props.base.prop, n2 = e4.props.base.name;
|
|
233
|
+
let i2 = { name: t2, label: n2, i18nKey: n2 };
|
|
234
234
|
e4.children && e4.children.length > 0 && (i2.children = [], Ue(e4.children, i2.children, r2)), e4.props.format && e4.props.format.type && r2.push(e4), o2.push(i2);
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
return Q2({ updateChartDatas: Oe, exportChart: function() {
|
|
238
238
|
let e3 = [], o2 = [];
|
|
239
|
-
o2 =
|
|
239
|
+
o2 = te.value ? W.configure.props.groupHeaders : ve.value;
|
|
240
240
|
let r2 = [];
|
|
241
241
|
Ue(o2, e3, r2);
|
|
242
242
|
return { isTable: true, dataArr: function(e4) {
|
|
243
243
|
let o3 = [];
|
|
244
|
-
|
|
244
|
+
ne.value && (o3 = M(ne.value), o3.forEach((o4) => {
|
|
245
245
|
e4.forEach((e5) => {
|
|
246
246
|
const r3 = B(o4, e5.props.format, e5, W.pageContext, W.configure);
|
|
247
247
|
o4[e5.props.base.prop] = r3;
|
|
@@ -250,8 +250,8 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
250
250
|
return o3;
|
|
251
251
|
}(r2), columns: e3, title: oe == null ? void 0 : oe.title };
|
|
252
252
|
} }), (o2, r2) => {
|
|
253
|
-
const
|
|
254
|
-
return u(), a("div", { style:
|
|
253
|
+
const t2 = i("el-table");
|
|
254
|
+
return u(), a("div", { style: l(s(Y)), class: p([s(Z), "amb-widget-chart amb-widget-flex amb-chart-table"]), ref: "thisRef" }, [c(g(b, { ref_key: "headerRef", ref: re, headerInfo: s(oe), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[d, s(oe).showHeader || e2.pageContext.showHomepageSearch]]), g(t2, { ref_key: "gridRef", ref: he, data: ne.value, style: { width: "100%" }, "max-height": s(be), "header-cell-style": je, "row-style": $e, "cell-style": Fe, "show-summary": le.value, stripe: e2.configure.props.base.stripe, "summary-method": ke, "span-method": Ne }, { default: h(() => [te.value ? (u(true), a(v, { key: 0 }, y(ue.value, (o3, r3) => (u(), a(v, { key: r3 }, [o3.isLeaf ? (u(), f(I, { key: 1, configure: e2.configure, pageContext: e2.pageContext, column: pe.value[o3.columnUuid] }, null, 8, ["configure", "pageContext", "column"])) : (u(), f(N, { key: 0, configure: e2.configure, pageContext: e2.pageContext, groupColumn: o3, columnsConfigKeyValues: pe.value }, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"]))], 64))), 128)) : (u(true), a(v, { key: 1 }, y(ve.value, (o3, r3) => (u(), f(I, { key: r3, column: o3, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["column", "configure", "pageContext"]))), 128))]), _: 1 }, 8, ["data", "max-height", "show-summary", "stripe"]), e2.configure.pageination && e2.configure.pageination.enable ? (u(), f(R, { key: 0, configure: e2.configure, "table-data": ne.value, total: ye.value, onPageChange: Ie, onPageSizeChange: Re }, null, 8, ["configure", "table-data", "total"])) : m("", true)], 6);
|
|
255
255
|
};
|
|
256
256
|
} });
|
|
257
257
|
export {
|
|
@@ -1,38 +1,36 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as
|
|
2
|
-
import { packageTemplateFiles as
|
|
3
|
-
import { ElMessage as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as a, resolveComponent as l, createBlock as o, openBlock as u, withCtx as n, createVNode as i, createTextVNode as p, toDisplayString as r } from "vue";
|
|
2
|
+
import { packageTemplateFiles as s } from "../../../utils/common-util.js";
|
|
3
|
+
import { ElMessage as m } from "element-plus";
|
|
4
|
+
const c = "${", d = "}", g = e({ __name: "export-form-report-dialog", props: { configure: { type: Object, required: true }, pageContext: { type: Object, required: true } }, emits: ["export", "close"], setup(e2, { emit: g2 }) {
|
|
5
5
|
var _a, _b;
|
|
6
|
-
const f = e2,
|
|
7
|
-
function
|
|
8
|
-
let t2, l2;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const a2 = o2.indexOf(m), n2 = o2.indexOf(g);
|
|
12
|
-
return console.log("prefixIndex", a2), console.log("suffixIndex", n2), -1 !== a2 && -1 !== n2 ? (a2 > n2 ? (o2 = o2.substring(0, n2) + o2.substring(n2 + 1), console.log("non replacement value === newValue", o2)) : (t2 = o2.substring(a2 + 2, n2), l2 = o2.substring(a2, n2 + 1), console.log("field", t2), console.log("formatStr", l2), h.value.push(t2), console.log("fields", h.value), o2 = o2.replace(l2, ""), console.log("newValue", o2)), y(o2)) : h.value;
|
|
6
|
+
const f = e2, v = t(false), x = g2, b = t([]), h = t([]), C = (_a = f.configure.props) == null ? void 0 : _a.base, y = (_b = f.pageContext) == null ? void 0 : _b.entity.data;
|
|
7
|
+
function w(e3) {
|
|
8
|
+
let t2, a2, l2 = e3;
|
|
9
|
+
const o2 = l2.indexOf(c), u2 = l2.indexOf(d);
|
|
10
|
+
return -1 !== o2 && -1 !== u2 ? (o2 > u2 ? l2 = l2.substring(0, u2) + l2.substring(u2 + 1) : (t2 = l2.substring(o2 + 2, u2), a2 = l2.substring(o2, u2 + 1), h.value.push(t2), h.value, l2 = l2.replace(a2, "")), w(l2)) : h.value;
|
|
13
11
|
}
|
|
14
12
|
function N(e3) {
|
|
15
|
-
|
|
13
|
+
x("export", f.configure, e3);
|
|
16
14
|
}
|
|
17
15
|
function O() {
|
|
18
|
-
|
|
16
|
+
x("close");
|
|
19
17
|
}
|
|
20
|
-
return
|
|
21
|
-
C.templateFiles && C.templateFiles.length > 0 ? b.value =
|
|
18
|
+
return a(() => {
|
|
19
|
+
C.templateFiles && C.templateFiles.length > 0 ? b.value = s(C.templateFiles, f.pageContext, f.configure) : C.templateUuid && C.templateName && b.value.push({ templateUuid: C.templateUuid, templateName: C.templateName }), b.value.forEach((e3) => {
|
|
22
20
|
e3 && e3.templateName && (e3.templateName = function(e4) {
|
|
23
|
-
const t2 =
|
|
24
|
-
return
|
|
25
|
-
const
|
|
26
|
-
let
|
|
27
|
-
-1 !== e4.indexOf(
|
|
21
|
+
const t2 = w(e4);
|
|
22
|
+
return t2.forEach((t3) => {
|
|
23
|
+
const a2 = c + t3 + d;
|
|
24
|
+
let l2;
|
|
25
|
+
-1 !== e4.indexOf(a2) && Object.prototype.hasOwnProperty.call(y, t3) && (l2 = y[t3] ? y[t3] : "", e4 = e4.replace(a2, l2));
|
|
28
26
|
}), e4;
|
|
29
27
|
}(e3.templateName));
|
|
30
|
-
}), b.value && 0 !== b.value.length || (
|
|
28
|
+
}), b.value && 0 !== b.value.length || (m({ message: "无符合条件可导出的模板!", type: "warning" }), x("close")), 1 === (b == null ? void 0 : b.value.length) ? (N(b.value[0]), x("close")) : v.value = true;
|
|
31
29
|
}), (e3, t2) => {
|
|
32
|
-
const
|
|
33
|
-
return
|
|
30
|
+
const a2 = l("el-table-column"), s2 = l("el-button"), m2 = l("el-table"), c2 = l("el-dialog");
|
|
31
|
+
return u(), o(c2, { modelValue: v.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => v.value = e4), "show-close": true, "append-to-body": true, title: e3.$t("superPageRuntimeMessage.selectTemplate"), onClose: O }, { default: n(() => [i(m2, { data: b.value, style: { width: "100%" } }, { default: n(() => [i(a2, { label: e3.$t("superPageRuntimeMessage.temlpate"), prop: "templateShowPath" }, { default: n((e4) => [p(r(e4.row.templateName), 1)]), _: 1 }, 8, ["label"]), i(a2, { label: e3.$t("superPageRuntimeMessage.operating"), width: "200", fixed: "right" }, { default: n((t3) => [i(s2, { type: "text", size: "small", onClick: (e4) => N(t3.row), loading: void 0 !== f.pageContext.canClick && void 0 !== f.pageContext.clickUuid && !f.pageContext.canClick && f.pageContext.clickUuid === f.configure.uuid }, { default: n(() => [p(r(e3.$t("superPageRuntimeMessage.export")), 1)]), _: 1 }, 8, ["onClick", "loading"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["modelValue", "title"]);
|
|
34
32
|
};
|
|
35
33
|
} });
|
|
36
34
|
export {
|
|
37
|
-
|
|
35
|
+
g as default
|
|
38
36
|
};
|