From f74222e571d9164a59e01194f35ff1e34f10a423 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Fri, 15 Dec 2023 17:12:33 +0800
Subject: [PATCH] fix:热力图播放

---
 src/views/toCarryOutLegislativeReforms/reform/index.vue |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/src/views/toCarryOutLegislativeReforms/reform/index.vue b/src/views/toCarryOutLegislativeReforms/reform/index.vue
index b12d231..5f05f20 100644
--- a/src/views/toCarryOutLegislativeReforms/reform/index.vue
+++ b/src/views/toCarryOutLegislativeReforms/reform/index.vue
@@ -2,7 +2,7 @@
   <div v-loading="loading" class="main">
     <div>
       <searchBar v-if="searchType" :search-type="'reform'" @handleSearch="handleSearchBut" @handleAdd="handleOpenDialog(null, 'add')" />
-      <newWorkOrder v-if="centerDialogVisible" ref="newWorkOrder" :parent-form-data="parentFormData" :title="title" :page-state="pageState" :visible.sync="centerDialogVisible" @handleSubmit="newHandleSubmit" />
+      <newWorkOrder v-if="centerDialogVisible" ref="newWorkOrder" :isToMap.sync='isToMap' :parent-form-data="parentFormData" :title="title" :page-state="pageState" :visible.sync="centerDialogVisible" @handleSubmit="newHandleSubmit" />
       <!-- <el-divider></el-divider> -->
       <div class="tab">
         <div class="exportBox">
@@ -229,6 +229,7 @@
         <el-button type="primary" @click="handleEditChange">��� ���</el-button>
       </span>
     </el-dialog>
+    <mapContainer :visible.sync="isToMap" v-if="isToMap"></mapContainer>
   </div>
 </template>
 
@@ -238,18 +239,21 @@
 import _ from 'lodash'
 import qs from 'qs'
 import searchBar from '@/views/toCarryOutLegislativeReforms/components/queryForm'
+import mapContainer from '@/views/toCarryOutLegislativeReforms/components/locationMap'
 import newWorkOrder from '@/views/toCarryOutLegislativeReforms/components/newWorkOrder'
 import workOrderInformation from '@/views/toCarryOutLegislativeReforms/components/workOrderInformation'
 export default {
   components: {
     searchBar,
     newWorkOrder,
+    mapContainer,
     workOrderInformation
   },
   // mixins: [mixins],
   data() {
     return {
       loading: false,
+      isToMap: false,
       selectionRows: [],
       errorClass: 'errorClass',
       searchType: 'reform',
@@ -295,6 +299,11 @@
       sealList: []
     }
   },
+  watch: {
+    isToMap(newVal, oldVal) {
+      this.isToMap = newVal
+    }
+  },
   computed: {
     updataEscalationUnitIdFormatter: function () {
       const data = this.unitList.find(
@@ -322,8 +331,23 @@
     this.handleSearch({ isInvalid: 0, state: [9, 20, 30] })
     this.getUnitList()
     this.getContaminateList()
+    if (navigator.geolocation) {
+      navigator.geolocation.getCurrentPosition(
+        this.successCallback,
+        this.errorCallback
+      )
+    } else {
+      alert('���������������������������������������������')
+    }
   },
   methods: {
+    successCallback(position) {
+      const latitude = position.coords.latitude // ������
+      const longitude = position.coords.longitude // ������
+      console.log('���������' + longitude)
+      console.log('���������' + latitude)
+    },
+    errorCallback() {},
     handleSelectionChange(rows) {
       console.log(rows)
       this.selectionRows = rows

--
Gitblit v1.8.0