瀏覽代碼

数字水利 闸口资源统计

wangzhe 2 年之前
父節點
當前提交
dab9882c30
共有 3 個文件被更改,包括 23 次插入10 次删除
  1. 8 0
      src/api/bigdata.js
  2. 2 2
      src/views/bigdata/bigdata.vue
  3. 13 8
      src/views/bigdata/chart-pit.vue

+ 8 - 0
src/api/bigdata.js

@@ -26,6 +26,14 @@ export function getSbfb() {
   })
 }
 
+// 闸口资源统计
+export function getG1() {
+  return request({
+    url: '/center-water/VisuForestCloudBigDataController/selectWaterGateDeptCount',
+    method: 'post',
+  })
+}
+
 //林场分布统计
 export function getLcfbtj() {
   return request({

+ 2 - 2
src/views/bigdata/bigdata.vue

@@ -133,7 +133,7 @@
       <div class="bigdata-list wid-li-1 m-l-15">
         <div class="b-con mg-b-20">
           <div class="b-tit"><img src="@/assets/images/integrated/bigdata-tit-icon.png">
-            <span>chartPitchartPit</span>
+            <span>闸口资源统计</span>
           </div>
           <chartPitG1></chartPitG1>
         </div>
@@ -174,7 +174,7 @@ import chartFireBrigade from './chart-fireBrigade.vue' //12 防火队、、
 import chartGridStaff from './chart-gridStaff.vue' //13 网格人员、、
 import chartWeatherStation from './chart-weatherStation.vue' //14 气象站、、
 import chartEquipmentDistribution from './chart-equipmentDistribution' //16 设备分布、、
-import chartPitG1 from './chart-pit' //16 设备分布、、
+import chartPitG1 from './chart-pit' //17 闸口资源统计、、
 
 import {getRlt} from '@/api/bigdata'
 

+ 13 - 8
src/views/bigdata/chart-pit.vue

@@ -8,19 +8,30 @@
 
 <script>
 	import * as echarts from 'echarts';
+  import {getG1} from '@/api/bigdata'
 	export default {
 		name: 'pit',
 		data() {
 			return {
+        source: [],
 				count: 0
 			}
 		},
 		mounted() {
-			this.myEcharts()
+			// this.myEcharts()
+			this.getG1()
 
 		},
 
 		methods: {
+      getG1() {
+        let that = this
+        getG1().then(res => {
+          this.source = res.data
+          console.log("闸口资源统计", res.data)
+          that.myEcharts()
+        })
+      },
 			// 出处 http://192.144.199.210:8080/editor/index.html?chart_id=udduEFcFiEYEEj4Q
 
 			myEcharts() {
@@ -57,13 +68,7 @@
 							  }
 
 				            },
-				            data:[
-				                {value:20, name:'双辽市'},
-				                {value:25, name:'梨树县'},
-				                {value:30, name:'伊通县'},
-				                {value:35, name:'铁东区'},
-								{value:35, name:'铁西区'}
-				            ]
+				            data:this.source
 				        }
 				    ]
 				};