管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-04-06 5685babbcf4eb0b1cbbe1385472d862ce5fbb410
src/components/MapView/mapMenuPop.vue
@@ -226,6 +226,8 @@
      optionx: [],
      imagePoint: null,
      Layerprimit: null,
      insertOption: null,
      isflag: true,
    }
  },
  methods: {
@@ -233,9 +235,12 @@
      // this.dialogInsertVisible = false
      // this.dialogVisible = true
      if (this.isflag) {
        this.codeForm = res;
        this.download1();
        this.isflag = false
      }
      this.codeForm = res;
      this.download();
    },
    handleInsertClose() {
      this.$confirm("确认关闭?")
@@ -309,7 +314,7 @@
        encrypt.setPublicKey(res.result)
      }
    },
    async download() {
    async download1() {
      if (this.codeForm.password == "") return
      var entities = [];
@@ -417,39 +422,45 @@
      // }
    },
    async getInsertApply(res) {
      var entities = [];
      var tabs = [];
      for (var i in this.option) {
        entities.push(this.option[i].entity)
        tabs.push(this.option[i].tabDesc)
      }
      var std = [];
      for (var i in this.ruleForm.depname) {
        std.push(this.ruleForm.depname[i].name)
      }
      var obj = {
        pwd: encr(this.codeForm.password),
        entities: entities,
        wkt: this.listdata.wkt,
        filter: null,
        ids: null,
        depcode: null,
        dirs: null,
        depcodes: std,
        descr: res.descr,
        tabs: tabs
      }
      const data = await apply_insertApply(JSON.stringify(obj))
      if (data.code != 200) {
        this.$message.error("数据申请失败")
        return
      }
      this.$message({
        message: "数据申请成功",
        type: "success",
      })
      if (!this.isflag) {
        var entities = [];
        var tabs = [];
        if (this.option.length != res.tabs.length) {
          return
        }
        for (var i in this.option) {
          entities.push(this.option[i].entity)
          tabs.push(this.option[i].tabDesc)
        }
        var std = [];
        for (var i in this.ruleForm.depname) {
          std.push(this.ruleForm.depname[i].name)
        }
        var obj = {
          pwd: encr(this.codeForm.password),
          entities: entities,
          wkt: this.listdata.wkt,
          filter: null,
          ids: null,
          depcode: null,
          dirs: null,
          depcodes: std,
          descr: res.descr,
          tabs: tabs
        }
        const data = await apply_insertApply(JSON.stringify(obj))
        if (data.code != 200) {
          this.$message.error("数据申请失败")
          return
        }
        this.$message({
          message: "数据申请成功",
          type: "success",
        })
        this.isflag = true;
      }
    },
@@ -478,6 +489,7 @@
        "&pwd=" +
        encodeURIComponent(rspwd)
      $("#Iframe1").attr("src", url).click()
      // this.isflag = true;
    },
    handleCloseDown() {
      this.$confirm("确认关闭?")
@@ -917,18 +929,26 @@
    },
  },
  created() {
    this.setTableAll()
  },
  mounted() {
    this.$bus.$on("changeMapMenuTop", res => {
      if (res == "true") {
        this.setTableAll()
      }
    })
    this.$bus.$on("setInsertDown", res => {
    this.$bus.$on("setInsertDown2", res => {
      this.getInsertDown(res)
    })
    this.$bus.$on("setInsertApply", res => {
    this.$bus.$on("setInsertDown1", res => {
      this.getInsertDown(res)
    })
    this.$bus.$on("setInsertApply1", res => {
      this.getInsertApply(res)
    })
  },