| | |
| | | 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("未成功选择地点"); |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | initData(address){ |
| | | this.chousePointData = [address.jd,address.wd,address.addressName] |
| | | }, |
| | | openMaps(data) { |
| | | //转wgs84 |
| | | let ints = this.wgs84togcj02(data.jd, data.wd); |
| | |
| | | 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, |
| | | }) |
| | | }, |
| | | }) |
| | | } |