瀏覽代碼

Merge remote-tracking branch 'origin/visu_resources' into visu_resources

wang_xy 2 年之前
父節點
當前提交
79a06ed1d6

+ 27 - 4
src/api/bigdata.js

@@ -34,7 +34,30 @@ export function getLcfbtj() {
   })
 }
 
-//起火原因统计
+// 地质灾害易发区
+export function get5() {
+  return request({
+    url: '/center-resources/VisuForestCloudBigDataController/getHazardResources',
+    method: 'post',
+  })
+}
+
+// 森林资源年统计
+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) {
   //暂时传当年,以后再说
   if (param == null) {
@@ -126,7 +149,7 @@ export function getWgry() {
   })
 }
 
-//防火队
+// 土地资源管理信息
 export function getFhd() {
   return request({
     url: '/center-resources/VisuForestCloudBigDataController/selectBigDataFireTeamDeptCount',
@@ -134,10 +157,10 @@ export function getFhd() {
   })
 }
 
-//气象站
+// 水能资源
 export function getQxz() {
   return request({
-    url: '/center-resources/VisuForestCloudBigDataController/selectBigDataWeatherStationDeptCount',
+    url: '/center-resources/VisuForestCloudBigDataController/selectHydroenergyCount',
     method: 'post'
   })
 }

+ 18 - 2
src/api/leader.js

@@ -9,9 +9,11 @@ export function getRy() {
 }
 
 // 获取左侧人员列表
-export function getForestLeader(linJob,linType) {
+// export function getForestLeader(linJob,linType) {
+export function getForestLeader() {
   return request({
-    url: '/center-resources/VisuForestLeaderController/getForestLeader?linJob='+linJob+"&linType="+linType,
+    // url: '/center-resources/VisuForestLeaderController/getForestLeader?linJob='+linJob+"&linType="+linType,
+    url: '/center-resources/VisuForestLeaderController/getPersonList',
     method: 'get',
   })
 }
@@ -22,6 +24,20 @@ export function getLeaderTrack(trackById) {
     method: 'get',
   })
 }
+// 点击左侧轨迹列表获取时段
+export function getTrackList(personId) {
+  return request({
+    url: '/center-resources/VisuForestLeaderController/getTrackList?personId='+personId,
+    method: 'get',
+  })
+}
+// 点击右侧时段列表获取落点
+export function getPointList(trackId) {
+  return request({
+    url: '/center-resources/VisuForestLeaderController/getPointList?trackId='+trackId,
+    method: 'get',
+  })
+}
 // 巡林计划
 export function getPlanList(trackById) {
   return request({

+ 24 - 0
src/assets/iconfont/iconfont.css

@@ -98,6 +98,30 @@
 .sj-icon-clgj:before {
   content: "\e605";
 }
+/* 违建信息 */
+.sj-icon-construction:before {
+  content: "\e73f";
+}
+/* 矿臧资源 */
+.sj-icon-deposit:before {
+  content: "\e633";
+}
+/* 森林资源 */
+.sj-icon-forest:before {
+  content: "\e672";
+}
+/* 地质灾害易发区 */
+.sj-icon-hazard:before {
+  content: "\e61b";
+}
+/* 水能资源 */
+.sj-icon-hydroenergy:before {
+  content: "\e930";
+}
+/* 土地资源 */
+.sj-icon-land:before {
+  content: "\e629";
+}
 /* 林场资源 */
 .sj-icon-lczy:before {
   content: "\e60b";

+ 11 - 11
src/components/vBottomMenu.vue

@@ -447,17 +447,17 @@
 						icon: 'iconfont sj-icon-clgj',
 						click: 'editableLayers'
 					},
-					{
-						name: '林班',
-						icon: 'iconfont sj-icon-lbzy',
-						click: 'forestban'
-					},
-
-					{
-						name: '林场',
-						icon: 'iconfont sj-icon-lczy',
-						click: 'forestchang'
-					},
+					// {
+					// 	name: '林班',
+					// 	icon: 'iconfont sj-icon-lbzy',
+					// 	click: 'forestban'
+					// },
+          //
+					// {
+					// 	name: '林场',
+					// 	icon: 'iconfont sj-icon-lczy',
+					// 	click: 'forestchang'
+					// },
 					{
 						name: '电视墙',
 						icon: 'el-icon-s-grid',

+ 33 - 15
src/views/bigdata/bigdata.vue

@@ -52,13 +52,13 @@
       </div>
       <!-- 第三纵向-->
       <div class="bigdata-list wid-li-3 m-l-15 flex-r">
-        <div class="b-con mg-b-20 b-49">
-          <div class="b-tit"><img src="@/assets/images/integrated/bigdata-tit-icon.png">
-            <span>起火原因统计</span>
-          </div>
-          <chartFireCause></chartFireCause>
-        </div>
-        <div class="b-con mg-b-20 b-49">
+        <!--<div class="b-con mg-b-20 b-49">-->
+          <!--<div class="b-tit"><img src="@/assets/images/integrated/bigdata-tit-icon.png">-->
+            <!--<span>土地资源管理信息</span>-->
+          <!--</div>-->
+          <!--<chartFireCause></chartFireCause>-->
+        <!--</div>-->
+        <div class="b-con mg-b-20">
           <div class="b-tit"><img src="@/assets/images/integrated/bigdata-tit-icon.png">
             <span>设备上报事件数量</span>
           </div>
@@ -66,13 +66,13 @@
         </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>
           <chartKeyArea></chartKeyArea>
         </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>
           <chartAncientTree></chartAncientTree>
         </div>
@@ -92,11 +92,23 @@
           </div>
           <chartGridDistribution></chartGridDistribution>
         </div>
-        <div class="b-con">
+        <!--<div class="b-con">-->
+          <!--<div class="b-tit"><img src="@/assets/images/integrated/bigdata-tit-icon.png">-->
+            <!--<span>天气趋势</span>-->
+          <!--</div>-->
+          <!--<chartWeatherTrends></chartWeatherTrends>-->
+        <!--</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>
+          </div>
+          <chartPitG5></chartPitG5>
+        </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>
-          <chartWeatherTrends></chartWeatherTrends>
+          <chartPitG2></chartPitG2>
         </div>
       </div>
       <!-- 第五纵向-->
@@ -109,13 +121,13 @@
         </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>
           <chartFireBrigade></chartFireBrigade>
         </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>
@@ -153,6 +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 {getRlt} from '@/api/bigdata'
 
@@ -173,7 +188,10 @@ export default {
     chartFireBrigade,
     chartGridStaff,
     chartWeatherStation,
-    chartEquipmentDistribution
+    chartEquipmentDistribution,
+    chartPitG2,
+    chartPitG5,
+    // chartPitG6,
   },
   data() {
 

+ 3 - 2
src/views/bigdata/chart-event.vue

@@ -19,7 +19,8 @@ export default {
   name: 'event',
   data() {
     return {
-      year: 2022,
+      // year: 2022,
+      year: new Date().getFullYear(),
       optionData: [],
       option2Data: []
     }
@@ -169,7 +170,7 @@ export default {
             }
           ]
         })
-        v.percent = ((v.value / sum) * 100).toFixed(1) + '%'
+        v.percent = sum == 0 ? '0%' : ((v.value / sum) * 100).toFixed(1) + '%'
         lineYAxis.push({
           value: i,
           textStyle: {

+ 118 - 0
src/views/bigdata/chart-farmtype.vue

@@ -0,0 +1,118 @@
+<!-- **************************************NO.9 散养户、养殖场养殖种类*************************************** -->
+<template>
+	<div class="chart-container">
+		<div id="chartPitG5" style="width: 100%; height:23vh;">
+		</div>
+	</div>
+</template>
+
+<script>
+	import * as echarts from 'echarts';
+  import {get5} from '@/api/bigdata.js'
+	export default {
+		name: 'chartPitG5',
+		data() {
+			return {
+        data: [],
+        source: [],
+				count: 0
+			}
+		},
+		mounted() {
+			// this.myEcharts()
+      this.getPitG5();
+		},
+
+		methods: {
+      getPitG5(){
+        let that = this
+        get5().then(resp =>{
+          console.log("地质灾害易发区", resp.data)
+          that.source = resp.data
+          that.data = []
+          for (let i = 0; i < resp.data.length; i++) {
+            that.data.push(resp.data[i].name)
+          }
+          // that.data_name = resp.data.name
+          // that.data_value = resp.data.value
+          that.myEcharts()
+        })
+      },
+			// 出处 http://192.144.199.210:8080/editor/index.html?chart_id=smh2KYnoCMWnT1IN
+
+			myEcharts() {
+        let that = this
+
+				var chartDom = document.getElementById('chartPitG5');
+				var myChart = echarts.init(chartDom);
+				var color = ['#37a2da','#32c5e9','#9fe6b8','#ffdb5c','#ff9f7f','#fb7293','#e7bcf3','#8378ea'];
+				var option;
+				option = {
+				    color:color,
+				    tooltip : {
+				        formatter: "{b}:{c}%"
+				    },
+
+
+				    legend: {
+						textStyle:{
+							color:'#fffff',
+							fontSize:10
+						},
+						itemWidth:15,
+				        orient: 'vertical',
+				        left: '10%',
+						top:'5%',
+				        data: that.data
+				        // data: ['一般修剪', '浇水', '除草', '绿篱修剪', '病虫害防治', '施肥', '伐除', '其他']
+				    },
+				    series: [
+				        {
+				            name: '',
+				            type: 'pie',
+				            radius: '80%',
+				            center: ['65%', '48%'],
+				            data: that.source,
+                  // data:[
+				          //       {value:40, name:'一般修剪'},
+				          //       {value:30, name:'浇水'},
+				          //       {value:25, name:'除草'},
+				          //       {value:18, name:'绿篱修剪'},
+				          //       {value:10, name:'病虫害防治'},
+				          //       {value:5, name:'施肥'},
+				          //       {value:4, name:'伐除'},
+				          //       {value:3, name:'其他'}
+				          //   ],
+				            emphasis: {
+				                itemStyle: {
+				                    shadowBlur: 10,
+				                    shadowOffsetX: 0,
+				                    shadowColor: 'rgba(0, 0, 0, 0.5)'
+				                }
+				            },
+				            label: {
+				                normal: {
+				                    show: false,
+				                }
+				            }
+				        }
+				    ]
+				};
+				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;
+	}
+</style>

+ 1 - 0
src/views/bigdata/chart-fireBrigade.vue

@@ -28,6 +28,7 @@
 		  fhd(){
 		    let that = this
         getFhd().then(resp =>{
+          console.log("土地资源管理信息",resp.data)
           that.data_fhd = resp.data
           that.data_fhd.forEach(function (item,index) {
             that.data_name.push(item.name)

+ 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>

+ 176 - 0
src/views/bigdata/chart-waterTotal.vue

@@ -0,0 +1,176 @@
+<!-- **************************************NO.14 泡沫液*************************************** -->
+<template>
+	<div class="chart-container">
+		<div id="chartPitG6" style="width: 100%; height:23vh;">
+		</div>
+	</div>
+</template>
+
+<script>
+	import * as echarts from 'echarts';
+  import {get6} from '@/api/bigdata.js'
+
+	export default {
+		name: 'chartPitG6',
+		data() {
+			return {
+				count: 0,
+        data_name: [],
+        data_value: [],
+			}
+		},
+		mounted() {
+		  this.getPitG6();
+		},
+
+		methods: {
+		  getPitG6(){
+        let that = this
+        get6().then(resp =>{
+          console.log("水能资源", resp.data)
+          that.source = resp.data
+          that.data_name = resp.data.eventtype
+          that.data_value = resp.data.num
+          that.myEcharts()
+        })
+      },
+      // 出处 http://192.144.199.210:8080/editor/index.html?chart_id=ELjN7o3m72tLtmbv
+      myEcharts() {
+        var chartDom = document.getElementById('chartPitG6');
+        var myChart = echarts.init(chartDom);
+        var option;
+        option = {
+          color: ['#3D91F7', '#61BE67'],
+          tooltip: {},
+          legend: {
+            show: true,
+            icon: "circle",
+            bottom: 30,
+            center: 0,
+            itemWidth: 14,
+            itemHeight: 14,
+            itemGap: 21,
+            orient: "horizontal",
+            data: ['a', 'b'],
+            textStyle: {
+              color: '#8C8C8C'
+            },
+          },
+
+          radar: {
+            // shape: 'circle',
+            radius: '80%',
+            triggerEvent: true,
+            name: {
+              textStyle: {
+                color: '#fff',
+                fontSize: '10',
+                borderRadius: 3,
+                padding: [3, 5]
+              }
+            },
+            nameGap: '2',
+            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: [
+                  'rgba(222,134,85, 0.1)', 'rgba(222,134,85, 0.2)',
+                  'rgba(222,134,85, 0.4)', 'rgba(222,134,85, 0.6)',
+                  'rgba(222,134,85, 0.8)', 'rgba(222,134,85, 1)'
+                ].reverse()
+              }
+            },
+            // axisLabel:{//展示刻度
+            //     show: true
+            // },
+            axisLine: { //指向外圈文本的分隔线样式
+              lineStyle: {
+                color: 'rgba(0,0,0,0)'
+              }
+            },
+            splitLine: {
+              lineStyle: {
+                width: 2,
+                color: [
+                  'rgba(224,134,82, 0.1)', 'rgba(224,134,82, 0.2)',
+                  'rgba(224,134,82, 0.4)', 'rgba(224,134,82, 0.6)',
+                  'rgba(224,134,82, 0.8)', 'rgba(224,134,82, 1)'
+                ].reverse()
+              }
+            },
+
+          },
+
+          series: [{
+            name: '型号统计',
+            type: 'radar',
+            //areaStyle: {normal: {}},
+            areaStyle: {
+              normal: {
+                color: 'rgba(252,211,3, 0.3)'
+              }
+            },
+            symbolSize: 0,
+            lineStyle: {
+              normal: {
+                color: 'rgba(252,211,3, 1)',
+                width: 1
+              }
+            },
+            data: [{
+              value: that.data_value,
+              // value: [4300, 10000, 28000, 35000, 50000, 19000, 21000],
+              name: '型号统计',
+
+
+
+            }]
+          }]
+        };
+        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;
+	}
+</style>

+ 25 - 151
src/views/datacenter.vue

@@ -297,12 +297,12 @@ export default {
       //获取左侧菜单列表
       getResource().then(res => {
         that.resourcesList = res.data
+        console.log("数据中心", that.resourcesList)
         //截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
         res.data.forEach(function(data, index) {
           that.$set(that.resourcesList[index], 'icon', 'sj' + '-' + 'icon' + '-' + data
             .resourceTable.split('_').slice(-1))
         })
-        console.log(that.resourcesList)
 
       })
     },
@@ -332,7 +332,7 @@ export default {
               keepBindPopup: false,
               isAggregation: false
             }
-            if (resourceTable == 'centerdata_t_forest_weatherstation') { //气象站
+            if (resourceTable == 'centerdata_t_resources_illegal_construction') { //违建信息
               markersMap.icon = 'sj-icon-map-centerdata-t-forest-weatherstation'
               markersMap.lng = res.data.resourceList[i].longitude
               markersMap.lat = res.data.resourceList[i].latitude
@@ -348,7 +348,7 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>地址:' + res.data.resourceList[i].weatherstationAddress +
+                '                  <h4>名称:' + res.data.resourceList[i].name +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
@@ -356,7 +356,7 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>联系人:' + res.data.resourceList[i].weatherstationPerson +
+                '                  <h4>违建处理负责人:' + res.data.resourceList[i].person +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
@@ -364,12 +364,12 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>电话:' + res.data.resourceList[i].weatherstationTel +
+                '                  <h4>联系方式:' + res.data.resourceList[i].phone +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span></div>'
-            } else if (resourceTable == 'centerdata_t_forest_farm') { //林场
+            } else if (resourceTable == 'centerdata_t_resources_deposit') { //矿臧资源
               markersMap.icon = 'sj-icon-map-centerdata-t-forest-farm'
               markersMap.lng = res.data.resourceList[i].longitude
               markersMap.lat = res.data.resourceList[i].latitude
@@ -385,25 +385,25 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>林场名称:' + res.data.resourceList[i].farmName + '</h4>' +
+                '                  <h4>名称:' + res.data.resourceList[i].name + '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span>' +
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>联系人:' + res.data.resourceList[i].farmPerson + '</h4>' +
+                '                  <h4>联系人:' + res.data.resourceList[i].person + '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span>' +
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>电话:' + res.data.resourceList[i].farmTel + '</h4>' +
+                '                  <h4>电话:' + res.data.resourceList[i].phone + '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span></div>'
-            } else if (resourceTable == 'centerdata_t_forest_landing') { //起降点
+            } else if (resourceTable == 'centerdata_t_resources_forest') { //森林资源管理信息
               markersMap.icon = 'sj-icon-map-centerdata-t-forest-landing'
               markersMap.lng = res.data.resourceList[i].longitude
               markersMap.lat = res.data.resourceList[i].latitude
@@ -419,7 +419,7 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>起降点名称:' + res.data.resourceList[i].landingName +
+                '                  <h4>名称:' + res.data.resourceList[i].name +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
@@ -427,7 +427,7 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>联系人:' + res.data.resourceList[i].landingPerson +
+                '                  <h4>占地范围:' + res.data.resourceList[i].zdfw +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
@@ -435,11 +435,11 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>电话:' + res.data.resourceList[i].landingTel + '</h4>' +
+                '                  <h4>占地面积(万公顷):' + res.data.resourceList[i].landArea + '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span></div>'
-            } else if (resourceTable == 'centerdata_t_forest_channel') { //水源渠道
+            } else if (resourceTable == 'centerdata_t_resources_geologic_hazard') { //地质灾害易发区
               markersMap.icon = 'sj-icon-map-centerdata-t-forest-channel'
               markersMap.lng = res.data.resourceList[i].longitude
               markersMap.lat = res.data.resourceList[i].latitude
@@ -455,7 +455,7 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>渠道名称:' + res.data.resourceList[i].channelName +
+                '                  <h4>名称:' + res.data.resourceList[i].name +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
@@ -463,7 +463,7 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>联系人:' + res.data.resourceList[i].channelPerson +
+                '                  <h4>联系人:' + res.data.resourceList[i].person +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
@@ -471,11 +471,11 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>电话:' + res.data.resourceList[i].channelTel + '</h4>' +
+                '                  <h4>电话:' + res.data.resourceList[i].phone + '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span></div>'
-            } else if (resourceTable == 'centerdata_t_forest_checkpoint') { //防火检查站
+            } else if (resourceTable == 'centerdata_t_resources_hydroenergy') { //水能资源
               markersMap.icon = 'sj-icon-map-centerdata-t-forest-checkpoint'
               markersMap.lng = res.data.resourceList[i].longitude
               markersMap.lat = res.data.resourceList[i].latitude
@@ -491,7 +491,7 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>检查站名称:' + res.data.resourceList[i].checkpointName +
+                '                  <h4>名称:' + res.data.resourceList[i].name +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
@@ -499,7 +499,7 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>地址:' + res.data.resourceList[i].checkpointAddress +
+                '                  <h4>联系人:' + res.data.resourceList[i].person +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
@@ -507,7 +507,7 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>联系人:' + res.data.resourceList[i].checkpointPerson +
+                '                  <h4>位置:' + res.data.resourceList[i].address +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
@@ -515,12 +515,12 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>电话:' + res.data.resourceList[i].checkpointTel +
+                '                  <h4>电话:' + res.data.resourceList[i].phone +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span></div>'
-            } else if (resourceTable == 'centerdata_t_forest_waterintake') { //取水口
+            } else if (resourceTable == 'centerdata_t_resources_land') { //土地资源管理信息
               markersMap.icon = 'sj-icon-map-centerdata-t-forest-waterintake'
               markersMap.lng = res.data.resourceList[i].longitude
               markersMap.lat = res.data.resourceList[i].latitude
@@ -536,15 +536,7 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>取水口名称:' + res.data.resourceList[i].waterintakeName +
-                '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>联系人:' + res.data.resourceList[i].waterintakePerson +
+                '                  <h4>名称:' + res.data.resourceList[i].name +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
@@ -552,129 +544,11 @@ export default {
                 '<span>' +
                 '                  <div class="d-l-con">' +
                 '                  <div class="d-l-l-text">' +
-                '                  <h4>电话:' + res.data.resourceList[i].waterintakeTel +
+                '                  <h4>占地面积(万公顷):' + res.data.resourceList[i].landArea +
                 '</h4>' +
                 '                </div>' +
                 '                </div>' +
                 '                </span></div>'
-            } else if (resourceTable == 'centerdata_t_forest_watercrane') { //水鹤
-              markersMap.icon = 'sj-icon-map-centerdata-t-forest-watercrane'
-              markersMap.lng = res.data.resourceList[i].longitude
-              markersMap.lat = res.data.resourceList[i].latitude
-              markersMap.bindPopupHtml = '<div class="map-tip">' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
-                  .data.resourceList[i].latitude + '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>水鹤名称:' + res.data.resourceList[i].watercraneName +
-                '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>联系人:' + res.data.resourceList[i].watercranePerson +
-                '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>电话:' + res.data.resourceList[i].watercraneTel +
-                '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span></div>'
-            } else if (resourceTable == 'centerdata_t_forest_firehydrant') { //消火栓
-              markersMap.icon = 'sj-icon-map-centerdata-t-forest-firehydrant'
-              markersMap.lng = res.data.resourceList[i].longitude
-              markersMap.lat = res.data.resourceList[i].latitude
-              markersMap.bindPopupHtml = '<div class="map-tip">' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
-                  .data.resourceList[i].latitude + '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>消火栓名称:' + res.data.resourceList[i].firehydrantName +
-                '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>地址:' + res.data.resourceList[i].firehydrantAddress +
-                '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>联系人:' + res.data.resourceList[i].firehydrantPerson +
-                '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>电话:' + res.data.resourceList[i].firehydrantTel +
-                '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span></div>'
-            } else if (resourceTable == 'centerdata_t_forest_fireteam') { //森林防火队
-              markersMap.icon = 'sj-icon-map-centerdata-t-forest-fireteam'
-              markersMap.lng = res.data.resourceList[i].longitude
-              markersMap.lat = res.data.resourceList[i].latitude
-              markersMap.bindPopupHtml = '<div class="map-tip">' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>经纬度:' + res.data.resourceList[i].longitude + ',' + res
-                  .data.resourceList[i].latitude + '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>森林防火队名称:' + res.data.resourceList[i].fireteamName +
-                '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>联系人:' + res.data.resourceList[i].fireteamPerson +
-                '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span>' +
-                '<span>' +
-                '                  <div class="d-l-con">' +
-                '                  <div class="d-l-l-text">' +
-                '                  <h4>电话:' + res.data.resourceList[i].fireteamTel + '</h4>' +
-                '                </div>' +
-                '                </div>' +
-                '                </span></div>'
             }
             that.markersList.push(markersMap)
           }

+ 80 - 26
src/views/leader.vue

@@ -14,25 +14,25 @@
               <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
             </div>
             <div class="i-list-con h-25">
-              <div id="personnel-chart" style="width: 100%;height:12vh;"></div>
-              <div class="d-l-con-icon">
-                <div class="icon-con w-50" :class="{on:iconCurrentIndex1==item.jobValue}"
-                     v-for="(item,index) in visuForestCloudRYBO"
-                     @click="getForestLeader(item.jobValue,item.jobType)">
-                  <div class="icon icon-mid el-icon-user"></div>
-                  <div class="icon-text">
-                    <h5>{{ item.job }}</h5>
-                    <h6>{{ item.number }}</h6>
-                  </div>
-                </div>
-                <!-- <div class="icon-con w-50  m-btm-no" :class="{on:listCurrentIndex1==item.jobType}" v-for="(item,index) in visuForestCloudRYBO" v-if="index%2!=0" @click="getForestLeader(item.jobValue,item.jobType)">
-                <div class="icon icon-mid el-icon-user"></div>
-                <div class="icon-text">
-                  <h5>{{item.job}}</h5>
-                  <h6>{{item.number}}</h6>
-                </div>
-              </div> -->
-              </div>
+              <div id="personnel-chart" style="width: 100%;height:20vh;"></div>
+              <!--<div class="d-l-con-icon">-->
+                <!--<div class="icon-con w-50" :class="{on:iconCurrentIndex1==item.jobValue}"-->
+                     <!--v-for="(item,index) in visuForestCloudRYBO"-->
+                     <!--@click="getForestLeader(item.jobValue,item.jobType)">-->
+                  <!--<div class="icon icon-mid el-icon-user"></div>-->
+                  <!--<div class="icon-text">-->
+                    <!--<h5>{{ item.job }}</h5>-->
+                    <!--<h6>{{ item.number }}</h6>-->
+                  <!--</div>-->
+                <!--</div>-->
+                <!--&lt;!&ndash; <div class="icon-con w-50  m-btm-no" :class="{on:listCurrentIndex1==item.jobType}" v-for="(item,index) in visuForestCloudRYBO" v-if="index%2!=0" @click="getForestLeader(item.jobValue,item.jobType)">-->
+                <!--<div class="icon icon-mid el-icon-user"></div>-->
+                <!--<div class="icon-text">-->
+                  <!--<h5>{{item.job}}</h5>-->
+                  <!--<h6>{{item.number}}</h6>-->
+                <!--</div>-->
+              <!--</div> &ndash;&gt;-->
+              <!--</div>-->
             </div>
           </dv-border-box-13>
         </div>
@@ -68,7 +68,7 @@
           <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
             <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
             <div class="this-title">
-              <span>巡林计划</span>
+              <span>巡查时段</span>
               <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
             </div>
             <div class="i-list-con h-73">
@@ -76,10 +76,10 @@
               <div class="h-19 overflow-y">
                 <div class="d-l-con" :class="{on:listCurrentIndex2==item.planName}"
                      v-for="(item,index) in xunLinListOne"
-                     @click="setConnectList(item.planLine,item.planName)">
+                     @click="getPointList(item.id)">
                   <div class="d-l-l-text">
                     <i class="i-small"></i>
-                    <h4>{{ item.planName }}</h4>
+                    <h4>{{ item.timeBegin }} - {{ item.timeEnd }}</h4>
                   </div>
                 </div>
               </div>
@@ -105,6 +105,8 @@
 import {
   getForestLeader,
   getLeaderTrack,
+  getTrackList,
+  getPointList,
   getPlanList,
   getRy
 } from '@/api/leader'
@@ -229,9 +231,21 @@ export default {
         this.personnelChart()
       })
       //获取巡林计划
-      getPlanList().then(res => {
-        this.xunLinListOne = res.data
+      // getPlanList().then(res => {
+      //   this.xunLinListOne = res.data
+      // })
+      // // 获取轨迹列表
+      // getTrackList().then(res => {
+      //   this.xunLinListOne = res.data
+      // })
+      // 获取人员列表
+      // getForestLeader(linJob, linType).then(res => {
+      getForestLeader().then(res => {
+        this.peopleList = res.data;
+        console.log("人员",res.data)
       })
+      this.connectList = []
+      // this.$refs.supermap.clearC() //clearC undefined
     },
     //获取左侧人员列表
     getForestLeader(linJob, linType) {
@@ -240,17 +254,35 @@ export default {
       this.iconCurrentIndex1 = linJob
       this.peopleList = []
       getForestLeader(linJob, linType).then(res => {
-        this.peopleList = res.data
+        this.peopleList = res.data;
       })
       this.connectList = []
       this.$refs.supermap.clearC()
     },
     //点击左侧人员列表获取轨迹
-    getLeaderTrack(userId) {
+    getLeaderTrack(personId) {
+      getTrackList(personId).then(res => {
+        console.log("轨迹",res.data);
+        if(res.data.length > 0){// 当前资源人员有巡查轨迹 获取最新一条轨迹
+          this.xunLinListOne = res.data;
+          this.getPointList(res.data[0].id);
+        }else {// 清空上一用户落点
+          this.xunLinListOne = [{"timeBegin": "当前资源人员", "timeEnd": "暂无巡查轨迹"}];
+          this.$refs.supermap.clearC()
+        }
+      })
+    },
+    getLeaderTrack_original(userId) {
       this.listCurrentIndex1 = userId
       let that = this
       this.connectList = []
       getLeaderTrack(userId).then(res => {
+        // this.xunLinListOne = res.data;
+        // 获取右侧轨迹列表
+        // getPlanList().then(res => {
+        //   this.xunLinListOne = res.data
+        // })
+
         if (res.data != null && res.data.length > 0) {
           for (let i = 0; i < res.data.length; i++) {
             let latlng = {
@@ -269,6 +301,28 @@ export default {
       })
     },
 
+    getPointList(trackId) {
+      let that = this;
+      this.connectList = [];
+      getPointList(trackId).then(res => {
+        console.log("落点",res.data)
+        if (res.data != null && res.data.length > 0) {
+          for (let i = 0; i < res.data.length; i++) {
+            let latlng = {
+              lat: res.data[i].latitude,
+              lng: res.data[i].longitude
+            }
+            this.connectList.push(latlng)
+          }
+          setTimeout(() => {
+            that.$refs.supermap.clearC()
+            that.$refs.supermap.setConnectList(this.connectList, 'red')
+          }, 1000)
+        } else {
+          that.$refs.supermap.clearC()
+        }
+      })
+    },
     setConnectList(points, planName) {
       this.listCurrentIndex2 = planName
       this.connectList = []

+ 10 - 5
vue.config.js

@@ -7,7 +7,7 @@ function resolve(dir) {
 
 const CompressionPlugin = require('compression-webpack-plugin')
 
-const name = process.env.VUE_APP_TITLE || '通榆县乡村振兴监管平台' // 网页标题
+const name = process.env.VUE_APP_TITLE || '四平市态势感知平台' // 网页标题
 
 const port = process.env.port || process.env.npm_config_port || 80 // 端口
 
@@ -18,7 +18,7 @@ const fs = require('fs')
 // 这里只列一部分,具体配置参考文档
 module.exports = {
   // 部署生产环境和开发环境下的URL。
-  // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
+  // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上datacenter
   // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
   publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
   // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
@@ -52,8 +52,13 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        // target: `http://127.0.0.1:3031`,
-        target: `http://117.78.49.164:3031`,
+        // target: `http://192.168.2.118:3031`,
+        //  target: `http://117.78.49.164:3031`,
+         // target: `http://192.168.1.122:3031`,
+         target: `http://127.0.0.1:3031`,
+         // target: `http://192.168.1.137:3031`,
+         // target: `https://117.78.49.164:3031`,
+         // target: `https://36.49.108.22:3031`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''
@@ -65,7 +70,7 @@ module.exports = {
   css: {
     loaderOptions: {
       sass: {
-        sassOptions: {outputStyle: 'expanded'}
+        sassOptions: { outputStyle: 'expanded' }
       }
     }
   },