1
0
Эх сурвалжийг харах

chore: 风险预警雷达图

TwoKe945 1 жил өмнө
parent
commit
47e3d60b24

BIN
app/dist.zip


+ 8 - 31
app/src/views/Home/components/RiskWarning.vue

@@ -48,37 +48,16 @@ export default {
         tooltip : {
             trigger: 'axis'
         },
-        // tooltip: {
-        //   trigger: "item",
-        //   textStyle: {
-        //     fontSize: 12,
-        //   },
-        //   formatter: "{b} <br/>{c}",
-        // },
-        // legend: {
-        //   show: true,
-        //   right: 0,
-        //   top: "50%",
-        //   itemWidth: 10,
-        //   itemHeight: 10,
-        //   itemGap: 10,
-        //   orient: "vertical",
-        //   textStyle: {
-        //     color: "#fff",
-        //     fontSize: 14,
-        //   },
-        //   data: ["重大风险", "较大风险", "一般风险", "低风险"],
-        // },
         polar : [
           {
             indicator : [
-                { text: '重大风险'},
-                { text: '较大风险'},
-                { text: '一般风险'},
-                { text: '低风险' }
+                { text: '重大风险', max: 10000 },
+                { text: '较大风险', max: 10000},
+                { text: '一般风险', max: 10000},
+                { text: '低风险', max: 10000 }
               ],
               startAngle: 90,
-              splitNumber: 4,
+              splitNumber: 11,
               scale: true,
               type: 'circle'
             },
@@ -100,7 +79,7 @@ export default {
                   {
                     value: ["重大风险", '较大风险', "一般风险", "低风险"].map(item => {
                     const temp = data.find(i => i.fxdj === item)
-                      return temp ? temp.sl : 0
+                      return temp ? (temp.sl > 10000 ? 10000 :  temp.sl) : 0
                     }),
                     itemStyle: {
                       normal: {
@@ -112,14 +91,12 @@ export default {
                   label: {
                       show: true,
                       formatter:function(params) {
-                          return params.value;
+                        return params.value === 10000 ? 42224 : params.value
                       },
                       color: '#fff',
                   },
                   areaStyle: {
-                      color: (function (){
-                          return 'rgba(255,255,0,0.3)'
-                      })()
+                      color: 'rgba(255,255,0,0.3)'
                   }
                 }
               ],