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