| | |
| | | > |
| | | <i class="el-icon-tickets"></i> 钻孔柱状图 |
| | | </div> |
| | | <div |
| | | class="edit" |
| | | v-show="shwoTitle" |
| | | @click="tileDownload()" |
| | | > |
| | | <i class="el-icon-download"></i> 瓦片下载 |
| | | |
| | | </div> |
| | | <!-- <div |
| | | class="edit" |
| | | v-show="showModelAttach" |
| | |
| | | perms_selectLayers, inquiry_selectDomains, comprehensive_selectPubById, |
| | | project_selectDirAll, project_selectByDirid, dataQuerySelectWktById |
| | | } from "../../api/api.js"; |
| | | import { conditions } from '../Archive/Archive.js'; |
| | | export default { |
| | | name: "tree", |
| | | components: { queryinfo }, |
| | |
| | | mptLayer: [], |
| | | optionts: [], |
| | | proValue: null, |
| | | setCheeckedLayer: [] |
| | | setCheeckedLayer: [], |
| | | shwoTitle: false, |
| | | }; |
| | | }, |
| | | methods: { |
| | | //瓦片下载 |
| | | tileDownload() { |
| | | var that = this; |
| | | this.menuVisible = false |
| | | sgworld.Creator.createSimpleGraphic( |
| | | "rectangle", |
| | | {}, |
| | | function (entity) { |
| | | that.getTileRectangle(entity); |
| | | sgworld.Creator.SimpleGraphic.clear() |
| | | |
| | | } |
| | | ); |
| | | }, |
| | | getTileRectangle(res) { |
| | | var value = res.rectangle.coordinates.getValue(); |
| | | var val = { |
| | | pubid: this.currentData.pubid, |
| | | pwd: "", |
| | | title: "", |
| | | xmax: Cesium.Math.toDegrees( |
| | | value.east |
| | | ), |
| | | xmin: Cesium.Math.toDegrees( |
| | | value.west |
| | | ), |
| | | ymax: Cesium.Math.toDegrees( |
| | | value.north |
| | | ), |
| | | ymin: Cesium.Math.toDegrees( |
| | | value.south |
| | | ) |
| | | } |
| | | this.$bus.$emit("titleDown", val) |
| | | |
| | | }, |
| | | //转孔柱状图 |
| | | async histogram() { |
| | | this.menuVisible = false |
| | |
| | | this.currentNode = Node; |
| | | |
| | | this.$store.state.propertiesName = this.currentData; |
| | | if (this.currentData.serveType == "Tileset") { |
| | | this.showModelAttach = false; |
| | | this.shwoTitle = false; |
| | | |
| | | |
| | | if (this.currentData.serveType == 'TMS') { |
| | | this.shwoTitle = true |
| | | } else if (this.currentData.serveType == "Tileset") { |
| | | this.showModelAttach = true; |
| | | } else { |
| | | this.showModelAttach = false; |
| | | } |
| | | if (this.currentData.enName == "s_explorationpoint") { |
| | | this.shwoHistogram = true; |
| | |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // 对源数据深度克隆 |
| | | return cloneData.filter((father) => { |
| | | // 循环所有项 |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据 |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); |
| | | if (branchArr.length > 0) { |
| | | |
| | | branchArr.sort(function (a, b) { |
| | | |
| | | return a.orderNum - b.orderNum |
| | | }) |
| | | } |
| | | |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值 |
| | | // 属于同一对象问题,例如:令 a=b、c=1 ,然后再令 b.c=c , 那么 a.c=b.c=c=1 ;同理,后续令 c.d=2 ,那么 a.c.d 也是=2; |
| | | // 由此循环多次后,就能形成相应的树形数据结构 |
| | |
| | | if (this.$store.state.showAllLayers == true) { |
| | | this.layersStart(); |
| | | this.$store.state.showAllLayers = false; |
| | | |
| | | } else { |
| | | |
| | | this.treeData = this.$store.state.treeData; |
| | | this.$refs.tree.setCheckedKeys(this.$store.state.checkedKeys); |
| | | } |