liuyg
2022-03-31 e8ed1c487ea1f9bc19694bc60a0328a7fc76134a
src/views/hd/getMapDataInThere.vue
@@ -166,24 +166,31 @@
        that.ourDatas[k].id = +k + 1;
      }
    }
    //判断dom是否存在
    this.checkDom("getMapDataRefs", (dom) => {
      //提供数据
      dom.onceOnlodad(that.ourDatas);
    });
    this.nowId = +this.ourDatas.length + 1;
  },
  methods: {
    openDrawLineMethod() {
      //添加线路的对象
      let id = this.nowId++;
      this.ourDatas.push({
        label: "路径" + +id,
        value: "",
        name: "",
        notPath: false,
        //notpath判断是否验证通过的提示 2 为不通过
        isLine: true,
        //isLine来判断是否是线
        id: +id,
        //id确定不重复
      });
    },
    openDrawPointMethod() {
      //添加点的对象
      let id = this.nowId++;
      this.ourDatas.push({
        label: "标点" + +id,
@@ -195,9 +202,11 @@
      });
    },
    deleteRowOurs(index) {
      //删除
      this.ourDatas.splice(index, 1);
    },
    backMapDataOurData(val, index) {
      //在地图内useMapData方法中触发
      if (val == "line") {
        this.ourDatas[index].value = this.rotesData;
      } else if (val == "point") {
@@ -211,6 +220,7 @@
    //以上是添加数据集方法
    //选择map数据
    openMap(val, num, value) {
      //开始对地图做操作
      this.MapDataShow = true;
      this.openTitle = val;
      this.$refs.getMapDataRefs.init(val, num, value);