super-page-runtime 2.3.19-sit1 → 2.3.19-sit3
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/assets/chart-themes/bar-theme.d.ts +6 -0
- package/dist/es/assets/chart-themes/bar-theme.js +4 -0
- package/dist/es/assets/chart-themes/gauge-theme.d.ts +6 -0
- package/dist/es/assets/chart-themes/gauge-theme.js +4 -0
- package/dist/es/assets/chart-themes/pie-theme.d.ts +6 -0
- package/dist/es/assets/chart-themes/pie-theme.js +4 -0
- package/dist/es/assets/chart-themes/radar-theme.d.ts +6 -0
- package/dist/es/assets/chart-themes/radar-theme.js +4 -0
- package/dist/es/assets/chart-themes/scatter-theme.d.ts +6 -0
- package/dist/es/assets/chart-themes/scatter-theme.js +4 -0
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -1
- package/dist/es/components/runtime/utils/charts/chart-util.js +118 -117
- package/dist/es/components/runtime/utils/events/data-backfill-util.d.ts +27 -0
- package/dist/es/components/runtime/utils/events/data-backfill-util.js +39 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +397 -369
- package/dist/es/components/runtime/utils/page-helper-util.js +4 -3
- package/dist/es/components/runtime/utils/page-init-util.d.ts +2 -1
- package/dist/es/components/runtime/utils/page-init-util.js +86 -65
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +9 -9
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +47 -46
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +45 -28
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +13 -13
- package/dist/es/components/runtime/views/super-page.vue.d.ts +9 -0
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +128 -120
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +88 -88
- package/package.json +2 -2
- package/dist/es/assets/chart-themes/theme1.d.ts +0 -4
- package/dist/es/assets/chart-themes/theme1.js +0 -4
- package/dist/es/assets/chart-themes/theme2.d.ts +0 -4
- package/dist/es/assets/chart-themes/theme2.js +0 -4
- package/dist/es/assets/chart-themes/theme3.d.ts +0 -4
- package/dist/es/assets/chart-themes/theme3.js +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const c = { theme1: { color: ["#43C2C0", "#978DEB", "#FFBC5D", "#50ADFC", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme2: { color: ["#5FC8FB", "#9DE3CE", "#FFB47B", "#F88D7D", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme3: { color: ["#95C0F7", "#D3DE8F", "#61D4EB", "#F0BB50", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] } };
|
|
2
|
+
export {
|
|
3
|
+
c as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const c = { theme1: { color: ["red", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme2: { color: ["yellow", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme3: { color: ["green", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] } };
|
|
2
|
+
export {
|
|
3
|
+
c as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const c = { theme1: { color: ["#50ADFC", "#FFBC5D", "#FF8484", "#978DEB", "#43C2C0", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme2: { color: ["#5FC8FB", "#FFB47B", "#FFE101", "#F97C6D", "#8CD193", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme3: { color: ["#D3DE8F", "#F961B0", "#F0BB50", "#978DEB", "#95C0F7", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] } };
|
|
2
|
+
export {
|
|
3
|
+
c as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const c = { theme1: { color: ["#50ADFC", "#978DEB", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme2: { color: ["#5FC8FB", "#95A4DF", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme3: { color: ["#D3DE8F", "#61D4EB", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] } };
|
|
2
|
+
export {
|
|
3
|
+
c as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const c = { theme1: { color: ["red", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme2: { color: ["yellow", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] }, theme3: { color: ["green", "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"] } };
|
|
2
|
+
export {
|
|
3
|
+
c as default
|
|
4
|
+
};
|
|
@@ -12,7 +12,7 @@ export declare enum CommonName {
|
|
|
12
12
|
* @param themeName 获取自定义的主题名称
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
15
|
-
export declare function getCustomTheme(themeName: string): any;
|
|
15
|
+
export declare function getCustomTheme(themeName: string, chartType?: string): any;
|
|
16
16
|
/**
|
|
17
17
|
* 获取所有主题对象
|
|
18
18
|
* @returns
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import t from "../../../../assets/chart-themes/
|
|
2
|
-
import e from "../../../../assets/chart-themes/
|
|
3
|
-
import n from "../../../../assets/chart-themes/
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import t from "../../../../assets/chart-themes/bar-theme.js";
|
|
2
|
+
import e from "../../../../assets/chart-themes/gauge-theme.js";
|
|
3
|
+
import n from "../../../../assets/chart-themes/pie-theme.js";
|
|
4
|
+
import i from "../../../../assets/chart-themes/radar-theme.js";
|
|
5
|
+
import s from "../../../../assets/chart-themes/scatter-theme.js";
|
|
6
|
+
import { getDefaultValue as r } from "../page-init-util.js";
|
|
7
|
+
import { getValueFromSource as o, setValueForVariableName as a, getParamNames as l, formatVariableValue as c, getValueFromVariable as f, setVariableValue as u } from "../page-helper-util.js";
|
|
8
|
+
import { getI18n as d } from "agilebuilder-ui/src/utils/util";
|
|
9
|
+
import { appendDefaultMethods as p } from "../events/event-util.js";
|
|
10
|
+
var h = ((t2) => (t2.X_FIELD_NAME = "__x", t2.Y_TEMP_NAME = "__y", t2))(h || {});
|
|
11
|
+
function g(r2, o2 = "bar") {
|
|
12
|
+
return "bar" === o2 ? t[r2] : "gauge" === o2 ? e[r2] : "pie" === o2 ? n[r2] : "radar" === o2 ? i[r2] : "scatter" === o2 ? s[r2] : t[r2];
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
+
function m() {
|
|
14
15
|
return [{ value: "theme1", label: "主题1" }, { value: "theme2", label: "主题2" }, { value: "theme3", label: "主题3" }];
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
-
return function(
|
|
18
|
-
let
|
|
19
|
-
if (s2 && (
|
|
20
|
-
if (Array.isArray(
|
|
21
|
-
if (isNaN(
|
|
17
|
+
function x(t2, e2, n2, i2, s2) {
|
|
18
|
+
return function(r2) {
|
|
19
|
+
let o2 = r2 == null ? void 0 : r2.value;
|
|
20
|
+
if (s2 && (o2 = r2), null == o2 || null == o2) return o2;
|
|
21
|
+
if (Array.isArray(o2)) return o2;
|
|
22
|
+
if (isNaN(o2) || !t2 || !t2.indexOf) return o2;
|
|
22
23
|
if (t2.indexOf("precision") > -1) {
|
|
23
24
|
let t3 = parseInt(e2);
|
|
24
|
-
(null == t3 || isNaN(t3)) && (t3 = 2),
|
|
25
|
+
(null == t3 || isNaN(t3)) && (t3 = 2), o2 = parseFloat(parseFloat(o2).toFixed(t3));
|
|
25
26
|
}
|
|
26
27
|
let a2 = "";
|
|
27
28
|
t2.indexOf("prefix") > -1 && n2 && (a2 = n2);
|
|
28
29
|
let l2 = "";
|
|
29
|
-
return t2.indexOf("append") > -1 && i2 && (l2 = i2), a2 +
|
|
30
|
+
return t2.indexOf("append") > -1 && i2 && (l2 = i2), a2 + o2.toLocaleString() + l2;
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function b(t2, e2) {
|
|
33
34
|
if (!e2) return;
|
|
34
|
-
if (e2.tooltipFormatterArgs && (e2.tooltip || (e2.tooltip = {}), e2.tooltip.valueFormatter =
|
|
35
|
+
if (e2.tooltipFormatterArgs && (e2.tooltip || (e2.tooltip = {}), e2.tooltip.valueFormatter = x.apply(e2, e2.tooltipFormatterArgs)), e2.series) {
|
|
35
36
|
const n3 = t2.props ? t2.props.enableDrill : null;
|
|
36
|
-
for (const i3 of e2.series) e2.radar || (i3.data = []), i3.labelFormatterArgs && (i3.label || (i3.label = {}), i3.label.formatter =
|
|
37
|
+
for (const i3 of e2.series) e2.radar || (i3.data = []), i3.labelFormatterArgs && (i3.label || (i3.label = {}), i3.label.formatter = x.apply(i3, i3.labelFormatterArgs)), !n3 && t2.clickSet && t2.clickSet.selected && i3.emphasis && (i3.emphasis.disabled = false), "pie" === i3.type && t2.clickSet && t2.clickSet.selected && (t2.clickSet.multiple ? i3.selectedMode = "multiple" : i3.selectedMode = "single");
|
|
37
38
|
}
|
|
38
39
|
if (e2.radar) for (const t3 of e2.radar) t3.indicator = [];
|
|
39
40
|
const n2 = e2.series;
|
|
@@ -52,62 +53,62 @@ function I(t2, e2, n2) {
|
|
|
52
53
|
if (!(n2 && e2 && e2.clickSet && t2)) return;
|
|
53
54
|
const i2 = e2.clickSet;
|
|
54
55
|
n2.on("click", function(s2) {
|
|
55
|
-
let
|
|
56
|
-
if (
|
|
56
|
+
let r2 = e2.highlightInfos ? e2.highlightInfos : [], o2 = -1;
|
|
57
|
+
if (r2) {
|
|
57
58
|
const t3 = [];
|
|
58
|
-
for (let a2 = 0; a2 <
|
|
59
|
-
const l2 =
|
|
59
|
+
for (let a2 = 0; a2 < r2.length; a2++) {
|
|
60
|
+
const l2 = r2[a2], c2 = l2.seriesIndex === s2.seriesIndex && l2.dataIndex === s2.dataIndex;
|
|
60
61
|
if (c2 || !i2.multiple) {
|
|
61
62
|
if (i2.selected) {
|
|
62
63
|
const t4 = "chart-pie" === e2.name ? "unselect" : "downplay";
|
|
63
64
|
n2.dispatchAction({ type: t4, seriesIndex: l2.seriesIndex, dataIndex: l2.dataIndex });
|
|
64
65
|
}
|
|
65
66
|
} else t3.push(l2);
|
|
66
|
-
c2 && (
|
|
67
|
+
c2 && (o2 = a2);
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
+
r2 = t3;
|
|
69
70
|
}
|
|
70
|
-
if (-1 ===
|
|
71
|
+
if (-1 === o2) {
|
|
71
72
|
if (i2.selected) {
|
|
72
73
|
const t3 = "chart-pie" === e2.name ? "select" : "highlight";
|
|
73
74
|
n2.dispatchAction({ type: t3, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
|
|
74
75
|
}
|
|
75
|
-
|
|
76
|
+
r2.push({ seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
|
|
76
77
|
}
|
|
77
|
-
e2.highlightInfos =
|
|
78
|
+
e2.highlightInfos = r2, N(t2, e2);
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
+
function v(t2, e2, n2) {
|
|
81
82
|
if (!n2 || !e2 || !t2) return;
|
|
82
83
|
const i2 = e2.highlightInfos ? e2.highlightInfos : [];
|
|
83
84
|
for (let t3 = 0; t3 < i2.length; t3++) {
|
|
84
|
-
const s2 = i2[t3],
|
|
85
|
-
n2.dispatchAction({ type:
|
|
85
|
+
const s2 = i2[t3], r2 = "chart-pie" === e2.name ? "unselect" : "downplay";
|
|
86
|
+
n2.dispatchAction({ type: r2, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
|
|
86
87
|
}
|
|
87
|
-
e2.highlightInfos = [],
|
|
88
|
+
e2.highlightInfos = [], N(t2, e2);
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
+
function N(t2, e2) {
|
|
90
91
|
if (!e2.clickSet) return;
|
|
91
92
|
const n2 = e2.clickSet, i2 = n2.variables;
|
|
92
93
|
if (!i2 || 0 == i2.length) return;
|
|
93
|
-
const
|
|
94
|
-
for (const t3 of
|
|
94
|
+
const s2 = e2.highlightInfos ? e2.highlightInfos : [], r2 = e2.cacheDatas ? e2.cacheDatas : [], l2 = [], c2 = [];
|
|
95
|
+
for (const t3 of s2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex < r2.length && l2.push(r2[t3.dataIndex]));
|
|
95
96
|
for (const e3 of i2) {
|
|
96
97
|
if (!e3.fieldName || !e3.variable) continue;
|
|
97
98
|
const i3 = [];
|
|
98
99
|
for (const t3 of l2) {
|
|
99
|
-
const n3 =
|
|
100
|
+
const n3 = o(t3, e3.fieldName, void 0);
|
|
100
101
|
null != n3 && i3.push(n3);
|
|
101
102
|
}
|
|
102
|
-
n2.multiple ?
|
|
103
|
+
n2.multiple ? a(t2.entity, e3.variable, i3) : a(t2.entity, e3.variable, i3.length > 0 ? i3[0] : void 0);
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
|
-
function
|
|
106
|
-
const i2 = e2.items ? e2.items : [],
|
|
106
|
+
function y(t2, e2, n2) {
|
|
107
|
+
const i2 = e2.items ? e2.items : [], s2 = e2.props ? e2.props.orderByTarget : "";
|
|
107
108
|
let r2 = null;
|
|
108
|
-
if ("x" ==
|
|
109
|
-
else if (
|
|
110
|
-
for (const t3 of i2) if (t3.uuid ==
|
|
109
|
+
if ("x" == s2 || "X" == s2) r2 = "__x";
|
|
110
|
+
else if (s2) {
|
|
111
|
+
for (const t3 of i2) if (t3.uuid == s2) {
|
|
111
112
|
const e3 = t3.props ? t3.props : {}, n3 = e3.yaxisSource, i3 = e3.yaxisField;
|
|
112
113
|
if (i3 && (!n3 || "variable" == n3)) {
|
|
113
114
|
r2 = i3;
|
|
@@ -116,60 +117,60 @@ function N(t2, e2, n2) {
|
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
if (!r2) return;
|
|
119
|
-
const
|
|
120
|
-
let
|
|
121
|
-
if ("variable" ==
|
|
120
|
+
const a2 = e2.props ? e2.props.orderSource : "";
|
|
121
|
+
let l2 = e2.props ? e2.props.orderFix : "";
|
|
122
|
+
if ("variable" == a2) {
|
|
122
123
|
const n3 = e2.props ? e2.props.orderVariable : "";
|
|
123
|
-
|
|
124
|
+
l2 = c(t2, n3);
|
|
124
125
|
}
|
|
125
|
-
|
|
126
|
-
const n3 =
|
|
127
|
-
return "desc" ===
|
|
126
|
+
l2 = "desc" == l2 || "DESC" == l2 ? "desc" : "asc", n2.sort((t3, e3) => {
|
|
127
|
+
const n3 = o(t3, r2, void 0), i3 = o(e3, r2, void 0);
|
|
128
|
+
return "desc" === l2 ? i3 - n3 : n3 - i3;
|
|
128
129
|
});
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
+
function S(t2, e2, n2, i2, s2) {
|
|
131
132
|
if (!n2) return n2;
|
|
132
133
|
const r2 = e2.props ? e2.props : {};
|
|
133
134
|
if (!r2.limitQuantity) return n2;
|
|
134
|
-
let
|
|
135
|
-
if (r2.itemNumVariable ? (
|
|
136
|
-
if (n2.length <
|
|
137
|
-
const
|
|
138
|
-
i2 = i2 || [],
|
|
135
|
+
let a2 = null;
|
|
136
|
+
if (r2.itemNumVariable ? (a2 = c(t2, r2.itemNumVariable), a2 = parseInt(a2)) : a2 = r2.itemNumFix ? r2.itemNumFix : 10, null == a2 || null == a2 || isNaN(a2)) return n2;
|
|
137
|
+
if (n2.length < a2) return n2;
|
|
138
|
+
const l2 = r2.overItemAlias, f2 = [], u2 = {};
|
|
139
|
+
i2 = i2 || [], s2 = s2 || [];
|
|
139
140
|
for (let t3 = 0; t3 < n2.length; t3++) {
|
|
140
141
|
const e3 = n2[t3];
|
|
141
|
-
if (t3 <
|
|
142
|
+
if (t3 < a2) f2.push(e3);
|
|
142
143
|
else {
|
|
143
|
-
if (!
|
|
144
|
+
if (!l2) break;
|
|
144
145
|
for (const t4 of i2) {
|
|
145
146
|
if (!t4) continue;
|
|
146
|
-
let n3 =
|
|
147
|
+
let n3 = o(e3, t4, void 0);
|
|
147
148
|
n3 = null == n3 || null == n3 ? "" : n3, u2[t4] || (u2[t4] = []);
|
|
148
149
|
const i3 = u2[t4];
|
|
149
150
|
i3.includes(n3) || i3.push(n3);
|
|
150
151
|
}
|
|
151
|
-
for (const t4 of
|
|
152
|
+
for (const t4 of s2) {
|
|
152
153
|
if (!t4) continue;
|
|
153
|
-
const n3 =
|
|
154
|
+
const n3 = o(e3, t4, void 0);
|
|
154
155
|
if (isNaN(n3)) continue;
|
|
155
156
|
const i3 = u2[t4];
|
|
156
157
|
isNaN(i3) ? u2[t4] = n3 : u2[t4] = n3 + i3;
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
160
|
}
|
|
160
|
-
return
|
|
161
|
+
return l2 && (u2.__x = l2, f2.push(u2)), f2;
|
|
161
162
|
}
|
|
162
|
-
function
|
|
163
|
+
function F(t2, e2, n2) {
|
|
163
164
|
const i2 = {};
|
|
164
165
|
for (const s2 of t2) {
|
|
165
166
|
const t3 = s2.props ? s2.props : {};
|
|
166
167
|
if ("formula" === t3.yaxisSource) {
|
|
167
|
-
const s3 =
|
|
168
|
+
const s3 = l(t3.formula);
|
|
168
169
|
for (const t4 of s3) if (!(t4 in i2)) {
|
|
169
|
-
if (t4.startsWith("${min.")) i2[t4] =
|
|
170
|
-
else if (t4.startsWith("${max.")) i2[t4] =
|
|
171
|
-
else if (t4.startsWith("${sum.")) i2[t4] =
|
|
172
|
-
else if (t4.startsWith("${avg.")) i2[t4] =
|
|
170
|
+
if (t4.startsWith("${min.")) i2[t4] = _(e2, t4.substring(6, t4.length - 1));
|
|
171
|
+
else if (t4.startsWith("${max.")) i2[t4] = A(e2, t4.substring(6, t4.length - 1));
|
|
172
|
+
else if (t4.startsWith("${sum.")) i2[t4] = M(e2, t4.substring(6, t4.length - 1));
|
|
173
|
+
else if (t4.startsWith("${avg.")) i2[t4] = k(e2, t4.substring(6, t4.length - 1));
|
|
173
174
|
else if (t4.startsWith("${add.")) {
|
|
174
175
|
const e3 = t4.substring(6, t4.length - 1);
|
|
175
176
|
n2.add(e3);
|
|
@@ -179,70 +180,70 @@ function S(t2, e2, n2) {
|
|
|
179
180
|
}
|
|
180
181
|
return i2;
|
|
181
182
|
}
|
|
182
|
-
function
|
|
183
|
+
function _(t2, e2) {
|
|
183
184
|
let n2;
|
|
184
185
|
for (const i2 of t2) {
|
|
185
|
-
const t3 = parseFloat(
|
|
186
|
+
const t3 = parseFloat(o(i2, e2, null));
|
|
186
187
|
(void 0 === n2 || !isNaN(t3) && t3 < n2) && (n2 = t3);
|
|
187
188
|
}
|
|
188
189
|
return n2;
|
|
189
190
|
}
|
|
190
|
-
function
|
|
191
|
+
function A(t2, e2) {
|
|
191
192
|
let n2;
|
|
192
193
|
for (const i2 of t2) {
|
|
193
|
-
const t3 = parseFloat(
|
|
194
|
+
const t3 = parseFloat(o(i2, e2, null));
|
|
194
195
|
(void 0 === n2 || !isNaN(t3) && t3 > n2) && (n2 = t3);
|
|
195
196
|
}
|
|
196
197
|
return n2;
|
|
197
198
|
}
|
|
198
|
-
function
|
|
199
|
+
function M(t2, e2) {
|
|
199
200
|
let n2;
|
|
200
201
|
for (const i2 of t2) {
|
|
201
|
-
const t3 = parseFloat(
|
|
202
|
+
const t3 = parseFloat(o(i2, e2, null));
|
|
202
203
|
void 0 === n2 ? n2 = t3 : isNaN(t3) || (n2 += t3);
|
|
203
204
|
}
|
|
204
205
|
return n2;
|
|
205
206
|
}
|
|
206
|
-
function
|
|
207
|
-
const n2 =
|
|
207
|
+
function k(t2, e2) {
|
|
208
|
+
const n2 = M(t2, e2);
|
|
208
209
|
return void 0 === n2 || 0 === t2.length ? n2 : parseFloat((n2 / t2.length).toFixed(5));
|
|
209
210
|
}
|
|
210
|
-
function
|
|
211
|
+
function w(t2, e2, n2, i2) {
|
|
211
212
|
if (!t2) return;
|
|
212
213
|
if (e2) for (const n3 in e2) t2 = t2.replace(new RegExp("\\${add." + n3 + "}", "g"), e2[n3]);
|
|
213
|
-
const
|
|
214
|
-
for (const e3 of
|
|
215
|
-
let
|
|
216
|
-
|
|
214
|
+
const s2 = l(t2);
|
|
215
|
+
for (const e3 of s2) {
|
|
216
|
+
let s3 = null;
|
|
217
|
+
s3 = e3.startsWith("${row.") ? o(n2, e3.substring(6, e3.length - 1), null) : f(i2.entity, e3), t2 = t2.replace(new RegExp(e3.replace("$", "\\$"), "g"), s3);
|
|
217
218
|
}
|
|
218
219
|
t2.includes("return ") || (t2 = "return " + t2);
|
|
219
|
-
const
|
|
220
|
-
return
|
|
220
|
+
const r2 = new Function("params", t2);
|
|
221
|
+
return p(r2, i2), r2({ pageContext: i2, row: n2 });
|
|
221
222
|
}
|
|
222
|
-
function
|
|
223
|
+
function $(t2, e2) {
|
|
223
224
|
if (!t2 || !t2.$el) return;
|
|
224
225
|
const n2 = t2.$el.getElementsByTagName("canvas");
|
|
225
226
|
if (!n2 || 0 === n2.length) return;
|
|
226
227
|
const i2 = n2[0], s2 = i2.width + ":" + i2.height;
|
|
227
228
|
return { isTable: false, fileContent: i2.toDataURL(), fileSize: s2, title: e2 == null ? void 0 : e2.title };
|
|
228
229
|
}
|
|
229
|
-
function
|
|
230
|
-
const
|
|
231
|
-
let
|
|
232
|
-
if (
|
|
233
|
-
const t3 = JSON.parse(
|
|
230
|
+
function j(t2, e2, n2) {
|
|
231
|
+
const i2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS");
|
|
232
|
+
let s2 = true;
|
|
233
|
+
if (i2) {
|
|
234
|
+
const t3 = JSON.parse(i2);
|
|
234
235
|
if (t3[n2]) {
|
|
235
|
-
const
|
|
236
|
-
if (Object.keys(
|
|
237
|
-
|
|
238
|
-
for (const t4 in
|
|
236
|
+
const i3 = t3[n2];
|
|
237
|
+
if (Object.keys(i3).length > 0) {
|
|
238
|
+
s2 = false;
|
|
239
|
+
for (const t4 in i3) null !== i3[t4] && void 0 !== i3[t4] && a(e2.entity, t4, i3[t4]);
|
|
239
240
|
}
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
|
-
if (
|
|
243
|
+
if (s2 && t2) {
|
|
243
244
|
for (const n3 of t2) if (n3.prop && n3.value) {
|
|
244
|
-
const t3 =
|
|
245
|
-
null != t3 &&
|
|
245
|
+
const t3 = r(e2, n3.value, "input-text", false), i3 = n3.prop.substring(2, n3.prop.length - 1).split(".");
|
|
246
|
+
null != t3 && u(e2.entity, i3, t3);
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
249
|
}
|
|
@@ -256,28 +257,28 @@ function E(t2) {
|
|
|
256
257
|
var _a;
|
|
257
258
|
if ((_a = t2 == null ? void 0 : t2.toolbox) == null ? void 0 : _a.feature) {
|
|
258
259
|
const e2 = t2.toolbox.feature;
|
|
259
|
-
for (const t3 in e2) e2[t3].show && (e2[t3].title =
|
|
260
|
+
for (const t3 in e2) e2[t3].show && (e2[t3].title = d().t("chartMessage." + t3), "dataView" === t3 && (e2[t3].lang = [d().t("chartMessage.dataView"), d().t("chartMessage.close"), d().t("chartMessage.refresh")]));
|
|
260
261
|
}
|
|
261
262
|
}
|
|
262
263
|
export {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
264
|
+
h as CommonName,
|
|
265
|
+
F as caculateFormulaValue,
|
|
266
|
+
v as clearChartSelected,
|
|
267
|
+
w as executeChartFormula,
|
|
268
|
+
$ as exportCommonChart,
|
|
268
269
|
E as formatToolboxI18n,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
270
|
+
k as getAvgValue,
|
|
271
|
+
g as getCustomTheme,
|
|
272
|
+
m as getCustomThemeOptions,
|
|
273
|
+
A as getMaxValue,
|
|
274
|
+
_ as getMinValue,
|
|
275
|
+
x as getNumFormatter,
|
|
276
|
+
M as getSumValue,
|
|
277
|
+
b as initChartOption,
|
|
278
|
+
S as limitDatas,
|
|
278
279
|
I as monitorChartClickToVariable,
|
|
279
280
|
O as setDefaultGrid,
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
j as setHomeChartInitConfigValue,
|
|
282
|
+
y as sortDatas,
|
|
283
|
+
N as updateClickVariablesForSelected
|
|
283
284
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare function getBackFillDataKey(pageCode: string, dataId: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* 缓存回填数据
|
|
4
|
+
* @param pageCode 页面编码
|
|
5
|
+
* @param data 数据
|
|
6
|
+
*/
|
|
7
|
+
export declare function cacheBackfillData(pageCode: string, data: any): void;
|
|
8
|
+
/**
|
|
9
|
+
* 删除缓存回填数据
|
|
10
|
+
* @param pageCode 页面编码
|
|
11
|
+
* @param data 数据
|
|
12
|
+
*/
|
|
13
|
+
export declare function removeCacheFillData(pageCode: string, data: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* 删除缓存回填数据
|
|
16
|
+
* @param pageCode 页面编码
|
|
17
|
+
* @param dataId 数据ID
|
|
18
|
+
*/
|
|
19
|
+
export declare function removeCacheFillDataById(pageCode: string, dataId: any): void;
|
|
20
|
+
/**
|
|
21
|
+
* sessionStorage中是否存在回填数据
|
|
22
|
+
* @param pageCode 页面编码
|
|
23
|
+
* @param dataId 数据ID
|
|
24
|
+
* @returns boolean
|
|
25
|
+
*/
|
|
26
|
+
export declare function hasBackfillData(pageCode: string, dataId: any): boolean;
|
|
27
|
+
export declare function getRealFillData(pageCode: string, dataId: any, dbData: any): any;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { getUsername as e } from "agilebuilder-ui/src/utils/auth";
|
|
2
|
+
function t(e2, t2) {
|
|
3
|
+
let i2 = "new";
|
|
4
|
+
return t2.id ? i2 = t2.id : t2.ID && (i2 = t2.ID), n(e2, i2);
|
|
5
|
+
}
|
|
6
|
+
function n(t2, n2) {
|
|
7
|
+
return n2 ? `${e()}_backfill_data_${t2}_${n2}` : `${e()}_backfill_data_${t2}_new`;
|
|
8
|
+
}
|
|
9
|
+
function i(e2, n2) {
|
|
10
|
+
sessionStorage.setItem(t(e2, n2), JSON.stringify(n2));
|
|
11
|
+
}
|
|
12
|
+
function o(e2, n2) {
|
|
13
|
+
sessionStorage.removeItem(t(e2, n2));
|
|
14
|
+
}
|
|
15
|
+
function r(e2, t2) {
|
|
16
|
+
sessionStorage.removeItem(n(e2, t2));
|
|
17
|
+
}
|
|
18
|
+
function s(e2, t2) {
|
|
19
|
+
return null !== sessionStorage.getItem(n(e2, t2));
|
|
20
|
+
}
|
|
21
|
+
function u(e2, t2, i2) {
|
|
22
|
+
const o2 = sessionStorage.getItem(n(e2, t2));
|
|
23
|
+
if (o2) {
|
|
24
|
+
const e3 = JSON.parse(o2);
|
|
25
|
+
let t3 = null;
|
|
26
|
+
e3.version ? t3 = e3.version : e3.VERSION && (t3 = e3.VERSION);
|
|
27
|
+
let n2 = null;
|
|
28
|
+
if (i2.version ? n2 = i2.version : i2.VERSION && (n2 = i2.VERSION), t3 == n2) return e3;
|
|
29
|
+
}
|
|
30
|
+
return i2;
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
i as cacheBackfillData,
|
|
34
|
+
n as getBackFillDataKey,
|
|
35
|
+
u as getRealFillData,
|
|
36
|
+
s as hasBackfillData,
|
|
37
|
+
o as removeCacheFillData,
|
|
38
|
+
r as removeCacheFillDataById
|
|
39
|
+
};
|