| | |
| | | .box_divm { |
| | | background-color: rgba(244, 248, 255, 0.85) !important; |
| | | } |
| | | |
| | | .subpage_Div { |
| | | border: 1px solid #dcdfe6; |
| | | } |
| | |
| | | .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; |
| | | } |
| | |
| | | const en = { |
| | | common: { |
| | | bak:'Bak', |
| | | bak: 'Bak', |
| | | domCode: 'DomCode', |
| | | confirm: 'confirm', |
| | | choose: 'Please choose', |
| | |
| | | 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: { |
| | |
| | | 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', |
| | |
| | | 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', |
| | |
| | | careatetime: 'Date of application', |
| | | ReApply: 'Re apply', |
| | | details: 'details', |
| | | ApplicationCancel: "Application Cancel", |
| | | ApplicationCancel: "withdraw", |
| | | }, |
| | | loglog: { |
| | | serialnumber: 'Serial Number', |
| | |
| | | lineNuber: '行数', |
| | | pleaseInputPassworld: '请输入密码', |
| | | passworld: '密码', |
| | | language: "English" |
| | | language: "English", |
| | | title: '标题' |
| | | }, |
| | | dataManage: { |
| | | dataManage: '数据管理', |
| | |
| | | dataRetrieval: '数据检索', |
| | | dataDownload: '数据下载', |
| | | projectManage: '项目管理', |
| | | dataStatistics:'数据统计', |
| | | dataStaticObj:{ |
| | | type1:'一级模块', |
| | | type2:'二级模块', |
| | | type3:'统计数据', |
| | | dataStatistics: '数据统计', |
| | | dataStaticObj: { |
| | | type1: '服务名称', |
| | | type2: '访问次数', |
| | | type3: '单位名称', |
| | | type4: '数据量', |
| | | type5: '菜单名称', |
| | | type7: '访问次数' |
| | | }, |
| | | projectObj: { |
| | | projname: '项目名称', |
| | |
| | | careatetime: '申请日期', |
| | | ReApply: '重新申请', |
| | | details: '详情', |
| | | ApplicationCancel: "申请取消", |
| | | ApplicationCancel: "取消申请", |
| | | }, |
| | | downlog: { |
| | | type1: 'Shp文件', |
| | |
| | | //初始化查询阈值表 |
| | | 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(); |
| | |
| | | <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> |
| | |
| | | <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" |
| | |
| | | ></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)" |
| | |
| | | ></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"> |
| | |
| | | </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"> |
| | |
| | | :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" |
| | |
| | | :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" |
| | |
| | | :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> |
| | |
| | | </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: "", |
| | |
| | | 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, |
| | |
| | | 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({ |
| | | // //跳转视角 |
| | |
| | | // }) |
| | | 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( |
| | |
| | | // ); |
| | | // } |
| | | |
| | | 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; |
| | |
| | | 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) { |
| | |
| | | }, |
| | | |
| | | 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) { |
| | |
| | | |
| | | 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 |
| | |
| | | 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, |
| | |
| | | }, |
| | | 0, |
| | | "巡检点" |
| | | ) |
| | | ); |
| | | |
| | | sgworld.Navigate.jumpTo({ |
| | | //跳转视角 |
| | |
| | | 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=' + |
| | |
| | | // }, |
| | | // }); |
| | | } 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( |
| | |
| | | }, |
| | | 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( |
| | |
| | | }, |
| | | 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] }); |
| | | } |
| | | } |
| | | } |
| | |
| | | 1, |
| | | 0, |
| | | "线" |
| | | ) |
| | | sgworld.Navigate.flyToObj(this.linePath) |
| | | ); |
| | | sgworld.Navigate.flyToObj(this.linePath); |
| | | } else { |
| | | return |
| | | return; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | |
| | | <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> |
| | |
| | | <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"> |
| | |
| | | <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" |
| | |
| | | <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> |
| | |
| | | <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" /> |
| | |
| | | </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) { |
| | |
| | | } |
| | | 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++) { |
| | |
| | | } |
| | | }, |
| | | // 取消鼠标监听事件 菜单栏 |
| | | foo () { |
| | | foo() { |
| | | this.menuVisible = false; |
| | | // 要及时关掉监听,不关掉的是一个坑,不信你试试,虽然前台显示的时候没有啥毛病,加一个alert你就知道了 |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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) { |
| | | // 删除原先的node |
| | | this.$refs.tree.remove(node.data) |
| | | this.$refs.tree.remove(node.data); |
| | | // 拿到copy的node |
| | | // nodeData = CircularJSON.parse(window.sessionStorage.getItem('menuNode')) |
| | | // // 复制该node到指定位置(参数:1. 要增加的节点的 data 2. 要增加的节点的后一个节点的 data、key 或者 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、key 或者 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; |
| | |
| | | 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) { |
| | |
| | | } |
| | | }, |
| | | 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(); |
| | |
| | | styles: "", |
| | | }, |
| | | tileWidth: 512, |
| | | tileHeight: 512 |
| | | tileHeight: 512, |
| | | }); |
| | | layerWMS.name = res.label; |
| | | //透明度 |
| | |
| | | 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, |
| | | }, |
| | | }), |
| | |
| | | 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, |
| | |
| | | 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({ |
| | |
| | | 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; |
| | |
| | | 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, |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | 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("图层列表查询失败"); |
| | |
| | | type: data.result[i].type, |
| | | isEdit: false, |
| | | children: [], |
| | | }) |
| | | }); |
| | | } else if (data.result[i].type == 2) { |
| | | if (data.result[i].url != null) { |
| | | var layer_entity = { |
| | |
| | | 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) { |
| | |
| | | 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); |
| | | } |
| | |
| | | } |
| | | } |
| | | 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; |
| | |
| | | this.treeData = this.$store.state.treeData; |
| | | this.$refs.tree.setCheckedKeys(this.$store.state.checkedKeys); |
| | | } |
| | | |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | </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 { |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | }, |
| | | }, |
| | | 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"; |
| | | }); |
| | | } |
| | | }, |
| | |
| | | // 关闭弹窗 |
| | | 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"); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | 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: 微软雅黑; |
| | |
| | | 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'" |
| | |
| | | <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" |
| | |
| | | </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"> |
| | |
| | | <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"> |
| | |
| | | <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" |
| | |
| | | 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" |
| | |
| | | ></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" |
| | |
| | | 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" |
| | |
| | | ></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> |
| | |
| | | </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(); |
| | | } |
| | |
| | | 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: [], |
| | |
| | | pageData: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | pageCount: 0 |
| | | pageCount: 0, |
| | | }, |
| | | multipleSelection: [], |
| | | featurTable: null, |
| | | featureLayer: [], |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | | spaceLocation(index, row) { |
| | |
| | | |
| | | 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 = []; |
| | |
| | | } |
| | | }, |
| | | 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(); |
| | | |
| | |
| | | // 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; |
| | |
| | | this.rightChecked = res; |
| | | }, |
| | | selectChange(res) { |
| | | this.changeSelect2(res) |
| | | this.changeSelect2(res); |
| | | }, |
| | | selectChange1(res) { |
| | | |
| | | this.analyGid = res; |
| | | }, |
| | | changeSelect2(res) { |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | this.changePageData(); |
| | | }, |
| | | async getAllData() { |
| | | |
| | | const data = await pipelines_selectSegNames(); |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | this.$message.error("列表调用失败"); |
| | | } |
| | | var std = []; |
| | | var str = []; |
| | |
| | | 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"> |
| | |
| | | border-radius: 5px; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | .transInfo { |
| | |
| | | .checkhover { |
| | | color: #409eff; |
| | | } |
| | | |
| | | |
| | | .country-group { |
| | | display: flex; |
| | | justify-content: center; |
| | |
| | | margin: 4px 0; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.ismeta > 0"> |
| | | <el-link |
| | | style="color: #409eff" |
| | | title="源数据查询" |
| | | @click="setQueryMetaData(scope.row)" |
| | | target="_blank" |