| | |
| | | that.removeMxTileset(params.titlesetName, params.incident) |
| | | }) |
| | | |
| | | this.$EventBus.$on('flytoLayer', (params) => { |
| | | that.flytoLayer(params.layerName, params.duration) |
| | | }) |
| | | |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | // sdTilesetLayer |
| | | |
| | | /** |
| | | * 飞到指定图层 |
| | | * @param {*} layerName 图层名称 |
| | | * @param {*} duration 时间 |
| | | */ |
| | | flytoLayer (layerName, duration = 3) { |
| | | global.viewer.flyTo(layersObjcect[layerName], duration) |
| | | }, |
| | | |
| | | /** |
| | | * 添加模型 |
| | | * @param {*} titlesetName 图层名称 |
| | | * @param {*} titlesetUrl 模型地址 |
| | |
| | | class="btn" |
| | | @click="deleteRegionSaveList(scope.row.id)" |
| | | >删除</button> |
| | | <button class="btn" @click="flytoRange(scope.row)">定位</button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | |
| | | getRegionSaveList () { |
| | | getRegionSaveList(1, 10).then(res => { |
| | | console.log(4444, res.data.data.records) |
| | | this.saveRangeList = res.data.data.records |
| | | }) |
| | | }, |
| | | |
| | | deleteRegionSaveList (id) { |
| | | deleteRegionSaveList(id).then(res => { |
| | | console.log(res) |
| | | console.log('删除', res) |
| | | this.getRegionSaveList() |
| | | }) |
| | | }, |
| | | |
| | | flytoRange (data) { |
| | | let positionStr = data.positions |
| | | positionStr = data.positions.slice(11, positionStr.length - 1) |
| | | let positionArr = positionStr.split(",") |
| | | positionArr = positionArr.slice(0, positionArr.length - 1) |
| | | let positionNewStr = '' |
| | | positionArr.forEach(item => { |
| | | let lng = item.split(' ')[0] |
| | | let lat = item.split(' ')[1] |
| | | positionNewStr += lng + ',' + lat + ';' |
| | | }) |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'rangeLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | this.$EventBus.$emit('layerPolygonAdd', { |
| | | layerName: 'rangeLayer', |
| | | positions: positionNewStr, |
| | | material: global.DC.Namespace.Cesium.Color.fromBytes( |
| | | 255, 0, 0, 100 |
| | | ), |
| | | }) |
| | | this.$EventBus.$emit('flytoLayer', { |
| | | layerName: 'rangeLayer', |
| | | duration: 3 |
| | | }) |
| | | |
| | | }, |
| | | |
| | | async getDevices (id) { |
| | |
| | | // siteHeading: -3, |
| | | // sitePitch: -90 |
| | | // }) |
| | | console.log('暂无定位') |
| | | |
| | | }, |
| | | |
| | | async siteClick (e) { |
| | |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'rangeLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | graphicLayer.destroy() |
| | | |
| | | this.$parent.$parent.resize('0px') |
| | |
| | | this.flvPlayer.destroy() |
| | | this.flvPlayer = null |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |