| | |
| | | } else if (Node.data.children == null && Node.data.serveType != "Tileset") { |
| | | this.showlocal = false; |
| | | this.showopaque = false; |
| | | } else if (Node.data.children == null && Node.data.serveType != "DEM") { |
| | | this.showlocal = false; |
| | | this.showopaque = false; |
| | | } |
| | | this.menuVisible = true; |
| | | |
| | |
| | | |
| | | tileset.readyPromise.then((tileset) => { |
| | | |
| | | |
| | | tileset.id = res.cnName; |
| | | tileset.layerId = res.id; |
| | | tileset.pubid = res.pubid; |
| | |
| | | window.modelHeight = height; |
| | | } else window.modelHeight = 0; |
| | | this.getTilesetArgs(tileset, res); |
| | | |
| | | |
| | | |
| | | }); |
| | | this.$store.state.setAlphaList.push({ |
| | | name: res.cnName, |
| | |
| | | if (data.code != 200) { |
| | | |
| | | } else { |
| | | this.reload(tileset, data.result.json) |
| | | if (res.bak != '3dml') { |
| | | this.reload(tileset, data.result.json) |
| | | } else { |
| | | this.tileSet(tileset, parseFloat(res.elev)) |
| | | } |
| | | } |
| | | } else { |
| | | this.tileSet(tileset, parseFloat(res.elev)) |
| | |
| | | }, |
| | | getNewTree(obj, result) { |
| | | for (const i in obj) { |
| | | console.log(obj[i].cnName) |
| | | |
| | | result.push(obj[i]) |
| | | if (obj[i].children && obj[i].children.length > 0) { |
| | | this.getNewTree(obj[i].children, result) |
| | |
| | | if (rs.enName == st_code[0].code) { |
| | | return rs |
| | | } |
| | | if (rs.enName && rs.enName.indexOf(st_code[0].code) > -1) { |
| | | return rs |
| | | } |
| | | }) |
| | | |
| | | this.removeAllLayer(); |
| | | var obj = { |
| | | dirid: res, |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | } |
| | | |
| | | const data = await project_selectByDirid(obj); |
| | | if (data.code != 200) { |
| | | this.$message.error("列表获取失败"); |
| | | return; |
| | | } |
| | | |
| | | if (data.result[0]) { |
| | | var geom = data.result[0].geom |
| | | if (geom) { |
| | |
| | | destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[0].toFixed(6), wkt.coordinates[1].toFixed(6), 5000), |
| | | }); |
| | | } |
| | | |
| | | } |
| | | this.cannelTerrainLayer(); |
| | | this.setTerrainMptLayer(); |
| | | //清空图层树选中状态 |
| | | this.$refs.tree.setCheckedKeys([]); |
| | | if (val.length > 0) { |
| | | |
| | | if (val[0].type == 1 && val[0].isProject == 1) {//项目分类 |
| | | |
| | | var std_check = []; |
| | | for (var i in val) { |
| | | var std_check = []; |
| | | for (var i in val) { |
| | | if (val[i].type == 1 && val[i].isProject == 1) {//项目分类 |
| | | var std_val = this.getNewTree([this.$refs.tree.getNode(val[i].id).data], []) |
| | | for (var j in std_val) { |
| | | std_check.push(std_val[j]) |
| | | } |
| | | } |
| | | |
| | | |
| | | var value = this.$store.state.isProjectLayer; |
| | | for (var i in value) { |
| | | |
| | | std_check.push(value[i]) |
| | | } |
| | | this.setProjectLayer(std_check); |
| | | } else { |
| | | this.setChangeProLayer(); |
| | | } |
| | | var value = this.$store.state.isProjectLayer; |
| | | for (var i in value) { |
| | | std_check.push(value[i]) |
| | | } |
| | | |
| | | |
| | | this.setProjectLayer(std_check); |
| | | } else { |
| | | this.setChangeProLayer(); |
| | | } |