| | |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <InitMap v-if="showMap" @mergePoint="mergePoint" :towerUrl="towerUrl"></InitMap> |
| | | <InitMap v-if="showMap" @mergePoint="mergePoint" :towerUrl="towerUrl" :deviceData="deviceData"></InitMap> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | <el-button type="primary" @click="submit()" >确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <ChooseModelDialog v-if="showModel" @cancel ='cancel' @getRowData="getRowData" ></ChooseModelDialog> |
| | | <ChooseModelDialog v-if="showModel" @cancel ='cancel' @getRowData="getRowData"></ChooseModelDialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { compileToFunctions } from "vue-template-compiler"; |
| | | import CesiumMap from "../../../../utils/components/cesium-map.vue"; |
| | | import InitMap from "../../../../utils/components/init-map.vue"; |
| | | import ChooseModelDialog from './chooseModelDialog.vue'; |
| | | import { addPoint , getPointInfo} from "@/api/system/template" |
| | | let globalon = 0 |
| | | let globalat = 0 |
| | | let towerHeight = 47.47 |
| | | let towerHeight = 45 |
| | | //塔的朝向算法所用到的 旋转度数 |
| | | let rotationAngle = Cesium.Math.toRadians(0) |
| | | export default{ |
| | |
| | | chooseModelId:null, |
| | | modelName:null, |
| | | templateType:null, |
| | | form:{} |
| | | form:{}, |
| | | deviceData:null |
| | | } |
| | | }, |
| | | mounted(){ |
| | | console.log(this.templateId) |
| | | if(this.templateId) { |
| | | //预览逻辑 |
| | | getPointInfo(this.templateId).then(res=>{ |
| | | if(res.code == 200 ) { |
| | | console.log(res.data) |
| | | this.getRowData(res.data) |
| | | let drawArr = this.convertToTree(res.data.ardListWayPointsLS) |
| | | setTimeout(() => { |
| | |
| | | console.log(row) |
| | | this.modelName = row.modelName |
| | | this.templateType = row.modelType |
| | | this.deviceData = row |
| | | if(this.templateId){ |
| | | this.form.templateName = row.templateName || '' |
| | | } |
| | | this.chooseModelId = row.id |
| | | towerHeight = row.towerHeight || 47.47 |
| | | towerHeight = row.modelHeight || 45 |
| | | this.showMap =false |
| | | this.$nextTick(()=>{ |
| | | // this.towerUrl = row.modelRoute |
| | | this.towerUrl = row.modelRoute |
| | | if(this.templateId){ |
| | | this.towerUrl = row.ardTowerModel.modelRoute |
| | | }else { |
| | | this.towerUrl = row.modelRoute |
| | | } |
| | | this.showMap = true |
| | | }) |
| | | }, |