super-page-runtime 2.0.10 → 3.0.3
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/AttributeMap.js +4 -0
- package/dist/es/_virtual/Delta.js +4 -0
- package/dist/es/_virtual/Op.js +4 -0
- package/dist/es/_virtual/OpIterator.js +4 -0
- package/dist/es/_virtual/__vite-browser-external.js +4 -0
- package/dist/es/_virtual/_commonjsHelpers.js +8 -0
- package/dist/es/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/es/_virtual/dayjs.min.js +4 -0
- package/dist/es/_virtual/index.js +4 -0
- package/dist/es/_virtual/index2.js +4 -0
- package/dist/es/_virtual/index3.js +4 -0
- package/dist/es/components/runtime/index.d.ts +3 -3
- package/dist/es/components/runtime/utils/api/api-util.js +3 -3
- package/dist/es/components/runtime/utils/charts/chart-util.js +1 -14
- package/dist/es/components/runtime/utils/common-util.d.ts +0 -5
- package/dist/es/components/runtime/utils/common-util.js +2 -15
- package/dist/es/components/runtime/utils/eventBus.js +1 -1
- package/dist/es/components/runtime/utils/events/event-util.js +3 -3
- package/dist/es/components/runtime/utils/events/standard-event.js +7 -6
- package/dist/es/components/runtime/utils/events/validator-util.js +4 -4
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +0 -2
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +0 -19
- package/dist/es/components/runtime/utils/page-helper-util.js +3 -122
- package/dist/es/components/runtime/utils/page-init-util.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +25 -392
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +15 -12
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +17 -13
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +17 -13
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +19 -14
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +2 -2
- 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 +3 -3
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +5 -4
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +4 -3
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +4 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +4 -5
- package/dist/es/components/runtime/views/super-page.vue.js +7 -20
- package/dist/es/index.d.ts +2 -7
- package/dist/es/index.js +2 -11
- package/dist/lib/components/runtime/index.d.ts +3 -3
- package/dist/lib/components/runtime/utils/charts/chart-util.js +0 -13
- package/dist/lib/components/runtime/utils/common-util.d.ts +0 -5
- package/dist/lib/components/runtime/utils/common-util.js +0 -13
- package/dist/lib/components/runtime/utils/interfaces/page-design-types.d.ts +0 -2
- package/dist/lib/components/runtime/utils/page-helper-util.d.ts +0 -19
- package/dist/lib/components/runtime/utils/page-helper-util.js +0 -119
- package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +3 -376
- package/dist/lib/components/runtime/views/super-page-dialog.vue.js +4 -4
- package/dist/lib/components/runtime/views/super-page.vue.js +0 -14
- package/dist/lib/index.d.ts +2 -7
- package/dist/lib/index.js +2 -11
- package/package.json +69 -70
- package/dist/es/assets/chart-themes/theme1.d.ts +0 -4
- package/dist/es/assets/chart-themes/theme2.d.ts +0 -4
- package/dist/es/assets/chart-themes/theme3.d.ts +0 -4
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +0 -11
- package/dist/es/components/runtime/utils/page-permission-util.d.ts +0 -26
- package/dist/es/components/runtime/utils/page-permission-util.js +0 -525
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +0 -44
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +0 -4
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +0 -62
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +0 -4
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +0 -127
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +0 -4
- package/dist/lib/assets/chart-themes/theme1.d.ts +0 -4
- package/dist/lib/assets/chart-themes/theme2.d.ts +0 -4
- package/dist/lib/assets/chart-themes/theme3.d.ts +0 -4
- package/dist/lib/components/runtime/utils/charts/chart-util.d.ts +0 -11
- package/dist/lib/components/runtime/utils/page-permission-util.d.ts +0 -26
- package/dist/lib/components/runtime/utils/page-permission-util.js +0 -525
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +0 -43
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +0 -61
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +0 -126
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +0 -3
package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const Vue = require("vue");
|
|
3
3
|
const chartUtil = require("../../../../utils/charts/chart-util.js");
|
|
4
|
-
const commonUtil = require("../../../../utils/common-util.js");
|
|
5
|
-
const pageHelperUtil = require("../../../../utils/page-helper-util.js");
|
|
6
|
-
const commonChartHeader_vue_vue_type_script_setup_true_lang = require("../common/common-chart-header.vue.js");
|
|
7
4
|
const index_esm_min = require("../../../../../../node_modules/.pnpm/vue-echarts@6.6.9_echarts@5.5.0_vue@3.4.21/node_modules/vue-echarts/dist/index.esm.min.js");
|
|
8
5
|
const extension = require("../../../../../../node_modules/.pnpm/echarts@5.5.0/node_modules/echarts/lib/extension.js");
|
|
9
6
|
const installCanvasRenderer = require("../../../../../../node_modules/.pnpm/echarts@5.5.0/node_modules/echarts/lib/renderer/installCanvasRenderer.js");
|
|
@@ -21,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
|
|
|
21
18
|
pageContext: {},
|
|
22
19
|
configure: {}
|
|
23
20
|
},
|
|
24
|
-
setup(__props
|
|
21
|
+
setup(__props) {
|
|
25
22
|
extension.use([
|
|
26
23
|
installCanvasRenderer.install,
|
|
27
24
|
install.install,
|
|
@@ -35,374 +32,13 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
|
|
|
35
32
|
]);
|
|
36
33
|
const props = __props;
|
|
37
34
|
const thisRef = Vue.ref(null);
|
|
38
|
-
const chartRef = Vue.ref(null);
|
|
39
|
-
const headerRef = Vue.ref(null);
|
|
40
|
-
const enableDrill = props.configure.props ? props.configure.props.enableDrill : null;
|
|
41
35
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
42
36
|
const runtimeStyle = runtimeInfo.style;
|
|
43
37
|
const runtimeClass = runtimeInfo.class;
|
|
44
|
-
const dataConfig = runtimeInfo.dataConfig;
|
|
45
|
-
const headerInfo = runtimeInfo.headerInfo ? runtimeInfo.headerInfo : {};
|
|
46
|
-
let cacheDatas = null;
|
|
47
38
|
const chartOption = runtimeInfo.chartOption;
|
|
48
|
-
|
|
49
|
-
if (defaultSeries && defaultSeries.length > 0) {
|
|
50
|
-
for (let s of defaultSeries) {
|
|
51
|
-
s.data = [];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
const defaultXaxis = chartOption.xAxis;
|
|
55
|
-
if (defaultXaxis && defaultXaxis.length > 0 && defaultXaxis[0].data) {
|
|
56
|
-
defaultXaxis[0].data = [];
|
|
57
|
-
}
|
|
58
|
-
const defaultYaxis = chartOption.yAxis;
|
|
59
|
-
if (defaultYaxis) {
|
|
60
|
-
for (let yAxis of defaultYaxis) {
|
|
61
|
-
if (yAxis.data) {
|
|
62
|
-
yAxis.data = [];
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
console.log("chartOption", chartOption);
|
|
39
|
+
console.log("chartOption-runtime", chartOption);
|
|
67
40
|
const configureProps = props.configure.props ? props.configure.props : {};
|
|
68
41
|
const customTheme = chartUtil.getCustomTheme(configureProps.customTheme);
|
|
69
|
-
function updateChartDatas(resultData) {
|
|
70
|
-
if (!resultData) {
|
|
71
|
-
resultData = [];
|
|
72
|
-
}
|
|
73
|
-
resultData = resultData.length > 0 ? resultData[0] : {};
|
|
74
|
-
if (!resultData) {
|
|
75
|
-
resultData = {};
|
|
76
|
-
}
|
|
77
|
-
if (resultData.hasRender) {
|
|
78
|
-
resultData.hasRender = true;
|
|
79
|
-
console.log("重复更新!", resultData);
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
resultData.hasRender = true;
|
|
83
|
-
updateChartOption(resultData);
|
|
84
|
-
}
|
|
85
|
-
Vue.onMounted(() => {
|
|
86
|
-
const resultData = pageHelperUtil.getChartDatasFromPage(props.pageContext, props.configure);
|
|
87
|
-
if (resultData) {
|
|
88
|
-
updateChartDatas(resultData);
|
|
89
|
-
}
|
|
90
|
-
if (enableDrill && chartRef.value) {
|
|
91
|
-
chartRef.value.chart.on("click", function(params) {
|
|
92
|
-
if (headerRef.value && headerRef.value.drill) {
|
|
93
|
-
headerRef.value.drill(params, cacheDatas);
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
function onDrillEnd(params) {
|
|
99
|
-
}
|
|
100
|
-
let hisGroupValue = headerInfo.groupValue;
|
|
101
|
-
Vue.watch(headerInfo, () => {
|
|
102
|
-
if (hisGroupValue == headerInfo.groupValue) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
hisGroupValue = headerInfo.groupValue;
|
|
106
|
-
refresh();
|
|
107
|
-
});
|
|
108
|
-
function refresh() {
|
|
109
|
-
if (!dataConfig) {
|
|
110
|
-
console.log("无数据源配置,不需要查询!");
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
dataConfig.services[0].groupValue = headerInfo.groupValue;
|
|
114
|
-
pageHelperUtil.updateChartDatasources(props.pageContext, [dataConfig], headerInfo.drillParams);
|
|
115
|
-
}
|
|
116
|
-
function updateChartOption(resultData) {
|
|
117
|
-
if (!resultData || !resultData.result) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
const result = resultData && resultData.result ? resultData.result : {};
|
|
121
|
-
const groupValue = resultData && resultData.groupValue ? resultData.groupValue : [];
|
|
122
|
-
const dataSetField = props.configure.serviceDataField;
|
|
123
|
-
let datas = null;
|
|
124
|
-
if (dataSetField) {
|
|
125
|
-
datas = result[dataSetField];
|
|
126
|
-
} else {
|
|
127
|
-
if (result) {
|
|
128
|
-
if (Array.isArray(result)) {
|
|
129
|
-
datas = result;
|
|
130
|
-
} else {
|
|
131
|
-
datas = [result];
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
if (!datas) {
|
|
136
|
-
datas = [];
|
|
137
|
-
}
|
|
138
|
-
let confGroups = props.configure.props ? props.configure.props.groups : null;
|
|
139
|
-
if (!confGroups) {
|
|
140
|
-
confGroups = [];
|
|
141
|
-
}
|
|
142
|
-
const groupMap = {};
|
|
143
|
-
const groupFields = [];
|
|
144
|
-
for (let g of confGroups) {
|
|
145
|
-
groupMap[g.group] = g.target;
|
|
146
|
-
if (g.target && !groupFields.includes(g.target)) {
|
|
147
|
-
groupFields.push(g.target);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
let mulGroupShow = props.configure.props ? props.configure.props.mulGroupShow : "";
|
|
151
|
-
mulGroupShow = mulGroupShow == "break" ? "<br/>" : " ";
|
|
152
|
-
const xFieldName = "__x";
|
|
153
|
-
for (let d of datas) {
|
|
154
|
-
if (!d) {
|
|
155
|
-
continue;
|
|
156
|
-
}
|
|
157
|
-
const xValues2 = [];
|
|
158
|
-
for (let g of groupValue) {
|
|
159
|
-
const fieldName = groupMap[g];
|
|
160
|
-
const value = pageHelperUtil.getValueFromSource(d, fieldName, void 0);
|
|
161
|
-
if (value) {
|
|
162
|
-
xValues2.push(value);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
const xValue = xValues2.join(mulGroupShow);
|
|
166
|
-
d[xFieldName] = xValue;
|
|
167
|
-
}
|
|
168
|
-
const itemConfs = props.configure.items ? props.configure.items : [];
|
|
169
|
-
const serieValues = [];
|
|
170
|
-
const serieValueMap = {};
|
|
171
|
-
const dynamicFileds = [];
|
|
172
|
-
const dynamicValueField = {};
|
|
173
|
-
const allValueFields = [];
|
|
174
|
-
for (let item of itemConfs) {
|
|
175
|
-
const itemProps = item.props ? item.props : {};
|
|
176
|
-
const sourceType = itemProps.yaxisSource;
|
|
177
|
-
const yaxisField = itemProps.yaxisField;
|
|
178
|
-
let serieValue = null;
|
|
179
|
-
if (yaxisField && (!sourceType || sourceType == "variable")) {
|
|
180
|
-
serieValue = {
|
|
181
|
-
uuid: item.uuid,
|
|
182
|
-
type: "variable",
|
|
183
|
-
field: yaxisField,
|
|
184
|
-
data: [],
|
|
185
|
-
dynamicDatas: []
|
|
186
|
-
//动态系列数据
|
|
187
|
-
};
|
|
188
|
-
if (yaxisField && !allValueFields.includes(yaxisField)) {
|
|
189
|
-
allValueFields.push(yaxisField);
|
|
190
|
-
}
|
|
191
|
-
} else {
|
|
192
|
-
serieValue = {
|
|
193
|
-
uuid: item.uuid,
|
|
194
|
-
type: "fixed",
|
|
195
|
-
field: itemProps.yaxisFix,
|
|
196
|
-
data: [],
|
|
197
|
-
dynamicDatas: []
|
|
198
|
-
//动态系列数据
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
if (serieValue != null) {
|
|
202
|
-
serieValues.push(serieValue);
|
|
203
|
-
serieValueMap[item.uuid] = serieValue;
|
|
204
|
-
}
|
|
205
|
-
if (itemProps.dynamicSeriesField && // !groupFields.includes(itemProps.dynamicSeriesField) &&
|
|
206
|
-
!dynamicFileds.includes(itemProps.dynamicSeriesField) && serieValue && yaxisField) {
|
|
207
|
-
serieValue.dynamicField = itemProps.dynamicSeriesField;
|
|
208
|
-
serieValue.dynamicSeriesTitle = itemProps.dynamicSeriesTitle;
|
|
209
|
-
serieValue.dynamicShowStack = itemProps.dynamicShowStack;
|
|
210
|
-
dynamicFileds.push(itemProps.dynamicSeriesField);
|
|
211
|
-
dynamicValueField[itemProps.dynamicSeriesField] = yaxisField;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
const dynamicLabelMap = {};
|
|
215
|
-
if (dynamicFileds.length > 0) {
|
|
216
|
-
const newDatas = [];
|
|
217
|
-
const dataMap = {};
|
|
218
|
-
for (let d of datas) {
|
|
219
|
-
if (!d) {
|
|
220
|
-
continue;
|
|
221
|
-
}
|
|
222
|
-
for (let valueField of allValueFields) {
|
|
223
|
-
const groupValue2 = d[xFieldName];
|
|
224
|
-
let newData = dataMap[groupValue2];
|
|
225
|
-
if (!newData) {
|
|
226
|
-
newData = {};
|
|
227
|
-
for (let gField of groupFields) {
|
|
228
|
-
newData[gField] = d[gField];
|
|
229
|
-
}
|
|
230
|
-
newData[xFieldName] = d[xFieldName];
|
|
231
|
-
dataMap[groupValue2] = newData;
|
|
232
|
-
newDatas.push(newData);
|
|
233
|
-
}
|
|
234
|
-
let newValue = pageHelperUtil.getValueFromSource(d, valueField, void 0);
|
|
235
|
-
if (!isNaN(newValue)) {
|
|
236
|
-
const hisValue = newData[valueField];
|
|
237
|
-
if (!isNaN) {
|
|
238
|
-
newValue += hisValue;
|
|
239
|
-
}
|
|
240
|
-
newData[valueField] = newValue;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
for (let dynamicField of dynamicFileds) {
|
|
245
|
-
const dynamicLabels = [];
|
|
246
|
-
for (let d of datas) {
|
|
247
|
-
if (!d) {
|
|
248
|
-
continue;
|
|
249
|
-
}
|
|
250
|
-
const groupValue2 = d[xFieldName];
|
|
251
|
-
let newData = dataMap[groupValue2];
|
|
252
|
-
if (!newData) {
|
|
253
|
-
continue;
|
|
254
|
-
}
|
|
255
|
-
let dynamicLabel = pageHelperUtil.getValueFromSource(d, dynamicField, void 0);
|
|
256
|
-
dynamicLabel = dynamicLabel == null || dynamicLabel == void 0 ? "" : dynamicLabel;
|
|
257
|
-
if (!dynamicLabels.includes(dynamicLabel)) {
|
|
258
|
-
dynamicLabels.push(dynamicLabel);
|
|
259
|
-
}
|
|
260
|
-
const valueField = dynamicValueField[dynamicField];
|
|
261
|
-
let newValue = pageHelperUtil.getValueFromSource(d, valueField, void 0);
|
|
262
|
-
if (!isNaN(newValue)) {
|
|
263
|
-
const hisValue = newData[dynamicLabel];
|
|
264
|
-
if (!isNaN) {
|
|
265
|
-
newValue += hisValue;
|
|
266
|
-
}
|
|
267
|
-
newData[dynamicLabel] = newValue;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
dynamicLabelMap[dynamicField] = dynamicLabels;
|
|
271
|
-
}
|
|
272
|
-
datas = newDatas;
|
|
273
|
-
}
|
|
274
|
-
sortDatas(datas);
|
|
275
|
-
const xValues = [];
|
|
276
|
-
for (let data of datas) {
|
|
277
|
-
if (!data) {
|
|
278
|
-
continue;
|
|
279
|
-
}
|
|
280
|
-
xValues.push(data[xFieldName]);
|
|
281
|
-
for (let item of serieValues) {
|
|
282
|
-
let serieData = item.data;
|
|
283
|
-
const dynamicDatas = item.dynamicDatas;
|
|
284
|
-
if (item.dynamicField) {
|
|
285
|
-
let dynamicLabels = dynamicLabelMap[item.dynamicField];
|
|
286
|
-
dynamicLabels = dynamicLabels ? dynamicLabels : [];
|
|
287
|
-
for (let i = 0; i < dynamicLabels.length; i++) {
|
|
288
|
-
if (i >= dynamicDatas.length) {
|
|
289
|
-
dynamicDatas.push([]);
|
|
290
|
-
}
|
|
291
|
-
serieData = dynamicDatas[i];
|
|
292
|
-
const fieldName = dynamicLabels[i];
|
|
293
|
-
const value = pageHelperUtil.getValueFromSource(data, fieldName, void 0);
|
|
294
|
-
serieData.push(value);
|
|
295
|
-
}
|
|
296
|
-
} else if (item.type == "fixed") {
|
|
297
|
-
serieData.push(item.field);
|
|
298
|
-
} else if (item.type == "variable") {
|
|
299
|
-
const value = pageHelperUtil.getValueFromSource(data, item.field, void 0);
|
|
300
|
-
serieData.push(value);
|
|
301
|
-
} else {
|
|
302
|
-
serieData.push(void 0);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
const tempSeries = commonUtil.deepCopy(defaultSeries == null ? [] : defaultSeries);
|
|
307
|
-
const newSeries = [];
|
|
308
|
-
for (let serie of tempSeries) {
|
|
309
|
-
const serieValue = serieValueMap[serie.uuid];
|
|
310
|
-
if (serieValue.dynamicField) {
|
|
311
|
-
let dynamicLabels = dynamicLabelMap[serieValue.dynamicField];
|
|
312
|
-
dynamicLabels = dynamicLabels ? dynamicLabels : [];
|
|
313
|
-
const dynamicDatas = serieValue.dynamicDatas ? serieValue.dynamicDatas : [];
|
|
314
|
-
for (let i = 0; i < dynamicLabels.length; i++) {
|
|
315
|
-
let label = dynamicLabels[i];
|
|
316
|
-
const newSerie = commonUtil.deepCopy(serie);
|
|
317
|
-
if (serieValue.dynamicSeriesTitle) {
|
|
318
|
-
const dynamicSeriesTitle = serieValue.dynamicSeriesTitle.replace("${name}", label);
|
|
319
|
-
newSerie.name = pageHelperUtil.formatVariableValue(props.pageContext, dynamicSeriesTitle);
|
|
320
|
-
} else {
|
|
321
|
-
newSerie.name = label;
|
|
322
|
-
}
|
|
323
|
-
newSerie.data = i < dynamicDatas.length ? dynamicDatas[i] : [];
|
|
324
|
-
if (serie.type == "bar" && serieValue.dynamicShowStack) {
|
|
325
|
-
newSerie.stack = serie.uuid;
|
|
326
|
-
}
|
|
327
|
-
newSeries.push(newSerie);
|
|
328
|
-
}
|
|
329
|
-
} else {
|
|
330
|
-
serie.data = serieValue ? serieValue.data : [];
|
|
331
|
-
newSeries.push(serie);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
chartOption.series = newSeries;
|
|
335
|
-
if (chartOption.isBar) {
|
|
336
|
-
if (defaultYaxis) {
|
|
337
|
-
for (let tempYaxis of defaultYaxis) {
|
|
338
|
-
tempYaxis.data = xValues;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
chartOption.xAxis = defaultXaxis;
|
|
342
|
-
chartOption.yAxis = defaultYaxis;
|
|
343
|
-
} else {
|
|
344
|
-
if (defaultXaxis && defaultXaxis.length > 0) {
|
|
345
|
-
defaultXaxis[0].data = xValues;
|
|
346
|
-
}
|
|
347
|
-
chartOption.xAxis = defaultXaxis;
|
|
348
|
-
chartOption.yAxis = defaultYaxis;
|
|
349
|
-
}
|
|
350
|
-
cacheDatas = datas;
|
|
351
|
-
console.log("chartOption", chartOption);
|
|
352
|
-
}
|
|
353
|
-
function sortDatas(datas) {
|
|
354
|
-
const itemConfs = props.configure.items ? props.configure.items : [];
|
|
355
|
-
let orderByTarget = props.configure.props ? props.configure.props.orderByTarget : "";
|
|
356
|
-
let orderField = null;
|
|
357
|
-
if (orderByTarget == "x" || orderByTarget == "X") {
|
|
358
|
-
orderField = "__x";
|
|
359
|
-
} else if (orderByTarget) {
|
|
360
|
-
for (let item of itemConfs) {
|
|
361
|
-
if (item.uuid == orderByTarget) {
|
|
362
|
-
const itemProps = item.props ? item.props : {};
|
|
363
|
-
const sourceType = itemProps.yaxisSource;
|
|
364
|
-
const yaxisField = itemProps.yaxisField;
|
|
365
|
-
if (yaxisField && (!sourceType || sourceType == "variable")) {
|
|
366
|
-
orderField = yaxisField;
|
|
367
|
-
break;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
if (!orderField) {
|
|
373
|
-
return;
|
|
374
|
-
}
|
|
375
|
-
let orderSource = props.configure.props ? props.configure.props.orderSource : "";
|
|
376
|
-
let orderValue = props.configure.props ? props.configure.props.orderFix : "";
|
|
377
|
-
if (orderSource == "variable") {
|
|
378
|
-
let orderVariable = props.configure.props ? props.configure.props.orderVariable : "";
|
|
379
|
-
orderValue = pageHelperUtil.formatVariableValue(props.pageContext, orderVariable);
|
|
380
|
-
}
|
|
381
|
-
orderValue = orderValue == "desc" || orderValue == "DESC" ? "desc" : "asc";
|
|
382
|
-
let maxLen = datas.length;
|
|
383
|
-
for (let i = 0; i < maxLen - 1; i++) {
|
|
384
|
-
let vali = pageHelperUtil.getValueFromSource(datas[i], orderField, void 0);
|
|
385
|
-
for (let j = i + 1; j < maxLen; j++) {
|
|
386
|
-
let valj = pageHelperUtil.getValueFromSource(datas[j], orderField, void 0);
|
|
387
|
-
let isSwap = false;
|
|
388
|
-
if ("desc" == orderValue) {
|
|
389
|
-
if (vali < valj) {
|
|
390
|
-
isSwap = true;
|
|
391
|
-
}
|
|
392
|
-
} else {
|
|
393
|
-
if (vali > valj) {
|
|
394
|
-
isSwap = true;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
if (isSwap) {
|
|
398
|
-
[datas[i], datas[j]] = [datas[j], datas[i]];
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
__expose({
|
|
404
|
-
updateChartDatas
|
|
405
|
-
});
|
|
406
42
|
return (_ctx, _cache) => {
|
|
407
43
|
return Vue.openBlock(), Vue.createElementBlock("div", {
|
|
408
44
|
style: Vue.normalizeStyle(Vue.unref(runtimeStyle)),
|
|
@@ -410,17 +46,8 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
|
|
|
410
46
|
ref_key: "thisRef",
|
|
411
47
|
ref: thisRef
|
|
412
48
|
}, [
|
|
413
|
-
Vue.withDirectives(Vue.createVNode(commonChartHeader_vue_vue_type_script_setup_true_lang, {
|
|
414
|
-
ref_key: "headerRef",
|
|
415
|
-
ref: headerRef,
|
|
416
|
-
headerInfo: Vue.unref(headerInfo),
|
|
417
|
-
onDrillEnd
|
|
418
|
-
}, null, 8, ["headerInfo"]), [
|
|
419
|
-
[Vue.vShow, Vue.unref(headerInfo).showHeader]
|
|
420
|
-
]),
|
|
421
49
|
Vue.createVNode(Vue.unref(index_esm_min.default), {
|
|
422
|
-
|
|
423
|
-
ref: chartRef,
|
|
50
|
+
ref: "chartRef",
|
|
424
51
|
theme: Vue.unref(customTheme),
|
|
425
52
|
option: Vue.unref(chartOption),
|
|
426
53
|
autoresize: ""
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const Vue = require("vue");
|
|
3
3
|
const superPage_vue_vue_type_script_setup_true_lang = require("./super-page.vue.js");
|
|
4
|
+
const showContent = true;
|
|
4
5
|
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
|
|
5
6
|
__name: "super-page-dialog",
|
|
6
7
|
props: {
|
|
@@ -13,7 +14,6 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
|
|
|
13
14
|
setup(__props, { emit: __emit }) {
|
|
14
15
|
const props = __props;
|
|
15
16
|
const emits = __emit;
|
|
16
|
-
const showContent = Vue.ref(true);
|
|
17
17
|
const myJumpPageSetting = props.jumpPageSetting ? props.jumpPageSetting : null;
|
|
18
18
|
const width = Vue.ref(null);
|
|
19
19
|
const title = Vue.ref(null);
|
|
@@ -47,8 +47,8 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
|
|
|
47
47
|
return (_ctx, _cache) => {
|
|
48
48
|
const _component_el_drawer = Vue.resolveComponent("el-drawer");
|
|
49
49
|
return Vue.openBlock(), Vue.createBlock(_component_el_drawer, {
|
|
50
|
-
modelValue: showContent
|
|
51
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showContent
|
|
50
|
+
modelValue: showContent,
|
|
51
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showContent = $event),
|
|
52
52
|
"with-header": !title.value,
|
|
53
53
|
title: title.value,
|
|
54
54
|
direction: "btt",
|
|
@@ -66,7 +66,7 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
|
|
|
66
66
|
}, null, 8, ["pageCode", "pageRequest"])) : Vue.createCommentVNode("", true)
|
|
67
67
|
]),
|
|
68
68
|
_: 1
|
|
69
|
-
}, 8, ["
|
|
69
|
+
}, 8, ["with-header", "title", "size"]);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
});
|
|
@@ -108,10 +108,6 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
|
|
|
108
108
|
setTimeout(() => {
|
|
109
109
|
initOptionDatas(pageContext, pageDesign.initOptionConfigs);
|
|
110
110
|
}, 0);
|
|
111
|
-
setTimeout(() => {
|
|
112
|
-
console.log("pageDesign.initChartServiceConfigs", pageDesign.initChartServiceConfigs);
|
|
113
|
-
initChartDatas(pageContext, pageDesign.initChartServiceConfigs);
|
|
114
|
-
}, 0);
|
|
115
111
|
pageContext.initDataSources = [];
|
|
116
112
|
globalRefs.initComponentRefState(pageContext);
|
|
117
113
|
pageItems.value = pageContext.items ? pageContext.items : [];
|
|
@@ -204,16 +200,6 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
|
|
|
204
200
|
pageHelperUtil.updateOptionDatasources(pageContext2, initOptionConfigs, void 0);
|
|
205
201
|
}
|
|
206
202
|
}
|
|
207
|
-
function initChartDatas(pageContext2, chartConfigs) {
|
|
208
|
-
if (!chartConfigs || chartConfigs.length == 0) {
|
|
209
|
-
console.log("无需要初始化的选项组数据");
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
console.log("pageContext.chartConfigs:", chartConfigs);
|
|
213
|
-
if (chartConfigs && chartConfigs.length > 0) {
|
|
214
|
-
pageHelperUtil.updateChartDatasources(pageContext2, chartConfigs);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
203
|
Vue.onMounted(() => {
|
|
218
204
|
if (props.pageDesign != null) {
|
|
219
205
|
pageDesignResult.value = props.pageDesign;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getComponentOptionConfigs } from './components/runtime/utils/page-helper-util';
|
|
3
|
-
import { getStandPermissionInfo, getFunctionInfo, FuncType } from './components/runtime/utils/page-permission-util';
|
|
4
|
-
import { getCustomTheme, getCustomThemeOptions } from './components/runtime/utils/charts/chart-util';
|
|
1
|
+
import { SuperPage, SuperPageDialog } from './components/runtime';
|
|
5
2
|
|
|
6
|
-
export {
|
|
7
|
-
export { getStandPermissionInfo, getFunctionInfo, FuncType };
|
|
8
|
-
export { getCustomTheme, getCustomThemeOptions };
|
|
3
|
+
export { SuperPage, SuperPageDialog };
|
package/dist/lib/index.js
CHANGED
|
@@ -2,14 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const superPage_vue_vue_type_script_setup_true_lang = require("./components/runtime/views/super-page.vue.js");
|
|
4
4
|
const superPageDialog_vue_vue_type_script_setup_true_lang = require("./components/runtime/views/super-page-dialog.vue.js");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const chartUtil = require("./components/runtime/utils/charts/chart-util.js");
|
|
8
|
-
exports.SuperPageNew = superPage_vue_vue_type_script_setup_true_lang;
|
|
9
|
-
exports.SuperPageDialogNew = superPageDialog_vue_vue_type_script_setup_true_lang;
|
|
10
|
-
exports.getComponentOptionConfigs = pageHelperUtil.getComponentOptionConfigs;
|
|
11
|
-
exports.FuncType = pagePermissionUtil.FuncType;
|
|
12
|
-
exports.getFunctionInfo = pagePermissionUtil.getFunctionInfo;
|
|
13
|
-
exports.getStandPermissionInfo = pagePermissionUtil.getStandPermissionInfo;
|
|
14
|
-
exports.getCustomTheme = chartUtil.getCustomTheme;
|
|
15
|
-
exports.getCustomThemeOptions = chartUtil.getCustomThemeOptions;
|
|
5
|
+
exports.SuperPage = superPage_vue_vue_type_script_setup_true_lang;
|
|
6
|
+
exports.SuperPageDialog = superPageDialog_vue_vue_type_script_setup_true_lang;
|
package/package.json
CHANGED
|
@@ -1,70 +1,69 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "super-page-runtime",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "AgileBuilder super page runtime",
|
|
5
|
-
"license": "ISC",
|
|
6
|
-
"main": "
|
|
7
|
-
"files": [
|
|
8
|
-
"dist/*"
|
|
9
|
-
],
|
|
10
|
-
"typings": "dist/lib/index.d.ts",
|
|
11
|
-
"scripts": {
|
|
12
|
-
"dev": "vite",
|
|
13
|
-
"build": "run-p type-check \"build-only {@}\" --",
|
|
14
|
-
"preview": "vite preview",
|
|
15
|
-
"test:unit": "vitest",
|
|
16
|
-
"test:e2e": "start-server-and-test preview http://localhost:4173 'cypress run --e2e'",
|
|
17
|
-
"test:e2e:dev": "start-server-and-test 'vite dev --port 4173' http://localhost:4173 'cypress open --e2e'",
|
|
18
|
-
"build-only": "vite build",
|
|
19
|
-
"type-check": "vue-tsc --build --force",
|
|
20
|
-
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
21
|
-
"format": "prettier --write src/"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@vitejs/plugin-vue
|
|
47
|
-
"@
|
|
48
|
-
"@vue/
|
|
49
|
-
"
|
|
50
|
-
"axios": "^1.6.8",
|
|
51
|
-
"cypress": "^13.6.6",
|
|
52
|
-
"
|
|
53
|
-
"eslint": "^
|
|
54
|
-
"eslint-plugin-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"vite": "^
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"vue": "^
|
|
66
|
-
"vue-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "super-page-runtime",
|
|
3
|
+
"version": "3.0.3",
|
|
4
|
+
"description": "AgileBuilder super page runtime",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"main": "./src/index.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/*"
|
|
9
|
+
],
|
|
10
|
+
"typings": "dist/lib/index.d.ts",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"dev": "vite",
|
|
13
|
+
"build": "run-p type-check \"build-only {@}\" --",
|
|
14
|
+
"preview": "vite preview",
|
|
15
|
+
"test:unit": "vitest",
|
|
16
|
+
"test:e2e": "start-server-and-test preview http://localhost:4173 'cypress run --e2e'",
|
|
17
|
+
"test:e2e:dev": "start-server-and-test 'vite dev --port 4173' http://localhost:4173 'cypress open --e2e'",
|
|
18
|
+
"build-only": "vite build",
|
|
19
|
+
"type-check": "vue-tsc --build --force",
|
|
20
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
21
|
+
"format": "prettier --write src/"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@element-plus/icons": "^0.0.11",
|
|
25
|
+
"@element-plus/icons-vue": "^2.3.1",
|
|
26
|
+
"@vueup/vue-quill": "^1.2.0",
|
|
27
|
+
"@vueuse/core": "^10.9.0",
|
|
28
|
+
"agilebuilder-ui": "1.0.13",
|
|
29
|
+
"async-validator": "^4.2.5",
|
|
30
|
+
"dayjs": "^1.11.11",
|
|
31
|
+
"echarts": "^5.5.0",
|
|
32
|
+
"element-plus": "^2.6.1",
|
|
33
|
+
"jsbarcode": "^3.11.6",
|
|
34
|
+
"nprogress": "^0.2.0",
|
|
35
|
+
"qrcode": "^1.5.3",
|
|
36
|
+
"quill": "^2.0.1",
|
|
37
|
+
"uuid": "^9.0.1",
|
|
38
|
+
"vue-awesome": "^4.5.0",
|
|
39
|
+
"vue-codemirror": "^6.1.1",
|
|
40
|
+
"vue-draggable-plus": "^0.3.5",
|
|
41
|
+
"vue-echarts": "^6.6.9"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@rushstack/eslint-patch": "^1.3.3",
|
|
45
|
+
"@types/jsdom": "^21.1.6",
|
|
46
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
47
|
+
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
48
|
+
"@vue/eslint-config-prettier": "^8.0.0",
|
|
49
|
+
"@vue/test-utils": "^2.4.4",
|
|
50
|
+
"axios": "^1.6.8",
|
|
51
|
+
"cypress": "^13.6.6",
|
|
52
|
+
"eslint": "^8.49.0",
|
|
53
|
+
"eslint-plugin-cypress": "^2.15.1",
|
|
54
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
55
|
+
"js-cookie": "^3.0.5",
|
|
56
|
+
"jsdom": "^24.0.0",
|
|
57
|
+
"mitt": "^3.0.1",
|
|
58
|
+
"saas": "^1.0.0",
|
|
59
|
+
"sass": "^1.72.0",
|
|
60
|
+
"start-server-and-test": "^2.0.3",
|
|
61
|
+
"vite": "^5.1.6",
|
|
62
|
+
"vite-plugin-dts": "^3.9.1",
|
|
63
|
+
"vitest": "^1.3.1",
|
|
64
|
+
"vue": "^3.4.21",
|
|
65
|
+
"vue-i18n": "^9.10.2",
|
|
66
|
+
"vue-router": "^4.3.0",
|
|
67
|
+
"vuex": "^4.1.0"
|
|
68
|
+
}
|
|
69
|
+
}
|