| | |
| | | import { LayerPipeLines } from '../../conf/layers/LayerPipeLines' |
| | | import { LayerPk } from '../../conf/layers/LayerPk' |
| | | import { LayerArea } from '../../conf/layers/LayerArea' |
| | | |
| | | import bus from '@/eventBus' |
| | | export default { |
| | | name: 'LegendPanel', |
| | | data () { |
| | |
| | | serviceLayers: [LayerSoilGroundWater, LayerEnvRisk, LayerAirQuality, LayerWasteSolid, LayerWasteGas, LayerWasteWater, LayerArea, LayerPk, LayerPipeLines] |
| | | } |
| | | }, |
| | | mounted () { |
| | | const that = this |
| | | bus.$on('changeState', function (state) { |
| | | if (state.num !== 4 && state.type) { |
| | | that.isShow = false |
| | | } |
| | | }) |
| | | }, |
| | | methods: { |
| | | // 图标 控制内容的展示与隐藏 |
| | | legendChange () { |
| | | this.isShow = !this.isShow |
| | | const state = { |
| | | type: this.isShow, |
| | | num: 4 |
| | | } |
| | | bus.$emit('changeState', state) |
| | | } |
| | | } |
| | | } |
| | |
| | | margin: 0.05208rem 0; |
| | | |
| | | img { |
| | | width: .08333rem; |
| | | height: .08333rem; |
| | | // width: .08333rem; |
| | | // height: .08333rem; |
| | | width: 0.1rem; |
| | | height: 0.1rem; |
| | | margin-right: .01042rem; |
| | | } |
| | | |