super-page-runtime 2.2.0 → 2.2.1
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/_virtual/_plugin-vue_export-helper.js +1 -2
- package/dist/es/components/runtime/index.d.ts +2 -1
- package/dist/es/components/runtime/utils/api/page-expose-util.js +70 -72
- package/dist/es/components/runtime/utils/assemblys-config.js +2 -4
- package/dist/es/components/runtime/utils/barcode-util.js +1 -2
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +59 -81
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +2 -4
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +8 -16
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +10 -18
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +20 -25
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +200 -218
- package/dist/es/components/runtime/utils/common-util.js +7 -14
- package/dist/es/components/runtime/utils/events/event-util.js +97 -115
- package/dist/es/components/runtime/utils/events/print-label.js +20 -21
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -2
- package/dist/es/components/runtime/utils/events/standard-event.js +295 -337
- package/dist/es/components/runtime/utils/events/validator-util.js +85 -116
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +1 -2
- package/dist/es/components/runtime/utils/form/scan-util.js +10 -17
- package/dist/es/components/runtime/utils/global-refs.js +7 -14
- package/dist/es/components/runtime/utils/i18n-util.js +1 -2
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +66 -116
- package/dist/es/components/runtime/utils/page-init-util.d.ts +6 -1
- package/dist/es/components/runtime/utils/page-init-util.js +65 -69
- package/dist/es/components/runtime/utils/page-permission-util.js +2 -4
- package/dist/es/components/runtime/utils/page-store.d.ts +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +4 -8
- package/dist/es/components/runtime/utils/tree-utils.js +13 -15
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +24 -28
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +44 -40
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +44 -0
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +20 -20
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +20 -20
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +20 -20
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +22 -22
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +34 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +205 -170
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +19 -50
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +151 -120
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +4 -4
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +6 -6
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +9 -11
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +6 -6
- 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.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +60 -72
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +91 -95
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +6 -9
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/error-render.vue.d.ts +4 -4
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +6 -8
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +4 -6
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +7 -9
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +10 -13
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +25 -28
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +9 -10
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +9 -11
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +15 -20
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +20 -25
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +15 -20
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +4 -5
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.d.ts +17 -0
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +97 -0
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/object-render.vue.d.ts +1 -1
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +33 -43
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/home-chart.vue.d.ts +23 -0
- package/dist/es/components/runtime/views/home-chart.vue.js +36 -0
- package/dist/es/components/runtime/views/home-chart.vue2.js +4 -0
- package/dist/es/components/runtime/views/super-page-dialog.vue.d.ts +3 -3
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +15 -13
- package/dist/es/components/runtime/views/super-page.vue.d.ts +15 -6
- package/dist/es/components/runtime/views/super-page.vue.js +171 -182
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.js +6 -4
- package/package.json +74 -74
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +0 -1
|
@@ -2,8 +2,7 @@ import { getValueFromSource as o } from "../page-helper-util.js";
|
|
|
2
2
|
import { deepCopy as s } from "../common-util.js";
|
|
3
3
|
import { caculateFormulaValue as i, executeChartFormula as e } from "./chart-util.js";
|
|
4
4
|
function r(r2, t, a, l) {
|
|
5
|
-
if (!l || !l.result)
|
|
6
|
-
return;
|
|
5
|
+
if (!l || !l.result) return;
|
|
7
6
|
const u = l && l.result ? l.result : {}, f = t.serviceDataField;
|
|
8
7
|
let c = null;
|
|
9
8
|
f ? c = u[f] : u && (c = Array.isArray(u) ? u : [u]), c || (c = []);
|
|
@@ -13,31 +12,27 @@ function r(r2, t, a, l) {
|
|
|
13
12
|
n.push(t2), p[t2.uuid] = t2;
|
|
14
13
|
}
|
|
15
14
|
const m = [], x = i(d, c, m);
|
|
16
|
-
for (const o2 of n)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
o2.formula = s2;
|
|
22
|
-
}
|
|
15
|
+
for (const o2 of n) if ("formula" === o2.yaxisSource) {
|
|
16
|
+
let s2 = o2.formula ? o2.formula : "";
|
|
17
|
+
for (const o3 in x) s2 = s2.replace(new RegExp(o3.replace("$", "\\$"), "g"), x[o3]);
|
|
18
|
+
o2.formula = s2;
|
|
19
|
+
}
|
|
23
20
|
const y = {};
|
|
24
|
-
for (const s2 of c)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
void 0 === e2 || isNaN(e2) || (void 0 === r3 ? r3 = e2 : r3 += e2), y[i2] = r3;
|
|
30
|
-
}
|
|
31
|
-
for (const i2 of n) {
|
|
32
|
-
const t2 = i2.data, a2 = [];
|
|
33
|
-
if (a2.push(o(s2, i2.xaxisField, void 0)), "formula" === i2.yaxisSource) {
|
|
34
|
-
const o2 = e(i2.formula, y, s2, r2);
|
|
35
|
-
a2.push(o2);
|
|
36
|
-
} else
|
|
37
|
-
a2.push(o(s2, i2.yaxisField, void 0));
|
|
38
|
-
i2.sizeField ? a2.push(o(s2, i2.xaxisField, void 0)) : a2.push(i2.symbolSize), t2.push(a2);
|
|
39
|
-
}
|
|
21
|
+
for (const s2 of c) if (s2) {
|
|
22
|
+
for (const i2 of m) {
|
|
23
|
+
const e2 = o(s2, i2, void 0);
|
|
24
|
+
let r3 = y[i2];
|
|
25
|
+
void 0 === e2 || isNaN(e2) || (void 0 === r3 ? r3 = e2 : r3 += e2), y[i2] = r3;
|
|
40
26
|
}
|
|
27
|
+
for (const i2 of n) {
|
|
28
|
+
const t2 = i2.data, a2 = [];
|
|
29
|
+
if (a2.push(o(s2, i2.xaxisField, void 0)), "formula" === i2.yaxisSource) {
|
|
30
|
+
const o2 = e(i2.formula, y, s2, r2);
|
|
31
|
+
a2.push(o2);
|
|
32
|
+
} else a2.push(o(s2, i2.yaxisField, void 0));
|
|
33
|
+
i2.sizeField ? a2.push(o(s2, i2.xaxisField, void 0)) : a2.push(i2.symbolSize), t2.push(a2);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
41
36
|
const F = t.defaultSeries, h = s(F);
|
|
42
37
|
for (const o2 of h) {
|
|
43
38
|
const s2 = p[o2.uuid];
|
|
@@ -1,291 +1,273 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import t from "../../../../assets/chart-themes/theme1.js";
|
|
2
|
+
import e from "../../../../assets/chart-themes/theme2.js";
|
|
3
3
|
import n from "../../../../assets/chart-themes/theme3.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { getDefaultValue as i } from "../page-init-util.js";
|
|
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
|
+
import { appendDefaultMethods as f } from "../events/event-util.js";
|
|
7
|
+
var u = ((t2) => (t2.X_FIELD_NAME = "__x", t2.Y_TEMP_NAME = "__y", t2))(u || {});
|
|
8
|
+
const p = { theme1: t, theme2: e, theme3: n };
|
|
9
|
+
function d(t2) {
|
|
10
|
+
return p[t2];
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
+
function h() {
|
|
12
13
|
return [{ value: "theme1", label: "主题1" }, { value: "theme2", label: "主题2" }, { value: "theme3", label: "主题3" }];
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
+
function m(t2, e2, n2, i2, s2) {
|
|
15
16
|
return function(o2) {
|
|
16
17
|
let r2 = o2.value;
|
|
17
|
-
if (s2 && (r2 = o2), null == r2 || null == r2)
|
|
18
|
-
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (e2.indexOf("precision") > -1) {
|
|
24
|
-
let e3 = parseInt(t2);
|
|
25
|
-
(null == e3 || isNaN(e3)) && (e3 = 2), r2 = parseFloat(parseFloat(r2).toFixed(e3));
|
|
18
|
+
if (s2 && (r2 = o2), null == r2 || null == r2) return r2;
|
|
19
|
+
if (Array.isArray(r2)) return r2;
|
|
20
|
+
if (isNaN(r2) || !t2 || !t2.indexOf) return r2;
|
|
21
|
+
if (t2.indexOf("precision") > -1) {
|
|
22
|
+
let t3 = parseInt(e2);
|
|
23
|
+
(null == t3 || isNaN(t3)) && (t3 = 2), r2 = parseFloat(parseFloat(r2).toFixed(t3));
|
|
26
24
|
}
|
|
27
|
-
let a2 = "";
|
|
28
|
-
e2.indexOf("prefix") > -1 && n2 && (a2 = n2);
|
|
29
25
|
let l2 = "";
|
|
30
|
-
|
|
26
|
+
t2.indexOf("prefix") > -1 && n2 && (l2 = n2);
|
|
27
|
+
let a2 = "";
|
|
28
|
+
return t2.indexOf("append") > -1 && i2 && (a2 = i2), l2 + r2.toLocaleString() + a2;
|
|
31
29
|
};
|
|
32
30
|
}
|
|
33
|
-
function
|
|
34
|
-
if (!
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const n3 =
|
|
38
|
-
for (const i3 of t2.series)
|
|
39
|
-
t2.radar || (i3.data = []), i3.labelFormatterArgs && (i3.label || (i3.label = {}), i3.label.formatter = p.apply(i3, i3.labelFormatterArgs)), !n3 && e2.clickSet && e2.clickSet.selected && i3.emphasis && (i3.emphasis.disabled = false), "pie" === i3.type && e2.clickSet && e2.clickSet.selected && (e2.clickSet.multiple ? i3.selectedMode = "multiple" : i3.selectedMode = "single");
|
|
31
|
+
function g(t2, e2) {
|
|
32
|
+
if (!e2) return;
|
|
33
|
+
if (e2.tooltipFormatterArgs && (e2.tooltip || (e2.tooltip = {}), e2.tooltip.valueFormatter = m.apply(e2, e2.tooltipFormatterArgs)), e2.series) {
|
|
34
|
+
const n3 = t2.props ? t2.props.enableDrill : null;
|
|
35
|
+
for (const i3 of e2.series) e2.radar || (i3.data = []), i3.labelFormatterArgs && (i3.label || (i3.label = {}), i3.label.formatter = m.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");
|
|
40
36
|
}
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return 10 * Math.floor(e4.min / 10);
|
|
54
|
-
}), "auto" === e3._dataMax && (e3.max = function(e4) {
|
|
55
|
-
if (e4.max)
|
|
56
|
-
return 10 * Math.ceil(e4.max / 10);
|
|
57
|
-
});
|
|
58
|
-
e2.defaultYaxis = s2;
|
|
37
|
+
if (e2.radar) for (const t3 of e2.radar) t3.indicator = [];
|
|
38
|
+
const n2 = e2.series;
|
|
39
|
+
t2.defaultSeries = n2;
|
|
40
|
+
const i2 = e2.xAxis;
|
|
41
|
+
i2 && i2.length > 0 && i2[0].data && (i2[0].data = []), t2.defaultXaxis = i2;
|
|
42
|
+
const s2 = e2.yAxis;
|
|
43
|
+
if (s2) for (const t3 of s2) t3.data && (t3.data = []), "auto" === t3._dataMin && (t3.min = function(t4) {
|
|
44
|
+
if (t4.min) return 10 * Math.floor(t4.min / 10);
|
|
45
|
+
}), "auto" === t3._dataMax && (t3.max = function(t4) {
|
|
46
|
+
if (t4.max) return 10 * Math.ceil(t4.max / 10);
|
|
47
|
+
});
|
|
48
|
+
t2.defaultYaxis = s2;
|
|
59
49
|
}
|
|
60
|
-
function
|
|
61
|
-
if (!(n2 &&
|
|
62
|
-
|
|
63
|
-
const i2 = t2.clickSet;
|
|
50
|
+
function x(t2, e2, n2) {
|
|
51
|
+
if (!(n2 && e2 && e2.clickSet && t2)) return;
|
|
52
|
+
const i2 = e2.clickSet;
|
|
64
53
|
n2.on("click", function(s2) {
|
|
65
|
-
let o2 =
|
|
54
|
+
let o2 = e2.highlightInfos ? e2.highlightInfos : [], r2 = -1;
|
|
66
55
|
if (o2) {
|
|
67
|
-
const
|
|
68
|
-
for (let
|
|
69
|
-
const
|
|
56
|
+
const t3 = [];
|
|
57
|
+
for (let l2 = 0; l2 < o2.length; l2++) {
|
|
58
|
+
const a2 = o2[l2], c2 = a2.seriesIndex === s2.seriesIndex && a2.dataIndex === s2.dataIndex;
|
|
70
59
|
if (c2 || !i2.multiple) {
|
|
71
60
|
if (i2.selected) {
|
|
72
|
-
const
|
|
73
|
-
n2.dispatchAction({ type:
|
|
61
|
+
const t4 = "chart-pie" === e2.name ? "unselect" : "downplay";
|
|
62
|
+
n2.dispatchAction({ type: t4, seriesIndex: a2.seriesIndex, dataIndex: a2.dataIndex });
|
|
74
63
|
}
|
|
75
|
-
} else
|
|
76
|
-
|
|
77
|
-
c2 && (r2 = a2);
|
|
64
|
+
} else t3.push(a2);
|
|
65
|
+
c2 && (r2 = l2);
|
|
78
66
|
}
|
|
79
|
-
o2 =
|
|
67
|
+
o2 = t3;
|
|
80
68
|
}
|
|
81
69
|
if (-1 === r2) {
|
|
82
70
|
if (i2.selected) {
|
|
83
|
-
const
|
|
84
|
-
n2.dispatchAction({ type:
|
|
71
|
+
const t3 = "chart-pie" === e2.name ? "select" : "highlight";
|
|
72
|
+
n2.dispatchAction({ type: t3, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
|
|
85
73
|
}
|
|
86
74
|
o2.push({ seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
|
|
87
75
|
}
|
|
88
|
-
|
|
76
|
+
e2.highlightInfos = o2, b(t2, e2);
|
|
89
77
|
});
|
|
90
78
|
}
|
|
91
|
-
function
|
|
92
|
-
if (!n2 || !
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const s2 = i2[e3], o2 = "chart-pie" === t2.name ? "unselect" : "downplay";
|
|
79
|
+
function I(t2, e2, n2) {
|
|
80
|
+
if (!n2 || !e2 || !t2) return;
|
|
81
|
+
const i2 = e2.highlightInfos ? e2.highlightInfos : [];
|
|
82
|
+
for (let t3 = 0; t3 < i2.length; t3++) {
|
|
83
|
+
const s2 = i2[t3], o2 = "chart-pie" === e2.name ? "unselect" : "downplay";
|
|
97
84
|
n2.dispatchAction({ type: o2, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
|
|
98
85
|
}
|
|
99
|
-
|
|
86
|
+
e2.highlightInfos = [], b(t2, e2);
|
|
100
87
|
}
|
|
101
|
-
function
|
|
102
|
-
if (!
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
const o3 = [];
|
|
114
|
-
for (const e3 of l2) {
|
|
115
|
-
const n3 = i(e3, t3.fieldName, void 0);
|
|
116
|
-
null != n3 && o3.push(n3);
|
|
88
|
+
function b(t2, e2) {
|
|
89
|
+
if (!e2.clickSet) return;
|
|
90
|
+
const n2 = e2.clickSet, i2 = n2.variables;
|
|
91
|
+
if (!i2 || 0 == i2.length) return;
|
|
92
|
+
const r2 = e2.highlightInfos ? e2.highlightInfos : [], l2 = e2.cacheDatas ? e2.cacheDatas : [], a2 = [], c2 = [];
|
|
93
|
+
for (const t3 of r2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex < l2.length && a2.push(l2[t3.dataIndex]));
|
|
94
|
+
for (const e3 of i2) {
|
|
95
|
+
if (!e3.fieldName || !e3.variable) continue;
|
|
96
|
+
const i3 = [];
|
|
97
|
+
for (const t3 of a2) {
|
|
98
|
+
const n3 = s(t3, e3.fieldName, void 0);
|
|
99
|
+
null != n3 && i3.push(n3);
|
|
117
100
|
}
|
|
118
|
-
n2.multiple ?
|
|
101
|
+
n2.multiple ? o(t2.entity, e3.variable, i3) : o(t2.entity, e3.variable, i3.length > 0 ? i3[0] : void 0);
|
|
119
102
|
}
|
|
120
103
|
}
|
|
121
|
-
function
|
|
122
|
-
const
|
|
123
|
-
let
|
|
124
|
-
if ("x" ==
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
a2 = i2;
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
104
|
+
function v(t2, e2, n2) {
|
|
105
|
+
const i2 = e2.items ? e2.items : [], o2 = e2.props ? e2.props.orderByTarget : "";
|
|
106
|
+
let r2 = null;
|
|
107
|
+
if ("x" == o2 || "X" == o2) r2 = "__x";
|
|
108
|
+
else if (o2) {
|
|
109
|
+
for (const t3 of i2) if (t3.uuid == o2) {
|
|
110
|
+
const e3 = t3.props ? t3.props : {}, n3 = e3.yaxisSource, i3 = e3.yaxisField;
|
|
111
|
+
if (i3 && (!n3 || "variable" == n3)) {
|
|
112
|
+
r2 = i3;
|
|
113
|
+
break;
|
|
134
114
|
}
|
|
115
|
+
}
|
|
135
116
|
}
|
|
136
|
-
if (!
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
c2 = o(e2, n3);
|
|
117
|
+
if (!r2) return;
|
|
118
|
+
const a2 = e2.props ? e2.props.orderSource : "";
|
|
119
|
+
let c2 = e2.props ? e2.props.orderFix : "";
|
|
120
|
+
if ("variable" == a2) {
|
|
121
|
+
const n3 = e2.props ? e2.props.orderVariable : "";
|
|
122
|
+
c2 = l(t2, n3);
|
|
143
123
|
}
|
|
144
124
|
c2 = "desc" == c2 || "DESC" == c2 ? "desc" : "asc";
|
|
145
125
|
const f2 = n2.length;
|
|
146
|
-
for (let
|
|
147
|
-
const
|
|
148
|
-
for (let
|
|
149
|
-
const
|
|
150
|
-
let
|
|
151
|
-
"desc" == c2 ?
|
|
126
|
+
for (let t3 = 0; t3 < f2 - 1; t3++) {
|
|
127
|
+
const e3 = s(n2[t3], r2, void 0);
|
|
128
|
+
for (let i3 = t3 + 1; i3 < f2; i3++) {
|
|
129
|
+
const o3 = s(n2[i3], r2, void 0);
|
|
130
|
+
let l2 = false;
|
|
131
|
+
"desc" == c2 ? e3 < o3 && (l2 = true) : e3 > o3 && (l2 = true), l2 && ([n2[t3], n2[i3]] = [n2[i3], n2[t3]]);
|
|
152
132
|
}
|
|
153
133
|
}
|
|
154
134
|
}
|
|
155
|
-
function
|
|
156
|
-
if (!n2)
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
s2 = s2 || [], r2 = r2 || [];
|
|
168
|
-
for (let e3 = 0; e3 < n2.length; e3++) {
|
|
169
|
-
const t3 = n2[e3];
|
|
170
|
-
if (e3 < l2)
|
|
171
|
-
f2.push(t3);
|
|
135
|
+
function N(t2, e2, n2, i2, o2) {
|
|
136
|
+
if (!n2) return n2;
|
|
137
|
+
const r2 = e2.props ? e2.props : {};
|
|
138
|
+
if (!r2.limitQuantity) return n2;
|
|
139
|
+
let a2 = null;
|
|
140
|
+
if (r2.itemNumVariable ? (a2 = l(t2, r2.itemNumVariable), a2 = parseInt(a2)) : a2 = r2.itemNumFix ? r2.itemNumFix : 10, null == a2 || null == a2 || isNaN(a2)) return n2;
|
|
141
|
+
if (n2.length < a2) return n2;
|
|
142
|
+
const c2 = r2.overItemAlias, f2 = [], u2 = {};
|
|
143
|
+
i2 = i2 || [], o2 = o2 || [];
|
|
144
|
+
for (let t3 = 0; t3 < n2.length; t3++) {
|
|
145
|
+
const e3 = n2[t3];
|
|
146
|
+
if (t3 < a2) f2.push(e3);
|
|
172
147
|
else {
|
|
173
|
-
if (!c2)
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
n3
|
|
180
|
-
const s3 = u2[e4];
|
|
181
|
-
s3.includes(n3) || s3.push(n3);
|
|
148
|
+
if (!c2) break;
|
|
149
|
+
for (const t4 of i2) {
|
|
150
|
+
if (!t4) continue;
|
|
151
|
+
let n3 = s(e3, t4, void 0);
|
|
152
|
+
n3 = null == n3 || null == n3 ? "" : n3, u2[t4] || (u2[t4] = []);
|
|
153
|
+
const i3 = u2[t4];
|
|
154
|
+
i3.includes(n3) || i3.push(n3);
|
|
182
155
|
}
|
|
183
|
-
for (const
|
|
184
|
-
if (!
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
const s3 = u2[e4];
|
|
190
|
-
isNaN(s3) ? u2[e4] = n3 : u2[e4] = n3 + s3;
|
|
156
|
+
for (const t4 of o2) {
|
|
157
|
+
if (!t4) continue;
|
|
158
|
+
const n3 = s(e3, t4, void 0);
|
|
159
|
+
if (isNaN(n3)) continue;
|
|
160
|
+
const i3 = u2[t4];
|
|
161
|
+
isNaN(i3) ? u2[t4] = n3 : u2[t4] = n3 + i3;
|
|
191
162
|
}
|
|
192
163
|
}
|
|
193
164
|
}
|
|
194
165
|
return c2 && (u2.__x = c2, f2.push(u2)), f2;
|
|
195
166
|
}
|
|
196
|
-
function
|
|
167
|
+
function y(t2, e2, n2) {
|
|
197
168
|
const i2 = {};
|
|
198
|
-
for (const s2 of
|
|
199
|
-
const
|
|
200
|
-
if ("formula" ===
|
|
201
|
-
const s3 = r(
|
|
202
|
-
for (const
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
else if (e4.startsWith("${avg."))
|
|
211
|
-
i2[e4] = S(t2, e4.substring(6, e4.length - 1));
|
|
212
|
-
else if (e4.startsWith("${add.")) {
|
|
213
|
-
const t3 = e4.substring(6, e4.length - 1);
|
|
214
|
-
n2.push(t3);
|
|
215
|
-
}
|
|
169
|
+
for (const s2 of t2) {
|
|
170
|
+
const t3 = s2.props ? s2.props : {};
|
|
171
|
+
if ("formula" === t3.yaxisSource) {
|
|
172
|
+
const s3 = r(t3.formula);
|
|
173
|
+
for (const t4 of s3) if (!(t4 in i2)) {
|
|
174
|
+
if (t4.startsWith("${min.")) i2[t4] = S(e2, t4.substring(6, t4.length - 1));
|
|
175
|
+
else if (t4.startsWith("${max.")) i2[t4] = F(e2, t4.substring(6, t4.length - 1));
|
|
176
|
+
else if (t4.startsWith("${sum.")) i2[t4] = _(e2, t4.substring(6, t4.length - 1));
|
|
177
|
+
else if (t4.startsWith("${avg.")) i2[t4] = A(e2, t4.substring(6, t4.length - 1));
|
|
178
|
+
else if (t4.startsWith("${add.")) {
|
|
179
|
+
const e3 = t4.substring(6, t4.length - 1);
|
|
180
|
+
n2.push(e3);
|
|
216
181
|
}
|
|
182
|
+
}
|
|
217
183
|
}
|
|
218
184
|
}
|
|
219
185
|
return i2;
|
|
220
186
|
}
|
|
221
|
-
function
|
|
187
|
+
function S(t2, e2) {
|
|
222
188
|
let n2;
|
|
223
|
-
for (const
|
|
224
|
-
const
|
|
225
|
-
(void 0 === n2 || !isNaN(
|
|
189
|
+
for (const i2 of t2) {
|
|
190
|
+
const t3 = parseFloat(s(i2, e2, null));
|
|
191
|
+
(void 0 === n2 || !isNaN(t3) && t3 < n2) && (n2 = t3);
|
|
226
192
|
}
|
|
227
193
|
return n2;
|
|
228
194
|
}
|
|
229
|
-
function
|
|
195
|
+
function F(t2, e2) {
|
|
230
196
|
let n2;
|
|
231
|
-
for (const
|
|
232
|
-
const
|
|
233
|
-
(void 0 === n2 || !isNaN(
|
|
197
|
+
for (const i2 of t2) {
|
|
198
|
+
const t3 = parseFloat(s(i2, e2, null));
|
|
199
|
+
(void 0 === n2 || !isNaN(t3) && t3 > n2) && (n2 = t3);
|
|
234
200
|
}
|
|
235
201
|
return n2;
|
|
236
202
|
}
|
|
237
|
-
function
|
|
203
|
+
function _(t2, e2) {
|
|
238
204
|
let n2;
|
|
239
|
-
for (const
|
|
240
|
-
const
|
|
241
|
-
void 0 === n2 ? n2 =
|
|
205
|
+
for (const i2 of t2) {
|
|
206
|
+
const t3 = parseFloat(s(i2, e2, null));
|
|
207
|
+
void 0 === n2 ? n2 = t3 : isNaN(t3) || (n2 += t3);
|
|
242
208
|
}
|
|
243
209
|
return n2;
|
|
244
210
|
}
|
|
245
|
-
function
|
|
246
|
-
const n2 =
|
|
247
|
-
return void 0 === n2 || 0 ===
|
|
211
|
+
function A(t2, e2) {
|
|
212
|
+
const n2 = _(t2, e2);
|
|
213
|
+
return void 0 === n2 || 0 === t2.length ? n2 : parseFloat((n2 / t2.length).toFixed(5));
|
|
248
214
|
}
|
|
249
|
-
function
|
|
250
|
-
if (!
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
e2 = e2.replace(new RegExp("\\${add." + n3 + "}", "g"), t2[n3]);
|
|
255
|
-
const o2 = r(e2);
|
|
256
|
-
for (const t3 of o2) {
|
|
215
|
+
function k(t2, e2, n2, i2) {
|
|
216
|
+
if (!t2) return;
|
|
217
|
+
if (e2) for (const n3 in e2) t2 = t2.replace(new RegExp("\\${add." + n3 + "}", "g"), e2[n3]);
|
|
218
|
+
const o2 = r(t2);
|
|
219
|
+
for (const e3 of o2) {
|
|
257
220
|
let o3 = null;
|
|
258
|
-
o3 =
|
|
221
|
+
o3 = e3.startsWith("${row.") ? s(n2, e3.substring(6, e3.length - 1), null) : a(i2.entity, e3), t2 = t2.replace(new RegExp(e3.replace("$", "\\$"), "g"), o3);
|
|
259
222
|
}
|
|
260
|
-
|
|
261
|
-
const
|
|
262
|
-
return
|
|
223
|
+
t2.includes("return ") || (t2 = "return " + t2);
|
|
224
|
+
const l2 = new Function("params", t2);
|
|
225
|
+
return f(l2, i2), l2({ pageContext: i2, row: n2 });
|
|
263
226
|
}
|
|
264
|
-
function
|
|
265
|
-
if (!
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
return;
|
|
270
|
-
const n2 = t2[0], i2 = n2.width + ":" + n2.height;
|
|
227
|
+
function M(t2) {
|
|
228
|
+
if (!t2 || !t2.$el) return;
|
|
229
|
+
const e2 = t2.$el.getElementsByTagName("canvas");
|
|
230
|
+
if (!e2 || 0 === e2.length) return;
|
|
231
|
+
const n2 = e2[0], i2 = n2.width + ":" + n2.height;
|
|
271
232
|
return { isTable: false, fileContent: n2.toDataURL(), fileSize: i2 };
|
|
272
233
|
}
|
|
234
|
+
function $(t2, e2, n2) {
|
|
235
|
+
const s2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS");
|
|
236
|
+
let r2 = true;
|
|
237
|
+
if (s2) {
|
|
238
|
+
const t3 = JSON.parse(s2);
|
|
239
|
+
if (t3[n2]) {
|
|
240
|
+
const i2 = t3[n2];
|
|
241
|
+
if (Object.keys(i2).length > 0) {
|
|
242
|
+
r2 = false;
|
|
243
|
+
for (const t4 in i2) null !== i2[t4] && void 0 !== i2[t4] && o(e2.entity, t4, i2[t4]);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
if (r2 && t2) {
|
|
248
|
+
for (const n3 of t2) if (n3.prop && n3.value) {
|
|
249
|
+
const t3 = i(e2, n3.value, "input-text", false), s3 = n3.prop.substring(2, n3.prop.length - 1).split(".");
|
|
250
|
+
null != t3 && c(e2.entity, s3, t3);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
273
254
|
export {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
255
|
+
u as CommonName,
|
|
256
|
+
y as caculateFormulaValue,
|
|
257
|
+
I as clearChartSelected,
|
|
258
|
+
k as executeChartFormula,
|
|
259
|
+
M as exportCommonChart,
|
|
260
|
+
A as getAvgValue,
|
|
261
|
+
d as getCustomTheme,
|
|
262
|
+
h as getCustomThemeOptions,
|
|
263
|
+
F as getMaxValue,
|
|
264
|
+
S as getMinValue,
|
|
265
|
+
m as getNumFormatter,
|
|
266
|
+
_ as getSumValue,
|
|
267
|
+
g as initChartOption,
|
|
268
|
+
N as limitDatas,
|
|
269
|
+
x as monitorChartClickToVariable,
|
|
270
|
+
$ as setHomeChartInitConfigValue,
|
|
271
|
+
v as sortDatas,
|
|
272
|
+
b as updateClickVariablesForSelected
|
|
291
273
|
};
|
|
@@ -4,8 +4,7 @@ function r(e2) {
|
|
|
4
4
|
return "function" == typeof Array.isArray ? Array.isArray(e2) : "[object Array]" === Object.prototype.toString.call(e2);
|
|
5
5
|
}
|
|
6
6
|
function n(t2, r2) {
|
|
7
|
-
if (r2)
|
|
8
|
-
return t2;
|
|
7
|
+
if (r2) return t2;
|
|
9
8
|
{
|
|
10
9
|
const { baseURL: r3, projectModel: n2 } = window.$vueApp.config.globalProperties;
|
|
11
10
|
let o2 = r3;
|
|
@@ -22,8 +21,7 @@ function o(e2, t2, r2, o2) {
|
|
|
22
21
|
return i2;
|
|
23
22
|
}
|
|
24
23
|
function i(e2) {
|
|
25
|
-
if (!e2)
|
|
26
|
-
return e2;
|
|
24
|
+
if (!e2) return e2;
|
|
27
25
|
const r2 = t();
|
|
28
26
|
if (Array.isArray(e2)) {
|
|
29
27
|
const t2 = [], n2 = [], o2 = "~-~-";
|
|
@@ -32,8 +30,7 @@ function i(e2) {
|
|
|
32
30
|
if (i2.indexOf(o2) > 0) {
|
|
33
31
|
const u2 = i2.substring(0, i2.indexOf(o2)), s2 = i2.substring(i2.indexOf(o2) + o2.length, i2.lastIndexOf(o2)), f2 = i2.substring(i2.lastIndexOf(o2) + o2.length);
|
|
34
32
|
r2 === s2 && n2.indexOf(u2) < 0 && (t2.push({ templateUuid: e3.templateUuid, templateName: f2 }), n2.push(u2));
|
|
35
|
-
} else
|
|
36
|
-
t2.push(e3);
|
|
33
|
+
} else t2.push(e3);
|
|
37
34
|
}), t2;
|
|
38
35
|
}
|
|
39
36
|
}
|
|
@@ -44,11 +41,9 @@ function s(e2, t2, r2) {
|
|
|
44
41
|
return "V" + t2 + "__" + e2 + "__" + r2;
|
|
45
42
|
}
|
|
46
43
|
function f(e2) {
|
|
47
|
-
if ("object" != typeof e2 || null == e2)
|
|
48
|
-
return e2;
|
|
44
|
+
if ("object" != typeof e2 || null == e2) return e2;
|
|
49
45
|
const t2 = Array.isArray(e2) ? [] : {};
|
|
50
|
-
for (const r2 in e2)
|
|
51
|
-
e2.hasOwnProperty(r2) && (t2[r2] = f(e2[r2]));
|
|
46
|
+
for (const r2 in e2) e2.hasOwnProperty(r2) && (t2[r2] = f(e2[r2]));
|
|
52
47
|
return t2;
|
|
53
48
|
}
|
|
54
49
|
function l(e2) {
|
|
@@ -63,16 +58,14 @@ function a(e2) {
|
|
|
63
58
|
r2.indexOf("${") >= 0 && (r2 = r2.substring(2, r2.lastIndexOf("}")));
|
|
64
59
|
const n2 = r2.split(".");
|
|
65
60
|
2 === n2.length ? t2 = n2[1] : 3 === n2.length && (t2 = n2[1] + "__" + n2[2]);
|
|
66
|
-
} else
|
|
67
|
-
e2.code && (t2 = e2.code);
|
|
61
|
+
} else e2.code && (t2 = e2.code);
|
|
68
62
|
return t2;
|
|
69
63
|
}
|
|
70
64
|
function p(e2) {
|
|
71
65
|
try {
|
|
72
66
|
if (null != e2) {
|
|
73
67
|
const t2 = parseInt(e2 + "");
|
|
74
|
-
if (Number.isInteger(t2))
|
|
75
|
-
return true;
|
|
68
|
+
if (Number.isInteger(t2)) return true;
|
|
76
69
|
}
|
|
77
70
|
return false;
|
|
78
71
|
} catch (e3) {
|