管道基础大数据平台系统开发-【前端】-新系統界面
src/components/mapsdk.vue
@@ -493,6 +493,7 @@
      <div
        class="propertiesPop"
        style="right:22%"
        v-if="$store.state.propertiesFlag == '2'"
      >
        <el-card class="box-card">
@@ -656,7 +657,9 @@
  select_Comprehensive_ByPageAndCount,
  select_Comprehensive_SelectWktById,
  comprehensive_selectRoute,
  dataLib_selectFiles, dataQuery_selectFields, dataQuery_selectDomains, dataQuery_selectByPage
  dataLib_selectFiles, dataQuery_selectFields, dataQuery_selectDomains,
  dataQuery_selectByPage,
  comprehensive_selectPubById, comprehensive_selectModelByGuid
} from '../api/api'
import { getToken } from '@/utils/auth'
@@ -817,18 +820,61 @@
              window.pickedFeature.color = Cesium.Color.RED.withAlpha(0.3);
              // this.$store.state.catModel = true;
              that.$store.state.catModelInfo = {
                id: pickedFeature.getProperty("id"),
                name: pickedFeature.getProperty("name"),
                layerId: pickedFeature.primitive.layerId,
                layerName: pickedFeature.primitive.id
              };
              that.$refs && that.$refs.modelProperty && that.$refs.modelProperty.open();
              that.setModelInfoData(window.pickedFeature);
            }
          }
        }
      }, Cesium.ScreenSpaceEventType.LEFT_CLICK)
    },
    async setModelInfoData(result) {
      var modelKey = 'id'
      if (result.tileset.pubid > 0) {
        const data = await comprehensive_selectPubById({ id: result.tileset.pubid })
        if (data.code != 200) {
          return
        } else {
          modelKey = JSON.parse(data.result.json).modelid
        }
        if (!modelKey) {
          return this.$message('没有模型主键ID,无法查询数据');
        }
      }
      var that = this
      var obj = {
        layerid: pickedFeature.primitive.layerId,
        modelid: pickedFeature.getProperty(modelKey)
      }
      const data1 = await comprehensive_selectModelByGuid(obj);
      if (data1.code != 200) {
        return;
      }
      var name = null;
      var bak = null;
      var type = null;
      if (data1.result) {
        name = data1.result.name;
        bak = data1.result.bak;
        type = data1.result.type;
      }
      that.$store.state.catModelInfo = {
        id: pickedFeature.getProperty(modelKey),
        name: name,
        type: type,
        bak: bak,
        layerId: pickedFeature.primitive.layerId,
        layerName: pickedFeature.primitive.id
      };
      that.$refs && that.$refs.modelProperty && that.$refs.modelProperty.open();
    },
    drawTerrainLevel() {
      this.clearTerrainLevel()
      var deep = parseFloat(this.terrainFrom.height)
@@ -883,9 +929,9 @@
      //显示fps
      Viewer.scene.debugShowFramesPerSecond = false;
      //导航控件
      window.sgworld.navControl("nav", false);
      // window.sgworld.navControl("nav", false);
      //比例尺
      window.sgworld.navControl("scale", false);
      // window.sgworld.navControl("scale", false);
      //开启深度检测
      // sgworld.Analysis.depthTestAgainstTerrain(true)
      Viewer.scene.globe.depthTestAgainstTerrain = true;
@@ -1459,7 +1505,21 @@
    //是否显示查看按钮
    showAttachDetailBtn(row) {
      var name = row.name;
      if (name.indexOf('.pdf') != -1 || name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) {
      if (
        name.indexOf('.pdf') != -1
        || name.indexOf('.jpg') != -1
        || name.indexOf('.gif') != -1
        || name.indexOf('.png') != -1
        || name.indexOf('.jpeg') != -1
        || name.indexOf('.PDF') != -1
        || name.indexOf('.JPG') != -1
        || name.indexOf('.GIF') != -1
        || name.indexOf('.PNG') != -1
        || name.indexOf('.JPEG') != -1
        || name.indexOf('.BMP') != -1
        || name.indexOf('.bmp') != -1
      ) {
        return true;
      }
      return false;
@@ -1475,13 +1535,24 @@
    showAttachDetail(row) {
      this.refreshAttatchDetail();
      var name = row.name;
      if (name.indexOf('.pdf') != -1) {
      if (name.indexOf('.pdf') != -1 || name.indexOf('.PDF') != -1) {
        this.dialog.dialogVisible = true;
        this.dialog.isPdf = true;
        var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken();
        this.dialog.src = url
      }
      else if (name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) {
      else if (
        name.indexOf('.jpg') != -1
        || name.indexOf('.gif') != -1
        || name.indexOf('.png') != -1
        || name.indexOf('.jpeg') != -1
        || name.indexOf('.JPG') != -1
        || name.indexOf('.GIF') != -1
        || name.indexOf('.PNG') != -1
        || name.indexOf('.JPEG') != -1
        || name.indexOf('.BMP') != -1
        || name.indexOf('.bmp') != -1
      ) {
        this.dialog.dialogVisible = true;
        this.dialog.isJpg = true;
        var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken();