管道基础大数据平台系统开发-【前端】-新系統界面
surprise
2024-02-05 fb98e10c76d7e6c2d01f3a9f8c1b727f905cbdca
src/views/Synthesis/LeftMenu.vue
@@ -245,7 +245,7 @@
            <el-button
              class="primary"
              size="small"
              @click="getInsertDown"
              @click="getInsertDownz()"
            >{{
              $t("common.confirm")
            }}</el-button>
@@ -441,6 +441,12 @@
            name: "地下模式",
            css: "twoMenu_imge29",
          },
          // {
          //   id: "b10",
          //   label: "synthesis.undergroundMode",
          //   name: "瓦片下载",
          //   css: "twoMenu_imge29",
          // },
        ],
        [
          {
@@ -1723,7 +1729,7 @@
                new Cesium.Cesium3DTileset({
                  name: res.cnName,
                  url: modelUrl + "/tileset/m/SN/tileset.json",
                  maximumScreenSpaceError: 64, // 最大屏幕空间错误:16
                  maximumScreenSpaceError: modelUrl.indexOf("/pnts/") > -1 ? 16 : 64, // 最大屏幕空间错误:16
                  maximumMemoryUsage: 768, // 最大内存:512
                  dynamicScreenSpaceError: true, // 减少离相机较远的屏幕空间错误:false
                  skipLevelOfDetail: true, // 在遍历时候跳过详情:false
@@ -1790,6 +1796,7 @@
              new Cesium.UrlTemplateImageryProvider({
                url: localUrl,
                maximumLevel: 22,
                enablePickFeatures: false
              })
            );
            Viewer.imageryLayers.lowerToBottom(window.contRastLayer);//将图层移到最底层
@@ -2229,11 +2236,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 +2463,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 +2484,7 @@
      //     }
      //   });
      // }
      this.$store.state.oldTree = val;
      this.$store.state.treeData = res;
      this.$store.state.checkedKeys = checkKey;
@@ -2480,6 +2494,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 +2518,7 @@
      }
      if (std[0].length != 0) {
        if (this.$store.state.pigCode) {
          this.setPrjidWmsLayer(std[0])
        } else {
@@ -2510,7 +2531,7 @@
      var layer = [];
      var sql = [];
      var dirid = this.$store.state.pigCode
      var that = this;
      for (var i in res) {
        layer.push(res[i].url)
@@ -2524,6 +2545,7 @@
      layer = layer.reverse();
      sql = sql.reverse().join(";")
      var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat("html", null, function (html) {
        that.getFeatureInfo(html)
      });
      window.layerWMS = new Cesium.WebMapServiceImageryProvider({
@@ -2543,7 +2565,8 @@
        tileHeight: 512,
      });
      layerWMS.name = "Wms_Layer";
      window.Viewer.scene.imageryLayers.addImageryProvider(window.layerWMS);
      window.Viewer.imageryLayers.addImageryProvider(window.layerWMS);
      var layer2 = new Image({
        name: "Wms_Layer",
        source: new ImageWMS({
@@ -2583,6 +2606,7 @@
      }
    },
    setAddWmsLayer(res) {
      var url = [];
      for (var i in res) {
        if (res[i].url) {
@@ -2611,7 +2635,7 @@
        tileHeight: 512,
      });
      layerWMS.name = "Wms_Layer";
      window.Viewer.scene.imageryLayers.addImageryProvider(window.layerWMS);
      window.Viewer.imageryLayers.addImageryProvider(window.layerWMS);
      var layer2 = new Image({
        name: "Wms_Layer",
        source: new ImageWMS({
@@ -2636,12 +2660,19 @@
      start = html.lastIndexOf(tab) + tab.length + 1;
      end = html.indexOf("</td>", start);
      var gid = html.substr(start, end - start);
      if (gid && tab) {
        this.$store.state.pickoption = {
          gid: gid,
          name: tab.replaceAll("_", "")
        }
        if (tab == 'm_surface_deformation_data') {
          this.$store.state.surfaceDeForm.flag = true;
          this.$store.state.surfaceDeForm.gid = gid;
        } else {
          this.$store.state.surfaceDeForm.flag = false;
          this.$store.state.surfaceDeForm.gid = null;
        }
        const res = await dataQuery_selectTabByEntity({
          name: this.$store.state.pickoption.name
        })
@@ -2668,6 +2699,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 (
@@ -2676,17 +2708,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 = []
@@ -2696,7 +2756,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 (
@@ -2710,9 +2780,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'
@@ -3019,7 +3110,7 @@
      this.dialogInsertVisible = true;
    },
    downloadx() {
      this.$bus.$emit("setInsertDown", this.codeForm)
      this.$bus.$emit("setInsertDown1", this.codeForm)
      this.closeDownx();
    },
    handleCloseDown1() {
@@ -3054,10 +3145,12 @@
        })
        .catch(_ => { })
    },
    getInsertDown() {
    getInsertDownz() {
      this.dialogInsertVisible = false;
      this.dialogVisible1 = true;
      // this.dialogVisible1 = true;
      // 
      this.$bus.$emit("setInsertApply1", this.ruleForm)
    },
    handleExtentClose() {
      this.dialogExtentVisible = false
@@ -3070,6 +3163,7 @@
    }
  },
  mounted() {
    this.$bus.$off();
    this.measureData = new Map();
    this.colorAll = {
      point: Cesium.Color.fromCssColorString("#ff0000"),
@@ -3093,18 +3187,22 @@
    });
    this.$store.state.isProjectLayer = [],
      this.$store.state.pigCode = null,
      this.$store.state.showAllLayers = true;
    this.$store.state.isProjectLayer = [];
    this.$store.state.pigCode = null;
    this.$store.state.showAllLayers = true;
    this.$store.state.layerMnage = false;
    this.$store.state.treeData = null;
    this.$store.state.checkedKeys = [];
    // this.setCoverage("a1");
    this.layersStart();
    // this.layersStart();
    this.$bus.$on('addImageLayer',  (res)=>{
      if(res){
        this.layersStart();
      }
    });
    this.$bus.$on("setDialogInsertVisible", (res) => {
      if (res == true) {
        this.dialogVisible1 = true;
      } else {