From 6c17299e2b123a55423e01933654a10d94be616b Mon Sep 17 00:00:00 2001 From: lixuliang <lixuliang_hd@126.com> Date: 星期日, 28 四月 2024 22:19:29 +0800 Subject: [PATCH] 模型库 军标库 --- src/views/Synthesis/LeftMenu.vue | 920 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 460 insertions(+), 460 deletions(-) diff --git a/src/views/Synthesis/LeftMenu.vue b/src/views/Synthesis/LeftMenu.vue index a391138..a6eabe1 100644 --- a/src/views/Synthesis/LeftMenu.vue +++ b/src/views/Synthesis/LeftMenu.vue @@ -5,11 +5,9 @@ @click="setChangeTwoMenu(item)" v-for="(item, index) in setListTwoMenu" :class="{ lefMenuDivActive: showTwoMenuFlag == item.id }" + :key="index" > - <div - class="menuTwoImage" - :class="item.css" - ></div> + <div class="menuTwoImage" :class="item.css"></div> <div>{{ $t(item.label) }}</div> </div> <mapinfo ref="mapinfo" /> @@ -19,12 +17,7 @@ <modelAttach ref="modelAttach" /> <undergroundModel ref="undergroundModel" /> <setPellucidity ref="setPellucidity" /> - <input - type="file" - accept=".kml" - class="file" - style="display: none" - /> + <input type="file" accept=".kml" class="file" style="display: none" /> <input :accept="'.shp, .shx, .dbf, .prj'" style="display: none" @@ -53,10 +46,7 @@ :modal="false" :close-on-click-modal="false" > - <div - v-if="dialog.isPdf" - class="pdfClass" - > + <div v-if="dialog.isPdf" class="pdfClass"> <iframe :src="dialog.src" type="application/x-google-chrome-pdf" @@ -65,38 +55,22 @@ > </iframe> </div> - <div - v-if="dialog.isJpg" - class="pdfClass" - > - + <div v-if="dialog.isJpg" class="pdfClass"> <el-image - style="width:100%; height:100%" + style="width: 100%; height: 100%" :src="dialog.src" :preview-src-list="[dialog.src]" > </el-image> - </div> </el-dialog> - <div style="height:63vh"> - <el-tabs - v-model="activeName" - @tab-click="handleClick" - > - <el-tab-pane - label="灞炴��" - name="first" - > - <el-form - ref="form" - :model="formInline" - label-width="80px" - > - + <div style="height: 63vh"> + <el-tabs v-model="activeName" @tab-click="handleClick"> + <el-tab-pane label="灞炴��" name="first"> + <el-form ref="form" :model="formInline" label-width="80px"> <el-form-item :label="$t('common.name')"> <!-- <el-input v-model="formInline.name"></el-input> --> - {{formInline.name}} + {{ formInline.name }} </el-form-item> <el-form-item :label="$t('common.type')"> <!-- <el-select @@ -111,12 +85,12 @@ > </el-option> </el-select> --> - {{formInline.type}} + {{ formInline.type }} </el-form-item> <el-form-item :label="$t('common.bak')"> <!-- <el-input v-model="formInline.bak"></el-input> --> - {{formInline.bak}} + {{ formInline.bak }} </el-form-item> <!-- <el-form-item> <el-button @@ -134,15 +108,9 @@ @click="EditData" >{{$t('common.update')}}</el-button> </el-form-item> --> - </el-form> - </el-tab-pane> - <el-tab-pane - label="闄勪欢" - name="second" - > - + <el-tab-pane label="闄勪欢" name="second"> <el-table :data="tableData" ref="filterTable" @@ -151,19 +119,13 @@ style="width: 100%" @selection-change="handleAttatchChange" > - <el-table-column - type="selection" - width="70" - /> + <el-table-column type="selection" width="70" /> <el-table-column width="60" type="index" :label="$t('common.index')" /> - <el-table-column - prop="name" - :label="$t('common.name')" - /> + <el-table-column prop="name" :label="$t('common.name')" /> <el-table-column prop="sizes" @@ -180,16 +142,13 @@ v-if="matchState(scope, /[]/)" @click="setAttatchDetail(scope.$index, scope.row)" class="elLink" - >{{ $t('common.see') }}</el-link> - + >{{ $t("common.see") }}</el-link + > </template> </el-table-column> </el-table> - </el-tab-pane> - </el-tabs> - </div> </el-dialog> <el-dialog @@ -201,11 +160,7 @@ :before-close="handleInsertClose" > <div style="width: 100%; max-height: 450px; overflow-y: auto"> - <el-form - ref="form" - :model="ruleForm" - label-width="100px" - > + <el-form ref="form" :model="ruleForm" label-width="100px"> <el-form-item label="瀹℃牳鍗曚綅"> <div> <ul> @@ -242,18 +197,10 @@ </el-input> </el-form-item> <el-form-item> - <el-button - class="primary" - size="small" - @click="getInsertDownz()" - >{{ + <el-button class="primary" size="small" @click="getInsertDownz()">{{ $t("common.confirm") }}</el-button> - <el-button - type="info" - size="small" - @click="closeInsertDown" - >{{ + <el-button type="info" size="small" @click="closeInsertDown">{{ $t("common.cancel") }}</el-button> </el-form-item> @@ -275,20 +222,14 @@ label-width="100px" class="codeForm" > - <el-form-item - :label="$t('common.passworld')" - prop="password" - > + <el-form-item :label="$t('common.passworld')" prop="password"> <el-input type="password" v-model="codeForm.password" show-password ></el-input> </el-form-item> - <el-form-item - :label="$t('common.SPassword')" - prop="repassword" - > + <el-form-item :label="$t('common.SPassword')" prop="repassword"> <el-input type="password" v-model="codeForm.repassword" @@ -300,12 +241,9 @@ class="primary" size="small" @click="downloadx('codeForm')" - >{{ $t("common.confirm") }}</el-button> - <el-button - type="info" - size="small" - @click="closeDownx('codeForm')" - >{{ + >{{ $t("common.confirm") }}</el-button + > + <el-button type="info" size="small" @click="closeDownx('codeForm')">{{ $t("common.cancel") }}</el-button> </el-form-item> @@ -320,26 +258,17 @@ :lock-scroll="false" :close-on-click-modal="false" > - <el-row :gutter="20"> <el-col :span="16"> <el-input v-model="setExtent"></el-input> </el-col> <el-col :span="6"> - <div> - 鍗曚綅锛氾紙m锛� - </div> + <div>鍗曚綅锛氾紙m锛�</div> </el-col> </el-row> - <span - slot="footer" - class="dialog-footer" - > + <span slot="footer" class="dialog-footer"> <el-button @click="handleExtentClose">鍙� 娑�</el-button> - <el-button - @click="handleExtentinsert" - type="primary" - >纭� 瀹�</el-button> + <el-button @click="handleExtentinsert" type="primary">纭� 瀹�</el-button> </span> </el-dialog> </div> @@ -368,12 +297,13 @@ comprehensive_deletes, comprehensive_selectModelByPageAndCount, comprehensive_insertModel, - comprehensive_updateModel, selectByBuffer, + comprehensive_updateModel, + selectByBuffer, dataQuery_selectTabByEntity, inquiry_selectDomains, inquiry_selectFields, dataQuery_selectByGid, -} from '../../api/api.js' +} from "../../api/api.js"; import { OverviewMap, defaults as defaultControls, @@ -385,13 +315,21 @@ import { geometry } from "@turf/turf"; export default { - components: { mapinfo, maplayer, queryinfo, terrainDig, modelAttach, undergroundModel, setPellucidity }, + components: { + mapinfo, + maplayer, + queryinfo, + terrainDig, + modelAttach, + undergroundModel, + setPellucidity, + }, data() { var repasswordValidator = (rule, value, callback) => { - if (value === '') { - callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�')); + if (value === "") { + callback(new Error("璇峰啀娆¤緭鍏ュ瘑鐮�")); } else if (value !== this.codeForm.password) { - callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!')); + callback(new Error("涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!")); } else { callback(); } @@ -400,24 +338,25 @@ var passwordreg = /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![a-z0-9]+$)(?![a-z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![0-9\W!@#$%^&*`~()\\-_+=,.?;<>]+$)[a-zA-Z0-9\W!@#$%^&*`~()\\-_+=,.?;<>]{12,20}$/; if (!passwordreg.test(value)) { - callback( - new Error('瀵嗙爜蹇呴』鐢辨暟瀛椼�佸瓧姣嶃�佺壒娈婂瓧绗︾粍鍚�,璇疯緭鍏�13-20浣�') - ); + callback(new Error("瀵嗙爜蹇呴』鐢辨暟瀛椼�佸瓧姣嶃�佺壒娈婂瓧绗︾粍鍚�,璇疯緭鍏�13-20浣�")); } else { callback(); } }; return { rules: { - password: [{ required: true, message: '璇疯緭鍏ュ瘑鐮�', trigger: 'blur' }, { validator: passwordValidator, trigger: 'blur' }], + password: [ + { required: true, message: "璇疯緭鍏ュ瘑鐮�", trigger: "blur" }, + { validator: passwordValidator, trigger: "blur" }, + ], repassword: [ - { required: true, message: '璇疯緭鍏ョ‘璁ゅ瘑鐮�', trigger: 'blur' }, - { validator: repasswordValidator, trigger: 'blur' }, + { required: true, message: "璇疯緭鍏ョ‘璁ゅ瘑鐮�", trigger: "blur" }, + { validator: repasswordValidator, trigger: "blur" }, ], }, codeForm: { - password: '', - repassword: '', + password: "", + repassword: "", }, showTwoMenuFlag: false, setListTwoMenu: [], @@ -629,7 +568,6 @@ name: "绌洪棿鏌ヨ", css: "twoMenu_imge52", }, - ], [ { @@ -721,6 +659,18 @@ css: "twoMenu_imge84", }, { + id: "h11", + label: "synthesis.militaryMark", + name: "鍐涗簨鏍囩粯", + css: "twoMenu_imge84", + }, + { + id: "h12", + label: "synthesis.modelPlotting", + name: "妯″瀷鏍囩粯", + css: "twoMenu_imge84", + }, + { id: "h5", label: "synthesis.import", name: "瀵煎叆KML", @@ -789,43 +739,49 @@ DXZPState: null, //鍦板舰鏁村钩 dialogVisible: false, formInline: { - title: '', - file: '', - name: '', - type: '', - info: '', - icon: '', - bak: '' + title: "", + file: "", + name: "", + type: "", + info: "", + icon: "", + bak: "", }, tableData: [], dialog: { dialogVisible: false, isPdf: false, isJpg: false, - src: '' + src: "", }, activeName: "first", isShowModel: false, options: [ { - value: '鍊炬枩妯″瀷', - label: '鍊炬枩妯″瀷' - }, { - value: 'BIM妯″瀷', - label: 'BIM妯″瀷' - }, { - value: '鐐逛簯妯″瀷', - label: '鐐逛簯妯″瀷' - }, { - value: '鍦拌川璁捐妯″瀷', - label: '鍦拌川璁捐妯″瀷' - }, { - value: '浜哄伐妯″瀷', - label: '浜哄伐妯″瀷' - }, { - value: '鍏朵粬妯″瀷', - label: '鍏朵粬妯″瀷' - }], + value: "鍊炬枩妯″瀷", + label: "鍊炬枩妯″瀷", + }, + { + value: "BIM妯″瀷", + label: "BIM妯″瀷", + }, + { + value: "鐐逛簯妯″瀷", + label: "鐐逛簯妯″瀷", + }, + { + value: "鍦拌川璁捐妯″瀷", + label: "鍦拌川璁捐妯″瀷", + }, + { + value: "浜哄伐妯″瀷", + label: "浜哄伐妯″瀷", + }, + { + value: "鍏朵粬妯″瀷", + label: "鍏朵粬妯″瀷", + }, + ], modelClip: false, showPickUp: false, dialogInsertVisible: false, @@ -856,7 +812,7 @@ this.clearAllAnalsy(); } - this.$store.state.propertiesFlag = ''; + this.$store.state.propertiesFlag = ""; if (this.isMenuFlag != val) { if (res.id != "b9") { @@ -884,7 +840,7 @@ } } this.showTwoMenuFlag = res.id; - if (val != 'h' && res.id != "b9") { + if (val != "h" && res.id != "b9") { sgworld.Creator.SimpleGraphic.clear(); Viewer.entities.removeAll(); } @@ -917,34 +873,33 @@ } }, setPlot(res) { - switch (res) { case "h1": sgworld.Creator.createSimpleGraphic( "point", {}, - function (entity) { } + function (entity) {} ); break; case "h2": sgworld.Creator.createSimpleGraphic( "polyline", {}, - function (entity) { } + function (entity) {} ); break; case "h3": sgworld.Creator.createSimpleGraphic( "rectangle", {}, - function (entity) { } + function (entity) {} ); break; case "h4": sgworld.Creator.createSimpleGraphic( "polygon", {}, - function (entity) { } + function (entity) {} ); break; case "h5": @@ -971,8 +926,18 @@ sgworld.Creator.createSimpleGraphic( "label", {}, - function (entity) { } + function (entity) {} ); + break; + // 鍐涙爣 + case "h11": + this.$bus.$emit("setShowMilitaryMark", true); + this.$bus.$emit("setShowModelPlotting", false); + break; + // 妯″瀷 + case "h12": + this.$bus.$emit("setShowModelPlotting", true); + this.$bus.$emit("setShowMilitaryMark", false); break; } }, @@ -1156,7 +1121,7 @@ document.body.removeChild(a); // 閲婃斁 } }, - error: function (e) { }, + error: function (e) {}, }); }, handleOpenShp() { @@ -1227,7 +1192,7 @@ }, }); this.entityaLayers.push(entity); - sgworld.Navigate.flyToObj(entity) + sgworld.Navigate.flyToObj(entity); break; case "point": let point = Viewer.entities.add({ @@ -1248,7 +1213,7 @@ }); this.entityaLayers.push(point); - sgworld.Navigate.flyToObj(point) + sgworld.Navigate.flyToObj(point); break; case "polyline": var std = []; @@ -1269,7 +1234,7 @@ }); this.entityaLayers.push(line); - sgworld.Navigate.flyToObj(line) + sgworld.Navigate.flyToObj(line); break; case "label": const label = Viewer.entities.add({ @@ -1288,7 +1253,7 @@ }, }); this.entityaLayers.push(label); - sgworld.Navigate.flyToObj(label) + sgworld.Navigate.flyToObj(label); break; } } @@ -1325,7 +1290,7 @@ kmlOptions ); - sgworld.Navigate.flyToObj(geocachePromise) + sgworld.Navigate.flyToObj(geocachePromise); geocachePromise.then(function (dataSource) { var geocacheEntities = dataSource.entities.values; @@ -1369,18 +1334,18 @@ url, name, "height=" + - iHeight + - ",,innerHeight=" + - iHeight + - ",width=" + - iWidth + - ",innerWidth=" + - iWidth + - ",top=" + - iTop + - ",left=" + - iLeft + - ",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no" + iHeight + + ",,innerHeight=" + + iHeight + + ",width=" + + iWidth + + ",innerWidth=" + + iWidth + + ",top=" + + iTop + + ",left=" + + iLeft + + ",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no" ); }, @@ -1468,8 +1433,9 @@ "auto", (data) => { if (volumetricMeasurementTool.popupData) { - volumetricMeasurementTool.popupData.value = `濉柟锛�${data.volume.fill.toFixed(4) + data.unit.fill - }<br>鎸栨柟锛�${data.volume.dig.toFixed(4) + data.unit.dig}`; + volumetricMeasurementTool.popupData.value = `濉柟锛�${ + data.volume.fill.toFixed(4) + data.unit.fill + }<br>鎸栨柟锛�${data.volume.dig.toFixed(4) + data.unit.dig}`; } else { data.id = window.sgworld.Core.getuid(); this.measureData.set(data.id, volumetricMeasurementTool); @@ -1528,8 +1494,9 @@ }); break; case "浣撶Н鏂归噺": - info = `濉柟锛�${data.volume.fill.toFixed(4) + data.unit.fill - }<br>鎸栨柟锛�${data.volume.dig.toFixed(4) + data.unit.dig}`; + info = `濉柟锛�${ + data.volume.fill.toFixed(4) + data.unit.fill + }<br>鎸栨柟锛�${data.volume.dig.toFixed(4) + data.unit.dig}`; break; } return ( @@ -1586,7 +1553,9 @@ }, Cesium.ScreenSpaceEventType.LEFT_CLICK); } else { this.$refs.queryinfo.closeAll(); - Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); + Viewer.screenSpaceEventHandler.removeInputAction( + Cesium.ScreenSpaceEventType.LEFT_CLICK + ); } break; } @@ -1699,8 +1668,9 @@ "auto", (data) => { if (TFvolumetricMeasurementTool.popupData) { - TFvolumetricMeasurementTool.popupData.value = `濉柟锛�${data.volume.fill.toFixed(4) + data.unit.fill - }<br>鎸栨柟锛�${data.volume.dig.toFixed(4) + data.unit.dig}`; + TFvolumetricMeasurementTool.popupData.value = `濉柟锛�${ + data.volume.fill.toFixed(4) + data.unit.fill + }<br>鎸栨柟锛�${data.volume.dig.toFixed(4) + data.unit.dig}`; } else { data.id = sgworld.Core.getuid(); this.measureData.set(data.id, TFvolumetricMeasurementTool); @@ -1723,13 +1693,13 @@ // that.$store.state.propertiesFlag = '3'; if (window.model) { that.modelClipping(); - } - else { + } else { var tileset = Viewer.scene.primitives.add( new Cesium.Cesium3DTileset({ name: res.cnName, url: modelUrl + "/tileset/m/SN/tileset.json", - maximumScreenSpaceError: modelUrl.indexOf("/pnts/") > -1 ? 16 : 64, // 鏈�澶у睆骞曠┖闂撮敊璇細16 + maximumScreenSpaceError: + modelUrl.indexOf("/pnts/") > -1 ? 16 : 64, // 鏈�澶у睆骞曠┖闂撮敊璇細16 maximumMemoryUsage: 768, // 鏈�澶у唴瀛橈細512 dynamicScreenSpaceError: true, // 鍑忓皯绂荤浉鏈鸿緝杩滅殑灞忓箷绌洪棿閿欒锛歠alse skipLevelOfDetail: true, // 鍦ㄩ亶鍘嗘椂鍊欒烦杩囪鎯咃細false @@ -1741,10 +1711,9 @@ Viewer.flyTo(tileset); that.modelClipping(); }); - window.model = tileset + window.model = tileset; } - } - else { + } else { // that.$store.state.propertiesFlag = ''; Viewer.entities.removeAll(); } @@ -1790,32 +1759,29 @@ this.closePipelinePop(); if (this.isContrastFlag == false) { this.isContrastFlag = true; - var localUrl = 'http://{host}/LFData/2d/tiles/img/{z}/{x}/{y}.png' - localUrl = localUrl.replace("{host}", iisHost) + var localUrl = "http://{host}/LFData/2d/tiles/img/{z}/{x}/{y}.png"; + localUrl = localUrl.replace("{host}", iisHost); window.contRastLayer = Viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: localUrl, maximumLevel: 22, - enablePickFeatures: false + enablePickFeatures: false, }) ); - Viewer.imageryLayers.lowerToBottom(window.contRastLayer);//灏嗗浘灞傜Щ鍒版渶搴曞眰 + Viewer.imageryLayers.lowerToBottom(window.contRastLayer); //灏嗗浘灞傜Щ鍒版渶搴曞眰 - Viewer.imageryLayers.raise(window.contRastLayer);//灏嗗浘灞備笂绉讳竴灞� + Viewer.imageryLayers.raise(window.contRastLayer); //灏嗗浘灞備笂绉讳竴灞� if (window.BaseMapLayer) { - Viewer.imageryLayers.raise(window.contRastLayer);//灏嗗浘灞備笂绉讳竴灞� + Viewer.imageryLayers.raise(window.contRastLayer); //灏嗗浘灞備笂绉讳竴灞� sgworld.Analysis.createCurtainContrast(1, 2); } else { sgworld.Analysis.createCurtainContrast(0, 1); } - } else { this.isContrastFlag = false; sgworld.Analysis.clearCurtainContrast(); if (window.contRastLayer) { - window.Viewer.imageryLayers.remove( - window.contRastLayer - ); + window.Viewer.imageryLayers.remove(window.contRastLayer); window.contRastLayer = null; } } @@ -1878,7 +1844,7 @@ window.Excavation = sgworld.Analysis.TerrainExcavation( 10, {}, - function () { } + function () {} ); } break; @@ -1951,10 +1917,11 @@ let planeEntities = []; let selectedPlane; let clippingPlanes = new Cesium.ClippingPlaneCollection({ - planes: [ // ClippingPlane瀵硅薄鏁扮粍闆嗗悎 + planes: [ + // ClippingPlane瀵硅薄鏁扮粍闆嗗悎 new Cesium.ClippingPlane( // 瑁佸垏闈� new Cesium.Cartesian3(0.0, 0.0, -1.0), // 娉曠嚎鏂瑰悜 - 0// 鍘熺偣鍒板钩闈㈢殑鏈�鐭窛绂伙紝璁剧疆0灏卞ソ + 0 // 鍘熺偣鍒板钩闈㈢殑鏈�鐭窛绂伙紝璁剧疆0灏卞ソ ), ], enabled: true, @@ -1993,7 +1960,7 @@ dimensions: new Cesium.Cartesian2( boundingSphere.radius * 1.5, boundingSphere.radius * 1.5 - ),//鍒囬潰鐨勯暱鍜屽 + ), //鍒囬潰鐨勯暱鍜屽 material: Cesium.Color.WHITE.withAlpha(0.1), plane: new Cesium.CallbackProperty( // 娣诲姞缁戝畾浜嬩欢锛屼笉鏂皟鐢� @@ -2037,9 +2004,10 @@ window.model.clippingPlanes = clippingPlanes; if (window.modelHeight && window.modelHeight != 0) { // console.log("window.modelHeight---",window.modelHeight) - window.model.clippingPlanes.modelMatrix = Cesium.Matrix4.fromTranslation( - new Cesium.Cartesian3(0.0, 0.0, window.modelHeight) - ); + window.model.clippingPlanes.modelMatrix = + Cesium.Matrix4.fromTranslation( + new Cesium.Cartesian3(0.0, 0.0, window.modelHeight) + ); } // 缁戝畾涓婄Щ鍔ㄤ簨浠� const downHandler = new Cesium.ScreenSpaceEventHandler( @@ -2059,9 +2027,7 @@ }, Cesium.ScreenSpaceEventType.LEFT_DOWN); // 缁戝畾涓嬬Щ鍔ㄤ簨浠� - const upHandler = new Cesium.ScreenSpaceEventHandler( - Viewer.scene.canvas - ); + const upHandler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas); upHandler.setInputAction(function () { if (Cesium.defined(selectedPlane)) { selectedPlane.material = Cesium.Color.WHITE.withAlpha(0.1); @@ -2096,73 +2062,98 @@ var y = normal.y; var z = normal.z; if (x == 1 && y == 0 && z == 0) { - m_type = 'left'; - } - else if (x == -1 && y == 0 && z == 0) { - m_type = 'right'; - } - else if (x == 0 && y == 1 && z == 0) { - m_type = 'behind'; - } - else if (x == 0 && y == -1 && z == 0) { - m_type = 'front'; - } - else if (x == 0 && y == 0 && z == -1) { - m_type = 'top'; + m_type = "left"; + } else if (x == -1 && y == 0 && z == 0) { + m_type = "right"; + } else if (x == 0 && y == 1 && z == 0) { + m_type = "behind"; + } else if (x == 0 && y == -1 && z == 0) { + m_type = "front"; + } else if (x == 0 && y == 0 && z == -1) { + m_type = "top"; } return m_type; } function createPlaneUpdateFunction_box(plane, type, origin) { return function () { - var num_x = window.localStorage.getItem('slider_x') / 100000; - var num_y = window.localStorage.getItem('slider_y') / 100000; - var num_z = window.localStorage.getItem('slider_z') / 1.5;//璇诲彇婊戝姩鏉″�� + var num_x = window.localStorage.getItem("slider_x") / 100000; + var num_y = window.localStorage.getItem("slider_y") / 100000; + var num_z = window.localStorage.getItem("slider_z") / 1.5; //璇诲彇婊戝姩鏉″�� var origin_degree = cartesian3ToDegrees(origin); - var target_degree_x = [origin_degree[0] + num_x, origin_degree[1], +origin_degree[2]]; - var target_degree_y = [origin_degree[0], origin_degree[1] + num_y, +origin_degree[2]]; - var target_degree_z = [origin_degree[0], origin_degree[1], +origin_degree[2] + num_z]; - var m_dis_x = Cesium.Cartesian3.distance(origin, Cesium.Cartesian3.fromDegrees(target_degree_x[0], target_degree_x[1], target_degree_x[2])); - var m_dis_y = Cesium.Cartesian3.distance(origin, Cesium.Cartesian3.fromDegrees(target_degree_y[0], target_degree_y[1], target_degree_y[2])); - var m_dis_z = Cesium.Cartesian3.distance(origin, Cesium.Cartesian3.fromDegrees(target_degree_z[0], target_degree_z[1], target_degree_z[2])); + var target_degree_x = [ + origin_degree[0] + num_x, + origin_degree[1], + +origin_degree[2], + ]; + var target_degree_y = [ + origin_degree[0], + origin_degree[1] + num_y, + +origin_degree[2], + ]; + var target_degree_z = [ + origin_degree[0], + origin_degree[1], + +origin_degree[2] + num_z, + ]; + var m_dis_x = Cesium.Cartesian3.distance( + origin, + Cesium.Cartesian3.fromDegrees( + target_degree_x[0], + target_degree_x[1], + target_degree_x[2] + ) + ); + var m_dis_y = Cesium.Cartesian3.distance( + origin, + Cesium.Cartesian3.fromDegrees( + target_degree_y[0], + target_degree_y[1], + target_degree_y[2] + ) + ); + var m_dis_z = Cesium.Cartesian3.distance( + origin, + Cesium.Cartesian3.fromDegrees( + target_degree_z[0], + target_degree_z[1], + target_degree_z[2] + ) + ); createPlanePos(origin_degree, num_x, num_y, num_z); let distance = 140; - if (type == 'left') { + if (type == "left") { if (num_x < 0) { - plane.distance = distance - (-m_dis_x); + plane.distance = distance - -m_dis_x; return plane; } else { - plane.distance = distance - m_dis_x + plane.distance = distance - m_dis_x; return plane; } - } - else if (type == 'behind') { + } else if (type == "behind") { if (num_y < 0) { - plane.distance = distance - (-m_dis_y); + plane.distance = distance - -m_dis_y; return plane; } else { plane.distance = distance - m_dis_y; return plane; } - } - else if (type == 'right') { + } else if (type == "right") { if (num_x < 0) { plane.distance = distance - m_dis_x; return plane; } else { - plane.distance = distance - (-m_dis_x); + plane.distance = distance - -m_dis_x; return plane; } - } - else if (type == 'front') { + } else if (type == "front") { if (num_y < 0) { plane.distance = distance - m_dis_y; return plane; } else { - plane.distance = distance - (-m_dis_y); + plane.distance = distance - -m_dis_y; return plane; } - } - else if (type == 'top') { + } else if (type == "top") { if (num_z < 0) { plane.distance = m_dis_z; // console.log('num_z=========',num_z) @@ -2171,7 +2162,7 @@ return plane; } else { // plane.distance = 100; - plane.distance = distance - (-m_dis_z); + plane.distance = distance - -m_dis_z; return plane; } } @@ -2180,10 +2171,14 @@ } function createPlanePos(origin, x, y, z) { - var clipbox = Viewer.entities.getById('ClopBox'); + var clipbox = Viewer.entities.getById("ClopBox"); if (clipbox) { clipbox.position = new Cesium.CallbackProperty(function () { - return Cesium.Cartesian3.fromDegrees(origin[0] + x, origin[1] + y, +origin[2] + z);//瀹炴椂杩斿洖褰撳墠鐩掑瓙鐨勪綅缃� + return Cesium.Cartesian3.fromDegrees( + origin[0] + x, + origin[1] + y, + +origin[2] + z + ); //瀹炴椂杩斿洖褰撳墠鐩掑瓙鐨勪綅缃� }, false); } } @@ -2196,7 +2191,6 @@ var pos = [lng, lat, alt]; return pos; } - }, //鍏抽棴绠¢亾淇℃伅寮圭獥 @@ -2251,7 +2245,7 @@ 2, 2, method, - (value) => { } + (value) => {} ); }, addterrainSectionAnalysis() { @@ -2411,7 +2405,7 @@ } else { this.$refs && this.$refs.undergroundModel && - this.$refs.undergroundModel.open("鍦颁笅妯″紡", null,); + this.$refs.undergroundModel.open("鍦颁笅妯″紡", null); } break; @@ -2463,13 +2457,12 @@ 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); @@ -2496,9 +2489,8 @@ let branchArr = cloneData.filter((child) => father.id == child.pid); // 瀵规瘮ID锛屽垎鍒笂涓嬬骇鑿滃崟锛屽苟杩斿洖鏁版嵁 if (branchArr.length > 0) { branchArr.sort(function (a, b) { - - return a.orderNum - b.orderNum - }) + 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锛� @@ -2507,51 +2499,51 @@ }); }, setAddLayers(res) { - this.setClearWmsLayer() + this.setClearWmsLayer(); var std = [[]]; for (var i in res) { switch (res[i].serveType) { case "WMS": - std[0].push(res[i]) + std[0].push(res[i]); break; } } if (std[0].length != 0) { if (this.$store.state.pigCode) { - - this.setPrjidWmsLayer(std[0]) + this.setPrjidWmsLayer(std[0]); } else { - - this.setAddWmsLayer(std[0]) + this.setAddWmsLayer(std[0]); } - } }, setPrjidWmsLayer(res) { var layer = []; var sql = []; - var dirid = this.$store.state.pigCode + var dirid = this.$store.state.pigCode; var that = this; for (var i in res) { - layer.push(res[i].url) + layer.push(res[i].url); if (res[i].isProject == 1) { - var val = "dirid like '" + dirid + "%'" - sql.push(val) + var val = "dirid like '" + dirid + "%'"; + sql.push(val); } else { - sql.push("1 = 1") + sql.push("1 = 1"); } } layer = layer.reverse(); - sql = sql.reverse().join(";") - var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat("html", null, function (html) { - - that.getFeatureInfo(html) - }); + sql = sql.reverse().join(";"); + var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat( + "html", + null, + function (html) { + that.getFeatureInfo(html); + } + ); window.layerWMS = new Cesium.WebMapServiceImageryProvider({ url: geoServerURl, layers: layer.toString(), - getFeatureInfoParameters: { info_format: 'text/html' }, + getFeatureInfoParameters: { info_format: "text/html" }, enablePickFeatures: true, getFeatureInfoFormats: [getFeatureInfoFormat], parameters: { @@ -2559,7 +2551,7 @@ format: "image/png", srs: "EPSG:4490", styles: "", - cql_filter: sql + cql_filter: sql, }, tileWidth: 512, tileHeight: 512, @@ -2576,7 +2568,7 @@ FORMAT: "image/png", VERSION: "1.1.1", LAYERS: layer.toString(), - cql_filter: sql + cql_filter: sql, }, }), }); @@ -2586,11 +2578,10 @@ window.map.addLayer(layer2); }, - - setClearWmsLayer() { for (var i = 0; i < window.Viewer.imageryLayers._layers.length; i++) { - var val_id = window.Viewer.imageryLayers._layers[i].imageryProvider.name; + var val_id = + window.Viewer.imageryLayers._layers[i].imageryProvider.name; if (val_id == "Wms_Layer") { window.Viewer.imageryLayers.remove( window.Viewer.imageryLayers._layers[i] @@ -2606,23 +2597,26 @@ } }, setAddWmsLayer(res) { - var url = []; for (var i in res) { if (res[i].url) { - url.push(res[i].url) + url.push(res[i].url); } } url = url.reverse(); var that = this; - var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat("html", null, function (html) { - that.getFeatureInfo(html) - }); + var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat( + "html", + null, + function (html) { + that.getFeatureInfo(html); + } + ); window.layerWMS = new Cesium.WebMapServiceImageryProvider({ url: geoServerURl, layers: url.toString(), - getFeatureInfoParameters: { info_format: 'text/html' }, + getFeatureInfoParameters: { info_format: "text/html" }, enablePickFeatures: true, getFeatureInfoFormats: [getFeatureInfoFormat], parameters: { @@ -2654,7 +2648,9 @@ window.map.addLayer(layer2); }, async getFeatureInfo(html) { - var start = html.indexOf("<caption class=\"featureInfo\">") + "<caption class=\"featureInfo\">".length; + var start = + html.indexOf('<caption class="featureInfo">') + + '<caption class="featureInfo">'.length; var end = html.indexOf("</caption>"); var tab = html.substr(start, end - start); start = html.lastIndexOf(tab) + tab.length + 1; @@ -2664,9 +2660,9 @@ if (gid && tab) { this.$store.state.pickoption = { gid: gid, - name: tab.replaceAll("_", "") - } - if (tab == 'm_surface_deformation_data') { + name: tab.replaceAll("_", ""), + }; + if (tab == "m_surface_deformation_data") { this.$store.state.surfaceDeForm.flag = true; this.$store.state.surfaceDeForm.gid = gid; } else { @@ -2674,32 +2670,32 @@ this.$store.state.surfaceDeForm.gid = null; } const res = await dataQuery_selectTabByEntity({ - name: this.$store.state.pickoption.name - }) + name: this.$store.state.pickoption.name, + }); if (res.code != 200) { return; } - var value = res.result.split('.') + var value = res.result.split("."); this.$store.state.propertiesName = { ns: value[0], enName: value[1], - tabDesc: '鎷惧彇淇℃伅' - } + tabDesc: "鎷惧彇淇℃伅", + }; var name = this.$store.state.pickoption.name; - const data = await inquiry_selectFields({ name: name }) + const data = await inquiry_selectFields({ name: name }); if (data.code != 200) { - this.$message.error("鍒楄〃璋冪敤澶辫触") + this.$message.error("鍒楄〃璋冪敤澶辫触"); } - const data1 = await inquiry_selectDomains({ name: name }) + const data1 = await inquiry_selectDomains({ name: name }); if (data1.code != 200) { - this.$message.error("鍒楄〃璋冪敤澶辫触") + this.$message.error("鍒楄〃璋冪敤澶辫触"); } - this.optionx = [] - this.attributeData = [] - var valadata = data.result - var laydomain = data1.result - this.optionx = data1.result + this.optionx = []; + 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 ( @@ -2713,11 +2709,11 @@ } } // this.optionx.push(valadata[i]) - this.attributeData.push(valadata[i]) + this.attributeData.push(valadata[i]); } } - this.getTableData() + this.getTableData(); } }, //鏍煎紡鍖栨椂闂� @@ -2732,40 +2728,40 @@ var s = time.getSeconds(); return ( y + - '-' + + "-" + this.add0(m) + - '-' + + "-" + this.add0(d) + - ' ' + + " " + h + - ':' + + ":" + mm + - ':' + + ":" + s ); }, //鏍煎紡鍖栨椂闂� add0(m) { - return m < 10 ? '0' + m : m; + return m < 10 ? "0" + m : m; }, async getTableData() { - this.tableData = [] - const data = await dataQuery_selectByGid(this.$store.state.pickoption) + this.tableData = []; + const data = await dataQuery_selectByGid(this.$store.state.pickoption); if (data.code != 200) { - return + return; } - var valste = data.result + 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) + valste.createtime = this.format(valste.createtime); } if (valste.updatetime) { - valste.updatetime = this.format(valste.updatetime) + valste.updatetime = this.format(valste.updatetime); } for (var j in this.optionx) { @@ -2773,41 +2769,39 @@ this.optionx[j].domainNa != null && this.optionx[j].domainNa != undefined ) { - - valste[this.optionx[j].field] = this.optionx[j].domainNa + valste[this.optionx[j].field] = this.optionx[j].domainNa; } } - var arr = {} - for (var i = (this.attributeData.length - 1); i >= 0; i--) { - var vla = this.attributeData[i] - + var arr = {}; + for (var i = this.attributeData.length - 1; i >= 0; i--) { + var vla = this.attributeData[i]; if (vla.domainNa) { - - var val = this.optionx.filter(res => { - if (res.domName == vla.domainNa && res.domCode == valste[vla.field]) { + var val = this.optionx.filter((res) => { + if ( + res.domName == vla.domainNa && + res.domCode == valste[vla.field] + ) { return res; } - }) - var vlue = null + }); + var vlue = null; if (val.length > 0) { - vlue = val[0].codeDesc + vlue = val[0].codeDesc; } else { - vlue = '' + vlue = ""; } - arr[vla.alias] = vlue + arr[vla.alias] = vlue; } else { - arr[vla.alias] = valste[vla.field] + arr[vla.alias] = valste[vla.field]; } } - arr['eventid'] = valste.eventid - + arr["eventid"] = valste.eventid; this.$store.state.propertiesInfo = arr; - this.$store.state.propertiesFlag = '1' - + this.$store.state.propertiesFlag = "1"; }, showModelAttach() { @@ -2816,7 +2810,7 @@ this.$refs && this.$refs.modelAttach && this.$refs.modelAttach.open(name, null, { - close: () => { }, + close: () => {}, }); } else { } @@ -2824,19 +2818,19 @@ async showModelCatch() { if (this.$store.state.catModel) { this.formInline = { - title: '', - file: '', - name: '', - type: '', - info: '', - icon: '', - bak: '' - } + 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.activeName = "first"; this.getAttacthFlieList(); this.dialogVisible = true; } else { @@ -2847,8 +2841,8 @@ async startModelData() { var obj = { layerid: this.$store.state.catModelInfo.layerId, - modelid: this.$store.state.catModelInfo.id - } + modelid: this.$store.state.catModelInfo.id, + }; const data = await comprehensive_selectModelByGuid(obj); if (data.code != 200) { return; @@ -2862,41 +2856,39 @@ this.formInline = data.result; this.formInline.title = this.formInline.name; - } }, async EditData() { - const data = await comprehensive_updateModel(this.formInline) + const data = await comprehensive_updateModel(this.formInline); if (data.code != 200) { - this.$message.error('淇敼澶辫触'); + this.$message.error("淇敼澶辫触"); } else { this.$message({ - message: '淇敼鎴愬姛', - type: 'success' + message: "淇敼鎴愬姛", + type: "success", }); } this.startModelData(); }, async InsertData() { 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) + 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('娣诲姞澶辫触'); + this.$message.error("娣诲姞澶辫触"); } else { this.$message({ - message: '娣诲姞鎴愬姛', - type: 'success' + message: "娣诲姞鎴愬姛", + type: "success", }); } this.startModelData(); - }, handleClose() { this.$store.state.catModel = false; @@ -2907,92 +2899,98 @@ var token = getToken(); var fs = document.getElementById("insertFile"); if (fs.files.length == 0) { - this.$message({ - message: '璇烽�夋嫨瑕佷笂浼犵殑鏂囦欢锛�', - type: 'warning' + message: "璇烽�夋嫨瑕佷笂浼犵殑鏂囦欢锛�", + type: "warning", }); return; } - const formData = new FormData() + const formData = new FormData(); for (var i = 0, c = fs.files.length; i < c; i++) { - - formData.append('file', fs.files[i]); // fs.files[i].name,file + formData.append("file", fs.files[i]); // fs.files[i].name,file } - $.ajax(BASE_URL + "/comprehensive/uploadFiles?token=" + token + "&tabName=lf.sys_style&eventid=" + this.$store.state.catModelInfo.id, { - type: "post", - data: formData, - async: true, - cache: false, - processData: false, - contentType: false, - success: (rs) => { - this.$message({ - message: '闄勪欢娣诲姞鎴愬姛', - type: 'success' - }); - document.getElementById("insertFile").value = ""; - this.formInline.file = ""; - this.getAttacthFlieList(); - }, - error: (e) => { - document.getElementById("insertFile").value = ""; - this.formInline.file = ""; - this.$message.error('闄勪欢娣诲姞澶辫触'); + $.ajax( + BASE_URL + + "/comprehensive/uploadFiles?token=" + + token + + "&tabName=lf.sys_style&eventid=" + + this.$store.state.catModelInfo.id, + { + type: "post", + data: formData, + async: true, + cache: false, + processData: false, + contentType: false, + success: (rs) => { + this.$message({ + message: "闄勪欢娣诲姞鎴愬姛", + type: "success", + }); + document.getElementById("insertFile").value = ""; + this.formInline.file = ""; + this.getAttacthFlieList(); + }, + error: (e) => { + document.getElementById("insertFile").value = ""; + this.formInline.file = ""; + this.$message.error("闄勪欢娣诲姞澶辫触"); + }, } - }); + ); }, //闄勪欢鍒楄〃鏌ヨ async getAttacthFlieList() { var obj = { eventid: this.$store.state.catModelInfo.id, - tabName: "lf.sys_style" + tabName: "lf.sys_style", }; const res = await comprehensive_selectFiles(obj); if (res.code != 200) { - this.$message.error('鍒楄〃璋冪敤澶辫触'); - return + this.$message.error("鍒楄〃璋冪敤澶辫触"); + return; } this.tableData = res.result; }, - //闄勪欢=>鏂囦欢閫夋嫨 getInsertFile() { - $('#insertFile').click(); + $("#insertFile").click(); }, insertFile() { - var val = document.getElementById('insertFile').files; + var val = document.getElementById("insertFile").files; if (!val || !val.length) return; this.formInline.file = val[0].name; }, statSizeChange(row, column) { - return this.stateFormatSizes(row.sizes) + return this.stateFormatSizes(row.sizes); }, stateFormatSizes(res) { if (res >= 1024) { const val = parseFloat(res / 1024).toFixed(3); - return val + ' GB'; + return val + " GB"; } else { - return res + ' MB'; + return res + " MB"; } }, matchState(state = "", reg) { var row = state.row; var name = row.name; - if (name.indexOf('.pdf') != -1 - || name.indexOf('.jpg') != -1 - || name.indexOf('.gif') != -1 - || name.indexOf('.png') != -1 - || name.indexOf('.jpeg') != -1 - || name.indexOf('.PDF') != -1 - || name.indexOf('.JPG') != -1 - || name.indexOf('.GIF') != -1 - || name.indexOf('.PNG') != -1 - || name.indexOf('.JPEG') != -1 - || name.indexOf('.BMP') != -1 - || name.indexOf('.bmp') != -1) { + if ( + name.indexOf(".pdf") != -1 || + name.indexOf(".jpg") != -1 || + name.indexOf(".gif") != -1 || + name.indexOf(".png") != -1 || + name.indexOf(".jpeg") != -1 || + name.indexOf(".PDF") != -1 || + name.indexOf(".JPG") != -1 || + name.indexOf(".GIF") != -1 || + name.indexOf(".PNG") != -1 || + name.indexOf(".JPEG") != -1 || + name.indexOf(".BMP") != -1 || + name.indexOf(".bmp") != -1 + ) { return true; } @@ -3006,29 +3004,39 @@ }, //闄勪欢鏌ョ湅 setAttatchDetail(index, row) { - this.refreshAttatchDetail() + this.refreshAttatchDetail(); var name = row.name; - if (name.indexOf('.pdf') != -1 || name.indexOf('.PDF') != -1) { + if (name.indexOf(".pdf") != -1 || name.indexOf(".PDF") != -1) { this.dialog.dialogVisible = true; this.dialog.isPdf = true; - var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken(); - this.dialog.src = url + var url = + BASE_URL + + "/comprehensive/downloadForView?guid=" + + row.guid + + "&token=" + + getToken(); + this.dialog.src = url; } else if ( - name.indexOf('.jpg') != -1 - || name.indexOf('.gif') != -1 - || name.indexOf('.png') != -1 - || name.indexOf('.jpeg') != -1 - || name.indexOf('.JPG') != -1 - || name.indexOf('.GIF') != -1 - || name.indexOf('.PNG') != -1 - || name.indexOf('.JPEG') != -1 - || name.indexOf('.BMP') != -1 - || name.indexOf('.bmp') != -1 + name.indexOf(".jpg") != -1 || + name.indexOf(".gif") != -1 || + name.indexOf(".png") != -1 || + name.indexOf(".jpeg") != -1 || + name.indexOf(".JPG") != -1 || + name.indexOf(".GIF") != -1 || + name.indexOf(".PNG") != -1 || + name.indexOf(".JPEG") != -1 || + name.indexOf(".BMP") != -1 || + name.indexOf(".bmp") != -1 ) { this.dialog.dialogVisible = true; this.dialog.isJpg = true; - var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken(); - this.dialog.src = url + var url = + BASE_URL + + "/comprehensive/downloadForView?guid=" + + row.guid + + "&token=" + + getToken(); + this.dialog.src = url; } }, handleClick(tab, event) { @@ -3045,7 +3053,7 @@ const res = await comprehensive_deletes({ ids: std.toString() }); if (res.code != 200) { - this.$message.error('鏂囦欢鍒犻櫎澶辫触'); + this.$message.error("鏂囦欢鍒犻櫎澶辫触"); } this.getAttacthFlieList(); }, @@ -3065,14 +3073,14 @@ 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,); + this.$refs.queryinfo.open("鎷惧彇鍒嗘瀽", null); showPop = true; break; } @@ -3082,14 +3090,13 @@ } }, showPopBox() { - if (this.$store.state.showPopBoxFlag == true) { this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close(); this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("灞炴��", null, { close: () => { - this.$store.state.showPopBoxFlag == false + this.$store.state.showPopBoxFlag == false; if (this.$store.state.primitLayer != null) { sgworld.Creator.DeleteObject(this.$store.state.primitLayer); this.$store.state.primitLayer = null; @@ -3103,29 +3110,31 @@ } }, setPellucidity() { - this.$refs && this.$refs.setPellucidity && this.$refs.setPellucidity.open(); + this.$refs && + this.$refs.setPellucidity && + this.$refs.setPellucidity.open(); }, setDialogInsertVisible(res) { this.ruleForm = res; this.dialogInsertVisible = true; }, downloadx() { - this.$bus.$emit("setInsertDown1", this.codeForm) + this.$bus.$emit("setInsertDown1", this.codeForm); this.closeDownx(); }, handleCloseDown1() { this.$confirm("纭鍏抽棴锛�") - .then(_ => { + .then((_) => { this.closeDownx(); }) - .catch(_ => { }) + .catch((_) => {}); }, closeDownx() { this.dialogVisible1 = false; this.codeForm = { - password: '', - repassword: '', - } + password: "", + repassword: "", + }; }, closeInsertDown() { this.ruleForm = { @@ -3135,32 +3144,31 @@ repwd: null, wkt: null, descr: null, - } - this.dialogInsertVisible = false + }; + this.dialogInsertVisible = false; }, handleInsertClose() { this.$confirm("纭鍏抽棴锛�") - .then(_ => { - this.closeInsertDown() + .then((_) => { + this.closeInsertDown(); }) - .catch(_ => { }) + .catch((_) => {}); }, getInsertDownz() { this.dialogInsertVisible = false; // this.dialogVisible1 = true; - // + // - this.$bus.$emit("setInsertApply1", this.ruleForm) + this.$bus.$emit("setInsertApply1", this.ruleForm); }, handleExtentClose() { - this.dialogExtentVisible = false + this.dialogExtentVisible = false; this.setExtent = 10; }, handleExtentinsert() { - this.$bus.$emit("setExtentBUff", this.setExtent) + this.$bus.$emit("setExtentBUff", this.setExtent); this.handleExtentClose(); - - } + }, }, mounted() { this.$bus.$off(); @@ -3170,7 +3178,7 @@ polyline: Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6), polygon: Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6), }; - this.$store.state.setAlphaList = [] + this.$store.state.setAlphaList = []; this.$bus.$on("setChangeTwoMenu", (res) => { if (res == 8) { this.setLayerScene(); @@ -3178,14 +3186,12 @@ this.menuChange(res); } }); - this.$bus.$on("showMenuLayer", ((res) => { - + this.$bus.$on("showMenuLayer", (res) => { this.setAddLayers(res); - })); - this.$bus.$on("showPellucidity", res => { + }); + this.$bus.$on("showPellucidity", (res) => { this.setPellucidity(); }); - this.$store.state.isProjectLayer = []; this.$store.state.pigCode = null; @@ -3196,22 +3202,16 @@ // this.setCoverage("a1"); this.layersStart(); - this.$bus.$on("setDialogInsertVisible", (res) => { if (res == true) { this.dialogVisible1 = true; } else { this.setDialogInsertVisible(res); } - }) - this.$bus.$on('showExtentLayer', res => { + }); + this.$bus.$on("showExtentLayer", (res) => { this.dialogExtentVisible = res; }); - - - - - }, watch: { Obj(newVal, oldVal) { @@ -3222,7 +3222,7 @@ }, popObj(newVal, oldVal) { this.showPopBox(); - } + }, }, computed: { Obj() { @@ -3233,7 +3233,7 @@ }, popObj() { return this.$store.state.showPopBoxFlag; - } + }, }, }; </script> -- Gitblit v1.9.3