管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-01-17 93a38ac31615b1aa053a4440c59814ea72353945
src/views/Thematic/index.vue
@@ -415,6 +415,7 @@
      } else if (vid.indexOf('c') != -1) {
        var url = geoserverWFSLine + '%27' + res.name + '%27';
        axios.get(url).then((res) => {
          if (res.status == 200) {
            if (res.data.features.length == 0) return;
            var std = [];
@@ -422,15 +423,31 @@
              var featurLayer = res.data.features[i];
              var path = featurLayer.geometry.coordinates[0];
              for (var j in path) {
                std.push(path[j][0], path[j][1], 50);
                // std.push(path[j][0], path[j][1], 50);
                std.push(path[j])
              }
            }
            this.showPathLine(std);
            var str = this.removeRepeat1(std);
            var val = [];
            for (var i in str) {
              val.push(str[i][0], str[i][1], 50);
            }
            this.showPathLine(val)
          }
        });
      }
    },
    removeRepeat1(arr) {
      const obj = {};
      return arr.filter(item => {
        if (!obj[item.toString()]) {
          obj[item.toString()] = item.toString();
          return item;
        }
      });
    },
    showPathLine(res) {
      window.sgworld.Creator.getFlyData(res, (data) => {
@@ -580,7 +597,7 @@
    setAddImageLayer(res) {
      let layerWMS = new Cesium.WebMapServiceImageryProvider({
        url: geoServerURl,
        layers:res.resource,
        layers: res.resource,
        parameters: {
          transparent: true,
          format: 'image/png',