| | |
| | | @node-contextmenu="rightClick" |
| | | @check-change="handleCheckChange" |
| | | :default-checked-keys="handleTreeCheck" |
| | | :expand-on-click-node="false" |
| | | > |
| | | <span |
| | | class="slot-t-node" |
| | |
| | | <div class="edit" @click="editNode()"> |
| | | <i class="el-icon-edit"></i> 重命名 |
| | | </div> |
| | | <div class="edit" @click="showLayerAttribute()" v-show="!firstLevel"> |
| | | <div |
| | | class="edit" |
| | | @click="showLayerAttribute()" |
| | | v-if="!showlocal" |
| | | v-show="!firstLevel" |
| | | > |
| | | <i class="el-icon-tickets"></i> 属性 |
| | | </div> |
| | | <div class="edit" @click="showLayerAttribute()" v-show="showlocal"> |
| | | <i class="el-icon-tickets"></i> 定位 |
| | | </div> |
| | | <!-- <div |
| | | class="edit" |
| | |
| | | components: { queryinfo }, |
| | | data() { |
| | | return { |
| | | showlocal: false, |
| | | eleId: "", |
| | | isShow: false, |
| | | currentData: "", |
| | |
| | | this.firstLevel = false; |
| | | } else { |
| | | this.firstLevel = true; |
| | | } |
| | | if (Node.level === 3 && Node.serveType == "Tileset") { |
| | | this.showlocal = true; |
| | | } else if (Node.level === 3 && Node.serveType != "Tileset") { |
| | | this.showlocal = false; |
| | | } |
| | | this.menuVisible = true; |
| | | |
| | |
| | | showLayerAttribute(data) { |
| | | this.foo(); |
| | | this.currentData = data ? data : this.currentData; |
| | | var layer = this.currentData.layer.replaceAll("_", ""); |
| | | var layer = this.currentData.enName.replaceAll("_", ""); |
| | | this.$store.state.mapSpaceQueryLayer = layer; |
| | | // this.$store.state.mapPopBoolean = true; |
| | | this.$store.state.mapPopBoxFlag = "2"; |
| | |
| | | }, |
| | | setAddLayers(res) { |
| | | if (res.serveType == "WMS") { |
| | | // var resource = geoServerURl; |
| | | var resource = "http://192.168.20.205:8088/geoserver/LF/wms"; |
| | | var resource = geoServerURl; |
| | | // var resource = "http://192.168.20.205:8088/geoserver/LF/wms"; |
| | | |
| | | if (res.resource != null && res.resource != undefined) { |
| | | resource = res.resource; |
| | |
| | | :left="data.left || left" |
| | | :top="data.top || top + index * 42 + 'px'" |
| | | > |
| | | <div > |
| | | <layer-tree /> |
| | | |
| | | </div> |
| | | <div> |
| | | <layer-tree /> |
| | | </div> |
| | | </Popup> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Popup from './Popup.vue'; |
| | | import LayerTree from './LayerTree.vue' |
| | | import Popup from "./Popup.vue"; |
| | | import LayerTree from "./LayerTree.vue"; |
| | | export default { |
| | | name: 'maplayer', |
| | | name: "maplayer", |
| | | |
| | | components: { |
| | | Popup, |
| | | LayerTree |
| | | LayerTree, |
| | | }, |
| | | data() { |
| | | return { |
| | | // 弹窗数据 |
| | | PopupData: ['maplayer'], |
| | | left: 'calc(100% - 370px)', |
| | | PopupData: ["maplayer"], |
| | | left: "calc(100% - 370px)", |
| | | top: 10, |
| | | }; |
| | | }, |
| | |
| | | }, |
| | | // 关闭弹窗 |
| | | close(id) { |
| | | this.$bus.$emit("treeDataCopy","true"); |
| | | this.$bus.$emit("treeDataCopy", "true"); |
| | | let index = this.PopupData.findIndex((item) => { |
| | | return item.id === id; |
| | | }); |
| | | let data = this.PopupData.splice(index, 1)[0]; |
| | | data.close && data.close(); |
| | | this.$store.state.layerMnage = false; |
| | | |
| | | |
| | | }, |
| | | // 打开弹窗 |
| | | open(title, value, style = {}) { |
| | |
| | | createRandomId() { |
| | | return ( |
| | | (Math.random() * 10000000).toString(16).substr(0, 4) + |
| | | '-' + |
| | | "-" + |
| | | new Date().getTime() + |
| | | '-' + |
| | | "-" + |
| | | Math.random().toString().substr(2, 5) |
| | | ); |
| | | }, |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .scrollbar { |
| | | height: auto !important; |
| | | } |
| | | </style> |
| | |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.ismeta > 0 "> |
| | | <el-link title="元数据查询" @click="setQueryMetaData(scope.row)" target="_blank">{{ scope.row.name }}</el-link> |
| | | <span v-if="scope.row.ismeta > 0"> |
| | | <el-link style="color:#409eff" title="元数据查询" @click="setQueryMetaData(scope.row)" target="_blank">{{ scope.row.name }}</el-link> |
| | | |
| | | </span> |
| | | <span v-else>{{ scope.row.name }}</span> |