super-page-runtime 2.2.74 → 2.2.77-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/charts/chart-columnline-util.js +74 -74
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -1
- package/dist/es/components/runtime/utils/charts/chart-util.js +5 -5
- package/dist/es/components/runtime/utils/events/standard-event.js +152 -153
- package/dist/es/components/runtime/utils/events/validator-util.js +48 -38
- package/dist/es/components/runtime/utils/page-permission-util.js +16 -16
- package/dist/es/components/runtime/utils/tree-utils.js +24 -23
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +16 -13
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +15 -11
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +6 -5
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +125 -111
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +3 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +76 -54
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +6 -6
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +32 -27
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -0
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +54 -52
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +16 -14
- 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 +77 -73
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +6 -1
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +29 -29
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +5 -4
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +13 -13
- package/dist/es/components/runtime/views/{super-page-dialog.vue2.js → super-page-dialog.vue3.js} +1 -0
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +17 -15
- package/dist/es/index.js +1 -0
- package/dist/es/style.css +225 -99
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getValueFromSource as e, formatVariableValue as
|
|
1
|
+
import { getValueFromSource as e, formatVariableValue as t, setValueForVariableName as i } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy as s } from "../common-util.js";
|
|
3
|
-
import { CommonName as o, caculateFormulaValue as a, sortDatas as l, limitDatas as n, executeChartFormula as
|
|
4
|
-
import { handleChartEvent as
|
|
3
|
+
import { CommonName as o, caculateFormulaValue as a, sortDatas as l, limitDatas as n, executeChartFormula as r } from "./chart-util.js";
|
|
4
|
+
import { handleChartEvent as u } from "../events/event-util.js";
|
|
5
5
|
function c(c2, d, f, p) {
|
|
6
6
|
if (!p || !p.result) return;
|
|
7
|
-
|
|
7
|
+
u(c2, d, "beforeUpdateChart", f, { resultData: p });
|
|
8
8
|
const m = p && p.result ? p.result : {};
|
|
9
9
|
let h = p && p.groupValue ? p.groupValue : void 0;
|
|
10
10
|
const y = d.serviceDataField;
|
|
@@ -15,116 +15,116 @@ function c(c2, d, f, p) {
|
|
|
15
15
|
h = [];
|
|
16
16
|
for (const e2 of v) h.push(e2.group);
|
|
17
17
|
}
|
|
18
|
-
const F = {},
|
|
19
|
-
for (const e2 of v) F[e2.group] = e2.target, e2.target && !
|
|
18
|
+
const F = {}, S = [], D = [];
|
|
19
|
+
for (const e2 of v) F[e2.group] = e2.target, e2.target && !S.includes(e2.target) && (S.push(e2.target), h.includes(e2.group) && D.push(e2.target));
|
|
20
20
|
let x = d.props ? d.props.mulGroupShow : "";
|
|
21
21
|
x = "break" == x ? "\r\n" : " ";
|
|
22
|
-
for (const
|
|
23
|
-
if (!
|
|
24
|
-
const
|
|
22
|
+
for (const t2 of g) {
|
|
23
|
+
if (!t2) continue;
|
|
24
|
+
const i2 = [];
|
|
25
25
|
for (const s3 of h) {
|
|
26
|
-
const o2 = F[s3], a2 = e(
|
|
27
|
-
a2 &&
|
|
26
|
+
const o2 = F[s3], a2 = e(t2, o2, void 0);
|
|
27
|
+
a2 && i2.push(a2);
|
|
28
28
|
}
|
|
29
|
-
const s2 =
|
|
30
|
-
|
|
29
|
+
const s2 = i2.join(x);
|
|
30
|
+
t2[o.X_FIELD_NAME] = s2;
|
|
31
31
|
}
|
|
32
|
-
const N = d.items ? d.items : [], E = [], A = {}, _ = [], b = {},
|
|
33
|
-
for (const e2 of
|
|
32
|
+
const N = d.items ? d.items : [], E = [], A = {}, _ = [], b = {}, w = [], C = [], I = /* @__PURE__ */ new Set(), X = a(N, g, I);
|
|
33
|
+
for (const e2 of I) w.push(e2);
|
|
34
34
|
for (const e2 of N) {
|
|
35
|
-
const
|
|
35
|
+
const t2 = e2.props ? e2.props : {}, i2 = t2.yaxisSource, s2 = t2.yaxisField, o2 = t2.isCumulative;
|
|
36
36
|
let a2 = null;
|
|
37
|
-
if (!s2 ||
|
|
38
|
-
let
|
|
39
|
-
for (const e3 in
|
|
40
|
-
a2 = { uuid: e2.uuid, type: "formula", formula:
|
|
41
|
-
} else a2 = { uuid: e2.uuid, type: "fixed", field:
|
|
42
|
-
else a2 = { uuid: e2.uuid, type: "variable", field: s2, isCumulative: o2, data: [], dynamicDatas: [] }, s2 && !
|
|
43
|
-
null != a2 && (E.push(a2), A[e2.uuid] = a2),
|
|
37
|
+
if (!s2 || i2 && "variable" != i2) if ("formula" == i2) {
|
|
38
|
+
let i3 = t2.formula ? t2.formula : "";
|
|
39
|
+
for (const e3 in X) i3 = i3.replace(new RegExp(e3.replace("$", "\\$"), "g"), X[e3]);
|
|
40
|
+
a2 = { uuid: e2.uuid, type: "formula", formula: i3, data: [], dynamicDatas: [] };
|
|
41
|
+
} else a2 = { uuid: e2.uuid, type: "fixed", field: t2.yaxisFix, data: [], dynamicDatas: [] };
|
|
42
|
+
else a2 = { uuid: e2.uuid, type: "variable", field: s2, isCumulative: o2, data: [], dynamicDatas: [] }, s2 && !w.includes(s2) && (w.push(s2), C.push(s2)), o2 && !I.has(s2) && I.add(s2);
|
|
43
|
+
null != a2 && (E.push(a2), A[e2.uuid] = a2), t2.dynamicSeriesField && !_.includes(t2.dynamicSeriesField) && a2 && (a2.dynamicField = t2.dynamicSeriesField, a2.dynamicSeriesTitle = t2.dynamicSeriesTitle, a2.dynamicShowStack = t2.dynamicShowStack, _.push(t2.dynamicSeriesField), b[t2.dynamicSeriesField] = s2);
|
|
44
44
|
}
|
|
45
45
|
const L = {};
|
|
46
46
|
if (_.length > 0) {
|
|
47
|
-
const
|
|
48
|
-
for (const s2 of g) if (s2) for (const a2 of
|
|
47
|
+
const t2 = [], i2 = {};
|
|
48
|
+
for (const s2 of g) if (s2) for (const a2 of w) {
|
|
49
49
|
const l2 = s2[o.X_FIELD_NAME];
|
|
50
|
-
let n2 =
|
|
50
|
+
let n2 = i2[l2];
|
|
51
51
|
if (!n2) {
|
|
52
52
|
n2 = {};
|
|
53
|
-
for (const e2 of
|
|
54
|
-
n2[o.X_FIELD_NAME] = s2[o.X_FIELD_NAME],
|
|
53
|
+
for (const e2 of S) n2[e2] = s2[e2];
|
|
54
|
+
n2[o.X_FIELD_NAME] = s2[o.X_FIELD_NAME], i2[l2] = n2, t2.push(n2);
|
|
55
55
|
}
|
|
56
|
-
let
|
|
57
|
-
if (!isNaN(
|
|
56
|
+
let r2 = e(s2, a2, void 0);
|
|
57
|
+
if (!isNaN(r2)) {
|
|
58
58
|
const e2 = n2[a2];
|
|
59
|
-
isNaN || (
|
|
59
|
+
isNaN || (r2 += e2), n2[a2] = r2;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
for (const
|
|
62
|
+
for (const t3 of _) {
|
|
63
63
|
const s2 = [];
|
|
64
64
|
for (const a2 of g) {
|
|
65
65
|
if (!a2) continue;
|
|
66
|
-
const l2 =
|
|
66
|
+
const l2 = i2[a2[o.X_FIELD_NAME]];
|
|
67
67
|
if (!l2) continue;
|
|
68
|
-
let n2 = e(a2,
|
|
69
|
-
n2 = null == n2 || null == n2 ? "" : n2, s2.includes(n2) || (s2.push(n2),
|
|
70
|
-
const
|
|
71
|
-
if (void 0 !==
|
|
72
|
-
const
|
|
73
|
-
let
|
|
74
|
-
void 0 ===
|
|
68
|
+
let n2 = e(a2, t3, void 0);
|
|
69
|
+
n2 = null == n2 || null == n2 ? "" : n2, s2.includes(n2) || (s2.push(n2), C.push(n2), I.add(n2));
|
|
70
|
+
const r2 = b[t3];
|
|
71
|
+
if (void 0 !== r2) {
|
|
72
|
+
const t4 = e(a2, r2, void 0);
|
|
73
|
+
let i3 = l2[n2];
|
|
74
|
+
void 0 === i3 ? i3 = t4 : isNaN(t4) || (i3 += t4), l2[n2] = i3;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
L[
|
|
77
|
+
L[t3] = s2;
|
|
78
78
|
}
|
|
79
|
-
g =
|
|
79
|
+
g = t2;
|
|
80
80
|
}
|
|
81
|
-
l(c2, d, g), g = n(c2, d, g,
|
|
81
|
+
l(c2, d, g), g = n(c2, d, g, S, C);
|
|
82
82
|
const M = [], j = {};
|
|
83
|
-
for (const
|
|
84
|
-
for (const
|
|
85
|
-
const s2 = e(
|
|
86
|
-
let o2 = j[
|
|
87
|
-
void 0 === s2 || isNaN(s2) || (void 0 === o2 ? o2 = s2 : o2 += s2), j[
|
|
83
|
+
for (const t2 of g) if (t2) {
|
|
84
|
+
for (const i2 of I) {
|
|
85
|
+
const s2 = e(t2, i2, void 0);
|
|
86
|
+
let o2 = j[i2];
|
|
87
|
+
void 0 === s2 || isNaN(s2) || (void 0 === o2 ? o2 = s2 : o2 += s2), j[i2] = o2;
|
|
88
88
|
}
|
|
89
|
-
M.push(
|
|
90
|
-
for (const
|
|
91
|
-
let s2 =
|
|
92
|
-
const o2 =
|
|
93
|
-
if (
|
|
94
|
-
let a2 = L[
|
|
89
|
+
M.push(t2[o.X_FIELD_NAME]);
|
|
90
|
+
for (const i2 of E) {
|
|
91
|
+
let s2 = i2.data;
|
|
92
|
+
const o2 = i2.dynamicDatas;
|
|
93
|
+
if (i2.dynamicField) {
|
|
94
|
+
let a2 = L[i2.dynamicField];
|
|
95
95
|
a2 = a2 || [];
|
|
96
96
|
for (let l2 = 0; l2 < a2.length; l2++) {
|
|
97
97
|
l2 >= o2.length && o2.push([]), s2 = o2[l2];
|
|
98
98
|
const n2 = a2[l2];
|
|
99
|
-
let
|
|
100
|
-
|
|
99
|
+
let r2 = e(t2, n2, void 0);
|
|
100
|
+
i2.isCumulative && (r2 = j[n2]), s2.push(r2);
|
|
101
101
|
}
|
|
102
|
-
} else if ("fixed" ===
|
|
103
|
-
else if ("variable" ===
|
|
104
|
-
let o3 = e(
|
|
105
|
-
|
|
106
|
-
} else if ("formula" ===
|
|
107
|
-
const e2 =
|
|
102
|
+
} else if ("fixed" === i2.type) s2.push(i2.field);
|
|
103
|
+
else if ("variable" === i2.type) {
|
|
104
|
+
let o3 = e(t2, i2.field, void 0);
|
|
105
|
+
i2.isCumulative && (o3 = j[i2.field]), s2.push(o3);
|
|
106
|
+
} else if ("formula" === i2.type) {
|
|
107
|
+
const e2 = r(i2.formula, j, t2, c2);
|
|
108
108
|
s2.push(e2);
|
|
109
109
|
} else s2.push(void 0);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
const k = d.defaultSeries, T = s(null == k ? [] : k), V = [];
|
|
113
113
|
for (const e2 of T) {
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
116
|
-
let o2 = L[
|
|
114
|
+
const i2 = A[e2.uuid];
|
|
115
|
+
if (i2.dynamicField) {
|
|
116
|
+
let o2 = L[i2.dynamicField];
|
|
117
117
|
o2 = o2 || [];
|
|
118
|
-
const a2 =
|
|
118
|
+
const a2 = i2.dynamicDatas ? i2.dynamicDatas : [];
|
|
119
119
|
for (let l2 = 0; l2 < o2.length; l2++) {
|
|
120
|
-
const n2 = o2[l2],
|
|
121
|
-
if (
|
|
122
|
-
const e3 =
|
|
123
|
-
|
|
124
|
-
} else
|
|
125
|
-
|
|
120
|
+
const n2 = o2[l2], r2 = s(e2);
|
|
121
|
+
if (i2.dynamicSeriesTitle) {
|
|
122
|
+
const e3 = i2.dynamicSeriesTitle.replace("${name}", n2);
|
|
123
|
+
r2.name = t(c2, e3);
|
|
124
|
+
} else r2.name = n2;
|
|
125
|
+
r2.data = l2 < a2.length ? a2[l2] : [], "bar" == e2.type && i2.dynamicShowStack && (r2.stack = e2.uuid), V.push(r2);
|
|
126
126
|
}
|
|
127
|
-
} else e2.data =
|
|
127
|
+
} else e2.data = i2 ? i2.data : [], V.push(e2);
|
|
128
128
|
}
|
|
129
129
|
f.series = V;
|
|
130
130
|
const $ = d.defaultXaxis, G = d.defaultYaxis;
|
|
@@ -133,7 +133,7 @@ function c(c2, d, f, p) {
|
|
|
133
133
|
f.xAxis = $, f.yAxis = G;
|
|
134
134
|
} else $ && $.length > 0 && ($[0].data = M), f.xAxis = $, f.yAxis = G;
|
|
135
135
|
const R = d.props ? d.props.selGroupVariable : null;
|
|
136
|
-
!(d.props ? d.props.enableDrill : null) && R && (d.highlightInfos = [],
|
|
136
|
+
!(d.props ? d.props.enableDrill : null) && R && (d.highlightInfos = [], i(c2.entity, R, null)), u(c2, d, "afterUpdateChart", f, { resultData: p }), d.groupFields = D, d.cacheDatas = g, d.rawResult = p;
|
|
137
137
|
}
|
|
138
138
|
export {
|
|
139
139
|
c as updateChartOption
|
|
@@ -66,7 +66,7 @@ export declare function limitDatas(pageContext: PageContext, configure: Componen
|
|
|
66
66
|
* @param accumulateFields 累计计算的字段
|
|
67
67
|
* @returns
|
|
68
68
|
*/
|
|
69
|
-
export declare function caculateFormulaValue(itemConfs: any, datas: any, accumulateFields:
|
|
69
|
+
export declare function caculateFormulaValue(itemConfs: any, datas: any, accumulateFields: Set<string>): any;
|
|
70
70
|
/**
|
|
71
71
|
* 获取数据源中的最小值
|
|
72
72
|
* @param datas 数据源
|
|
@@ -5,9 +5,9 @@ import { getDefaultValue as i } from "../page-init-util.js";
|
|
|
5
5
|
import { getValueFromSource as s, setValueForVariableName as o, getParamNames as r, formatVariableValue as l, getValueFromVariable as a, setVariableValue as c } from "../page-helper-util.js";
|
|
6
6
|
import { appendDefaultMethods as f } from "../events/event-util.js";
|
|
7
7
|
var u = ((t2) => (t2.X_FIELD_NAME = "__x", t2.Y_TEMP_NAME = "__y", t2))(u || {});
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
return
|
|
8
|
+
const d = { theme1: t, theme2: e, theme3: n };
|
|
9
|
+
function p(t2) {
|
|
10
|
+
return d[t2];
|
|
11
11
|
}
|
|
12
12
|
function h() {
|
|
13
13
|
return [{ value: "theme1", label: "主题1" }, { value: "theme2", label: "主题2" }, { value: "theme3", label: "主题3" }];
|
|
@@ -177,7 +177,7 @@ function y(t2, e2, n2) {
|
|
|
177
177
|
else if (t4.startsWith("${avg.")) i2[t4] = A(e2, t4.substring(6, t4.length - 1));
|
|
178
178
|
else if (t4.startsWith("${add.")) {
|
|
179
179
|
const e3 = t4.substring(6, t4.length - 1);
|
|
180
|
-
n2.
|
|
180
|
+
n2.add(e3);
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
}
|
|
@@ -258,7 +258,7 @@ export {
|
|
|
258
258
|
k as executeChartFormula,
|
|
259
259
|
M as exportCommonChart,
|
|
260
260
|
A as getAvgValue,
|
|
261
|
-
|
|
261
|
+
p as getCustomTheme,
|
|
262
262
|
h as getCustomThemeOptions,
|
|
263
263
|
F as getMaxValue,
|
|
264
264
|
S as getMinValue,
|