Quellcode durchsuchen

数字资源 森林资源年统计

wangzhe vor 2 Jahren
Ursprung
Commit
9913ab7bba

+ 17 - 2
src/api/bigdata.js

@@ -42,6 +42,21 @@ export function get5() {
   })
 }
 
+// 森林资源年统计
+export function getG2() {
+  return request({
+    url: '/center-resources/VisuForestCloudBigDataController/selectForestResourcesCount',
+    method: 'post',
+  })
+}
+// 水能资源
+export function get6() {
+  return request({
+    url: '/center-resources/VisuForestCloudBigDataController/selectHydroenergyCount',
+    method: 'post',
+  })
+}
+
 //土地资源管理信息--雷达图
 export function getQhyytj(param) {
   //暂时传当年,以后再说
@@ -142,10 +157,10 @@ export function getFhd() {
   })
 }
 
-//气象站
+// 水能资源
 export function getQxz() {
   return request({
-    url: '/center-resources/VisuForestCloudBigDataController/selectBigDataWeatherStationDeptCount',
+    url: '/center-resources/VisuForestCloudBigDataController/selectHydroenergyCount',
     method: 'post'
   })
 }

+ 7 - 6
src/views/bigdata/bigdata.vue

@@ -106,9 +106,9 @@
         </div>
         <div class="b-con mg-b-20 b-49">
           <div class="b-tit"><img src="@/assets/images/integrated/bigdata-tit-icon.png">
-            <span>水利事件分析</span>
+            <span>森林资源年统计</span>
           </div>
-          <chartPitG6></chartPitG6>
+          <chartPitG2></chartPitG2>
         </div>
       </div>
       <!-- 第五纵向-->
@@ -127,7 +127,7 @@
         </div>
         <div class="b-con mg-b-20 b-49">
           <div class="b-tit"><img src="@/assets/images/integrated/bigdata-tit-icon.png">
-            <span>气象站</span>
+            <span>水能资源</span>
           </div>
           <chartWeatherStation></chartWeatherStation>
         </div>
@@ -165,9 +165,9 @@ 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 chartPitG2 from './chart-firecontrol' //18 水利工程资源统计、、
 import chartPitG5 from './chart-farmtype' //21 偷钓偷捕事件分析、、
-import chartPitG6 from './chart-waterTotal' //22 水利事件分析、、
+import chartPitG6 from './chart-waterTotal' //22 分析、、
 
 import {getRlt} from '@/api/bigdata'
 
@@ -189,8 +189,9 @@ export default {
     chartGridStaff,
     chartWeatherStation,
     chartEquipmentDistribution,
+    chartPitG2,
     chartPitG5,
-    chartPitG6,
+    // chartPitG6,
   },
   data() {
 

+ 142 - 0
src/views/bigdata/chart-firecontrol.vue

@@ -0,0 +1,142 @@
+<!-- **************************************NO.18 消防*************************************** -->
+<template>
+	<div class="chart-container">
+		<div id="chartPitG2" style="width: 100%; height:25vh; ">
+		</div>
+	</div>
+</template>
+
+<script>
+	import * as echarts from 'echarts';
+  import {getG2} from '@/api/bigdata'
+	export default {
+		name: 'chartPitG2',
+		data() {
+			return {
+        source: [],
+				count: 0
+			}
+		},
+		mounted() {
+			// this.myEcharts1();
+      this.getG2()
+		},
+
+		methods: {
+      getG2() {
+        let that = this
+        getG2().then(res => {
+          this.source = res.data
+          console.log("森林资源年统计", res.data)
+          that.myEcharts1()
+        })
+      },
+			// 出处 http://192.144.199.210:8080/editor/index.html?chart_id=f46x0t0c7883X-D6
+			myEcharts1() {
+				var chartDom = document.getElementById('chartPitG2');
+				var myChart = echarts.init(chartDom);
+				var option;
+				 option = {
+				    tooltip: {
+				        trigger: 'axis',
+				        axisPointer: {
+				            type: 'shadow'
+				        }
+				    },
+				    grid:{
+				        top:'15%',
+				        left:'10%',
+				        right:'10%',
+				        buttom:'15%',
+				    },
+				     xAxis: {
+				        type: 'category',
+				        axisLine: {
+				            lineStyle: {
+				                color: 'rgba(255,255,255,0.12)',
+				            },
+				        },
+				        axisLabel: {
+				            margin: 10,
+				            color: '#e2e9ff',
+				            textStyle: {
+				                fontSize: 10
+				            },
+				        },
+				        axisTick:{
+				            show:false,
+				        },
+				         // data: ['双辽市', '梨树县', '伊通县', '铁东区', '铁西区']
+				         data: this.source.name
+				    },
+				    yAxis: {
+				        nameTextStyle:{
+				            color:'#fff',
+				        },
+				        type: 'value',
+				         axisLine: {
+				             show:false,
+				            lineStyle: {
+				                color: 'rgba(255,255,255,0.12)'
+				            },
+				        },
+				        axisLabel: {
+							 show:false,
+				            formatter: '{value}',
+				            color: '#e2e9ff',
+				        },
+				         splitLine: {
+				            lineStyle: {
+				                color: 'rgba(255,255,255,0.12)'
+				            }
+				        },
+				        axisTick:{
+				            show:true,
+
+				            lineStyle:{
+				                color:'#fff',
+				            },
+				        },
+				    },
+				    series: [{
+				        itemStyle:{
+				            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+				                    offset: 0,
+				                    color: 'rgba(0,244,255,1)'
+				                }, {
+				                    offset: 1,
+				                    color: 'rgba(0,77,167,1)'
+				                }], false),
+				                barBorderRadius: 10,
+				                opacity:0.8
+				        },
+				        barWidth:10,
+				        label:{
+				            show:true,
+				            position:['0','-20'],
+				            color:'#fff',
+				        },
+				        // data: [120, 200, 150, 80, 70],
+				        data: this.source.value,
+				        type: 'bar',
+				    }]
+				};
+				option && myChart.setOption(option);
+			},
+
+		},
+
+
+	}
+</script>
+
+<style rel="stylesheet/scss" lang="scss" scoped>
+	.chart-container {
+		width: 100%;
+		height: auto;
+		position: relative;
+		padding-bottom: 10px;
+		display: flex;
+		flex-direction: column;
+	}
+</style>

+ 1 - 1
src/views/bigdata/chart-waterTotal.vue

@@ -27,7 +27,7 @@
 		  getPitG6(){
         let that = this
         get6().then(resp =>{
-          console.log("水利事件分析", resp.data)
+          console.log("水能资源", resp.data)
           that.source = resp.data
           that.data_name = resp.data.eventtype
           that.data_value = resp.data.num