管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-09-21 c2a6c53657baaf0830cd881e1a23a15af23ac6fa
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("确认关闭?")
@@ -490,7 +502,7 @@
      this.dialogVisible = false
      this.codeForm.password = ""
      this.codeForm.repassword = ""
      this.closeInsertDown()
      // this.closeInsertDown()
    },
    startTableMssage() {
      this.listdata.pageIndex = 1
@@ -531,14 +543,21 @@
      this.getTableDateHidder()
    },
    async getTableDateHidder() {
      this.$store.state.loading = true;
      const data = await inquiry_selectFields({ name: this.listdata.name })
      if (data.code != 200) {
        this.$message.error("列表调用失败")
      }
      if (data.result.length == 0) {
        this.$message("列表字段查无数据")
      }
      const data1 = await inquiry_selectDomains({ name: this.listdata.name })
      if (data1.code != 200) {
        this.$message.error("列表调用失败")
      }
      // if (data.result.length == 0) {
      //   this.$message("列表阈值查无数据")
      // }
      this.optionx = []
      this.attributeData = []
      var valadata = data.result
@@ -571,7 +590,9 @@
      if (data.code != 200) {
        this.$message.error("列表调用失败")
      }
      // if (data.result.length == 0) {
      //   return this.$message.error("列表查无数据")
      // }
      var val1 = decr(data.result)
      if (val1) {
        if (this.imagePoint != null) {
@@ -715,9 +736,15 @@
      this.tableData = []
      const data = await dataQuery_selectByPage(this.listdata)
      this.$store.state.loading = false;
      if (data.code != 200) {
        this.$message.error("列表调用失败")
        return this.$message.error("列表调用失败")
      }
      if (data.result.length == 0) {
        return this.$message.error("列表查无数据")
      }
      var val_Data = data.result
      for (var i in val_Data) {
@@ -917,18 +944,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.isflag = true;
      this.getInsertDown(res)
    })
    this.$bus.$on("setInsertApply1", res => {
      this.getInsertApply(res)
    })
  },