From 2d1fd3e90f4e45b0c676cf364508d6c0eee0fdc4 Mon Sep 17 00:00:00 2001 From: ZhiShuo_Lou <13209945+zhishuo-lou@user.noreply.gitee.com> Date: Thu, 23 Nov 2023 14:15:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E7=BC=96=E8=BE=91=E5=9B=B4?= =?UTF-8?q?=E6=A0=8F=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/car/fence.vue | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/views/car/fence.vue b/src/views/car/fence.vue index f95f5a8..c4218db 100644 --- a/src/views/car/fence.vue +++ b/src/views/car/fence.vue @@ -133,6 +133,9 @@ export default { // }, methods: { + handleSelectionChange(val) { + this.dis = val; + }, updialog(data) { this.dialogVisible=true setTimeout(() => { @@ -141,10 +144,18 @@ export default { ) this.updateFences = data - this.updateFences.fenceLocation = "" }, - handleSelectionChange(val) { - this.dis = val; + + updateFence() { + this.updateFences.fenceLocation = this.mapAddr + console.log(this.updateFences) + updateFenceMapAddr(this.updateFences).then(res =>{ + this.dialogVisible=false + this.getFenceList() + this.updateFences = {} + this.mapAddr = '' + // location.reload() + }) }, initMap() { AMapLoader.load({ @@ -214,21 +225,13 @@ export default { } }) }, - updateFence() { - this.updateFences.fenceLocation = "" - this.updateFences.fenceLocation = this.mapAddr - console.log(this.updateFences) - updateFenceMapAddr(this.updateFences).then(res =>{ - this.dialogVisible=false - this.getFenceList() - }) - }, //删除 deleteFence(id) { deleteFenceById(id).then(res =>{ this.getFenceList() }) }, + upiInsertDialog() { this.dialogVisibleTwo = true }, @@ -236,6 +239,7 @@ export default { insertFence(this.insertFences).then(res =>{ this.dialogVisibleTwo = false this.getFenceList() + this.insertFences={} }) }, getFenceList() { @@ -246,6 +250,9 @@ export default { }, + + + drawPolygon () { this.mouseTool.polygon({ strokeColor: "#FF33FF",