| | |
| | | name: "图层管理", |
| | | css: "twoMenu_imge11", |
| | | }, |
| | | { |
| | | id: "b1", |
| | | label: "synthesis.split", |
| | | name: "分屏", |
| | | css: "twoMenu_imge21", |
| | | }, |
| | | { |
| | | id: "b9", |
| | | label: "synthesis.undergroundMode", |
| | | name: "地下模式", |
| | | css: "twoMenu_imge29", |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | |
| | | var that = this; |
| | | window.model = sgworld.Creator.create3DTilesets( |
| | | "", |
| | | modelUrl, |
| | | modelUrl + '/tileset/m/SN/tileset.json', |
| | | {}, |
| | | {}, |
| | | "0", |
| | |
| | | close: () => { |
| | | if (this.$store.state.pipelineEntity.length != 0) { |
| | | for (var i in this.$store.state.pipelineEntity) { |
| | | var item = this.$store.state.pipelineEntity[i]; |
| | | sgworld.Viewer.entities.remove(item); |
| | | sgworld.Viewer.entities.remove(this.$store.state.pipelineEntity[i]); |
| | | } |
| | | } |
| | | }, |
| | |
| | | ); |
| | | }, |
| | | setWander(res) { |
| | | debugger; |
| | | ; |
| | | switch (res) { |
| | | |
| | | case "c1": |
| | |
| | | // this.$refs.tree.setCheckedKeys(checkKey); |
| | | this.$store.state.checkedKeys = checkKey |
| | | }, |
| | | setTreeData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // 对源数据深度克隆 |
| | | return cloneData.filter((father) => { |
| | | // 循环所有项 |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据 |
| | | 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; |
| | | // 由此循环多次后,就能形成相应的树形数据结构 |
| | | return father.pid == 0; // 返回一级菜单 |
| | | }); |
| | | }, |
| | | setAddLayers(res) { |
| | | if (res.serveType == "WMS") { |
| | | var resource = geoServerURl; |
| | |
| | | }); |
| | | window.map.addLayer(vectorLayer); |
| | | } else if (res.serveType == "Tileset") { |
| | | debugger |
| | | |
| | | var tileset = Viewer.scene.primitives.add( |
| | | new Cesium.Cesium3DTileset({ |
| | | name: res.cnName, |