| | |
| | | :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> |