From e27e8bcfe31730a9a35ddf09cf4386509b2608b1 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Wed, 20 Dec 2023 14:36:41 +0800
Subject: [PATCH] fix:热力图播放
---
src/views/toCarryOutLegislativeReforms/reform/index.vue | 33 +++++++++++++++++++++++++++++++--
1 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/src/views/toCarryOutLegislativeReforms/reform/index.vue b/src/views/toCarryOutLegislativeReforms/reform/index.vue
index a0d5e7d..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
@@ -433,7 +457,12 @@
link.click()
// ������������������������
url.revokeObjectURL(link.href)
- this.$message.success('���������������')
+ this.$message({
+ showClose: true,
+ duration: 0,
+ message: '���������������',
+ type: 'success'
+ })
this.loading = false
}
},
--
Gitblit v1.8.0