| | |
| | | v-show="menuVisible" |
| | | > |
| | | <div @click="addSameLevelNode()"> |
| | | <i class="el-icon-circle-plus-outline"></i> 同级增加 |
| | | <i class="el-icon-circle-plus-outline"></i> 添加图层组 |
| | | </div> |
| | | <div |
| | | class="add" |
| | | @click="addChildNode()" |
| | | v-show="firstLevel" |
| | | > |
| | | <i class="el-icon-circle-plus-outline"></i> 子级增加 |
| | | <i class="el-icon-circle-plus-outline"></i> 添加图层 |
| | | </div> |
| | | <div |
| | | class="delete" |
| | |
| | | @click="editNode()" |
| | | > |
| | | <i class="el-icon-edit"></i> 修改节点 |
| | | </div> |
| | | <div |
| | | class="edit" |
| | | @click="showLayerAttribute()" |
| | | > |
| | | <i class="el-icon-edit"></i> 属性 |
| | | </div> |
| | | <!-- <div |
| | | class="edit" |
| | |
| | | >确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <queryinfo ref="queryinfo" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import Image from 'ol/layer/Image'; |
| | | import GeoJSON from 'ol/format/GeoJSON.js'; |
| | | import Map from 'ol/Map.js'; |
| | | |
| | | import queryinfo from './queryinfo.vue'; |
| | | import { Vector as VectorSource } from "ol/source"; |
| | | import { Vector as VectorLayer, } from "ol/layer"; |
| | | |
| | |
| | | import { perms_selectLayers } from '../../api/api.js' |
| | | export default { |
| | | name: 'tree', |
| | | components: { queryinfo }, |
| | | data() { |
| | | return { |
| | | eleId: '', |
| | |
| | | |
| | | this.$refs.tree.remove(this.currentNode); |
| | | }, |
| | | //属性显示 |
| | | showLayerAttribute(data) { |
| | | this.foo(); |
| | | this.currentData = data ? data : this.currentData; |
| | | var layer = this.currentData.layer.replaceAll('_', ""); |
| | | this.$store.state.mapSpaceQueryLayer = layer; |
| | | // this.$store.state.mapPopBoolean = true; |
| | | this.$store.state.mapPopBoxFlag = '2'; |
| | | this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close(); |
| | | this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("属性", null, { |
| | | close: () => { |
| | | |
| | | if (this.$store.state.primitLayer != null) { |
| | | sgworld.Creator.DeleteObject(this.$store.state.primitLayer); |
| | | this.$store.state.primitLayer = null; |
| | | } |
| | | |
| | | if (window.Viewer.scene.primitives.length != 0) { |
| | | window.Viewer.scene.primitives.removeAll() |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // 编辑节点 |
| | | editNode(data) { |
| | | |
| | |
| | | console.log('tree drop: ', dropNode.label, dropType); |
| | | }, |
| | | handleCheckChange(data, checked, indeterminate) { |
| | | |
| | | |
| | | |
| | | |
| | | if (data.type != 2) return; |
| | | //做判断是否是1:100万行政界面 |
| | | if(data.layer==window.XZOutlie&&checked){ |
| | | window.ImageLayer3.show=false; |
| | | }else{ |
| | | window.ImageLayer3.show=true; |
| | | } |
| | | |
| | | |
| | | var std = []; |
| | | if (data.layerType == 'WMS') { |
| | | var layers_ol = window.map.getAllLayers(); |
| | |
| | | } |
| | | }, |
| | | setAddLayers(res) { |
| | | |
| | | if (res.layerType == 'WMS') { |
| | | |
| | | var url = geoServerURl; |
| | | if (res.url != null && res.url != undefined) { |
| | | url = res.url |
| | | } |
| | | var width = $("#mapdiv").width() +5 ; |
| | | var height = $("#mapdiv").height()+5 ; |
| | | |
| | | var imageryLayers = window.Viewer.scene.imageryLayers; |
| | | let layerWMS = new Cesium.WebMapServiceImageryProvider({ |
| | | url: url, |
| | | layers: res.resource, |
| | | parameters: { |
| | | transparent: true, |
| | | format: 'image/png', |
| | | transparent: true, |
| | | format: "image/png", |
| | | srs: "EPSG:4490", |
| | | styles: "", |
| | | }, |
| | | tileWidth: width, |
| | | tileHeight: height |
| | | }); |
| | | layerWMS.name = res.label; |
| | | //透明度 |
| | |
| | | return this.$message.error("图层列表查询失败"); |
| | | |
| | | } |
| | | |
| | | this.newData = data.result; |
| | | this.oriData = data.result; |
| | | var std = []; |
| | |
| | | } else if (data.result[i].type == 2) { |
| | | |
| | | if (data.result[i].url != null) { |
| | | |
| | | var layer_entity = { |
| | | id: data.result[i].id, |
| | | pid: data.result[i].pid, |
| | |
| | | resource: data.result[i].url, |
| | | type: data.result[i].type, |
| | | isEdit: false, |
| | | layer: data.result[i].enName, |
| | | layerType: data.result[i].serveType |
| | | } |
| | | layer_list.push(layer_entity) |