管道基础大数据平台系统开发-【前端】-新系統界面
src/components/MapView/mapSpacePop.vue
@@ -359,7 +359,9 @@
        { 'name': '卵石', 'color': 'rgba(54,83,173,1)' },
        { 'name': '泥岩', 'color': 'rgba(47,30,13,1)' },
        { 'name': '细砂', 'color': 'rgba(93,88,15,1)' },
        { 'name': '中砂', 'color': 'rgba(164,140,21,1)' }
        { 'name': '中砂', 'color': 'rgba(164,140,21,1)' },
        { 'name': '淤泥质土', 'color': 'rgba(75,74,78,1)' },
        { 'name': '其他', 'color': 'rgba(225,225,225,1)' },
      ]
    }
  },
@@ -498,23 +500,54 @@
      if (data.code != 200) {
        this.$message.error("列表调用失败")
      }
      this.filedsOption = [];
      const data1 = await inquiry_selectDomains({ name: this.spaceLayer })
      if (data1.code != 200) {
        this.$message.error("列表调用失败")
      }
      this.optionx = []
      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 (
            valadata[i].domainNa != null &&
            valadata[i].domainNa != undefined
          ) {
            valadata[i].domainNa = this.getMatchDomainNa(valadata[i].domainNa)
            for (var j in laydomain) {
              if (laydomain[j].domName == valadata[i].domainNa) {
                // valadata[i].domainNa = laydomain[j].codeDesc
              }
            }
          }
          this.optionx.push(valadata[i])
          this.filedsOption.push(valadata[i])
          // this.attributeData.push(valadata[i])
          // this.optionx.push(valadata[i])
          this.attributeData.push(valadata[i])
        }
      }
      this.startFiledAndcondition();
      // this.filedsOption = [];
      // this.optionx = []
      // var valadata = data.result
      // for (var i in valadata) {
      //   if (valadata[i].showtype == 1) {
      //     if (
      //       valadata[i].domainNa != null &&
      //       valadata[i].domainNa != undefined
      //     ) {
      //       valadata[i].domainNa = this.getMatchDomainNa(valadata[i].domainNa)
      //     }
      //   }
      // }
      // this.startFiledAndcondition();
      this.showSpacePopLayer()
    },
    appendQueryFilter() {
@@ -643,21 +676,41 @@
      })
      var val_Data = data.result
      this.count = data.count
      for (var i in val_Data) {
        var valste = val_Data[i]
        for (var j in this.optionx) {
          if (
            this.optionx[j].domainNa != null &&
            this.optionx[j].domainNa != undefined
          ) {
            valste[this.optionx[j].field] = this.optionx[j].domainNa
      for (var i in val) {
        var meson = this.optionx.filter(res => {
          if (res.domCode == val[i].medium) {
            return res
          }
        })
        if (meson.length > 0) {
          val[i].medium = meson[0].codeDesc
        } else {
          val[i].medium = ''
        }
      }
      }
      // debugger
      // // debugger
      // // // for (var i in val_Data) {
      // // //   var valste = val_Data[i]
      // // //   for (var j in this.optionx) {
      // // //     if (
      // // //       this.optionx[j].domainNa != null &&
      // // //       this.optionx[j].domainNa != undefined
      // // //     ) {
      // // //       console.log(this.optionx[j])
      // // //       // valste[this.optionx[j].field] = this.optionx[j].domainNa
      // // //     }
      // // //   }
      // // // }
      // // for (var j in this.optionx) {
      // //   console.log(this.optionx[j].domainNa)
      // //   // if (this.optionx[j].alias == '输送介质') {
      // //   //   console.log(this.optionx[j].domainNa)
      // //   // }
      // // }
      this.tableData = val
      this.$refs.filterTable.doLayout()
@@ -787,91 +840,160 @@
        pageIndex: 1,
        pageSize: res,
        wkt: this.listdata.wkt,
        name: this.listdata.name
        name: this.listdata.name,
        hasGeom: 1,
      }
      const data = await dataQuerySelectByPage(obj)
      if (data.code != 200) {
        return
      }
      var val = data.result;
      for (var i in val) {
        this.setShowHistogramLayer(val[i])
      }
      // for (var i in val) {
      this.setShowHistogramLayer(val)
      // }
    },
    async setShowHistogramLayer(res) {
      var param = {
        gid: res.gid,
        name: this.spaceLayer,
      }
      var gid = [];
      for (var i in res) {
      const data1 = await dataQuerySelectWktById(param)
      if (data1.code != 200) {
        this.$message.error("列表调用失败")
        gid.push(res[i].exppointid)
      }
      var val1 = decr(data1.result)
      var wkt = this.$wkt.parse(val1)
      var coord = wkt.coordinates
      // var param = {
      //   gid: res.gid,
      //   name: this.spaceLayer,
      // }
      // const data1 = await dataQuerySelectWktById(param)
      // if (data1.code != 200) {
      //   this.$message.error("列表调用失败")
      // }
      // var val1 = decr(data1.result)
      // var wkt = this.$wkt.parse(val1)
      // var coord = wkt.coordinates
      var obj = {
        pageIndex: 1,
        pageSize: 10,
        pageSize: 100000000,
        name: 'sexplorationpointstratum',
        filter: "exppointid = '" + res.exppointid + "'"
        filter: "exppointid in '" + gid.toString() + "'"
      }
      var data = await dataQuerySelectByPage(obj)
      if (data.code != 200) { return }
      if (data.result.length == 0) {
        return this.$message('查无数据');
      }
      for (var i in res) {
        this.setHistogramLayer(res[i], data.result)
      }
      // if (data.result.length != 0) {
      //   var val = data.result;
      // //冒泡排序
      // for (var i = 0; i < val.length; i++) {
      //   for (var u = i + 1; u < val.length; u++) {
      //     if (val[i].botdepth > val[u].botdepth) {
      //       var num = val[i];
      //       val[i] = val[u];
      //       val[u] = num;
      //     }
      //   }
      // }
      if (data.result.length != 0) {
        var val = data.result;
        // //冒泡排序
        // for (var i = 0; i < val.length; i++) {
        //   for (var u = i + 1; u < val.length; u++) {
        //     if (val[i].botdepth > val[u].botdepth) {
        //       var num = val[i];
        //       val[i] = val[u];
        //       val[u] = num;
        //     }
        //   }
        // }
        var outlineList = this.outlineList
        var num = res.elev;
        var height = 0;
        for (var i = 0; i < val.length; i++) {
          var line;
      //   var num = res.elev;
      //   var height = 0;
      //   for (var i = 0; i < val.length; i++) {
      //     var line;
          var geoname = val[i].geoname;
          var col = outlineList.filter((res) => {
            if (res.name == geoname) {
      //     var geoname = val[i].geoname;
      //     var col = outlineList.filter((res) => {
      //       if (res.name == geoname) {
      //         return res
      //       }
      //     })
      //     line = col[0].color
      //     var height = num - val[i].botdepth
      //     var layer = Viewer.entities.add({
      //       position: Cesium.Cartesian3.fromDegrees(coord[0], coord[1]),
      //       tag: 'Histogram',
      //       properties: val[i],
      //       ellipse: {
      //         semiMinorAxis: 1.0, //短轴
      //         semiMajorAxis: 1.0, //长轴
      //         height: height, //拉伸高度    elev  gwaterdep
      //         extrudedHeight: num, //离地高度
      //         rotation: Cesium.Math.toRadians(0), //旋转
      //         fill: true, //是否显示圆的填充
      //         material: Cesium.Color.fromCssColorString(line), //圆的颜色,
      //         outline: false, //是否显示圆轮廓
      //       },
      //     });
      //     num -= val[i].botdepth;
      //     this.$store.state.histogramLayer.push(layer)
      //   }
      // } else {
      //
      // }
      //
    },
    setHistogramLayer(res, data) {
      var exppointid = res.exppointid;
      var val1 = decr(res.geom)
      var wkt = this.$wkt.parse(val1)
      var coord = wkt.coordinates;
      var std = [];
      var num = res.elev;
      var height = 0;
      for (var i in data) {
        if (data[i].exppointid == exppointid) {
          std.push(data[i])
        }
      }
      var outlineList = this.outlineList;
      for (var i in std) {
        var line;
        var geoname = std[i].geoname;
        var col = outlineList.filter((ste) => {
          if (ste.name == geoname) {
            return res
          }
        })
        console.log(1, col)
        if (col.length == 0) {
          col = outlineList.filter((ste) => {
            if (ste.name == '其他') {
              return res
            }
          })
          line = col[0].color
          var height = num - val[i].botdepth
          var layer = Viewer.entities.add({
            position: Cesium.Cartesian3.fromDegrees(coord[0], coord[1]),
            tag: 'Histogram',
            properties: val[i],
            ellipse: {
              semiMinorAxis: 1.0, //短轴
              semiMajorAxis: 1.0, //长轴
              height: height, //拉伸高度    elev  gwaterdep
              extrudedHeight: num, //离地高度
              rotation: Cesium.Math.toRadians(0), //旋转
              fill: true, //是否显示圆的填充
              material: Cesium.Color.fromCssColorString(line), //圆的颜色,
              outline: false, //是否显示圆轮廓
            },
          });
          num -= val[i].botdepth;
          this.$store.state.histogramLayer.push(layer)
        }
      } else {
        return this.$message('查无数据');
        line = col[0].color
        var height = num - std[i].botdepth
        var layer = Viewer.entities.add({
          position: Cesium.Cartesian3.fromDegrees(coord[0], coord[1]),
          tag: 'Histogram',
          properties: std[i],
          ellipse: {
            semiMinorAxis: 1.0, //短轴
            semiMajorAxis: 1.0, //长轴
            height: height, //拉伸高度    elev  gwaterdep
            extrudedHeight: num, //离地高度
            rotation: Cesium.Math.toRadians(0), //旋转
            fill: true, //是否显示圆的填充
            material: Cesium.Color.fromCssColorString(line), //圆的颜色,
            outline: false, //是否显示圆轮廓
          },
        });
        num -= std[i].botdepth;
        this.$store.state.histogramLayer.push(layer)
      }
      this.$store.state.histLenged = true;
    },
@@ -918,47 +1040,51 @@
          pageIndex: 1,
          pageSize: this.geobodyCount,
          wkt: this.listdata.wkt,
          name: this.listdata.name
          name: this.listdata.name,
          hasGeom: 1,
        }
        const data = await dataQuerySelectByPage(obj)
        if (data.code != 200) {
          return
        }
        var gid = [];
        var val = data.result;
        var std = [];
        for (var i in val) {
          var param = {
            gid: val[i].gid,
            name: this.spaceLayer,
          }
          gid.push(val[i].exppointid)
        }
        var obj = {
          pageIndex: 1,
          pageSize: 100000000,
          name: 'sexplorationpointstratum',
          filter: "exppointid in '" + gid.toString() + "'"
        }
        var data2 = await dataQuerySelectByPage(obj)
          const data1 = await dataQuerySelectWktById(param)
          if (data1.code != 200) {
            this.$message.error("列表调用失败")
          }
          var val1 = decr(data1.result)
          var wkt = this.$wkt.parse(val1)
          var coord = wkt.coordinates
          var obj = {
            pageIndex: 1,
            pageSize: 10,
            name: 'sexplorationpointstratum',
            filter: "exppointid = '" + val[i].exppointid + "'"
          }
          var data2 = await dataQuerySelectByPage(obj)
        if (data2.code == 200) {
          var val2 = data2.result;
          var std = [];
          for (var i in val) {
            var soilLayers = [];
          if (data2.code == 200) {
            for (var j in val2) {
              if (val2[j].exppointid == val[i].exppointid) {
                soilLayers.push(val2[j])
              }
            }
            var val1 = decr(val[i].geom)
            var wkt = this.$wkt.parse(val1)
            var coord = wkt.coordinates
            std.push({
              bh: val[i].exppointid,
              X: coord[0],
              Y: coord[1],
              Z: val[i].elev,
              soilLayers: data2.result
              soilLayers: soilLayers
            })
          }
          this.setLayerByZFBH(std);
        }
        this.setLayerByZFBH(std);
      } else {
        return this.$message('未查询到转孔点数据,无法生成地质体');
      }
@@ -971,7 +1097,9 @@
        { 'name': '卵石', 'color': [54, 83, 173, 1] },
        { 'name': '泥岩', 'color': [47, 30, 13, 1] },
        { 'name': '细砂', 'color': [93, 88, 15, 1] },
        { 'name': '中砂', 'color': [164, 140, 21, 1] }
        { 'name': '中砂', 'color': [164, 140, 21, 1] },
        { 'name': '淤泥质土', 'color': [75, 74, 78, 1] },
        { 'name': '其他', 'color': [225, 225, 225, 1] }
      ]
      for (var i = 0; i < list.length; i++) {
        var out_color = list[i].color