管道基础大数据平台系统开发-【前端】-新系統界面
584911253@qq.com
2023-03-10 eb6cfd90fd89f11263146dc4c38069c8a4845fab
src/views/Synthesis/LeftMenu.vue
@@ -93,17 +93,20 @@
                <el-input v-model="formInline.name"></el-input>
              </el-form-item>
              <el-form-item :label="$t('common.type')">
                <el-input v-model="formInline.type"></el-input>
                <el-select
                  v-model="formInline.type"
                  style="width:100%"
                >
                  <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <!-- <el-form-item :label="$t('common.info')">
                <el-input v-model="formInline.info"></el-input>
              </el-form-item>
              <el-form-item label="URL">
                <el-input v-model="formInline.url"></el-input>
              </el-form-item>
              <el-form-item label="Icon">
                <el-input v-model="formInline.icon"></el-input>
              </el-form-item> -->
              <el-form-item :label="$t('common.bak')">
                <el-input v-model="formInline.bak"></el-input>
              </el-form-item>
@@ -247,7 +250,8 @@
  comprehensive_selectFiles,
  comprehensive_deletes,
  comprehensive_selectModelByPageAndCount,
  comprehensive_insertModel
  comprehensive_insertModel,
  comprehensive_updateModel
} from "../../api/api.js";
import {
  OverviewMap,
@@ -643,6 +647,26 @@
      },
      activeName: "first",
      isShowModel: false,
      options: [
          {
        value: '倾斜模型',
        label: '倾斜模型'
      }, {
        value: 'BIM模型',
        label: 'BIM模型'
      }, {
        value: '点云模型',
        label: '点云模型'
      }, {
        value: '地质设计模型',
        label: '地质设计模型'
      }, {
        value: '人工模型',
        label: '人工模型'
      }, {
        value: '其他模型',
        label: '其他模型'
      }]
    };
  },
  methods: {
@@ -1023,6 +1047,7 @@
              },
            });
            this.entityaLayers.push(entity);
            sgworld.Navigate.flyToObj(entity)
            break;
          case "point":
            let point = Viewer.entities.add({
@@ -1043,6 +1068,7 @@
            });
            this.entityaLayers.push(point);
            sgworld.Navigate.flyToObj(point)
            break;
          case "polyline":
            var std = [];
@@ -1063,6 +1089,7 @@
            });
            this.entityaLayers.push(line);
            sgworld.Navigate.flyToObj(line)
            break;
          case "label":
            const label = Viewer.entities.add({
@@ -1081,6 +1108,7 @@
              },
            });
            this.entityaLayers.push(label);
            sgworld.Navigate.flyToObj(label)
            break;
        }
      }
@@ -1116,6 +1144,8 @@
              fileReader.result,
              kmlOptions
            );
            sgworld.Navigate.flyToObj(geocachePromise)
            geocachePromise.then(function (dataSource) {
              var geocacheEntities = dataSource.entities.values;
@@ -1384,15 +1414,17 @@
    setAnalsy(res) {
      //this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close("queryinfo");
      this.$bus.$emit("closeMenuPop", res);
      var that = this;
      switch (res) {
        case "d1": //等高线分析
          this.closePipelinePop();
          that.isolineFlag = !that.isolineFlag;
          elevationTool.tf = that.isolineFlag;
          elevationTool.render();
          break;
        case "d2": //坡度分析
          this.closePipelinePop();
          that.isslopeFlag = !that.isslopeFlag;
          var val = {
            name: "Lengend",
@@ -1411,6 +1443,7 @@
          break;
        case "d3": //路径分析
          this.closePipelinePop();
          this.isRouter = !this.isRouter;
          let value;
          if (this.isRouter) {
@@ -1429,6 +1462,7 @@
          this.$bus.$emit("mapChangeBox", value);
          break;
        case "d4": //剖面分析
          this.closePipelinePop();
          if (window.AnalysisDXPM) {
            window.AnalysisDXPM.end && window.AnalysisDXPM.end("cancel");
            this.clear(res);
@@ -1437,6 +1471,7 @@
          }
          break;
        case "d5": //洪水淹没分析
          this.closePipelinePop();
          if (window.AnalysisFlood) {
            this.clear(res);
          } else {
@@ -1444,6 +1479,7 @@
          }
          break;
        case "d6": //土方量分析
          this.closePipelinePop();
          if (window.TFvolumetricMeasurementTool) {
            TFvolumetricMeasurementTool.cleanUp();
            if (TFvolumetricMeasurementTool._mouseHandler) {
@@ -1476,6 +1512,7 @@
          }
          break;
        case "d7": //三维截面分析
          this.closePipelinePop();
          // if(window.MXModel) {
          //   Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
          //   window.MXModel=null;
@@ -1520,6 +1557,7 @@
          break;
        case "d8": //影像对比
          this.closePipelinePop();
          if (this.isContrastFlag == false) {
            this.isContrastFlag = true;
            sgworld.Analysis.createCurtainContrast(2, 1);
@@ -1529,6 +1567,7 @@
          }
          break;
        case "d10": //地面整平
          this.closePipelinePop();
          var val = {
            name: "Trrain",
            id: res,
@@ -1566,6 +1605,7 @@
          break;
        case "d11": //地形开挖
          this.closePipelinePop();
          // this.$refs &&
          //   this.$refs.terrainDig &&
          //   this.$refs.terrainDig.open("管道空间分析", null, {
@@ -1590,6 +1630,7 @@
          break;
        case "d12": //通视分析
          this.closePipelinePop();
          if (window.TSExcavation != null) {
            window.TSExcavation._SimpleGraphic.drawHandler &&
              window.TSExcavation._SimpleGraphic.drawHandler.destroy();
@@ -1606,6 +1647,7 @@
          }
          break;
        case "d13": //视域分析
          this.closePipelinePop();
          if (window.SYExcavatio) {
            window.SYExcavatio.end && window.SYExcavatio.end();
            window.SYExcavatio.close();
@@ -1625,6 +1667,7 @@
          }
          break;
        case "d14": //圆形时域分析
          this.closePipelinePop();
          if (window.YXSYExcavation) {
            window.YXSYExcavation.end && window.YXSYExcavation.end();
            window.YXSYExcavation.close();
@@ -1645,6 +1688,12 @@
          break;
      }
    },
    //关闭管道信息弹窗
    closePipelinePop(){
      this.$refs &&
      this.$refs.queryinfo &&
      this.$refs.queryinfo.close("queryinfo");
    },
    setclippingModel() {
      if (window.model) {
@@ -2016,13 +2065,19 @@
    },
    async showModelCatch() {
      if (this.$store.state.catModel) {
        this.startModelData();
        this.formInline = {
          title: '',
          file: '',
          name: '',
          type: '',
          info: '',
          icon: '',
          bak: ''
        }
        this.formInline.title = this.$store.state.catModelInfo.name;
        this.formInline.Id = this.$store.state.catModelInfo.id;
        this.formInline.LayerName = this.$store.state.catModelInfo.layerName;
        this.startModelData();
        this.activeName = "first"
        this.getAttacthFlieList();
        this.dialogVisible = true;
@@ -2034,25 +2089,54 @@
    async startModelData() {
      var obj = {
        layerid: this.$store.state.catModelInfo.layerId,
        pageIndex: 1,
        pageSize: 10,
        modelid: this.$store.state.catModelInfo.id
      }
      const data = await comprehensive_selectModelByPageAndCount(obj);
      const data = await comprehensive_selectModelByGuid(obj);
      if (data.code != 200) {
        return;
      }
      if (data.count == 0) {
      if (data.result == null) {
        this.isShowModel = true;
        this.formInline.name = this.formInline.title;
      } else {
        this.isShowModel = false;
        this.formInline = data.result;
        this.isShowModel = false;
        this.formInline.title = this.formInline.name;
      }
    },
    async EditData() {
      const data = await comprehensive_updateModel(this.formInline)
      if (data.code != 200) {
        this.$message.error('修改失败');
      } else {
        this.$message({
          message: '修改成功',
          type: 'success'
        });
      }
      this.startModelData();
    },
    async InsertData() {
      const data = await comprehensive_insertModel(this.formInline)
      debugger
      var std = {
        "bak": this.formInline.bak,
        "guid": this.$store.state.catModelInfo.id,
        "layerid": this.$store.state.catModelInfo.layerId,
        "modelid": this.$store.state.catModelInfo.id,
        "name": this.formInline.name,
        "type": this.formInline.type
      }
      const data = await comprehensive_insertModel(std)
      if (data.code != 200) {
        this.$message.error('添加失败');
      } else {
        this.$message({
          message: '添加成功',
          type: 'success'
        });
      }
      this.startModelData();
    },
@@ -2101,7 +2185,7 @@
        }
      });
    },
    //附件列表查询
    //附件列表查询
    async getAttacthFlieList() {
      var obj = {
        eventid: this.$store.state.catModelInfo.id,