super-page-runtime 2.3.17 → 2.3.19-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 +70 -70
- package/dist/es/components/runtime/utils/assemblys-config.js +1 -1
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +67 -66
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +31 -30
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +66 -65
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +47 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +33 -32
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +73 -64
- package/dist/es/components/runtime/utils/events/event-util.js +3 -3
- package/dist/es/components/runtime/utils/events/print-label.js +25 -26
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +3 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +591 -554
- package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
- package/dist/es/components/runtime/utils/page-init-util.js +5 -7
- package/dist/es/components/runtime/utils/page-store.js +10 -10
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +1 -1
- 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 +6 -8
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +93 -98
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +148 -145
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.d.ts +5 -0
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +20 -0
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.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 +36 -24
- 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 +194 -194
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +16 -16
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +6 -6
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +37 -37
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +37 -38
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +5 -7
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +4 -5
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +11 -13
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue.d.ts +14 -0
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +6 -0
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.d.ts +14 -0
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.js +7 -0
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +26 -0
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue.js +7 -0
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +28 -0
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +9 -9
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +22 -13
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +165 -161
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +134 -86
- package/package.json +2 -2
|
@@ -1,81 +1,82 @@
|
|
|
1
1
|
import { getValueFromSource as o, setValueForVariableName as t } from "../page-helper-util.js";
|
|
2
|
-
import { deepCopy as
|
|
3
|
-
import { setDefaultGrid as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
import { deepCopy as e } from "../common-util.js";
|
|
3
|
+
import { setDefaultGrid as r, CommonName as s, caculateFormulaValue as l, executeChartFormula as n, sortDatas as p, limitDatas as i, formatToolboxI18n as a } from "./chart-util.js";
|
|
4
|
+
import { handleChartEvent as u } from "../events/event-util.js";
|
|
5
|
+
function c(c2, f, g, m) {
|
|
6
|
+
if (!m || !m.result) return;
|
|
7
|
+
u(c2, f, "beforeUpdateChart", g, { resultData: m }), r(g);
|
|
8
|
+
const h = m && m.result ? m.result : {};
|
|
9
|
+
let d = m && m.groupValue ? m.groupValue : void 0;
|
|
10
|
+
const y = f.serviceDataField;
|
|
11
|
+
let v = null;
|
|
12
|
+
y ? v = h[y] : h && (v = Array.isArray(h) ? h : [h]), v || (v = []);
|
|
13
|
+
let x = f.props ? f.props.groups : null;
|
|
14
|
+
if (x || (x = []), !d || 0 === d.length) {
|
|
15
|
+
d = [];
|
|
16
|
+
for (const o2 of x) d.push(o2.group);
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
-
for (const o2 of
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
for (const t2 of
|
|
18
|
+
const D = {}, E = [], F = [];
|
|
19
|
+
for (const o2 of x) D[o2.group] = o2.target, o2.target && !E.includes(o2.target) && (E.push(o2.target), d.includes(o2.group) && F.push(o2.target));
|
|
20
|
+
let S = f.props ? f.props.mulGroupShow : "";
|
|
21
|
+
S = "break" == S ? "\r\n" : " ";
|
|
22
|
+
for (const t2 of v) {
|
|
22
23
|
if (!t2) continue;
|
|
23
|
-
const
|
|
24
|
-
for (const
|
|
25
|
-
const
|
|
26
|
-
l2 &&
|
|
24
|
+
const e2 = [];
|
|
25
|
+
for (const r3 of d) {
|
|
26
|
+
const s2 = D[r3], l2 = o(t2, s2, void 0);
|
|
27
|
+
l2 && e2.push(l2);
|
|
27
28
|
}
|
|
28
|
-
const
|
|
29
|
-
t2[
|
|
29
|
+
const r2 = e2.join(S);
|
|
30
|
+
t2[s.X_FIELD_NAME] = r2;
|
|
30
31
|
}
|
|
31
|
-
const
|
|
32
|
-
if (0 ==
|
|
33
|
-
const
|
|
34
|
-
let A =
|
|
35
|
-
if (
|
|
36
|
-
const t2 = [],
|
|
37
|
-
let
|
|
38
|
-
for (const o2 in
|
|
39
|
-
A =
|
|
32
|
+
const _ = f.items ? f.items : [];
|
|
33
|
+
if (0 == _.length) return;
|
|
34
|
+
const j = f.props ? f.props : {};
|
|
35
|
+
let A = j.yaxisField;
|
|
36
|
+
if (_[0].props.yaxisField = A, _[0].props.yaxisSource = j.yaxisSource, _[0].props.formula = j.formula, "formula" === j.yaxisSource) {
|
|
37
|
+
const t2 = [], e2 = l(_, v, t2);
|
|
38
|
+
let r2 = j.formula ? j.formula : "";
|
|
39
|
+
for (const o2 in e2) r2 = r2.replace(new RegExp(o2.replace("$", "\\$"), "g"), e2[o2]);
|
|
40
|
+
A = s.Y_TEMP_NAME;
|
|
40
41
|
const p2 = {};
|
|
41
|
-
for (const
|
|
42
|
-
if (!
|
|
43
|
-
for (const
|
|
44
|
-
const t3 = o(
|
|
45
|
-
let
|
|
46
|
-
void 0 === t3 || isNaN(t3) || (void 0 ===
|
|
42
|
+
for (const e3 of v) {
|
|
43
|
+
if (!e3) continue;
|
|
44
|
+
for (const r3 of t2) {
|
|
45
|
+
const t3 = o(e3, r3, void 0);
|
|
46
|
+
let s3 = p2[r3];
|
|
47
|
+
void 0 === t3 || isNaN(t3) || (void 0 === s3 ? s3 = t3 : s3 += t3), p2[r3] = s3;
|
|
47
48
|
}
|
|
48
|
-
const
|
|
49
|
-
|
|
49
|
+
const s2 = n(r2, p2, e3, c2);
|
|
50
|
+
e3[A] = s2;
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
for (const t2 of
|
|
53
|
+
_[0].props.yaxisField = A, _[0].props.yaxisSource = "", p(c2, f, v), v = i(c2, f, v, E, [A]);
|
|
54
|
+
const M = [], N = [];
|
|
55
|
+
for (const t2 of v) {
|
|
55
56
|
if (!t2) continue;
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
57
|
+
M.push(t2[s.X_FIELD_NAME]);
|
|
58
|
+
const e2 = o(t2, A, void 0);
|
|
59
|
+
N.push(e2);
|
|
59
60
|
}
|
|
60
|
-
const
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
let
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
for (let o2 = 0; o2 <
|
|
67
|
-
const t2 = { value:
|
|
68
|
-
if (o2 <
|
|
69
|
-
let
|
|
70
|
-
|
|
61
|
+
const b = f.defaultSeries;
|
|
62
|
+
let C = b[0].pieColors;
|
|
63
|
+
C = C || [];
|
|
64
|
+
let w = b[0].pieColorMap;
|
|
65
|
+
w = w || {};
|
|
66
|
+
const I = [];
|
|
67
|
+
for (let o2 = 0; o2 < M.length && o2 < N.length; o2++) {
|
|
68
|
+
const t2 = { value: N[o2], name: M[o2] };
|
|
69
|
+
if (o2 < C.length || w[t2.name]) {
|
|
70
|
+
let e2 = w[t2.name];
|
|
71
|
+
e2 || (e2 = C[o2]), e2 && (t2.itemStyle = { color: e2 });
|
|
71
72
|
}
|
|
72
|
-
|
|
73
|
+
I.push(t2);
|
|
73
74
|
}
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
!(
|
|
75
|
+
const V = e(b);
|
|
76
|
+
V[0].data = I, g.series = [V[0]], a(g);
|
|
77
|
+
const G = f.props ? f.props.selGroupVariable : null;
|
|
78
|
+
!(f.props ? f.props.enableDrill : null) && G && (f.highlightInfos = [], t(c2.entity, G, null)), u(c2, f, "afterUpdateChart", g, { resultData: m }), f.groupFields = F, f.cacheDatas = v, f.rawResult = m;
|
|
78
79
|
}
|
|
79
80
|
export {
|
|
80
|
-
|
|
81
|
+
c as updateChartOption
|
|
81
82
|
};
|
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
import { getValueFromSource as e } from "../page-helper-util.js";
|
|
2
|
-
import { deepCopy as
|
|
3
|
-
import { setDefaultGrid as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
else
|
|
20
|
-
|
|
2
|
+
import { deepCopy as t } from "../common-util.js";
|
|
3
|
+
import { setDefaultGrid as o, caculateFormulaValue as a, executeChartFormula as i, formatToolboxI18n as r } from "./chart-util.js";
|
|
4
|
+
import { handleChartEvent as s } from "../events/event-util.js";
|
|
5
|
+
function l(l2, u, f, d) {
|
|
6
|
+
if (!d || !d.result) return;
|
|
7
|
+
s(l2, u, "beforeUpdateChart", f, { resultData: d }), o(f);
|
|
8
|
+
const n = d && d.result ? d.result : {}, p = u.serviceDataField;
|
|
9
|
+
let c = null;
|
|
10
|
+
p ? c = n[p] : n && (c = Array.isArray(n) ? n : [n]), c || (c = []);
|
|
11
|
+
const m = u.items ? u.items : [], v = [], x = {}, h = [], y = a(m, c, h);
|
|
12
|
+
for (const e2 of m) {
|
|
13
|
+
const t2 = e2.props ? e2.props : {}, o2 = t2.yaxisSource, a2 = t2.yaxisField;
|
|
14
|
+
let i2 = null;
|
|
15
|
+
if (!a2 || o2 && "variable" != o2) if ("formula" == o2) {
|
|
16
|
+
let o3 = t2.formula ? t2.formula : "";
|
|
17
|
+
for (const e3 in y) o3 = o3.replace(new RegExp(e3.replace("$", "\\$"), "g"), y[e3]);
|
|
18
|
+
i2 = { uuid: e2.uuid, type: "formula", formula: o3, data: [] };
|
|
19
|
+
} else i2 = { uuid: e2.uuid, type: "fixed", field: t2.yaxisFix, data: [] };
|
|
20
|
+
else i2 = { uuid: e2.uuid, type: "variable", field: a2, data: [] };
|
|
21
|
+
i2 && (v.push(i2), x[i2.uuid] = i2);
|
|
21
22
|
}
|
|
22
|
-
const
|
|
23
|
-
for (const
|
|
24
|
-
if (!
|
|
25
|
-
const
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
for (const
|
|
29
|
-
const
|
|
30
|
-
let
|
|
31
|
-
void 0 ===
|
|
23
|
+
const F = u.props ? u.props : {}, b = F.nameField, j = F.maxSource, D = F.maxField, g = F.maxFixed, S = [], w = {};
|
|
24
|
+
for (const t2 of c) {
|
|
25
|
+
if (!t2) continue;
|
|
26
|
+
const o2 = e(t2, b, void 0);
|
|
27
|
+
let a2 = null;
|
|
28
|
+
a2 = j && "variable" != j ? g : e(t2, D, void 0), S.push({ text: o2, max: a2 });
|
|
29
|
+
for (const o3 of h) {
|
|
30
|
+
const a3 = e(t2, o3, void 0);
|
|
31
|
+
let i2 = w[o3];
|
|
32
|
+
void 0 === a3 || isNaN(a3) || (void 0 === i2 ? i2 = a3 : i2 += a3), w[o3] = i2;
|
|
32
33
|
}
|
|
33
|
-
for (const
|
|
34
|
-
const
|
|
35
|
-
if ("fixed" ==
|
|
36
|
-
else if ("variable" ==
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
} else if ("formula" ==
|
|
40
|
-
const e2 =
|
|
41
|
-
|
|
42
|
-
} else
|
|
34
|
+
for (const o3 of v) {
|
|
35
|
+
const a3 = o3.data;
|
|
36
|
+
if ("fixed" == o3.type) a3.push(o3.field);
|
|
37
|
+
else if ("variable" == o3.type) {
|
|
38
|
+
const i2 = e(t2, o3.field, void 0);
|
|
39
|
+
a3.push(i2);
|
|
40
|
+
} else if ("formula" == o3.type) {
|
|
41
|
+
const e2 = i(o3.formula, w, t2, l2);
|
|
42
|
+
a3.push(e2);
|
|
43
|
+
} else a3.push(void 0);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
for (const e2 of
|
|
48
|
-
const
|
|
49
|
-
e2.value =
|
|
46
|
+
f.radar[0].indicator = S, r(f);
|
|
47
|
+
const A = u.defaultSeries, C = t(A), N = C[0].data;
|
|
48
|
+
for (const e2 of N) {
|
|
49
|
+
const t2 = x[e2.uuid];
|
|
50
|
+
e2.value = t2.data;
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
+
f.series = C, s(l2, u, "afterUpdateChart", f, { resultData: d }), u.cacheDatas = c, u.rawResult = d;
|
|
52
53
|
}
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
l as updateChartOption
|
|
55
56
|
};
|
|
@@ -1,46 +1,47 @@
|
|
|
1
1
|
import { getValueFromSource as o } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy as s } from "../common-util.js";
|
|
3
|
-
import { setDefaultGrid as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { setDefaultGrid as e, caculateFormulaValue as i, executeChartFormula as t, formatToolboxI18n as r } from "./chart-util.js";
|
|
4
|
+
import { handleChartEvent as a } from "../events/event-util.js";
|
|
5
|
+
function l(l2, u, f, c) {
|
|
6
|
+
if (!c || !c.result) return;
|
|
7
|
+
a(l2, u, "beforeUpdateChart", f, { resultData: c }), e(f);
|
|
8
|
+
const d = c && c.result ? c.result : {}, n = u.serviceDataField;
|
|
9
|
+
let p = null;
|
|
10
|
+
n ? p = d[n] : d && (p = Array.isArray(d) ? d : [d]), p || (p = []);
|
|
11
|
+
const m = u.items ? u.items : [], x = [], y = {};
|
|
12
|
+
for (const o2 of m) {
|
|
13
|
+
const s2 = o2.props ? o2.props : {}, e2 = o2.props ? o2.style : {}, i2 = s2.xaxisField, t2 = s2.sizeField, r2 = { uuid: o2.uuid, xaxisField: i2, yaxisField: s2.yaxisField, yaxisSource: s2.yaxisSource, formula: s2.formula, sizeField: t2, symbolSize: e2.symbolSize, data: [] };
|
|
14
|
+
x.push(r2), y[r2.uuid] = r2;
|
|
14
15
|
}
|
|
15
|
-
const
|
|
16
|
-
for (const o2 of
|
|
16
|
+
const h = [], F = i(m, p, h);
|
|
17
|
+
for (const o2 of x) if ("formula" === o2.yaxisSource) {
|
|
17
18
|
let s2 = o2.formula ? o2.formula : "";
|
|
18
|
-
for (const o3 in
|
|
19
|
+
for (const o3 in F) s2 = s2.replace(new RegExp(o3.replace("$", "\\$"), "g"), F[o3]);
|
|
19
20
|
o2.formula = s2;
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
-
for (const s2 of
|
|
23
|
-
for (const
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
void 0 ===
|
|
22
|
+
const v = {};
|
|
23
|
+
for (const s2 of p) if (s2) {
|
|
24
|
+
for (const e2 of h) {
|
|
25
|
+
const i2 = o(s2, e2, void 0);
|
|
26
|
+
let t2 = v[e2];
|
|
27
|
+
void 0 === i2 || isNaN(i2) || (void 0 === t2 ? t2 = i2 : t2 += i2), v[e2] = t2;
|
|
27
28
|
}
|
|
28
|
-
for (const
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
-
const o2 =
|
|
32
|
-
|
|
33
|
-
} else
|
|
34
|
-
|
|
29
|
+
for (const e2 of x) {
|
|
30
|
+
const i2 = e2.data, r2 = [];
|
|
31
|
+
if (r2.push(o(s2, e2.xaxisField, void 0)), "formula" === e2.yaxisSource) {
|
|
32
|
+
const o2 = t(e2.formula, v, s2, l2);
|
|
33
|
+
r2.push(o2);
|
|
34
|
+
} else r2.push(o(s2, e2.yaxisField, void 0));
|
|
35
|
+
e2.sizeField ? r2.push(o(s2, e2.xaxisField, void 0)) : r2.push(e2.symbolSize), i2.push(r2);
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
const
|
|
38
|
-
for (const o2 of
|
|
39
|
-
const s2 =
|
|
38
|
+
const S = u.defaultSeries, z = s(S);
|
|
39
|
+
for (const o2 of z) {
|
|
40
|
+
const s2 = y[o2.uuid];
|
|
40
41
|
o2.data = s2.data;
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
+
f.series = z, r(f), a(l2, u, "afterUpdateChart", f, { resultData: c }), u.cacheDatas = p, u.rawResult = c;
|
|
43
44
|
}
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
l as updateChartOption
|
|
46
47
|
};
|
|
@@ -112,3 +112,4 @@ export declare function exportCommonChart(chartRef: any, headerInfo: any): {
|
|
|
112
112
|
};
|
|
113
113
|
export declare function setHomeChartInitConfigValue(initConfig: any, tempContext: any, homeChartSettingUserId: any): void;
|
|
114
114
|
export declare function setDefaultGrid(chartOption: any): void;
|
|
115
|
+
export declare function formatToolboxI18n(chartOption: any): void;
|
|
@@ -2,14 +2,15 @@ import t from "../../../../assets/chart-themes/theme1.js";
|
|
|
2
2
|
import e from "../../../../assets/chart-themes/theme2.js";
|
|
3
3
|
import n from "../../../../assets/chart-themes/theme3.js";
|
|
4
4
|
import { getDefaultValue as i } from "../page-init-util.js";
|
|
5
|
-
import { getValueFromSource as s, setValueForVariableName as o, getParamNames as r, formatVariableValue as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
import { getValueFromSource as s, setValueForVariableName as o, getParamNames as r, formatVariableValue as a, getValueFromVariable as l, setVariableValue as c } from "../page-helper-util.js";
|
|
6
|
+
import { getI18n as f } from "agilebuilder-ui/src/utils/util";
|
|
7
|
+
import { appendDefaultMethods as u } from "../events/event-util.js";
|
|
8
|
+
var d = ((t2) => (t2.X_FIELD_NAME = "__x", t2.Y_TEMP_NAME = "__y", t2))(d || {});
|
|
9
|
+
const p = { theme1: t, theme2: e, theme3: n };
|
|
10
|
+
function h(t2) {
|
|
11
|
+
return p[t2];
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
+
function g() {
|
|
13
14
|
return [{ value: "theme1", label: "主题1" }, { value: "theme2", label: "主题2" }, { value: "theme3", label: "主题3" }];
|
|
14
15
|
}
|
|
15
16
|
function m(t2, e2, n2, i2, s2) {
|
|
@@ -22,13 +23,13 @@ function m(t2, e2, n2, i2, s2) {
|
|
|
22
23
|
let t3 = parseInt(e2);
|
|
23
24
|
(null == t3 || isNaN(t3)) && (t3 = 2), r2 = parseFloat(parseFloat(r2).toFixed(t3));
|
|
24
25
|
}
|
|
25
|
-
let l2 = "";
|
|
26
|
-
t2.indexOf("prefix") > -1 && n2 && (l2 = n2);
|
|
27
26
|
let a2 = "";
|
|
28
|
-
|
|
27
|
+
t2.indexOf("prefix") > -1 && n2 && (a2 = n2);
|
|
28
|
+
let l2 = "";
|
|
29
|
+
return t2.indexOf("append") > -1 && i2 && (l2 = i2), a2 + r2.toLocaleString() + l2;
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function x(t2, e2) {
|
|
32
33
|
if (!e2) return;
|
|
33
34
|
if (e2.tooltipFormatterArgs && (e2.tooltip || (e2.tooltip = {}), e2.tooltip.valueFormatter = m.apply(e2, e2.tooltipFormatterArgs)), e2.series) {
|
|
34
35
|
const n3 = t2.props ? t2.props.enableDrill : null;
|
|
@@ -47,22 +48,22 @@ function g(t2, e2) {
|
|
|
47
48
|
});
|
|
48
49
|
t2.defaultYaxis = s2;
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
+
function I(t2, e2, n2) {
|
|
51
52
|
if (!(n2 && e2 && e2.clickSet && t2)) return;
|
|
52
53
|
const i2 = e2.clickSet;
|
|
53
54
|
n2.on("click", function(s2) {
|
|
54
55
|
let o2 = e2.highlightInfos ? e2.highlightInfos : [], r2 = -1;
|
|
55
56
|
if (o2) {
|
|
56
57
|
const t3 = [];
|
|
57
|
-
for (let
|
|
58
|
-
const
|
|
58
|
+
for (let a2 = 0; a2 < o2.length; a2++) {
|
|
59
|
+
const l2 = o2[a2], c2 = l2.seriesIndex === s2.seriesIndex && l2.dataIndex === s2.dataIndex;
|
|
59
60
|
if (c2 || !i2.multiple) {
|
|
60
61
|
if (i2.selected) {
|
|
61
62
|
const t4 = "chart-pie" === e2.name ? "unselect" : "downplay";
|
|
62
|
-
n2.dispatchAction({ type: t4, seriesIndex:
|
|
63
|
+
n2.dispatchAction({ type: t4, seriesIndex: l2.seriesIndex, dataIndex: l2.dataIndex });
|
|
63
64
|
}
|
|
64
|
-
} else t3.push(
|
|
65
|
-
c2 && (r2 =
|
|
65
|
+
} else t3.push(l2);
|
|
66
|
+
c2 && (r2 = a2);
|
|
66
67
|
}
|
|
67
68
|
o2 = t3;
|
|
68
69
|
}
|
|
@@ -73,35 +74,35 @@ function x(t2, e2, n2) {
|
|
|
73
74
|
}
|
|
74
75
|
o2.push({ seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
|
|
75
76
|
}
|
|
76
|
-
e2.highlightInfos = o2,
|
|
77
|
+
e2.highlightInfos = o2, v(t2, e2);
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function b(t2, e2, n2) {
|
|
80
81
|
if (!n2 || !e2 || !t2) return;
|
|
81
82
|
const i2 = e2.highlightInfos ? e2.highlightInfos : [];
|
|
82
83
|
for (let t3 = 0; t3 < i2.length; t3++) {
|
|
83
84
|
const s2 = i2[t3], o2 = "chart-pie" === e2.name ? "unselect" : "downplay";
|
|
84
85
|
n2.dispatchAction({ type: o2, seriesIndex: s2.seriesIndex, dataIndex: s2.dataIndex });
|
|
85
86
|
}
|
|
86
|
-
e2.highlightInfos = [],
|
|
87
|
+
e2.highlightInfos = [], v(t2, e2);
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
+
function v(t2, e2) {
|
|
89
90
|
if (!e2.clickSet) return;
|
|
90
91
|
const n2 = e2.clickSet, i2 = n2.variables;
|
|
91
92
|
if (!i2 || 0 == i2.length) return;
|
|
92
|
-
const r2 = e2.highlightInfos ? e2.highlightInfos : [],
|
|
93
|
-
for (const t3 of r2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex <
|
|
93
|
+
const r2 = e2.highlightInfos ? e2.highlightInfos : [], a2 = e2.cacheDatas ? e2.cacheDatas : [], l2 = [], c2 = [];
|
|
94
|
+
for (const t3 of r2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex < a2.length && l2.push(a2[t3.dataIndex]));
|
|
94
95
|
for (const e3 of i2) {
|
|
95
96
|
if (!e3.fieldName || !e3.variable) continue;
|
|
96
97
|
const i3 = [];
|
|
97
|
-
for (const t3 of
|
|
98
|
+
for (const t3 of l2) {
|
|
98
99
|
const n3 = s(t3, e3.fieldName, void 0);
|
|
99
100
|
null != n3 && i3.push(n3);
|
|
100
101
|
}
|
|
101
102
|
n2.multiple ? o(t2.entity, e3.variable, i3) : o(t2.entity, e3.variable, i3.length > 0 ? i3[0] : void 0);
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
+
function N(t2, e2, n2) {
|
|
105
106
|
const i2 = e2.items ? e2.items : [], o2 = e2.props ? e2.props.orderByTarget : "";
|
|
106
107
|
let r2 = null;
|
|
107
108
|
if ("x" == o2 || "X" == o2) r2 = "__x";
|
|
@@ -115,29 +116,29 @@ function v(t2, e2, n2) {
|
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
if (!r2) return;
|
|
118
|
-
const
|
|
119
|
+
const l2 = e2.props ? e2.props.orderSource : "";
|
|
119
120
|
let c2 = e2.props ? e2.props.orderFix : "";
|
|
120
|
-
if ("variable" ==
|
|
121
|
+
if ("variable" == l2) {
|
|
121
122
|
const n3 = e2.props ? e2.props.orderVariable : "";
|
|
122
|
-
c2 =
|
|
123
|
+
c2 = a(t2, n3);
|
|
123
124
|
}
|
|
124
125
|
c2 = "desc" == c2 || "DESC" == c2 ? "desc" : "asc", n2.sort((t3, e3) => {
|
|
125
126
|
const n3 = s(t3, r2, void 0), i3 = s(e3, r2, void 0);
|
|
126
127
|
return "desc" === c2 ? i3 - n3 : n3 - i3;
|
|
127
128
|
});
|
|
128
129
|
}
|
|
129
|
-
function
|
|
130
|
+
function y(t2, e2, n2, i2, o2) {
|
|
130
131
|
if (!n2) return n2;
|
|
131
132
|
const r2 = e2.props ? e2.props : {};
|
|
132
133
|
if (!r2.limitQuantity) return n2;
|
|
133
|
-
let
|
|
134
|
-
if (r2.itemNumVariable ? (
|
|
135
|
-
if (n2.length <
|
|
134
|
+
let l2 = null;
|
|
135
|
+
if (r2.itemNumVariable ? (l2 = a(t2, r2.itemNumVariable), l2 = parseInt(l2)) : l2 = r2.itemNumFix ? r2.itemNumFix : 10, null == l2 || null == l2 || isNaN(l2)) return n2;
|
|
136
|
+
if (n2.length < l2) return n2;
|
|
136
137
|
const c2 = r2.overItemAlias, f2 = [], u2 = {};
|
|
137
138
|
i2 = i2 || [], o2 = o2 || [];
|
|
138
139
|
for (let t3 = 0; t3 < n2.length; t3++) {
|
|
139
140
|
const e3 = n2[t3];
|
|
140
|
-
if (t3 <
|
|
141
|
+
if (t3 < l2) f2.push(e3);
|
|
141
142
|
else {
|
|
142
143
|
if (!c2) break;
|
|
143
144
|
for (const t4 of i2) {
|
|
@@ -158,17 +159,17 @@ function N(t2, e2, n2, i2, o2) {
|
|
|
158
159
|
}
|
|
159
160
|
return c2 && (u2.__x = c2, f2.push(u2)), f2;
|
|
160
161
|
}
|
|
161
|
-
function
|
|
162
|
+
function S(t2, e2, n2) {
|
|
162
163
|
const i2 = {};
|
|
163
164
|
for (const s2 of t2) {
|
|
164
165
|
const t3 = s2.props ? s2.props : {};
|
|
165
166
|
if ("formula" === t3.yaxisSource) {
|
|
166
167
|
const s3 = r(t3.formula);
|
|
167
168
|
for (const t4 of s3) if (!(t4 in i2)) {
|
|
168
|
-
if (t4.startsWith("${min.")) i2[t4] =
|
|
169
|
-
else if (t4.startsWith("${max.")) i2[t4] =
|
|
170
|
-
else if (t4.startsWith("${sum.")) i2[t4] =
|
|
171
|
-
else if (t4.startsWith("${avg.")) i2[t4] =
|
|
169
|
+
if (t4.startsWith("${min.")) i2[t4] = F(e2, t4.substring(6, t4.length - 1));
|
|
170
|
+
else if (t4.startsWith("${max.")) i2[t4] = _(e2, t4.substring(6, t4.length - 1));
|
|
171
|
+
else if (t4.startsWith("${sum.")) i2[t4] = A(e2, t4.substring(6, t4.length - 1));
|
|
172
|
+
else if (t4.startsWith("${avg.")) i2[t4] = M(e2, t4.substring(6, t4.length - 1));
|
|
172
173
|
else if (t4.startsWith("${add.")) {
|
|
173
174
|
const e3 = t4.substring(6, t4.length - 1);
|
|
174
175
|
n2.add(e3);
|
|
@@ -178,7 +179,7 @@ function y(t2, e2, n2) {
|
|
|
178
179
|
}
|
|
179
180
|
return i2;
|
|
180
181
|
}
|
|
181
|
-
function
|
|
182
|
+
function F(t2, e2) {
|
|
182
183
|
let n2;
|
|
183
184
|
for (const i2 of t2) {
|
|
184
185
|
const t3 = parseFloat(s(i2, e2, null));
|
|
@@ -186,7 +187,7 @@ function S(t2, e2) {
|
|
|
186
187
|
}
|
|
187
188
|
return n2;
|
|
188
189
|
}
|
|
189
|
-
function
|
|
190
|
+
function _(t2, e2) {
|
|
190
191
|
let n2;
|
|
191
192
|
for (const i2 of t2) {
|
|
192
193
|
const t3 = parseFloat(s(i2, e2, null));
|
|
@@ -194,7 +195,7 @@ function F(t2, e2) {
|
|
|
194
195
|
}
|
|
195
196
|
return n2;
|
|
196
197
|
}
|
|
197
|
-
function
|
|
198
|
+
function A(t2, e2) {
|
|
198
199
|
let n2;
|
|
199
200
|
for (const i2 of t2) {
|
|
200
201
|
const t3 = parseFloat(s(i2, e2, null));
|
|
@@ -202,8 +203,8 @@ function _(t2, e2) {
|
|
|
202
203
|
}
|
|
203
204
|
return n2;
|
|
204
205
|
}
|
|
205
|
-
function
|
|
206
|
-
const n2 =
|
|
206
|
+
function M(t2, e2) {
|
|
207
|
+
const n2 = A(t2, e2);
|
|
207
208
|
return void 0 === n2 || 0 === t2.length ? n2 : parseFloat((n2 / t2.length).toFixed(5));
|
|
208
209
|
}
|
|
209
210
|
function k(t2, e2, n2, i2) {
|
|
@@ -212,13 +213,13 @@ function k(t2, e2, n2, i2) {
|
|
|
212
213
|
const o2 = r(t2);
|
|
213
214
|
for (const e3 of o2) {
|
|
214
215
|
let o3 = null;
|
|
215
|
-
o3 = e3.startsWith("${row.") ? s(n2, e3.substring(6, e3.length - 1), null) :
|
|
216
|
+
o3 = e3.startsWith("${row.") ? s(n2, e3.substring(6, e3.length - 1), null) : l(i2.entity, e3), t2 = t2.replace(new RegExp(e3.replace("$", "\\$"), "g"), o3);
|
|
216
217
|
}
|
|
217
218
|
t2.includes("return ") || (t2 = "return " + t2);
|
|
218
|
-
const
|
|
219
|
-
return
|
|
219
|
+
const a2 = new Function("params", t2);
|
|
220
|
+
return u(a2, i2), a2({ pageContext: i2, row: n2 });
|
|
220
221
|
}
|
|
221
|
-
function
|
|
222
|
+
function w(t2, e2) {
|
|
222
223
|
if (!t2 || !t2.$el) return;
|
|
223
224
|
const n2 = t2.$el.getElementsByTagName("canvas");
|
|
224
225
|
if (!n2 || 0 === n2.length) return;
|
|
@@ -245,30 +246,38 @@ function $(t2, e2, n2) {
|
|
|
245
246
|
}
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
|
-
function
|
|
249
|
+
function O(t2) {
|
|
249
250
|
if (t2 == null ? void 0 : t2.grid) {
|
|
250
251
|
const e2 = t2.grid, n2 = (t3) => !t3 || "0" === t3;
|
|
251
252
|
n2(e2.top) && n2(e2.right) && n2(e2.bottom) && n2(e2.left) && Object.assign(e2, { right: "10%", bottom: "60", left: "10%" });
|
|
252
253
|
}
|
|
253
254
|
}
|
|
255
|
+
function E(t2) {
|
|
256
|
+
var _a;
|
|
257
|
+
if ((_a = t2 == null ? void 0 : t2.toolbox) == null ? void 0 : _a.feature) {
|
|
258
|
+
const e2 = t2.toolbox.feature;
|
|
259
|
+
for (const t3 in e2) e2[t3].show && (e2[t3].title = f().t("chartMessage." + t3), "dataView" === t3 && (e2[t3].lang = [f().t("chartMessage.dataView"), f().t("chartMessage.close"), f().t("chartMessage.refresh")]));
|
|
260
|
+
}
|
|
261
|
+
}
|
|
254
262
|
export {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
263
|
+
d as CommonName,
|
|
264
|
+
S as caculateFormulaValue,
|
|
265
|
+
b as clearChartSelected,
|
|
258
266
|
k as executeChartFormula,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
h as
|
|
263
|
-
|
|
264
|
-
|
|
267
|
+
w as exportCommonChart,
|
|
268
|
+
E as formatToolboxI18n,
|
|
269
|
+
M as getAvgValue,
|
|
270
|
+
h as getCustomTheme,
|
|
271
|
+
g as getCustomThemeOptions,
|
|
272
|
+
_ as getMaxValue,
|
|
273
|
+
F as getMinValue,
|
|
265
274
|
m as getNumFormatter,
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
275
|
+
A as getSumValue,
|
|
276
|
+
x as initChartOption,
|
|
277
|
+
y as limitDatas,
|
|
278
|
+
I as monitorChartClickToVariable,
|
|
279
|
+
O as setDefaultGrid,
|
|
271
280
|
$ as setHomeChartInitConfigValue,
|
|
272
|
-
|
|
273
|
-
|
|
281
|
+
N as sortDatas,
|
|
282
|
+
v as updateClickVariablesForSelected
|
|
274
283
|
};
|