super-page-runtime 2.3.6 → 2.3.7-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 +50 -50
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +76 -76
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +26 -24
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +59 -58
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +38 -37
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +28 -27
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +30 -23
- 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.js +18 -18
- package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
- package/dist/es/components/runtime/utils/page-init-util.js +24 -25
- 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/chart/column-line/column-line-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +4 -4
- 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/gauge/gauge-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +11 -12
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
- 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 +19 -17
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +32 -29
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +45 -46
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -5
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/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.vue2.js +11 -12
- package/dist/es/style.css +30 -0
- package/package.json +2 -2
- package/dist/es.zip +0 -0
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { getOptionDatasSourceMap as e, getComponentOptionDatasFromPage as t, getVariableValue as n, setVariableValue as i, setValueForVariableName as o } from "../page-helper-util.js";
|
|
2
|
-
import { getComponentRef as a, getComponentRefByCode as
|
|
3
|
-
import
|
|
2
|
+
import { getComponentRef as a, getComponentRefByCode as s } from "../global-refs.js";
|
|
3
|
+
import r from "../eventBus.js";
|
|
4
4
|
import l from "agilebuilder-ui/src/utils/request";
|
|
5
5
|
import { getFormData as c, getAdditionalParamMap as u, refreshPage as f } from "../events/standard-event.js";
|
|
6
|
-
import { dynamicControlTableEdit as m, disabledAllFields as
|
|
7
|
-
import { deepCopy as g, getBaseUrl as
|
|
8
|
-
import { replacePrefix as
|
|
6
|
+
import { dynamicControlTableEdit as m, disabledAllFields as p, updateFormItemEditState as d } from "../events/validator-util.js";
|
|
7
|
+
import { deepCopy as g, getBaseUrl as y } from "../common-util.js";
|
|
8
|
+
import { replacePrefix as b, isMobileBrowser as h } from "agilebuilder-ui/src/utils/common-util";
|
|
9
9
|
import { getFormModelFields as E, getModelFields as P } from "../page-init-util.js";
|
|
10
10
|
import { getCustomFunc as C } from "../events/event-util.js";
|
|
11
|
-
import { isHasFieldPermissionAuth as
|
|
12
|
-
const
|
|
11
|
+
import { isHasFieldPermissionAuth as k } from "../table-utils.js";
|
|
12
|
+
const v = { showElement: function(e2, t2, n2) {
|
|
13
13
|
n2 ? A(e2, "showElement", t2) : t2.forEach((t3) => {
|
|
14
|
-
const n3 =
|
|
15
|
-
n3
|
|
14
|
+
const n3 = s(e2, t3);
|
|
15
|
+
n3 && n3.show();
|
|
16
16
|
});
|
|
17
17
|
}, hideElement: function(e2, t2, n2) {
|
|
18
18
|
n2 ? A(e2, "hideElement", t2) : t2.forEach((t3) => {
|
|
19
|
-
const n3 =
|
|
20
|
-
n3
|
|
19
|
+
const n3 = s(e2, t3);
|
|
20
|
+
n3 && n3.hide();
|
|
21
21
|
});
|
|
22
22
|
}, enableElement: function(e2, t2, n2) {
|
|
23
23
|
n2 ? A(e2, "enableElement", t2) : t2.forEach((t3) => {
|
|
24
|
-
const n3 =
|
|
24
|
+
const n3 = s(e2, t3);
|
|
25
25
|
if (n3) {
|
|
26
26
|
const e3 = n3.getConfigure();
|
|
27
27
|
e3 && e3.runtime.props && (e3.runtime.props.state = "enabled");
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
29
|
});
|
|
30
30
|
}, disableElement: function(e2, t2, n2) {
|
|
31
31
|
n2 ? A(e2, "disableElement", t2) : t2.forEach((t3) => {
|
|
32
|
-
const n3 =
|
|
32
|
+
const n3 = s(e2, t3);
|
|
33
33
|
if (n3) {
|
|
34
34
|
const e3 = n3.getConfigure();
|
|
35
35
|
e3 && e3.runtime.props && (e3.runtime.props.state = "disabled");
|
|
36
|
-
}
|
|
36
|
+
}
|
|
37
37
|
});
|
|
38
38
|
}, setEntityDataValue: function(e2, t2) {
|
|
39
39
|
Object.keys(t2).forEach((n2) => {
|
|
@@ -48,55 +48,55 @@ const k = { showElement: function(e2, t2, n2) {
|
|
|
48
48
|
o(e2.entity, i2.startsWith("${") ? i2 : "${" + t2 + "." + i2 + "}", n2[i2]);
|
|
49
49
|
});
|
|
50
50
|
}, dynamicControlFormEdit: function(e2, t2, n2) {
|
|
51
|
-
n2 ? A(e2, "dynamicControlFormEdit", t2) :
|
|
51
|
+
n2 ? A(e2, "dynamicControlFormEdit", t2) : d(e2, t2);
|
|
52
52
|
}, disabledAllFields(e2) {
|
|
53
|
-
|
|
53
|
+
p(e2);
|
|
54
54
|
}, dynamicControlTableEdit(e2, t2, n2) {
|
|
55
55
|
m(e2, t2, n2);
|
|
56
56
|
}, executeServiceFlow: function(e2, t2, n2) {
|
|
57
57
|
const i2 = e2.code;
|
|
58
58
|
n2 || (n2 = { entity: e2.entity.data, serviceVariables: {}, requestParams: u(e2), taskParamMap: e2.entity.task, dynamicDimensionValue: [], dynamicSortValue: "" }), n2.entity || (n2.entity = e2.entity.data), n2.requestParams || (n2.requestParams = u(e2)), n2.taskParamMap || (n2.taskParamMap = e2.entity.task);
|
|
59
|
-
const o2 = e2.backendUrl, a2 =
|
|
59
|
+
const o2 = e2.backendUrl, a2 = y(o2, e2.isTest);
|
|
60
60
|
return l.post(`${a2}/dsc/service-flow/execute/${i2}/${t2}`, n2);
|
|
61
61
|
}, openPage: function(e2, t2) {
|
|
62
|
-
|
|
62
|
+
r.$emit(e2.code + "_open-dialog", { pageContext: e2, eventParams: t2.eventParams, configureObj: { props: { linkPage: t2 } } });
|
|
63
63
|
}, refreshPage: function(e2, t2) {
|
|
64
64
|
f(e2, t2);
|
|
65
65
|
}, refreshSubTableHandle: function(e2, t2) {
|
|
66
66
|
let n2;
|
|
67
|
-
const i2 =
|
|
67
|
+
const i2 = s(e2, t2);
|
|
68
68
|
if (i2) {
|
|
69
69
|
const e3 = i2.getConfigure();
|
|
70
70
|
e3 && e3.uuid && e3.name && "table" === e3.name && (n2 = e3.uuid);
|
|
71
71
|
}
|
|
72
|
-
n2
|
|
72
|
+
n2 && r.$emit("_refreshSubTableHandle_" + n2);
|
|
73
73
|
}, refreshChildData(e2, t2, n2) {
|
|
74
74
|
let i2;
|
|
75
|
-
const o2 =
|
|
75
|
+
const o2 = s(e2, t2);
|
|
76
76
|
if (o2) {
|
|
77
77
|
const e3 = o2.getConfigure();
|
|
78
78
|
e3 && e3.uuid && e3.name && "table" === e3.name && (i2 = e3.uuid);
|
|
79
79
|
}
|
|
80
|
-
i2
|
|
81
|
-
}, getServerConfigValue: (e2) => window.$vueApp.config.globalProperties[e2], getBackendUrl: (e2) =>
|
|
80
|
+
i2 && r.$emit("_refreshChildData_" + i2, n2);
|
|
81
|
+
}, getServerConfigValue: (e2) => window.$vueApp.config.globalProperties[e2], getBackendUrl: (e2) => y(e2.backendUrl, false), getPlateBackendUrl: () => window.$vueApp.config.globalProperties.baseAPI, getEntity: (e2) => e2.entity.data, getEntityValue: (e2, t2) => e2.entity.data ? e2.entity.data[t2] : null, getPageData: (e2) => e2.entity.page, getPageDataValue: (e2, t2) => e2.entity.page ? e2.entity.page[t2] : null, getAdditionalParams: (e2) => u(e2), getAdditionalParamValue(e2, t2) {
|
|
82
82
|
const n2 = u(e2);
|
|
83
83
|
return n2 ? n2[t2] : null;
|
|
84
|
-
}, isMobile: () => h(), getComponentRefByProp: (e2, t2) =>
|
|
84
|
+
}, isMobile: () => h(), getComponentRefByProp: (e2, t2) => s(e2, t2), getComponentRefByCode: (e2, t2) => a(e2, t2), getFormViewData(o2) {
|
|
85
85
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
86
|
-
const
|
|
86
|
+
const s2 = o2.entity ? o2.entity : {}, r2 = g(s2), l2 = e(o2);
|
|
87
87
|
for (const e2 in l2) {
|
|
88
|
-
const
|
|
88
|
+
const s3 = t(o2, e2), l3 = a(o2, e2);
|
|
89
89
|
if (l3) {
|
|
90
90
|
const e3 = l3.getConfigure();
|
|
91
91
|
if (e3 && ((_b = (_a = e3.props) == null ? void 0 : _a.dataOrigin) == null ? void 0 : _b.optionValueSetType) && ("static" === ((_d = (_c = e3.props) == null ? void 0 : _c.dataOrigin) == null ? void 0 : _d.optionValueSetType) || "optionGroup" === ((_f = (_e = e3.props) == null ? void 0 : _e.dataOrigin) == null ? void 0 : _f.optionValueSetType))) if (e3.name && ("select" === e3.name && ((_h = (_g = e3.props) == null ? void 0 : _g.base) == null ? void 0 : _h.multiple) || "checkbox" === e3.name)) {
|
|
92
|
-
const t2 = E(o2, e3), a2 = n(
|
|
92
|
+
const t2 = E(o2, e3), a2 = n(r2, t2);
|
|
93
93
|
if (a2) {
|
|
94
|
-
const e4 =
|
|
95
|
-
i(
|
|
94
|
+
const e4 = V(a2.split(","), s3);
|
|
95
|
+
i(r2, t2, e4);
|
|
96
96
|
}
|
|
97
97
|
} else {
|
|
98
|
-
const t2 = E(o2, e3), a2 =
|
|
99
|
-
i(
|
|
98
|
+
const t2 = E(o2, e3), a2 = V(n(r2, t2), s3);
|
|
99
|
+
i(r2, t2, a2);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}
|
|
@@ -106,41 +106,41 @@ const k = { showElement: function(e2, t2, n2) {
|
|
|
106
106
|
if (e2.indexOf("__") > 0 && (t2 = e2.substring(e2.lastIndexOf("__") + 2)), t2) {
|
|
107
107
|
const i2 = a(o2, t2);
|
|
108
108
|
if (i2) {
|
|
109
|
-
const t3 = i2.getConfigure(), o3 = t3.code ? t3.code : e2, a2 = P(t3, o3),
|
|
110
|
-
|
|
109
|
+
const t3 = i2.getConfigure(), o3 = t3.code ? t3.code : e2, a2 = P(t3, o3), s3 = n(r2, a2);
|
|
110
|
+
j(i2.getTableSelectOptions(e2), s3);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
return
|
|
115
|
-
}, getFormData: (e2, t2) => c(e2, t2), getCustomFunc: (e2, t2) => C(e2, t2), replaceUrlPrefix: (e2) =>
|
|
114
|
+
return r2.data;
|
|
115
|
+
}, getFormData: (e2, t2) => c(e2, t2), getCustomFunc: (e2, t2) => C(e2, t2), replaceUrlPrefix: (e2) => b(e2), isHasFieldAuthPermission: (e2) => {
|
|
116
116
|
var _a, _b, _c, _d;
|
|
117
117
|
return !(void 0 !== ((_b = (_a = e2 == null ? void 0 : e2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.isHasFieldAuthPermission) && !((_d = (_c = e2 == null ? void 0 : e2.props) == null ? void 0 : _c.base) == null ? void 0 : _d.isHasFieldAuthPermission));
|
|
118
118
|
}, isHasFieldAuth(e2, t2) {
|
|
119
|
-
|
|
119
|
+
k(e2, null, t2);
|
|
120
120
|
}, isHasFieldAuthWithTable(e2, t2, n2) {
|
|
121
|
-
|
|
121
|
+
k(e2, t2, n2);
|
|
122
122
|
} };
|
|
123
|
-
function
|
|
123
|
+
function j(e2, t2) {
|
|
124
124
|
e2 && t2 && t2.forEach((t3) => {
|
|
125
125
|
Object.keys(e2).forEach((n2) => {
|
|
126
|
-
const i2 = t3[n2], o2 = e2[n2], a2 = o2.options,
|
|
127
|
-
let
|
|
128
|
-
if (
|
|
126
|
+
const i2 = t3[n2], o2 = e2[n2], a2 = o2.options, s2 = o2.column;
|
|
127
|
+
let r2;
|
|
128
|
+
if (s2 && s2.componentType && ("multiselect" === s2.componentType || "checkbox" === s2.componentType)) {
|
|
129
129
|
if (i2) {
|
|
130
|
-
|
|
130
|
+
r2 = V(i2.split(","), a2);
|
|
131
131
|
}
|
|
132
|
-
} else
|
|
133
|
-
t3[n2] =
|
|
132
|
+
} else r2 = V(i2, a2);
|
|
133
|
+
t3[n2] = r2;
|
|
134
134
|
});
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function V(e2, t2) {
|
|
138
138
|
let n2;
|
|
139
139
|
return null != e2 && t2 && (Array.isArray(e2) ? (n2 = "", e2.forEach((i2) => {
|
|
140
|
-
n2 = n2 +
|
|
141
|
-
}), n2.indexOf(",") > 0 && (n2 = n2.substring(0, n2.lastIndexOf(",")))) : (n2 = e2, n2 =
|
|
140
|
+
n2 = n2 + $(e2, t2) + ",";
|
|
141
|
+
}), n2.indexOf(",") > 0 && (n2 = n2.substring(0, n2.lastIndexOf(",")))) : (n2 = e2, n2 = $(e2, t2))), n2;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function $(e2, t2) {
|
|
144
144
|
let n2 = e2;
|
|
145
145
|
if (null != e2 && t2) for (let i2 = 0; i2 < t2.length; i2++) {
|
|
146
146
|
const o2 = t2[i2].value, a2 = t2[i2].label ? t2[i2].label : t2[i2].name;
|
|
@@ -155,5 +155,5 @@ function A(e2, t2, n2) {
|
|
|
155
155
|
e2.initInfo || (e2.initInfo = {}), e2.initInfo[t2] = n2;
|
|
156
156
|
}
|
|
157
157
|
export {
|
|
158
|
-
|
|
158
|
+
v as functions
|
|
159
159
|
};
|
|
@@ -1,140 +1,140 @@
|
|
|
1
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 {
|
|
4
|
-
import { handleChartEvent as
|
|
5
|
-
function
|
|
6
|
-
if (!
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
let
|
|
10
|
-
const
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
for (const e2 of
|
|
3
|
+
import { setDefaultGrid as o, CommonName as a, caculateFormulaValue as l, sortDatas as n, limitDatas as r, executeChartFormula as u } from "./chart-util.js";
|
|
4
|
+
import { handleChartEvent as c } from "../events/event-util.js";
|
|
5
|
+
function d(d2, f, p, m) {
|
|
6
|
+
if (!m || !m.result) return;
|
|
7
|
+
o(p), c(d2, f, "beforeUpdateChart", p, { resultData: m });
|
|
8
|
+
const h = m && m.result ? m.result : {};
|
|
9
|
+
let y = m && m.groupValue ? m.groupValue : void 0;
|
|
10
|
+
const g = f.serviceDataField;
|
|
11
|
+
let v = null;
|
|
12
|
+
g ? v = h[g] : h && (v = Array.isArray(h) ? h : [h]), v || (v = []), f.runtime.dataConfig.runtimeData = v;
|
|
13
|
+
let F = f.props ? f.props.groups : null;
|
|
14
|
+
if (F || (F = []), !y || 0 === y.length) {
|
|
15
|
+
y = [];
|
|
16
|
+
for (const e2 of F) y.push(e2.group);
|
|
17
17
|
}
|
|
18
|
-
const
|
|
19
|
-
for (const e2 of
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
for (const t2 of
|
|
18
|
+
const S = {}, D = [], x = [];
|
|
19
|
+
for (const e2 of F) S[e2.group] = e2.target, e2.target && !D.includes(e2.target) && (D.push(e2.target), y.includes(e2.group) && x.push(e2.target));
|
|
20
|
+
let N = f.props ? f.props.mulGroupShow : "";
|
|
21
|
+
N = "break" == N ? "\r\n" : " ";
|
|
22
|
+
for (const t2 of v) {
|
|
23
23
|
if (!t2) continue;
|
|
24
24
|
const i2 = [];
|
|
25
|
-
for (const s3 of
|
|
26
|
-
const o2 =
|
|
25
|
+
for (const s3 of y) {
|
|
26
|
+
const o2 = S[s3], a2 = e(t2, o2, void 0);
|
|
27
27
|
a2 && i2.push(a2);
|
|
28
28
|
}
|
|
29
|
-
const s2 = i2.join(
|
|
30
|
-
t2[
|
|
29
|
+
const s2 = i2.join(N);
|
|
30
|
+
t2[a.X_FIELD_NAME] = s2;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
for (const e2 of
|
|
34
|
-
for (const e2 of
|
|
32
|
+
const E = f.items ? f.items : [], A = [], _ = {}, b = [], w = {}, C = [], I = [], X = /* @__PURE__ */ new Set(), L = l(E, v, X);
|
|
33
|
+
for (const e2 of X) C.push(e2);
|
|
34
|
+
for (const e2 of E) {
|
|
35
35
|
const t2 = e2.props ? e2.props : {}, i2 = t2.yaxisSource, s2 = t2.yaxisField, o2 = t2.isCumulative;
|
|
36
36
|
let a2 = null;
|
|
37
37
|
if (!s2 || i2 && "variable" != i2) if ("formula" == i2) {
|
|
38
38
|
let i3 = t2.formula ? t2.formula : "";
|
|
39
|
-
for (const e3 in
|
|
39
|
+
for (const e3 in L) i3 = i3.replace(new RegExp(e3.replace("$", "\\$"), "g"), L[e3]);
|
|
40
40
|
a2 = { uuid: e2.uuid, type: "formula", formula: i3, data: [], dynamicDatas: [] };
|
|
41
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 && !
|
|
43
|
-
null != a2 && (
|
|
42
|
+
else a2 = { uuid: e2.uuid, type: "variable", field: s2, isCumulative: o2, data: [], dynamicDatas: [] }, s2 && !C.includes(s2) && (C.push(s2), I.push(s2)), o2 && !X.has(s2) && X.add(s2);
|
|
43
|
+
null != a2 && (A.push(a2), _[e2.uuid] = a2), t2.dynamicSeriesField && !b.includes(t2.dynamicSeriesField) && a2 && (a2.dynamicField = t2.dynamicSeriesField, a2.dynamicSeriesTitle = t2.dynamicSeriesTitle, a2.dynamicShowStack = t2.dynamicShowStack, b.push(t2.dynamicSeriesField), w[t2.dynamicSeriesField] = s2);
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
45
|
+
const M = {};
|
|
46
|
+
if (b.length > 0) {
|
|
47
47
|
const t2 = [], i2 = {};
|
|
48
|
-
for (const s2 of
|
|
49
|
-
const l2 = s2[
|
|
48
|
+
for (const s2 of v) if (s2) for (const o2 of C) {
|
|
49
|
+
const l2 = s2[a.X_FIELD_NAME];
|
|
50
50
|
let n2 = i2[l2];
|
|
51
51
|
if (!n2) {
|
|
52
52
|
n2 = {};
|
|
53
|
-
for (const e2 of
|
|
54
|
-
n2[
|
|
53
|
+
for (const e2 of D) n2[e2] = s2[e2];
|
|
54
|
+
n2[a.X_FIELD_NAME] = s2[a.X_FIELD_NAME], i2[l2] = n2, t2.push(n2);
|
|
55
55
|
}
|
|
56
|
-
let r2 = e(s2,
|
|
56
|
+
let r2 = e(s2, o2, void 0);
|
|
57
57
|
if (!isNaN(r2)) {
|
|
58
|
-
const e2 = n2[
|
|
59
|
-
isNaN || (r2 += e2), n2[
|
|
58
|
+
const e2 = n2[o2];
|
|
59
|
+
isNaN || (r2 += e2), n2[o2] = r2;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
for (const t3 of
|
|
62
|
+
for (const t3 of b) {
|
|
63
63
|
const s2 = [];
|
|
64
|
-
for (const
|
|
65
|
-
if (!
|
|
66
|
-
const l2 = i2[
|
|
64
|
+
for (const o2 of v) {
|
|
65
|
+
if (!o2) continue;
|
|
66
|
+
const l2 = i2[o2[a.X_FIELD_NAME]];
|
|
67
67
|
if (!l2) continue;
|
|
68
|
-
let n2 = e(
|
|
69
|
-
n2 = null == n2 || null == n2 ? "" : n2, s2.includes(n2) || (s2.push(n2),
|
|
70
|
-
const r2 =
|
|
68
|
+
let n2 = e(o2, t3, void 0);
|
|
69
|
+
n2 = null == n2 || null == n2 ? "" : n2, s2.includes(n2) || (s2.push(n2), I.push(n2), X.add(n2));
|
|
70
|
+
const r2 = w[t3];
|
|
71
71
|
if (void 0 !== r2) {
|
|
72
|
-
const t4 = e(
|
|
72
|
+
const t4 = e(o2, r2, void 0);
|
|
73
73
|
let i3 = l2[n2];
|
|
74
74
|
void 0 === i3 ? i3 = t4 : isNaN(t4) || (i3 += t4), l2[n2] = i3;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
M[t3] = s2;
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
v = t2;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
for (const t2 of
|
|
84
|
-
for (const i2 of
|
|
81
|
+
n(d2, f, v), v = r(d2, f, v, D, I);
|
|
82
|
+
const j = [], k = {};
|
|
83
|
+
for (const t2 of v) if (t2) {
|
|
84
|
+
for (const i2 of X) {
|
|
85
85
|
const s2 = e(t2, i2, void 0);
|
|
86
|
-
let o2 =
|
|
87
|
-
void 0 === s2 || isNaN(s2) || (void 0 === o2 ? o2 = s2 : o2 += s2),
|
|
86
|
+
let o2 = k[i2];
|
|
87
|
+
void 0 === s2 || isNaN(s2) || (void 0 === o2 ? o2 = s2 : o2 += s2), k[i2] = o2;
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
for (const i2 of
|
|
89
|
+
j.push(t2[a.X_FIELD_NAME]);
|
|
90
|
+
for (const i2 of A) {
|
|
91
91
|
let s2 = i2.data;
|
|
92
92
|
const o2 = i2.dynamicDatas;
|
|
93
93
|
if (i2.dynamicField) {
|
|
94
|
-
let a2 =
|
|
94
|
+
let a2 = M[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
99
|
let r2 = e(t2, n2, void 0);
|
|
100
|
-
i2.isCumulative && (r2 =
|
|
100
|
+
i2.isCumulative && (r2 = k[n2]), s2.push(r2);
|
|
101
101
|
}
|
|
102
102
|
} else if ("fixed" === i2.type) s2.push(i2.field);
|
|
103
103
|
else if ("variable" === i2.type) {
|
|
104
104
|
let o3 = e(t2, i2.field, void 0);
|
|
105
|
-
i2.isCumulative && (o3 =
|
|
105
|
+
i2.isCumulative && (o3 = k[i2.field]), s2.push(o3);
|
|
106
106
|
} else if ("formula" === i2.type) {
|
|
107
|
-
const e2 =
|
|
107
|
+
const e2 = u(i2.formula, k, t2, d2);
|
|
108
108
|
s2.push(e2);
|
|
109
109
|
} else s2.push(void 0);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
const
|
|
113
|
-
for (const e2 of
|
|
114
|
-
const i2 =
|
|
112
|
+
const T = f.defaultSeries, V = s(null == T ? [] : T), $ = [];
|
|
113
|
+
for (const e2 of V) {
|
|
114
|
+
const i2 = _[e2.uuid];
|
|
115
115
|
if (i2.dynamicField) {
|
|
116
|
-
let o2 =
|
|
116
|
+
let o2 = M[i2.dynamicField];
|
|
117
117
|
o2 = o2 || [];
|
|
118
118
|
const a2 = i2.dynamicDatas ? i2.dynamicDatas : [];
|
|
119
119
|
for (let l2 = 0; l2 < o2.length; l2++) {
|
|
120
120
|
const n2 = o2[l2], r2 = s(e2);
|
|
121
121
|
if (i2.dynamicSeriesTitle) {
|
|
122
122
|
const e3 = i2.dynamicSeriesTitle.replace("${name}", n2);
|
|
123
|
-
r2.name = t(
|
|
123
|
+
r2.name = t(d2, e3);
|
|
124
124
|
} else r2.name = n2;
|
|
125
|
-
r2.data = l2 < a2.length ? a2[l2] : [], "bar" == e2.type && i2.dynamicShowStack && (r2.stack = e2.uuid),
|
|
125
|
+
r2.data = l2 < a2.length ? a2[l2] : [], "bar" == e2.type && i2.dynamicShowStack && (r2.stack = e2.uuid), $.push(r2);
|
|
126
126
|
}
|
|
127
|
-
} else e2.data = i2 ? i2.data : [],
|
|
127
|
+
} else e2.data = i2 ? i2.data : [], $.push(e2);
|
|
128
128
|
}
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
132
|
-
if (
|
|
133
|
-
|
|
134
|
-
} else
|
|
135
|
-
const
|
|
136
|
-
!(
|
|
129
|
+
p.series = $;
|
|
130
|
+
const G = f.defaultXaxis, R = f.defaultYaxis;
|
|
131
|
+
if (p.isBar) {
|
|
132
|
+
if (R) for (const e2 of R) e2.data = j;
|
|
133
|
+
p.xAxis = G, p.yAxis = R;
|
|
134
|
+
} else G && G.length > 0 && (G[0].data = j), p.xAxis = G, p.yAxis = R;
|
|
135
|
+
const U = f.props ? f.props.selGroupVariable : null;
|
|
136
|
+
!(f.props ? f.props.enableDrill : null) && U && (f.highlightInfos = [], i(d2.entity, U, null)), c(d2, f, "afterUpdateChart", p, { resultData: m }), f.groupFields = x, f.cacheDatas = v, f.rawResult = m;
|
|
137
137
|
}
|
|
138
138
|
export {
|
|
139
|
-
|
|
139
|
+
d as updateChartOption
|
|
140
140
|
};
|
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
import { formatVariableValue as e, getValueFromSource as o } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy as t } from "../common-util.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
n
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { setDefaultGrid as s } from "./chart-util.js";
|
|
4
|
+
function r(r2, l, i, p) {
|
|
5
|
+
if (!p || !p.result) return;
|
|
6
|
+
s(i);
|
|
7
|
+
const n = p && p.result ? p.result : {}, a = l.serviceDataField;
|
|
8
|
+
let u = null;
|
|
9
|
+
a ? u = n[a] : n && (u = [n]), u || (u = []);
|
|
10
|
+
const c = l.props ? l.props.nameSource : void 0, m = l.props ? l.props.nameField : void 0, d = l.props ? l.props.nameFixed : void 0, f = l.props ? l.props.yaxisField : void 0, h = [m], v = [], g = [];
|
|
11
|
+
for (const t2 of u) {
|
|
10
12
|
if (!t2) continue;
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
13
|
+
let s2 = null;
|
|
14
|
+
s2 = "fixed" == c ? e(r2, d) : o(t2, m, void 0), v.push(s2);
|
|
15
|
+
const l2 = o(t2, f, void 0);
|
|
16
|
+
g.push(l2);
|
|
15
17
|
}
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
let
|
|
20
|
-
|
|
18
|
+
const F = l.defaultSeries;
|
|
19
|
+
let x = F[0].pieColors;
|
|
20
|
+
x = x || [];
|
|
21
|
+
let j = F[0].pieColorMap;
|
|
22
|
+
j = j || {};
|
|
21
23
|
const S = [];
|
|
22
|
-
for (let e2 = 0; e2 <
|
|
23
|
-
const o2 = { value:
|
|
24
|
-
if (e2 <
|
|
25
|
-
let t2 =
|
|
26
|
-
t2 || (t2 =
|
|
24
|
+
for (let e2 = 0; e2 < v.length && e2 < g.length; e2++) {
|
|
25
|
+
const o2 = { value: g[e2], name: v[e2] };
|
|
26
|
+
if (e2 < x.length || j[o2.name]) {
|
|
27
|
+
let t2 = j[o2.name];
|
|
28
|
+
t2 || (t2 = x[e2]), t2 && (o2.itemStyle = { color: t2 });
|
|
27
29
|
}
|
|
28
30
|
S.push(o2);
|
|
29
31
|
}
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
+
const y = t(F);
|
|
33
|
+
y[0].data = S, i.series = [y[0]], l.groupFields = h, l.cacheDatas = u, l.rawResult = p;
|
|
32
34
|
}
|
|
33
35
|
export {
|
|
34
|
-
|
|
36
|
+
r as updateChartOption
|
|
35
37
|
};
|
|
@@ -1,80 +1,81 @@
|
|
|
1
1
|
import { getValueFromSource as o, setValueForVariableName as t } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy as r } from "../common-util.js";
|
|
3
|
-
import {
|
|
4
|
-
function
|
|
5
|
-
if (!
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
import { setDefaultGrid as s, CommonName as e, caculateFormulaValue as l, executeChartFormula as n, sortDatas as p, limitDatas as i } from "./chart-util.js";
|
|
4
|
+
function u(u2, c, a, f) {
|
|
5
|
+
if (!f || !f.result) return;
|
|
6
|
+
s(a);
|
|
7
|
+
const g = f && f.result ? f.result : {};
|
|
8
|
+
let m = f && f.groupValue ? f.groupValue : void 0;
|
|
9
|
+
const h = c.serviceDataField;
|
|
10
|
+
let d = null;
|
|
11
|
+
h ? d = g[h] : g && (d = Array.isArray(g) ? g : [g]), d || (d = []);
|
|
12
|
+
let y = c.props ? c.props.groups : null;
|
|
13
|
+
if (y || (y = []), !m || 0 === m.length) {
|
|
14
|
+
m = [];
|
|
15
|
+
for (const o2 of y) m.push(o2.group);
|
|
15
16
|
}
|
|
16
|
-
const
|
|
17
|
-
for (const o2 of
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
for (const t2 of
|
|
17
|
+
const x = {}, v = [], E = [];
|
|
18
|
+
for (const o2 of y) x[o2.group] = o2.target, o2.target && !v.includes(o2.target) && (v.push(o2.target), m.includes(o2.group) && E.push(o2.target));
|
|
19
|
+
let F = c.props ? c.props.mulGroupShow : "";
|
|
20
|
+
F = "break" == F ? "\r\n" : " ";
|
|
21
|
+
for (const t2 of d) {
|
|
21
22
|
if (!t2) continue;
|
|
22
23
|
const r2 = [];
|
|
23
|
-
for (const
|
|
24
|
-
const
|
|
24
|
+
for (const s3 of m) {
|
|
25
|
+
const e2 = x[s3], l2 = o(t2, e2, void 0);
|
|
25
26
|
l2 && r2.push(l2);
|
|
26
27
|
}
|
|
27
|
-
const
|
|
28
|
-
t2[
|
|
28
|
+
const s2 = r2.join(F);
|
|
29
|
+
t2[e.X_FIELD_NAME] = s2;
|
|
29
30
|
}
|
|
30
|
-
const
|
|
31
|
-
if (0 ==
|
|
32
|
-
const
|
|
33
|
-
let
|
|
34
|
-
if (
|
|
35
|
-
const t2 = [], r2 =
|
|
36
|
-
let
|
|
37
|
-
for (const o2 in r2)
|
|
38
|
-
|
|
31
|
+
const S = c.items ? c.items : [];
|
|
32
|
+
if (0 == S.length) return;
|
|
33
|
+
const _ = c.props ? c.props : {};
|
|
34
|
+
let A = _.yaxisField;
|
|
35
|
+
if (S[0].props.yaxisField = A, S[0].props.yaxisSource = _.yaxisSource, S[0].props.formula = _.formula, "formula" === _.yaxisSource) {
|
|
36
|
+
const t2 = [], r2 = l(S, d, t2);
|
|
37
|
+
let s2 = _.formula ? _.formula : "";
|
|
38
|
+
for (const o2 in r2) s2 = s2.replace(new RegExp(o2.replace("$", "\\$"), "g"), r2[o2]);
|
|
39
|
+
A = e.Y_TEMP_NAME;
|
|
39
40
|
const p2 = {};
|
|
40
|
-
for (const r3 of
|
|
41
|
+
for (const r3 of d) {
|
|
41
42
|
if (!r3) continue;
|
|
42
43
|
for (const s3 of t2) {
|
|
43
44
|
const t3 = o(r3, s3, void 0);
|
|
44
|
-
let
|
|
45
|
-
void 0 === t3 || isNaN(t3) || (void 0 ===
|
|
45
|
+
let e3 = p2[s3];
|
|
46
|
+
void 0 === t3 || isNaN(t3) || (void 0 === e3 ? e3 = t3 : e3 += t3), p2[s3] = e3;
|
|
46
47
|
}
|
|
47
|
-
const
|
|
48
|
-
r3[
|
|
48
|
+
const e2 = n(s2, p2, r3, u2);
|
|
49
|
+
r3[A] = e2;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
for (const t2 of
|
|
52
|
+
S[0].props.yaxisField = A, S[0].props.yaxisSource = "", p(u2, c, d), d = i(u2, c, d, v, [A]);
|
|
53
|
+
const D = [], M = [];
|
|
54
|
+
for (const t2 of d) {
|
|
54
55
|
if (!t2) continue;
|
|
55
|
-
|
|
56
|
-
const r2 = o(t2,
|
|
57
|
-
|
|
56
|
+
D.push(t2[e.X_FIELD_NAME]);
|
|
57
|
+
const r2 = o(t2, A, void 0);
|
|
58
|
+
M.push(r2);
|
|
58
59
|
}
|
|
59
|
-
const
|
|
60
|
-
let
|
|
61
|
-
|
|
62
|
-
let
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
for (let o2 = 0; o2 <
|
|
66
|
-
const t2 = { value:
|
|
67
|
-
if (o2 <
|
|
68
|
-
let r2 =
|
|
69
|
-
r2 || (r2 =
|
|
60
|
+
const N = c.defaultSeries;
|
|
61
|
+
let j = N[0].pieColors;
|
|
62
|
+
j = j || [];
|
|
63
|
+
let b = N[0].pieColorMap;
|
|
64
|
+
b = b || {};
|
|
65
|
+
const w = [];
|
|
66
|
+
for (let o2 = 0; o2 < D.length && o2 < M.length; o2++) {
|
|
67
|
+
const t2 = { value: M[o2], name: D[o2] };
|
|
68
|
+
if (o2 < j.length || b[t2.name]) {
|
|
69
|
+
let r2 = b[t2.name];
|
|
70
|
+
r2 || (r2 = j[o2]), r2 && (t2.itemStyle = { color: r2 });
|
|
70
71
|
}
|
|
71
|
-
|
|
72
|
+
w.push(t2);
|
|
72
73
|
}
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
!(
|
|
74
|
+
const I = r(N);
|
|
75
|
+
I[0].data = w, a.series = [I[0]];
|
|
76
|
+
const V = c.props ? c.props.selGroupVariable : null;
|
|
77
|
+
!(c.props ? c.props.enableDrill : null) && V && (c.highlightInfos = [], t(u2.entity, V, null)), c.groupFields = E, c.cacheDatas = d, c.rawResult = f;
|
|
77
78
|
}
|
|
78
79
|
export {
|
|
79
|
-
|
|
80
|
+
u as updateChartOption
|
|
80
81
|
};
|