| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 17:00:30 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2022-09-20 16:25:50 |
| | | * @LastEditTime: 2022-09-20 17:07:27 |
| | | * @FilePath: \srs-police-affairs\src\components\map\index.vue |
| | | * @Description: 公用地图组件 |
| | | * |
| | |
| | | that.layerPolygonAdd(params.layerName, params.positions, params.material) |
| | | }) |
| | | |
| | | this.$EventBus.$on('layerPolylineAdd', (params) => { |
| | | that.layerPolylineAdd(params.layerName, params.positions, params.material, params.width) |
| | | }) |
| | | |
| | | this.$EventBus.$on('layerShow', (params) => { |
| | | that.layerShow(params.layerName, params.flag) |
| | | }) |
| | |
| | | }, |
| | | |
| | | /** |
| | | * 图层线添加 |
| | | * @param {*} layerName 图层名称 |
| | | * @param {*} positions 图层位置数据 |
| | | * @param {*} material 颜色 |
| | | * @param {*} width 宽度 |
| | | */ |
| | | layerPolylineAdd (layerName, positions, material, width) { |
| | | if (!layersObjcect[layerName] || layersObjcect[layerName] == null) { |
| | | this.mapAddLayer(layerName, 'VectorLayer') |
| | | |
| | | layersObjcect[layerName].allowDrillPicking = true |
| | | } |
| | | |
| | | let polyline = new global.DC.Polyline(positions) |
| | | |
| | | polyline.setStyle({ |
| | | width: width, |
| | | material: material, |
| | | clampToGround: false |
| | | }) |
| | | |
| | | layersObjcect[layerName].addOverlay(polyline) |
| | | }, |
| | | |
| | | /** |
| | | * 图层显示隐藏 |
| | | * @param {*} layerName 图层名称 |
| | | * @param {*} flag 显示隐藏 |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2022-09-20 14:41:50 |
| | | * @LastEditTime: 2022-09-20 16:58:31 |
| | | * @FilePath: \srs-police-affairs\src\views\home\index.vue |
| | | * @Description: 小区-栋-层-房屋 |
| | | * |
| | |
| | | |
| | | option && myChart.setOption(option) |
| | | }, |
| | | |
| | | // 模型的点击事件 |
| | | tilesetClick (e) { |
| | | console.log(e) |
| | | this.$router.push({ path: '/lyout/house', query: { id: '1' } }) |
| | | }, |
| | | |
| | | houseChange (e) { |
| | | if (e == true) { |
| | | this.$EventBus.$emit('addMxTileset', { |
| | | titlesetName: 'sdTilesetLayer', |
| | | titlesetUrl: "/sd/tileset.json" |
| | | titlesetUrl: "/sd/tileset.json", |
| | | incident: this.tilesetClick |
| | | }) |
| | | } else { |
| | | this.$EventBus.$emit('removeMxTileset', { |
| | |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | getChooseData () { |
| | | let arr1 = ['一区', '二区', '三区'] |
| | | let arr2 = ['1所', '2所', '3所'] |
| | |
| | | twoSelected (item1, item2) { |
| | | console.log(item2) |
| | | this.threeChooseData = this.twoChooseData[item1] |
| | | } |
| | | }, |
| | | threeSelected (newData, oldData) { |
| | | if (this.houseLayerShow == false) { |
| | | this.houseLayerShow = true |
| | | this.houseChange(this.houseLayerShow) |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | destroyed () { |