@ibiz-template/runtime 0.7.26-alpha.2 → 0.7.26
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/index.esm.js +720 -370
- package/dist/index.system.min.js +1 -1
- package/out/app-hub.d.ts +1 -0
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +5 -0
- package/out/controller/control/chart/generator/chart-options-generator.d.ts +39 -0
- package/out/controller/control/chart/generator/chart-options-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/chart-options-generator.js +217 -174
- package/out/controller/control/chart/generator/radar-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/radar-series-generator.js +5 -2
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts +1 -8
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.js +1 -9
- package/out/controller/control/dashboard/dashboard.controller.d.ts +25 -0
- package/out/controller/control/dashboard/dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/dashboard.controller.js +52 -0
- package/out/controller/control/grid/grid/entity-schema.d.ts.map +1 -1
- package/out/controller/control/grid/grid/entity-schema.js +1 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts +15 -2
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +32 -2
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +2 -1
- package/out/controller/control/report-panel/generator/base-generator.d.ts +4 -4
- package/out/controller/control/report-panel/generator/base-generator.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/base-generator.js +4 -5
- package/out/controller/control/report-panel/generator/bi-generator.d.ts +14 -4
- package/out/controller/control/report-panel/generator/bi-generator.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/bi-generator.js +66 -16
- package/out/controller/control/report-panel/generator/user-generator.d.ts +2 -2
- package/out/controller/control/report-panel/generator/user-generator.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/user-generator.js +2 -2
- package/out/controller/control/report-panel/report-panel.controller.d.ts.map +1 -1
- package/out/controller/control/report-panel/report-panel.controller.js +3 -0
- package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.js +7 -0
- package/out/global/global-util/global-util.d.ts +8 -1
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/global/global-util/global-util.js +8 -1
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +10 -0
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-report-panel.controller.d.ts +8 -0
- package/out/interface/controller/controller/control/i-report-panel.controller.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-grid.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-grid.state.d.ts.map +1 -1
- package/out/interface/provider/model-loader.provider.d.ts +10 -0
- package/out/interface/provider/model-loader.provider.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +2 -1
- package/out/ui-action/provider/front-ui-action-provider.js +1 -1
- package/out/utils/bi-report-util/bi-report-util.d.ts +59 -0
- package/out/utils/bi-report-util/bi-report-util.d.ts.map +1 -0
- package/out/utils/bi-report-util/bi-report-util.js +108 -0
- package/out/utils/bi-report-util/index.d.ts +2 -0
- package/out/utils/bi-report-util/index.d.ts.map +1 -0
- package/out/utils/bi-report-util/index.js +1 -0
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/out/utils/script/script-factory.d.ts.map +1 -1
- package/out/utils/script/script-factory.js +1 -1
- package/package.json +5 -5
package/out/app-hub.d.ts
CHANGED
|
@@ -310,6 +310,7 @@ export declare class AppHub implements IAppHubService {
|
|
|
310
310
|
* @return {*} {Promise<IAppDEService>}
|
|
311
311
|
*/
|
|
312
312
|
getAppDEService(appId: string, entityId: string, context: IContext): Promise<IAppDEService>;
|
|
313
|
+
translationModelToDsl(data: IData, type: 'APP' | 'VIEW' | 'CTRL' | 'APPENTITY'): Promise<IModel | undefined>;
|
|
313
314
|
reset(): void;
|
|
314
315
|
/**
|
|
315
316
|
* 销毁基座
|
package/out/app-hub.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-hub.d.ts","sourceRoot":"","sources":["../src/app-hub.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,YAAY,EAEb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,aAAa,EACb,cAAc,EACd,WAAW,EACX,mBAAmB,EACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D;;;;;;;GAOG;AACH,qBAAa,MAAO,YAAW,cAAc;IAC3C;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAiB;IAE1C;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,gBAAuB;IAE1C;;;;;;OAMG;IACH,WAAW,EAAG,aAAa,CAAC;IAE5B;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;IAEvD;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAA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,KAAK,EACX,IAAI,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAC1C,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAM9B,KAAK,IAAI,IAAI;IAMb;;;;;OAKG;IACH,OAAO,IAAI,IAAI;CAKhB"}
|
package/out/app-hub.js
CHANGED
|
@@ -448,6 +448,11 @@ export class AppHub {
|
|
|
448
448
|
const app = await this.getAppAsync(appId);
|
|
449
449
|
return app.deService.getService(context, entityId);
|
|
450
450
|
}
|
|
451
|
+
async translationModelToDsl(data, type) {
|
|
452
|
+
if (this.modelLoaderProvider) {
|
|
453
|
+
return this.modelLoaderProvider.translationModelToDsl(data, type);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
451
456
|
reset() {
|
|
452
457
|
this.appMap.clear();
|
|
453
458
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -74,6 +74,45 @@ export declare class ChartOptionsGenerator {
|
|
|
74
74
|
protected calcTitleOption(chartTitle: IDEChartTitle): EChartsOption['title'];
|
|
75
75
|
protected calcLegendOption(chartLegend: IDEChartLegend): EChartsOption['legend'];
|
|
76
76
|
protected calcXYAxisOption(chartAxises: IChartYAxis[] | IChartXAxis[]): XAXisComponentOption[] | YAXisComponentOption[];
|
|
77
|
+
/**
|
|
78
|
+
* 处理轴布局位置
|
|
79
|
+
*
|
|
80
|
+
* @param {CodeListItem[]} items
|
|
81
|
+
* @param {number} padding
|
|
82
|
+
* @param {number} total
|
|
83
|
+
* @param {number} index
|
|
84
|
+
* @param {boolean} isRow 是否横向
|
|
85
|
+
* @return {*}
|
|
86
|
+
* @memberof ChartOptionsGenerator
|
|
87
|
+
*/
|
|
88
|
+
handleAxisLayout(items: readonly CodeListItem[], padding: number, total: number, index: number, isRow?: boolean): IData[];
|
|
89
|
+
/**
|
|
90
|
+
* 处理轴层级
|
|
91
|
+
*
|
|
92
|
+
* @param {IData[]} tempaxis
|
|
93
|
+
* @param {number} index
|
|
94
|
+
* @param {IData[]} axisData
|
|
95
|
+
* @return {*}
|
|
96
|
+
* @memberof ChartOptionsGenerator
|
|
97
|
+
*/
|
|
98
|
+
handleAxisLevel(tempaxis: IData[], index: number, axisData: IData[]): IData[];
|
|
99
|
+
/**
|
|
100
|
+
* 合并轴参数
|
|
101
|
+
*
|
|
102
|
+
* @param {(IData[] | IData)} axisData
|
|
103
|
+
* @param {IData[]} tempAxis
|
|
104
|
+
* @return {*}
|
|
105
|
+
* @memberof ChartOptionsGenerator
|
|
106
|
+
*/
|
|
107
|
+
mergeAxisData(axisData: IData[] | IData, tempAxis: IData[]): IData[];
|
|
108
|
+
/**
|
|
109
|
+
* 处理分区模式下序列模型的坐标轴位置
|
|
110
|
+
*
|
|
111
|
+
* @param {IData[]} seriesModel
|
|
112
|
+
* @param {IData} opts
|
|
113
|
+
* @memberof ChartOptionsGenerator
|
|
114
|
+
*/
|
|
115
|
+
handleSeriesModelCoordinateAxis(seriesModel: IData[], opts: IData): void;
|
|
77
116
|
/**
|
|
78
117
|
* 初始化多分类的X轴配置
|
|
79
118
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-options-generator.d.ts","sourceRoot":"","sources":["../../../../../src/controller/control/chart/generator/chart-options-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEb,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EAEf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,cAAc,EACd,WAAW,EACX,WAAW,EACX,QAAQ,EACR,cAAc,EACd,aAAa,EACd,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAM9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAmCrD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,KAAK,CAmBzE;AAED,qBAAa,qBAAqB;IAoEb,KAAK,EAAE,QAAQ;IAnElC;;;;;OAKG;IACH,MAAM,EAAG,cAAc,CAAC;IAExB;;;;;OAKG;IACH,aAAa,EAAE,aAAa,CAI1B;IAEF;;;;;OAKG;IACH,OAAO,EAAE,aAAa,CAAM;IAE5B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC;IAE/B;;;;;OAKG;IACH,gBAAgB,EAAE,mBAAmB,EAAE,CAAM;IAE7C;;;;;OAKG;IACH,QAAQ,gCAAuC;IAE/C;;;;OAIG;IACH,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,CAAa;IAE/D;;;;;OAKG;IACH,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAa;gBAEnD,KAAK,EAAE,QAAQ;IAoClC,SAAS,CAAC,oBAAoB,IAAI,IAAI;IAoCtC,SAAS,CAAC,eAAe,CAAC,UAAU,EAAE,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC;IAmB5E,SAAS,CAAC,gBAAgB,CACxB,WAAW,EAAE,cAAc,GAC1B,aAAa,CAAC,QAAQ,CAAC;IAe1B,SAAS,CAAC,gBAAgB,CACxB,WAAW,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,GACzC,oBAAoB,EAAE,GAAG,oBAAoB,EAAE;IA2ClD;;;;;OAKG;IACG,qBAAqB,CACzB,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-options-generator.d.ts","sourceRoot":"","sources":["../../../../../src/controller/control/chart/generator/chart-options-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEb,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EAEf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,cAAc,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util';
|
|
3
3
|
import { RuntimeError } from '@ibiz-template/core';
|
|
4
4
|
import { LineSeriesGenerator } from './line-series-generator';
|
|
@@ -246,6 +246,113 @@ export class ChartOptionsGenerator {
|
|
|
246
246
|
});
|
|
247
247
|
return AxisOption;
|
|
248
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* 处理轴布局位置
|
|
251
|
+
*
|
|
252
|
+
* @param {CodeListItem[]} items
|
|
253
|
+
* @param {number} padding
|
|
254
|
+
* @param {number} total
|
|
255
|
+
* @param {number} index
|
|
256
|
+
* @param {boolean} isRow 是否横向
|
|
257
|
+
* @return {*}
|
|
258
|
+
* @memberof ChartOptionsGenerator
|
|
259
|
+
*/
|
|
260
|
+
handleAxisLayout(items, padding, total, index, isRow = true) {
|
|
261
|
+
const axisData = items.map((code) => {
|
|
262
|
+
if (isRow) {
|
|
263
|
+
return {
|
|
264
|
+
value: code.text,
|
|
265
|
+
textStyle: {
|
|
266
|
+
padding: [0, padding * (total - 1 - index), 0, 0],
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
return {
|
|
271
|
+
value: code.text,
|
|
272
|
+
textStyle: {
|
|
273
|
+
padding: [padding * (total - 1 - index), 0, 0, 0],
|
|
274
|
+
},
|
|
275
|
+
};
|
|
276
|
+
});
|
|
277
|
+
return axisData;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* 处理轴层级
|
|
281
|
+
*
|
|
282
|
+
* @param {IData[]} tempaxis
|
|
283
|
+
* @param {number} index
|
|
284
|
+
* @param {IData[]} axisData
|
|
285
|
+
* @return {*}
|
|
286
|
+
* @memberof ChartOptionsGenerator
|
|
287
|
+
*/
|
|
288
|
+
handleAxisLevel(tempaxis, index, axisData) {
|
|
289
|
+
const tempAxisData = [];
|
|
290
|
+
if (index === 0) {
|
|
291
|
+
return axisData;
|
|
292
|
+
}
|
|
293
|
+
let length = 1;
|
|
294
|
+
for (let i = 0; i < tempaxis.length; i++) {
|
|
295
|
+
length *= tempaxis[i].data.length;
|
|
296
|
+
}
|
|
297
|
+
for (let i = 0; i < length; i++) {
|
|
298
|
+
tempAxisData.push(...axisData);
|
|
299
|
+
}
|
|
300
|
+
return tempAxisData;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* 合并轴参数
|
|
304
|
+
*
|
|
305
|
+
* @param {(IData[] | IData)} axisData
|
|
306
|
+
* @param {IData[]} tempAxis
|
|
307
|
+
* @return {*}
|
|
308
|
+
* @memberof ChartOptionsGenerator
|
|
309
|
+
*/
|
|
310
|
+
mergeAxisData(axisData, tempAxis) {
|
|
311
|
+
if (axisData && Array.isArray(axisData)) {
|
|
312
|
+
return [...axisData, ...tempAxis];
|
|
313
|
+
}
|
|
314
|
+
return [axisData, ...tempAxis];
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* 处理分区模式下序列模型的坐标轴位置
|
|
318
|
+
*
|
|
319
|
+
* @param {IData[]} seriesModel
|
|
320
|
+
* @param {IData} opts
|
|
321
|
+
* @memberof ChartOptionsGenerator
|
|
322
|
+
*/
|
|
323
|
+
handleSeriesModelCoordinateAxis(seriesModel, opts) {
|
|
324
|
+
const { xAxisParam, yAxisParam } = opts;
|
|
325
|
+
const xaxis = [];
|
|
326
|
+
const yaxis = [];
|
|
327
|
+
for (let i = 0; i < seriesModel.length; i++) {
|
|
328
|
+
const tempXAxis = clone(xAxisParam);
|
|
329
|
+
const tempYAxis = clone(yAxisParam);
|
|
330
|
+
Object.assign(tempXAxis, { gridIndex: i });
|
|
331
|
+
Object.assign(tempYAxis, { gridIndex: i });
|
|
332
|
+
// 需要模板支持解析数组参数
|
|
333
|
+
tempYAxis.axisLabel.formatter = function (_param) {
|
|
334
|
+
if (_param === 0) {
|
|
335
|
+
return `{top|${_param}}`;
|
|
336
|
+
}
|
|
337
|
+
return `{bottom|${_param}}`;
|
|
338
|
+
};
|
|
339
|
+
if (i !== seriesModel.length - 1) {
|
|
340
|
+
tempXAxis.name = '';
|
|
341
|
+
tempXAxis.axisLine.show = false;
|
|
342
|
+
tempXAxis.axisLabel.show = false;
|
|
343
|
+
tempXAxis.axisTick.show = false;
|
|
344
|
+
}
|
|
345
|
+
if (tempYAxis.showTitle) {
|
|
346
|
+
Object.assign(tempYAxis, {
|
|
347
|
+
name: seriesModel[i].serieText,
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
xaxis.push(tempXAxis);
|
|
351
|
+
yaxis.push(tempYAxis);
|
|
352
|
+
}
|
|
353
|
+
this.chartUserParam.xAxis = xaxis;
|
|
354
|
+
this.chartUserParam.yAxis = yaxis;
|
|
355
|
+
}
|
|
249
356
|
/**
|
|
250
357
|
* 初始化多分类的X轴配置
|
|
251
358
|
*
|
|
@@ -253,9 +360,34 @@ export class ChartOptionsGenerator {
|
|
|
253
360
|
* @memberof ChartOptionsGenerator
|
|
254
361
|
*/
|
|
255
362
|
async initMultiCatalogxAxis(context, params) {
|
|
256
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
363
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
257
364
|
const { controlParam } = this.model;
|
|
258
|
-
|
|
365
|
+
// 分区模式 ,计算多个图表位置
|
|
366
|
+
if (controlParam && ((_a = controlParam.ctrlParams) === null || _a === void 0 ? void 0 : _a.ZONE)) {
|
|
367
|
+
const length = (_b = this.model.dechartSerieses) === null || _b === void 0 ? void 0 : _b.length;
|
|
368
|
+
if (length) {
|
|
369
|
+
const height = 90 / length;
|
|
370
|
+
const items = [];
|
|
371
|
+
for (let i = 0; i < length; i++) {
|
|
372
|
+
const top = i * height + 5;
|
|
373
|
+
const bottom = 100 - (height + top);
|
|
374
|
+
items.push({
|
|
375
|
+
top: `${top}%`,
|
|
376
|
+
bottom: `${bottom}%`,
|
|
377
|
+
containLabel: true,
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
if (this.chartUserParam) {
|
|
381
|
+
this.chartUserParam.grid = items;
|
|
382
|
+
this.handleSeriesModelCoordinateAxis(this.model.dechartSerieses, {
|
|
383
|
+
xAxisParam: ((_c = this.chartUserParam) === null || _c === void 0 ? void 0 : _c.xAxis) || {},
|
|
384
|
+
yAxisParam: ((_d = this.chartUserParam) === null || _d === void 0 ? void 0 : _d.yAxis) || {},
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
// 判断是否为多分类模式
|
|
390
|
+
if (controlParam && ((_e = controlParam.ctrlParams) === null || _e === void 0 ? void 0 : _e.CATALOGFIELDS)) {
|
|
259
391
|
try {
|
|
260
392
|
// 获取分类分层配置
|
|
261
393
|
const tempCatalogFields = JSON.parse(controlParam.ctrlParams.CATALOGFIELDS);
|
|
@@ -263,55 +395,48 @@ export class ChartOptionsGenerator {
|
|
|
263
395
|
let titleshow = true;
|
|
264
396
|
let labelshow = true;
|
|
265
397
|
let gridIndex = 0;
|
|
398
|
+
// 需要一个分类属性组成的JSON数组
|
|
266
399
|
if (Array.isArray(tempCatalogFields)) {
|
|
267
400
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
268
|
-
if (this.chartUserParam
|
|
269
|
-
|
|
401
|
+
if (this.chartUserParam) {
|
|
402
|
+
let tempconfig = {};
|
|
403
|
+
// 判断图表是否为横向条形图
|
|
404
|
+
if (((_f = controlParam.ctrlParams) === null || _f === void 0 ? void 0 : _f.MODE) === 'ROW') {
|
|
405
|
+
// 获取yAxis配置数据
|
|
270
406
|
if (Array.isArray(this.chartUserParam.yAxis)) {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
tempconfig.name === undefined ? true : !!tempconfig.name;
|
|
274
|
-
labelshow =
|
|
275
|
-
((_c = tempconfig.axisLabel) === null || _c === void 0 ? void 0 : _c.show) === undefined
|
|
276
|
-
? true
|
|
277
|
-
: (_d = tempconfig.axisLabel) === null || _d === void 0 ? void 0 : _d.show;
|
|
407
|
+
tempconfig =
|
|
408
|
+
this.chartUserParam.yAxis[this.chartUserParam.yAxis.length - 1];
|
|
278
409
|
}
|
|
279
410
|
else {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
? true
|
|
283
|
-
: !!this.chartUserParam.yAxis.name;
|
|
284
|
-
labelshow =
|
|
285
|
-
((_g = (_f = this.chartUserParam.yAxis) === null || _f === void 0 ? void 0 : _f.axisLabel) === null || _g === void 0 ? void 0 : _g.show) === undefined
|
|
286
|
-
? true
|
|
287
|
-
: (_h = this.chartUserParam.yAxis.axisLabel) === null || _h === void 0 ? void 0 : _h.show;
|
|
411
|
+
// 计算轴标题和轴标签是否显示
|
|
412
|
+
tempconfig = this.chartUserParam.yAxis;
|
|
288
413
|
}
|
|
289
414
|
}
|
|
290
415
|
else if (Array.isArray(this.chartUserParam.xAxis)) {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
labelshow =
|
|
295
|
-
((_j = tempconfig.axisLabel) === null || _j === void 0 ? void 0 : _j.show) === undefined
|
|
296
|
-
? true
|
|
297
|
-
: (_k = tempconfig.axisLabel) === null || _k === void 0 ? void 0 : _k.show;
|
|
416
|
+
// 获取xAxis配置数据
|
|
417
|
+
tempconfig =
|
|
418
|
+
this.chartUserParam.xAxis[this.chartUserParam.xAxis.length - 1];
|
|
298
419
|
}
|
|
299
420
|
else {
|
|
421
|
+
tempconfig = this.chartUserParam.xAxis;
|
|
422
|
+
}
|
|
423
|
+
// 计算轴标题和轴标签是否显示
|
|
424
|
+
if (tempconfig) {
|
|
300
425
|
titleshow =
|
|
301
|
-
|
|
302
|
-
? true
|
|
303
|
-
: !!this.chartUserParam.xAxis.name;
|
|
426
|
+
tempconfig.name === undefined ? true : !!tempconfig.name;
|
|
304
427
|
labelshow =
|
|
305
|
-
((
|
|
428
|
+
((_g = tempconfig.axisLabel) === null || _g === void 0 ? void 0 : _g.show) === undefined
|
|
306
429
|
? true
|
|
307
|
-
: (
|
|
430
|
+
: (_h = tempconfig.axisLabel) === null || _h === void 0 ? void 0 : _h.show;
|
|
308
431
|
}
|
|
309
432
|
}
|
|
433
|
+
// 计算图表使用的grid配置
|
|
310
434
|
if (this.chartUserParam &&
|
|
311
435
|
this.chartUserParam.grid &&
|
|
312
436
|
Array.isArray(this.chartUserParam.grid)) {
|
|
313
437
|
gridIndex = this.chartUserParam.grid.length - 1;
|
|
314
438
|
}
|
|
439
|
+
// 获取分类代码表,最后一个分类是作为序列分类处理的,
|
|
315
440
|
await Promise.all(tempCatalogFields
|
|
316
441
|
.slice(0, -1)
|
|
317
442
|
.map(async (catalog, index) => {
|
|
@@ -319,197 +444,115 @@ export class ChartOptionsGenerator {
|
|
|
319
444
|
if (catalog.mode === 'codelist' && catalog.codelistId) {
|
|
320
445
|
const codeListItems = await app.codeList.get(catalog.codelistId, context, params);
|
|
321
446
|
if (codeListItems) {
|
|
322
|
-
const tempxAxisData = [];
|
|
323
447
|
if (((_a = controlParam.ctrlParams) === null || _a === void 0 ? void 0 : _a.MODE) === 'ROW') {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
},
|
|
335
|
-
};
|
|
448
|
+
// 计算条形图时yAxis的配置以及图表的四周间隔
|
|
449
|
+
const yAxisData = this.handleAxisLayout(codeListItems, 40, tempCatalogFields.length, index);
|
|
450
|
+
// 开始计算每一层的标签刻度个数,并动态生成相应个数的配置数据
|
|
451
|
+
const tempxAxisData = this.handleAxisLevel(tempaxis, index, yAxisData);
|
|
452
|
+
tempaxis.push({
|
|
453
|
+
show: labelshow,
|
|
454
|
+
gridIndex,
|
|
455
|
+
type: 'category',
|
|
456
|
+
data: tempxAxisData,
|
|
457
|
+
position: 'left',
|
|
336
458
|
});
|
|
337
|
-
if (index === 0) {
|
|
338
|
-
tempaxis.push({
|
|
339
|
-
show: labelshow,
|
|
340
|
-
gridIndex,
|
|
341
|
-
type: 'category',
|
|
342
|
-
data: yAxisData,
|
|
343
|
-
position: 'left',
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
else {
|
|
347
|
-
let length = 1;
|
|
348
|
-
for (let i = 0; i < tempaxis.length; i++) {
|
|
349
|
-
length *= tempaxis[i].data.length;
|
|
350
|
-
}
|
|
351
|
-
for (let i = 0; i < length; i++) {
|
|
352
|
-
tempxAxisData.push(...yAxisData);
|
|
353
|
-
}
|
|
354
|
-
tempaxis.push({
|
|
355
|
-
show: labelshow,
|
|
356
|
-
gridIndex,
|
|
357
|
-
type: 'category',
|
|
358
|
-
data: tempxAxisData,
|
|
359
|
-
position: 'left',
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
459
|
}
|
|
363
460
|
else {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
461
|
+
// 计算横轴在分层下的xAxis配置以及图表四周间隔
|
|
462
|
+
const xAxisData = this.handleAxisLayout(codeListItems, 24, tempCatalogFields.length, index, false);
|
|
463
|
+
const tempxAxisData = this.handleAxisLevel(tempaxis, index, xAxisData);
|
|
464
|
+
tempaxis.push({
|
|
465
|
+
show: labelshow,
|
|
466
|
+
gridIndex,
|
|
467
|
+
type: 'category',
|
|
468
|
+
data: tempxAxisData,
|
|
469
|
+
position: 'bottom',
|
|
371
470
|
});
|
|
372
|
-
if (index === 0) {
|
|
373
|
-
tempaxis.push({
|
|
374
|
-
show: labelshow,
|
|
375
|
-
gridIndex,
|
|
376
|
-
type: 'category',
|
|
377
|
-
data: xAxisData,
|
|
378
|
-
position: 'bottom',
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
else {
|
|
382
|
-
let length = 1;
|
|
383
|
-
for (let i = 0; i < tempaxis.length; i++) {
|
|
384
|
-
length *= tempaxis[i].data.length;
|
|
385
|
-
}
|
|
386
|
-
for (let i = 0; i < length; i++) {
|
|
387
|
-
tempxAxisData.push(...xAxisData);
|
|
388
|
-
}
|
|
389
|
-
tempaxis.push({
|
|
390
|
-
show: labelshow,
|
|
391
|
-
gridIndex,
|
|
392
|
-
type: 'category',
|
|
393
|
-
data: tempxAxisData,
|
|
394
|
-
position: 'bottom',
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
471
|
}
|
|
398
472
|
}
|
|
399
473
|
}
|
|
400
474
|
}));
|
|
475
|
+
// 计算分类分层显示情况下的轴标题
|
|
401
476
|
const mergeName = tempCatalogFields
|
|
402
477
|
.map((catalog) => {
|
|
403
478
|
return catalog.name;
|
|
404
479
|
})
|
|
405
|
-
.join('/')
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
show: titleshow,
|
|
413
|
-
data: [
|
|
414
|
-
{
|
|
415
|
-
value: mergeName,
|
|
416
|
-
textStyle: {
|
|
417
|
-
lineHeight: labelshow ? 45 * tempCatalogFields.length : 45,
|
|
418
|
-
},
|
|
419
|
-
},
|
|
420
|
-
],
|
|
421
|
-
position: 'bottom',
|
|
422
|
-
});
|
|
480
|
+
.join('/');
|
|
481
|
+
let catalogLength = tempCatalogFields.length;
|
|
482
|
+
if (!labelshow) {
|
|
483
|
+
catalogLength = 1;
|
|
484
|
+
}
|
|
485
|
+
if (!titleshow) {
|
|
486
|
+
catalogLength -= 1;
|
|
423
487
|
}
|
|
424
488
|
if (this.chartUserParam) {
|
|
425
|
-
if (
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
if (
|
|
431
|
-
length = 1;
|
|
432
|
-
}
|
|
433
|
-
if (!titleshow) {
|
|
434
|
-
length -= 1;
|
|
435
|
-
}
|
|
436
|
-
if (length === 0) {
|
|
489
|
+
if (!this.chartUserParam.grid) {
|
|
490
|
+
this.chartUserParam.grid = {};
|
|
491
|
+
}
|
|
492
|
+
if (((_j = controlParam.ctrlParams) === null || _j === void 0 ? void 0 : _j.MODE) === 'ROW') {
|
|
493
|
+
// 动态计算条形图四周的间隙
|
|
494
|
+
if (catalogLength === 0) {
|
|
437
495
|
Object.assign(this.chartUserParam.grid, {
|
|
438
496
|
bottom: 45,
|
|
439
497
|
});
|
|
440
498
|
}
|
|
441
499
|
else {
|
|
442
500
|
Object.assign(this.chartUserParam.grid, {
|
|
443
|
-
left: (
|
|
501
|
+
left: (catalogLength + 1) * 40,
|
|
444
502
|
});
|
|
445
503
|
}
|
|
504
|
+
// 计算完纵轴分层布局数据并合并用户参数
|
|
446
505
|
tempaxis.push({
|
|
447
506
|
type: 'category',
|
|
448
507
|
gridIndex,
|
|
449
508
|
show: titleshow,
|
|
450
509
|
data: [
|
|
451
510
|
{
|
|
452
|
-
value: mergeName,
|
|
511
|
+
value: mergeName.split('').join('\n'),
|
|
453
512
|
textStyle: {
|
|
454
|
-
padding: [0,
|
|
513
|
+
padding: [0, catalogLength * 40, 0, 0],
|
|
455
514
|
},
|
|
456
515
|
},
|
|
457
516
|
],
|
|
458
517
|
position: 'left',
|
|
459
518
|
});
|
|
460
|
-
if (this.chartUserParam.yAxis
|
|
461
|
-
|
|
462
|
-
this.chartUserParam.yAxis = [
|
|
463
|
-
...this.chartUserParam.yAxis,
|
|
464
|
-
...tempaxis,
|
|
465
|
-
];
|
|
466
|
-
}
|
|
467
|
-
else if (this.chartUserParam.yAxis) {
|
|
468
|
-
this.chartUserParam.yAxis = [
|
|
469
|
-
this.chartUserParam.yAxis,
|
|
470
|
-
...tempaxis,
|
|
471
|
-
];
|
|
519
|
+
if (this.chartUserParam.yAxis) {
|
|
520
|
+
this.chartUserParam.yAxis = this.mergeAxisData(this.chartUserParam.yAxis, tempaxis);
|
|
472
521
|
}
|
|
473
522
|
}
|
|
474
523
|
else {
|
|
475
|
-
if (
|
|
476
|
-
Array.isArray(this.chartUserParam.xAxis)) {
|
|
477
|
-
this.chartUserParam.xAxis = [
|
|
478
|
-
...this.chartUserParam.xAxis,
|
|
479
|
-
...tempaxis,
|
|
480
|
-
];
|
|
481
|
-
}
|
|
482
|
-
else if (this.chartUserParam.xAxis) {
|
|
483
|
-
this.chartUserParam.xAxis = [
|
|
484
|
-
this.chartUserParam.xAxis,
|
|
485
|
-
...tempaxis,
|
|
486
|
-
];
|
|
487
|
-
}
|
|
488
|
-
if (!this.chartUserParam.grid) {
|
|
489
|
-
this.chartUserParam.grid = {};
|
|
490
|
-
}
|
|
491
|
-
let { length } = tempCatalogFields;
|
|
492
|
-
if (!labelshow) {
|
|
493
|
-
length = 1;
|
|
494
|
-
}
|
|
495
|
-
if (!titleshow) {
|
|
496
|
-
length -= 1;
|
|
497
|
-
}
|
|
498
|
-
if (length === 0) {
|
|
524
|
+
if (catalogLength === 0) {
|
|
499
525
|
Object.assign(this.chartUserParam.grid, {
|
|
500
|
-
bottom:
|
|
526
|
+
bottom: 30,
|
|
501
527
|
});
|
|
502
528
|
}
|
|
503
529
|
else {
|
|
504
530
|
Object.assign(this.chartUserParam.grid, {
|
|
505
|
-
bottom: (
|
|
531
|
+
bottom: (catalogLength + 1) * 24,
|
|
506
532
|
});
|
|
507
533
|
}
|
|
534
|
+
tempaxis.push({
|
|
535
|
+
type: 'category',
|
|
536
|
+
gridIndex,
|
|
537
|
+
show: titleshow,
|
|
538
|
+
data: [
|
|
539
|
+
{
|
|
540
|
+
value: mergeName,
|
|
541
|
+
textStyle: {
|
|
542
|
+
padding: [24 * catalogLength, 0, 0, 0],
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
],
|
|
546
|
+
position: 'bottom',
|
|
547
|
+
});
|
|
548
|
+
if (this.chartUserParam.xAxis) {
|
|
549
|
+
this.chartUserParam.xAxis = this.mergeAxisData(this.chartUserParam.xAxis, tempaxis);
|
|
550
|
+
}
|
|
508
551
|
}
|
|
509
552
|
}
|
|
510
553
|
}
|
|
511
554
|
}
|
|
512
|
-
catch (
|
|
555
|
+
catch (_k) {
|
|
513
556
|
throw new Error(ibiz.i18n.t('runtime.control.chart.errorJson'));
|
|
514
557
|
}
|
|
515
558
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radar-series-generator.d.ts","sourceRoot":"","sources":["../../../../../src/controller/control/chart/generator/radar-series-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAqB,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAiB,MAAM,yBAAyB,CAAC;AAG7E;;;;;;;GAOG;AACH,qBAAa,oBAAqB,SAAQ,mBAAmB,CAAC,iBAAiB,CAAC;IAC9E,SAAS,CAAC,iBAAiB,IAAI,YAAY;IAM3C;;;;;OAKG;IACH,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"radar-series-generator.d.ts","sourceRoot":"","sources":["../../../../../src/controller/control/chart/generator/radar-series-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAqB,YAAY,EAAE,MAAM,SAAS,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAiB,MAAM,yBAAyB,CAAC;AAG7E;;;;;;;GAOG;AACH,qBAAa,oBAAqB,SAAQ,mBAAmB,CAAC,iBAAiB,CAAC;IAC9E,SAAS,CAAC,iBAAiB,IAAI,YAAY;IAM3C;;;;;OAKG;IACH,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI;IAuBzC,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,YAAY,GAAG,YAAY,EAAE;CA4B1D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mergeDeepRight } from 'ramda';
|
|
1
|
+
import { clone, mergeDeepRight } from 'ramda';
|
|
2
2
|
import { BaseSeriesGenerator, DEFAULT_GROUP } from './base-series-generator';
|
|
3
3
|
import { RadarCoordSystem } from './radar-coord-system';
|
|
4
4
|
/**
|
|
@@ -21,7 +21,10 @@ export class RadarSeriesGenerator extends BaseSeriesGenerator {
|
|
|
21
21
|
* @param {IData[]} data
|
|
22
22
|
*/
|
|
23
23
|
calcRadarCoordSystem(data) {
|
|
24
|
-
const
|
|
24
|
+
const tempItems = data.map((item) => {
|
|
25
|
+
return clone(item);
|
|
26
|
+
});
|
|
27
|
+
const groupData = this.calcGroupData(tempItems);
|
|
25
28
|
// 创建雷达坐标系对象
|
|
26
29
|
if (!this.chartGenerator.radarMap.has(this.catalogField)) {
|
|
27
30
|
this.chartGenerator.radarMap.set(this.catalogField, new RadarCoordSystem(this.chartGenerator.radarMap.size));
|
|
@@ -73,7 +73,7 @@ export declare class CustomDashboardController implements ICustomDesign {
|
|
|
73
73
|
*/
|
|
74
74
|
params: IParams;
|
|
75
75
|
/**
|
|
76
|
-
* 自定义定制范围类型(public:公开,personal:个人,data
|
|
76
|
+
* 自定义定制范围类型(public:公开,personal:个人,data:数据,dynamic: 自定义动态,默认是按照个人区分,配置了应用功能组件才生效)
|
|
77
77
|
*
|
|
78
78
|
* @author tony001
|
|
79
79
|
* @date 2024-04-24 19:04:47
|
|
@@ -96,13 +96,6 @@ export declare class CustomDashboardController implements ICustomDesign {
|
|
|
96
96
|
* @type {string}
|
|
97
97
|
*/
|
|
98
98
|
ownerId: string;
|
|
99
|
-
/**
|
|
100
|
-
* 是否多模式
|
|
101
|
-
*
|
|
102
|
-
* @type {boolean}
|
|
103
|
-
* @memberof CustomDashboardController
|
|
104
|
-
*/
|
|
105
|
-
multiMode: boolean;
|
|
106
99
|
/**
|
|
107
100
|
* Creates an instance of BaseController.
|
|
108
101
|
* @author lxm
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-dashboard.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/dashboard/custom-dashboard.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"custom-dashboard.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/dashboard/custom-dashboard.controller.ts"],"names":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