| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- <div v-show="layerList.length > 0" class="layer-manage-container"> |
| | | <div class="header">图层管理</div> |
| | | <ul class="content"> |
| | | <li v-for="(item, index) in layerList" :key="index"> |
| | | {{item.name}}: |
| | | <el-switch v-model="item.flag" @change="switchChange(item)"></el-switch> |
| | | </li> |
| | | </ul> |
| | | </div>--> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | data () { |
| | | return { |
| | | url: '', |
| | | layerList: [], |
| | | time: '', |
| | | sponsor: '', |
| | | undertake: '', |
| | |
| | | ]) |
| | | }, |
| | | methods: { |
| | | switchChange (item) { |
| | | if (item.flag == true) { |
| | | |
| | | } else { |
| | | |
| | | } |
| | | }, |
| | | |
| | | addArcgisLayer (url) { |
| | | global.viewer.imageryLayers.addImageryProvider( |
| | | new global.DC.Namespace.Cesium.ArcGisMapServerImageryProvider({ |
| | | url: url |
| | | }) |
| | | ) |
| | | }, |
| | | |
| | | removeArcgisLayer () { |
| | | |
| | | }, |
| | | |
| | | getData () { |
| | | getWelcome({ hdname: this.urlDataName }).then((res) => { |
| | | var result = res.data.data |
| | |
| | | this.list = result.tpurl.split(',') |
| | | this.pointNameList = result.addressname.split(',') |
| | | this.pointList = result.address.split(';') |
| | | this.layerList = [] |
| | | |
| | | if (result.mapname != '' && result.mapname != null && result.mapname != undefined) { |
| | | var mapname = result.mapname.split(',') |
| | | var url = result.url.split(',') |
| | | mapname.forEach((item, index) => { |
| | | this.layerList.push({ flag: false, name: item, url: url[index] }) |
| | | }) |
| | | this.layerList[0].flag = true |
| | | this.addArcgisLayer(this.layerList[0].url) |
| | | } |
| | | |
| | | var a = result.lx.split(';') |
| | | |
| | |
| | | this.pointList.forEach((item, index) => { |
| | | this.drawPoint(item.split(','), this.pointNameList[index]) |
| | | }) |
| | | |
| | | if (this.pointList.length > 0) { |
| | | this.$store.dispatch('pcMoveView', { |
| | | viewer: global.viewer, |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .layer-manage-container { |
| | | padding: 0 10px 10px 10px; |
| | | position: fixed; |
| | | right: 10px; |
| | | bottom: 240px; |
| | | width: 120px; |
| | | background: rgba(40, 187, 240, 0.7); |
| | | border-radius: 10px; |
| | | color: #fff; |
| | | border: 1px solid #29baf1; |
| | | box-shadow: 0 0 10px 2px #29baf1; |
| | | |
| | | .header { |
| | | line-height: 36px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .content { |
| | | max-height: calc(180px - 36px); |
| | | overflow-y: auto; |
| | | text-align: center; |
| | | } |
| | | } |
| | | </style> |