super-page-designer 2.0.9 → 2.0.17

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.
Files changed (90) hide show
  1. package/dist/es/components/design/utils/assemblys-config.js +85 -55
  2. package/dist/es/components/design/utils/chart-design-util.js +203 -160
  3. package/dist/es/components/design/utils/form-design-util.d.ts +5 -4
  4. package/dist/es/components/design/utils/form-design-util.js +55 -153
  5. package/dist/es/components/design/utils/interfaces/page-design-types.d.ts +0 -1
  6. package/dist/es/components/design/utils/page-design-util.d.ts +2 -1
  7. package/dist/es/components/design/utils/page-design-util.js +8 -2
  8. package/dist/es/components/design/utils/page-service-util.d.ts +15 -0
  9. package/dist/es/components/design/utils/page-service-util.js +5 -0
  10. package/dist/es/components/design/views/assemblys/button/button/button-attr-base.vue.js +19 -2
  11. package/dist/es/components/design/views/assemblys/button/button/button-attr-event.vue.js +6 -3
  12. package/dist/es/components/design/views/assemblys/chart/column-line/column-line-attr-base.vue.js +6 -3
  13. package/dist/es/components/design/views/assemblys/chart/column-line/column-line-attr-style.vue.js +1 -1
  14. package/dist/es/components/design/views/assemblys/chart/column-line/column-line-design.vue2.js +7 -3
  15. package/dist/es/components/design/views/assemblys/chart/column-line/series/column-line-series-attr-base.vue.js +3 -1
  16. package/dist/es/components/design/views/assemblys/chart/column-line/series/column-line-series-attr-style.vue.js +4 -1
  17. package/dist/es/components/design/views/assemblys/chart/common/common-attr-data.vue.js +68 -3
  18. package/dist/es/components/design/views/assemblys/chart/common/common-attr-groupby.vue.js +94 -16
  19. package/dist/es/components/design/views/assemblys/chart/common/common-attr-serieslist.vue.js +12 -6
  20. package/dist/es/components/design/views/assemblys/chart/common/common-attr-sortby.vue.js +30 -13
  21. package/dist/es/components/design/views/assemblys/chart/common-series/common-attr-dataset-columnline.vue.js +21 -3
  22. package/dist/es/components/design/views/assemblys/chart/common-series/common-attr-dynamic.vue.js +12 -66
  23. package/dist/es/components/design/views/assemblys/chart/gauge/gauge-attr-base.vue.js +20 -12
  24. package/dist/es/components/design/views/assemblys/chart/gauge/gauge-attr-data.vue.js +318 -0
  25. package/dist/es/components/design/views/assemblys/chart/gauge/gauge-attr-data.vue2.js +4 -0
  26. package/dist/es/components/design/views/assemblys/chart/gauge/gauge-attr-style.vue.js +5 -2
  27. package/dist/es/components/design/views/assemblys/chart/gauge/gauge-design.vue2.js +34 -15
  28. package/dist/es/components/design/views/assemblys/chart/gauge/series/gauge-series-attr-base.vue.js +4 -19
  29. package/dist/es/components/design/views/assemblys/chart/gauge/series/gauge-series-attr-style.vue.js +5 -2
  30. package/dist/es/components/design/views/assemblys/chart/pie/pie-attr-base.vue.js +18 -5
  31. package/dist/es/components/design/views/assemblys/chart/pie/pie-attr-style.vue.js +5 -2
  32. package/dist/es/components/design/views/assemblys/chart/pie/pie-design.vue2.js +34 -16
  33. package/dist/es/components/design/views/assemblys/chart/pie/series/pie-series-attr-base.vue.js +4 -22
  34. package/dist/es/components/design/views/assemblys/chart/pie/series/pie-series-attr-style.vue.js +4 -1
  35. package/dist/es/components/design/views/assemblys/chart/radar/radar-attr-base.vue.js +23 -9
  36. package/dist/es/components/design/views/assemblys/chart/radar/radar-attr-data.vue.js +318 -0
  37. package/dist/es/components/design/views/assemblys/chart/radar/radar-attr-data.vue2.js +4 -0
  38. package/dist/es/components/design/views/assemblys/chart/radar/radar-attr-style.vue.js +25 -12
  39. package/dist/es/components/design/views/assemblys/chart/radar/radar-design.vue2.js +37 -13
  40. package/dist/es/components/design/views/assemblys/chart/radar/series/series-attr-base.vue.js +4 -17
  41. package/dist/es/components/design/views/assemblys/chart/radar/series/series-attr-dataset.vue.js +82 -256
  42. package/dist/es/components/design/views/assemblys/chart/radar/series/series-attr-style.vue.js +12 -17
  43. package/dist/es/components/design/views/assemblys/chart/scatter/scatter-attr-base.vue.js +23 -13
  44. package/dist/es/components/design/views/assemblys/chart/scatter/scatter-attr-data.vue.js +205 -0
  45. package/dist/es/components/design/views/assemblys/chart/scatter/scatter-attr-data.vue2.js +4 -0
  46. package/dist/es/components/design/views/assemblys/chart/scatter/scatter-attr-style.vue.js +5 -7
  47. package/dist/es/components/design/views/assemblys/chart/scatter/scatter-design.vue2.js +35 -12
  48. package/dist/es/components/design/views/assemblys/chart/scatter/series/scatter-series-attr-base.vue.js +6 -77
  49. package/dist/es/components/design/views/assemblys/chart/scatter/series/scatter-series-attr-style.vue.js +4 -1
  50. package/dist/es/components/design/views/assemblys/chart/scatter/series/scatter-series-data.vue.js +191 -0
  51. package/dist/es/components/design/views/assemblys/chart/scatter/series/scatter-series-data.vue2.js +4 -0
  52. package/dist/es/components/design/views/assemblys/container/tabs/tabs-attr-event.vue.js +30 -0
  53. package/dist/es/components/design/views/assemblys/container/tabs/tabs-attr-event.vue2.js +4 -0
  54. package/dist/es/components/design/views/assemblys/container/tabs/tabs-attr.vue2.js +2 -1
  55. package/dist/es/components/design/views/assemblys/form/common/parameter-table.vue.js +186 -0
  56. package/dist/es/components/design/views/assemblys/form/common/parameter-table.vue2.js +4 -0
  57. package/dist/es/components/design/views/assemblys/form/common/suffixmodule.vue.js +28 -4
  58. package/dist/es/components/design/views/assemblys/form/custom/custom-attr-base.vue.js +11 -169
  59. package/dist/es/components/design/views/assemblys/form/custom/custom-design.vue.js +1 -1
  60. package/dist/es/components/design/views/assemblys/form/custom/custom-design.vue2.js +3 -12
  61. package/dist/es/components/design/views/assemblys/form/input-text/inputtext-attr-base.vue.js +33 -10
  62. package/dist/es/components/design/views/assemblys/form/input-text/inputtext-attr.vue2.js +10 -1
  63. package/dist/es/components/design/views/assemblys/form/link/link-attr-base.vue.js +15 -3
  64. package/dist/es/components/design/views/assemblys/object-design.vue.js +52 -77
  65. package/dist/es/components/design/views/assemblys/page/component/setting-form-rule-base-input.vue.d.ts +2 -2
  66. package/dist/es/components/design/views/design/page-design.vue.d.ts +13 -1
  67. package/dist/es/components/design/views/design/page-design.vue.js +218 -100
  68. package/dist/es/components/design/views/design/page-event/page-event-content.vue.js +1 -1
  69. package/dist/es/components/design/views/design/page-event/page-event-content.vue2.js +19 -9
  70. package/dist/es/components/design/views/design/view/page-switch.vue.d.ts +18 -0
  71. package/dist/es/components/design/views/design/view/page-switch.vue.js +7 -0
  72. package/dist/es/components/design/views/design/view/page-switch.vue2.js +185 -0
  73. package/dist/es/components/design/views/design/view/page-switch.vue3.js +1 -0
  74. package/dist/es/components/design/views/design/view/view-design-display.vue.js +1 -1
  75. package/dist/es/components/design/views/design/view/view-design-preview.vue.js +2 -2
  76. package/dist/es/components/design/views/design/view/view-design.vue.js +7 -9
  77. package/dist/es/style.css +350 -133
  78. package/package.json +7 -6
  79. package/dist/es/components/design/views/assemblys/chart/common/common-attr-drill.vue.js +0 -108
  80. package/dist/es/components/design/views/assemblys/chart/common/common-attr-drill.vue2.js +0 -4
  81. package/dist/es/components/design/views/assemblys/chart/common-series/common-attr-dataset.vue.js +0 -166
  82. package/dist/es/components/design/views/assemblys/chart/common-series/common-attr-dataset.vue2.js +0 -4
  83. package/dist/es/components/design/views/assemblys/chart/gauge/series/gauge-series-attr-dataset.vue.js +0 -153
  84. package/dist/es/components/design/views/assemblys/chart/gauge/series/gauge-series-attr-dataset.vue2.js +0 -4
  85. package/dist/es/components/design/views/assemblys/chart/radar/series/attrs/attr-testdatas.vue.js +0 -58
  86. package/dist/es/components/design/views/assemblys/chart/radar/series/attrs/attr-testdatas.vue2.js +0 -4
  87. package/dist/es/components/design/views/assemblys/form/common/linkpage-params-in.vue.js +0 -154
  88. package/dist/es/components/design/views/assemblys/form/common/linkpage-params-in.vue2.js +0 -4
  89. package/dist/es/components/design/views/assemblys/form/common/title.vue.js +0 -45
  90. package/dist/es/components/design/views/assemblys/form/common/title.vue2.js +0 -4
@@ -1,8 +1,10 @@
1
- import { defineComponent, ref, watch, openBlock, createElementBlock, normalizeStyle, normalizeClass, withModifiers, createVNode, unref, withDirectives, createElementVNode, Fragment, renderList, toDisplayString, vShow } from "vue";
1
+ import { defineComponent, ref, watch, onUnmounted, openBlock, createElementBlock, normalizeStyle, normalizeClass, withModifiers, withDirectives, createVNode, vShow, unref, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
2
2
  import { caculateComponentStyle } from "../../../../utils/container-design-util.js";
3
- import { generateChartOption } from "../../../../utils/chart-design-util.js";
3
+ import { getUuidv4 } from "../../../../utils/common-util.js";
4
+ import { removComponentDataConfig, generateChartHeader, generateChartOption, initComponentDataConfig } from "../../../../utils/chart-design-util.js";
4
5
  import { getCustomTheme } from "super-page-runtime";
5
- import _sfc_main$1 from "./series/pie-series-attr.vue.js";
6
+ import _sfc_main$2 from "./series/pie-series-attr.vue.js";
7
+ import _sfc_main$1 from "../common/common-chart-header.vue.js";
6
8
  import { use } from "echarts/core";
7
9
  import { CanvasRenderer } from "echarts/renderers";
8
10
  import { PieChart } from "echarts/charts";
@@ -13,15 +15,10 @@ const _hoisted_2 = ["onClick"];
13
15
  const _sfc_main = /* @__PURE__ */ defineComponent({
14
16
  __name: "pie-design",
15
17
  props: {
16
- configure: {
17
- type: Object,
18
- required: true
19
- },
20
- indexObj: Object,
21
- selectWidget: {
22
- type: Object,
23
- default: -1
24
- }
18
+ pageDesign: {},
19
+ configure: {},
20
+ indexObj: {},
21
+ selectWidget: {}
25
22
  },
26
23
  emits: ["onSelectWidget", "onCustomAttrWidget"],
27
24
  setup(__props, { emit: __emit }) {
@@ -35,9 +32,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35
32
  }
36
33
  if (props.configure.items.length == 0) {
37
34
  props.configure.items.push({
35
+ uuid: getUuidv4(),
36
+ name: "",
38
37
  index: 1,
39
38
  type: "pie",
40
- label: "饼图1",
39
+ label: "系列",
41
40
  props: {
42
41
  title: "系列1"
43
42
  },
@@ -51,6 +50,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
51
50
  const designClass = ref("");
52
51
  const customTheme = ref(null);
53
52
  const chartOption = ref({});
53
+ const headerInfo = ref({});
54
54
  watch(
55
55
  props.configure.style,
56
56
  () => {
@@ -59,21 +59,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
59
  },
60
60
  { immediate: true }
61
61
  );
62
+ function updateDataConfig() {
63
+ const dataConfig = initComponentDataConfig(props.configure, headerInfo.value);
64
+ props.configure.runtime.dataConfig = dataConfig;
65
+ }
62
66
  watch(props.configure.props, () => {
63
67
  customChartOption();
68
+ updateDataConfig();
64
69
  });
65
70
  watch(props.configure.items, () => {
66
71
  customChartOption();
67
72
  });
73
+ setTimeout(() => {
74
+ updateDataConfig();
75
+ }, 100);
76
+ onUnmounted(() => {
77
+ removComponentDataConfig(props.configure);
78
+ });
68
79
  function customCaculateStyle() {
69
80
  caculateComponentStyle(props.configure, designStyle, designClass, null);
70
81
  props.configure.runtime.style = designStyle.value;
71
82
  props.configure.runtime.class = designClass.value;
83
+ headerInfo.value = generateChartHeader(props.configure);
84
+ props.configure.runtime.headerInfo = headerInfo.value;
72
85
  }
73
86
  function customChartOption() {
74
87
  generateChartOption(props.configure, chartOption);
88
+ headerInfo.value = generateChartHeader(props.configure);
75
89
  customTheme.value = getCustomTheme(props.configure.props.customTheme);
76
90
  props.configure.runtime.chartOption = chartOption.value;
91
+ props.configure.runtime.headerInfo = headerInfo.value;
77
92
  }
78
93
  if (props.selectWidget) {
79
94
  watch(props.selectWidget, () => {
@@ -107,7 +122,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
107
122
  }
108
123
  }
109
124
  selItem.selected = true;
110
- $emits("onCustomAttrWidget", selItem, _sfc_main$1);
125
+ $emits("onCustomAttrWidget", selItem, _sfc_main$2);
111
126
  }
112
127
  const $emits = __emit;
113
128
  return (_ctx, _cache) => {
@@ -117,6 +132,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
117
132
  onClick: withModifiers(selectParent, ["stop"]),
118
133
  ref: "thisRef"
119
134
  }, [
135
+ withDirectives(createVNode(_sfc_main$1, { headerInfo: headerInfo.value }, null, 8, ["headerInfo"]), [
136
+ [vShow, headerInfo.value.showHeader]
137
+ ]),
120
138
  createVNode(unref(VChart), {
121
139
  ref: "chartRef",
122
140
  theme: customTheme.value,
@@ -124,14 +142,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
124
142
  autoresize: ""
125
143
  }, null, 8, ["theme", "option"]),
126
144
  withDirectives(createElementVNode("div", _hoisted_1, [
127
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.configure.items, (item, itemIndex) => {
145
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.configure.items, (item, itemIndex) => {
128
146
  return openBlock(), createElementBlock("label", {
129
147
  class: normalizeClass([[item.selected ? "amb-design-chart-series-selected" : ""], "amb-design-chart-series"]),
130
148
  onClick: withModifiers(($event) => selectSeries($event, itemIndex), ["stop"])
131
149
  }, toDisplayString(item.props.title), 11, _hoisted_2);
132
150
  }), 256))
133
151
  ], 512), [
134
- [vShow, __props.configure.componentIndex == __props.selectWidget.value]
152
+ [vShow, _ctx.configure.componentIndex == _ctx.selectWidget.value]
135
153
  ])
136
154
  ], 6);
137
155
  };
@@ -1,8 +1,5 @@
1
1
  import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode } from "vue";
2
- import "../../../../../../../stores/page-store.js";
3
- import _sfc_main$1 from "../../common-series/common-attr-dataset.vue.js";
4
- import _sfc_main$2 from "../../common-series/common-attr-dynamic.vue.js";
5
- import _sfc_main$3 from "../../common-series/common-attr-testdatas.vue.js";
2
+ import _sfc_main$1 from "../../common-series/common-attr-testdatas.vue.js";
6
3
  const _hoisted_1 = { style: { "padding": "8px 0px 0px 0px" } };
7
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
5
  __name: "pie-series-attr-base",
@@ -27,7 +24,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
24
  default: withCtx(() => [
28
25
  createVNode(_component_el_collapse, {
29
26
  modelValue: openCollapseItems.value,
30
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => openCollapseItems.value = $event),
27
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => openCollapseItems.value = $event),
31
28
  style: { "margin-top": "6px" }
32
29
  }, {
33
30
  default: withCtx(() => [
@@ -40,7 +37,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
37
  createElementVNode("div", _hoisted_1, [
41
38
  createVNode(_component_el_form_item, {
42
39
  label: "系列名称",
43
- style: { "margin-top": "4px" }
40
+ style: { "margin-top": "4px", "margin-bottom": "-15px" }
44
41
  }, {
45
42
  default: withCtx(() => [
46
43
  createVNode(_component_el_input, {
@@ -50,27 +47,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
47
  }, null, 8, ["modelValue"])
51
48
  ]),
52
49
  _: 1
53
- }),
54
- createVNode(_component_el_form_item, {
55
- label: "副标题",
56
- style: { "margin-top": "-10px", "margin-bottom": "-15px" }
57
- }, {
58
- default: withCtx(() => [
59
- createVNode(_component_el_input, {
60
- modelValue: __props.configure.props.subTitle,
61
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => __props.configure.props.subTitle = $event),
62
- placeholder: "请输入"
63
- }, null, 8, ["modelValue"])
64
- ]),
65
- _: 1
66
50
  })
67
51
  ])
68
52
  ]),
69
53
  _: 1
70
54
  }),
71
- createVNode(_sfc_main$1, { configure: __props.configure }, null, 8, ["configure"]),
72
- createVNode(_sfc_main$2, { configure: __props.configure }, null, 8, ["configure"]),
73
- createVNode(_sfc_main$3, { configure: __props.configure }, null, 8, ["configure"])
55
+ createVNode(_sfc_main$1, { configure: __props.configure }, null, 8, ["configure"])
74
56
  ]),
75
57
  _: 1
76
58
  }, 8, ["modelValue"])
@@ -16,7 +16,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  return (_ctx, _cache) => {
17
17
  const _component_el_collapse = resolveComponent("el-collapse");
18
18
  const _component_el_form = resolveComponent("el-form");
19
- return openBlock(), createBlock(_component_el_form, { "label-width": "80px" }, {
19
+ return openBlock(), createBlock(_component_el_form, {
20
+ "label-width": "80px",
21
+ size: "small"
22
+ }, {
20
23
  default: withCtx(() => [
21
24
  createVNode(_component_el_collapse, {
22
25
  modelValue: openCollapseItems.value,
@@ -1,8 +1,10 @@
1
1
  import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode } from "vue";
2
2
  import _sfc_main$1 from "../common/common-attr-base.vue.js";
3
- import _sfc_main$2 from "../common/common-attr-serieslist.vue.js";
4
- import _sfc_main$3 from "../common/common-attr-assistant.vue.js";
5
- import _sfc_main$4 from "../../common/common-attr-size.vue.js";
3
+ import _sfc_main$2 from "./radar-attr-data.vue.js";
4
+ import _sfc_main$3 from "../common/common-attr-serieslist.vue.js";
5
+ import _sfc_main$5 from "../common/common-attr-assistant.vue.js";
6
+ import _sfc_main$6 from "../../common/common-attr-size.vue.js";
7
+ import _sfc_main$4 from "../../form/common/data-linkage.vue.js";
6
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
9
  __name: "radar-attr-base",
8
10
  props: {
@@ -12,9 +14,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
14
  }
13
15
  },
14
16
  setup(__props) {
15
- const openCollapseItems = ref(["propsBase", "seriesList", "propsGroup", "attrSize", "propsSort", "propsDrill", "propsAssistant"]);
17
+ const openCollapseItems = ref([
18
+ "propsBase",
19
+ "dataSet",
20
+ "seriesList",
21
+ "propsGroup",
22
+ "attrSize",
23
+ "propsSort",
24
+ "propsDrill",
25
+ "propsAssistant",
26
+ "linkage"
27
+ ]);
16
28
  return (_ctx, _cache) => {
17
- const _component_commonAttrGroupby = resolveComponent("commonAttrGroupby");
18
29
  const _component_el_collapse = resolveComponent("el-collapse");
19
30
  const _component_el_form = resolveComponent("el-form");
20
31
  return openBlock(), createBlock(_component_el_form, {
@@ -29,13 +40,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
40
  }, {
30
41
  default: withCtx(() => [
31
42
  createVNode(_sfc_main$1, { configure: __props.configure }, null, 8, ["configure"]),
32
- createVNode(_sfc_main$2, {
43
+ createVNode(_sfc_main$2, { configure: __props.configure }, null, 8, ["configure"]),
44
+ createVNode(_sfc_main$3, {
33
45
  configure: __props.configure,
34
- defaultType: "gauge"
46
+ defaultType: "radar"
35
47
  }, null, 8, ["configure"]),
36
- createVNode(_component_commonAttrGroupby, { configure: __props.configure }, null, 8, ["configure"]),
37
- createVNode(_sfc_main$3, { configure: __props.configure }, null, 8, ["configure"]),
38
48
  createVNode(_sfc_main$4, {
49
+ configureProps: __props.configure.props
50
+ }, null, 8, ["configureProps"]),
51
+ createVNode(_sfc_main$5, { configure: __props.configure }, null, 8, ["configure"]),
52
+ createVNode(_sfc_main$6, {
39
53
  size: __props.configure.props.size
40
54
  }, null, 8, ["size"])
41
55
  ]),
@@ -0,0 +1,318 @@
1
+ import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, unref, createElementBlock, Fragment, renderList, toDisplayString, createTextVNode } from "vue";
2
+ import _sfc_main$1 from "../../common/page-permission-select.vue.js";
3
+ import { usePageContextStore } from "../../../../../../stores/page-store.js";
4
+ import { queryServiceReturnFields } from "../../../../utils/page-service-util.js";
5
+ const _hoisted_1 = { style: { "padding": "8px 0px 0px 0px" } };
6
+ const _hoisted_2 = { style: { "float": "left" } };
7
+ const _hoisted_3 = { style: { "float": "right", "color": "var(--el-text-color-secondary)", "font-size": "13px" } };
8
+ const _hoisted_4 = { style: { "float": "left" } };
9
+ const _hoisted_5 = { style: { "float": "right", "color": "var(--el-text-color-secondary)", "font-size": "13px" } };
10
+ const _hoisted_6 = { style: { "float": "left" } };
11
+ const _hoisted_7 = { style: { "float": "right", "color": "var(--el-text-color-secondary)", "font-size": "13px" } };
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ __name: "radar-attr-data",
14
+ props: {
15
+ configure: {
16
+ type: Object,
17
+ required: true
18
+ },
19
+ defaultType: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ chartType: {
24
+ type: String,
25
+ default: ""
26
+ }
27
+ },
28
+ setup(__props) {
29
+ const props = __props;
30
+ const pageContextUtil = usePageContextStore();
31
+ const pageDesign = pageContextUtil.pageContext;
32
+ const serviceFields = ref([]);
33
+ const showFields = computed(() => {
34
+ return serviceFields.value.filter((item) => {
35
+ return item.type == "array" || item.type == "any" || !item.type;
36
+ });
37
+ });
38
+ const nameFields = computed(() => {
39
+ return serviceFields.value.filter((item) => {
40
+ if (item.type == "string" || item.type == "any" || !item.type) {
41
+ const prevField = props.configure.serviceDataField;
42
+ if (!prevField || item.value.startsWith(prevField + ".")) {
43
+ let nameValue = item.value;
44
+ let nameLabel = item.label;
45
+ if (prevField) {
46
+ nameValue = nameValue.substring(prevField.length + 1);
47
+ if (nameLabel) {
48
+ nameLabel = nameLabel.replace(prevField + ".", "");
49
+ }
50
+ }
51
+ item.nameValue = nameValue;
52
+ item.nameLabel = nameLabel;
53
+ return true;
54
+ }
55
+ }
56
+ return false;
57
+ });
58
+ });
59
+ const maxValueFields = computed(() => {
60
+ return serviceFields.value.filter((item) => {
61
+ if (item.type == "number" || item.type == "any" || !item.type) {
62
+ const prevField = props.configure.serviceDataField;
63
+ if (!prevField || item.value.startsWith(prevField + ".")) {
64
+ let numValue = item.value;
65
+ let numLabel = item.label;
66
+ if (prevField) {
67
+ numValue = numValue.substring(prevField.length + 1);
68
+ if (numLabel) {
69
+ numLabel = numLabel.replace(prevField + ".", "");
70
+ }
71
+ }
72
+ item.numValue = numValue;
73
+ item.numLabel = numLabel;
74
+ return true;
75
+ }
76
+ }
77
+ return false;
78
+ });
79
+ });
80
+ if (!props.configure.props.dataOrigin) {
81
+ props.configure.props.dataOrigin = {};
82
+ }
83
+ const dataOriginInfo = props.configure.props.dataOrigin;
84
+ if (!dataOriginInfo.service) {
85
+ dataOriginInfo.service = {};
86
+ }
87
+ function afterSelectService(type, code, name, serviceId) {
88
+ dataOriginInfo.service.simpleCode = code;
89
+ dataOriginInfo.service.id = serviceId;
90
+ dataOriginInfo.service.name = name;
91
+ getServiceReturnFields();
92
+ }
93
+ let hisQueryId = null;
94
+ function getServiceReturnFields() {
95
+ const serviceId = dataOriginInfo.service.id;
96
+ if (hisQueryId == serviceId) {
97
+ return;
98
+ }
99
+ hisQueryId = serviceId;
100
+ if (!serviceId) {
101
+ props.configure.serviceFields = [];
102
+ serviceFields.value = [];
103
+ props.configure.serviceDataField = null;
104
+ return;
105
+ }
106
+ queryServiceReturnFields(serviceId).then((fields) => {
107
+ props.configure.serviceFields = fields;
108
+ serviceFields.value = fields;
109
+ checkDataFieldExist();
110
+ });
111
+ }
112
+ function checkDataFieldExist() {
113
+ if (!props.configure.serviceDataField) {
114
+ return;
115
+ }
116
+ let isExist = false;
117
+ if (serviceFields.value) {
118
+ for (let o of serviceFields.value) {
119
+ if (o.value == props.configure.serviceDataField) {
120
+ isExist = true;
121
+ break;
122
+ }
123
+ }
124
+ }
125
+ if (!isExist) {
126
+ props.configure.serviceDataField = null;
127
+ }
128
+ }
129
+ setTimeout(() => {
130
+ getServiceReturnFields();
131
+ }, 10);
132
+ return (_ctx, _cache) => {
133
+ const _component_el_form_item = resolveComponent("el-form-item");
134
+ const _component_el_option = resolveComponent("el-option");
135
+ const _component_el_select = resolveComponent("el-select");
136
+ const _component_el_text = resolveComponent("el-text");
137
+ const _component_el_radio = resolveComponent("el-radio");
138
+ const _component_el_input_number = resolveComponent("el-input-number");
139
+ const _component_el_radio_group = resolveComponent("el-radio-group");
140
+ const _component_el_collapse_item = resolveComponent("el-collapse-item");
141
+ return openBlock(), createBlock(_component_el_collapse_item, {
142
+ title: "数据设置",
143
+ name: "dataSet",
144
+ class: "amb-design-attr-group-header"
145
+ }, {
146
+ default: withCtx(() => [
147
+ createElementVNode("div", _hoisted_1, [
148
+ createVNode(_component_el_form_item, {
149
+ label: "选择服务",
150
+ style: { "margin-top": "4px" }
151
+ }, {
152
+ default: withCtx(() => [
153
+ createVNode(_sfc_main$1, {
154
+ pageDesign: unref(pageDesign),
155
+ rowObj: unref(dataOriginInfo).service,
156
+ onlyService: "",
157
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = (type, code, name, serviceId) => afterSelectService(type, code, name, serviceId))
158
+ }, null, 8, ["pageDesign", "rowObj"])
159
+ ]),
160
+ _: 1
161
+ }),
162
+ createVNode(_component_el_form_item, {
163
+ label: "数据集",
164
+ style: { "margin-top": "-10px", "margin-bottom": "-15px" }
165
+ }, {
166
+ default: withCtx(() => [
167
+ createVNode(_component_el_select, {
168
+ modelValue: __props.configure.serviceDataField,
169
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => __props.configure.serviceDataField = $event),
170
+ filterable: "",
171
+ clearable: "",
172
+ placeholder: "请选择"
173
+ }, {
174
+ default: withCtx(() => [
175
+ (openBlock(true), createElementBlock(Fragment, null, renderList(showFields.value, (field, index) => {
176
+ return openBlock(), createBlock(_component_el_option, {
177
+ key: index,
178
+ label: field.label,
179
+ value: field.value
180
+ }, {
181
+ default: withCtx(() => [
182
+ createElementVNode("span", _hoisted_2, toDisplayString(field.label), 1),
183
+ createElementVNode("span", _hoisted_3, toDisplayString(field.type), 1)
184
+ ]),
185
+ _: 2
186
+ }, 1032, ["label", "value"]);
187
+ }), 128))
188
+ ]),
189
+ _: 1
190
+ }, 8, ["modelValue"]),
191
+ createVNode(_component_el_text, {
192
+ type: "success",
193
+ size: "small"
194
+ }, {
195
+ default: withCtx(() => [
196
+ createTextVNode("默认为根目录.")
197
+ ]),
198
+ _: 1
199
+ })
200
+ ]),
201
+ _: 1
202
+ }),
203
+ createVNode(_component_el_form_item, {
204
+ label: "配置项字段",
205
+ style: { "margin-top": "15px", "margin-bottom": "-15px" }
206
+ }, {
207
+ default: withCtx(() => [
208
+ createVNode(_component_el_select, {
209
+ size: "small",
210
+ modelValue: __props.configure.props.nameField,
211
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => __props.configure.props.nameField = $event),
212
+ title: __props.configure.props.nameField,
213
+ style: { "width": "160px" },
214
+ filterable: "",
215
+ "allow-create": "",
216
+ clearable: "",
217
+ placeholder: "请选择"
218
+ }, {
219
+ default: withCtx(() => [
220
+ (openBlock(true), createElementBlock(Fragment, null, renderList(nameFields.value, (item) => {
221
+ return openBlock(), createBlock(_component_el_option, {
222
+ key: item.nameValue,
223
+ label: item.nameLabel,
224
+ value: item.nameValue
225
+ }, {
226
+ default: withCtx(() => [
227
+ createElementVNode("span", _hoisted_4, toDisplayString(item.nameLabel), 1),
228
+ createElementVNode("span", _hoisted_5, toDisplayString(item.type), 1)
229
+ ]),
230
+ _: 2
231
+ }, 1032, ["label", "value"]);
232
+ }), 128))
233
+ ]),
234
+ _: 1
235
+ }, 8, ["modelValue", "title"])
236
+ ]),
237
+ _: 1
238
+ }),
239
+ createVNode(_component_el_radio_group, {
240
+ modelValue: __props.configure.props.maxSource,
241
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => __props.configure.props.maxSource = $event)
242
+ }, {
243
+ default: withCtx(() => [
244
+ createVNode(_component_el_form_item, { style: { "margin-top": "25px", "margin-bottom": "-15px" } }, {
245
+ label: withCtx(() => [
246
+ createVNode(_component_el_radio, { value: "variable" }, {
247
+ default: withCtx(() => [
248
+ createTextVNode("最大值")
249
+ ]),
250
+ _: 1
251
+ })
252
+ ]),
253
+ default: withCtx(() => [
254
+ createVNode(_component_el_select, {
255
+ size: "small",
256
+ disabled: __props.configure.props.maxSource == "fixed",
257
+ modelValue: __props.configure.props.maxField,
258
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => __props.configure.props.maxField = $event),
259
+ title: __props.configure.props.maxField,
260
+ style: { "width": "160px" },
261
+ filterable: "",
262
+ "allow-create": "",
263
+ clearable: "",
264
+ placeholder: "请选择"
265
+ }, {
266
+ default: withCtx(() => [
267
+ (openBlock(true), createElementBlock(Fragment, null, renderList(maxValueFields.value, (item) => {
268
+ return openBlock(), createBlock(_component_el_option, {
269
+ key: item.numValue,
270
+ label: item.numLabel,
271
+ value: item.numValue
272
+ }, {
273
+ default: withCtx(() => [
274
+ createElementVNode("span", _hoisted_6, toDisplayString(item.numLabel), 1),
275
+ createElementVNode("span", _hoisted_7, toDisplayString(item.type), 1)
276
+ ]),
277
+ _: 2
278
+ }, 1032, ["label", "value"]);
279
+ }), 128))
280
+ ]),
281
+ _: 1
282
+ }, 8, ["disabled", "modelValue", "title"])
283
+ ]),
284
+ _: 1
285
+ }),
286
+ createVNode(_component_el_form_item, { style: { "margin-top": "25px", "margin-bottom": "-15px" } }, {
287
+ label: withCtx(() => [
288
+ createVNode(_component_el_radio, { value: "fixed" }, {
289
+ default: withCtx(() => [
290
+ createTextVNode("固定值")
291
+ ]),
292
+ _: 1
293
+ })
294
+ ]),
295
+ default: withCtx(() => [
296
+ createVNode(_component_el_input_number, {
297
+ disabled: !__props.configure.props.maxSource || __props.configure.props.maxSource != "fixed",
298
+ modelValue: __props.configure.props.maxFixed,
299
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => __props.configure.props.maxFixed = $event),
300
+ placeholder: "100",
301
+ min: "0"
302
+ }, null, 8, ["disabled", "modelValue"])
303
+ ]),
304
+ _: 1
305
+ })
306
+ ]),
307
+ _: 1
308
+ }, 8, ["modelValue"])
309
+ ])
310
+ ]),
311
+ _: 1
312
+ });
313
+ };
314
+ }
315
+ });
316
+ export {
317
+ _sfc_main as default
318
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./radar-attr-data.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -1,13 +1,18 @@
1
1
  import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, withDirectives, vShow } from "vue";
2
2
  import _sfc_main$1 from "../common/common-style-font-title.vue.js";
3
3
  import _sfc_main$2 from "../common/common-style-font-subtitle.vue.js";
4
- import _sfc_main$3 from "../common/common-style-legend.vue.js";
5
- import _sfc_main$4 from "../common/common-style-grid.vue.js";
6
- import _sfc_main$5 from "../common/common-style-tooltip.vue.js";
7
- import _sfc_main$6 from "../common/common-style-custom.vue.js";
8
- import _sfc_main$7 from "../../common/common-style-margin.vue.js";
9
- import _sfc_main$8 from "../../common/common-style-border.vue.js";
10
- import _sfc_main$9 from "../../common/common-style-shadow.vue.js";
4
+ import _sfc_main$4 from "../common/common-style-legend.vue.js";
5
+ import _sfc_main$a from "../common/common-style-grid.vue.js";
6
+ import _sfc_main$6 from "../common/common-style-tooltip.vue.js";
7
+ import _sfc_main$b from "../common/common-style-custom.vue.js";
8
+ import _sfc_main$5 from "./series/styles/style-axisname.vue.js";
9
+ import _sfc_main$7 from "./series/styles/style-axis.vue.js";
10
+ import _sfc_main$c from "../../common/common-style-margin.vue.js";
11
+ import _sfc_main$d from "../../common/common-style-border.vue.js";
12
+ import _sfc_main$e from "../../common/common-style-shadow.vue.js";
13
+ import _sfc_main$3 from "./series/styles/style-radar.vue.js";
14
+ import _sfc_main$8 from "./series/styles/style-split.vue.js";
15
+ import _sfc_main$9 from "./series/styles/style-splitarea.vue.js";
11
16
  const _sfc_main = /* @__PURE__ */ defineComponent({
12
17
  __name: "radar-attr-style",
13
18
  props: {
@@ -24,11 +29,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
29
  if (props.configure.style.yaxisRight == void 0) {
25
30
  props.configure.style.yaxisRight = {};
26
31
  }
27
- const openCollapseItems = ref(["titleFont"]);
32
+ const openCollapseItems = ref(["titleFont", "subtitleFont", "styleGauge"]);
28
33
  return (_ctx, _cache) => {
29
34
  const _component_el_collapse = resolveComponent("el-collapse");
30
35
  const _component_el_form = resolveComponent("el-form");
31
- return openBlock(), createBlock(_component_el_form, { "label-width": "80px" }, {
36
+ return openBlock(), createBlock(_component_el_form, {
37
+ "label-width": "80px",
38
+ size: "small"
39
+ }, {
32
40
  default: withCtx(() => [
33
41
  createVNode(_component_el_collapse, {
34
42
  modelValue: openCollapseItems.value,
@@ -44,14 +52,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
52
  ]),
45
53
  createVNode(_sfc_main$3, { configure: __props.configure }, null, 8, ["configure"]),
46
54
  createVNode(_sfc_main$4, { configure: __props.configure }, null, 8, ["configure"]),
47
- createVNode(_sfc_main$5, {
55
+ createVNode(_sfc_main$5, { configure: __props.configure }, null, 8, ["configure"]),
56
+ createVNode(_sfc_main$6, {
48
57
  configure: __props.configure,
49
58
  chartType: "radar"
50
59
  }, null, 8, ["configure"]),
51
- createVNode(_sfc_main$6, { configure: __props.configure }, null, 8, ["configure"]),
52
60
  createVNode(_sfc_main$7, { configure: __props.configure }, null, 8, ["configure"]),
53
61
  createVNode(_sfc_main$8, { configure: __props.configure }, null, 8, ["configure"]),
54
- createVNode(_sfc_main$9, { configure: __props.configure }, null, 8, ["configure"])
62
+ createVNode(_sfc_main$9, { configure: __props.configure }, null, 8, ["configure"]),
63
+ createVNode(_sfc_main$a, { configure: __props.configure }, null, 8, ["configure"]),
64
+ createVNode(_sfc_main$b, { configure: __props.configure }, null, 8, ["configure"]),
65
+ createVNode(_sfc_main$c, { configure: __props.configure }, null, 8, ["configure"]),
66
+ createVNode(_sfc_main$d, { configure: __props.configure }, null, 8, ["configure"]),
67
+ createVNode(_sfc_main$e, { configure: __props.configure }, null, 8, ["configure"])
55
68
  ]),
56
69
  _: 1
57
70
  }, 8, ["modelValue"])