lw-cdp-ui 1.3.46 → 1.3.48

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.
@@ -80,7 +80,7 @@ export default {
80
80
  textStyle: setting.textStyle || {}
81
81
  }
82
82
 
83
- this.chart.setOption(this.option)
83
+ this.chart.setOption(this.option, true)
84
84
  setTimeout(() => {
85
85
  this.chart.resize()
86
86
  }, 10)
@@ -76,7 +76,7 @@ export default {
76
76
  series: this.getSeries(setting, tables),
77
77
  dataZoom: this.getDataZoomOption(setting)
78
78
  }
79
- this.chart.setOption(this.option)
79
+ this.chart.setOption(this.option, true)
80
80
  setTimeout(() => {
81
81
  this.chart.resize()
82
82
  }, 10)
@@ -258,9 +258,7 @@ export default {
258
258
  return (Math.round(num1 * factor) + Math.round(num2 * factor)) / factor
259
259
  },
260
260
  getSeries(setting, tables) {
261
- const visibleTables = setting.displayMetrics
262
- ? tables.filter(table => setting.displayMetrics.includes(`${table.name}.${table.metricId}`))
263
- : tables
261
+ const visibleTables = tables.filter(table => setting?.displayMetrics?.includes(`${table.name}.${table.metricId}`))
264
262
 
265
263
  const series = []
266
264
 
@@ -74,7 +74,7 @@ export default {
74
74
  series: this.getSeriesData(setting, tables),
75
75
  color: setting.color
76
76
  }
77
- this.chart.setOption(this.option)
77
+ this.chart.setOption(this.option, true)
78
78
  setTimeout(() => {
79
79
  this.chart.resize()
80
80
  }, 10)
@@ -71,7 +71,7 @@ export default {
71
71
  tooltip: this.getTooltipOption(setting),
72
72
  series: this.getSeriesData(setting, tables)
73
73
  }
74
- this.chart.setOption(this.option)
74
+ this.chart.setOption(this.option, true)
75
75
  setTimeout(() => {
76
76
  this.chart.resize()
77
77
  }, 10)
@@ -77,7 +77,7 @@ export default {
77
77
  series: this.getSeriesData(setting, tables),
78
78
  color: setting.color
79
79
  }
80
- this.chart.setOption(this.option)
80
+ this.chart.setOption(this.option, true)
81
81
  setTimeout(() => {
82
82
  this.chart.resize()
83
83
  }, 10)
@@ -174,8 +174,10 @@ export default {
174
174
  },
175
175
 
176
176
  getSeriesData(setting, tables) {
177
+ const visibleTables = tables.filter(table => setting?.displayMetrics?.includes(`${table.name}.${table.metricId}`))
178
+
177
179
  let list = []
178
- tables.forEach(table => {
180
+ visibleTables.forEach(table => {
179
181
  table.rows.forEach(row => {
180
182
  list.push({
181
183
  name: row.name,
@@ -87,7 +87,7 @@ export default {
87
87
  visualMap: this.getVisualMapOption(setting, tables),
88
88
  series: this.getSeriesData(setting, tables)
89
89
  }
90
- this.chart.setOption(this.option)
90
+ this.chart.setOption(this.option, true)
91
91
  setTimeout(() => {
92
92
  this.chart.resize()
93
93
  }, 10)
@@ -53,8 +53,10 @@ export default {
53
53
  const {setting, dataSet} = this.rawData
54
54
  const {tables} = dataSet
55
55
 
56
+ const visibleTables = tables.filter(table => setting?.displayMetrics?.includes(`${table.name}.${table.metricId}`))
57
+
56
58
  const result = []
57
- tables.forEach((table, index) => {
59
+ visibleTables.forEach((table, index) => {
58
60
  table.headers.forEach((x, xIndex) => {
59
61
  result.push({
60
62
  title: `${setting?.title?.text || table.metricName} ${table?.unitName ? `(${table.unitName})` : ''}`,
@@ -75,7 +75,7 @@ export default {
75
75
  series: this.getSeriesData(setting, tables),
76
76
  color: setting.color
77
77
  }
78
- this.chart.setOption(this.option)
78
+ this.chart.setOption(this.option, true)
79
79
  setTimeout(() => {
80
80
  this.chart.resize()
81
81
  }, 10)
@@ -74,7 +74,7 @@ export default {
74
74
  series: this.getSeriesData(setting, tables),
75
75
  color: setting.color || this.getDefaultColors()
76
76
  }
77
- this.chart.setOption(this.option)
77
+ this.chart.setOption(this.option, true)
78
78
  setTimeout(() => {
79
79
  this.chart.resize()
80
80
  }, 10)
@@ -78,7 +78,7 @@ export default {
78
78
  color: setting.useThemeColor ? undefined : setting.color || this.getDefaultColors(),
79
79
  toolbox: this.getToolboxOption(setting)
80
80
  }
81
- this.chart.setOption(this.option)
81
+ this.chart.setOption(this.option, true)
82
82
  setTimeout(() => {
83
83
  this.chart.resize()
84
84
  }, 10)
@@ -20269,7 +20269,7 @@ const iy = /* @__PURE__ */ le(oy, [["render", ly]]), sy = {
20269
20269
  yAxis: this.getYAxisOption(e, t),
20270
20270
  series: this.getSeries(e, t),
20271
20271
  dataZoom: this.getDataZoomOption(e)
20272
- }, this.chart.setOption(this.option), setTimeout(() => {
20272
+ }, this.chart.setOption(this.option, !0), setTimeout(() => {
20273
20273
  this.chart.resize();
20274
20274
  }, 10);
20275
20275
  },
@@ -20429,7 +20429,10 @@ const iy = /* @__PURE__ */ le(oy, [["render", ly]]), sy = {
20429
20429
  return (Math.round(e * l) + Math.round(n * l)) / l;
20430
20430
  },
20431
20431
  getSeries(e, n) {
20432
- const t = e.displayMetrics ? n.filter((a) => e.displayMetrics.includes(`${a.name}.${a.metricId}`)) : n, r = [];
20432
+ const t = n.filter((a) => {
20433
+ var o;
20434
+ return (o = e == null ? void 0 : e.displayMetrics) == null ? void 0 : o.includes(`${a.name}.${a.metricId}`);
20435
+ }), r = [];
20433
20436
  return t.forEach((a, o) => {
20434
20437
  var i, u, c, h, f, y;
20435
20438
  const l = {
@@ -20512,7 +20515,7 @@ function uy(e, n, t, r, a, o) {
20512
20515
  style: Le({ height: t.height })
20513
20516
  }, null, 4);
20514
20517
  }
20515
- const Go = /* @__PURE__ */ le(sy, [["render", uy], ["__scopeId", "data-v-761e8a2c"]]), cy = {
20518
+ const Go = /* @__PURE__ */ le(sy, [["render", uy], ["__scopeId", "data-v-9e2d9cf7"]]), cy = {
20516
20519
  name: "LineChart",
20517
20520
  props: {
20518
20521
  rawData: {
@@ -20565,7 +20568,7 @@ const Go = /* @__PURE__ */ le(sy, [["render", uy], ["__scopeId", "data-v-761e8a2
20565
20568
  yAxis: this.getYAxisOption(),
20566
20569
  series: this.getSeriesData(e, t),
20567
20570
  color: e.color
20568
- }, this.chart.setOption(this.option), setTimeout(() => {
20571
+ }, this.chart.setOption(this.option, !0), setTimeout(() => {
20569
20572
  this.chart.resize();
20570
20573
  }, 10));
20571
20574
  },
@@ -20648,14 +20651,18 @@ const Go = /* @__PURE__ */ le(sy, [["render", uy], ["__scopeId", "data-v-761e8a2
20648
20651
  };
20649
20652
  },
20650
20653
  getSeriesData(e, n) {
20651
- let t = [];
20652
- return n.forEach((r) => {
20653
- r.rows.forEach((a) => {
20654
- t.push({
20655
- name: a.name,
20654
+ const t = n.filter((a) => {
20655
+ var o;
20656
+ return (o = e == null ? void 0 : e.displayMetrics) == null ? void 0 : o.includes(`${a.name}.${a.metricId}`);
20657
+ });
20658
+ let r = [];
20659
+ return t.forEach((a) => {
20660
+ a.rows.forEach((o) => {
20661
+ r.push({
20662
+ name: o.name,
20656
20663
  type: "line",
20657
20664
  smooth: e.smooth,
20658
- data: a.values,
20665
+ data: o.values,
20659
20666
  itemStyle: {
20660
20667
  borderWidth: 2
20661
20668
  },
@@ -20664,7 +20671,7 @@ const Go = /* @__PURE__ */ le(sy, [["render", uy], ["__scopeId", "data-v-761e8a2
20664
20671
  } : void 0
20665
20672
  });
20666
20673
  });
20667
- }), t;
20674
+ }), r;
20668
20675
  }
20669
20676
  }
20670
20677
  };
@@ -20675,7 +20682,7 @@ function dy(e, n, t, r, a, o) {
20675
20682
  style: Le({ height: t.height })
20676
20683
  }, null, 4);
20677
20684
  }
20678
- const Ec = /* @__PURE__ */ le(cy, [["render", dy], ["__scopeId", "data-v-5d15f2e7"]]), hy = {
20685
+ const Ec = /* @__PURE__ */ le(cy, [["render", dy], ["__scopeId", "data-v-e3150606"]]), hy = {
20679
20686
  name: "PieChart",
20680
20687
  props: {
20681
20688
  rawData: {
@@ -20726,7 +20733,7 @@ const Ec = /* @__PURE__ */ le(cy, [["render", dy], ["__scopeId", "data-v-5d15f2e
20726
20733
  grid: e.grid ? this.getGridOption(e) : void 0,
20727
20734
  series: this.getSeriesData(e, t),
20728
20735
  color: e.color
20729
- }, this.chart.setOption(this.option), setTimeout(() => {
20736
+ }, this.chart.setOption(this.option, !0), setTimeout(() => {
20730
20737
  this.chart.resize();
20731
20738
  }, 10));
20732
20739
  },
@@ -20845,7 +20852,7 @@ function fy(e, n, t, r, a, o) {
20845
20852
  style: Le({ height: t.height })
20846
20853
  }, null, 4);
20847
20854
  }
20848
- const _c = /* @__PURE__ */ le(hy, [["render", fy], ["__scopeId", "data-v-b6790e48"]]), py = {
20855
+ const _c = /* @__PURE__ */ le(hy, [["render", fy], ["__scopeId", "data-v-8f9d5296"]]), py = {
20849
20856
  name: "AreaChart",
20850
20857
  props: {
20851
20858
  rawData: {
@@ -20900,7 +20907,7 @@ const _c = /* @__PURE__ */ le(hy, [["render", fy], ["__scopeId", "data-v-b6790e4
20900
20907
  series: this.getSeriesData(e, t),
20901
20908
  color: e.color,
20902
20909
  textStyle: e.textStyle || {}
20903
- }, this.chart.setOption(this.option), setTimeout(() => {
20910
+ }, this.chart.setOption(this.option, !0), setTimeout(() => {
20904
20911
  this.chart.resize();
20905
20912
  }, 10));
20906
20913
  },
@@ -21048,7 +21055,7 @@ function gy(e, n, t, r, a, o) {
21048
21055
  style: Le({ height: t.height })
21049
21056
  }, null, 4);
21050
21057
  }
21051
- const Ic = /* @__PURE__ */ le(py, [["render", gy], ["__scopeId", "data-v-ad20c3b8"]]), my = {
21058
+ const Ic = /* @__PURE__ */ le(py, [["render", gy], ["__scopeId", "data-v-36bc5811"]]), my = {
21052
21059
  name: "MetricCard",
21053
21060
  props: {
21054
21061
  rawData: {
@@ -21066,23 +21073,26 @@ const Ic = /* @__PURE__ */ le(py, [["render", gy], ["__scopeId", "data-v-ad20c3b
21066
21073
  },
21067
21074
  computed: {
21068
21075
  parsedData() {
21069
- const { setting: e, dataSet: n } = this.rawData, { tables: t } = n, r = [];
21070
- return t.forEach((a, o) => {
21071
- a.headers.forEach((l, i) => {
21072
- var u, c, h, f, y, E;
21073
- r.push({
21074
- title: `${((u = e == null ? void 0 : e.title) == null ? void 0 : u.text) || a.metricName} ${a != null && a.unitName ? `(${a.unitName})` : ""}`,
21075
- index: l,
21076
- color: e.color[i],
21076
+ const { setting: e, dataSet: n } = this.rawData, { tables: t } = n, r = t.filter((o) => {
21077
+ var l;
21078
+ return (l = e == null ? void 0 : e.displayMetrics) == null ? void 0 : l.includes(`${o.name}.${o.metricId}`);
21079
+ }), a = [];
21080
+ return r.forEach((o, l) => {
21081
+ o.headers.forEach((i, u) => {
21082
+ var c, h, f, y, E, _;
21083
+ a.push({
21084
+ title: `${((c = e == null ? void 0 : e.title) == null ? void 0 : c.text) || o.metricName} ${o != null && o.unitName ? `(${o.unitName})` : ""}`,
21085
+ index: i,
21086
+ color: e.color[u],
21077
21087
  subtitle: "环比上期",
21078
- current: (c = a.rows[0]) == null ? void 0 : c.values[i],
21079
- tooltip: a.name,
21080
- percentage: i > 1 ? ((h = a.rows[0]) == null ? void 0 : h.values[i]) == 0 ? 0 : Math.round(
21081
- (((f = a.rows[0]) == null ? void 0 : f.values[i]) - ((y = a.rows[0]) == null ? void 0 : y.values[i - 1])) / ((E = a.rows[0]) == null ? void 0 : E.values[i - 1]) * 1e4
21088
+ current: (h = o.rows[0]) == null ? void 0 : h.values[u],
21089
+ tooltip: o.name,
21090
+ percentage: u > 1 ? ((f = o.rows[0]) == null ? void 0 : f.values[u]) == 0 ? 0 : Math.round(
21091
+ (((y = o.rows[0]) == null ? void 0 : y.values[u]) - ((E = o.rows[0]) == null ? void 0 : E.values[u - 1])) / ((_ = o.rows[0]) == null ? void 0 : _.values[u - 1]) * 1e4
21082
21092
  ) / 100 : 0
21083
21093
  });
21084
21094
  });
21085
- }), r;
21095
+ }), a;
21086
21096
  }
21087
21097
  }
21088
21098
  }, Ay = { class: "title-container" };
@@ -21124,7 +21134,7 @@ function yy(e, n, t, r, a, o) {
21124
21134
  }, 1032, ["value"])
21125
21135
  ]))), 128);
21126
21136
  }
21127
- const xc = /* @__PURE__ */ le(my, [["render", yy], ["__scopeId", "data-v-0ad8575e"]]), by = {
21137
+ const xc = /* @__PURE__ */ le(my, [["render", yy], ["__scopeId", "data-v-b5d8f5d4"]]), by = {
21128
21138
  name: "GaugeChart",
21129
21139
  props: {
21130
21140
  rawData: {
@@ -21171,7 +21181,7 @@ const xc = /* @__PURE__ */ le(my, [["render", yy], ["__scopeId", "data-v-0ad8575
21171
21181
  title: this.getTitleOption(e),
21172
21182
  tooltip: this.getTooltipOption(e),
21173
21183
  series: this.getSeriesData(e, t)
21174
- }, this.chart.setOption(this.option), setTimeout(() => {
21184
+ }, this.chart.setOption(this.option, !0), setTimeout(() => {
21175
21185
  this.chart.resize();
21176
21186
  }, 10));
21177
21187
  },
@@ -21244,7 +21254,7 @@ function vy(e, n, t, r, a, o) {
21244
21254
  style: Le({ height: t.height })
21245
21255
  }, null, 4);
21246
21256
  }
21247
- const Bc = /* @__PURE__ */ le(by, [["render", vy], ["__scopeId", "data-v-c5390c04"]]), Cy = {
21257
+ const Bc = /* @__PURE__ */ le(by, [["render", vy], ["__scopeId", "data-v-a653979c"]]), Cy = {
21248
21258
  name: "FunnelChart",
21249
21259
  props: {
21250
21260
  rawData: {
@@ -21294,7 +21304,7 @@ const Bc = /* @__PURE__ */ le(by, [["render", vy], ["__scopeId", "data-v-c5390c0
21294
21304
  grid: e.grid ? this.getGridOption(e) : void 0,
21295
21305
  series: this.getSeriesData(e, t),
21296
21306
  color: e.color
21297
- }, this.chart.setOption(this.option), setTimeout(() => {
21307
+ }, this.chart.setOption(this.option, !0), setTimeout(() => {
21298
21308
  this.chart.resize();
21299
21309
  }, 10));
21300
21310
  },
@@ -21409,7 +21419,7 @@ function wy(e, n, t, r, a, o) {
21409
21419
  style: Le({ height: t.height })
21410
21420
  }, null, 4);
21411
21421
  }
21412
- const kc = /* @__PURE__ */ le(Cy, [["render", wy], ["__scopeId", "data-v-699ac665"]]), Ey = {
21422
+ const kc = /* @__PURE__ */ le(Cy, [["render", wy], ["__scopeId", "data-v-2ec13ca2"]]), Ey = {
21413
21423
  name: "ScatterChart",
21414
21424
  props: {
21415
21425
  rawData: {
@@ -21463,7 +21473,7 @@ const kc = /* @__PURE__ */ le(Cy, [["render", wy], ["__scopeId", "data-v-699ac66
21463
21473
  series: this.getSeriesData(e, t),
21464
21474
  color: e.useThemeColor ? void 0 : e.color || this.getDefaultColors(),
21465
21475
  toolbox: this.getToolboxOption(e)
21466
- }, this.chart.setOption(this.option), setTimeout(() => {
21476
+ }, this.chart.setOption(this.option, !0), setTimeout(() => {
21467
21477
  this.chart.resize();
21468
21478
  }, 10));
21469
21479
  },
@@ -21639,7 +21649,7 @@ function _y(e, n, t, r, a, o) {
21639
21649
  style: Le({ height: t.height })
21640
21650
  }, null, 4);
21641
21651
  }
21642
- const Lc = /* @__PURE__ */ le(Ey, [["render", _y], ["__scopeId", "data-v-0b97bcaa"]]), Iy = {
21652
+ const Lc = /* @__PURE__ */ le(Ey, [["render", _y], ["__scopeId", "data-v-417f4a97"]]), Iy = {
21643
21653
  name: "RadarChart",
21644
21654
  props: {
21645
21655
  rawData: {
@@ -21689,7 +21699,7 @@ const Lc = /* @__PURE__ */ le(Ey, [["render", _y], ["__scopeId", "data-v-0b97bca
21689
21699
  radar: this.getRadarOption(e, t),
21690
21700
  series: this.getSeriesData(e, t),
21691
21701
  color: e.color || this.getDefaultColors()
21692
- }, this.chart.setOption(this.option), setTimeout(() => {
21702
+ }, this.chart.setOption(this.option, !0), setTimeout(() => {
21693
21703
  this.chart.resize();
21694
21704
  }, 10));
21695
21705
  },
@@ -21787,7 +21797,7 @@ function xy(e, n, t, r, a, o) {
21787
21797
  style: Le({ height: t.height })
21788
21798
  }, null, 4);
21789
21799
  }
21790
- const Fc = /* @__PURE__ */ le(Iy, [["render", xy], ["__scopeId", "data-v-d385f1c4"]]), By = {
21800
+ const Fc = /* @__PURE__ */ le(Iy, [["render", xy], ["__scopeId", "data-v-02639535"]]), By = {
21791
21801
  name: "MapChart",
21792
21802
  props: {
21793
21803
  rawData: {
@@ -21846,7 +21856,7 @@ const Fc = /* @__PURE__ */ le(Iy, [["render", xy], ["__scopeId", "data-v-d385f1c
21846
21856
  legend: this.getLegendOption(e, t),
21847
21857
  visualMap: this.getVisualMapOption(e, t),
21848
21858
  series: this.getSeriesData(e, t)
21849
- }, this.chart.setOption(this.option), setTimeout(() => {
21859
+ }, this.chart.setOption(this.option, !0), setTimeout(() => {
21850
21860
  this.chart.resize();
21851
21861
  }, 10));
21852
21862
  },
@@ -21928,7 +21938,7 @@ function ky(e, n, t, r, a, o) {
21928
21938
  style: Le({ height: t.height })
21929
21939
  }, null, 4);
21930
21940
  }
21931
- const Sc = /* @__PURE__ */ le(By, [["render", ky], ["__scopeId", "data-v-1b418b14"]]), Ly = {
21941
+ const Sc = /* @__PURE__ */ le(By, [["render", ky], ["__scopeId", "data-v-91f815bb"]]), Ly = {
21932
21942
  name: "ReportTable",
21933
21943
  props: {
21934
21944
  rawData: {