Browse Source

数字水利 水利事件分析

wangzhe 2 năm trước cách đây
mục cha
commit
ac197f725f
2 tập tin đã thay đổi với 37 bổ sung34 xóa
  1. 1 1
      src/api/bigdata.js
  2. 36 33
      src/views/bigdata/chart-waterTotal.vue

+ 1 - 1
src/api/bigdata.js

@@ -69,7 +69,7 @@ export function get5() {
 // 水利事件分析
 export function get6() {
   return request({
-    url: '/center-water/VisuForestCloudBigDataController/getEventDeptStatistics',
+    url: '/center-water/VisuForestCloudBigDataController/getEventTypeRadar',
     method: 'post',
   })
 }

+ 36 - 33
src/views/bigdata/chart-waterTotal.vue

@@ -15,7 +15,8 @@
 		data() {
 			return {
 				count: 0,
-        source: [],
+        data_name: [],
+        data_value: [],
 			}
 		},
 		mounted() {
@@ -28,8 +29,8 @@
         get6().then(resp =>{
           console.log("水利事件分析", resp.data)
           that.source = resp.data
-          // that.data_name = resp.data.name
-          // that.data_value = resp.data.value
+          that.data_name = resp.data.eventtype
+          that.data_value = resp.data.num
           that.myEcharts()
         })
       },
@@ -69,35 +70,36 @@
               }
             },
             nameGap: '2',
-            indicator: [{ //[4300, 10000, 28000, 35000, 50000, 19000, 21000]
-              name: '型号1',
-              max: 6500
-            },
-              {
-                name: '型号2',
-                max: 16000
-              },
-              {
-                name: '型号3',
-                max: 30000
-              },
-              {
-                name: '型号4',
-                max: 38000
-              },
-              {
-                name: '型号5',
-                max: 52000
-              },
-              {
-                name: '型号6',
-                max: 25000
-              },
-              {
-                name: '型号7',
-                max: 25000
-              }
-            ],
+            indicator: that.data_name,
+            // indicator: [{ //[4300, 10000, 28000, 35000, 50000, 19000, 21000]
+            //   name: '型号1',
+            //   max: 6500
+            // },
+            //   {
+            //     name: '型号2',
+            //     max: 16000
+            //   },
+            //   {
+            //     name: '型号3',
+            //     max: 30000
+            //   },
+            //   {
+            //     name: '型号4',
+            //     max: 38000
+            //   },
+            //   {
+            //     name: '型号5',
+            //     max: 52000
+            //   },
+            //   {
+            //     name: '型号6',
+            //     max: 25000
+            //   },
+            //   {
+            //     name: '型号7',
+            //     max: 25000
+            //   }
+            // ],
             splitArea: {
               areaStyle: {
                 color: [
@@ -145,7 +147,8 @@
               }
             },
             data: [{
-              value: [4300, 10000, 28000, 35000, 50000, 19000, 21000],
+              value: that.data_value,
+              // value: [4300, 10000, 28000, 35000, 50000, 19000, 21000],
               name: '型号统计',