| | |
| | | > |
| | | |
| | | <el-form-item :label="$t('common.name')"> |
| | | <el-input v-model="formInline.name"></el-input> |
| | | <!-- <el-input v-model="formInline.name"></el-input> --> |
| | | {{formInline.name}} |
| | | </el-form-item> |
| | | <el-form-item :label="$t('common.type')"> |
| | | <el-input v-model="formInline.type"></el-input> |
| | | <!-- <el-select |
| | | v-model="formInline.type" |
| | | style="width:100%" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> --> |
| | | {{formInline.type}} |
| | | </el-form-item> |
| | | <!-- <el-form-item :label="$t('common.info')"> |
| | | <el-input v-model="formInline.info"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="URL"> |
| | | <el-input v-model="formInline.url"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="Icon"> |
| | | <el-input v-model="formInline.icon"></el-input> |
| | | </el-form-item> --> |
| | | |
| | | <el-form-item :label="$t('common.bak')"> |
| | | <el-input v-model="formInline.bak"></el-input> |
| | | <!-- <el-input v-model="formInline.bak"></el-input> --> |
| | | {{formInline.bak}} |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <!-- <el-form-item> |
| | | <el-button |
| | | v-show="isShowModel" |
| | | type="success" |
| | |
| | | @click="InsertData" |
| | | >{{$t('common.increase')}}</el-button> |
| | | <el-button |
| | | v-show="!isShowModel" |
| | | v-show=" isShowModel" |
| | | type="info" |
| | | plain |
| | | size="small" |
| | | @click="EditData" |
| | | >{{$t('common.update')}}</el-button> |
| | | </el-form-item> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | |
| | | </el-form> |
| | | |
| | | </el-tab-pane> |
| | |
| | | label="附件" |
| | | name="second" |
| | | > |
| | | |
| | | <el-table |
| | | :data="tableData" |
| | | ref="filterTable" |
| | |
| | | comprehensive_selectFiles, |
| | | comprehensive_deletes, |
| | | comprehensive_selectModelByPageAndCount, |
| | | comprehensive_insertModel |
| | | } from "../../api/api.js"; |
| | | comprehensive_insertModel, |
| | | comprehensive_updateModel, selectByBuffer |
| | | } from '../../api/api.js' |
| | | import { |
| | | OverviewMap, |
| | | defaults as defaultControls, |
| | |
| | | name: "空间查询", |
| | | css: "twoMenu_imge52", |
| | | }, |
| | | { |
| | | id: "e3", |
| | | label: "synthesis.pickup", |
| | | name: "拾取", |
| | | css: "twoMenu_imge52", |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | |
| | | }, |
| | | activeName: "first", |
| | | isShowModel: false, |
| | | options: [ |
| | | { |
| | | value: '倾斜模型', |
| | | label: '倾斜模型' |
| | | }, { |
| | | value: 'BIM模型', |
| | | label: 'BIM模型' |
| | | }, { |
| | | value: '点云模型', |
| | | label: '点云模型' |
| | | }, { |
| | | value: '地质设计模型', |
| | | label: '地质设计模型' |
| | | }, { |
| | | value: '人工模型', |
| | | label: '人工模型' |
| | | }, { |
| | | value: '其他模型', |
| | | label: '其他模型' |
| | | }], |
| | | modelClip: false, |
| | | clippingPlanes: null, |
| | | showPickUp: false, |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | setChangeTwoMenu(res) { |
| | | var val = res.id[0]; |
| | | if (window.model != null) { |
| | | window.model.deleteObject(); |
| | | window.model = null; |
| | | // window.model.deleteObject(); |
| | | // window.model = null; |
| | | } |
| | | sgworld.Analysis.clearCurtainContrast(); |
| | | if (this.isMenuFlag == "d") { |
| | |
| | | }, |
| | | }); |
| | | this.entityaLayers.push(entity); |
| | | sgworld.Navigate.flyToObj(entity) |
| | | break; |
| | | case "point": |
| | | let point = Viewer.entities.add({ |
| | |
| | | }); |
| | | |
| | | this.entityaLayers.push(point); |
| | | sgworld.Navigate.flyToObj(point) |
| | | break; |
| | | case "polyline": |
| | | var std = []; |
| | |
| | | }); |
| | | |
| | | this.entityaLayers.push(line); |
| | | sgworld.Navigate.flyToObj(line) |
| | | break; |
| | | case "label": |
| | | const label = Viewer.entities.add({ |
| | |
| | | }, |
| | | }); |
| | | this.entityaLayers.push(label); |
| | | sgworld.Navigate.flyToObj(label) |
| | | break; |
| | | } |
| | | } |
| | |
| | | fileReader.result, |
| | | kmlOptions |
| | | ); |
| | | |
| | | sgworld.Navigate.flyToObj(geocachePromise) |
| | | |
| | | geocachePromise.then(function (dataSource) { |
| | | var geocacheEntities = dataSource.entities.values; |
| | |
| | | setIquery(res) { |
| | | switch (res) { |
| | | case "e2": |
| | | Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | this.$store.state.mapMenuBoolean = !this.$store.state.mapMenuBoolean; |
| | | this.$store.state.mapMenuBoxFlag = "1"; |
| | | break; |
| | | case "e1": |
| | | Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | this.$store.state.mapMenuBoolean = !this.$store.state.mapMenuBoolean; |
| | | this.$store.state.mapMenuBoxFlag = "2"; |
| | | break; |
| | | //拾取功能 |
| | | case "e3": |
| | | this.$store.state.mapMenuBoolean = false; |
| | | this.showPickUp = !this.showPickUp; |
| | | if (this.showPickUp) { |
| | | let that = this; |
| | | Viewer.screenSpaceEventHandler.setInputAction(function (event) { |
| | | let p = sgworld.Navigate.getMouseDegrees(event); |
| | | console.log(p); |
| | | that.getPickUpData(p); |
| | | }, Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | } else { |
| | | this.$refs.queryinfo.closeAll(); |
| | | Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | } |
| | | break; |
| | | } |
| | | }, |
| | |
| | | |
| | | setAnalsy(res) { |
| | | //this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close("queryinfo"); |
| | | |
| | | this.$bus.$emit("closeMenuPop", res); |
| | | var that = this; |
| | | switch (res) { |
| | | case "d1": //等高线分析 |
| | | this.closePipelinePop(); |
| | | that.isolineFlag = !that.isolineFlag; |
| | | elevationTool.tf = that.isolineFlag; |
| | | elevationTool.render(); |
| | | break; |
| | | case "d2": //坡度分析 |
| | | this.closePipelinePop(); |
| | | that.isslopeFlag = !that.isslopeFlag; |
| | | var val = { |
| | | name: "Lengend", |
| | |
| | | |
| | | break; |
| | | case "d3": //路径分析 |
| | | this.closePipelinePop(); |
| | | this.isRouter = !this.isRouter; |
| | | let value; |
| | | if (this.isRouter) { |
| | |
| | | this.$bus.$emit("mapChangeBox", value); |
| | | break; |
| | | case "d4": //剖面分析 |
| | | this.closePipelinePop(); |
| | | if (window.AnalysisDXPM) { |
| | | window.AnalysisDXPM.end && window.AnalysisDXPM.end("cancel"); |
| | | this.clear(res); |
| | |
| | | } |
| | | break; |
| | | case "d5": //洪水淹没分析 |
| | | this.closePipelinePop(); |
| | | if (window.AnalysisFlood) { |
| | | this.clear(res); |
| | | } else { |
| | |
| | | } |
| | | break; |
| | | case "d6": //土方量分析 |
| | | this.closePipelinePop(); |
| | | if (window.TFvolumetricMeasurementTool) { |
| | | TFvolumetricMeasurementTool.cleanUp(); |
| | | if (TFvolumetricMeasurementTool._mouseHandler) { |
| | |
| | | } |
| | | break; |
| | | case "d7": //三维截面分析 |
| | | this.closePipelinePop(); |
| | | // if(window.MXModel) { |
| | | // Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | // window.MXModel=null; |
| | | // } else { |
| | | var that = this; |
| | | window.model = sgworld.Creator.create3DTilesets( |
| | | "", |
| | | modelUrl + "/tileset/m/SN/tileset.json", |
| | | {}, |
| | | {}, |
| | | "0", |
| | | true, |
| | | (data) => { |
| | | sgworld.Navigate.flyToObj(data); |
| | | that.setclippingModel(); |
| | | that.modelClip = !that.modelClip; |
| | | if (that.modelClip) { |
| | | if (window.model) { |
| | | that.modelClipping(); |
| | | } |
| | | ); |
| | | else { |
| | | var tileset = Viewer.scene.primitives.add( |
| | | new Cesium.Cesium3DTileset({ |
| | | name: res.cnName, |
| | | url: modelUrl + "/tileset/m/SN/tileset.json", |
| | | maximumScreenSpaceError: 64, // 最大屏幕空间错误:16 |
| | | maximumMemoryUsage: 768, // 最大内存:512 |
| | | dynamicScreenSpaceError: true, // 减少离相机较远的屏幕空间错误:false |
| | | skipLevelOfDetail: true, // 在遍历时候跳过详情:false |
| | | }) |
| | | ); |
| | | tileset.readyPromise.then((tileset) => { |
| | | tileset.id = res.cnName; |
| | | tileset.layerId = res.id; |
| | | Viewer.flyTo(tileset); |
| | | that.modelClipping(); |
| | | }); |
| | | window.model = tileset |
| | | } |
| | | } |
| | | else { |
| | | Viewer.entities.removeAll(); |
| | | } |
| | | // window.model = sgworld.Creator.create3DTilesets( |
| | | // "", |
| | | // modelUrl + "/tileset/m/SN/tileset.json", |
| | | // {}, |
| | | // {}, |
| | | // "0", |
| | | // true, |
| | | // (data) => { |
| | | // sgworld.Navigate.flyToObj(data); |
| | | // that.setclippingModel(); |
| | | // } |
| | | // ); |
| | | |
| | | break; |
| | | case "d9": //管道分析 |
| | |
| | | |
| | | break; |
| | | case "d8": //影像对比 |
| | | this.closePipelinePop(); |
| | | if (this.isContrastFlag == false) { |
| | | this.isContrastFlag = true; |
| | | sgworld.Analysis.createCurtainContrast(2, 1); |
| | |
| | | } |
| | | break; |
| | | case "d10": //地面整平 |
| | | this.closePipelinePop(); |
| | | var val = { |
| | | name: "Trrain", |
| | | id: res, |
| | |
| | | break; |
| | | |
| | | case "d11": //地形开挖 |
| | | this.closePipelinePop(); |
| | | // this.$refs && |
| | | // this.$refs.terrainDig && |
| | | // this.$refs.terrainDig.open("管道空间分析", null, { |
| | |
| | | break; |
| | | |
| | | case "d12": //通视分析 |
| | | this.closePipelinePop(); |
| | | if (window.TSExcavation != null) { |
| | | window.TSExcavation._SimpleGraphic.drawHandler && |
| | | window.TSExcavation._SimpleGraphic.drawHandler.destroy(); |
| | |
| | | } |
| | | break; |
| | | case "d13": //视域分析 |
| | | this.closePipelinePop(); |
| | | if (window.SYExcavatio) { |
| | | window.SYExcavatio.end && window.SYExcavatio.end(); |
| | | window.SYExcavatio.close(); |
| | |
| | | } |
| | | break; |
| | | case "d14": //圆形时域分析 |
| | | this.closePipelinePop(); |
| | | if (window.YXSYExcavation) { |
| | | window.YXSYExcavation.end && window.YXSYExcavation.end(); |
| | | window.YXSYExcavation.close(); |
| | |
| | | |
| | | break; |
| | | } |
| | | }, |
| | | |
| | | //模型裁切 |
| | | modelClipping() { |
| | | const scene = Viewer.scene; |
| | | let targetY = 0.0; |
| | | let planeEntities = []; |
| | | let selectedPlane; |
| | | let clippingPlanes = new Cesium.ClippingPlaneCollection({ |
| | | planes: [ // ClippingPlane对象数组集合 |
| | | new Cesium.ClippingPlane( // 裁切面 |
| | | new Cesium.Cartesian3(0.0, 0.0, -1.0), // 法线方向 |
| | | 0// 原点到平面的最短距离,设置0就好 |
| | | ), |
| | | ], |
| | | enabled: true, |
| | | edgeWidth: 1.0, // 模型被裁切部分的截面线宽 |
| | | }); |
| | | let boundingSphere = window.model.boundingSphere; |
| | | // 创建添加裁剪平面 |
| | | for (let i = 0; i < clippingPlanes.length; ++i) { |
| | | const plane = clippingPlanes.get(i); |
| | | const planeEntity = Viewer.entities.add({ |
| | | position: boundingSphere.center, |
| | | plane: { |
| | | dimensions: new Cesium.Cartesian2( |
| | | boundingSphere.radius * 1.5, |
| | | boundingSphere.radius * 1.5 |
| | | ), |
| | | material: Cesium.Color.WHITE.withAlpha(0.1), |
| | | plane: new Cesium.CallbackProperty( |
| | | // 添加绑定事件,不断调用 |
| | | createPlaneUpdateFunction(plane), |
| | | false |
| | | ), |
| | | outline: true, |
| | | outlineColor: Cesium.Color.WHITE, |
| | | }, |
| | | }); |
| | | planeEntities.push(planeEntity); |
| | | } |
| | | this.clippingPlanes = clippingPlanes; |
| | | window.model.clippingPlanes = clippingPlanes; |
| | | |
| | | // Select plane when mouse down |
| | | // 绑定上移动事件 |
| | | const downHandler = new Cesium.ScreenSpaceEventHandler( |
| | | Viewer.scene.canvas |
| | | ); |
| | | downHandler.setInputAction(function (movement) { |
| | | const pickedObject = scene.pick(movement.position); |
| | | if ( |
| | | Cesium.defined(pickedObject) && |
| | | Cesium.defined(pickedObject.id.plane) |
| | | ) { |
| | | selectedPlane = pickedObject.id.plane; |
| | | selectedPlane.material = Cesium.Color.WHITE.withAlpha(0.05); |
| | | selectedPlane.outlineColor = Cesium.Color.WHITE; |
| | | scene.screenSpaceCameraController.enableInputs = false; |
| | | } |
| | | }, Cesium.ScreenSpaceEventType.LEFT_DOWN); |
| | | |
| | | // Release plane on mouse up |
| | | // 绑定下移动事件 |
| | | const upHandler = new Cesium.ScreenSpaceEventHandler( |
| | | Viewer.scene.canvas |
| | | ); |
| | | upHandler.setInputAction(function () { |
| | | if (Cesium.defined(selectedPlane)) { |
| | | selectedPlane.material = Cesium.Color.WHITE.withAlpha(0.1); |
| | | selectedPlane.outlineColor = Cesium.Color.WHITE; |
| | | selectedPlane = undefined; |
| | | } |
| | | scene.screenSpaceCameraController.enableInputs = true; |
| | | }, Cesium.ScreenSpaceEventType.LEFT_UP); |
| | | // Update plane on mouse move |
| | | const moveHandler = new Cesium.ScreenSpaceEventHandler( |
| | | Viewer.scene.canvas |
| | | ); |
| | | moveHandler.setInputAction(function (movement) { |
| | | if (Cesium.defined(selectedPlane)) { |
| | | const deltaY = movement.startPosition.y - movement.endPosition.y; |
| | | targetY += deltaY; |
| | | } |
| | | }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); |
| | | function createPlaneUpdateFunction(plane) { |
| | | return function () { |
| | | plane.distance = targetY; |
| | | return plane; |
| | | }; |
| | | } |
| | | }, |
| | | |
| | | //关闭管道信息弹窗 |
| | | closePipelinePop() { |
| | | this.$refs && |
| | | this.$refs.queryinfo && |
| | | this.$refs.queryinfo.close("queryinfo"); |
| | | }, |
| | | setclippingModel() { |
| | | if (window.model) { |
| | |
| | | }, |
| | | async showModelCatch() { |
| | | if (this.$store.state.catModel) { |
| | | |
| | | this.startModelData(); |
| | | this.formInline = { |
| | | title: '', |
| | | file: '', |
| | | name: '', |
| | | type: '', |
| | | info: '', |
| | | icon: '', |
| | | bak: '' |
| | | } |
| | | this.formInline.title = this.$store.state.catModelInfo.name; |
| | | |
| | | this.formInline.Id = this.$store.state.catModelInfo.id; |
| | | this.formInline.LayerName = this.$store.state.catModelInfo.layerName; |
| | | |
| | | this.startModelData(); |
| | | this.activeName = "first" |
| | | this.getAttacthFlieList(); |
| | | this.dialogVisible = true; |
| | |
| | | async startModelData() { |
| | | var obj = { |
| | | layerid: this.$store.state.catModelInfo.layerId, |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | modelid: this.$store.state.catModelInfo.id |
| | | } |
| | | const data = await comprehensive_selectModelByPageAndCount(obj); |
| | | const data = await comprehensive_selectModelByGuid(obj); |
| | | if (data.code != 200) { |
| | | return; |
| | | } |
| | | if (data.count == 0) { |
| | | |
| | | if (data.result == null) { |
| | | this.isShowModel = true; |
| | | this.formInline.name = this.formInline.title; |
| | | } else { |
| | | this.isShowModel = false; |
| | | this.formInline = data.result; |
| | | |
| | | this.isShowModel = false; |
| | | this.formInline.title = this.formInline.name; |
| | | |
| | | } |
| | | }, |
| | | async EditData() { |
| | | const data = await comprehensive_updateModel(this.formInline) |
| | | if (data.code != 200) { |
| | | this.$message.error('修改失败'); |
| | | } else { |
| | | this.$message({ |
| | | message: '修改成功', |
| | | type: 'success' |
| | | }); |
| | | } |
| | | this.startModelData(); |
| | | }, |
| | | async InsertData() { |
| | | const data = await comprehensive_insertModel(this.formInline) |
| | | debugger |
| | | var std = { |
| | | "bak": this.formInline.bak, |
| | | "guid": this.$store.state.catModelInfo.id, |
| | | "layerid": this.$store.state.catModelInfo.layerId, |
| | | "modelid": this.$store.state.catModelInfo.id, |
| | | "name": this.formInline.name, |
| | | "type": this.formInline.type |
| | | } |
| | | const data = await comprehensive_insertModel(std) |
| | | if (data.code != 200) { |
| | | this.$message.error('添加失败'); |
| | | } else { |
| | | this.$message({ |
| | | message: '添加成功', |
| | | type: 'success' |
| | | }); |
| | | } |
| | | this.startModelData(); |
| | | |
| | | }, |
| | |
| | | } |
| | | }); |
| | | }, |
| | | //附件列表查询 |
| | | //附件列表查询 |
| | | async getAttacthFlieList() { |
| | | var obj = { |
| | | eventid: this.$store.state.catModelInfo.id, |
| | |
| | | handleAttatchChange(val) { |
| | | this.attacgSelection = val; |
| | | }, |
| | | //拾取数据获取 |
| | | async getPickUpData(info) { |
| | | let checkedLayers = JSON.parse(sessionStorage.getItem("checkedLayers")); |
| | | let showPop = false; |
| | | for (const item of checkedLayers) { |
| | | let name = item.url.replaceAll("LF:", ""); |
| | | name = name.replaceAll("_", ""); |
| | | let params = { |
| | | buffer: 10, |
| | | limit: 20, |
| | | name: name, |
| | | wkt: `POINT (${info.lon} ${info.lat})`, |
| | | } |
| | | const res = await selectByBuffer(params); |
| | | if (res.result && res.result.length > 0) { |
| | | this.$store.state.mapPopBoxFlag = "4"; |
| | | this.$store.state.pickUpPointInfo = info; |
| | | this.$refs && |
| | | this.$refs.queryinfo && |
| | | this.$refs.queryinfo.open("拾取分析", null,); |
| | | showPop = true; |
| | | break; |
| | | } |
| | | } |
| | | if (!showPop) { |
| | | this.$message.warning("暂无数据!"); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.measureData = new Map(); |