From 2696e8c6f53b4c3f826789ab3d10446c0d54a822 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Sat, 15 Oct 2022 14:41:52 +0800
Subject: [PATCH] 全景管理编辑时地址回显
---
src/components/mapOncePoint/chousePoint.vue | 7 +++++--
src/views/panorama/panorama.vue | 16 +++++++++++-----
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/src/components/mapOncePoint/chousePoint.vue b/src/components/mapOncePoint/chousePoint.vue
index 84c0646..7843df1 100644
--- a/src/components/mapOncePoint/chousePoint.vue
+++ b/src/components/mapOncePoint/chousePoint.vue
@@ -39,8 +39,8 @@
this.chousePointData[1]
);
let outdata = [...outInt, this.chousePointData[2]];
- console.log(this.chousePointData, "gcj02");
- console.log(outdata, " wgs84");
+ // console.log(this.chousePointData, "gcj02");
+ // console.log(outdata, " wgs84");
this.$emit("setData", outdata);
// } else {
// this.$message.error("未成功选择地点");
@@ -52,6 +52,9 @@
},
},
methods: {
+ initData(address){
+ this.chousePointData = [address.jd,address.wd,address.addressName]
+ },
openMaps(data) {
//转wgs84
let ints = this.wgs84togcj02(data.jd, data.wd);
diff --git a/src/views/panorama/panorama.vue b/src/views/panorama/panorama.vue
index 259c521..df78bcc 100644
--- a/src/views/panorama/panorama.vue
+++ b/src/views/panorama/panorama.vue
@@ -235,17 +235,23 @@
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then((res) => {
this.form = res.data.data
+ var address = {
+ jd: this.form.jd+'',
+ wd: this.form.wd+'',
+ addressName: this.form.addressName,
+ }
+ this.$refs.chousePointRef.initData(address)
if (type == "edit") {
let that = this
this.$store.commit("readDom", {
this: that,
refName: "chousePointRef",
fn: (dom) => {
- dom.openMaps({
- jd: this.form.jd,
- wd: this.form.wd,
- name: this.form.addressName,
- })
+ dom.openMaps({
+ jd: this.form.jd,
+ wd: this.form.wd,
+ name: this.form.addressName,
+ })
},
})
}
--
Gitblit v1.9.3