彭宇 2 vuotta sitten
vanhempi
commit
20134c7db3
4 muutettua tiedostoa jossa 74 lisäystä ja 64 poistoa
  1. 18 0
      src/api/animal.js
  2. 4 4
      src/views/animal.vue
  3. 45 49
      src/views/disaster.vue
  4. 7 11
      src/views/event.vue

+ 18 - 0
src/api/animal.js

@@ -0,0 +1,18 @@
+import request from '@/utils/request'
+
+// 获取初始化数据
+export function getInit(year) {
+  return request({
+    url: '/center-fire/VisuForestFireLossController/init',
+    method: 'post',
+    data:{"year":year}
+  })
+}
+// 点击列表获取数据
+export function selectFireLoseByid(id) {
+  return request({
+    url: '/center-fire/VisuForestFireLossController/selectFireLoseByid',
+    method: 'post',
+    data:{"id":id}
+  })
+}

+ 4 - 4
src/views/animal.vue

@@ -32,7 +32,7 @@
 				</div>
 			</div>
 			<!-- 地图 -->
-			<supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'forestMap'"
+			<supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'animalMap'"
 				:mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"></supermap>
 			<!--      <button @click="showEventInfo1" style="position: absolute; right: 50%;top: 45%;z-index: 1000;">弹层事件演示用按钮-->
 			<!--      </button>-->
@@ -90,7 +90,7 @@
 	import {
 		selectDeviceType,
 		selectCameraByDeptId
-	} from '@/api/monitor'
+	} from '@/api/animal'
 
 	import supermap from '@/components/supermap' //超图
 	import vheader from '@/components/v-header.vue' //一体化共用头部
@@ -112,7 +112,7 @@
 				indentright: '',
 				indentText: '收起左右栏',
 				indentdisabled: false,
-				
+
 				//虚拟数据
 				animalDwfb: [{
 
@@ -277,5 +277,5 @@
 	.w-6{
 	  width: 6rem!important;
 	}
-	
+
 </style>

+ 45 - 49
src/views/disaster.vue

@@ -313,8 +313,8 @@
         <div class="mascot" ref="mascot" :class="indentStyle" @click="indent"><img
           src="@/assets/images/mascot.png"/></div>
       </el-tooltip>
-
     </div>
+    <eventLocation ref="eventLocation"></eventLocation>
   </div>
 </template>
 
@@ -339,9 +339,8 @@
     },
     created() {
       /** ----------------------------------底部按钮公用组件开始------------------------------------- */
-      window.showDialog = this.showDialog
-      window.closeChild = this.closeChild
-      window.choseLayerSwitching = this.choseLayerSwitching
+      window.showDialog=this.showDialog
+      window.choseLayerSwitching=this.choseLayerSwitching
       /** ----------------------------------底部按钮公用组件结束------------------------------------- */
     },
     mounted() {
@@ -396,42 +395,42 @@
         fireLossTotal: 0,
         forestResources: [
           {
-            forestArea: '2011',
-            forestPrice: '2012',
-            treesNumber: '2013',
-            treesPrice: '2014'
+            forestArea: '0',
+            forestPrice: '0',
+            treesNumber: '0',
+            treesPrice: '0'
           }
         ],
         casualties: [
           {
-            minorInjuriesNumber: '2011',
-            minorInjuriesPrice: '2012',
-            seriouslyInjuredNumber: '2013',
-            seriouslyInjuredPrice: '2014',
-            deathNumber: '2015',
-            deathPrice: '2016'
+            minorInjuriesNumber: '0',
+            minorInjuriesPrice: '0',
+            seriouslyInjuredNumber: '0',
+            seriouslyInjuredPrice: '0',
+            deathNumber: '0',
+            deathPrice: '0'
           }
         ],
         elseFireLossPrice: [
           {
-            elseFireLossPrice: '2016'
+            elseFireLossPrice: '0'
           }
         ],
         blazesPriceTotal: 22,
         fireFightingCasualties: [
           {
-            artificialDays: '1',
-            artificialPrice: '2',
-            vehicleNumber: '3',
-            vehiclePrice: '4',
-            worth: '5',
-            planeNumber: '6',
-            planePrice: '7'
+            artificialDays: '0',
+            artificialPrice: '0',
+            vehicleNumber: '0',
+            vehiclePrice: '0',
+            worth: '0',
+            planeNumber: '0',
+            planePrice: '0'
           }
         ],
         otherFireCosts: [
           {
-            elseBlazesPrice: '5'
+            elseBlazesPrice: '0'
           }
         ],
 
@@ -450,6 +449,29 @@
     },
 
     methods: {
+      /** ----------------------------------底部按钮公用组件开始------------------------------------- */
+      showDialog(click) {
+        if (click == "eventLocation") {
+          this.$refs.eventLocation.showEventLocation()
+        } else if (click == "editableLayers") {
+          if (!this.$refs.supermap.isEditableLayers) {
+            this.$refs.supermap.isEditableLayers = true
+          } else {
+            this.$refs.supermap.isEditableLayers = false
+          }
+        } else if (click == "layerSwitching") {
+          if (!this.$refs.bottomMenu.showChild) {
+            this.$refs.bottomMenu.showChild = true
+          } else {
+            this.$refs.bottomMenu.showChild = false
+          }
+        }
+      },
+      //选择图层
+      choseLayerSwitching(url) {
+        this.$refs.supermap.layerSwitching(url, true);
+      },
+      /** ----------------------------------底部按钮公用组件结束------------------------------------- */
       choseFireList(id) {
         let that = this
         selectFireLoseByid(id).then(res => {
@@ -606,32 +628,6 @@
           this.otherFireCosts[0].elseBlazesPrice = res.data.visuForestFireLossBOFirst.elseBlazesPrice != null ? res.data.visuForestFireLossBOFirst.elseBlazesPrice : 0
         })
       },
-      /** ----------------------------------底部按钮公用组件开始------------------------------------- */
-      showDialog(click) {
-        if (click == 'eventLocation') {
-          this.$refs.eventLocation.showEventLocation()
-          this.$refs.bottomMenu.showChild = false
-        } else if (click == 'editableLayers') {
-          if (!this.$refs.supermap.isEditableLayers) {
-            this.$refs.supermap.isEditableLayers = true,
-              this.$refs.bottomMenu.showChild = false
-          } else {
-            this.$refs.supermap.isEditableLayers = false,
-              this.$refs.bottomMenu.showChild = false
-          }
-        } else if (click == 'layerSwitching') {
-          this.$refs.bottomMenu.showChild = true
-        }
-      },
-      //点击关闭选择图层
-      closeChild() {
-        this.$refs.bottomMenu.showChild = false
-      },
-      //选择图层
-      choseLayerSwitching(url) {
-        this.$refs.supermap.layerSwitching(url, true)
-      },
-      /** ----------------------------------底部按钮公用组件结束------------------------------------- */
       //事件chart
       eventChart() {
         // 基于准备好的dom,初始化echarts实例

+ 7 - 11
src/views/event.vue

@@ -428,7 +428,6 @@
       /** ----------------------------------摄像头预览结束------------------------------------- */
       /** ----------------------------------底部按钮公用组件开始------------------------------------- */
       window.showDialog=this.showDialog
-      window.closeChild=this.closeChild
       window.choseLayerSwitching=this.choseLayerSwitching
       /** ----------------------------------底部按钮公用组件结束------------------------------------- */
     },
@@ -575,23 +574,20 @@
       showDialog(click) {
         if (click == "eventLocation") {
           this.$refs.eventLocation.showEventLocation()
-          this.$refs.bottomMenu.showChild = false
         } else if (click == "editableLayers") {
           if (!this.$refs.supermap.isEditableLayers) {
-            this.$refs.supermap.isEditableLayers = true,
-              this.$refs.bottomMenu.showChild = false
+            this.$refs.supermap.isEditableLayers = true
           } else {
-            this.$refs.supermap.isEditableLayers = false,
-              this.$refs.bottomMenu.showChild = false
+            this.$refs.supermap.isEditableLayers = false
           }
         } else if (click == "layerSwitching") {
-          this.$refs.bottomMenu.showChild = true
+          if (!this.$refs.bottomMenu.showChild) {
+            this.$refs.bottomMenu.showChild = true
+          } else {
+            this.$refs.bottomMenu.showChild = false
+          }
         }
       },
-      //点击关闭选择图层
-      closeChild() {
-        this.$refs.bottomMenu.showChild = false
-      },
       //选择图层
       choseLayerSwitching(url) {
         this.$refs.supermap.layerSwitching(url, true);