智慧农业后台管理页面
guoshilong
2022-10-15 2696e8c6f53b4c3f826789ab3d10446c0d54a822
全景管理编辑时地址回显
2 files modified
23 ■■■■■ changed files
src/components/mapOncePoint/chousePoint.vue 7 ●●●● patch | view | raw | blame | history
src/views/panorama/panorama.vue 16 ●●●●● patch | view | raw | blame | history
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);
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,
                              })
                            },
                        })
                    }