管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-01-16 21ddc9ec1b1b76d2ce20e512328e65acaf1af2bf
src/views/Tools/pipeLineAnaly.vue
@@ -32,8 +32,7 @@
                v-for="item in options2"
                :key="item.gid"
                :label="item.segName"
                :value="item.segName"
                gid
                :value="item.gid"
              >
              </el-option>
            </el-select>
@@ -241,7 +240,7 @@
        </el-form-item>
        <el-form-item>
          <el-button
            class="primary"
            type="info"
            size="small"
            @click="download "
          >{{$t('common.confirm')}}</el-button>
@@ -355,15 +354,16 @@
      },
      multipleSelection: [],
      featurTable: null,
      featureLayer: [],
    }
  },
  methods: {
    spaceLocation(index, row) {
      // var wkt = row.wkt;
      var wkt = row.wkt;
      // var wkt = 'POINT(115.18478138905392 40.57482771162533)'
      // var wkt = 'MULTIPOINT(115.93358953162945 40.479862914876286,115.92324938088053 40.47513850651151)'
      //var wkt = 'LINESTRING(116.29963795744581 40.412471126263874,116.30084981880705 40.411513388032716)'
      var wkt = 'MULTILINESTRING((115.87321225794265 40.452276576555455,115.87744445061348 40.45421026272125),(115.87918147829747 40.45500390957606,115.87983275512077 40.455301477546435))'
      // var wkt = 'MULTILINESTRING((115.87321225794265 40.452276576555455,115.87744445061348 40.45421026272125),(115.87918147829747 40.45500390957606,115.87983275512077 40.455301477546435))'
      var geojson = WKT.parse(wkt);
      this.claerAll();
@@ -506,11 +506,12 @@
      this.changeSelect2(res)
    },
    selectChange1(res) {
      this.analyGid = res;
    },
    changeSelect2(res) {
      this.options2 = [];
      var value = this.options1;
      var value = this.featureLayer;
      for (var i in value) {
        if (value[i].pipeName == res) {
          this.options2.push(value[i])
@@ -600,7 +601,7 @@
      this.changePageData();
    },
    changePageData() {
      var start = (this.pageData.pageIndex) * this.pageData.pageSize;
      var start = (this.pageData.pageIndex - 1) * this.pageData.pageSize;
      var end = start + this.pageData.pageSize;
      this.tableData = this.featurTable.slice(start, end);
    },
@@ -614,11 +615,22 @@
      this.changePageData();
    },
    async getAllData() {
      const data = await pipelines_selectSegNames();
      if (data.code != 200) {
        this.$message.error('列表调用失败');
      }
      this.options1 = data.result;
      var std = [];
      var str = [];
      var result = data.result;
      for (var i in result) {
        if (std.indexOf(result[i].pipeName) == -1) {
          std.push(result[i].pipeName);
          str.push(result[i])
        }
      }
      this.featureLayer = data.result;
      this.options1 = str;
      this.ruleFrom.value1 = this.options1[0].pipeName;
      this.changeSelect2(this.ruleFrom.value1)
    },