v1.9 优化巡检地图展示问题

This commit is contained in:
wuxw 2025-10-30 14:51:12 +08:00
parent 0b10c798d6
commit 57c370b2dd
10 changed files with 50 additions and 14 deletions

View File

@ -29,6 +29,24 @@ export default {
},
initMap() {
//
if (this.markerLayer) {
this.markerLayer.setMap(null)
this.markerLayer = null
}
if (this.labelLayer) {
this.labelLayer.setMap(null)
this.labelLayer = null
}
if (this.polylineLayer) {
this.polylineLayer.setMap(null)
this.polylineLayer = null
}
if (this.map) {
this.map.destroy()
this.map = null
}
//
const center = new window.TMap.LatLng(39.916527, 116.397128)

View File

@ -26,12 +26,33 @@ export default {
},
methods: {
loadData(task) {
console.log('loadData',task)
this.initMap()
this.loadTask(task)
},
initMap() {
//
if (this.markerLayer) {
this.markerLayer.setMap(null)
this.markerLayer = null
}
if (this.labelLayer) {
this.labelLayer.setMap(null)
this.labelLayer = null
}
if (this.polylineLayer) {
this.polylineLayer.setMap(null)
this.polylineLayer = null
}
if (this.map) {
this.map.destroy()
this.map = null
}
console.log('initMap',this.map)
//
const center = new window.TMap.LatLng(39.916527, 116.397128)
console.log('center',center)
//
this.map = new window.TMap.Map(document.getElementById('inspectionTaskMap'), {

View File

@ -129,7 +129,7 @@ export default {
<style scoped>
.point-plan-container {
padding: 20px;
padding: 0px;
}
.margin-top {

View File

@ -1,12 +1,12 @@
<template>
<div class="point-route-container">
<el-row :gutter="20">
<div class="point-route-container" >
<el-row :gutter="20" v-if="pointRouteInfo.routes && pointRouteInfo.routes.length>0">
<el-col :span="6">
<el-card class="route-list-card">
<div class="route-list">
<ul>
<li v-for="(route, index) in pointRouteInfo.routes" :key="index" @click="_switchPointRoute(route)"
:class="{ 'active': route.inspectionRouteId === pointRouteInfo.inspectionRouteId }">
:class="{ 'active': route.inspectionRouteId == pointRouteInfo.inspectionRouteId }">
{{ route.routeName }}
</li>
</ul>
@ -116,7 +116,6 @@ export default {
.route-list li {
padding: 12px 15px;
border-bottom: 1px solid #ebeef5;
cursor: pointer;
transition: all 0.3s;
}

View File

@ -1,12 +1,12 @@
<template>
<div class="point-task-container">
<el-row :gutter="20">
<el-row :gutter="20" v-if="pointTaskInfo.tasks && pointTaskInfo.tasks.length>0">
<el-col :span="6">
<el-card class="task-list-card">
<div class="task-list">
<ul>
<li v-for="(task, index) in pointTaskInfo.tasks" :key="index" @click="_switchPointTask(task)"
:class="{ 'active': task.inspectionRouteId === pointTaskInfo.inspectionRouteId }">
:class="{ 'active': task.inspectionRouteId == pointTaskInfo.inspectionRouteId }">
{{ task.planUserName }}({{ task.inspectionPlanName }})
</li>
</ul>
@ -82,7 +82,7 @@ export default {
//
this.$nextTick(() => {
if (this.$refs.inspectionTaskMap) {
this.$refs.inspectionTaskMap.loadTask(task)
this.$refs.inspectionTaskMap.loadData(task)
}
})
}

View File

@ -1,6 +1,6 @@
<template>
<div class="point-task-detail-container">
<el-row :gutter="20" class="margin-top-lg">
<el-row :gutter="20" class="">
<el-col :span="6">
<el-input :placeholder="$t('pointTaskDetail.placeholder.planUserName')" v-model="pointTaskDetailInfo.planUserName"
clearable />

View File

@ -29,10 +29,10 @@
<div slot="header" class="flex justify-between">
<span>{{ $t('inspectionItemManage.inspectionItems') }}</span>
<div style="float: right;">
<el-button type="primary" size="small" @click="handleShowDoc">
<!-- <el-button type="primary" size="small" @click="handleShowDoc">
<i class="el-icon-document"></i>
{{ $t('inspectionItemManage.doc') }}
</el-button>
</el-button> -->
<el-button type="primary" size="small" @click="openAddModal">
<i class="el-icon-plus"></i>
{{ $t('inspectionItemManage.addBtn') }}

View File

@ -1,5 +1,5 @@
<template>
<div>
<div class="padding">
<!-- 查询条件 -->
<el-card class="search-wrapper">
<div slot="header" class="flex juistify-between">

View File

@ -275,7 +275,6 @@ export default {
.point-list li {
padding: 10px;
cursor: pointer;
border-bottom: 1px solid #ebeef5;
}
.point-list li:last-child {

View File

@ -223,7 +223,6 @@ export default {
li {
padding: 10px;
cursor: pointer;
border-bottom: 1px solid #eee;
&:hover {
background-color: #f5f5f5;