@ued_fpi/data-visual 1.4.13 → 1.4.15
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.
|
@@ -28,18 +28,25 @@ const __default__ = {
|
|
|
28
28
|
};
|
|
29
29
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
30
30
|
...__default__,
|
|
31
|
+
props: {
|
|
32
|
+
riskLevelList: {
|
|
33
|
+
type: Array,
|
|
34
|
+
default() {
|
|
35
|
+
return [
|
|
36
|
+
{ title: "重大风险", key: "majorRiskCompany" },
|
|
37
|
+
{ title: "较大风险", key: "largerRiskCompany" },
|
|
38
|
+
{ title: "一般风险", key: "generalRiskCompany" },
|
|
39
|
+
{ title: "低风险", key: "lowRiskCompany" }
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
31
44
|
setup(__props) {
|
|
45
|
+
const props = __props;
|
|
32
46
|
const { isDark } = utils.useThemeHook();
|
|
33
|
-
const colors = ["#F84439", "#
|
|
34
|
-
const colors_light = ["#
|
|
35
|
-
const
|
|
36
|
-
const LinearGradientColor_light = [["#FF4A4A", "#FF7474"], ["#FDBD00", "#F4A93B"], ["#15F3A3", "#11D68F"], ["#1677FF", "#85B8FF"]];
|
|
37
|
-
const riskLevel = vue.ref([
|
|
38
|
-
{ title: "高风险", key: "majorRiskCompany" },
|
|
39
|
-
{ title: "较大风险", key: "largerRiskCompany" },
|
|
40
|
-
{ title: "一般风险", key: "generalRiskCompany" },
|
|
41
|
-
{ title: "低风险", key: "lowRiskCompany" }
|
|
42
|
-
]);
|
|
47
|
+
const colors = ["#F84439", "#FD7A00", "#FDBD00", "#00DEFF"];
|
|
48
|
+
const colors_light = ["#F84439", "#FD7A00", "#FDBD00", "#00DEFF"];
|
|
49
|
+
const riskLevel = vue.computed(() => props.riskLevelList);
|
|
43
50
|
const levelData = vue.ref({
|
|
44
51
|
majorRiskCompany: 0,
|
|
45
52
|
largerRiskCompany: 0,
|
|
@@ -101,7 +108,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
101
108
|
});
|
|
102
109
|
});
|
|
103
110
|
}
|
|
104
|
-
const color = isDark ?
|
|
111
|
+
const color = isDark ? colors : colors_light;
|
|
105
112
|
highcharts.chart("pieChart", {
|
|
106
113
|
chart: {
|
|
107
114
|
type: "pie",
|
|
@@ -123,12 +130,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
123
130
|
title: {
|
|
124
131
|
text: null
|
|
125
132
|
},
|
|
126
|
-
colors:
|
|
127
|
-
{ linearGradient: { x1: 0, y1: 1, x2: 1, y2: 0 }, stops: [[0, color[0][0]], [1, color[0][1]]] },
|
|
128
|
-
{ linearGradient: { x1: 0, y1: 1, x2: 1, y2: 0 }, stops: [[0, color[1][0]], [1, color[1][1]]] },
|
|
129
|
-
{ linearGradient: { x1: 0, y1: 1, x2: 1, y2: 0 }, stops: [[0, color[2][0]], [1, color[2][1]]] },
|
|
130
|
-
{ linearGradient: { x1: 0, y1: 1, x2: 1, y2: 0 }, stops: [[0, color[3][0]], [1, color[3][1]]] }
|
|
131
|
-
],
|
|
133
|
+
colors: color,
|
|
132
134
|
tooltip: { enabled: false },
|
|
133
135
|
plotOptions: {
|
|
134
136
|
pie: {
|
|
@@ -161,7 +163,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
161
163
|
vue.createElementVNode("div", _hoisted_2, [
|
|
162
164
|
_hoisted_3,
|
|
163
165
|
vue.createElementVNode("div", _hoisted_4, [
|
|
164
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(riskLevel
|
|
166
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(riskLevel), (level, idx) => {
|
|
165
167
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
166
168
|
key: level.key,
|
|
167
169
|
class: "legend-item"
|