From fb98e10c76d7e6c2d01f3a9f8c1b727f905cbdca Mon Sep 17 00:00:00 2001 From: surprise <15810472099@163.com> Date: 星期一, 05 二月 2024 15:30:50 +0800 Subject: [PATCH] 代码更新 --- src/views/Synthesis/LeftMenu.vue | 140 +++++++++++++++++++++++++++++++++++++++------- 1 files changed, 119 insertions(+), 21 deletions(-) diff --git a/src/views/Synthesis/LeftMenu.vue b/src/views/Synthesis/LeftMenu.vue index f5a922c..a19ffd7 100644 --- a/src/views/Synthesis/LeftMenu.vue +++ b/src/views/Synthesis/LeftMenu.vue @@ -245,7 +245,7 @@ <el-button class="primary" size="small" - @click="getInsertDown" + @click="getInsertDownz()" >{{ $t("common.confirm") }}</el-button> @@ -441,6 +441,12 @@ name: "鍦颁笅妯″紡", css: "twoMenu_imge29", }, + // { + // id: "b10", + // label: "synthesis.undergroundMode", + // name: "鐡︾墖涓嬭浇", + // css: "twoMenu_imge29", + // }, ], [ { @@ -1723,7 +1729,7 @@ new Cesium.Cesium3DTileset({ name: res.cnName, url: modelUrl + "/tileset/m/SN/tileset.json", - maximumScreenSpaceError: 64, // 鏈�澶у睆骞曠┖闂撮敊璇細16 + maximumScreenSpaceError: modelUrl.indexOf("/pnts/") > -1 ? 16 : 64, // 鏈�澶у睆骞曠┖闂撮敊璇細16 maximumMemoryUsage: 768, // 鏈�澶у唴瀛橈細512 dynamicScreenSpaceError: true, // 鍑忓皯绂荤浉鏈鸿緝杩滅殑灞忓箷绌洪棿閿欒锛歠alse skipLevelOfDetail: true, // 鍦ㄩ亶鍘嗘椂鍊欒烦杩囪鎯咃細false @@ -1790,6 +1796,7 @@ new Cesium.UrlTemplateImageryProvider({ url: localUrl, maximumLevel: 22, + enablePickFeatures: false }) ); Viewer.imageryLayers.lowerToBottom(window.contRastLayer);//灏嗗浘灞傜Щ鍒版渶搴曞眰 @@ -2229,11 +2236,16 @@ } }, addAnalysisFlood() { + var url = window.location.href; + var testurl = ""; + if (url.indexOf("web") != -1) { + testurl = "/web"; + } var method = { pointSelect: true, spood: 20, GroupID: 0, - url: "/SmartEarthSDK/Workers/image/33.gif", + url: testurl + "/SmartEarthSDK/Workers/image/33.gif", }; window.AnalysisFlood = sgworld.Command.execute( 2, @@ -2451,13 +2463,15 @@ if (str.url != null && str.type == 2 && str.isShow == 1) { return str; } + + }) + var layer = std.filter((str) => { if (str.isProject == 1 && str.type == 2) { this.$store.state.isProjectLayer.push(str); } }) this.setAddLayers(value); - var res = this.setTreeData(val); this.$store.state.pigCode = null; //瀛樺偍閫変腑鍥惧眰 @@ -2470,7 +2484,7 @@ // } // }); // } - + this.$store.state.oldTree = val; this.$store.state.treeData = res; this.$store.state.checkedKeys = checkKey; @@ -2480,6 +2494,12 @@ return cloneData.filter((father) => { // 寰幆鎵�鏈夐」 let branchArr = cloneData.filter((child) => father.id == child.pid); // 瀵规瘮ID锛屽垎鍒笂涓嬬骇鑿滃崟锛屽苟杩斿洖鏁版嵁 + if (branchArr.length > 0) { + branchArr.sort(function (a, b) { + + return a.orderNum - b.orderNum + }) + } branchArr.length > 0 ? (father.children = branchArr) : ""; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊� // 灞炰簬鍚屼竴瀵硅薄闂锛屼緥濡傦細浠� a=b銆乧=1 锛岀劧鍚庡啀浠� b.c=c 锛� 閭d箞 a.c=b.c=c=1 锛涘悓鐞嗭紝鍚庣画浠� c.d=2 ,閭d箞 a.c.d 涔熸槸=2锛� // 鐢辨寰幆澶氭鍚庯紝灏辫兘褰㈡垚鐩稿簲鐨勬爲褰㈡暟鎹粨鏋� @@ -2498,6 +2518,7 @@ } if (std[0].length != 0) { if (this.$store.state.pigCode) { + this.setPrjidWmsLayer(std[0]) } else { @@ -2510,7 +2531,7 @@ var layer = []; var sql = []; var dirid = this.$store.state.pigCode - + var that = this; for (var i in res) { layer.push(res[i].url) @@ -2524,6 +2545,7 @@ layer = layer.reverse(); sql = sql.reverse().join(";") var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat("html", null, function (html) { + that.getFeatureInfo(html) }); window.layerWMS = new Cesium.WebMapServiceImageryProvider({ @@ -2543,7 +2565,8 @@ tileHeight: 512, }); layerWMS.name = "Wms_Layer"; - window.Viewer.scene.imageryLayers.addImageryProvider(window.layerWMS); + + window.Viewer.imageryLayers.addImageryProvider(window.layerWMS); var layer2 = new Image({ name: "Wms_Layer", source: new ImageWMS({ @@ -2583,6 +2606,7 @@ } }, setAddWmsLayer(res) { + var url = []; for (var i in res) { if (res[i].url) { @@ -2611,7 +2635,7 @@ tileHeight: 512, }); layerWMS.name = "Wms_Layer"; - window.Viewer.scene.imageryLayers.addImageryProvider(window.layerWMS); + window.Viewer.imageryLayers.addImageryProvider(window.layerWMS); var layer2 = new Image({ name: "Wms_Layer", source: new ImageWMS({ @@ -2636,12 +2660,19 @@ start = html.lastIndexOf(tab) + tab.length + 1; end = html.indexOf("</td>", start); var gid = html.substr(start, end - start); + if (gid && tab) { this.$store.state.pickoption = { gid: gid, name: tab.replaceAll("_", "") } - + if (tab == 'm_surface_deformation_data') { + this.$store.state.surfaceDeForm.flag = true; + this.$store.state.surfaceDeForm.gid = gid; + } else { + this.$store.state.surfaceDeForm.flag = false; + this.$store.state.surfaceDeForm.gid = null; + } const res = await dataQuery_selectTabByEntity({ name: this.$store.state.pickoption.name }) @@ -2668,6 +2699,7 @@ this.attributeData = [] var valadata = data.result var laydomain = data1.result + this.optionx = data1.result for (var i in valadata) { if (valadata[i].showtype == 1) { if ( @@ -2676,17 +2708,45 @@ ) { for (var j in laydomain) { if (laydomain[j].domName == valadata[i].domainNa) { - valadata[i].domainNa = laydomain[j].codeDesc + // valadata[i].domainNa = laydomain[j].codeDesc } } } - this.optionx.push(valadata[i]) + // this.optionx.push(valadata[i]) this.attributeData.push(valadata[i]) } } this.getTableData() } + }, + //鏍煎紡鍖栨椂闂� + format(shijianchuo) { + //shijianchuo鏄暣鏁帮紝鍚﹀垯瑕乸arseInt杞崲 + var time = new Date(shijianchuo); + var y = time.getFullYear(); + var m = time.getMonth() + 1; + var d = time.getDate(); + var h = time.getHours(); + var mm = time.getMinutes(); + var s = time.getSeconds(); + return ( + y + + '-' + + this.add0(m) + + '-' + + this.add0(d) + + ' ' + + h + + ':' + + mm + + ':' + + s + ); + }, + //鏍煎紡鍖栨椂闂� + add0(m) { + return m < 10 ? '0' + m : m; }, async getTableData() { this.tableData = [] @@ -2696,7 +2756,17 @@ } var valste = data.result - + valste.dirid = valste.dirName; + valste.depid = valste.depName; + valste.verid = valste.verName; + valste.createuser = valste.createName; + valste.updateuser = valste.updateName; + if (valste.createtime) { + valste.createtime = this.format(valste.createtime) + } + if (valste.updatetime) { + valste.updatetime = this.format(valste.updatetime) + } for (var j in this.optionx) { if ( @@ -2710,9 +2780,30 @@ var arr = {} for (var i = (this.attributeData.length - 1); i >= 0; i--) { var vla = this.attributeData[i] - arr[vla.alias] = valste[vla.field] + + + if (vla.domainNa) { + + var val = this.optionx.filter(res => { + if (res.domName == vla.domainNa && res.domCode == valste[vla.field]) { + return res; + } + }) + var vlue = null + if (val.length > 0) { + vlue = val[0].codeDesc + } else { + vlue = '' + } + arr[vla.alias] = vlue + } else { + arr[vla.alias] = valste[vla.field] + } } + arr['eventid'] = valste.eventid + + this.$store.state.propertiesInfo = arr; this.$store.state.propertiesFlag = '1' @@ -3019,7 +3110,7 @@ this.dialogInsertVisible = true; }, downloadx() { - this.$bus.$emit("setInsertDown", this.codeForm) + this.$bus.$emit("setInsertDown1", this.codeForm) this.closeDownx(); }, handleCloseDown1() { @@ -3054,10 +3145,12 @@ }) .catch(_ => { }) }, - getInsertDown() { + getInsertDownz() { this.dialogInsertVisible = false; - this.dialogVisible1 = true; + // this.dialogVisible1 = true; // + + this.$bus.$emit("setInsertApply1", this.ruleForm) }, handleExtentClose() { this.dialogExtentVisible = false @@ -3070,6 +3163,7 @@ } }, mounted() { + this.$bus.$off(); this.measureData = new Map(); this.colorAll = { point: Cesium.Color.fromCssColorString("#ff0000"), @@ -3093,18 +3187,22 @@ }); - this.$store.state.isProjectLayer = [], - this.$store.state.pigCode = null, - this.$store.state.showAllLayers = true; + this.$store.state.isProjectLayer = []; + this.$store.state.pigCode = null; + this.$store.state.showAllLayers = true; this.$store.state.layerMnage = false; this.$store.state.treeData = null; this.$store.state.checkedKeys = []; // this.setCoverage("a1"); - this.layersStart(); + // this.layersStart(); + this.$bus.$on('addImageLayer', (res)=>{ + if(res){ + this.layersStart(); + } + }); this.$bus.$on("setDialogInsertVisible", (res) => { - if (res == true) { this.dialogVisible1 = true; } else { -- Gitblit v1.9.3