管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-05-27 0af4ecb9b2047b8ba6d00e891050cf2d68b829a6
src/views/Synthesis/LeftMenu.vue
@@ -441,6 +441,12 @@
            name: "地下模式",
            css: "twoMenu_imge29",
          },
          // {
          //   id: "b10",
          //   label: "synthesis.undergroundMode",
          //   name: "瓦片下载",
          //   css: "twoMenu_imge29",
          // },
        ],
        [
          {
@@ -2229,11 +2235,16 @@
      }
    },
    addAnalysisFlood() {
      var url = window.location.href;
      var testurl = "";
      if (url.indexOf("web") != -1) {
        testurl = "/web";
      }
      var method = {
        pointSelect: true,
        spood: 20,
        GroupID: 0,
        url: "/SmartEarthSDK/Workers/image/33.gif",
        url: testurl + "/SmartEarthSDK/Workers/image/33.gif",
      };
      window.AnalysisFlood = sgworld.Command.execute(
        2,
@@ -2451,13 +2462,15 @@
        if (str.url != null && str.type == 2 && str.isShow == 1) {
          return str;
        }
      })
      var layer = std.filter((str) => {
        if (str.isProject == 1 && str.type == 2) {
          this.$store.state.isProjectLayer.push(str);
        }
      })
      this.setAddLayers(value);
      var res = this.setTreeData(val);
      this.$store.state.pigCode = null;
      //存储选中图层
@@ -2470,7 +2483,7 @@
      //     }
      //   });
      // }
      this.$store.state.oldTree = val;
      this.$store.state.treeData = res;
      this.$store.state.checkedKeys = checkKey;
@@ -2480,6 +2493,12 @@
      return cloneData.filter((father) => {
        // 循环所有项
        let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据
        if (branchArr.length > 0) {
          branchArr.sort(function (a, b) {
            return a.orderNum - b.orderNum
          })
        }
        branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值
        // 属于同一对象问题,例如:令 a=b、c=1 ,然后再令 b.c=c , 那么 a.c=b.c=c=1 ;同理,后续令 c.d=2 ,那么 a.c.d 也是=2;
        // 由此循环多次后,就能形成相应的树形数据结构
@@ -2498,6 +2517,7 @@
      }
      if (std[0].length != 0) {
        if (this.$store.state.pigCode) {
          this.setPrjidWmsLayer(std[0])
        } else {
@@ -2584,6 +2604,7 @@
      }
    },
    setAddWmsLayer(res) {
      var url = [];
      for (var i in res) {
        if (res[i].url) {
@@ -2669,6 +2690,7 @@
        this.attributeData = []
        var valadata = data.result
        var laydomain = data1.result
        this.optionx = data1.result
        for (var i in valadata) {
          if (valadata[i].showtype == 1) {
            if (
@@ -2677,17 +2699,45 @@
            ) {
              for (var j in laydomain) {
                if (laydomain[j].domName == valadata[i].domainNa) {
                  valadata[i].domainNa = laydomain[j].codeDesc
                  // valadata[i].domainNa = laydomain[j].codeDesc
                }
              }
            }
            this.optionx.push(valadata[i])
            // this.optionx.push(valadata[i])
            this.attributeData.push(valadata[i])
          }
        }
        this.getTableData()
      }
    },
    //格式化时间
    format(shijianchuo) {
      //shijianchuo是整数,否则要parseInt转换
      var time = new Date(shijianchuo);
      var y = time.getFullYear();
      var m = time.getMonth() + 1;
      var d = time.getDate();
      var h = time.getHours();
      var mm = time.getMinutes();
      var s = time.getSeconds();
      return (
        y +
        '-' +
        this.add0(m) +
        '-' +
        this.add0(d) +
        ' ' +
        h +
        ':' +
        mm +
        ':' +
        s
      );
    },
    //格式化时间
    add0(m) {
      return m < 10 ? '0' + m : m;
    },
    async getTableData() {
      this.tableData = []
@@ -2697,7 +2747,17 @@
      }
      var valste = data.result
      valste.dirid = valste.dirName;
      valste.depid = valste.depName;
      valste.verid = valste.verName;
      valste.createuser = valste.createName;
      valste.updateuser = valste.updateName;
      if (valste.createtime) {
        valste.createtime = this.format(valste.createtime)
      }
      if (valste.updatetime) {
        valste.updatetime = this.format(valste.updatetime)
      }
      for (var j in this.optionx) {
        if (
@@ -2711,9 +2771,30 @@
      var arr = {}
      for (var i = (this.attributeData.length - 1); i >= 0; i--) {
        var vla = this.attributeData[i]
        arr[vla.alias] = valste[vla.field]
        if (vla.domainNa) {
          var val = this.optionx.filter(res => {
            if (res.domName == vla.domainNa && res.domCode == valste[vla.field]) {
              return res;
            }
          })
          var vlue = null
          if (val.length > 0) {
            vlue = val[0].codeDesc
          } else {
            vlue = ''
          }
          arr[vla.alias] = vlue
        } else {
          arr[vla.alias] = valste[vla.field]
        }
      }
      arr['eventid'] = valste.eventid
      this.$store.state.propertiesInfo = arr;
      this.$store.state.propertiesFlag = '1'
@@ -3108,7 +3189,6 @@
    this.$bus.$on("setDialogInsertVisible", (res) => {
      if (res == true) {
        this.dialogVisible1 = true;
      } else {