jihongshun
2025-09-27 14d6c180e4af073ddb33e0c07d7351530adec72c
bugfix
已修改5个文件
41 ■■■■ 文件已修改
src/utils/components/init-map.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/device/components/deviceDialog.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/flightRouteSimulation/index.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/model/components/modelDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/project/components/chooseModelDialog.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/components/init-map.vue
@@ -261,7 +261,7 @@
        pointGround: { lon: 0, lat: 0, height: 0 },
        pointFly: { lon: 0, lat: 0, height: 0 },
        rowData:null,
        time: 10,
        time: 5,
        takePhoto: '默认名称',  // 初始数据
        newTakePhoto: '',  // 编辑时的新数据
        isEditingPhoto: false,  // 控制是否处于编辑状态
@@ -1373,7 +1373,7 @@
      point.children[0].actions.push(action);
      console.log(point)
      this.$emit('dealAction',point)
      this.time = 10
      this.time = 5
      this.newTakePhoto = '默认名称'
      this.newTakeVideo = '默认名称'
      this.takeVideo = '默认名称'
src/views/system/device/components/deviceDialog.vue
@@ -97,6 +97,7 @@
            const position = Cesium.Cartesian3.fromDegrees(this.form.longitude, this.form.latitude, this.form.deviceHeight);
            console.log(position)
            // 设置模型方向(可选)
            let viewer = window['cesiumContainer'].viewer
            let model = viewer.entities.getById("MyModel");
            const heading = Cesium.Math.toRadians(this.form.face); // 朝东南方向
            const pitch = 0;
@@ -178,6 +179,7 @@
    },  
    gettiles3dCam(){
      console.log(this.form)
      let viewer = window['cesiumContainer'].viewer
      if(!this.form.face) {
        return this.$message.error('请输入朝向')
      }
src/views/system/flightRouteSimulation/index.vue
@@ -161,7 +161,7 @@
                "pitch": current.pitch,
                "roll": current.roll,
                "zoom":current.zoom || 1,
                'wait' : 5
                'wait' : 3
            });
            dealArr.push({
                "lng": next.lng,
@@ -501,19 +501,29 @@
      let distance = 5000
      //精度维度高度
      getScopeTower(lon,lat,distance).then(res=>{
        console.log(res)
        if(res.code == 200) {
          console.log(res)
          res.rows.forEach((data) => {
            this.createModel(data);
          });
        }
      })
    },
    createModel(data){
      console.log(data)
      let viewer = window['cesiumContainer'].viewer
      const heading = Cesium.Math.toRadians(data.face || 0); // 朝东南方向
        const pitch = 0;
        const roll = 0;
        const orientation = Cesium.Transforms.headingPitchRollQuaternion(
            Cesium.Cartesian3.fromDegrees(data.longitude, data.latitude, data.altitude),
          new Cesium.HeadingPitchRoll(heading, pitch, roll)
       );
      viewer.entities.add({
        id: data.id,
        position: Cesium.Cartesian3.fromDegrees(data.longitude, data.latitude, data.altitude),
        orientation: orientation,
        model: {
          uri: data?.ardTowerModel?.modelRoute,
          scale: 1,
@@ -537,6 +547,7 @@
      window['cesiumContainerYY'].viewer.entities.add({
        id:data.id+ 'yytower',
        position: Cesium.Cartesian3.fromDegrees(data.longitude, data.latitude, data.altitude),
        orientation: orientation,
        model: {
          uri: data?.ardTowerModel?.modelRoute,
          scale: 1,
src/views/system/model/components/modelDialog.vue
@@ -138,8 +138,8 @@
      });
    },
    addModel(row){
      let viewer = window['cesiumContainer'].viewer
      console.log(window)
      console.log(window.viewer)
      const position = Cesium.Cartesian3.fromDegrees(0, 0, 0);
      // 设置模型方向(可选)
src/views/system/project/components/chooseModelDialog.vue
@@ -6,7 +6,7 @@
    width="20%">
    <el-form ref="form" :model="form" label-width="80px" :rules="rules">
      <el-form-item label="飞行模板">
        <el-select v-model="form.modelObj" placeholder="请选择飞行模板" @change="handleChange">
        <el-select v-model="form.flyDeviceId" placeholder="请选择飞行模板" @change="handleChange">
          <el-option
              v-for="item in templateArr"
              :key="item.id"
@@ -53,7 +53,7 @@
        },
        templateArr:[],
        rules:{
          modelObj: [
          flyDeviceId: [
            { required: true, message: '请选择模板', trigger: 'change' }
          ]
        }
@@ -64,9 +64,10 @@
      if(this.deviceId){
        flyDataInfo(this.deviceId).then(res=>{
          console.log(res)
          if(res.code == 200 ) {
            this.templateArr = res.rows
          }
          // if(res.code == 200 ) {
          //   this.templateArr = res.rows
          // }
          this.templateArr = res || []
        })
        //点击模板查询设备下的关联模型的所有模板 
      }
@@ -76,14 +77,17 @@
        this.$emit('cancelModel')
      }, 
      handleChange(value){
         this.form.deviceId = this.deviceId
        console.log(value)
        console.log(this.templateArr)
        this.form.deviceId = this.deviceId
        this.form.flyDeviceId =value
        this.form.modelObj =this.templateArr.find(item => item.id === value)
      },
      submit(){
        // this.selectArr 
        // //反显参数传递option对象  
        // this.form.deviceId = this.deviceId
        // console.log(this.form)
        console.log(this.form)
        this.$emit('receiveModel',this.form)
        this.$emit('cancelModel')
      },