super-page-runtime 2.3.18-tmp2 → 2.3.18-tmp3
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 +49 -48
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +14 -12
- package/dist/es/components/runtime/utils/charts/chart-util.js +58 -56
- package/dist/es/components/runtime/utils/events/event-util.js +111 -111
- package/dist/es/components/runtime/utils/events/print-label.js +1 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +524 -512
- package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
- package/dist/es/components/runtime/utils/form/scan-util.js +4 -3
- package/dist/es/components/runtime/utils/page-helper-util.js +275 -275
- package/dist/es/components/runtime/utils/page-init-util.js +82 -79
- package/dist/es/components/runtime/utils/page-store.js +10 -10
- package/dist/es/components/runtime/utils/table-utils.js +28 -28
- 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 +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 +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/table-runtime.vue2.js +86 -85
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +24 -22
- 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 +63 -63
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +40 -38
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +90 -87
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +39 -38
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +26 -26
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +14 -14
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +49 -49
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +6 -6
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -10
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +13 -13
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +16 -16
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +6 -6
- package/dist/es/components/runtime/views/home-chart.vue.js +4 -4
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +9 -9
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +171 -170
- package/dist/es/style.css +76 -76
- package/package.json +1 -1
|
@@ -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 l, unref as i, 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,38 +9,39 @@ 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 O = e({ __name: "pie-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: O2 }) {
|
|
13
13
|
b([y, D, V, _, w, I, P]);
|
|
14
|
-
const
|
|
14
|
+
const A = e2, H = r(null), S = r(), T = r(null), U = A.configure.props ? A.configure.props.enableDrill : null, z = A.configure.props ? A.configure.props.drillEndTrigger : null, F = A.configure.props ? A.configure.props.linkPage : null, q = A.configure.runtime ? A.configure.runtime : {}, B = q.style, G = q.class, J = q.dataConfig, K = q.headerInfo ? q.headerInfo : {}, L = q.chartOption, M = A.configure.props ? A.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(A.pageContext, A.configure, void 0);
|
|
20
20
|
}
|
|
21
|
-
g(
|
|
22
|
-
const e3 = C(
|
|
21
|
+
g(A.configure, L), o(() => {
|
|
22
|
+
const e3 = C(A.pageContext, A.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, A.configure.cacheDatas) : W();
|
|
25
|
+
}), !U && A.configure.clickSet && S.value && h(A.pageContext, A.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(A.pageContext, [J], K.drillParams)) : console.log("无数据源配置,不需要查询!");
|
|
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
|
-
e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender
|
|
36
|
+
if (e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
|
|
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);
|
|
37
38
|
}
|
|
38
|
-
return j(
|
|
39
|
+
return j(A.pageContext, Z, () => {
|
|
39
40
|
Y(true);
|
|
40
|
-
}),
|
|
41
|
+
}), O2({ updateChartDatas: $, exportChart: function() {
|
|
41
42
|
return d(S.value, K);
|
|
42
|
-
} }), (e3, r2) => (n(), a("div", { style: i(
|
|
43
|
+
} }), (e3, r2) => (n(), a("div", { style: l(i(B)), class: u([i(G), "amb-widget-chart amb-widget-flex amb-chart-container"]), ref_key: "thisRef", ref: H }, [c(s(k, { ref_key: "headerRef", ref: T, headerInfo: i(K), configure: e3.configure, pageContext: e3.pageContext, onDrillEnd: Q, class: "amb-chart-header" }, null, 8, ["headerInfo", "configure", "pageContext"]), [[p, i(K).showHeader || e3.pageContext.showHomepageSearch]]), s(i(E), { ref_key: "chartRef", ref: S, class: "amb-chart-content", theme: i(N), option: i(L), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
43
44
|
} });
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
O as default
|
|
46
47
|
};
|
|
@@ -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 o, watch as t, createElementBlock as a, openBlock as n, normalizeClass as s, normalizeStyle as c, unref as i, withDirectives as u, createVNode as p, vShow as l } from "vue";
|
|
2
|
+
import { getCustomTheme as f, initChartOption as m, exportCommonChart as h } 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,29 +7,30 @@ 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 O from "vue-echarts";
|
|
11
|
+
const k = e({ __name: "radar-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: k2 }) {
|
|
12
12
|
y([R, b, V, _, j, w, I]);
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const e3 = g(
|
|
13
|
+
const A = e2, H = r(null), z = r(), D = r(null), F = A.configure.runtime ? A.configure.runtime : {}, P = F.style, S = F.class, T = F.dataConfig, q = F.headerInfo ? F.headerInfo : {}, B = F.chartOption, E = A.configure.props ? A.configure.props : {}, G = f(E.customTheme);
|
|
14
|
+
m(A.configure, B), console.log("chartOption", B), o(() => {
|
|
15
|
+
const e3 = g(A.pageContext, A.configure);
|
|
16
16
|
e3 && M(e3);
|
|
17
17
|
});
|
|
18
18
|
let J = q.groupValue;
|
|
19
19
|
function K() {
|
|
20
|
-
T
|
|
20
|
+
T ? d(A.pageContext, [T], q.drillParams) : console.log("无数据源配置,不需要查询!");
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
t(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
|
-
e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender
|
|
27
|
+
if (e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
|
|
28
|
+
e3.hasRender = true, C(A.pageContext, A.configure, B, e3), console.log("chartOption", B), z.value && z.value.setOption(B, true);
|
|
28
29
|
}
|
|
29
|
-
return x(
|
|
30
|
-
return
|
|
31
|
-
} }), (e3, r2) => (n(), a("div", { style:
|
|
30
|
+
return x(A.pageContext, L, K), k2({ updateChartDatas: M, exportChart: function() {
|
|
31
|
+
return h(z.value, q);
|
|
32
|
+
} }), (e3, r2) => (n(), a("div", { style: c(i(P)), class: s([i(S), "amb-widget-chart amb-widget-flex amb-chart-container"]), ref_key: "thisRef", ref: H }, [u(p(v, { ref_key: "headerRef", ref: D, headerInfo: i(q), configure: e3.configure, pageContext: e3.pageContext, class: "amb-chart-header" }, null, 8, ["headerInfo", "configure", "pageContext"]), [[l, i(q).showHeader || e3.pageContext.showHomepageSearch]]), p(i(O), { ref_key: "chartRef", ref: z, class: "amb-chart-content", theme: i(G), option: i(B), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
32
33
|
} });
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
k as default
|
|
35
36
|
};
|
|
@@ -1,35 +1,36 @@
|
|
|
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 i, withDirectives as u, createVNode as p, vShow as l } from "vue";
|
|
2
|
+
import { getCustomTheme as f, initChartOption as m, exportCommonChart as h } 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 O } from "echarts/components";
|
|
10
|
+
import k from "vue-echarts";
|
|
11
|
+
const A = e({ __name: "scatter-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: A2 }) {
|
|
12
|
+
y([R, b, V, _, j, w, I, O]);
|
|
13
|
+
const H = e2, z = r(null), D = r(), F = r(null), P = H.configure.runtime ? H.configure.runtime : {}, S = P.style, T = P.class, q = P.dataConfig, B = P.headerInfo ? P.headerInfo : {}, E = P.chartOption, G = H.configure.props ? H.configure.props : {}, J = f(G.customTheme);
|
|
14
|
+
m(H.configure, E), console.log("chartOption", E), t(() => {
|
|
15
|
+
const e3 = g(H.pageContext, H.configure);
|
|
16
16
|
e3 && N(e3);
|
|
17
17
|
});
|
|
18
18
|
let K = B.groupValue;
|
|
19
19
|
function L() {
|
|
20
|
-
q
|
|
20
|
+
q ? d(H.pageContext, [q], B.drillParams) : console.log("无数据源配置,不需要查询!");
|
|
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
|
-
e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender
|
|
27
|
+
if (e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
|
|
28
|
+
e3.hasRender = true, C(H.pageContext, H.configure, E, e3), console.log("chartOption scatter", E), D.value && D.value.setOption(E, true);
|
|
28
29
|
}
|
|
29
|
-
return x(
|
|
30
|
-
return
|
|
31
|
-
} }), (e3, r2) => (n(), a("div", { style: c(
|
|
30
|
+
return x(H.pageContext, M, L), A2({ updateChartDatas: N, exportChart: function() {
|
|
31
|
+
return h(D.value, B);
|
|
32
|
+
} }), (e3, r2) => (n(), a("div", { style: c(i(S)), class: s([i(T), "amb-widget-chart amb-widget-flex amb-chart-container"]), ref_key: "thisRef", ref: z }, [u(p(v, { ref_key: "headerRef", ref: F, headerInfo: i(B), configure: e3.configure, pageContext: e3.pageContext, class: "amb-chart-header" }, null, 8, ["headerInfo", "configure", "pageContext"]), [[l, i(B).showHeader || e3.pageContext.showHomepageSearch]]), p(i(k), { ref_key: "chartRef", ref: D, class: "amb-chart-content", theme: i(J), option: i(E), autoresize: "" }, null, 8, ["theme", "option"])], 6));
|
|
32
33
|
} });
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
A as default
|
|
35
36
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as e, ref as o, computed as
|
|
1
|
+
import { defineComponent as e, ref as o, computed as n, onMounted as r, watch as t, resolveComponent as i, createElementBlock as a, openBlock as u, normalizeClass as l, normalizeStyle as p, 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 { getCustomFunc as F } from "../../../../utils/events/event-util.js";
|
|
5
5
|
import k from "./group-column.vue.js";
|
|
6
6
|
import I from "./normal-column.vue.js";
|
|
7
7
|
import N from "./table-pageination.vue.js";
|
|
8
|
-
import { getSummaryTitleColumn as R, getSummaryDataColumn as T, rowDataToColumn as H, getColumnToRowTableConfig as
|
|
8
|
+
import { getSummaryTitleColumn as R, getSummaryDataColumn as T, rowDataToColumn as H, getColumnToRowTableConfig as V, colDataToRow as _, computeFormula as z, getNewColumnConfig as A, summaryStatistics as D, replacePlaceholders as J, getIndexColumn as P, getHeaderCellStyleUtil as U, getRowStyleUtil as G, getCellStyleUtil as K, mergeRowByProperty as L, formatColContent as q } from "./chart-table-util.js";
|
|
9
9
|
import { deepCopy as B } from "../../../../utils/common-util.js";
|
|
10
10
|
const M = e({ __name: "table-runtime", props: { configure: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) } }, setup(e2, { expose: M2 }) {
|
|
11
11
|
var _a;
|
|
12
|
-
const Q = e2, W = Q.configure.runtime ? Q.configure.runtime : {}, X = W.style, Y = W.class, Z = W.dataConfig, ee = W.headerInfo ? W.headerInfo : {}, oe = o(null),
|
|
12
|
+
const Q = e2, W = Q.configure.runtime ? Q.configure.runtime : {}, X = W.style, Y = W.class, Z = W.dataConfig, ee = W.headerInfo ? W.headerInfo : {}, oe = o(null), ne = o(W.props.isEnableGroupHeader), re = o([]), te = o([]), ie = o([]), ae = o({}), ue = o(false), le = o({}), pe = o({}), se = o({}), ce = [], ge = o({}), fe = o({}), me = o(null), de = n(() => ne.value ? ie.value.filter((e3) => !e3.isLeaf || Te(ae[e3.columnUuid])) : te.value.filter((e3) => Te(e3))), he = o(0);
|
|
13
13
|
let ve = [];
|
|
14
14
|
if (!Q.configure.props.modelCustom) {
|
|
15
|
-
if (
|
|
15
|
+
if (ne.value) {
|
|
16
16
|
const e3 = [];
|
|
17
17
|
Q.configure.props.groupHeaders.forEach((o2) => {
|
|
18
18
|
o2.parentUuid || e3.push(o2);
|
|
19
19
|
}), e3.sort((e4, o2) => e4.displayOrder - o2.displayOrder), ie.value = e3, function() {
|
|
20
20
|
if (Q.configure.props.base.showIndex) {
|
|
21
21
|
ie.value.unshift({ columnUuid: "$index", displayOrder: 0, isLeaf: true, prop: "$index", titleText: "序号", uuid: "$index" });
|
|
22
|
-
const e4 =
|
|
22
|
+
const e4 = P();
|
|
23
23
|
e4 && (ae.value.$index = e4);
|
|
24
24
|
}
|
|
25
25
|
}();
|
|
@@ -28,10 +28,11 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
28
28
|
ae.value[e3.uuid] = e3, Object.keys(e3.style).length > 0 && (ge.value[e3.props.base.prop] = { cellStyle: e3.style, titleStyle: e3.titleStyle }), e3.formula && "" !== e3.formula.trim() && (fe.value[e3.props.base.prop] = e3.formula);
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
ue.value = Q.configure.props.base.showSummary, (ue.value || Q.configure.props.highOrder.groupField && Q.configure.props.highOrder.groupField.length > 0) && (
|
|
31
|
+
ue.value = Q.configure.props.base.showSummary, (ue.value || Q.configure.props.highOrder.groupField && Q.configure.props.highOrder.groupField.length > 0) && (le.value = R(Q.configure), ue.value && (pe.value = T(Q.configure, "table")), Q.configure.props.highOrder.groupField && Q.configure.props.highOrder.groupField.length > 0 && (se.value = T(Q.configure, "group")));
|
|
32
32
|
let ye = 300, Ce = x(Q.pageContext, Q.configure);
|
|
33
33
|
function be(e3) {
|
|
34
|
-
e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender
|
|
34
|
+
if (e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
|
|
35
|
+
!function(e4) {
|
|
35
36
|
var _a2;
|
|
36
37
|
He(e4), "service" === Q.configure.props.dataOrigin.dataSource && e4.result ? ve = e4.result[Q.configure.props.dataOrigin.service.serviceDataField] : "variable" === Q.configure.props.dataOrigin.dataSource && (ve = S(Q.pageContext.entity, Q.configure.props.dataOrigin.variable));
|
|
37
38
|
if (ve) if (((_a2 = Q.configure.props) == null ? void 0 : _a2.dataOrigin.limitEnable) && Q.configure.props.dataOrigin.itemNumSource) {
|
|
@@ -39,54 +40,54 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
39
40
|
if ("fix" === Q.configure.props.dataOrigin.itemNumSource) o2 = Q.configure.props.dataOrigin.itemNumFix;
|
|
40
41
|
else if ("variable" === Q.configure.props.dataOrigin.itemNumSource) {
|
|
41
42
|
o2 = Number(S(Q.pageContext.entity, Q.configure.props.dataOrigin.itemNumVariable));
|
|
42
|
-
const
|
|
43
|
-
t(() =>
|
|
44
|
-
xe(o3, i2, e4);
|
|
43
|
+
const n2 = Q.configure.props.dataOrigin.itemNumVariable.match(/\${(.*?)}/), r2 = n2 ? n2[1].split(".") : [], i2 = JSON.parse(JSON.stringify(ve));
|
|
44
|
+
t(() => r2.reduce((e5, o3) => e5[o3], Q.pageContext.entity), (o3) => {
|
|
45
|
+
console.log("统计表格监听数据变量的变化 newVal:", o3), xe(o3, i2, e4);
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
48
|
xe(o2, ve, e4);
|
|
48
49
|
} else Oe(ve, e4);
|
|
49
|
-
}(e3), e3.hasRender = true, Z && (Z.autoRefresh = false)
|
|
50
|
+
}(e3), e3.hasRender = true, Z && (Z.autoRefresh = false);
|
|
50
51
|
}
|
|
51
|
-
function xe(e3, o2,
|
|
52
|
+
function xe(e3, o2, n2) {
|
|
52
53
|
var _a2;
|
|
53
54
|
if (e3 && e3 < o2.length) {
|
|
54
|
-
let
|
|
55
|
-
if (((_a2 = Q.configure.props.dataOrigin.limitCountColumns) == null ? void 0 : _a2.length) > 0)
|
|
55
|
+
let r2 = [];
|
|
56
|
+
if (((_a2 = Q.configure.props.dataOrigin.limitCountColumns) == null ? void 0 : _a2.length) > 0) r2 = Q.configure.props.dataOrigin.limitCountColumns;
|
|
56
57
|
else {
|
|
57
58
|
te.value.filter((e4) => "number" === e4.props.base.dataType).forEach((e4) => {
|
|
58
|
-
|
|
59
|
+
r2.push(e4.props.base.prop);
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
|
-
if ((
|
|
62
|
-
const
|
|
62
|
+
if ((r2 == null ? void 0 : r2.length) > 0) {
|
|
63
|
+
const n3 = o2.slice(e3 - 1, o2.length), t2 = {};
|
|
63
64
|
let i2 = te.value[0].props.base.prop;
|
|
64
|
-
"$index" === i2 && (i2 = te.value[1].props.base.prop),
|
|
65
|
-
|
|
65
|
+
"$index" === i2 && (i2 = te.value[1].props.base.prop), n3.forEach((e4) => {
|
|
66
|
+
r2.forEach((o3) => {
|
|
66
67
|
void 0 === t2[o3] && (t2[o3] = 0), t2[o3] = t2[o3] + e4[o3];
|
|
67
68
|
});
|
|
68
69
|
}), o2.length > e3 && (o2 = o2.slice(0, e3 - 1)), t2[i2] = Q.configure.props.dataOrigin.overItemAlias, o2.push(t2);
|
|
69
70
|
}
|
|
70
|
-
Oe(o2,
|
|
71
|
-
} else Oe(o2,
|
|
71
|
+
Oe(o2, n2);
|
|
72
|
+
} else Oe(o2, n2);
|
|
72
73
|
}
|
|
73
74
|
function Oe(e3, o2) {
|
|
74
|
-
var _a2, _b, _c, _d,
|
|
75
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
75
76
|
if (Se("rowToColumn")) {
|
|
76
|
-
if (e3 = H(e3, Q.configure, te.value), !
|
|
77
|
-
const o3 = function(e4, o4,
|
|
78
|
-
const
|
|
79
|
-
if ((!i2 || 0 === i2.length) &&
|
|
77
|
+
if (e3 = H(e3, Q.configure, te.value), !ne.value) {
|
|
78
|
+
const o3 = function(e4, o4, n2) {
|
|
79
|
+
const r2 = Q.configure.props.dataOrigin.rowToColumn.titleColumns, t2 = Q.configure.props.dataOrigin.rowToColumn.dataColumns, i2 = e4.props.dataOrigin.groupField;
|
|
80
|
+
if ((!i2 || 0 === i2.length) && n2.length > 0) {
|
|
80
81
|
const e5 = [];
|
|
81
|
-
return e5.push(
|
|
82
|
+
return e5.push(A("$GroupColumn", Q.configure.props.dataOrigin.rowToColumn.firstColumnTitle, 0, "string")), Object.keys(n2[0]).forEach((o5, n3) => {
|
|
82
83
|
if ("$GroupColumn" === o5) return;
|
|
83
|
-
const
|
|
84
|
-
e5.push(
|
|
84
|
+
const r3 = A(o5, o5, n3 + 1, "string");
|
|
85
|
+
e5.push(r3);
|
|
85
86
|
}), e5;
|
|
86
87
|
}
|
|
87
88
|
{
|
|
88
|
-
const e5 = [...o4].filter((e6) => !
|
|
89
|
-
return
|
|
89
|
+
const e5 = [...o4].filter((e6) => !r2.includes(e6.props.base.prop) && !t2.includes(e6.props.base.prop)), i3 = new RegExp(`(${t2.join("|")})$`), a2 = /* @__PURE__ */ new Set();
|
|
90
|
+
return n2.forEach((e6) => {
|
|
90
91
|
Object.keys(e6).forEach((e7) => {
|
|
91
92
|
if (t2.some((o5) => e7.includes(o5))) {
|
|
92
93
|
const o5 = e7.split(i3)[0];
|
|
@@ -94,9 +95,9 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
94
95
|
}
|
|
95
96
|
});
|
|
96
97
|
}), a2.forEach((o5) => {
|
|
97
|
-
t2.forEach((
|
|
98
|
+
t2.forEach((r3) => {
|
|
98
99
|
var _a3;
|
|
99
|
-
const t3 = (_a3 = te.value.find((e6) => e6.props.base.prop ===
|
|
100
|
+
const t3 = (_a3 = te.value.find((e6) => e6.props.base.prop === r3)) == null ? void 0 : _a3.props.base.name, i4 = A(`${o5}${r3}`, `${o5}${t3}`, e5.length + 1, "number" == typeof n2[0][`${o5}${r3}`] ? "number" : "string");
|
|
100
101
|
e5.push(i4);
|
|
101
102
|
});
|
|
102
103
|
}), e5;
|
|
@@ -104,43 +105,43 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
104
105
|
}(Q.configure, te.value, e3);
|
|
105
106
|
te.value = o3;
|
|
106
107
|
}
|
|
107
|
-
} else Se("columnToRow") && (
|
|
108
|
+
} else Se("columnToRow") && (ne.value || (te.value = V(Q.configure)), e3 = _(e3, Q.configure));
|
|
108
109
|
if ((_b = (_a2 = Q.configure.props) == null ? void 0 : _a2.dataOrigin) == null ? void 0 : _b.dataFormatting) {
|
|
109
110
|
const o3 = F(Q.pageContext, Q.configure.props.dataOrigin.dataFormatting);
|
|
110
111
|
if (o3) {
|
|
111
|
-
const
|
|
112
|
-
|
|
112
|
+
const n2 = o3.apply(o3, [{ tableData: e3 }]);
|
|
113
|
+
n2 && (e3 = n2);
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
|
-
if (Object.keys(fe.value).length > 0 && e3 && e3.length > 0 &&
|
|
116
|
-
"frontend" === Q.configure.pageination.type ? (he.value = ve.length, Ne(1, Q.configure.pageination.pageSize)) : "backend" === Q.configure.pageination.type && (
|
|
117
|
-
}(o2) :
|
|
116
|
+
if (Object.keys(fe.value).length > 0 && e3 && e3.length > 0 && z(fe.value, e3, Q.pageContext.entity), ((_c = Q.configure.pageination) == null ? void 0 : _c.enable) ? function(e4) {
|
|
117
|
+
"frontend" === Q.configure.pageination.type ? (he.value = ve.length, Ne(1, Q.configure.pageination.pageSize)) : "backend" === Q.configure.pageination.type && (re.value = ve, Q.configure.pageination.totalFrom && (he.value = e4.result[Q.configure.pageination.totalFrom]));
|
|
118
|
+
}(o2) : re.value = e3, ((_e = (_d = Q.configure.props) == null ? void 0 : _d.highOrder) == null ? void 0 : _e.groupField) && ((_g = (_f = Q.configure.props) == null ? void 0 : _f.highOrder) == null ? void 0 : _g.groupField.length) > 0) {
|
|
118
119
|
const e4 = Q.configure.props.highOrder.groupField;
|
|
119
|
-
|
|
120
|
+
re.value = function(e5, o3) {
|
|
120
121
|
var _a3, _b2;
|
|
121
122
|
if (0 === se.value.length) return e5;
|
|
122
|
-
const
|
|
123
|
+
const n2 = [], r2 = (_a3 = Q.configure.items) == null ? void 0 : _a3.filter((e6) => o3.includes(e6.props.base.prop)), t2 = (_b2 = Q.configure.items) == null ? void 0 : _b2.filter((e6) => true === e6.props.base.groupSummary), i2 = {};
|
|
123
124
|
e5.forEach((e6) => {
|
|
124
|
-
const
|
|
125
|
-
i2[
|
|
125
|
+
const n3 = o3.map((o4) => e6[o4]).join("|");
|
|
126
|
+
i2[n3] || (i2[n3] = []), i2[n3].push(e6);
|
|
126
127
|
});
|
|
127
128
|
const a2 = Object.values(i2);
|
|
128
129
|
for (let e6 = 0; e6 < a2.length; e6++) {
|
|
129
130
|
const o4 = a2[e6], i3 = {};
|
|
130
131
|
t2 == null ? void 0 : t2.forEach((e7) => {
|
|
131
|
-
const
|
|
132
|
-
i3[
|
|
133
|
-
}),
|
|
134
|
-
const
|
|
135
|
-
i3[
|
|
136
|
-
}),
|
|
132
|
+
const n3 = e7.props.base.prop, r3 = D(se.value[n3], o4, n3, Q.pageContext);
|
|
133
|
+
i3[n3] = r3;
|
|
134
|
+
}), n2.push(...o4), r2 == null ? void 0 : r2.forEach((e7) => {
|
|
135
|
+
const n3 = e7.props.base.prop;
|
|
136
|
+
i3[n3] = J(e7.props.base.summaryTitle, o4[0]);
|
|
137
|
+
}), n2.push(i3), ce.push(n2.length - 1);
|
|
137
138
|
}
|
|
138
|
-
return
|
|
139
|
-
}(
|
|
139
|
+
return n2;
|
|
140
|
+
}(re.value, e4);
|
|
140
141
|
}
|
|
141
142
|
!function(e4) {
|
|
142
143
|
if (Q.configure.props.base.showIndex && -1 === e4.findIndex((e5) => "$index" === e5.props.base.prop)) {
|
|
143
|
-
const o3 =
|
|
144
|
+
const o3 = P();
|
|
144
145
|
o3 && e4.unshift(o3);
|
|
145
146
|
}
|
|
146
147
|
}(te.value);
|
|
@@ -149,8 +150,8 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
149
150
|
return Q.configure.props.dataOrigin.transition === e3 && Q.configure.props.dataOrigin[e3].titleColumns && Q.configure.props.dataOrigin[e3].titleColumns.length > 0 && Q.configure.props.dataOrigin[e3].dataColumns && Q.configure.props.dataOrigin[e3].dataColumns.length > 0;
|
|
150
151
|
}
|
|
151
152
|
function we(e3) {
|
|
152
|
-
const o2 = ge.value[e3.column.property] ? ge.value[e3.column.property].titleStyle : null,
|
|
153
|
-
return
|
|
153
|
+
const o2 = ge.value[e3.column.property] ? ge.value[e3.column.property].titleStyle : null, n2 = X == null ? void 0 : X.titleStyle;
|
|
154
|
+
return U(e3, { cellTitleStyle: o2, titleStyle: n2 }, Q);
|
|
154
155
|
}
|
|
155
156
|
function Ee(e3) {
|
|
156
157
|
return G(e3, ce, Q);
|
|
@@ -159,14 +160,14 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
159
160
|
const o2 = ge.value[e3.column.property] ? ge.value[e3.column.property].cellStyle : null;
|
|
160
161
|
return K(e3, o2, Q);
|
|
161
162
|
}
|
|
162
|
-
Ce && Ce.fixHeight && (ye = Ce.fixHeight), Ce && Ce.maxHeight && (ye = Ce.maxHeight), ye && (ye = Number(ye + "")),
|
|
163
|
+
Ce && Ce.fixHeight && (ye = Ce.fixHeight), Ce && Ce.maxHeight && (ye = Ce.maxHeight), ye && (ye = Number(ye + "")), r(() => {
|
|
163
164
|
const e3 = O(Q.pageContext, Q.configure);
|
|
164
165
|
if (e3) be(e3);
|
|
165
166
|
else if ("variable" === Q.configure.props.dataOrigin.dataSource) {
|
|
166
167
|
!function() {
|
|
167
168
|
const e4 = Q.configure.props.dataOrigin.variable.match(/\${(.*?)}/), o3 = e4 ? e4[1].split(".") : [];
|
|
168
169
|
t(() => o3.reduce((e5, o4) => e5[o4], Q.pageContext.entity), (e5) => {
|
|
169
|
-
e5 ? be(JSON.parse(JSON.stringify(e5))) : (
|
|
170
|
+
console.log("统计表格监听数据变量的变化 newVal:", e5), e5 ? be(JSON.parse(JSON.stringify(e5))) : (re.value = [], console.log("重置统计表格列配置"), Q.configure.props.modelCustom ? He(null) : ne.value ? ie.value = Q.configure.props.groupHeaders : te.value = Q.configure.items);
|
|
170
171
|
});
|
|
171
172
|
}();
|
|
172
173
|
const o2 = S(Q.pageContext.entity, Q.configure.props.dataOrigin.variable);
|
|
@@ -174,27 +175,27 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
174
175
|
}
|
|
175
176
|
});
|
|
176
177
|
const $e = (e3) => {
|
|
177
|
-
const { columns: o2, data:
|
|
178
|
+
const { columns: o2, data: n2 } = e3, r2 = [];
|
|
178
179
|
return o2.forEach((e4, o3) => {
|
|
179
|
-
if (pe.value[e4.property]) {
|
|
180
|
-
const t2 = pe.value[e4.property].label;
|
|
181
|
-
return void (n2[o3] = C("div", {}, [P(t2, r2)]));
|
|
182
|
-
}
|
|
183
180
|
if (le.value[e4.property]) {
|
|
184
|
-
const t2 =
|
|
185
|
-
|
|
181
|
+
const t2 = le.value[e4.property].label;
|
|
182
|
+
return void (r2[o3] = C("div", {}, [J(t2, n2)]));
|
|
183
|
+
}
|
|
184
|
+
if (pe.value[e4.property]) {
|
|
185
|
+
const t2 = n2.filter((e5, o4) => !ce.includes(o4));
|
|
186
|
+
r2[o3] = D(pe.value[e4.property], t2, e4.property, Q.pageContext);
|
|
186
187
|
}
|
|
187
|
-
}),
|
|
188
|
+
}), r2;
|
|
188
189
|
};
|
|
189
|
-
function Fe({ row: e3, column: o2, rowIndex:
|
|
190
|
+
function Fe({ row: e3, column: o2, rowIndex: n2, columnIndex: r2 }) {
|
|
190
191
|
const t2 = o2.property, i2 = Q.configure.props.highOrder;
|
|
191
192
|
if (i2.scopeFunc) {
|
|
192
193
|
const t3 = F(Q.pageContext, i2.scopeFunc);
|
|
193
194
|
if (t3) {
|
|
194
|
-
const i3 = t3.apply(t3, [{ tableData:
|
|
195
|
+
const i3 = t3.apply(t3, [{ tableData: re.value, row: e3, column: o2, rowIndex: n2, columnIndex: r2 }]);
|
|
195
196
|
if (i3) return i3;
|
|
196
197
|
}
|
|
197
|
-
} else if (i2 && i2.mergeColumn, i2 && i2.mergeRow && i2.mergeRow.includes(t2)) return L(e3, o2,
|
|
198
|
+
} else if (i2 && i2.mergeColumn, i2 && i2.mergeRow && i2.mergeRow.includes(t2)) return L(e3, o2, n2, t2, re.value);
|
|
198
199
|
}
|
|
199
200
|
function ke(e3, o2) {
|
|
200
201
|
"frontend" === Q.configure.pageination.type ? Ne(e3, o2) : Re(e3, o2);
|
|
@@ -203,7 +204,7 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
203
204
|
"frontend" === Q.configure.pageination.type ? Ne(e3, o2) : Re(e3, o2);
|
|
204
205
|
}
|
|
205
206
|
function Ne(e3, o2) {
|
|
206
|
-
ve && (
|
|
207
|
+
ve && (re.value = ve.slice((e3 - 1) * o2, e3 * o2));
|
|
207
208
|
}
|
|
208
209
|
function Re(e3, o2) {
|
|
209
210
|
Q.configure.pageination.currentPageSet && j(Q.pageContext.entity, Q.configure.pageination.currentPageSet, e3), Q.configure.pageination.pageSizeSet && j(Q.pageContext.entity, Q.configure.pageination.pageSizeSet, o2), $(Q.pageContext, Q.configure.uuid);
|
|
@@ -216,38 +217,38 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
216
217
|
if (Q.configure.props.modelCustom) {
|
|
217
218
|
const o2 = F(Q.pageContext, Q.configure.props.modelCustom);
|
|
218
219
|
if (o2) {
|
|
219
|
-
const
|
|
220
|
-
E(
|
|
220
|
+
const n2 = o2.apply(o2, [{ pageContext: Q.pageContext, configureObj: Q.configure, value: e3 }]);
|
|
221
|
+
E(n2) ? n2.then((e4) => {
|
|
221
222
|
te.value = e4.columns;
|
|
222
|
-
}) : te.value =
|
|
223
|
+
}) : te.value = n2.columns;
|
|
223
224
|
}
|
|
224
225
|
}
|
|
225
226
|
}
|
|
226
|
-
function
|
|
227
|
+
function Ve(e3, o2, n2) {
|
|
227
228
|
e3.forEach((e4) => {
|
|
228
|
-
const
|
|
229
|
-
let i2 = { name:
|
|
230
|
-
e4.children && e4.children.length > 0 && (i2.children = [],
|
|
229
|
+
const r2 = e4.props.base.prop, t2 = e4.props.base.name;
|
|
230
|
+
let i2 = { name: r2, label: t2, i18nKey: t2 };
|
|
231
|
+
e4.children && e4.children.length > 0 && (i2.children = [], Ve(e4.children, i2.children, n2)), e4.props.format && e4.props.format.type && n2.push(e4), o2.push(i2);
|
|
231
232
|
});
|
|
232
233
|
}
|
|
233
234
|
return M2({ updateChartDatas: be, exportChart: function() {
|
|
234
235
|
let e3 = [], o2 = [];
|
|
235
|
-
o2 =
|
|
236
|
-
let
|
|
237
|
-
|
|
236
|
+
o2 = ne.value ? Q.configure.props.groupHeaders : de.value;
|
|
237
|
+
let n2 = [];
|
|
238
|
+
Ve(o2, e3, n2);
|
|
238
239
|
return { isTable: true, dataArr: function(e4) {
|
|
239
240
|
let o3 = [];
|
|
240
|
-
|
|
241
|
+
re.value && (o3 = B(re.value), o3.forEach((o4) => {
|
|
241
242
|
e4.forEach((e5) => {
|
|
242
|
-
const
|
|
243
|
-
o4[e5.props.base.prop] =
|
|
243
|
+
const n3 = q(o4, e5.props.format, e5, Q.pageContext, Q.configure);
|
|
244
|
+
o4[e5.props.base.prop] = n3;
|
|
244
245
|
});
|
|
245
246
|
}));
|
|
246
247
|
return o3;
|
|
247
|
-
}(
|
|
248
|
-
} }), (o2,
|
|
249
|
-
const
|
|
250
|
-
return u(), a("div", { style:
|
|
248
|
+
}(n2), columns: e3, title: ee == null ? void 0 : ee.title };
|
|
249
|
+
} }), (o2, n2) => {
|
|
250
|
+
const r2 = i("el-table");
|
|
251
|
+
return u(), a("div", { style: p(s(X)), class: l([s(Y), "amb-widget-chart amb-widget-flex"]), ref: "thisRef" }, [c(g(b, { ref_key: "headerRef", ref: oe, headerInfo: s(ee), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[d, s(ee).showHeader || e2.pageContext.showHomepageSearch]]), g(r2, { ref_key: "gridRef", ref: me, data: re.value, style: { width: "100%" }, "max-height": s(ye), "header-cell-style": we, "row-style": Ee, "cell-style": je, "show-summary": ue.value, stripe: e2.configure.props.base.stripe, "summary-method": $e, "span-method": Fe }, { default: h(() => [ne.value ? (u(true), a(v, { key: 0 }, y(ie.value, (o3, n3) => (u(), a(v, { key: n3 }, [o3.isLeaf ? (u(), f(I, { key: 1, configure: e2.configure, pageContext: e2.pageContext, column: ae.value[o3.columnUuid] }, null, 8, ["configure", "pageContext", "column"])) : (u(), f(k, { key: 0, configure: e2.configure, pageContext: e2.pageContext, groupColumn: o3, columnsConfigKeyValues: ae.value }, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"]))], 64))), 128)) : (u(true), a(v, { key: 1 }, y(de.value, (o3, n3) => (u(), f(I, { key: n3, 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(N, { key: 0, configure: e2.configure, "table-data": re.value, total: he.value, onPageChange: ke, onPageSizeChange: Ie }, null, 8, ["configure", "table-data", "total"])) : m("", true)], 6);
|
|
251
252
|
};
|
|
252
253
|
} });
|
|
253
254
|
export {
|
|
@@ -1,36 +1,38 @@
|
|
|
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 l, resolveComponent as o, createBlock as a, openBlock as n, withCtx as u, createVNode as s, createTextVNode as i, toDisplayString as p } from "vue";
|
|
2
|
+
import { packageTemplateFiles as r } from "../../../utils/common-util.js";
|
|
3
|
+
import { ElMessage as c } from "element-plus";
|
|
4
|
+
const m = "${", g = "}", d = e({ __name: "export-form-report-dialog", props: { configure: { type: Object, required: true }, pageContext: { type: Object, required: true } }, emits: ["export", "close"], setup(e2, { emit: d2 }) {
|
|
5
5
|
var _a, _b;
|
|
6
|
-
const f = e2,
|
|
7
|
-
function
|
|
8
|
-
let t2,
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const f = e2, x = t(false), v = d2, b = t([]), h = t([]), C = (_a = f.configure.props) == null ? void 0 : _a.base, w = (_b = f.pageContext) == null ? void 0 : _b.entity.data;
|
|
7
|
+
function y(e3) {
|
|
8
|
+
let t2, l2;
|
|
9
|
+
console.log("templateShowName", e3);
|
|
10
|
+
let o2 = e3;
|
|
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;
|
|
11
13
|
}
|
|
12
14
|
function N(e3) {
|
|
13
|
-
|
|
15
|
+
v("export", f.configure, e3);
|
|
14
16
|
}
|
|
15
17
|
function O() {
|
|
16
|
-
|
|
18
|
+
v("close");
|
|
17
19
|
}
|
|
18
|
-
return
|
|
19
|
-
C.templateFiles && C.templateFiles.length > 0 ? b.value =
|
|
20
|
+
return l(() => {
|
|
21
|
+
C.templateFiles && C.templateFiles.length > 0 ? b.value = r(C.templateFiles, f.pageContext, f.configure) : C.templateUuid && C.templateName && b.value.push({ templateUuid: C.templateUuid, templateName: C.templateName }), b.value.forEach((e3) => {
|
|
20
22
|
e3 && e3.templateName && (e3.templateName = function(e4) {
|
|
21
|
-
const t2 =
|
|
22
|
-
return t2.forEach((t3) => {
|
|
23
|
-
const
|
|
24
|
-
let
|
|
25
|
-
-1 !== e4.indexOf(
|
|
23
|
+
const t2 = y(e4);
|
|
24
|
+
return console.log("fields", t2), t2.forEach((t3) => {
|
|
25
|
+
const l2 = m + t3 + g;
|
|
26
|
+
let o2;
|
|
27
|
+
-1 !== e4.indexOf(l2) && Object.prototype.hasOwnProperty.call(w, t3) && (o2 = w[t3] ? w[t3] : "", e4 = e4.replace(l2, o2));
|
|
26
28
|
}), e4;
|
|
27
29
|
}(e3.templateName));
|
|
28
|
-
}), b.value && 0 !== b.value.length || (
|
|
30
|
+
}), b.value && 0 !== b.value.length || (c({ message: "无符合条件可导出的模板!", type: "warning" }), v("close")), 1 === (b == null ? void 0 : b.value.length) ? (N(b.value[0]), v("close")) : x.value = true;
|
|
29
31
|
}), (e3, t2) => {
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
+
const l2 = o("el-table-column"), r2 = o("el-button"), c2 = o("el-table"), m2 = o("el-dialog");
|
|
33
|
+
return n(), a(m2, { modelValue: x.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => x.value = e4), "show-close": true, "append-to-body": true, title: e3.$t("superPageRuntimeMessage.selectTemplate"), onClose: O }, { default: u(() => [s(c2, { data: b.value, style: { width: "100%" } }, { default: u(() => [s(l2, { label: e3.$t("superPageRuntimeMessage.temlpate"), prop: "templateShowPath" }, { default: u((e4) => [i(p(e4.row.templateName), 1)]), _: 1 }, 8, ["label"]), s(l2, { label: e3.$t("superPageRuntimeMessage.operating"), width: "200", fixed: "right" }, { default: u((t3) => [s(r2, { 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: u(() => [i(p(e3.$t("superPageRuntimeMessage.export")), 1)]), _: 2 }, 1032, ["onClick", "loading"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["modelValue", "title"]);
|
|
32
34
|
};
|
|
33
35
|
} });
|
|
34
36
|
export {
|
|
35
|
-
|
|
37
|
+
d as default
|
|
36
38
|
};
|
|
@@ -54,7 +54,7 @@ const p = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
|
|
|
54
54
|
}
|
|
55
55
|
return [window];
|
|
56
56
|
})();
|
|
57
|
-
b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", z)), window.addEventListener("resize", L), S();
|
|
57
|
+
console.log("检测父级滚动节点", e3), b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", z)), window.addEventListener("resize", L), S();
|
|
58
58
|
} catch (e3) {
|
|
59
59
|
console.error(e3);
|
|
60
60
|
}
|