super-page-designer 2.2.2 → 2.2.5

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.
@@ -1,7 +1,8 @@
1
1
  import "@element-plus/icons";
2
2
  import { usePageContextStore as e } from "../../../stores/page-store.js";
3
3
  import { getNumFormatterForChart as t } from "super-page-runtime";
4
- function l(e2) {
4
+ import { deepCopy as l } from "./common-util.js";
5
+ function i(e2) {
5
6
  const t2 = {}, l2 = e2.props ? e2.props : {}, i2 = e2.style ? e2.style : {}, a2 = [];
6
7
  if (l2.groups)
7
8
  for (let e3 of l2.groups)
@@ -15,36 +16,36 @@ function l(e2) {
15
16
  e3.fieldName && !r2.includes(e3.fieldName) && r2.push(e3.fieldName);
16
17
  return "variable" == l2.groupSource && !l2.enableDrill && l2.groupVariable && (r2.includes(l2.groupVariable) || r2.push(l2.groupVariable)), t2.monitorFields = r2, t2;
17
18
  }
18
- function i(e2, l2) {
19
- const i2 = e2.props ? e2.props : {}, p2 = e2.style ? e2.style : {}, b2 = { title: [{ textStyle: {}, subtextStyle: {} }], toolbox: { show: false, feature: { saveAsImage: { show: false }, restore: { show: false }, dataView: { show: false }, dataZoom: { show: false }, magicType: { show: false }, brush: { show: false } } }, grid: {}, xAxis: [{ axisLabel: {}, nameTruncate: {} }], yAxis: [{ show: false, position: "left", nameTextStyle: {}, axisLine: {}, splitLine: {}, axisLabel: {} }, { show: false, position: "right", nameTextStyle: {}, axisLine: {}, splitLine: {}, axisLabel: {} }], tooltip: { textStyle: {} }, dataZoom: [], series: [] }, h = "chart-column-line" == e2.name, u = "chart-pie" == e2.name, c = "chart-gauge" == e2.name, g = "chart-radar" == e2.name, m = "chart-scatter" == e2.name;
19
+ function a(e2, l2) {
20
+ const i2 = e2.props ? e2.props : {}, a2 = e2.style ? e2.style : {}, b2 = { title: [{ textStyle: {}, subtextStyle: {} }], toolbox: { show: false, feature: { saveAsImage: { show: false }, restore: { show: false }, dataView: { show: false }, dataZoom: { show: false }, magicType: { show: false }, brush: { show: false } } }, grid: {}, xAxis: [{ axisLabel: {}, nameTruncate: {} }], yAxis: [{ show: false, position: "left", nameTextStyle: {}, axisLine: {}, splitLine: {}, axisLabel: {} }, { show: false, position: "right", nameTextStyle: {}, axisLine: {}, splitLine: {}, axisLabel: {} }], tooltip: { textStyle: {} }, dataZoom: [], series: [] }, u2 = "chart-column-line" == e2.name, h2 = "chart-pie" == e2.name, c = "chart-gauge" == e2.name, g = "chart-radar" == e2.name, m = "chart-scatter" == e2.name;
20
21
  if (i2.title, i2.subTitle) {
21
- b2.title[0].subtext = i2.subTitle, p2.subtitleTextAlign && (b2.title[0].left = p2.subtitleTextAlign);
22
- const e3 = a(p2);
22
+ b2.title[0].subtext = i2.subTitle, a2.subtitleTextAlign && (b2.title[0].left = a2.subtitleTextAlign);
23
+ const e3 = o(a2);
23
24
  Object.assign(b2.title[0], e3);
24
25
  }
25
- if ((i2.enableDownloadBtn || i2.enableDataBtn) && (b2.toolbox.show = true), null != i2.enableDownloadBtn && (b2.toolbox.feature.saveAsImage.show = i2.enableDownloadBtn), null != i2.enableDataBtn && (b2.toolbox.feature.dataView.show = i2.enableDataBtn), (h || u || g || m) && null != p2.enableLegend && (null == b2.legend && (b2.legend = {}), b2.legend.show = p2.enableLegend, p2.enableLegend && (p2.legendLayout && (b2.legend.orient = p2.legendLayout), p2.legendAlign && (b2.legend.left = p2.legendAlign), p2.legendVerticalAlign && (b2.legend.top = p2.legendVerticalAlign), p2.legendPadding && (b2.legend.padding = p2.legendPadding), p2.customLegend && (b2.legend.formatter = p2.customLegend))), p2.gridBackgroundColor && (b2.grid.show = true, b2.grid.backgroundColor = p2.gridBackgroundColor), p2.gridPaddingTop && (b2.grid.top = p2.gridPaddingTop), p2.gridPaddingRight && (b2.grid.right = p2.gridPaddingRight), p2.gridPaddingBottom && (b2.grid.bottom = p2.gridPaddingBottom), p2.gridPaddingLeft && (b2.grid.left = p2.gridPaddingLeft), p2.enableGridLine ? (b2.grid.show = true, p2.gridLineWidth && (b2.grid.borderWidth = p2.gridLineWidth), p2.gridLineColor && (b2.grid.show = true, b2.grid.borderColor = p2.gridLineColor)) : p2.gridShadowColor || (b2.grid.borderWidth = 0), p2.gridShadowColor && (b2.grid.show = true, b2.grid.shadowColor = p2.gridShadowColor, p2.gridShadowX && (b2.grid.shadowOffsetX = p2.gridShadowX), p2.gridShadowY && (b2.grid.shadowOffsetY = p2.gridShadowY), p2.gridShadowBlur && (b2.grid.shadowBlur = p2.gridShadowBlur)), h || m) {
26
- h && (p2.xaxisTestdatas || (p2.xaxisTestdatas = "项1,项2,项3,项4,项5,项6,项7,项8"), b2.xAxis[0].data = p2.xaxisTestdatas.split(",")), null != p2.enableXaxis && (b2.xAxis[0].show = p2.enableXaxis, p2.enableXaxis && (null == b2.xAxis[0].axisLabel && (b2.xAxis[0].axisLabel = {}), p2.xaxisAngle && (b2.xAxis[0].axisLabel.rotate = p2.xaxisAngle), p2.xaxisOffset && (b2.xAxis[0].offset = p2.xaxisOffset), p2.xaxisWidth && (b2.xAxis[0].axisLabel.overflow = "truncate", b2.xAxis[0].axisLabel.width = p2.xaxisWidth), p2.xaxisEllipsis && (b2.xAxis[0].axisLabel.overflow = "truncate", b2.xAxis[0].axisLabel.ellipsis = p2.xaxisEllipsis), p2.xaxisFormatter && (b2.xAxis[0].axisLabel.formatter = p2.xaxisFormatter)), h && 0 != b2.xAxis[0].show && (b2.xAxis[0].data = p2.xaxisTestdatas.split(","))), p2.xaxisMin && (b2.xAxis[0].min = p2.xaxisMin), p2.xaxisMax && (b2.xAxis[0].max = p2.xaxisMax);
27
- const e3 = [p2.yaxisLeft, p2.yaxisRight];
26
+ if ((i2.enableDownloadBtn || i2.enableDataBtn) && (b2.toolbox.show = true), null != i2.enableDownloadBtn && (b2.toolbox.feature.saveAsImage.show = i2.enableDownloadBtn), null != i2.enableDataBtn && (b2.toolbox.feature.dataView.show = i2.enableDataBtn), (u2 || h2 || g || m) && null != a2.enableLegend && (null == b2.legend && (b2.legend = {}), b2.legend.show = a2.enableLegend, a2.enableLegend && (a2.legendLayout && (b2.legend.orient = a2.legendLayout), a2.legendAlign && (b2.legend.left = a2.legendAlign), a2.legendVerticalAlign && (b2.legend.top = a2.legendVerticalAlign), a2.legendPadding && (b2.legend.padding = a2.legendPadding), a2.customLegend && (b2.legend.formatter = a2.customLegend))), a2.gridBackgroundColor && (b2.grid.show = true, b2.grid.backgroundColor = a2.gridBackgroundColor), a2.gridPaddingTop && (b2.grid.top = a2.gridPaddingTop), a2.gridPaddingRight && (b2.grid.right = a2.gridPaddingRight), a2.gridPaddingBottom && (b2.grid.bottom = a2.gridPaddingBottom), a2.gridPaddingLeft && (b2.grid.left = a2.gridPaddingLeft), a2.enableGridLine ? (b2.grid.show = true, a2.gridLineWidth && (b2.grid.borderWidth = a2.gridLineWidth), a2.gridLineColor && (b2.grid.show = true, b2.grid.borderColor = a2.gridLineColor)) : a2.gridShadowColor || (b2.grid.borderWidth = 0), a2.gridShadowColor && (b2.grid.show = true, b2.grid.shadowColor = a2.gridShadowColor, a2.gridShadowX && (b2.grid.shadowOffsetX = a2.gridShadowX), a2.gridShadowY && (b2.grid.shadowOffsetY = a2.gridShadowY), a2.gridShadowBlur && (b2.grid.shadowBlur = a2.gridShadowBlur)), u2 || m) {
27
+ u2 && (a2.xaxisTestdatas || (a2.xaxisTestdatas = "项1,项2,项3,项4,项5,项6,项7,项8"), b2.xAxis[0].data = a2.xaxisTestdatas.split(",")), null != a2.enableXaxis && (b2.xAxis[0].show = a2.enableXaxis, a2.enableXaxis && (null == b2.xAxis[0].axisLabel && (b2.xAxis[0].axisLabel = {}), a2.xaxisAngle && (b2.xAxis[0].axisLabel.rotate = a2.xaxisAngle), a2.xaxisOffset && (b2.xAxis[0].offset = a2.xaxisOffset), a2.xaxisWidth && (b2.xAxis[0].axisLabel.overflow = "truncate", b2.xAxis[0].axisLabel.width = a2.xaxisWidth), a2.xaxisEllipsis && (b2.xAxis[0].axisLabel.overflow = "truncate", b2.xAxis[0].axisLabel.ellipsis = a2.xaxisEllipsis), a2.xaxisFormatter && (b2.xAxis[0].axisLabel.formatter = a2.xaxisFormatter)), u2 && 0 != b2.xAxis[0].show && (b2.xAxis[0].data = a2.xaxisTestdatas.split(","))), a2.xaxisMin && (b2.xAxis[0].min = a2.xaxisMin), a2.xaxisMax && (b2.xAxis[0].max = a2.xaxisMax);
28
+ const e3 = [a2.yaxisLeft, a2.yaxisRight];
28
29
  for (let t2 = 0; t2 < e3.length; t2++) {
29
- o(e3[t2], b2.yAxis[t2]);
30
+ r(e3[t2], b2.yAxis[t2]);
30
31
  }
31
32
  }
32
33
  if (g && function(e3, t2) {
33
34
  const l3 = e3.props ? e3.props : {}, i3 = e3.style ? e3.style : {};
34
35
  null == t2.radar && (t2.radar = []);
35
- const a2 = {};
36
- i3.shape && (a2.shape = i3.shape);
36
+ const a3 = {};
37
+ i3.shape && (a3.shape = i3.shape);
37
38
  if (i3.centerLeft || i3.centerTop) {
38
39
  const e4 = ["50%", "50%"];
39
- i3.centerLeft && (e4[0] = i3.centerLeft), i3.centerTop && (e4[1] = i3.centerTop), a2.center = e4;
40
+ i3.centerLeft && (e4[0] = i3.centerLeft), i3.centerTop && (e4[1] = i3.centerTop), a3.center = e4;
40
41
  }
41
- i3.radiusOuter && (a2.radius = i3.radiusOuter);
42
- (i3.splitNumber || "0" == i3.splitNumber) && (a2.splitNumber = i3.splitNumber);
43
- (i3.startAngle || "0" == i3.startAngle) && (a2.startAngle = i3.startAngle);
44
- null != i3.enableXaxisName && ((i3.nameGap || "0" == i3.nameGap) && (a2.nameGap = i3.nameGap), null == a2.axisName && (a2.axisName = {}), a2.axisName.show = i3.enableXaxisName, i3.enableXaxisName && (i3.axisNameColor && (a2.axisName.color = i3.axisNameColor), i3.axisNameFontSize && (a2.axisName.fontSize = i3.axisNameFontSize), i3.axisNameFontWeight && (a2.axisName.fontWeight = i3.axisNameFontWeight), i3.xaxisNameWidth && (a2.axisName.width = i3.xaxisNameWidth), i3.xaxisNameEllipsis && (a2.axisName.overflow = "truncate", a2.axisName.ellipsis = i3.xaxisNameEllipsis), i3.xaxisNameFormatter && (a2.axisName.formatter = i3.xaxisNameFormatter)));
45
- null != i3.enableAxis && (null == a2.axisLine && (a2.axisLine = {}), a2.axisLine.show = i3.enableAxis, i3.enableAxis && (null == a2.axisLine.lineStyle && (a2.axisLine.lineStyle = {}), i3.axisColor && (a2.axisLine.lineStyle.color = i3.axisColor), i3.axisOpacity && (a2.axisLine.lineStyle.opacity = i3.axisOpacity), (i3.axisWidth || "0" == i3.axisWidth) && (a2.axisLine.lineStyle.width = i3.axisWidth)));
46
- null != i3.enableSplit && (null == a2.splitLine && (a2.splitLine = {}), a2.splitLine.show = i3.enableSplit, i3.enableSplit && (null == a2.splitLine.lineStyle && (a2.splitLine.lineStyle = {}), i3.splitColor && (a2.splitLine.lineStyle.color = i3.splitColor), i3.splitOpacity && (a2.splitLine.lineStyle.opacity = i3.splitOpacity), (i3.splitWidth || "0" == i3.splitWidth) && (a2.splitLine.lineStyle.width = i3.splitWidth), (i3.splitLength || "0" == i3.splitLength) && (a2.splitLine.length = i3.splitLength), i3.splitLineType && (a2.splitLine.lineStyle.type = i3.splitLineType)));
47
- null != i3.enableSplitArea && (null == a2.splitArea && (a2.splitArea = {}), a2.splitArea.show = i3.enableSplitArea, i3.enableSplitArea && (null == a2.splitArea.areaStyle && (a2.splitArea.areaStyle = {}), i3.splitAreaColor && (a2.splitArea.areaStyle.color = [i3.splitAreaColor, "#ffffff"]), i3.splitAreaOpacity && (a2.splitArea.areaStyle.opacity = i3.splitAreaOpacity), i3.splitAreaShadowColor && (a2.splitArea.areaStyle.shadowColor = i3.splitAreaShadowColor), i3.splitAreaShadowBlur && (a2.splitArea.areaStyle.shadowBlur = i3.splitAreaShadowBlur), i3.splitAreaShadowX && (a2.splitArea.areaStyle.shadowOffsetX = i3.splitAreaShadowX), i3.splitAreaShadowY && (a2.splitArea.areaStyle.shadowOffsetY = i3.splitAreaShadowY)));
42
+ i3.radiusOuter && (a3.radius = i3.radiusOuter);
43
+ (i3.splitNumber || "0" == i3.splitNumber) && (a3.splitNumber = i3.splitNumber);
44
+ (i3.startAngle || "0" == i3.startAngle) && (a3.startAngle = i3.startAngle);
45
+ null != i3.enableXaxisName && ((i3.nameGap || "0" == i3.nameGap) && (a3.nameGap = i3.nameGap), null == a3.axisName && (a3.axisName = {}), a3.axisName.show = i3.enableXaxisName, i3.enableXaxisName && (i3.axisNameColor && (a3.axisName.color = i3.axisNameColor), i3.axisNameFontSize && (a3.axisName.fontSize = i3.axisNameFontSize), i3.axisNameFontWeight && (a3.axisName.fontWeight = i3.axisNameFontWeight), i3.xaxisNameWidth && (a3.axisName.width = i3.xaxisNameWidth), i3.xaxisNameEllipsis && (a3.axisName.overflow = "truncate", a3.axisName.ellipsis = i3.xaxisNameEllipsis), i3.xaxisNameFormatter && (a3.axisName.formatter = i3.xaxisNameFormatter)));
46
+ null != i3.enableAxis && (null == a3.axisLine && (a3.axisLine = {}), a3.axisLine.show = i3.enableAxis, i3.enableAxis && (null == a3.axisLine.lineStyle && (a3.axisLine.lineStyle = {}), i3.axisColor && (a3.axisLine.lineStyle.color = i3.axisColor), i3.axisOpacity && (a3.axisLine.lineStyle.opacity = i3.axisOpacity), (i3.axisWidth || "0" == i3.axisWidth) && (a3.axisLine.lineStyle.width = i3.axisWidth)));
47
+ null != i3.enableSplit && (null == a3.splitLine && (a3.splitLine = {}), a3.splitLine.show = i3.enableSplit, i3.enableSplit && (null == a3.splitLine.lineStyle && (a3.splitLine.lineStyle = {}), i3.splitColor && (a3.splitLine.lineStyle.color = i3.splitColor), i3.splitOpacity && (a3.splitLine.lineStyle.opacity = i3.splitOpacity), (i3.splitWidth || "0" == i3.splitWidth) && (a3.splitLine.lineStyle.width = i3.splitWidth), (i3.splitLength || "0" == i3.splitLength) && (a3.splitLine.length = i3.splitLength), i3.splitLineType && (a3.splitLine.lineStyle.type = i3.splitLineType)));
48
+ null != i3.enableSplitArea && (null == a3.splitArea && (a3.splitArea = {}), a3.splitArea.show = i3.enableSplitArea, i3.enableSplitArea && (null == a3.splitArea.areaStyle && (a3.splitArea.areaStyle = {}), i3.splitAreaColor && (a3.splitArea.areaStyle.color = [i3.splitAreaColor, "#ffffff"]), i3.splitAreaOpacity && (a3.splitArea.areaStyle.opacity = i3.splitAreaOpacity), i3.splitAreaShadowColor && (a3.splitArea.areaStyle.shadowColor = i3.splitAreaShadowColor), i3.splitAreaShadowBlur && (a3.splitArea.areaStyle.shadowBlur = i3.splitAreaShadowBlur), i3.splitAreaShadowX && (a3.splitArea.areaStyle.shadowOffsetX = i3.splitAreaShadowX), i3.splitAreaShadowY && (a3.splitArea.areaStyle.shadowOffsetY = i3.splitAreaShadowY)));
48
49
  l3.testitems || (l3.testitems = "项1,项2,项3,项4,项5,项6,项7,项8");
49
50
  const o2 = l3.testitems.split(",");
50
51
  let r2 = null;
@@ -53,14 +54,14 @@ function i(e2, l2) {
53
54
  const s2 = [];
54
55
  for (let e4 of o2)
55
56
  s2.push({ text: e4, max: r2 });
56
- a2.indicator = s2, t2.radar || (t2.radar = []);
57
+ a3.indicator = s2, t2.radar || (t2.radar = []);
57
58
  0 == t2.radar.length && t2.radar.push({});
58
- Object.assign(t2.radar[0], a2);
59
- }(e2, b2), (h || m) && p2.enableDatazoom) {
59
+ Object.assign(t2.radar[0], a3);
60
+ }(e2, b2), (u2 || m) && a2.enableDatazoom) {
60
61
  const e3 = { type: "slider" };
61
- p2.dataZoomType && (e3.type = p2.dataZoomType), p2.dataZoomStart && (e3.start = p2.dataZoomStart), p2.dataZoomEnd && (e3.end = p2.dataZoomEnd), b2.dataZoom.push(e3);
62
+ a2.dataZoomType && (e3.type = a2.dataZoomType), a2.dataZoomStart && (e3.start = a2.dataZoomStart), a2.dataZoomEnd && (e3.end = a2.dataZoomEnd), b2.dataZoom.push(e3);
62
63
  }
63
- null != p2.enableTooltip && function(e3, l3) {
64
+ null != a2.enableTooltip && function(e3, l3) {
64
65
  l3.tooltip.show = e3.enableTooltip, e3.tooltipTrigger && (l3.tooltip.trigger = e3.tooltipTrigger);
65
66
  e3.tooltipPosition && (l3.tooltip.position = e3.tooltipPosition);
66
67
  if (e3.tooltipNumFormat) {
@@ -72,7 +73,7 @@ function i(e2, l2) {
72
73
  e3.tooltipColor && (l3.tooltip.textStyle.color = e3.tooltipColor);
73
74
  e3.tooltipWeight && (l3.tooltip.textStyle.fontWeight = e3.tooltipWeight);
74
75
  e3.tooltipFormatter && (l3.tooltip.formatter = e3.tooltipFormatter);
75
- }(p2, b2);
76
+ }(a2, b2);
76
77
  const f = e2.items ? e2.items : [];
77
78
  if (g) {
78
79
  b2.series || (b2.series = []), 0 == b2.series.length && b2.series.push({});
@@ -80,31 +81,31 @@ function i(e2, l2) {
80
81
  e3.type = "radar", e3.data = [];
81
82
  for (let t2 of f)
82
83
  if ("radar" == t2.type) {
83
- const l3 = s(t2, b2);
84
+ const l3 = n(t2, b2);
84
85
  l3.uuid = t2.uuid, e3.data.push(l3);
85
86
  }
86
87
  } else
87
88
  for (let e3 of f) {
88
89
  let t2 = null;
89
- if (t2 = "scatter" == e3.type ? n(e3) : r(e3), t2.uuid = e3.uuid, (h || m) && ("1" == e3.props.yAxisIndex ? (t2.yAxisIndex = 1, b2.yAxis[1].show = true) : b2.yAxis[0].show = true, "bar" == t2.type && (null != p2.barGap && null != p2.barGap && "" != p2.barGap && (t2.barGap = p2.barGap + "%"), null != p2.barCategoryGap && null != p2.barCategoryGap && "" != p2.barCategoryGap && (t2.barCategoryGap = p2.barCategoryGap + "%"))), (u || c) && e3.props.subTitle) {
90
- const t3 = a(e3.style);
90
+ if (t2 = "scatter" == e3.type ? d(e3) : s(e3), t2.uuid = e3.uuid, (u2 || m) && ("1" == e3.props.yAxisIndex ? (t2.yAxisIndex = 1, b2.yAxis[1].show = true) : b2.yAxis[0].show = true, "bar" == t2.type && (null != a2.barGap && null != a2.barGap && "" != a2.barGap && (t2.barGap = a2.barGap + "%"), null != a2.barCategoryGap && null != a2.barCategoryGap && "" != a2.barCategoryGap && (t2.barCategoryGap = a2.barCategoryGap + "%"))), (h2 || c) && e3.props.subTitle) {
91
+ const t3 = o(e3.style);
91
92
  t3.subtext = e3.props.subTitle, b2.title.push(t3);
92
93
  }
93
94
  b2.series.push(t2);
94
95
  }
95
- if (u && (0 == p2.enableLegend && (b2.legend = void 0), b2.xAxis[0].show = false), (c || g) && (b2.xAxis[0].show = false), i2.isBar) {
96
+ if (h2 && (0 == a2.enableLegend && (b2.legend = void 0), b2.xAxis[0].show = false), (c || g) && (b2.xAxis[0].show = false), i2.isBar) {
96
97
  for (let e3 of b2.yAxis)
97
98
  e3.show && (e3.type = "category", e3.data = b2.xAxis[0].data);
98
99
  b2.xAxis[0].data = void 0, b2.isBar = i2.isBar;
99
100
  }
100
- const x = d(p2.customAttr);
101
+ const x = p(a2.customAttr);
101
102
  x && Object.assign(b2, x), l2.value = b2;
102
103
  }
103
- function a(e2) {
104
+ function o(e2) {
104
105
  const t2 = { subtextStyle: {} };
105
106
  return e2.subtitleFontWeight && (t2.subtextStyle.fontWeight = e2.subtitleFontWeight), e2.subtitleIncline && (t2.subtextStyle.fontStyle = "italic"), e2.subtitleFontSize && (t2.subtextStyle.fontSize = e2.subtitleFontSize), e2.subtitleColor && (t2.subtextStyle.color = e2.subtitleColor), e2.subtitleLeft && (t2.left = e2.subtitleLeft), e2.subtitleTop && (t2.top = e2.subtitleTop), t2;
106
107
  }
107
- function o(e2, t2) {
108
+ function r(e2, t2) {
108
109
  null != e2.offset && "" != e2.offset && (t2.offset = e2.offset), e2.name && (t2.name = e2.name), e2.nameLocation && (t2.nameLocation = e2.nameLocation), e2.namePadding && (t2.nameTextStyle.padding = e2.namePadding), e2.nameAlign && (t2.nameTextStyle.align = e2.nameAlign), e2.nameVerticalAlign && (t2.nameTextStyle.verticalAlign = e2.nameVerticalAlign), e2.nameColor && (t2.nameTextStyle.color = e2.nameColor), e2.nameFontSize && (t2.nameTextStyle.fontSize = e2.nameFontSize), t2.min = e2.min, t2.max = e2.max, "auto" === e2._dataMin && (t2._dataMin = e2._dataMin, t2.min = function(e3) {
109
110
  if (e3.min)
110
111
  return 10 * Math.floor(e3.min / 10);
@@ -113,7 +114,7 @@ function o(e2, t2) {
113
114
  return 10 * Math.ceil(e3.max / 10);
114
115
  }), null != e2.enableAxisLine && (t2.splitLine.show = e2.enableAxisLine, e2.enableAxisLine && e2.splitNumber && (t2.splitNumber = e2.splitNumber)), e2.formatter && (t2.axisLabel.formatter = e2.formatter), e2.labelColor && (t2.axisLabel.color = e2.labelColor), e2.labelFontSize && (t2.axisLabel.fontSize = e2.labelFontSize);
115
116
  }
116
- function r(e2) {
117
+ function s(e2) {
117
118
  const l2 = e2.props ? e2.props : {}, i2 = e2.style ? e2.style : {}, a2 = { name: l2.title, type: e2.type, label: {}, itemStyle: {}, lineStyle: {}, emphasis: {} };
118
119
  if ("bar" === e2.type && (a2.emphasis.itemStyle = { color: "#E3E8C0", borderWidth: 1, borderType: "dashed", borderColor: "#878773" }), null != i2.enableLabel) {
119
120
  if (a2.label.show = i2.enableLabel, i2.labelPosition && (a2.label.position = i2.labelPosition), i2.labelFontSize && (a2.label.fontSize = i2.labelFontSize), i2.labelColor && (a2.label.color = i2.labelColor), i2.labelWeight && (a2.label.fontWeight = i2.labelWeight), i2.textAlign && (a2.label.align = i2.textAlign), i2.verticalAlign && (a2.label.verticalAlign = i2.verticalAlign), i2.labelAngle && (a2.label.rotate = i2.labelAngle), i2.labelLeft || i2.labelTop) {
@@ -199,8 +200,8 @@ function r(e2) {
199
200
  l3.anchorLeft && (t3[0] = l3.anchorLeft), l3.anchorTop && (t3[1] = l3.anchorTop), e3.anchor.offsetCenter = t3;
200
201
  }
201
202
  }(a2, e2);
202
- const p2 = d(i2.customAttr);
203
- if (p2 && Object.assign(a2, p2), !l2.testdatas) {
203
+ const d2 = p(i2.customAttr);
204
+ if (d2 && Object.assign(a2, d2), !l2.testdatas) {
204
205
  const e3 = 0, t2 = 100;
205
206
  let i3 = [];
206
207
  for (let l3 = 0; l3 < 8; l3++) {
@@ -251,7 +252,7 @@ function r(e2) {
251
252
  a2.data = l2.testdatas.split(",");
252
253
  return a2;
253
254
  }
254
- function s(e2, l2) {
255
+ function n(e2, l2) {
255
256
  const i2 = e2.props ? e2.props : {}, a2 = e2.style ? e2.style : {}, o2 = { uuid: e2.uuid, name: i2.title };
256
257
  if (null != a2.enableLabel) {
257
258
  if (null == o2.label && (o2.label = {}), o2.label.show = a2.enableLabel, a2.labelPosition && (o2.label.position = a2.labelPosition), a2.labelFontSize && (o2.label.fontSize = a2.labelFontSize), a2.labelColor && (o2.label.color = a2.labelColor), a2.labelWeight && (o2.label.fontWeight = a2.labelWeight), a2.labelAngle && (o2.label.rotate = a2.labelAngle), a2.labelLeft || a2.labelTop) {
@@ -266,7 +267,7 @@ function s(e2, l2) {
266
267
  a2.labelFormatter && (o2.label.formatter = a2.labelFormatter);
267
268
  }
268
269
  null == o2.lineStyle && (o2.lineStyle = {}), a2.lineColor && (o2.lineStyle.color = a2.lineColor), a2.lineOpacity && (o2.lineStyle.opacity = a2.lineOpacity), a2.lineType && (o2.lineStyle.type = a2.lineType), a2.lineWidth > 0 && (o2.lineStyle.width = a2.lineWidth), a2.lineShadowColor && (o2.lineStyle.shadowColor = a2.lineShadowColor, a2.lineShadowBlur && (o2.lineStyle.shadowBlur = a2.lineShadowBlur), a2.lineShadowX && (o2.lineStyle.shadowOffsetX = a2.lineShadowX), a2.lineShadowY && (o2.lineStyle.shadowOffsetY = a2.lineShadowY)), a2.lineSymbol && (o2.symbol = a2.lineSymbol), a2.lineSymbolSize > -1 && (o2.symbolSize = a2.lineSymbolSize), a2.lineSymbolColor && (null == o2.itemStyle && (o2.itemStyle = {}), o2.itemStyle.color = a2.lineSymbolColor), null != a2.enableSplitLineArea && (null == o2.areaStyle && (o2.areaStyle = {}), o2.areaStyle.show = a2.enableSplitLineArea, a2.enableSplitLineArea && (a2.splitLineAreaColor && (o2.areaStyle.color = a2.splitLineAreaColor), a2.splitLineAreaOpacity && (o2.areaStyle.opacity = a2.splitLineAreaOpacity), a2.splitLineAreaShadowColor && (o2.areaStyle.shadowColor = a2.splitLineAreaShadowColor), a2.splitLineAreaShadowBlur && (o2.areaStyle.shadowBlur = a2.splitLineAreaShadowBlur), a2.splitLineAreaShadowX && (o2.areaStyle.shadowOffsetX = a2.splitLineAreaShadowX), a2.splitLineAreaShadowY && (o2.areaStyle.shadowOffsetY = a2.splitLineAreaShadowY)));
269
- const r2 = d(a2.customAttr);
270
+ const r2 = p(a2.customAttr);
270
271
  if (r2 && Object.assign(o2, r2), !i2.testdatas) {
271
272
  const e3 = 0;
272
273
  let t2 = 100, l3 = [];
@@ -276,7 +277,7 @@ function s(e2, l2) {
276
277
  }
277
278
  i2.testdatas = l3.join(",");
278
279
  }
279
- const s2 = l2.radar && l2.radar.length > 0 ? l2.radar[0].indicator : [], n2 = i2.testdatas ? i2.testdatas.split(",") : [], p2 = [], b2 = n2.length;
280
+ const s2 = l2.radar && l2.radar.length > 0 ? l2.radar[0].indicator : [], n2 = i2.testdatas ? i2.testdatas.split(",") : [], d2 = [], b2 = n2.length;
280
281
  for (let e3 = 0; e3 < 8 || e3 < b2; e3++) {
281
282
  let t2 = e3 < s2.length ? s2[e3].max : null;
282
283
  t2 || (t2 = 100), t2 = parseFloat(t2);
@@ -285,15 +286,15 @@ function s(e2, l2) {
285
286
  parseFloat(n2[e3]) < t2 && (l3 = true);
286
287
  }
287
288
  if (l3)
288
- p2.push(n2[e3]);
289
+ d2.push(n2[e3]);
289
290
  else {
290
291
  const e4 = Math.ceil(0), l4 = Math.floor(t2), i3 = Math.floor(Math.random() * (l4 - e4 + 1)) + e4;
291
- p2.push(i3);
292
+ d2.push(i3);
292
293
  }
293
294
  }
294
- return o2.value = p2, o2;
295
+ return o2.value = d2, o2;
295
296
  }
296
- function n(e2, l2) {
297
+ function d(e2, l2) {
297
298
  const i2 = e2.props ? e2.props : {}, a2 = e2.style ? e2.style : {}, o2 = { name: i2.title, type: e2.type, itemStyle: {} };
298
299
  if (a2.symbol && (o2.symbol = a2.symbol), a2.symbolSize && (o2.symbolSize = a2.symbolSize), a2.symbolColor && (o2.itemStyle.color = a2.symbolColor), a2.symbolRotate && (o2.symbolRotate = a2.symbolRotate), a2.symbolLeft || a2.symbolTop) {
299
300
  const e3 = [0, 0];
@@ -311,7 +312,7 @@ function n(e2, l2) {
311
312
  } else
312
313
  a2.labelFormatter && (o2.label.formatter = a2.labelFormatter);
313
314
  }
314
- const r2 = d(a2.customAttr);
315
+ const r2 = p(a2.customAttr);
315
316
  if (r2 && Object.assign(o2, r2), !i2.testitems) {
316
317
  let e3 = [];
317
318
  const t2 = 0, l3 = 10;
@@ -330,17 +331,17 @@ function n(e2, l2) {
330
331
  }
331
332
  i2.testdatas = l3.join(",");
332
333
  }
333
- const s2 = i2.testitems.split(","), n2 = i2.testitems.split(","), p2 = [];
334
+ const s2 = i2.testitems.split(","), n2 = i2.testitems.split(","), d2 = [];
334
335
  for (let e3 = 0; e3 < s2.length && e3 < n2.length; e3++) {
335
336
  const t2 = parseFloat(s2[e3]), l3 = parseFloat(n2[e3]);
336
337
  if (isNaN(t2) || isNaN(l3))
337
338
  continue;
338
339
  const i3 = [t2, l3];
339
- p2.push(i3);
340
+ d2.push(i3);
340
341
  }
341
- return o2.data = p2, o2;
342
+ return o2.data = d2, o2;
342
343
  }
343
- function d(e2) {
344
+ function p(e2) {
344
345
  if (e2) {
345
346
  e2.trim && (e2 = e2.trim()), e2.indexOf && 0 != e2.indexOf("{") && (e2 = "{" + e2 + "}");
346
347
  try {
@@ -350,7 +351,7 @@ function d(e2) {
350
351
  }
351
352
  return null;
352
353
  }
353
- function p(t2) {
354
+ function b(t2) {
354
355
  const l2 = e().pageContext;
355
356
  if (l2) {
356
357
  l2.initChartServiceConfigs || (l2.initChartServiceConfigs = []);
@@ -364,31 +365,45 @@ function p(t2) {
364
365
  e2 > -1 && l2.initChartServiceConfigs.shift(e2, 1);
365
366
  }
366
367
  }
367
- function b(t2, l2) {
368
- const i2 = e().pageContext;
369
- if (i2) {
370
- i2.initChartServiceConfigs || (i2.initChartServiceConfigs = []);
368
+ function u(t2, i2) {
369
+ var _a;
370
+ const a2 = e().pageContext;
371
+ if (a2) {
372
+ a2.initChartServiceConfigs || (a2.initChartServiceConfigs = []), a2.allChartUuids || (a2.allChartUuids = []);
371
373
  let e2 = -1;
372
- for (let l3 = 0; l3 < i2.initChartServiceConfigs.length; l3++) {
373
- if (i2.initChartServiceConfigs[l3].uuid == t2.uuid) {
374
- e2 = l3;
374
+ for (let l2 = 0; l2 < a2.initChartServiceConfigs.length; l2++) {
375
+ if (a2.initChartServiceConfigs[l2].uuid == t2.uuid) {
376
+ e2 = l2;
375
377
  break;
376
378
  }
377
379
  }
378
- const a2 = t2.props.dataOrigin ? t2.props.dataOrigin : {};
379
- a2.service || (a2.service = {});
380
- const o2 = a2.service;
381
- if (o2.simpleCode) {
382
- const r2 = { uuid: t2.uuid }, s2 = { serivceCode: o2.simpleCode, uuid: t2.uuid };
383
- return l2 && (s2.groupValue = l2.groupValue), r2.services = [s2], e2 > -1 ? i2.initChartServiceConfigs[e2] = r2 : i2.initChartServiceConfigs.push(r2), r2.resultSet = a2.resultSet ? a2.resultSet : null, r2;
380
+ a2.allChartUuids.indexOf(t2.uuid) < 0 && a2.allChartUuids.push(t2.uuid);
381
+ const o2 = t2.props.dataOrigin ? t2.props.dataOrigin : {};
382
+ o2.service || (o2.service = {});
383
+ const r2 = o2.service;
384
+ if (r2.simpleCode) {
385
+ const s2 = { uuid: t2.uuid }, n2 = { serivceCode: r2.simpleCode, uuid: t2.uuid };
386
+ i2 && (n2.groupValue = i2.groupValue);
387
+ const d2 = (_a = t2 == null ? void 0 : t2.props.dataOrigin) == null ? void 0 : _a.serviceInputs;
388
+ return d2 && (n2.serviceInputs = l(d2)), s2.services = [n2], e2 > -1 ? a2.initChartServiceConfigs[e2] = s2 : a2.initChartServiceConfigs.push(s2), s2.resultSet = o2.resultSet ? o2.resultSet : null, s2;
384
389
  }
385
- e2 > -1 && i2.initChartServiceConfigs.shift(e2, 1);
390
+ e2 > -1 && a2.initChartServiceConfigs.shift(e2, 1);
386
391
  }
387
392
  return null;
388
393
  }
394
+ function h(t2, i2) {
395
+ const a2 = e().pageContext;
396
+ if (a2.initChartServiceConfigs) {
397
+ a2.initChartServiceConfigs.filter((e2) => e2.uuid && e2.uuid === t2.uuid).forEach((e2) => {
398
+ const t3 = e2.services;
399
+ t3 && t3.length > 0 && (t3[0].serviceInputs = l(i2));
400
+ });
401
+ }
402
+ }
389
403
  export {
390
- l as generateChartHeader,
391
- i as generateChartOption,
392
- b as initComponentDataConfig,
393
- p as removComponentDataConfig
404
+ i as generateChartHeader,
405
+ a as generateChartOption,
406
+ u as initComponentDataConfig,
407
+ b as removComponentDataConfig,
408
+ h as updateServiceInputs
394
409
  };
@@ -78,6 +78,7 @@ export interface PageDesign extends Component {
78
78
  listCodesMap?: object;
79
79
  subTableWatchProps?: object;
80
80
  i18nKeys: Array<string>;
81
+ allChartUuids: Array<string>;
81
82
  }
82
83
  /**
83
84
  * 页面资源
@@ -59,7 +59,7 @@ const $ = { style: { padding: "8px 0px 0px 0px" } }, F = { style: { padding: "8p
59
59
  }
60
60
  return (l2, U2) => {
61
61
  const z2 = a("el-option"), q2 = a("el-select"), K = a("el-form-item"), Q = a("el-input"), X = a("el-radio"), Y = a("el-radio-group"), Z = a("el-collapse-item"), ee = a("el-switch"), le = a("el-input-number"), ae = a("el-color-picker"), oe = a("el-divider"), te = a("el-col"), re = a("el-icon"), ue = a("el-tooltip"), se = a("el-checkbox"), pe = a("el-table-column"), me = a("Plus"), de = a("Delete"), ne = a("el-table"), ie = a("el-collapse"), fe = a("el-form");
62
- return o(), t(fe, { "label-width": "80px", size: "small" }, { default: r(() => [u(ie, { modelValue: P.value, "onUpdate:modelValue": U2[10] || (U2[10] = (e3) => P.value = e3), style: { "margin-top": "6px" } }, { default: r(() => [u(Z, { title: "基本", name: "base", class: "amb-design-attr-group-header" }, { default: r(() => [s("div", $, [u(K, { label: "组件类型", class: "amb-design-attr-item" }, { default: r(() => [u(q2, { modelValue: e2.configure.name, "onUpdate:modelValue": U2[0] || (U2[0] = (l3) => e2.configure.name = l3), disabled: "", placeholder: "请选择" }, { default: r(() => [(o(true), p(m, null, d(n(b)(), (e3) => (o(), t(z2, { key: e3.name, label: e3.label, value: e3.name }, null, 8, ["label", "value"]))), 128))]), _: 1 }, 8, ["modelValue"])]), _: 1 }), u(K, { label: "唯一编码", class: "amb-design-attr-item" }, { default: r(() => [u(Q, { modelValue: e2.configure.uuid, "onUpdate:modelValue": U2[1] || (U2[1] = (l3) => e2.configure.uuid = l3), readonly: "", title: e2.configure.uuid }, null, 8, ["modelValue", "title"])]), _: 1 }), u(K, { label: "自定义编码", class: "amb-design-attr-item" }, { default: r(() => [u(Q, { modelValue: e2.configure.code, "onUpdate:modelValue": U2[2] || (U2[2] = (l3) => e2.configure.code = l3), placeholder: "请输入" }, null, 8, ["modelValue"])]), _: 1 }), u(K, { label: "绑定权限", class: "amb-design-attr-item" }, { default: r(() => [(o(), t(k, { key: e2.configure.uuid, configure: e2.configure }, null, 8, ["configure"]))]), _: 1 }), u(K, { label: "标题", class: "amb-design-attr-item" }, { default: r(() => [u(Q, { modelValue: e2.configure.title, "onUpdate:modelValue": U2[3] || (U2[3] = (l3) => e2.configure.title = l3), title: e2.configure.tittle }, null, 8, ["modelValue", "title"])]), _: 1 }), u(K, { label: "支持导出", class: "amb-design-attr-item" }, { default: r(() => [u(Y, { modelValue: e2.configure.props.base.exportable, "onUpdate:modelValue": U2[4] || (U2[4] = (l3) => e2.configure.props.base.exportable = l3), class: "ml-4" }, { default: r(() => [u(X, { value: true }, { default: r(() => [i("是")]), _: 1 }), u(X, { value: false }, { default: r(() => [i("否")]), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 })])]), _: 1 }), u(V, { title: "数据", pageDesign: e2.pageDesign, sourceFields: N.value, configure: e2.configure, remote: false, onBindVariableChange: B, onServiceFieldChange: G }, null, 8, ["pageDesign", "sourceFields", "configure"]), u(h, { configureProps: e2.configure.props }, null, 8, ["configureProps"]), u(Z, { title: "列模型", name: "columnModel", class: "amb-design-attr-group-header" }, { default: r(() => [s("div", F, [u(ne, { data: e2.configure.items, style: { width: "100%", "margin-bottom": "8px" }, "row-key": "uuid", onExpandChange: A, "expand-row-keys": W.value }, { default: r(() => [u(pe, { type: "expand", width: "35" }, { default: r((l3) => [u(K, { class: "amb-design-attr-item" }, { label: r(() => [i(" 显示条件 ")]), default: r(() => [u(O, { paramTypes: ["data", "task", "page", "request"], data: l3.row.showCondition, pageDesign: e2.pageDesign, configure: e2.configure, row: l3.row, "onUpdate:data": L }, null, 8, ["data", "pageDesign", "configure", "row"])]), _: 2 }, 1024), u(K, { class: "amb-design-attr-item", "label-position": "top" }, { label: r(() => [i(" 数据公式 ")]), default: r(() => [u(Q, { modelValue: l3.row.formula, "onUpdate:modelValue": (e3) => l3.row.formula = e3, type: "textarea", size: "small", placeholder: "请选择" }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), u(K, { label: "格式化分类", class: "amb-design-attr-item" }, { default: r(() => [u(q2, { onChange: (e3) => {
62
+ return o(), t(fe, { "label-width": "80px", size: "small" }, { default: r(() => [u(ie, { modelValue: P.value, "onUpdate:modelValue": U2[10] || (U2[10] = (e3) => P.value = e3), style: { "margin-top": "6px" } }, { default: r(() => [u(Z, { title: "基本", name: "base", class: "amb-design-attr-group-header" }, { default: r(() => [s("div", $, [u(K, { label: "组件类型", class: "amb-design-attr-item" }, { default: r(() => [u(q2, { modelValue: e2.configure.name, "onUpdate:modelValue": U2[0] || (U2[0] = (l3) => e2.configure.name = l3), disabled: "", placeholder: "请选择" }, { default: r(() => [(o(true), p(m, null, d(n(b)(), (e3) => (o(), t(z2, { key: e3.name, label: e3.label, value: e3.name }, null, 8, ["label", "value"]))), 128))]), _: 1 }, 8, ["modelValue"])]), _: 1 }), u(K, { label: "唯一编码", class: "amb-design-attr-item" }, { default: r(() => [u(Q, { modelValue: e2.configure.uuid, "onUpdate:modelValue": U2[1] || (U2[1] = (l3) => e2.configure.uuid = l3), readonly: "", title: e2.configure.uuid }, null, 8, ["modelValue", "title"])]), _: 1 }), u(K, { label: "自定义编码", class: "amb-design-attr-item" }, { default: r(() => [u(Q, { modelValue: e2.configure.code, "onUpdate:modelValue": U2[2] || (U2[2] = (l3) => e2.configure.code = l3), placeholder: "请输入" }, null, 8, ["modelValue"])]), _: 1 }), u(K, { label: "绑定权限", class: "amb-design-attr-item" }, { default: r(() => [(o(), t(k, { key: e2.configure.uuid, configure: e2.configure }, null, 8, ["configure"]))]), _: 1 }), u(K, { label: "标题", class: "amb-design-attr-item" }, { default: r(() => [u(Q, { modelValue: e2.configure.title, "onUpdate:modelValue": U2[3] || (U2[3] = (l3) => e2.configure.title = l3), title: e2.configure.tittle }, null, 8, ["modelValue", "title"])]), _: 1 }), u(K, { label: "是否导出", class: "amb-design-attr-item" }, { default: r(() => [u(Y, { modelValue: e2.configure.exportable, "onUpdate:modelValue": U2[4] || (U2[4] = (l3) => e2.configure.exportable = l3), class: "ml-4" }, { default: r(() => [u(X, { value: true }, { default: r(() => [i("是")]), _: 1 }), u(X, { value: false }, { default: r(() => [i("否")]), _: 1 })]), _: 1 }, 8, ["modelValue"])]), _: 1 })])]), _: 1 }), u(V, { title: "数据", pageDesign: e2.pageDesign, sourceFields: N.value, configure: e2.configure, remote: false, onBindVariableChange: B, onServiceFieldChange: G }, null, 8, ["pageDesign", "sourceFields", "configure"]), u(h, { configureProps: e2.configure.props }, null, 8, ["configureProps"]), u(Z, { title: "列模型", name: "columnModel", class: "amb-design-attr-group-header" }, { default: r(() => [s("div", F, [u(ne, { data: e2.configure.items, style: { width: "100%", "margin-bottom": "8px" }, "row-key": "uuid", onExpandChange: A, "expand-row-keys": W.value }, { default: r(() => [u(pe, { type: "expand", width: "35" }, { default: r((l3) => [u(K, { class: "amb-design-attr-item" }, { label: r(() => [i(" 显示条件 ")]), default: r(() => [u(O, { paramTypes: ["data", "task", "page", "request"], data: l3.row.showCondition, pageDesign: e2.pageDesign, configure: e2.configure, row: l3.row, "onUpdate:data": L }, null, 8, ["data", "pageDesign", "configure", "row"])]), _: 2 }, 1024), u(K, { class: "amb-design-attr-item", "label-position": "top" }, { label: r(() => [i(" 数据公式 ")]), default: r(() => [u(Q, { modelValue: l3.row.formula, "onUpdate:modelValue": (e3) => l3.row.formula = e3, type: "textarea", size: "small", placeholder: "请选择" }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), u(K, { label: "格式化分类", class: "amb-design-attr-item" }, { default: r(() => [u(q2, { onChange: (e3) => {
63
63
  return a2 = e3, o2 = l3.$index, void (a2 && (I2.configure.items[o2].props.format = { type: a2 }));
64
64
  var a2, o2;
65
65
  }, modelValue: l3.row.props.format.type, "onUpdate:modelValue": (e3) => l3.row.props.format.type = e3, clearable: "", placeholder: "请选择" }, { default: r(() => [u(z2, { label: "数值", value: "number" }), u(z2, { label: "货币", value: "currency" }), u(z2, { label: "百分比", value: "percent" }), u(z2, { label: "图标/标签", value: "icon" }), u(z2, { label: "进度条控件", value: "progress" }), u(z2, { label: "自定义控件", value: "customControl" }), u(z2, { label: "自定义方法", value: "custom" })]), _: 2 }, 1032, ["onChange", "modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), l3.row.props.format && "number" === l3.row.props.format.type || "currency" === l3.row.props.format.type || "percent" === l3.row.props.format.type ? (o(), t(K, { key: 0, label: "小数位数", class: "amb-design-attr-item" }, { default: r(() => [u(Q, { modelValue: l3.row.props.format.decimalDigit, "onUpdate:modelValue": (e3) => l3.row.props.format.decimalDigit = e3 }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024)) : f("", true), l3.row.props.format && "number" === l3.row.props.format.type ? (o(), t(K, { key: 1, label: "科学计数", class: "amb-design-attr-item" }, { default: r(() => [u(ee, { modelValue: l3.row.props.format.scientific, "onUpdate:modelValue": (e3) => l3.row.props.format.scientific = e3, "active-text": "使用", "inactive-text": "不使用" }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024)) : f("", true), l3.row.props.format && "number" === l3.row.props.format.type && l3.row.props.format.scientific ? (o(), t(K, { key: 2, label: "计数位数", class: "amb-design-attr-item" }, { default: r(() => [u(Q, { modelValue: l3.row.props.format.scientificNum, "onUpdate:modelValue": (e3) => l3.row.props.format.scientificNum = e3 }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024)) : f("", true), l3.row.props.format && "number" === l3.row.props.format.type ? (o(), t(K, { key: 3, label: "千位分隔符", class: "amb-design-attr-item" }, { default: r(() => [u(ee, { modelValue: l3.row.props.format.thousandsSeparator, "onUpdate:modelValue": (e3) => l3.row.props.format.thousandsSeparator = e3, "active-text": "使用", "inactive-text": "不使用" }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024)) : f("", true), l3.row.props.format && "number" === l3.row.props.format.type ? (o(), t(K, { key: 4, label: "数值符号", class: "amb-design-attr-item" }, { default: r(() => [u(Q, { modelValue: l3.row.props.format.symbol, "onUpdate:modelValue": (e3) => l3.row.props.format.symbol = e3 }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024)) : f("", true), l3.row.props.format && "currency" === l3.row.props.format.type ? (o(), t(K, { key: 5, label: "货币符号", class: "amb-design-attr-item" }, { default: r(() => [u(q2, { modelValue: l3.row.props.format.currencySymbol, "onUpdate:modelValue": (e3) => l3.row.props.format.currencySymbol = e3, placeholder: "Select" }, { default: r(() => [u(z2, { label: "$", value: "$" }), u(z2, { label: "¥", value: "¥" })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024)) : f("", true), l3.row.props.format && "customControl" === l3.row.props.format.type ? (o(), t(K, { key: 6, label: "自定义控件", class: "amb-design-attr-item" }, { default: r(() => [u(Q, { modelValue: l3.row.props.format.customControl, "onUpdate:modelValue": (e3) => l3.row.props.format.customControl = e3 }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024)) : f("", true), l3.row.props.format && "icon" === l3.row.props.format.type ? (o(), t(D, { key: 7, setting: l3.row.props.format, "show-event": false }, null, 8, ["setting"])) : f("", true), l3.row.props.format && "custom" === l3.row.props.format.type ? (o(), t(K, { key: 8, label: "自定义方法", class: "amb-design-attr-item" }, { default: r(() => [u(q2, { modelValue: l3.row.props.format.customFunc, "onUpdate:modelValue": (e3) => l3.row.props.format.customFunc = e3, clearable: "" }, { default: r(() => [(o(true), p(m, null, d(n(j)(), (e3) => (o(), t(z2, { key: e3.value, label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 128))]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024)) : f("", true), l3.row.props.format && "progress" === l3.row.props.format.type ? (o(), p(m, { key: 9 }, [u(K, { label: "进度条高度", class: "amb-design-attr-item" }, { default: r(() => [u(le, { modelValue: l3.row.props.format.strokeWidth, "onUpdate:modelValue": (e3) => l3.row.props.format.strokeWidth = e3 }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), u(K, { label: "最大值", class: "amb-design-attr-item" }, { default: r(() => [u(le, { modelValue: l3.row.props.format.max, "onUpdate:modelValue": (e3) => l3.row.props.format.max = e3 }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), u(K, { label: "进度条类型", class: "amb-design-attr-item" }, { default: r(() => [u(Y, { modelValue: l3.row.props.format.progressType, "onUpdate:modelValue": (e3) => l3.row.props.format.progressType = e3, class: "ml-4" }, { default: r(() => [u(X, { value: "line" }, { default: r(() => [i("line")]), _: 1 }), u(X, { value: "circle" }, { default: r(() => [i("circle")]), _: 1 }), u(X, { value: "dashboard" }, { default: r(() => [i("dashboard")]), _: 1 })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), u(K, { label: "显示文字", class: "amb-design-attr-item" }, { default: r(() => [u(Y, { modelValue: l3.row.props.format.showText, "onUpdate:modelValue": (e3) => l3.row.props.format.showText = e3, class: "ml-4" }, { default: r(() => [u(X, { value: true }, { default: r(() => [i("是")]), _: 1 }), u(X, { value: false }, { default: r(() => [i("否")]), _: 1 })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), "line" === l3.row.props.format.progressType ? (o(), t(K, { key: 0, label: "文本内显", class: "amb-design-attr-item" }, { default: r(() => [u(Y, { modelValue: l3.row.props.format.textInside, "onUpdate:modelValue": (e3) => l3.row.props.format.textInside = e3, class: "ml-4" }, { default: r(() => [u(X, { value: true }, { default: r(() => [i("是")]), _: 1 }), u(X, { value: false }, { default: r(() => [i("否")]), _: 1 })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024)) : f("", true), u(K, { label: "进度条状态", class: "amb-design-attr-item" }, { default: r(() => [u(Y, { modelValue: l3.row.props.format.status, "onUpdate:modelValue": (e3) => l3.row.props.format.status = e3, class: "ml-4" }, { default: r(() => [u(X, { value: null }, { default: r(() => [i("无")]), _: 1 }), u(X, { value: "success" }, { default: r(() => [i("success")]), _: 1 }), u(X, { value: "warning" }, { default: r(() => [i("warning")]), _: 1 }), u(X, { value: "exception" }, { default: r(() => [i("exception")]), _: 1 })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), u(K, { label: "自定义颜色", class: "amb-design-attr-item" }, { default: r(() => [u(Y, { modelValue: l3.row.props.format.colorType, "onUpdate:modelValue": (e3) => l3.row.props.format.colorType = e3, class: "ml-4" }, { default: r(() => [u(X, { value: "default" }, { default: r(() => [i("默认")]), _: 1 }), u(X, { value: "custom" }, { default: r(() => [i("指定颜色")]), _: 1 })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), "custom" === l3.row.props.format.colorType ? (o(), t(K, { key: 1, label: "颜色" }, { default: r(() => [u(ae, { modelValue: l3.row.props.format.color, "onUpdate:modelValue": (e3) => l3.row.props.format.color = e3 }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024)) : f("", true)], 64)) : f("", true), u(oe, null, { default: r(() => [i("列属性")]), _: 1 }), u(K, { label: "列宽", class: "amb-design-attr-item" }, { default: r(() => [u(le, { modelValue: l3.row.props.base.width, "onUpdate:modelValue": (e3) => l3.row.props.base.width = e3, class: "mx-4", min: 0, "controls-position": "right" }, null, 8, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), u(K, { label: "标题对齐", class: "amb-design-attr-item" }, { default: r(() => [u(Y, { modelValue: l3.row.props.base.headerAlign, "onUpdate:modelValue": (e3) => l3.row.props.base.headerAlign = e3, class: "ml-4" }, { default: r(() => [u(X, { value: "left" }, { default: r(() => [i("居左")]), _: 1 }), u(X, { value: "center" }, { default: r(() => [i("居中")]), _: 1 }), u(X, { value: "right" }, { default: r(() => [i("居右")]), _: 1 })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), u(K, { label: "内容对齐", class: "amb-design-attr-item" }, { default: r(() => [u(Y, { modelValue: l3.row.props.base.align, "onUpdate:modelValue": (e3) => l3.row.props.base.align = e3, class: "ml-4" }, { default: r(() => [u(X, { value: "left" }, { default: r(() => [i("居左")]), _: 1 }), u(X, { value: "center" }, { default: r(() => [i("居中")]), _: 1 }), u(X, { value: "right" }, { default: r(() => [i("居右")]), _: 1 })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), u(K, { label: "固定列", class: "amb-design-attr-item" }, { default: r(() => [u(Y, { modelValue: l3.row.props.base.fixed, "onUpdate:modelValue": (e3) => l3.row.props.base.fixed = e3, class: "ml-4" }, { default: r(() => [u(X, { value: false }, { default: r(() => [i("否")]), _: 1 }), u(X, { value: "left" }, { default: r(() => [i("居左")]), _: 1 }), u(X, { value: "right" }, { default: r(() => [i("居右")]), _: 1 })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), u(K, { label: "可排序", class: "amb-design-attr-item" }, { default: r(() => [u(Y, { modelValue: l3.row.props.base.sortable, "onUpdate:modelValue": (e3) => l3.row.props.base.sortable = e3, class: "ml-4" }, { default: r(() => [u(X, { value: true }, { default: r(() => [i("是")]), _: 1 }), u(X, { value: false }, { default: r(() => [i("否")]), _: 1 })]), _: 2 }, 1032, ["modelValue", "onUpdate:modelValue"])]), _: 2 }, 1024), u(K, { label: "汇总列", class: "amb-design-attr-item" }, { default: r(() => [u(Y, { modelValue: l3.row.props.base.collectColumn, "onUpdate:modelValue": (e3) => l3.row.props.base.collectColumn = e3, onChange: (e3) => {
@@ -12,9 +12,9 @@ import "agilebuilder-ui/src/utils/auth";
12
12
  import "super-page-runtime";
13
13
  import "../../../../../../stores/page-store.js";
14
14
  import "@vueuse/core";
15
- import M from "../../data/component/table-children-column.vue.js";
16
- import { queryTableFields as W, changeFeieldToMap as _ } from "../../../../utils/page-table-util.js";
17
- import { removComponentDataConfig as B, initComponentDataConfig as N } from "../../../../utils/chart-design-util.js";
15
+ import { removComponentDataConfig as M, initComponentDataConfig as W } from "../../../../utils/chart-design-util.js";
16
+ import _ from "../../data/component/table-children-column.vue.js";
17
+ import { queryTableFields as B, changeFeieldToMap as N } from "../../../../utils/page-table-util.js";
18
18
  import { statisticsTable as T } from "../../../../../../stores/statistics-table-store.js";
19
19
  const $ = { id: "tableDesignMenu", ref: "headerMenu", class: "context-menu" }, L = e({ __name: "statisticalTable-design", props: { pageDesign: {}, configure: {}, selectWidget: {}, indexObj: {} }, emits: ["selectColumn", "onSelectWidget"], setup(e2, { emit: L2 }) {
20
20
  const F = e2, G = L2, A = o([{}]), V = o({}), I = o("");
@@ -27,13 +27,13 @@ const $ = { id: "tableDesignMenu", ref: "headerMenu", class: "context-menu" }, L
27
27
  }
28
28
  F.configure && function() {
29
29
  const e3 = F.configure.tableSysCode ? F.configure.tableSysCode : F.pageDesign.systemCode, o2 = F.configure.tableSysVersion ? F.configure.tableSysVersion : F.pageDesign.version, n2 = F.configure.props.dataOrigin.tableName;
30
- W(e3, o2, n2).then((e4) => {
31
- F.configure.modelFieldsMap = _(F.configure.modelFieldsMap, e4), F.configure.modelFields = e4;
30
+ B(e3, o2, n2).then((e4) => {
31
+ F.configure.modelFieldsMap = N(F.configure.modelFieldsMap, e4), F.configure.modelFields = e4;
32
32
  });
33
33
  }(), n(() => {
34
34
  q.value = E(F.configure);
35
35
  }), i(() => {
36
- B(F.configure);
36
+ M(F.configure);
37
37
  }), x.$on("setHiddenColumsName", (e3) => {
38
38
  e3.value ? X.value = X.value.filter((o2) => o2 != e3.name) : X.value.push(e3.name);
39
39
  }), l(F.configure.style, () => {
@@ -48,7 +48,7 @@ const $ = { id: "tableDesignMenu", ref: "headerMenu", class: "context-menu" }, L
48
48
  for (const e4 in o2)
49
49
  P.value[e4] = o2[e4];
50
50
  }(), F.configure.runtime.props = P.value, Object.assign(F.configure.runtime.props, F.configure.props.base), function() {
51
- const e3 = N(F.configure, null);
51
+ const e3 = W(F.configure, null);
52
52
  F.configure.runtime.dataConfig = e3;
53
53
  }();
54
54
  }, { immediate: true }), l(F.configure.items, (e3) => {
@@ -125,7 +125,7 @@ const $ = { id: "tableDesignMenu", ref: "headerMenu", class: "context-menu" }, L
125
125
  return j(".el-table__header-wrapper tr", F.configure.items, { animation: 150, ghostClass: "ghost", onStart(e3) {
126
126
  } }), (e3, o2) => {
127
127
  const n2 = t("el-table"), i2 = t("el-icon");
128
- return r(), s("div", null, [a(n2, { ref_key: "tableRef", ref: K, "cell-class-name": re, "header-cell-class-name": re, border: "", class: u(I.value), data: A.value, onHeaderDragend: le, onHeaderContextmenu: U, onRowClick: Q, onCellMouseEnter: ae, onCellMouseLeave: ue, style: c(V.value) }, { default: d(() => [(r(true), s(p, null, m(q.value, (o3) => (r(), g(M, { key: o3, listColumns: o3, designProperty: P.value, configure: e3.configure, pageDesign: e3.pageDesign, indexObj: e3.indexObj, onSetHeaderLabel: se, onOnSelectWidget: z, onSetColumnData: ie, onCloseMenuVisible: Z, selectWidget: e3.selectWidget }, null, 8, ["listColumns", "designProperty", "configure", "pageDesign", "indexObj", "selectWidget"]))), 128))]), _: 1 }, 8, ["class", "data", "style"]), f("div", { onClick: Q, style: { width: "100%", height: "30px" } }), b(f("div", null, [f("ul", $, [f("li", { tabindex: "-1", onClick: o2[0] || (o2[0] = () => ee("createCombinedHeader")) }, [a(i2, null, { default: d(() => [a(v(O))]), _: 1 }), y(" 创建 ")]), oe.value.props && oe.value.props.base && "$selection" !== oe.value.props.base.prop && "$index" !== oe.value.props.base.prop ? (r(), s("li", { key: 0, tabindex: "-1", onClick: o2[1] || (o2[1] = () => ee("deleteNode")) }, [a(i2, null, { default: d(() => [a(v(S))]), _: 1 }), y(" 删除 ")])) : h("", true)], 512)], 512), [[C, R.value]])]);
128
+ return r(), s("div", null, [a(n2, { ref_key: "tableRef", ref: K, "cell-class-name": re, "header-cell-class-name": re, border: "", class: u(I.value), data: A.value, onHeaderDragend: le, onHeaderContextmenu: U, onRowClick: Q, onCellMouseEnter: ae, onCellMouseLeave: ue, style: c(V.value) }, { default: d(() => [(r(true), s(p, null, m(q.value, (o3) => (r(), g(_, { key: o3, listColumns: o3, designProperty: P.value, configure: e3.configure, pageDesign: e3.pageDesign, indexObj: e3.indexObj, onSetHeaderLabel: se, onOnSelectWidget: z, onSetColumnData: ie, onCloseMenuVisible: Z, selectWidget: e3.selectWidget }, null, 8, ["listColumns", "designProperty", "configure", "pageDesign", "indexObj", "selectWidget"]))), 128))]), _: 1 }, 8, ["class", "data", "style"]), f("div", { onClick: Q, style: { width: "100%", height: "30px" } }), b(f("div", null, [f("ul", $, [f("li", { tabindex: "-1", onClick: o2[0] || (o2[0] = () => ee("createCombinedHeader")) }, [a(i2, null, { default: d(() => [a(v(O))]), _: 1 }), y(" 创建 ")]), oe.value.props && oe.value.props.base && "$selection" !== oe.value.props.base.prop && "$index" !== oe.value.props.base.prop ? (r(), s("li", { key: 0, tabindex: "-1", onClick: o2[1] || (o2[1] = () => ee("deleteNode")) }, [a(i2, null, { default: d(() => [a(v(S))]), _: 1 }), y(" 删除 ")])) : h("", true)], 512)], 512), [[C, R.value]])]);
129
129
  };
130
130
  } });
131
131
  export {
@@ -1,7 +1,7 @@
1
1
  import e from "./composite-header.vue2.js";
2
2
  import "./composite-header.vue3.js";
3
3
  import o from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = o(e, [["__scopeId", "data-v-4fd4369c"]]);
4
+ const r = o(e, [["__scopeId", "data-v-fc0fd0a6"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -156,30 +156,39 @@ const w = { key: 0 }, E = { style: { display: "flex", margin: "8px 0" } }, L = {
156
156
  let t2 = l2.data;
157
157
  let n2;
158
158
  const d2 = me(e3.data.uuid);
159
- if ("after" === a2 ? (!function(e4, l3) {
160
- const a3 = e4.parentUuid;
161
- let u3 = e4.displayOrder;
162
- null == u3 && (u3 = 0);
163
- let t3 = W.value.filter((l4) => l4.parentUuid === a3 && l4.uuid !== e4.uuid && l4.displayOrder > u3);
164
- t3 && t3.length > 0 ? (t3 = t3.sort((e5, l4) => e5.displayOrder - l4.displayOrder), l3.displayOrder = t3[0].displayOrder + 1, t3.forEach((e5) => {
165
- e5.displayOrder = e5.displayOrder + 1;
166
- })) : l3.displayOrder = u3 + 1;
167
- ne();
168
- }(t2, d2), n2 = t2.parentUuid, d2.parentUuid = n2, l2.parent ? (l2.parent.loaded = false, l2.parent.expand()) : (Q.value = null, Y.value = T(W.value))) : "before" === a2 ? (!function(e4, l3) {
169
- const a3 = e4.parentUuid;
170
- let u3 = e4.displayOrder;
171
- null == u3 && (u3 = 0);
172
- l3.displayOrder = u3, e4.displayOrder = u3 + 1;
173
- let t3 = W.value.filter((l4) => l4.parentUuid === a3 && l4.uuid !== e4.uuid && l4.displayOrder > u3);
174
- t3 && t3.length > 0 && (t3 = t3.sort((e5, l4) => e5.displayOrder - l4.displayOrder), t3.forEach((e5) => {
175
- e5.displayOrder = e5.displayOrder + 1;
176
- }));
177
- ne();
178
- }(t2, d2), n2 = t2.parentUuid, d2.parentUuid = n2, l2.parent ? (l2.parent.loaded = false, l2.parent.expand()) : (Q.value = null, Y.value = T(W.value))) : "inner" !== a2 || t2.columnUuid || (!function(e4, l3) {
179
- let a3;
180
- e4 && (a3 = e4.uuid);
181
- C(a3, l3, W.value), ne();
182
- }(t2, d2), n2 = t2.uuid, d2.parentUuid = n2, l2.loaded = false, l2.expand()), Q.value && !t2.columnUuid) {
159
+ if ("after" === a2)
160
+ !function(e4, l3) {
161
+ const a3 = e4.parentUuid;
162
+ let u3 = e4.displayOrder;
163
+ null == u3 && (u3 = 0);
164
+ let t3 = W.value.filter((l4) => l4.parentUuid === a3 && l4.uuid !== e4.uuid && l4.displayOrder > u3);
165
+ t3 && t3.length > 0 ? (t3 = t3.sort((e5, l4) => e5.displayOrder - l4.displayOrder), l3.displayOrder = t3[0].displayOrder + 1, t3.forEach((e5) => {
166
+ e5.displayOrder = e5.displayOrder + 1;
167
+ })) : l3.displayOrder = u3 + 1;
168
+ ne();
169
+ }(t2, d2), n2 = t2.parentUuid, d2.parentUuid = n2, l2.parent ? (l2.parent.loaded = false, l2.parent.expand()) : (Q.value = null, Y.value = T(W.value));
170
+ else if ("before" === a2)
171
+ !function(e4, l3) {
172
+ const a3 = e4.parentUuid;
173
+ let u3 = e4.displayOrder;
174
+ null == u3 && (u3 = 0);
175
+ l3.displayOrder = u3, e4.displayOrder = u3 + 1;
176
+ let t3 = W.value.filter((l4) => l4.parentUuid === a3 && l4.uuid !== e4.uuid && l4.displayOrder > u3);
177
+ t3 && t3.length > 0 && (t3 = t3.sort((e5, l4) => e5.displayOrder - l4.displayOrder), t3.forEach((e5) => {
178
+ e5.displayOrder = e5.displayOrder + 1;
179
+ }));
180
+ ne();
181
+ }(t2, d2), n2 = t2.parentUuid, d2.parentUuid = n2, l2.parent ? (l2.parent.loaded = false, l2.parent.expand()) : (Q.value = null, Y.value = T(W.value));
182
+ else if ("inner" === a2 && !t2.columnUuid) {
183
+ !function(e5, l3) {
184
+ let a3;
185
+ e5 && (a3 = e5.uuid);
186
+ C(a3, l3, W.value), ne();
187
+ }(t2, d2), n2 = t2.uuid, d2.parentUuid = n2;
188
+ const e4 = me(n2);
189
+ e4.isLeaf = H(e4, W.value), l2.loaded = false, l2.expand();
190
+ }
191
+ if (Q.value && !t2.columnUuid) {
183
192
  const e4 = Q.value.parent;
184
193
  e4 && (e4.loaded = false, e4.expand());
185
194
  }
@@ -20,9 +20,7 @@ const h = e({ __name: "depttree-design", props: { pageDesign: {}, configure: {}
20
20
  for (let e4 of r2)
21
21
  if (e4.source && e4.target) {
22
22
  let t3 = e4.target;
23
- t3.startsWith("${") && (t3 = t3.substring(2, t3.length - 1));
24
- const l3 = t3.split(".");
25
- i2.push({ type: e4.source, model: l3[l3.length - 1] });
23
+ i2.push({ type: e4.source, model: t3 });
26
24
  }
27
25
  l2.autoSetFields = i2, Object.assign(k.value, l2);
28
26
  }(), h2.configure.runtime.props = k.value, h2.configure.runtime.titleExceedStyle = C.value;