管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-03-16 865fe880b2ee89fd7ac358fa48da5e9510864aa6
src/views/Synthesis/LeftMenu.vue
@@ -17,6 +17,7 @@
    <queryinfo ref="queryinfo" />
    <terrainDig ref="terrainDig" />
    <modelAttach ref="modelAttach" />
    <undergroundModel ref="undergroundModel" />
    <input
      type="file"
      accept=".kml"
@@ -184,50 +185,6 @@
          </el-tab-pane>
        </el-tabs>
        <!-- <el-form :model="formInline">
          <el-form-item>
            <el-row :gutter="20">
              <el-col :span="20">
                <el-input
                  size="small"
                  disabled
                  v-model="formInline.file"
                ></el-input>
                <input
                  name="file1"
                  type="file"
                  id="insertFile"
                  multiple="multiple"
                  style="display: none"
                  @change="insertFile( )"
                />
              </el-col>
              <el-col :span="4">
                <el-link
                  @click="getInsertFile( )"
                  :underline="false"
                  icon="el-icon-folder"
                > </el-link>
              </el-col>
            </el-row>
          </el-form-item>
          <el-form-item>
            <el-button
              @click="setAttachInsert"
              size="mini"
              type="primary"
              plain
            >添加</el-button>
            <el-button
              type="danger"
              plain
              size="mini"
              @click="setAttachDel"
            >删除</el-button>
          </el-form-item>
        </el-form> -->
        <!--     @selection-change="handleAttatchChange" -->
      </div>
    </el-dialog>
@@ -241,6 +198,7 @@
import queryinfo from "../Tools/queryinfo.vue";
import terrainDig from "../Tools/terrainDig.vue";
import modelAttach from "../Tools/ModelAttach.vue";
import undergroundModel from "../Tools/undergroundModel";
import $ from "jquery";
import { getToken } from "@/utils/auth";
import ImageWMS from "ol/source/ImageWMS";
@@ -255,7 +213,11 @@
  comprehensive_deletes,
  comprehensive_selectModelByPageAndCount,
  comprehensive_insertModel,
  comprehensive_updateModel, selectByBuffer
  comprehensive_updateModel, selectByBuffer,
  dataQuery_selectTabByEntity,
  inquiry_selectDomains,
  inquiry_selectFields,
  dataQuery_selectByGid,
} from '../../api/api.js'
import {
  OverviewMap,
@@ -268,7 +230,7 @@
import { geometry } from "@turf/turf";
export default {
  components: { mapinfo, maplayer, queryinfo, terrainDig, modelAttach },
  components: { mapinfo, maplayer, queryinfo, terrainDig, modelAttach, undergroundModel },
  data() {
    return {
      showTwoMenuFlag: false,
@@ -2202,8 +2164,11 @@
          this.$store.state.isNaviget = this.isNaviget;
          break;
        case "b9": //地下模式
          this.UndergroundMode = !this.UndergroundMode;
          window.sgworld.Analysis.UndergroundMode(this.UndergroundMode, 0.3);
          // this.UndergroundMode = !this.UndergroundMode;
          // window.sgworld.Analysis.UndergroundMode(this.UndergroundMode, 0.3);
          this.$refs &&
            this.$refs.undergroundModel &&
            this.$refs.undergroundModel.open("地下模式", null,);
          break;
      }
    },
@@ -2368,19 +2333,80 @@
          name: tab.replaceAll("_", "")
        }
        this.$refs &&
          this.$refs.queryinfo &&
          this.$refs.queryinfo.close("queryinfo");
        this.$store.state.mapPopBoxFlag = "4";
        const res = await dataQuery_selectTabByEntity({
          name: this.$store.state.pickoption.name
        })
        if (res.code != 200) {
          return;
        }
        var value = res.result.split('.')
        this.$store.state.propertiesName = {
          ns: value[0],
          enName: value[1],
          tabDesc: '拾取信息'
        }
        var name = this.$store.state.pickoption.name;
        const data = await inquiry_selectFields({ name: name })
        if (data.code != 200) {
          this.$message.error("列表调用失败")
        }
        const data1 = await inquiry_selectDomains({ name: name })
        if (data1.code != 200) {
          this.$message.error("列表调用失败")
        }
        this.optionx = []
        this.attributeData = []
        var valadata = data.result
        var laydomain = data1.result
        for (var i in valadata) {
          if (valadata[i].showtype == 1) {
            if (
              valadata[i].domainNa != null &&
              valadata[i].domainNa != undefined
            ) {
              for (var j in laydomain) {
                if (laydomain[j].domName == valadata[i].domainNa) {
                  valadata[i].domainNa = laydomain[j].codeDesc
                }
              }
            }
            this.optionx.push(valadata[i])
            this.attributeData.push(valadata[i])
          }
        }
        this.$refs &&
          this.$refs.queryinfo &&
          this.$refs.queryinfo.open("拾取分析", null,);
        this.getTableData()
      }
    },
    async getTableData() {
      this.tableData = []
      const data = await dataQuery_selectByGid(this.$store.state.pickoption)
      if (data.code != 200) {
        return
      }
      var valste = data.result
      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
        }
      }
      var arr = {}
      for (var i = (this.attributeData.length - 1); i >= 0; i--) {
        var vla = this.attributeData[i]
        arr[vla.alias] = valste[vla.field]
      }
      arr['eventid'] = valste.eventid
      this.$store.state.propertiesInfo = arr;
      this.$store.state.propertiesFlag = '1'
    },
    showModelAttach() {
      if (this.$store.state.attachModel) {