管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-06-29 f30dbe373cc0d4296a71b545811f0a0ad92e4cec
添加地表形变时序图
已修改11个文件
409 ■■■■ 文件已修改
src/assets/lang/en.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/lang/zh.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/MapView/mapMenuTop.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/MapView/mapSpacePop.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/mapsdk.vue 212 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/preview_map.vue 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Archive/index.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Synthesis/LeftMenu.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/datamanage/SpatialData.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exportMap/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/lang/en.js
@@ -61,7 +61,8 @@
    id: "ID",
    info: 'Info',
    warehousResults: 'Warehousing results',
    templateType: 'Template Type'
    templateType: 'Template Type',
    lable6: "Advanced queries",
  },
  dataManage: {
src/assets/lang/zh.js
@@ -62,7 +62,8 @@
    id: "ID",
    info: '信息',
    warehousResults: '入库结果',
    templateType: '模板类型'
    templateType: '模板类型',
    lable6: "高级查询",
  },
  dataManage: {
    dataManage: '数据管理',
src/components/MapView/mapMenuTop.vue
@@ -523,7 +523,7 @@
        case "point": //点
          var val = that.setCartesianToEightFour(res.position.getValue())
          res_val = val
          that.setTurfCircle([val.lng, val.lat], 10)
          that.setTurfCircle([val.lng, val.lat], 50)
          break
        case "polyline": //线
          var polyline = res.polyline.positions.getValue()
src/components/MapView/mapSpacePop.vue
@@ -20,7 +20,7 @@
            @click="conditionVisible = true"
            size="small"
            type="success"
          >新增</el-button>
          >{{$t('common.lable6')}}</el-button>
          <el-button
            size="small"
            @click="resetForm"
@@ -1327,7 +1327,6 @@
          this.$store.state.queryInfo.push(point)
          sgworld.Navigate.flyToObj(point)
          this.$store.state.primitLayer = point
          break
        case "LineString":
        case "MultiLineString":
@@ -1387,6 +1386,13 @@
          pick.id.tag &&
          pick.id.tag.includes("properties_")
        ) {
          if (this.spaceLayer == 'msurfacedeformationdata') {
            this.$store.state.surfaceDeForm.flag = true;
            this.$store.state.surfaceDeForm.gid = pick.id.properties.gid._value;
          } else {
            this.$store.state.surfaceDeForm.flag = false;
            this.$store.state.surfaceDeForm.gid = null;
          }
          this.$store.state.propertiesFlag = "1"
          let properties = pick.id.properties
          let propertyNames = pick.id.properties.propertyNames
src/components/mapsdk.vue
@@ -480,6 +480,13 @@
            <span>属性信息</span>
            <div style="float: right; cursor: pointer">
              <el-link
                v-if="$store.state.surfaceDeForm.flag && this.$store.state.surfaceDeForm.gid"
                type="primary"
                :underline="false"
                @click="setSurfaceDeForm"
                style="margin-right: 10px"
              >地表形变时序图</el-link>
              <el-link
                v-if="$store.state.propertiesName.enName == 's_surveyworksite'"
                type="primary"
                :underline="false"
@@ -605,7 +612,33 @@
          <span>上下截面</span>
        </div>
      </div>
      <!-- 地表形变时序图 -->
      <div
        class="surfaceDeFormPop"
        style="    width: 800px;
      height: 800px;"
        v-show="surfaceDeFormFlag"
        v-drag
      >
        <el-card class="box-card">
          <div slot="header">
            <span>地表形变时序图</span>
            <div style="float: right; cursor: pointer">
              <i
                class="el-icon-close"
                @click="closeBufferBox(7)"
              ></i>
            </div>
          </div>
          <div
            id="surfaceDeFormEchart"
            class="pointInfoBoxContext"
            style="height:500px;width:750px;"
          >
          </div>
        </el-card>
      </div>
      <!--附件列表弹窗-->
      <el-dialog
        title="附件列表"
@@ -689,16 +722,7 @@
        </div>
      </el-dialog>
      <!--      <div-->
      <!--        @click="changeMenulayer"-->
      <!--        class="center CenDiv"-->
      <!--        :class="{ center1: centerFlag }"-->
      <!--      >-->
      <!--        <div-->
      <!--          id="cenBg"-->
      <!--          v-bind:class="{ active: isActive, menuLayer: isMenuLayer }"-->
      <!--        ></div>-->
      <!--      </div>-->
      <el-dialog
        title="瓦片下载"
        :append-to-body="false"
@@ -765,7 +789,8 @@
        </el-form>
      </el-dialog>
    </div>
    <model-property ref='modelProperty'></model-property>
    <surface-chart ref="surfaceChart" />
    <iframe
      id="downFrame"
      src=""
@@ -778,23 +803,26 @@
import $ from "jquery";
import mapMenuTop from "./MapView/mapMenuTop.vue";
import mapSpaceTop from "./MapView/mapSpaceTop.vue";
import ModelProperty from '../views/Tools/ModelProperty.vue'
import ModelProperty from '../views/Tools/ModelProperty.vue';
import {
  select_Comprehensive_ByPageAndCount,
  select_Comprehensive_SelectWktById,
  comprehensive_selectRoute,
  dataLib_selectFiles, dataQuery_selectFields, dataQuery_selectDomains,
  dataQuery_selectByPage, sign_getPublicKey, inquiry_downloadTiles,
  comprehensive_selectPubById, comprehensive_selectModelByGuid
  comprehensive_selectPubById, comprehensive_selectModelByGuid, dataQuery_selectByGid,
  dataLib_selectByPage
} from '../api/api'
import { getToken } from '@/utils/auth'
import * as echarts from "echarts"
export default {
  name: "",
  components: {
    mapMenuTop,
    mapSpaceTop,
    ModelProperty
    ModelProperty,
  },
  data() {
@@ -906,7 +934,9 @@
        title: ''
      },
      loadingText: '',
      loading: false
      loading: false,
      surfaceDeFormFlag: false,
      option: null
    };
  },
  mounted() {
@@ -942,6 +972,140 @@
    window.localStorage.setItem('slider_z', this.valueZ);
  },
  methods: {
    async setSurfaceDeForm() {
      var gid = this.$store.state.surfaceDeForm.gid;
      const data = await dataQuery_selectByGid({ gid: gid, name: 'msurfacedeformationdata' });
      if (data.code != 200) {
        return this.$message.error("根据GID查询数据失败");
      }
      this.getSurfaceDeFormData(data.result)
    },
    async getSurfaceDeFormData(result) {
      var data = await dataLib_selectByPage({
        filter: "defpointno = '" + result.defpointno + "'",
        name: 'msurfacedeformationdata',
        pageIndex: 1,
        pageSize: 100000,
      });
      const data1 = await dataLib_selectByPage({
        filter: "defpointno = '" + result.defpointno + "'",
        name: 'msurfacedeformationdatadate',
        pageIndex: 1,
        pageSize: 100000,
      });
      if (data1.code != 200 || data.code != 200) {
        return this.$message.error("地表形变数据查询失败");
      }
      this.surfaceDeFormFlag = true;
      var average = data.result;
      var val = data1.result
      var xtitle = [];
      var val1 = [];
      var val2 = [];
      for (var i in val) {
        val1.push(average[0].seqvar);
        xtitle.push(this.formDate(val[i].defdate))
        val2.push(val[i].seqvar)
      }
      this.showSurfaceDeFormEchart(xtitle, val1, val2);
    },
    formDate(res) {
      var time = new Date(res);
      var y = time.getFullYear();
      var m = time.getMonth() + 1;
      var d = time.getDate();
      return (
        y +
        '-' +
        this.add0(m) +
        '-' +
        this.add0(d)
      );
    },
    //格式化时间
    add0(m) {
      return m < 10 ? '0' + m : m;
    },
    showSurfaceDeFormEchart(res, res1, res2) {
      var dom = document.getElementById('surfaceDeFormEchart');
      // var myChart = echarts.init(chartDom);
      if (this.option != null) {
        dom.removeAttribute("_echarts_instance_"); // 移除容器上的 _echarts_instance
      }
      var myChart = echarts.init(dom, null, {
        renderer: "canvas",
        useDirtyRect: false,
      });
      this.option = {
        tooltip: {
          trigger: 'axis',
          formatter: function (params) {
            return params[0].axisValue +
              '<br/>时序形变量:' + params[1].data + ' mm' +
              '<br/>年形变速率:' + params[0].data + 'm/a'
          },
        },
        dataZoom: [{
          type: 'inside', //1平移 缩放
        }],
        grid: {
          left: '1%',
          right: '1%',
          bottom: '1%',
          containLabel: true
        },
        toolbox: {
          feature: {
            saveAsImage: {}
          },
        },
        xAxis: {
          type: 'category',
          boundaryGap: false,
          data: res
        },
        yAxis: {
          type: 'value',
          name: "mm",
        },
        series: [
          {
            name: '年形变速率',
            type: 'line',
            stack: 'Total',
            data: res1
          },
          {
            name: '时序变形量',
            type: 'line',
            stack: 'Total',
            data: res2
          }
        ]
      };
      this.option && myChart.setOption(this.option);
      window.addEventListener("resize", myChart.resize);
    },
    setDownLoadTitle(res) {
      this.signGetPublicKey()
      this.downTitleFlag = true;
@@ -1360,6 +1524,9 @@
        case 6:
          this.$store.state.propertiesFlag = null;
          this.showAttribute = false;
          break;
        case 7:
          this.surfaceDeFormFlag = false;
          break;
      }
    },
@@ -1963,6 +2130,18 @@
        padding: 10px 20px;
      }
    }
    .surfaceDeFormPop {
      z-index: 40;
      position: absolute;
      right: 8%;
      bottom: 1%;
      /deep/ .el-card__header {
        padding: 10px 20px;
      }
      /deep/ .el-card__body {
        padding: 10px 20px;
      }
    }
    .modelClipPop {
      width: 350px;
      z-index: 40;
@@ -2175,6 +2354,7 @@
  background-repeat: no-repeat;
  background-size: contain;
}
//.changeMapType {
//  position: absolute;
//  bottom: 1%;
src/components/preview_map.vue
@@ -50,20 +50,18 @@
          >显隐</el-button>
          <el-button
            size="small"
            @click="underground"
            @click="setUndergroundMode"
          >地下</el-button>
          <el-button
            v-if="$store.state.previewLayer.type  != '3dml' &&   
            $store.state.previewLayer.type  !='cpt'"
            size="
            small"
            size="small"
            @click="pickupCoords"
          >拾取</el-button>
          <el-button
            v-if="$store.state.previewLayer.type  != '3dml'  &&   
            $store.state.previewLayer.type  !='cpt'"
            size="
            small"
            size="small"
            @click="reload"
          >
            重载
@@ -90,15 +88,8 @@
          <el-input
            size="small"
            v-model="modelForm.lon"
            @input="update"
          ></el-input>
          <el-slider
            v-model="modelForm.lon"
            @input="update"
            :min="73"
            :step="0.001"
            :max="135"
          ></el-slider>
        </el-form-item>
        <el-form-item
          label="纬度:"
@@ -108,15 +99,8 @@
          <el-input
            size="small"
            v-model="modelForm.lat"
            @input="update"
          ></el-input>
          <el-slider
            v-model="modelForm.lat"
            @input="update"
            :min="3"
            :step="0.001"
            :max="54"
          ></el-slider>
        </el-form-item>
        <el-form-item
          label="高度:"
@@ -126,15 +110,8 @@
          <el-input
            size="small"
            v-model="modelForm.height"
            @input="update"
          ></el-input>
          <el-slider
            v-model="modelForm.height"
            :min="-800"
            :step="1"
            @input="update"
            :max="8800"
          ></el-slider>
        </el-form-item>
        <el-form-item
          label="角度:"
@@ -144,30 +121,16 @@
          <el-input
            size="small"
            v-model="modelForm.yaw"
            @input="update"
          ></el-input>
          <el-slider
            v-model="modelForm.yaw"
            :min="0"
            @input="update"
            :step="0.1"
            :max="360"
          ></el-slider>
        </el-form-item>
        <el-form-item label="透明度:">
        <!-- <el-form-item label="透明度:">
          <el-input
            size="small"
            v-model="modelForm.alpha"
            @input="update"
          ></el-input>
          <el-slider
            v-model="modelForm.alpha"
            @input="update"
            :min="0"
            :step="0.01"
            :max="1"
          ></el-slider>
        </el-form-item>
        </el-form-item> -->
      </el-form>
    </div>
@@ -489,7 +452,7 @@
        isJpg: false,
        src: ''
      },
      modelType: ['ifc', 'fbx', 'rvt', '3dml', 'cpt'],
      modelType: ['ifc', 'fbx', 'rvt', '3dml', 'cpt', 'osgb', 'las', 'laz'],
      editModelFlag: false,
      modelForm: {
        lon: 119,
@@ -996,7 +959,7 @@
          window.terrainLayer.deleteObject();
          // Viewer.terrainProvider = new Cesium.EllipsoidTerrainProvider();
          // window.terrainLayer = null;
          window.terrainLayer = null;
          window.terrainLayer = new Cesium.CesiumTerrainProvider({
            url: res.url
          });
@@ -1009,6 +972,7 @@
              roll: 0.0
            }
          });*/
          debugger
          var wkt = this.$wkt.parse(res.geom);
          var height = this.getHeight(wkt.coordinates[2]);
          Viewer.camera.flyTo({
@@ -1092,6 +1056,7 @@
      this.reload();
    },
    reload() {
      sgworld.Analysis.UndergroundMode(this.app.under, this.modelForm.alpha)
      var json = JSON.stringify(this.modelForm);
      var url = this.$store.state.previewLayer.url.replace("{host}", iisHost);
      if (!url) return;
@@ -1138,6 +1103,8 @@
        that.modelForm.lat = y;
        that.modelForm.height = z;
        that.pickupCoords();
        that.reload();
      }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
    },
    // 保留小数位
@@ -1147,36 +1114,26 @@
      return Math.round(d * p) / p;
    },
    update() {
      if (!this.modelForm.lon || isNaN(this.modelForm.lon)) {
        var args = this.getEditTilesetArgs();
        this.modelForm.lon = args.lon == null ? 0 : args.height;
        return
      }
      if (!this.modelForm.lat || isNaN(this.modelForm.lat)) {
        var args = this.getEditTilesetArgs();
        this.modelForm.lat = args.lat == null ? 0 : args.height;
        return
      }
      if (!this.modelForm.height || isNaN(this.modelForm.height)) {
        var args = this.getEditTilesetArgs();
        this.modelForm.height = args.height == null ? 0 : args.height;
        return
      }
      if (!this.modelForm.yaw || isNaN(this.modelForm.yaw)) {
        this.modelForm.yaw = 0;
        return
      }
      // if (!this.modelForm.alpha || isNaN(this.modelForm.alpha)) {
      //   if (this.app.under) {
      //
      //     this.modelForm.alpha = sgworld._Analysis._UndergroundMode._alpha;
      //   } else {
      //     this.modelForm.alpha = 1
      //   }
      // if (!this.modelForm.lon || isNaN(this.modelForm.lon)) {
      //   var args = this.getEditTilesetArgs();
      //   this.modelForm.lon = args.lon == null ? 0 : args.height;
      //   return
      // }
      // if (!this.modelForm.lat || isNaN(this.modelForm.lat)) {
      //   var args = this.getEditTilesetArgs();
      //   this.modelForm.lat = args.lat == null ? 0 : args.height;
      //   return
      // }
      // if (!this.modelForm.height || isNaN(this.modelForm.height)) {
      //   var args = this.getEditTilesetArgs();
      //   this.modelForm.height = args.height == null ? 0 : args.height;
      //   return
      // }
      // if (!this.modelForm.yaw || isNaN(this.modelForm.yaw)) {
      //   this.modelForm.yaw = 0;
      //   return
      // }
      this.setTilesetArgs(this.modelForm);
      sgworld.Analysis.UndergroundMode(this.app.under, this.modelForm.alpha)
    },
@@ -1235,6 +1192,7 @@
    setEditModelLayer(res) {
      if (res.json) {
        var json = JSON.parse(res.json)
        this.modelForm = json;
        this.reload();
@@ -1245,7 +1203,6 @@
    setModleLocatin() {
      var res = this.$store.state.previewLayer;
      var type = res.type;
      if (this.modelType.indexOf(type) != -1) {
        if (type != '3dml') {
          this.setEditModelLayer(res)
src/store/index.js
@@ -78,6 +78,12 @@
    isProjectLayer: [],
    pigCode: null,
    listenTime: null,
    //地表变形
    surfaceDeForm: {
      falg: false,
      gid: null,
      val: null
    }
  },
  mutations: {
    UPDATE_LISTEN_TIME(state, msg) {
src/views/Archive/index.vue
@@ -49,6 +49,7 @@
            allow-create
            default-first-option
            size="small"
            ref="cascaders"
            :placeholder="$t('archiveObj.label4')"
            @change="categorySelectChange('orgName','org',categoryOptions)"
          >
@@ -93,7 +94,7 @@
            v-model="formInline.depName"
            :placeholder="$t('archiveObj.label3')"
            :popper-append-to-body="false"
             ref="treeSelect"
            ref="treeSelect"
          >
            <el-option
              :value="formInline.depcode"
@@ -245,11 +246,13 @@
              <div class="cardItem"> {{$t('dataManage.vmobj.format')}} : {{ item.type }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.size')}} : {{stateFormatSizes(item.sizes)}} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.tab')}} : {{ item.tab }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.dirName')}} : {{ item.dirName }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.row')}} : {{ item.rows }} </div>
              <div class="cardItem"> {{$t('archiveObj.downloads')}} : {{ item.downCount }} 次 </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.createonuser')}} : {{item.uname}} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.depName')}} : {{item.depName}} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.createontime')}} : {{format(item.createTime)}} </div>
            </div>
            <div
              :id="item.id"
@@ -257,7 +260,9 @@
              v-show="!item.isShow && formInline.dataType!='type2'"
            >
              <div class="cardItem"> {{$t('archiveObj.dataType')}} : {{ item.mold }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.tab')}} : {{ item.ns+'.'+item.tab }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.row')}} : {{ item.rows }} </div>
              <div class="cardItem"> {{$t('dataManage.vmobj.dirName')}} : {{ item.bak }} </div>
              <!-- <div class="cardItem"> {{$t('archiveObj.storageType')}} : {{ item.tableType }} </div> -->
            </div>
          </el-card>
@@ -2444,6 +2449,7 @@
    //格式化时间
    format(shijianchuo) {
      //shijianchuo是整数,否则要parseInt转换
      var time = new Date(shijianchuo);
      var y = time.getFullYear();
      var m = time.getMonth() + 1;
@@ -2464,6 +2470,10 @@
        ':' +
        s
      );
    },
    //格式化时间
    add0(m) {
      return m < 10 ? '0' + m : m;
    },
    //格式化列表
    formatData(row, column) {
@@ -2556,8 +2566,22 @@
    //查询数据库数据
    async getQueryBankData() {
      this.listData.dirs = "";
      this.listData.types = ""
      if (this.formInline.category.length != 0) {
        this.listData.dirs += this.formInline.category.toString();
      }
      var val_data = this.formInline.category;
      var data_type = []
      if (val_data.length > 0) {
        for (var i in val_data) {
          for (var j in this.categoryOptions) {
            if (this.categoryOptions[j].key == val_data[i]) {
              data_type.push(this.categoryOptions[j].value)
            }
          }
        }
      }
      if (this.formInline.item.length != 0) {
        if (this.listData.dirs.length != 0) {
@@ -2567,6 +2591,8 @@
      }
      this.listData.depcode = this.formInline.depcode;
      this.listData.tab = this.formInline.keywords;
      this.listData.types = data_type.toString();
      const data = await dataLib_selectTabs(this.listData);
      if (data.code != 200) {
        this.$message.error('数据库列表调用失败');
src/views/Synthesis/LeftMenu.vue
@@ -2660,12 +2660,19 @@
      start = html.lastIndexOf(tab) + tab.length + 1;
      end = html.indexOf("</td>", start);
      var gid = html.substr(start, end - start);
      if (gid && tab) {
        this.$store.state.pickoption = {
          gid: gid,
          name: tab.replaceAll("_", "")
        }
        if (tab == 'm_surface_deformation_data') {
          this.$store.state.surfaceDeForm.flag = true;
          this.$store.state.surfaceDeForm.gid = gid;
        } else {
          this.$store.state.surfaceDeForm.flag = false;
          this.$store.state.surfaceDeForm.gid = null;
        }
        const res = await dataQuery_selectTabByEntity({
          name: this.$store.state.pickoption.name
        })
src/views/datamanage/SpatialData.vue
@@ -63,7 +63,7 @@
                size="small"
                type="success"
                icon="el-icon-plus"
              >{{$t('common.append')}}</el-button>
              >{{$t('common.lable6')}}</el-button>
            </el-form-item>
@@ -171,10 +171,7 @@
        </div>
        <div
          class="pagination_box"
        >
        <div class="pagination_box">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
@@ -364,7 +361,10 @@
          </el-select>
        </el-form-item>
        <el-form-item v-show="!fromSqlflag">
          <el-input v-model="formSql.value"  :placeholder="$t('shuJuGuanLi.shuJuJianSuo.queryContent')"></el-input>
          <el-input
            v-model="formSql.value"
            :placeholder="$t('shuJuGuanLi.shuJuJianSuo.queryContent')"
          ></el-input>
        </el-form-item>
        <el-form-item v-show="fromSqlflag">
          <el-date-picker
@@ -480,10 +480,7 @@
            ></el-table-column>
          </el-table>
          <div
            class="pagination_box"
          >
          <div class="pagination_box">
            <el-pagination
              @size-change="attributeSizeChange"
              @current-change="attributeCurrentChange"
@@ -1609,7 +1606,7 @@
    margin: 5px;
  }
}
.pagination_box{
.pagination_box {
  margin-top: 0px;
}
</style>
src/views/exportMap/index.vue
@@ -127,7 +127,7 @@
      <el-form
        ref="form"
        :model="form"
        label-width="80px"
        label-width="110px"
      >
        <el-form-item label="出图名称">
          <el-input v-model="form.name"></el-input>
@@ -315,7 +315,7 @@
      rowtype: true,
      loading: false,
      form: {},
      formInline: { role: "" },
      formInline: { role: 0 },
      layerform: {},
      tableData: [],
      exportable: [],