From ff2afbce0f31c6f75f4930ba8db7ccb7a99556a4 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期四, 23 二月 2023 10:26:28 +0800 Subject: [PATCH] 源数据管理,图层管理,空间查询 --- src/views/Tools/pipeLineAnaly.vue | 507 ++++++++---------- src/views/datamanage/metadataManage.vue | 1 src/views/Tools/maplayer.vue | 2 src/assets/lang/zh.js | 18 src/views/Archive/index.vue | 22 src/views/Tools/LayerTree.vue | 477 ++++++++--------- src/assets/css/configure.css | 12 src/assets/lang/en.js | 25 src/components/mapsdk.vue | 501 +++++++---------- src/components/MapView/mapSpacePop.vue | 6 src/views/Tools/Popup.vue | 44 11 files changed, 749 insertions(+), 866 deletions(-) diff --git a/src/assets/css/configure.css b/src/assets/css/configure.css index a63cef0..f2fc744 100644 --- a/src/assets/css/configure.css +++ b/src/assets/css/configure.css @@ -31,6 +31,7 @@ .box_divm { background-color: rgba(244, 248, 255, 0.85) !important; } + .subpage_Div { border: 1px solid #dcdfe6; } @@ -324,12 +325,11 @@ .twoMenu_imge88 { background: url("../../assets/img/synthesis/images/3鐧藉簳_166.png") no-repeat center; } -.el-icon-download{ + +.menuPop .leftBox li { color: black; } -.menuPop .leftBox li{ - color: black ; -} -.popupBox .popupContainer{ - color: #606266 !important; + +.popupBox .popupContainer { + color: #606266 !important; } \ No newline at end of file diff --git a/src/assets/lang/en.js b/src/assets/lang/en.js index b97f009..50ec06e 100644 --- a/src/assets/lang/en.js +++ b/src/assets/lang/en.js @@ -1,6 +1,6 @@ const en = { common: { - bak:'Bak', + bak: 'Bak', domCode: 'DomCode', confirm: 'confirm', choose: 'Please choose', @@ -41,13 +41,14 @@ size: 'size', versionName: 'version Name', type: 'type', - fileType:'File Type', + fileType: 'File Type', quayTest: 'Auality testing', md5: 'MD5 Code', lineNuber: 'line Nuber', pleaseInputPassworld: 'Please input a password', passworld: 'Passworld', - language: "涓枃" + language: "涓枃", + title: 'Title' }, dataManage: { @@ -59,11 +60,11 @@ dataRetrieval: 'data retrieval', dataDownload: 'Data download', projectManage: 'project management', - dataStatistics:'data Statistics', - dataStaticObj:{ - type1:'Primary module', - type2:'Secondary module', - type3:'Statistical data', + dataStatistics: 'data Statistics', + dataStaticObj: { + type1: 'Primary module', + type2: 'Secondary module', + type3: 'Statistical data', }, projectObj: { projname: 'Project Name', @@ -104,9 +105,9 @@ entryName: 'Entry Name', selectWBSData: 'Select WBS Data', coordinateSystem: 'Coordinate System', - fileExtension:"File extension", - inspectionItems:"Inspection items", - code:'Code' + fileExtension: "File extension", + inspectionItems: "Inspection items", + code: 'Code' }, metadataManage: 'Source Data Management', @@ -531,7 +532,7 @@ careatetime: 'Date of application', ReApply: 'Re apply', details: 'details', - ApplicationCancel: "Application Cancel", + ApplicationCancel: "withdraw", }, loglog: { serialnumber: 'Serial Number', diff --git a/src/assets/lang/zh.js b/src/assets/lang/zh.js index b9cd095..2efb9c8 100644 --- a/src/assets/lang/zh.js +++ b/src/assets/lang/zh.js @@ -47,7 +47,8 @@ lineNuber: '琛屾暟', pleaseInputPassworld: '璇疯緭鍏ュ瘑鐮�', passworld: '瀵嗙爜', - language: "English" + language: "English", + title: '鏍囬' }, dataManage: { dataManage: '鏁版嵁绠$悊', @@ -58,11 +59,14 @@ dataRetrieval: '鏁版嵁妫�绱�', dataDownload: '鏁版嵁涓嬭浇', projectManage: '椤圭洰绠$悊', - dataStatistics:'鏁版嵁缁熻', - dataStaticObj:{ - type1:'涓�绾фā鍧�', - type2:'浜岀骇妯″潡', - type3:'缁熻鏁版嵁', + dataStatistics: '鏁版嵁缁熻', + dataStaticObj: { + type1: '鏈嶅姟鍚嶇О', + type2: '璁块棶娆℃暟', + type3: '鍗曚綅鍚嶇О', + type4: '鏁版嵁閲�', + type5: '鑿滃崟鍚嶇О', + type7: '璁块棶娆℃暟' }, projectObj: { projname: '椤圭洰鍚嶇О', @@ -525,7 +529,7 @@ careatetime: '鐢宠鏃ユ湡', ReApply: '閲嶆柊鐢宠', details: '璇︽儏', - ApplicationCancel: "鐢宠鍙栨秷", + ApplicationCancel: "鍙栨秷鐢宠", }, downlog: { type1: 'Shp鏂囦欢', diff --git a/src/components/MapView/mapSpacePop.vue b/src/components/MapView/mapSpacePop.vue index 648bff5..d9d56a8 100644 --- a/src/components/MapView/mapSpacePop.vue +++ b/src/components/MapView/mapSpacePop.vue @@ -320,9 +320,9 @@ //鍒濆鍖栨煡璇㈤槇鍊艰〃 async getDomainsLayer() { const data = await inquiry_selectDomains({ name: this.spaceLayer }); - if (data.code != 200) { - this.$message.error('鍒楄〃璋冪敤澶辫触'); - } + if (data.code != 200) { + this.$message.error('鍒楄〃璋冪敤澶辫触'); + } this.domainsLayer = data.result; this.setListDataStart(); this.getTableselectFields(); diff --git a/src/components/mapsdk.vue b/src/components/mapsdk.vue index 66270d1..a066b70 100644 --- a/src/components/mapsdk.vue +++ b/src/components/mapsdk.vue @@ -1,82 +1,44 @@ <template> <div class="mapBox"> <div id="mapdiv"> - <div - class="menu_Top box_divm" - v-if="$store.state.mapMenuBoolean" - > + <div class="menu_Top box_divm" v-if="$store.state.mapMenuBoolean"> <map-menu-top v-if="$store.state.mapMenuBoxFlag == '1'" /> <map-space-top v-if="$store.state.mapMenuBoxFlag == '2'" /> </div> - <div - class="bufferBox" - v-if="showBufferBoxDialog" - > + <div class="bufferBox" v-if="showBufferBoxDialog"> <el-card class="box-card box_divm"> - <div - slot="header" - class="clearfix" - > + <div slot="header" class="clearfix"> <span>缂撳啿鍖哄垎鏋�</span> <div style="float: right; cursor: pointer"> - <i - class="el-icon-close" - @click="closeBufferBox(1)" - ></i> + <i class="el-icon-close" @click="closeBufferBox(1)"></i> </div> </div> <div class="box-body"> - <el-form - ref="form" - :model="bufFrom" - label-width="100px" - > + <el-form ref="form" :model="bufFrom" label-width="100px"> <el-form-item label="缂撳啿鍗婂緞(绫�):"> <el-input v-model="bufFrom.val"></el-input> </el-form-item> <el-form-item> - <el-button - @click="addBuffer(1)" - type="info" - >鐐�</el-button> - <el-button - @click="addBuffer(2)" - type="info" - >绾�</el-button> - <el-button - @click="addBuffer(3)" - type="info" - >闈�</el-button> - <el-button - @click="clearBuffer" - type="info" - >娓呴櫎</el-button> + <el-button @click="addBuffer(1)" type="info">鐐�</el-button> + <el-button @click="addBuffer(2)" type="info">绾�</el-button> + <el-button @click="addBuffer(3)" type="info">闈�</el-button> + <el-button @click="clearBuffer" type="info">娓呴櫎</el-button> </el-form-item> </el-form> </div> </el-card> </div> - <div - class="coordLocalBox" - v-if="showCoordLocalBoxDialog" - > + <div class="coordLocalBox" v-if="showCoordLocalBoxDialog"> <el-card class="box-card"> <div slot="header"> <span>鍧愭爣瀹氫綅</span> <div style="float: right; cursor: pointer"> - <i - class="el-icon-close" - @click="closeBufferBox(2)" - ></i> + <i class="el-icon-close" @click="closeBufferBox(2)"></i> </div> </div> <div class="box-body"> - <el-form - ref="form" - :model="coordFrom" - label-width="50px" - > + <el-form ref="form" :model="coordFrom" label-width="50px"> <el-form-item label="缁忓害:"> <el-input v-model="coordFrom.lon"></el-input> </el-form-item> @@ -87,38 +49,22 @@ <el-input v-model="coordFrom.height"></el-input> </el-form-item> <el-form-item> - <el-button - @click="setCoordLocal" - type="info" - >瀹氫綅</el-button> + <el-button @click="setCoordLocal" type="info">瀹氫綅</el-button> </el-form-item> </el-form> </div> </el-card> </div> - <div - class="toponymicLocalBox" - v-if="showToponymicLocalBoxDialog" - > + <div class="toponymicLocalBox" v-if="showToponymicLocalBoxDialog"> <el-card class="box-card"> - <div - slot="header" - class="clearfix" - > + <div slot="header" class="clearfix"> <span>鍦板悕瀹氫綅</span> <div style="float: right; cursor: pointer"> - <i - class="el-icon-close" - @click="closeBufferBox(3)" - ></i> + <i class="el-icon-close" @click="closeBufferBox(3)"></i> </div> </div> <div class="box-body"> - <el-form - :model="comprehensive" - :inline="true" - label-width="50px" - > + <el-form :model="comprehensive" :inline="true" label-width="50px"> <el-form-item label="鍦板悕:"> <el-input style="width: 200px" @@ -126,28 +72,17 @@ ></el-input> </el-form-item> <el-form-item> - <el-button - @click="setQueryTable" - type="info" - >鏌ヨ</el-button> + <el-button @click="setQueryTable" type="info">鏌ヨ</el-button> </el-form-item> </el-form> - <el-table - :data="tableData" - height="200px" - style="width: 100%" - > + <el-table :data="tableData" height="200px" style="width: 100%"> <el-table-column align="center" type="index" label="搴忓彿" width="70px" /> - <el-table-column - prop="name" - align="center" - label="瀹氫綅" - > + <el-table-column prop="name" align="center" label="瀹氫綅"> <template slot-scope="scope"> <el-button @click="handleLocation(scope.$index, scope.row)" @@ -156,11 +91,7 @@ ></el-button> </template> </el-table-column> - <el-table-column - prop="name" - align="center" - label="鍦板悕" - > + <el-table-column prop="name" align="center" label="鍦板悕"> </el-table-column> </el-table> <div class="pagination_box"> @@ -178,21 +109,12 @@ </div> </el-card> </div> - <div - class="pathAnalysisBox" - v-if="showPathAnalysisBoxDialog" - > + <div class="pathAnalysisBox" v-if="showPathAnalysisBoxDialog"> <el-card class="box-card"> - <div - slot="header" - class="clearfix" - > + <div slot="header" class="clearfix"> <span>璺緞鍒嗘瀽</span> <div style="float: right; cursor: pointer"> - <i - class="el-icon-close" - @click="closeBufferBox(4)" - ></i> + <i class="el-icon-close" @click="closeBufferBox(4)"></i> </div> </div> <div class="box-body"> @@ -202,10 +124,7 @@ :rules="rules" label-width="55px" > - <el-form-item - label="璧风偣:" - prop="lon" - > + <el-form-item label="璧风偣:" prop="lon"> <el-input style="width: 250px" v-model="pathFrom.lon" @@ -215,15 +134,10 @@ :underline="false" @click="showMouseLeftClick(1)" style="margin-left: 10px" - ><i - style="color: white" - class="el-icon-plus" - ></i></el-link> + ><i style="color: white" class="el-icon-plus"></i + ></el-link> </el-form-item> - <el-form-item - label="缁堢偣:" - prop="lat" - > + <el-form-item label="缁堢偣:" prop="lat"> <el-input style="width: 250px" v-model="pathFrom.lat" @@ -233,16 +147,13 @@ :underline="false" @click="showMouseLeftClick(2)" style="margin-left: 10px" - ><i - style="color: white" - class="el-icon-plus" - ></i></el-link> + ><i style="color: white" class="el-icon-plus"></i + ></el-link> </el-form-item> <el-form-item> - <el-button - @click="showMouseLeftClick(3)" - type="info" - >鏌ヨ</el-button> + <el-button @click="showMouseLeftClick(3)" type="info" + >鏌ヨ</el-button + > </el-form-item> </el-form> </div> @@ -263,16 +174,16 @@ </template> <script> -import $ from "jquery" -import mapMenuTop from "./MapView/mapMenuTop.vue" +import $ from "jquery"; +import mapMenuTop from "./MapView/mapMenuTop.vue"; -import mapSpaceTop from "./MapView/mapSpaceTop.vue" +import mapSpaceTop from "./MapView/mapSpaceTop.vue"; import { select_Comprehensive_ByPageAndCount, select_Comprehensive_SelectWktById, comprehensive_selectRoute, -} from "../api/api" +} from "../api/api"; export default { name: "", @@ -284,22 +195,22 @@ data() { var validatePosition = (rule, value, callback) => { if (value === "") { - callback(new Error("璇疯緭鍏ュ瘑鐮�")) + callback(new Error("璇疯緭鍏ュ瘑鐮�")); } else { if (value) { - let arr = value.split(",") + let arr = value.split(","); if (arr.length !== 2) { - callback(new Error("鍧愭爣鐐圭粡绾害鏍煎紡閿欒锛�")) + callback(new Error("鍧愭爣鐐圭粡绾害鏍煎紡閿欒锛�")); } else { if (arr[0].startsWith("116") && arr[1].startsWith("39")) { } else { - callback(new Error("鍧愭爣鐐圭含搴︽牸寮忛敊璇紒")) + callback(new Error("鍧愭爣鐐圭含搴︽牸寮忛敊璇紒")); } } } - callback() + callback(); } - } + }; return { centerFlag: false, buffer: null, @@ -365,26 +276,26 @@ children: "children", label: "label", }, //鏍戠粦瀹氬璞� - } + }; }, mounted() { - this.init3DMap() - this.$bus.$on("mapChangeBox", res => { - this.showChangeBox(res) - }) + this.init3DMap(); + this.$bus.$on("mapChangeBox", (res) => { + this.showChangeBox(res); + }); }, methods: { init3DMap() { - var webKey = "94a34772eb88317fcbf8428e10448561" + var webKey = "94a34772eb88317fcbf8428e10448561"; //鍦板浘鍒濆鍖� window.sgworld = new SmartEarth.SGWorld("mapdiv", { - url:SmartEarthRootUrl+"Workers/image/earth.jpg", + url: SmartEarthRootUrl + "Workers/image/earth.jpg", licenseServer: window.sceneConfig.licenseServer, - }) + }); - window.Viewer = window.sgworld._Viewer - Viewer.imageryLayers._layers[0].show = false + window.Viewer = window.sgworld._Viewer; + Viewer.imageryLayers._layers[0].show = false; //瀹氫綅 // sgworld.Navigate.jumpTo({ // //璺宠浆瑙嗚 @@ -396,26 +307,25 @@ // }) Viewer.camera.flyTo({ destination: Cesium.Cartesian3.fromDegrees(110, 33, 8000000), - }); this.layer1 = Viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: gaoDeBaseUrl[0].url, }) - ) + ); this.layer2 = Viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: gaoDeBaseUrl[1].url, }) - ) + ); this.layer3 = Viewer.imageryLayers.addImageryProvider( new Cesium.UrlTemplateImageryProvider({ url: gaoDeBaseUrl[2].url, }) - ) + ); - window.ImageLayer3=this.layer3; + window.ImageLayer3 = this.layer3; // for (var i in gaoDeBaseUrl) { // sgworld.Creator.createUrlTemplateImageryProvider( @@ -428,13 +338,13 @@ // ); // } - Viewer._enableInfoOrSelection = false + Viewer._enableInfoOrSelection = false; //鏄剧ずfps - Viewer.scene.debugShowFramesPerSecond = false + Viewer.scene.debugShowFramesPerSecond = false; //瀵艰埅鎺т欢 - window.sgworld.navControl("nav", false) + window.sgworld.navControl("nav", false); //姣斾緥灏� - window.sgworld.navControl("scale", false) + window.sgworld.navControl("scale", false); //寮�鍚繁搴︽娴� // sgworld.Analysis.depthTestAgainstTerrain(true) Viewer.scene.globe.depthTestAgainstTerrain = true; @@ -459,12 +369,12 @@ var option = { url: window.sceneConfig.SGUrl, layerName: window.sceneConfig.mptName, - requestVertexNormals: true - } + requestVertexNormals: true, + }; sgworld.Creator.sfsterrainprovider("", option, "", true, ""); - window.elevationTool = new SmartEarth.ElevationTool(window.sgworld) - elevationTool.setContourColor("#F1D487") + window.elevationTool = new SmartEarth.ElevationTool(window.sgworld); + elevationTool.setContourColor("#F1D487"); // var helper = new Cesium.EventHelper(); // helper.add(Viewer.scene.globe.tileLoadProgressEvent, function (e) { @@ -478,9 +388,9 @@ }, changeMenulayer() { - this.isActive = !this.isActive - this.isMenuLayer = !this.isMenuLayer - this.setLayerVisible() + this.isActive = !this.isActive; + this.isMenuLayer = !this.isMenuLayer; + this.setLayerVisible(); }, setLayerVisible() { if (this.isActive == true) { @@ -490,12 +400,10 @@ Viewer.imageryLayers.lower(this.layer2); Viewer.imageryLayers.lower(this.layer3); - } else { - Viewer.imageryLayers.raise(this.layer3); Viewer.imageryLayers.raise(this.layer2); - + // Viewer.imageryLayers._layers[1].show = false // Viewer.imageryLayers._layers[2].show = true // Viewer.imageryLayers._layers[3].show = true @@ -507,62 +415,66 @@ if (res.id == "6") { } else if (res.id == "7") { } else { - this.showBufferBoxDialog = true + this.showBufferBoxDialog = true; } } else if (res.name == "Coord") { if (res.id == "1") { - this.showCoordLocalBoxDialog = true + this.showCoordLocalBoxDialog = true; } else if (res.id == "2") { - this.showToponymicLocalBoxDialog = true - this.getToponymicData() + this.showToponymicLocalBoxDialog = true; + this.getToponymicData(); } } else if (res.name == "Analysis") { if (res.id == "3") { - this.showPathAnalysisBoxDialog = true + if (res.show == true) { + this.showPathAnalysisBoxDialog = true; + } else { + this.showPathAnalysisBoxDialog = false; + } } } }, handleSizeChange(val) { - this.listData.pageSize = val - this.getToponymicData() + this.listData.pageSize = val; + this.getToponymicData(); }, handleCurrentChange(val) { - this.listData.pageIndex = val - this.getToponymicData() + this.listData.pageIndex = val; + this.getToponymicData(); }, setQueryTable() { - this.listData.pageSize = 10 - this.listData.pageIndex = 1 - this.getToponymicData() + this.listData.pageSize = 10; + this.listData.pageIndex = 1; + this.getToponymicData(); }, async getToponymicData() { if (this.listData.tab == "") { - delete this.listData.tab + delete this.listData.tab; } - this.listData.name = this.comprehensive.name - const data = await select_Comprehensive_ByPageAndCount(this.listData) + this.listData.name = this.comprehensive.name; + const data = await select_Comprehensive_ByPageAndCount(this.listData); if (data.code != 200) { - this.$message.error("鍒楄〃璋冪敤澶辫触") + this.$message.error("鍒楄〃璋冪敤澶辫触"); } - this.tableData = data.result - this.count = data.count + this.tableData = data.result; + this.count = data.count; }, async handleLocation(index, row) { - const data = await select_Comprehensive_SelectWktById({ id: row.gid }) + const data = await select_Comprehensive_SelectWktById({ id: row.gid }); if (data.code != 200) { - this.$message.error("鍒楄〃璋冪敤澶辫触") + this.$message.error("鍒楄〃璋冪敤澶辫触"); } - var val = data.result.slice(6, data.result.length - 1) - val = val.split(" ") + var val = data.result.slice(6, data.result.length - 1); + val = val.split(" "); var position = { X: parseFloat(val[0]), Y: parseFloat(val[1]), Altitude: 2000, - } + }; if (this.imagePoint != null) { - sgworld.Creator.DeleteObject(this.imagePoint) - this.imagePoint = null + sgworld.Creator.DeleteObject(this.imagePoint); + this.imagePoint = null; } this.imagePoint = sgworld.Creator.CreateLabel( position, @@ -574,7 +486,7 @@ }, 0, "宸℃鐐�" - ) + ); sgworld.Navigate.jumpTo({ //璺宠浆瑙嗚 @@ -583,121 +495,124 @@ parseFloat(val[1]), 10000 ), - }) + }); }, closeBufferBox(res) { switch (res) { case 1: - this.showBufferBoxDialog = false - this.clearBuffer() - break + this.showBufferBoxDialog = false; + this.clearBuffer(); + break; case 2: - this.showCoordLocalBoxDialog = false - break + this.showCoordLocalBoxDialog = false; + break; case 3: - this.showToponymicLocalBoxDialog = false + this.showToponymicLocalBoxDialog = false; if (this.imagePoint != null) { - sgworld.Creator.DeleteObject(this.imagePoint) - this.imagePoint = null + sgworld.Creator.DeleteObject(this.imagePoint); + this.imagePoint = null; } - break + break; case 4: - this.showPathAnalysisBoxDialog = false - this.clearPathAll(3) + this.showPathAnalysisBoxDialog = false; + this.clearPathAll(3); - break + break; } }, //瀹氫綅 setCoordLocal() { - var lon = parseFloat(this.coordFrom.lon) - var lat = parseFloat(this.coordFrom.lat) - var height = parseFloat(this.coordFrom.height) + var lon = parseFloat(this.coordFrom.lon); + var lat = parseFloat(this.coordFrom.lat); + var height = parseFloat(this.coordFrom.height); sgworld.Navigate.jumpTo({ //璺宠浆瑙嗚 destination: new Cesium.Cartesian3.fromDegrees(lon, lat, height), - }) + }); }, //缂撳啿鍖哄垎鏋� clearBuffer() { - if (this.buffer == null) return - this.buffer && this.buffer.clearBuff() - this.buffer = null + if (this.buffer == null) return; + this.buffer && this.buffer.clearBuff(); + this.buffer = null; }, getBufferTable(type) { const points = - this.buffer.this_buff.buff.polygon.hierarchy.getValue().positions - let geometrys = "" - let firstPoint - let degrees = "" + this.buffer.this_buff.buff.polygon.hierarchy.getValue().positions; + let geometrys = ""; + let firstPoint; + let degrees = ""; points.forEach((p, i) => { - degrees = window.sgworld.Core.toDegrees(p) - geometrys += "[" + degrees.lon + "," + degrees.lat + "]," - i === 0 && (firstPoint = "[" + degrees.lon + "," + degrees.lat + "]") - }) - geometrys += firstPoint - if (geometrys.length != 0) geometrys.trimEnd(",") - geometrys = "{rings:[[" + geometrys + "]]}" + degrees = window.sgworld.Core.toDegrees(p); + geometrys += "[" + degrees.lon + "," + degrees.lat + "],"; + i === 0 && (firstPoint = "[" + degrees.lon + "," + degrees.lat + "]"); + }); + geometrys += firstPoint; + if (geometrys.length != 0) geometrys.trimEnd(","); + geometrys = "{rings:[[" + geometrys + "]]}"; }, addBuffer(res) { - this.clearBuffer() - var buffRadius = this.bufFrom.val + this.clearBuffer(); + var buffRadius = this.bufFrom.val; switch (res) { case 1: - this.buffer = sgworld.Analysis.DrawPointBuffer(buffRadius, event => { - this.getBufferTable("point") - }) - break + this.buffer = sgworld.Analysis.DrawPointBuffer( + buffRadius, + (event) => { + this.getBufferTable("point"); + } + ); + break; case 2: this.buffer = sgworld.Analysis.DrawPolylineBuffer( buffRadius, - event => { - this.getBufferTable("line") + (event) => { + this.getBufferTable("line"); } - ) - break + ); + break; case 3: this.buffer = sgworld.Analysis.DrawPolygonBuffer( buffRadius, - event => { - this.getBufferTable("polygon") + (event) => { + this.getBufferTable("polygon"); } - ) - break + ); + break; } }, async showMouseLeftClick(res) { if (res == 3) { - this.$refs.form.validate(valid => { + this.$refs.form.validate((valid) => { if (!valid) { - return false + return false; } - }) - this.clearPathAll(3) - var start = this.pathFrom.lon.split(",") - var end = this.pathFrom.lat.split(",") + }); + this.clearPathAll(3); + var start = this.pathFrom.lon.split(","); + var end = this.pathFrom.lat.split(","); var startData = { x1: parseFloat(start[0]), y1: parseFloat(start[1]), x2: parseFloat(end[0]), y2: parseFloat(end[1]), - } + }; - const data = await comprehensive_selectRoute(startData) + const data = await comprehensive_selectRoute(startData); if (data.code != 200) { - return this.$message.error("鏁版嵁璇锋眰澶辫触") + return this.$message.error("鏁版嵁璇锋眰澶辫触"); } - var wkt = this.$wkt.parse(data.result) + var wkt = this.$wkt.parse(data.result); var bufferSource = Cesium.GeoJsonDataSource.load(wkt, { stroke: new Cesium.Color(82 / 255, 152 / 255, 255 / 255, 1), strokeWidth: 5, clampToGround: true, - }) - bufferSource.then(bufferSource => { - sgworld.Navigate.flyToObj(bufferSource) - Viewer.dataSources.add(bufferSource) - }) + }); + bufferSource.then((bufferSource) => { + sgworld.Navigate.flyToObj(bufferSource); + Viewer.dataSources.add(bufferSource); + }); // var jsonurl = // wnsUrl + // '?start=' + @@ -716,29 +631,29 @@ // }, // }); } else { - var that = this + var that = this; if (this.handler != null) { - this.clearLeftClick() + this.clearLeftClick(); } - this.handler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas) + this.handler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas); this.handler.setInputAction(function (event) { - let cartesian = Viewer.camera.pickEllipsoid(event.position) - let cartographic = Cesium.Cartographic.fromCartesian(cartesian) + let cartesian = Viewer.camera.pickEllipsoid(event.position); + let cartographic = Cesium.Cartographic.fromCartesian(cartesian); let lng = parseFloat( Cesium.Math.toDegrees(cartographic.longitude) - ).toFixed(6) // 缁忓害 + ).toFixed(6); // 缁忓害 let lat = parseFloat( Cesium.Math.toDegrees(cartographic.latitude) - ).toFixed(6) // 绾害 + ).toFixed(6); // 绾害 if (that.linePath != null) { - that.clearPathAll(3) + that.clearPathAll(3); } if (lng != null && lat != null) { - let val = lng + "," + lat - var position = sgworld.Creator.CreatePosition(lng, lat, 0) + let val = lng + "," + lat; + var position = sgworld.Creator.CreatePosition(lng, lat, 0); if (res == 1) { if (that.pathStart != null) { - that.clearPathAll(1) + that.clearPathAll(1); } that.pathStart = sgworld.Creator.CreateLabel( @@ -756,12 +671,12 @@ }, 0, "璧峰鐐�" - ) + ); - that.pathFrom.lon = val + that.pathFrom.lon = val; } else if (res == 2) { if (that.pathEnd != null) { - that.clearPathAll(2) + that.clearPathAll(2); } that.pathEnd = sgworld.Creator.CreateLabel( @@ -779,68 +694,68 @@ }, 0, "缁撴潫鐐�" - ) - that.pathFrom.lat = val + ); + that.pathFrom.lat = val; } - that.clearLeftClick() + that.clearLeftClick(); } - }, Cesium.ScreenSpaceEventType.LEFT_CLICK) + }, Cesium.ScreenSpaceEventType.LEFT_CLICK); } }, clearPathAll(res) { switch (res) { case 1: if (this.pathStart != null) { - sgworld.Creator.DeleteObject(this.pathStart) - this.pathStart = null + sgworld.Creator.DeleteObject(this.pathStart); + this.pathStart = null; } - break + break; case 2: if (this.pathEnd != null) { - sgworld.Creator.DeleteObject(this.pathEnd) - this.pathEnd = null + sgworld.Creator.DeleteObject(this.pathEnd); + this.pathEnd = null; } - break + break; case 3: if (this.pathStart != null) { - sgworld.Creator.DeleteObject(this.pathStart) - this.pathStart = null + sgworld.Creator.DeleteObject(this.pathStart); + this.pathStart = null; } if (this.pathEnd != null) { - sgworld.Creator.DeleteObject(this.pathEnd) - this.pathEnd = null + sgworld.Creator.DeleteObject(this.pathEnd); + this.pathEnd = null; } if (this.linePath != null) { - sgworld.Creator.DeleteObject(this.linePath) - this.linePath = null + sgworld.Creator.DeleteObject(this.linePath); + this.linePath = null; } - Viewer.dataSources.removeAll() - break + Viewer.dataSources.removeAll(); + break; case 4: if (this.linePath != null) { - sgworld.Creator.DeleteObject(this.linePath) - this.linePath = null + sgworld.Creator.DeleteObject(this.linePath); + this.linePath = null; } - break + break; } }, clearLeftClick() { - this.handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK) //绉婚櫎浜嬩欢 - this.handler = null + this.handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); //绉婚櫎浜嬩欢 + this.handler = null; }, executeFly3D(res) { - var position = [] + var position = []; if (res) { - var positionA = res.features + var positionA = res.features; if (positionA.length > 0) { for (var i = 0; i < positionA.length; i++) { - var val = positionA[i] + var val = positionA[i]; if (val.geometry.type == "LineString") { - var val_data = val.geometry.coordinates + var val_data = val.geometry.coordinates; for (var j = 0; j < val_data.length; j++) { - position.push({ x: val_data[j][0], y: val_data[j][1] }) + position.push({ x: val_data[j][0], y: val_data[j][1] }); } } } @@ -850,15 +765,15 @@ 1, 0, "绾�" - ) - sgworld.Navigate.flyToObj(this.linePath) + ); + sgworld.Navigate.flyToObj(this.linePath); } else { - return + return; } } }, }, -} +}; </script> <style scoped lang="less"> diff --git a/src/views/Archive/index.vue b/src/views/Archive/index.vue index dccea42..b62312f 100644 --- a/src/views/Archive/index.vue +++ b/src/views/Archive/index.vue @@ -527,27 +527,31 @@ <el-form-item> <el-button @click="conditionVisible = true" - type="info" + type="success" + size="small" icon="el-icon-plus" >{{$t('common.append')}}</el-button> </el-form-item> <el-form-item> <el-button @click="submitForm()" - type="info" + type="primary" + size="small" icon="el-icon-search" >{{$t('common.iquery')}}</el-button> </el-form-item> <el-form-item> <el-button type="info" + size="small" @click="resetForm()" icon="el-icon-search" >{{$t('common.reset')}}</el-button> </el-form-item> <el-form-item> <el-button - type="info" + type="warning" + size="small" @click="downloadForm()" icon="el-icon-download" >{{$t('common.download')}}</el-button> @@ -829,30 +833,30 @@ <el-table-column type="index" width="50" - label="搴忓彿" + :label="$t('common.index')" > </el-table-column> <el-table-column property="descr" - label="鏍囬" + :label="$t('common.title')" > </el-table-column> <el-table-column property="name" - label="鏂囦欢鍚嶇О" + :label="$t('common.fileNme')" > </el-table-column> <el-table-column property="createName" - label="鍑哄浘浜�" + :label="$t('operatManage.BWL.requestUser')" > </el-table-column> <el-table-column property="createTime" :formatter="formatData" - label="鏃ユ湡" + :label="$t('dataApply.careatetime')" > </el-table-column> <el-table-column - label="鎿嶄綔" + :label="$t('common.download')" width="120" > <template slot-scope="scope"> diff --git a/src/views/Tools/LayerTree.vue b/src/views/Tools/LayerTree.vue index 04d664c..4d68611 100644 --- a/src/views/Tools/LayerTree.vue +++ b/src/views/Tools/LayerTree.vue @@ -1,62 +1,66 @@ <template> <div class="lalala tree-container"> - <el-input placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" - v-model="filterText" - class="search"> + <el-input + placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" + v-model="filterText" + class="search" + > </el-input> - <el-tree :data="treeData" - node-key="id" - default-expand-all - show-checkbox - @node-click="handleLeftclick" - @node-contextmenu="rightClick" - @check-change="handleCheckChange" - :default-checked-keys="handleTreeCheck" - ref="tree"> - <span class="slot-t-node" - slot-scope="{ node, data }" - @dblclick="editNode(data)"> + <el-tree + ref="tree" + :data="treeData" + node-key="id" + default-expand-all + show-checkbox + @node-click="handleLeftclick" + @node-contextmenu="rightClick" + @check-change="handleCheckChange" + :default-checked-keys="handleTreeCheck" + > + <span + class="slot-t-node" + slot-scope="{ node, data }" + @dblclick="editNode(data)" + > <span v-show="!data.isEdit"> <span :class="[data.id >= 99 ? 'slot-t-node--label' : '']">{{ node.label }}</span> </span> <span v-show="data.isEdit"> - <el-input class="slot-t-input" - size="mini" - autofocus - v-model="data.label" - :ref="'slotTreeInput' + data.id" - @blur.stop="NodeBlur(node, data)" - @keydown.native.enter="NodeBlur(node, data)"></el-input> + <el-input + class="slot-t-input" + size="mini" + autofocus + v-model="data.label" + :ref="'slotTreeInput' + data.id" + @blur.stop="NodeBlur(node, data)" + @keydown.native.enter="NodeBlur(node, data)" + ></el-input> </span> </span> - </el-tree> - <el-card class="box-card" - ref="card" - :style="{ ...rightClickMenuStyle }" - v-show="menuVisible"> - <div @click="addSameLevelNode()"> - <i class="el-icon-circle-plus-outline"></i> 娣诲姞鍥惧眰缁� + <el-card + class="box-card" + ref="card" + :style="{ ...rightClickMenuStyle }" + v-show="menuVisible" + > + <div @click="addSameLevelNode()" v-show="firstLevel"> + <i class="el-icon-plus"></i> 娣诲姞鍥惧眰缁� </div> - <div class="add" - @click="addChildNode()" - v-show="firstLevel"> - <i class="el-icon-circle-plus-outline"></i> 娣诲姞鍥惧眰 + <div class="add" @click="addChildNode()"> + <i class="el-icon-plus"></i> 娣诲姞鍥惧眰 </div> - <div class="delete" - @click="deleteNode()"> - <i class="el-icon-remove-outline"></i> 鍒犻櫎鑺傜偣 + <div class="delete" @click="deleteNode()"> + <i class="el-icon-delete"></i> 鍒犻櫎 </div> - <div class="edit" - @click="editNode()"> - <i class="el-icon-edit"></i> 淇敼鑺傜偣 + <div class="edit" @click="editNode()"> + <i class="el-icon-edit"></i> 閲嶅懡鍚� </div> - <div class="edit" - @click="showLayerAttribute()"> - <i class="el-icon-edit"></i> 灞炴�� + <div class="edit" @click="showLayerAttribute()"> + <i class="el-icon-tickets"></i> 灞炴�� </div> <!-- <div class="edit" @@ -71,25 +75,29 @@ <i class="el-icon-bottom"></i> 涓嬬Щ </div> --> </el-card> - <el-dialog :title="appendNodetitle" - :visible.sync="dialogVisible" - width="30%" - top="20vh" - :modal="false" - :before-close="handleClose"> - <el-form ref="form" - :model="addFormServer" - label-width="100px"> + <el-dialog + :title="appendNodetitle" + :visible.sync="dialogVisible" + width="30%" + top="20vh" + :modal="false" + :before-close="handleClose" + > + <el-form ref="form" :model="addFormServer" label-width="100px"> <el-form-item label="鏈嶅姟绫诲瀷"> <!-- <el-input v-model="addFormServer.type"></el-input> --> - <el-select style="width:100%" - :popper-append-to-body="false" - v-model="addFormServer.layerType" - placeholder="璇烽�夋嫨"> - <el-option v-for="item in options" - :key="item.value" - :label="item.label" - :value="item.value"> + <el-select + style="width: 100%" + :popper-append-to-body="false" + v-model="addFormServer.layerType" + placeholder="璇烽�夋嫨" + > + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value" + > </el-option> </el-select> </el-form-item> @@ -107,10 +115,8 @@ <el-slider v-model="addFormServer.opacity"></el-slider> </el-form-item> </el-form> - <span slot="footer" - class="dialog-footer"> - <el-button type="primary" - @click="setAddServer">纭� 瀹�</el-button> + <span slot="footer" class="dialog-footer"> + <el-button type="primary" @click="setAddServer">纭� 瀹�</el-button> </span> </el-dialog> <queryinfo ref="queryinfo" /> @@ -118,96 +124,95 @@ </template> <script> -import { image_layer } from '../../assets/js/index.js'; -import ImageWMS from 'ol/source/ImageWMS'; -import Image from 'ol/layer/Image'; -import GeoJSON from 'ol/format/GeoJSON.js'; -import Map from 'ol/Map.js'; -import queryinfo from './queryinfo.vue'; +import { image_layer } from "../../assets/js/index.js"; +import ImageWMS from "ol/source/ImageWMS"; +import Image from "ol/layer/Image"; +import GeoJSON from "ol/format/GeoJSON.js"; +import Map from "ol/Map.js"; +import queryinfo from "./queryinfo.vue"; import { Vector as VectorSource } from "ol/source"; -import { Vector as VectorLayer, } from "ol/layer"; +import { Vector as VectorLayer } from "ol/layer"; -import View from 'ol/View.js'; -import { Fill, Stroke, Style } from 'ol/style.js'; -import { perms_selectLayers } from '../../api/api.js' +import View from "ol/View.js"; +import { Fill, Stroke, Style } from "ol/style.js"; +import { perms_selectLayers } from "../../api/api.js"; export default { - name: 'tree', + name: "tree", components: { queryinfo }, - data () { + data() { return { - eleId: '', + eleId: "", isShow: false, - currentData: '', - currentNode: '', + currentData: "", + currentNode: "", menuVisible: false, firstLevel: false, - filterText: '', - appendNodetitle: '', + filterText: "", + appendNodetitle: "", maxexpandId: 4, rightClickMenuStyle: {}, handleTreeCheck: [], dialogVisible: false, addFormServer: { opacity: 100, - layerType: 'WMS', + layerType: "WMS", type: 2, }, layerId: [ - 'm_pipeline', - 'th_strategic_channel', - 'bs_project', - 'm_sitepoint', + "m_pipeline", + "th_strategic_channel", + "bs_project", + "m_sitepoint", ], - treeData: [ - - ], + treeData: [], defaultProps: { - children: 'children', - label: 'label', - + children: "children", + label: "label", }, - options: [{ - value: 'WMS', - label: 'WMS' - }, { - value: 'WFS', - label: 'WFS' - }], + options: [ + { + value: "WMS", + label: "WMS", + }, + { + value: "WFS", + label: "WFS", + }, + ], }; }, methods: { - NodeBlur (Node, data) { + NodeBlur(Node, data) { if (data.label.length === 0) { - this.$message.error('鑿滃崟鍚嶄笉鍙负绌猴紒'); + this.$message.error("鑿滃崟鍚嶄笉鍙负绌猴紒"); return false; } else { if (data.isEdit) { - this.$set(data, 'isEdit', false); + this.$set(data, "isEdit", false); } this.$nextTick(() => { - this.$refs['slotTreeInput' + data.id].$refs.input.focus(); + this.$refs["slotTreeInput" + data.id].$refs.input.focus(); }); } }, // 鏌ヨ - filterNode (value, data) { + filterNode(value, data) { if (!value) return true; return data.label.indexOf(value) !== -1; }, - allowDrop (draggingNode, dropNode, type) { - if (dropNode.data.label === '浜岀骇 3-1') { - return type !== 'inner'; + allowDrop(draggingNode, dropNode, type) { + if (dropNode.data.label === "浜岀骇 3-1") { + return type !== "inner"; } else { return true; } }, - allowDrag (draggingNode) { - return draggingNode.data.label.indexOf('涓夌骇 3-2-2') === -1; + allowDrag(draggingNode) { + return draggingNode.data.label.indexOf("涓夌骇 3-2-2") === -1; }, // 榧犳爣鍙冲嚮浜嬩欢 - rightClick (event, object, Node, element) { - + rightClick(event, object, Node, element) { this.currentData = object; this.currentNode = Node; if (Node.level === 1) { @@ -217,11 +222,11 @@ } this.menuVisible = true; - this.$refs.card.$el.style.left = event.pageX + 20 + 'px'; - this.$refs.card.$el.style.top = event.pageY + 'px'; + this.$refs.card.$el.style.left = event.pageX + 20 + "px"; + this.$refs.card.$el.style.top = event.pageY + "px"; }, // 榧犳爣宸﹀嚮浜嬩欢 - handleLeftclick (data, node) { + handleLeftclick(data, node) { this.foo(); if (node.checked == true) { for (var i = 0; i < window.Viewer.imageryLayers._layers.length; i++) { @@ -234,43 +239,42 @@ } }, // 鍙栨秷榧犳爣鐩戝惉浜嬩欢 鑿滃崟鏍� - foo () { + foo() { this.menuVisible = false; // 瑕佸強鏃跺叧鎺夌洃鍚紝涓嶅叧鎺夌殑鏄竴涓潙锛屼笉淇′綘璇曡瘯锛岃櫧鐒跺墠鍙版樉绀虹殑鏃跺�欐病鏈夊暐姣涚梾锛屽姞涓�涓猘lert浣犲氨鐭ラ亾浜� - document.removeEventListener('click', this.foo); + document.removeEventListener("click", this.foo); }, // 澧炲姞鍚岀骇鑺傜偣浜嬩欢 - addSameLevelNode () { - + addSameLevelNode() { this.foo(); if (this.currentNode.level == 2) { this.appendNodetitle = this.currentData.label; this.dialogVisible = true; } else { let id = Math.ceil(Math.random() * 100); - var data = { id: id, label: '鏂板鑺傜偣' }; + var data = { id: id, label: "鏂板鑺傜偣" }; this.$refs.tree.append(data, this.currentNode.parent); } }, // 澧炲姞瀛愮骇鑺傜偣浜嬩欢 - addChildNode () { + addChildNode() { this.foo(); - if (this.currentNode.level >= 2) { - this.$message.error('鏈�澶氬彧鏀袱绾э紒'); - return false; - } + // if (this.currentNode.level >= 2) { + // this.$message.error("鏈�澶氬彧鏀袱绾э紒"); + // return false; + // } this.appendNodetitle = this.currentData.label; this.dialogVisible = true; }, - handleClose () { + handleClose() { this.dialogVisible = false; this.addFormServer = { opacity: 100, - layerType: 'WMS', + layerType: "WMS", type: 2, }; }, - setAddServer () { + setAddServer() { var val = this.currentNode; if (this.currentNode.level == 2) { val = this.currentNode.parent; @@ -281,22 +285,24 @@ this.handleClose(); }, // 鍒犻櫎鑺傜偣 - deleteNode () { - + deleteNode() { this.foo(); var label = this.currentNode.data.label; - if (this.currentNode.data.layerType == 'WMS') { + if (this.currentNode.data.layerType == "WMS") { for (var i in window.Viewer.imageryLayers_layers) { if (window.Viewer.imageryLayers_layers[i].name === label) { - window.Viewer.imageryLayers.remove(window.Viewer.imageryLayers_layers[i]) + window.Viewer.imageryLayers.remove( + window.Viewer.imageryLayers_layers[i] + ); } } - - } else if (this.currentNode.data.layerType == 'WFS') { + } else if (this.currentNode.data.layerType == "WFS") { for (var i in window.Viewer.dataSources._dataSources) { if (window.Viewer.dataSources._dataSources[i].name == label) { - window.Viewer.dataSources.remove(window.Viewer.dataSources._dataSources[i]); - std.push(data.label) + window.Viewer.dataSources.remove( + window.Viewer.dataSources._dataSources[i] + ); + std.push(data.label); } } } @@ -311,122 +317,116 @@ this.$refs.tree.remove(this.currentNode); }, //灞炴�ф樉绀� - showLayerAttribute (data) { + showLayerAttribute(data) { this.foo(); this.currentData = data ? data : this.currentData; - var layer = this.currentData.layer.replaceAll('_', ""); + var layer = this.currentData.layer.replaceAll("_", ""); this.$store.state.mapSpaceQueryLayer = layer; // this.$store.state.mapPopBoolean = true; - this.$store.state.mapPopBoxFlag = '2'; + this.$store.state.mapPopBoxFlag = "2"; this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close(); - this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("灞炴��", null, { - close: () => { + this.$refs && + this.$refs.queryinfo && + this.$refs.queryinfo.open("灞炴��", null, { + close: () => { + if (this.$store.state.primitLayer != null) { + sgworld.Creator.DeleteObject(this.$store.state.primitLayer); + this.$store.state.primitLayer = null; + } - if (this.$store.state.primitLayer != null) { - sgworld.Creator.DeleteObject(this.$store.state.primitLayer); - this.$store.state.primitLayer = null; - } - - if (window.Viewer.scene.primitives.length != 0) { - window.Viewer.scene.primitives.removeAll() - } - } - }); + if (window.Viewer.scene.primitives.length != 0) { + window.Viewer.scene.primitives.removeAll(); + } + }, + }); }, // 缂栬緫鑺傜偣 - editNode (data) { - + editNode(data) { this.foo(); this.currentData = data ? data : this.currentData; if (!this.currentData.isEdit) { - this.$set(this.currentData, 'isEdit', true); + this.$set(this.currentData, "isEdit", true); } // 鑾峰彇鐒︾偣 this.$nextTick(() => { - this.$refs['slotTreeInput' + this.currentData.id].focus(); + this.$refs["slotTreeInput" + this.currentData.id].focus(); }); }, - - - menuMoveF (type) { + menuMoveF(type) { // 灏嗗彉鍔ㄤ箣鍓嶇殑node澶囦唤 var node = this.currentNode; var data = this.currentData; - let copyNode = this.currentNode + let copyNode = this.currentNode; // copyNode.previousSibling = {...node. } // copyNode.nextSibling = {...node.nextSibling} // window.sessionStorage.setItem('menuNode',CircularJSON.stringify(copyNode)) - let nodeData = {} - if (type === 'up') { + let nodeData = {}; + if (type === "up") { // 涓婄Щ if (node.previousSibling) { // 鍒犻櫎鍘熷厛鐨刵ode - this.$refs.tree.remove(node.data) + this.$refs.tree.remove(node.data); // 鎷垮埌copy鐨刵ode // nodeData = CircularJSON.parse(window.sessionStorage.getItem('menuNode')) // // 澶嶅埗璇ode鍒版寚瀹氫綅缃�(鍙傛暟锛�1. 瑕佸鍔犵殑鑺傜偣鐨� data 2. 瑕佸鍔犵殑鑺傜偣鐨勫悗涓�涓妭鐐圭殑 data銆乲ey 鎴栬�� node) // this.$refs.tree.insertBefore(nodeData.data,nodeData.previousSibling.data) - window.sessionStorage.removeItem('menuNode') + window.sessionStorage.removeItem("menuNode"); } else { - this.$message.warning('璇ヨ彍鍗曞凡缁忔槸褰撳墠灞傛渶涓婄骇') + this.$message.warning("璇ヨ彍鍗曞凡缁忔槸褰撳墠灞傛渶涓婄骇"); } } else { // 涓嬬Щ if (node.nextSibling) { - this.$refs.tree.remove(node.data) - nodeData = CircularJSON.parse(window.sessionStorage.getItem('menuNode')) + this.$refs.tree.remove(node.data); + nodeData = CircularJSON.parse( + window.sessionStorage.getItem("menuNode") + ); // 鍙傛暟锛�1. 瑕佸鍔犵殑鑺傜偣鐨� data 2. 瑕佸鍔犵殑鑺傜偣鐨勫墠涓�涓妭鐐圭殑 data銆乲ey 鎴栬�� node - this.$refs.tree.insertAfter(nodeData.data, nodeData.nextSibling.data) - window.sessionStorage.removeItem('menuNode') + this.$refs.tree.insertAfter(nodeData.data, nodeData.nextSibling.data); + window.sessionStorage.removeItem("menuNode"); } else { - this.$message.warning('璇ヨ彍鍗曞凡缁忔槸褰撳墠灞傛渶涓嬬骇') + this.$message.warning("璇ヨ彍鍗曞凡缁忔槸褰撳墠灞傛渶涓嬬骇"); } } }, - - handleDragStart (node, ev) { - console.log('drag start', node); + handleDragStart(node, ev) { + console.log("drag start", node); }, - handleDragEnter (draggingNode, dropNode, ev) { - console.log('tree drag enter: ', dropNode.label); + handleDragEnter(draggingNode, dropNode, ev) { + console.log("tree drag enter: ", dropNode.label); }, - handleDragLeave (draggingNode, dropNode, ev) { - console.log('tree drag leave: ', dropNode.label); + handleDragLeave(draggingNode, dropNode, ev) { + console.log("tree drag leave: ", dropNode.label); }, - handleDragOver (draggingNode, dropNode, ev) { - console.log('tree drag over: ', dropNode.label); + handleDragOver(draggingNode, dropNode, ev) { + console.log("tree drag over: ", dropNode.label); }, - handleDragEnd (draggingNode, dropNode, dropType, ev) { - console.log('tree drag end: ', dropNode && dropNode.label, dropType); + handleDragEnd(draggingNode, dropNode, dropType, ev) { + console.log("tree drag end: ", dropNode && dropNode.label, dropType); }, - handleDrop (draggingNode, dropNode, dropType, ev) { - console.log('tree drop: ', dropNode.label, dropType); + handleDrop(draggingNode, dropNode, dropType, ev) { + console.log("tree drop: ", dropNode.label, dropType); }, handleCheckChange(data, checked, indeterminate) { - - - - if (data.type != 2) return; //鍋氬垽鏂槸鍚︽槸1锛�100涓囪鏀跨晫闈� - if(data.layer==window.XZOutlie&&checked){ - window.ImageLayer3.show=false; - }else{ - window.ImageLayer3.show=true; + if (data.layer == window.XZOutlie && checked) { + window.ImageLayer3.show = false; + } else { + window.ImageLayer3.show = true; } - var std = []; - if (data.layerType == 'WMS') { + if (data.layerType == "WMS") { var layers_ol = window.map.getAllLayers(); 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 == data.label) { - - std.push(data.label) + std.push(data.label); const img_layer = window.Viewer.imageryLayers._layers[i]; img_layer.show = checked; @@ -439,21 +439,20 @@ layerOl.setVisible(checked); //鏄剧ず鍥惧眰 } } - } else if (data.layerType == 'WFS') { - + } else if (data.layerType == "WFS") { if (window.Viewer.dataSources._dataSources.length == 0) { this.setAddLayers(data); } else { for (var i in window.Viewer.dataSources._dataSources) { if (window.Viewer.dataSources._dataSources[i].name == data.label) { window.Viewer.dataSources._dataSources[i].show = checked; - std.push(data.label) + std.push(data.label); } } } } if (std.length == 0 && checked == true) { - this.setAddLayers(data) + this.setAddLayers(data); } var layers_ol = window.map.getAllLayers(); for (var i in layers_ol) { @@ -464,10 +463,10 @@ } }, setAddLayers(res) { - if (res.layerType == 'WMS') { + if (res.layerType == "WMS") { var url = geoServerURl; if (res.url != null && res.url != undefined) { - url = res.url + url = res.url; } //var width = $("#mapdiv").width(); @@ -484,7 +483,7 @@ styles: "", }, tileWidth: 512, - tileHeight: 512 + tileHeight: 512, }); layerWMS.name = res.label; //閫忔槑搴� @@ -495,11 +494,11 @@ var layer2 = new Image({ name: res.label, source: new ImageWMS({ - crossOrigin: 'anonymous', + crossOrigin: "anonymous", url: url, params: { - FORMAT: 'image/png', - VERSION: '1.1.1', + FORMAT: "image/png", + VERSION: "1.1.1", LAYERS: res.resource, }, }), @@ -508,10 +507,12 @@ layer2.setOpacity(parseInt(res.opacity) / 100); } window.map.addLayer(layer2); - - } else if (res.layerType == 'WFS') { - - var url = res.url + "?service=WFS&version=1.0.0&request=GetFeature&typeName=" + res.resource + "&outputFormat=application%2Fjson" + } else if (res.layerType == "WFS") { + var url = + res.url + + "?service=WFS&version=1.0.0&request=GetFeature&typeName=" + + res.resource + + "&outputFormat=application%2Fjson"; $.ajax({ url: url, cache: false, @@ -522,17 +523,16 @@ fill: Cesium.Color.YELLOW.withAlpha(0.1), alpha: 0.1, strokeWidth: 8, - clampToGround: true //鏄惁璐村湴 + clampToGround: true, //鏄惁璐村湴 }); datasource.then((data) => { data.name = res.label; window.Viewer.dataSources.add(data); - }) - + }); }, error: function (data) { console.log("error"); - } + }, }); var vectorLayer = new VectorLayer({ @@ -541,16 +541,14 @@ url: url, format: new GeoJSON(), }), - }); window.map.addLayer(vectorLayer); } }, - async layersStart () { + async layersStart() { const data = await perms_selectLayers(); if (data.code != 200) { return this.$message.error("鍥惧眰鍒楄〃鏌ヨ澶辫触"); - } this.newData = data.result; @@ -566,11 +564,9 @@ type: data.result[i].type, isEdit: false, children: [], - }) + }); } else if (data.result[i].type == 2) { - if (data.result[i].url != null) { - var layer_entity = { id: data.result[i].id, pid: data.result[i].pid, @@ -579,15 +575,14 @@ type: data.result[i].type, isEdit: false, layer: data.result[i].enName, - layerType: data.result[i].serveType - } - layer_list.push(layer_entity) + layerType: data.result[i].serveType, + }; + layer_list.push(layer_entity); if (data.result[i].isShow == 1) { std.push(data.result[i].id); this.setAddLayers(layer_entity); } - } } } @@ -595,19 +590,19 @@ for (var i in layer_list) { for (var j in layer_groups) { if (layer_list[i].pid === layer_groups[j].id) { - layer_groups[j].children.push(layer_list[i]) + layer_groups[j].children.push(layer_list[i]); } } } layer_groups = layer_groups.filter((res) => { if (res.children && res.children.length != 0) { - return res + return res; } - }) + }); this.treeData = layer_groups; this.$refs.tree.setCheckedKeys(std); }, - async treelayersStart () { + async treelayersStart() { const data = await perms_selectLayers(); if (data.code != 200) { return this.$message.error("鍥惧眰鍒楄〃鏌ヨ澶辫触"); @@ -623,7 +618,7 @@ type: data.result[i].type, isEdit: false, children: [], - }) + }); } else if (data.result[i].type == 2) { if (data.result[i].url != null) { var layer_entity = { @@ -633,23 +628,23 @@ resource: data.result[i].url, type: data.result[i].type, isEdit: false, - } - layer_list.push(layer_entity) + }; + layer_list.push(layer_entity); } } } for (var i in layer_list) { for (var j in layer_groups) { if (layer_list[i].pid === layer_groups[j].id) { - layer_groups[j].children.push(layer_list[i]) + layer_groups[j].children.push(layer_list[i]); } } } layer_groups = layer_groups.filter((res) => { if (res.children && res.children.length != 0) { - return res + return res; } - }) + }); this.treeData = layer_groups; for (var i in data.result) { @@ -657,7 +652,6 @@ for (var j = 0; j < window.Viewer.imageryLayers._layers.length; j++) { var val_id = window.Viewer.imageryLayers._layers[j]; if (val_id.show == true) { - if (val_id.imageryProvider.name == data.result[i].cnName) { std.push(data.result[i].id); } @@ -666,21 +660,19 @@ } } this.$refs.tree.setCheckedKeys(std); - - } - }, - watch: { - filterText (val) { - this.$refs.tree.filter(val); - }, }, - mounted () { + watch: { + filterText(val) { + this.$refs.tree.filter(val); + }, + }, + mounted() { this.$bus.$on("treeDataCopy", (res) => { this.$store.state.treeData = this.treeData; - this.$store.state.checkedKeys = this.$refs.tree.getCheckedKeys() + this.$store.state.checkedKeys = this.$refs.tree.getCheckedKeys(); }); - + if (this.$store.state.showAllLayers == true) { this.layersStart(); this.$store.state.showAllLayers = false; @@ -688,7 +680,6 @@ this.treeData = this.$store.state.treeData; this.$refs.tree.setCheckedKeys(this.$store.state.checkedKeys); } - }, }; </script> diff --git a/src/views/Tools/Popup.vue b/src/views/Tools/Popup.vue index 2611db9..444f14e 100644 --- a/src/views/Tools/Popup.vue +++ b/src/views/Tools/Popup.vue @@ -64,21 +64,21 @@ </template> <script> -import baseVuex from './baseVuex'; +import baseVuex from "./baseVuex"; export default { - name: 'Popup', + name: "Popup", components: {}, mixins: [baseVuex], props: [ - 'title', - 'left', - 'top', - 'maxHeight', - 'width', - 'shadow', - 'closeHidePage', - 'showBtn', - 'btnArr', + "title", + "left", + "top", + "maxHeight", + "width", + "shadow", + "closeHidePage", + "showBtn", + "btnArr", ], data() { return { @@ -86,14 +86,14 @@ showBox: false, // 鏄惁鏄剧ず鍐呭 showContainer: true, - defaultMaxHeight: '400px', + defaultMaxHeight: "400px", }; }, directives: { // 鎷栨嫿 drag(el) { // 鑾峰彇寮圭獥澶撮儴 - let popupTitle = el.querySelector('.popupTitle'); + let popupTitle = el.querySelector(".popupTitle"); // 娣诲姞榧犳爣鎸変笅浜嬩欢 popupTitle.onmousedown = function (e) { let disx = e.clientX - el.offsetLeft; @@ -107,8 +107,8 @@ left > maxleft && (left = maxleft); top < 0 && (top = 0); top > maxTop && (top = maxTop); - el.style.left = left + 'px'; - el.style.top = top + 'px'; + el.style.left = left + "px"; + el.style.top = top + "px"; }; document.onmouseup = function () { document.onmousemove = document.onmouseup = null; @@ -117,10 +117,10 @@ }, }, mounted() { - if (this.maxHeight === 'max') { + if (this.maxHeight === "max") { this.$parent.maxHeight = undefined; this.$nextTick(() => { - this.defaultMaxHeight = this.$el.offsetHeight * 0.92 - 40 + 'px'; + this.defaultMaxHeight = this.$el.offsetHeight * 0.92 - 40 + "px"; }); } }, @@ -132,18 +132,18 @@ // 鍏抽棴寮圭獥 close() { this.showBox = false; - this.$emit('close'); + this.$emit("close"); }, yes() { - this.$emit('yes'); + this.$emit("yes"); }, cancel() { - this.$emit('cancel'); + this.$emit("cancel"); }, // 鎵撳紑寮圭獥 open() { this.showBox = true; - this.$emit('open'); + this.$emit("open"); }, }, }; @@ -167,7 +167,7 @@ border: 1px solid rgba(32, 160, 255, 0.6); border-radius: 5px; pointer-events: all; - min-width: 323px; + min-width: 280px; color: #fff; font-size: 18px; font-family: 寰蒋闆呴粦; diff --git a/src/views/Tools/maplayer.vue b/src/views/Tools/maplayer.vue index 0ad9e0c..2fb4c48 100644 --- a/src/views/Tools/maplayer.vue +++ b/src/views/Tools/maplayer.vue @@ -5,7 +5,7 @@ v-for="(data, index) in PopupData" :key="data.id" title="鍥惧眰绠$悊" - :maxHeight="data.maxHeight || '500px'" + :maxHeight="data.maxHeight || '400px'" @close="close(data.id)" :left="data.left || left" :top="data.top || top + index * 42 + 'px'" diff --git a/src/views/Tools/pipeLineAnaly.vue b/src/views/Tools/pipeLineAnaly.vue index b6a968c..05cabd3 100644 --- a/src/views/Tools/pipeLineAnaly.vue +++ b/src/views/Tools/pipeLineAnaly.vue @@ -2,11 +2,7 @@ <div class="pipeLineBox"> <div class="headerBox"> <div class="elFrom"> - <el-form - ref="form" - :model="ruleFrom" - label-width="120px" - > + <el-form ref="form" :model="ruleFrom" label-width="120px"> <el-form-item label="绠¢亾涓績绾�"> <el-select @change="selectChange" @@ -39,38 +35,32 @@ </el-form-item> </el-form> </div> - <div style="display:flex"> + <div style="display: flex"> <div class="transBox"> <label>鍩虹鏁版嵁鍥惧眰</label> <div class="checkBox"> <ul> <li @click="checkLeft(item)" - :class="{checkhover:checkedLeftflag == item.id}" - v-for='(item,index) in cities' + :class="{ checkhover: checkedLeftflag == item.id }" + v-for="(item, index) in cities" :label="item.label" :key="item.id" - >{{item.label}}</li> + > + {{ item.label }} + </li> </ul> </div> </div> <div class="transInfo"> <div> - <el-link - @click="setTransRight" - :underline="false" - ><i - style="color:white" - class="el-icon-d-arrow-right" - ></i></el-link> + <el-link @click="setTransRight" :underline="false" + ><i class="el-icon-d-arrow-right"></i + ></el-link> <br /> - <el-link - @click="setTransLeft" - :underline="false" - ><i - style="color:white" - class="el-icon-d-arrow-left" - ></i></el-link> + <el-link @click="setTransLeft" :underline="false" + ><i class="el-icon-d-arrow-left"></i + ></el-link> </div> </div> <div class="transBox"> @@ -79,28 +69,22 @@ <ul> <li @click="checkRight(item)" - :class="{checkhover:checkedRightflag == item.id}" - v-for='(item,index) in citiyData' + :class="{ checkhover: checkedRightflag == item.id }" + v-for="(item, index) in citiyData" :label="item.label" :key="item.id" - >{{item.label}}</li> + > + {{ item.label }} + </li> </ul> </div> </div> </div> <div class="sureButton"> - <div class="suerBox"> - <el-button - @click="setAnalysis" - size="small" - >鍒嗘瀽</el-button> - <el-button - @click="clearAnalysis" - size="small" - >鍙栨秷</el-button> + <el-button @click="setAnalysis" size="small">鍒嗘瀽</el-button> + <el-button @click="clearAnalysis" size="small">鍙栨秷</el-button> </div> - </div> </div> <div class="contentBox"> @@ -108,19 +92,19 @@ <ul> <li @click="setlistChange(item)" - :class="{checkhover:listflag == item.id}" + :class="{ checkhover: listflag == item.id }" v-for="item in listData" - >{{item.label}}</li> + > + {{ item.label }} + </li> </ul> </div> <div class="contentLeft"> - <div style="float:right;padding:2px"> - <el-button - @click="showDialogVivable()" - size="small" - type="info" - >涓嬭浇</el-button> + <div style="float: right; padding: 2px"> + <el-button @click="showDialogVivable()" size="small" type="info" + >涓嬭浇</el-button + > <!-- <el-button size="mini" type="info" @@ -130,22 +114,14 @@ type="info" >鍒犻櫎</el-button> --> </div> - <el-table - :data="tableData" - style="width: 100%" - height="70%" - > + <el-table :data="tableData" style="width: 100%" height="70%"> <el-table-column align="center" type="index" :label="$t('operatManage.ELM.index')" width="70px" /> - <el-table-column - label="瀹氫綅" - width="100" - align="center" - > + <el-table-column label="瀹氫綅" width="100" align="center"> <template slot-scope="scope"> <el-button icon="el-icon-map-location" @@ -154,41 +130,18 @@ ></el-button> </template> </el-table-column> - <el-table-column - prop="acrossName" - label="琚┛瓒婂湴鐗╁悕绉�" - width="180" - > + <el-table-column prop="acrossName" label="琚┛瓒婂湴鐗╁悕绉�" width="180"> </el-table-column> - <el-table-column - prop="acrossLength" - label="绌胯秺闀垮害" - width="100" - > + <el-table-column prop="acrossLength" label="绌胯秺闀垮害" width="100"> </el-table-column> - <el-table-column - prop="pipeName" - label="绠$嚎鍚嶇О" - width="180" - > + <el-table-column prop="pipeName" label="绠$嚎鍚嶇О" width="180"> </el-table-column> - <el-table-column - prop="segName" - label="绠℃鍚嶇О" - width="180" - > + <el-table-column prop="segName" label="绠℃鍚嶇О" width="180"> </el-table-column> - <el-table-column - prop="remarks" - label="澶囨敞" - width="100" - > + <el-table-column prop="remarks" label="澶囨敞" width="100"> </el-table-column> </el-table> - <div - class="pagination_box" - style="margin-top:10px" - > + <div class="pagination_box" style="margin-top: 10px"> <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" @@ -218,20 +171,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" @@ -239,16 +186,12 @@ ></el-input> </el-form-item> <el-form-item> - <el-button - type="info" - size="small" - @click="download " - >{{$t('common.confirm')}}</el-button> - <el-button - type="info" - size="small" - @click="closeDialog " - >{{$t('common.cancel')}}</el-button> + <el-button type="info" size="small" @click="download">{{ + $t("common.confirm") + }}</el-button> + <el-button type="info" size="small" @click="closeDialog">{{ + $t("common.cancel") + }}</el-button> </el-form-item> </el-form> </el-dialog> @@ -261,17 +204,22 @@ </template> <script> -import WKT from 'terraformer-wkt-parser' +import WKT from "terraformer-wkt-parser"; import { getToken } from "@/utils/auth"; -import { pipelines_selectSegNames, pipeline_selectPipeAnalysis, sign_getPublicKey, pipeline_downloadReq } from '../../api/api.js'; +import { + pipelines_selectSegNames, + pipeline_selectPipeAnalysis, + sign_getPublicKey, + pipeline_downloadReq, +} from "../../api/api.js"; import $ from "jquery"; export default { 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(); } @@ -280,61 +228,68 @@ 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" }, ], }, dialogVisible: false, codeForm: { - repassword: '', password: '' + repassword: "", + password: "", }, ruleFrom: { - value1: '', - value2: '' + value1: "", + value2: "", }, options1: [], options2: [], checkList: [], - checkData: [{ - id: 1, - label: '閾佽矾(dlg_25w_lrrl)', - tabs: 'dlg_25w_lrrl', - tabdesc: '閾佽矾', - table: 'bd.dlg_25w_lrrl', - checked: false, - }, { - id: 2, - label: '鍏矾(dlg_25w_lrdl)', - tabs: 'dlg_25w_lrdl', - tabdesc: '鍏矾', - table: 'bd.dlg_25w_lrdl', - checked: false, - }, { - id: 3, - label: '姘寸郴绾�(dlg_25w_hydl)', - tabs: 'dlg_25w_hydl', - tabdesc: '姘寸郴绾�', - table: 'bd.dlg_25w_hydl', - checked: false, - }, { - id: 4, - label: '姘寸郴闈�(dlg_25w_hyda)', - tabs: 'dlg_25w_hyda', - tabdesc: '姘寸郴闈�', - table: 'bd.dlg_25w_hyda', - checked: false, - }], + checkData: [ + { + id: 1, + label: "閾佽矾(dlg_25w_lrrl)", + tabs: "dlg_25w_lrrl", + tabdesc: "閾佽矾", + table: "bd.dlg_25w_lrrl", + checked: false, + }, + { + id: 2, + label: "鍏矾(dlg_25w_lrdl)", + tabs: "dlg_25w_lrdl", + tabdesc: "鍏矾", + table: "bd.dlg_25w_lrdl", + checked: false, + }, + { + id: 3, + label: "姘寸郴绾�(dlg_25w_hydl)", + tabs: "dlg_25w_hydl", + tabdesc: "姘寸郴绾�", + table: "bd.dlg_25w_hydl", + checked: false, + }, + { + id: 4, + label: "姘寸郴闈�(dlg_25w_hyda)", + tabs: "dlg_25w_hyda", + tabdesc: "姘寸郴闈�", + table: "bd.dlg_25w_hyda", + checked: false, + }, + ], citiyData: [], cities: [], checkedCities: [], @@ -350,12 +305,12 @@ pageData: { pageIndex: 1, pageSize: 10, - pageCount: 0 + pageCount: 0, }, multipleSelection: [], featurTable: null, featureLayer: [], - } + }; }, methods: { spaceLocation(index, row) { @@ -368,43 +323,55 @@ this.claerAll(); switch (geojson.type) { - case 'Point': - this.setShowImagePoint(geojson.coordinates) + case "Point": + this.setShowImagePoint(geojson.coordinates); break; - case 'MultiPoint': + case "MultiPoint": for (var i in geojson.coordinates) { - this.setShowImagePoint(geojson.coordinates[i]) + this.setShowImagePoint(geojson.coordinates[i]); } break; - case 'LineString': - this.setShowImageLine(geojson.coordinates) + case "LineString": + this.setShowImageLine(geojson.coordinates); break; - case 'MultiLineString': + case "MultiLineString": for (var i in geojson.coordinates) { - this.setShowImageLine(geojson.coordinates[i]) + this.setShowImageLine(geojson.coordinates[i]); } break; } }, setShowImagePoint(res) { - var obj = { X: res[0], Y: res[1], Altitude: 1000 } - var imageLabel = sgworld.Creator.CreateImageLabel(obj, SmartEarthRootUrl + "Workers/image/mark.png", {}, 0, "绠¢亾绌洪棿鍒嗘瀽"); - this.$store.state.pipelineEntity.push(imageLabel.item) + var obj = { X: res[0], Y: res[1], Altitude: 1000 }; + var imageLabel = sgworld.Creator.CreateImageLabel( + obj, + SmartEarthRootUrl + "Workers/image/mark.png", + {}, + 0, + "绠¢亾绌洪棿鍒嗘瀽" + ); + this.$store.state.pipelineEntity.push(imageLabel.item); sgworld.Navigate.flyToObj(imageLabel.item); }, setShowImageLine(res) { var obj = []; for (var i in res) { - obj.push({ x: res[i][0], y: res[i][1], z: 1000 }) + obj.push({ x: res[i][0], y: res[i][1], z: 1000 }); } - var line = sgworld.Creator.createPolyline(obj, "#ffff00", 1, 0, "绠¢亾绌洪棿鍒嗘瀽"); - this.$store.state.pipelineEntity.push(line.item) + var line = sgworld.Creator.createPolyline( + obj, + "#ffff00", + 1, + 0, + "绠¢亾绌洪棿鍒嗘瀽" + ); + this.$store.state.pipelineEntity.push(line.item); sgworld.Navigate.flyToObj(line.item); }, claerAll() { for (var i in this.$store.state.pipelineEntity) { - var item = this.$store.state.pipelineEntity[i] + var item = this.$store.state.pipelineEntity[i]; sgworld.Viewer.entities.remove(item); } this.$store.state.pipelineEntity = []; @@ -417,20 +384,17 @@ } }, async download() { - var std = []; for (var i in this.listData) { - - std.push(this.listData[i].table) + std.push(this.listData[i].table); } var obj = { pwd: encrypt.encrypt(this.codeForm.password), gid: this.analyGid, - tabs: std + tabs: std, }; const data = await pipeline_downloadReq(obj); if (data.code != 200) { - this.$message.error("涓嬭浇璇锋眰澶辫触"); this.closeDialog(); @@ -452,47 +416,47 @@ // this.$store.state.loading = false; }, showDialogVivable() { - if (this.listData.length == 0) return - this.dialogVisible = true + if (this.listData.length == 0) return; + this.dialogVisible = true; }, handleClose() { - this.$confirm('纭鍏抽棴锛�') - .then(_ => { - this.closeDialog() + this.$confirm("纭鍏抽棴锛�") + .then((_) => { + this.closeDialog(); }) - .catch(_ => { }); + .catch((_) => {}); }, closeDialog() { - this.dialogVisible = false + this.dialogVisible = false; this.codeForm = { - repassword: '', password: '' - } + repassword: "", + password: "", + }; }, handleSelectionChange(val) { this.multipleSelection = val; }, setTransLeft() { - if (this.rightChecked == null) return - this.cities.push(this.rightChecked) + if (this.rightChecked == null) return; + this.cities.push(this.rightChecked); this.citiyData.forEach((value, index, array) => { if (value.label == this.rightChecked.label) { - array.splice(index, 1) + array.splice(index, 1); } }); this.checkedLeftflag = null; - this.rightChecked = null - + this.rightChecked = null; }, setTransRight() { - if (this.leftChecked == null) return - this.citiyData.push(this.leftChecked) + if (this.leftChecked == null) return; + this.citiyData.push(this.leftChecked); this.cities.forEach((value, index, array) => { if (value.label == this.leftChecked.label) { - array.splice(index, 1) + array.splice(index, 1); } }); this.checkedRightflag = null; - this.leftChecked = null + this.leftChecked = null; }, checkLeft(res) { this.checkedLeftflag = res.id; @@ -503,10 +467,9 @@ this.rightChecked = res; }, selectChange(res) { - this.changeSelect2(res) + this.changeSelect2(res); }, selectChange1(res) { - this.analyGid = res; }, changeSelect2(res) { @@ -514,7 +477,7 @@ var value = this.featureLayer; for (var i in value) { if (value[i].pipeName == res) { - this.options2.push(value[i]) + this.options2.push(value[i]); } } this.ruleFrom.value2 = this.options2[0].segName; @@ -524,35 +487,40 @@ this.tableData = []; this.listData = []; - this.cities = [{ - id: 1, - label: '閾佽矾(dlg_25w_lrrl)', - tabs: 'dlg_25w_lrrl', - tabdesc: '閾佽矾', - table: 'bd.dlg_25w_lrrl', - checked: false, - }, { - id: 2, - label: '鍏矾(dlg_25w_lrdl)', - tabs: 'dlg_25w_lrdl', - tabdesc: '鍏矾', - table: 'bd.dlg_25w_lrdl', - checked: false, - }, { - id: 3, - label: '姘寸郴绾�(dlg_25w_hydl)', - tabs: 'dlg_25w_hydl', - tabdesc: '姘寸郴绾�', - table: 'bd.dlg_25w_hydl', - checked: false, - }, { - id: 4, - label: '姘寸郴闈�(dlg_25w_hyda)', - tabs: 'dlg_25w_hyda', - tabdesc: '姘寸郴闈�', - table: 'bd.dlg_25w_hyda', - checked: false, - }]; + this.cities = [ + { + id: 1, + label: "閾佽矾(dlg_25w_lrrl)", + tabs: "dlg_25w_lrrl", + tabdesc: "閾佽矾", + table: "bd.dlg_25w_lrrl", + checked: false, + }, + { + id: 2, + label: "鍏矾(dlg_25w_lrdl)", + tabs: "dlg_25w_lrdl", + tabdesc: "鍏矾", + table: "bd.dlg_25w_lrdl", + checked: false, + }, + { + id: 3, + label: "姘寸郴绾�(dlg_25w_hydl)", + tabs: "dlg_25w_hydl", + tabdesc: "姘寸郴绾�", + table: "bd.dlg_25w_hydl", + checked: false, + }, + { + id: 4, + label: "姘寸郴闈�(dlg_25w_hyda)", + tabs: "dlg_25w_hyda", + tabdesc: "姘寸郴闈�", + table: "bd.dlg_25w_hyda", + checked: false, + }, + ]; this.citiyData = []; this.getAllData(); this.listflag = null; @@ -561,40 +529,40 @@ this.pageData = { pageIndex: 1, pageSize: 10, - pageCount: 0 - } + pageCount: 0, + }; }, async setAnalysis() { if (this.citiyData.length == 0) { - this.$message.error('璇烽�夋嫨瑕佸垎鏋愮殑鍥惧眰!'); + this.$message.error("璇烽�夋嫨瑕佸垎鏋愮殑鍥惧眰!"); } var std = []; var listTable = []; for (var i in this.citiyData) { - std.push(this.citiyData[i].table) - listTable.push(this.citiyData[i]) + std.push(this.citiyData[i].table); + listTable.push(this.citiyData[i]); } this.listData = listTable; - this.listflag = this.listData[0].id + this.listflag = this.listData[0].id; var obj = { gid: this.analyGid, - tabs: std - } + tabs: std, + }; const data = await pipeline_selectPipeAnalysis(obj); if (data.code != 200) { - this.$message.error('鍒楄〃璋冪敤澶辫触'); + this.$message.error("鍒楄〃璋冪敤澶辫触"); } this.featureData = data.result; - this.featurTable = this.featureData[this.listData[0].table] + this.featurTable = this.featureData[this.listData[0].table]; this.pageData.pageCount = this.featurTable.length; this.pageData.pageIndex = 1; this.pageData.pageSize = 10; this.changePageData(); }, setlistChange(res) { - this.listflag = res.id - this.featurTable = this.featureData[res.table] + this.listflag = res.id; + this.featurTable = this.featureData[res.table]; this.pageData.pageCount = this.featurTable.length; this.pageData.pageIndex = 1; this.pageData.pageSize = 10; @@ -615,10 +583,9 @@ this.changePageData(); }, async getAllData() { - const data = await pipelines_selectSegNames(); if (data.code != 200) { - this.$message.error('鍒楄〃璋冪敤澶辫触'); + this.$message.error("鍒楄〃璋冪敤澶辫触"); } var std = []; var str = []; @@ -626,50 +593,54 @@ for (var i in result) { if (std.indexOf(result[i].pipeName) == -1) { std.push(result[i].pipeName); - str.push(result[i]) + str.push(result[i]); } } this.featureLayer = data.result; this.options1 = str; this.ruleFrom.value1 = this.options1[0].pipeName; - this.changeSelect2(this.ruleFrom.value1) + this.changeSelect2(this.ruleFrom.value1); }, }, mounted() { - - this.cities = [{ - id: 1, - label: '閾佽矾(dlg_25w_lrrl)', - tabs: 'dlg_25w_lrrl', - tabdesc: '閾佽矾', - table: 'bd.dlg_25w_lrrl', - checked: false, - }, { - id: 2, - label: '鍏矾(dlg_25w_lrdl)', - tabs: 'dlg_25w_lrdl', - tabdesc: '鍏矾', - table: 'bd.dlg_25w_lrdl', - checked: false, - }, { - id: 3, - label: '姘寸郴绾�(dlg_25w_hydl)', - tabs: 'dlg_25w_hydl', - tabdesc: '姘寸郴绾�', - table: 'bd.dlg_25w_hydl', - checked: false, - }, { - id: 4, - label: '姘寸郴闈�(dlg_25w_hyda)', - tabs: 'dlg_25w_hyda', - tabdesc: '姘寸郴闈�', - table: 'bd.dlg_25w_hyda', - checked: false, - }]; + this.cities = [ + { + id: 1, + label: "閾佽矾(dlg_25w_lrrl)", + tabs: "dlg_25w_lrrl", + tabdesc: "閾佽矾", + table: "bd.dlg_25w_lrrl", + checked: false, + }, + { + id: 2, + label: "鍏矾(dlg_25w_lrdl)", + tabs: "dlg_25w_lrdl", + tabdesc: "鍏矾", + table: "bd.dlg_25w_lrdl", + checked: false, + }, + { + id: 3, + label: "姘寸郴绾�(dlg_25w_hydl)", + tabs: "dlg_25w_hydl", + tabdesc: "姘寸郴绾�", + table: "bd.dlg_25w_hydl", + checked: false, + }, + { + id: 4, + label: "姘寸郴闈�(dlg_25w_hyda)", + tabs: "dlg_25w_hyda", + tabdesc: "姘寸郴闈�", + table: "bd.dlg_25w_hyda", + checked: false, + }, + ]; this.getAllData(); this.signGetPublicKey(); - } -} + }, +}; </script> <style scoped lang="less"> @@ -698,8 +669,6 @@ border-radius: 5px; overflow-y: auto; } - - } .transInfo { @@ -736,7 +705,7 @@ .checkhover { color: #409eff; } - + .country-group { display: flex; justify-content: center; @@ -745,7 +714,5 @@ margin: 4px 0; } } - - } -</style> \ No newline at end of file +</style> diff --git a/src/views/datamanage/metadataManage.vue b/src/views/datamanage/metadataManage.vue index 2e2b566..fb0f1bb 100644 --- a/src/views/datamanage/metadataManage.vue +++ b/src/views/datamanage/metadataManage.vue @@ -204,6 +204,7 @@ <template slot-scope="scope"> <span v-if="scope.row.ismeta > 0"> <el-link + style="color: #409eff" title="婧愭暟鎹煡璇�" @click="setQueryMetaData(scope.row)" target="_blank" -- Gitblit v1.9.3