From 50f52beb0ed100105166f62027cd0b15e6b596dc Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期六, 12 十一月 2022 15:02:01 +0800 Subject: [PATCH] 重新 --- src/views/datamanage/metadataManage.vue | 6 src/views/Archive/index.vue | 435 +++++-- src/views/Synthesis/measurement.vue | 1 src/components/MapView/mapExportLayer.vue | 26 src/components/mapsdk.vue | 647 +++++----- src/views/maintenance/mochaitmo.vue | 14 src/views/Synthesis/plotting.vue | 326 ++--- src/api/api.js | 98 public/config/config.js | 2 src/views/userManage/userInfoManage.vue | 1 src/views/maintenance/menuSettings.vue | 4 src/components/navMenu.vue | 206 +- src/views/exportMap/index.vue | 527 ++++++++ src/JS/drag.js | 28 src/views/Synthesis/coverage.vue | 11 public/index.html | 8 src/components/login.vue | 40 src/components/MapView/mapMenuPop.vue | 44 src/router/index.js | 20 src/components/MapView/mapExportApply.vue | 7 src/views/datamanage/SpatialData.vue | 708 +++++------ src/assets/lang/zh.js | 14 src/views/Synthesis/index.vue | 247 --- src/main.js | 1 src/components/MapView/mapMenuTop.vue | 1 src/components/MapView/mapExportBox.vue | 57 src/assets/lang/en.js | 13 src/views/Home.vue | 41 src/components/MapView/mapSpacePop.vue | 8 29 files changed, 2,053 insertions(+), 1,488 deletions(-) diff --git a/public/config/config.js b/public/config/config.js index 04a5c52..5dbf376 100644 --- a/public/config/config.js +++ b/public/config/config.js @@ -16,7 +16,7 @@ window.sceneConfig = { // sdk璁稿彲 licenseServer: 'http://192.168.20.39/LFServer', - // licenseServer: 'http://192.168.20.55:9055', + // licenseServer: 'http://192.168.20.39:9055', // 鏈嶅姟鍦板潃 baseURL: 'http://183.162.245.49:8888/', diff --git a/public/index.html b/public/index.html index ff33c66..4833245 100644 --- a/public/index.html +++ b/public/index.html @@ -7,10 +7,6 @@ <meta name="viewport" content="width=device-width,initial-scale=1.0"> <title> </title> - - <link rel="stylesheet" href="./SmartEarthSDK/Workers/css/smartearth.css"> - <link rel="stylesheet" href="./SmartEarthSDK/Workers/layui/css/layui.css"> - <script src="./SmartEarthSDK/Workers/polyfill.min.js"></script> <script src="./SmartEarthSDK/Cesium/Cesium.js"></script> <script src="./SmartEarthSDK/SmartEarth.min.js"></script> @@ -18,12 +14,10 @@ <script src="./config/config.js"></script> <script src="./config/rsa.min.js"></script> <script src="./config/rollups.js"></script> - <style> .esriControlsBR { display: none; } - .ol-overlaycontainer-stopevent { display: none; } @@ -31,8 +25,6 @@ </head> <body> - - <div id="app"></div> </body> diff --git a/src/JS/drag.js b/src/JS/drag.js new file mode 100644 index 0000000..a3129ab --- /dev/null +++ b/src/JS/drag.js @@ -0,0 +1,28 @@ +import Vue from 'vue'; +// 浣跨敤Vue.directive()瀹氫箟涓�涓叏灞�鎸囦护 +// 1.鍙傛暟涓�锛氭寚浠ょ殑鍚嶇О锛屽畾涔夋椂鎸囦护鍓嶉潰涓嶉渶瑕佸啓v- +// 2.鍙傛暟浜岋細鏄竴涓璞★紝璇ュ璞′腑鏈夌浉鍏崇殑鎿嶄綔鍑芥暟 +// 3.鍦ㄨ皟鐢ㄧ殑鏃跺�欏繀椤诲啓v- +const drag = Vue.directive('drag', { + // 1.鎸囦护缁戝畾鍒板厓绱犱笂鍥炵珛鍒绘墽琛宐ind鍑芥暟锛屽彧鎵ц涓�娆� + // 2.姣忎釜鍑芥暟涓涓�涓弬鏁版案杩滄槸el锛岃〃绀虹粦瀹氭寚浠ょ殑鍏冪礌锛宔l鍙傛暟鏄師鐢焜s瀵硅薄 + // 3.閫氳繃el.focus()鏄棤娉曡幏鍙栫劍鐐圭殑锛屽洜涓哄彧鏈夋彃鍏OM鍚庢墠鐢熸晥 + bind: function (el) {}, + // inserted琛ㄧず涓�涓厓绱狅紝鎻掑叆鍒癉OM涓細鎵цinserted鍑芥暟锛屽彧瑙﹀彂涓�娆� + inserted: function (el) { + el.onmousedown = function (e) { + var disx = e.pageX - el.offsetLeft; + var disy = e.pageY - el.offsetTop; + document.onmousemove = function (e) { + el.style.left = e.pageX - disx + 'px'; + el.style.top = e.pageY - disy + 'px'; + }; + document.onmouseup = function () { + document.onmousemove = document.onmouseup = null; + }; + }; + }, + // 褰揤Node鏇存柊鐨勬椂鍊欎細鎵цupdated锛屽彲浠ヨЕ鍙戝娆� + updated: function (el) {}, +}); +export default drag; diff --git a/src/api/api.js b/src/api/api.js index f288228..f6bf4ad 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -198,10 +198,6 @@ export function queryMenuTree() { return request.get('/perms/selectMenus'); } -//璇锋眰缂栬緫鑿滃崟鏍忔暟鎹� -export function queryMenuAll() { - return request.get('/menu/selectMenuAll'); -} //鑿滃崟閫掑綊鏌ヨ鏁版嵁 export function selectMenuRecursive(params) { return request.get('/menu/selectMenuRecursive', { params: params }); @@ -444,28 +440,65 @@ return request.get('/inquiry/selectWktById', { params: params }); } //鏁版嵁绠$悊=>鏁版嵁妫�绱�=>鏌ヨ瀛楁淇℃伅 -export function inquiry_selectFields(params) { - return request.get('/inquiry/selectFields', { params: params }); +export function dataQuery_selectFields(params) { + return request.get('/dataQuery/selectFields', { params: params }); } //鏁版嵁绠$悊=>鏁版嵁妫�绱�=>鏌ヨ鍊煎煙淇℃伅 -export function inquiry_selectDomains(params) { - return request.get('/inquiry/selectDomains', { params: params }); +export function dataQuery_selectDomains(params) { + return request.get('/dataQuery/selectDomains', { params: params }); +} +//鏁版嵁绠$悊=>鏁版嵁妫�绱� =>鍒嗛〉鏌ヨ +export function dataQuery_selectByPage(params) { + return request.get('/dataQuery/selectByPage', { params: params }); +} +//鏁版嵁绠$悊=>鏁版嵁妫�绱�=>鏌ヨ鎵�鏈夎〃 +export function dataQuery_selectTabs(params) { + return request.get('/dataQuery/selectTabs', { params: params }); } //缁煎悎灞曠ず=>鍒楄〃鏌ヨ=>鏌ヨ鎵�鏈夎〃 export function inquiry_SelectTabs(params) { return request.get('/inquiry/selectTabs', { params: params }); } +//缁煎悎灞曠ず=>鍒楄〃鏌ヨ=>鏌ヨ瀛楁淇℃伅 +export function inquiry_selectFields(params) { + return request.get('/inquiry/selectFields', { params: params }); +} +//缁煎悎灞曠ず=>鍒楄〃鏌ヨ=>鏌ヨ鍊煎煙淇℃伅 +export function inquiry_selectDomains(params) { + return request.get('/inquiry/selectDomains', { params: params }); +} +//缁煎悎灞曠ず=>鍒楄〃鏌ヨ=>鍒嗛〉鏌ヨ +export function inquiry_selectByPage(params) { + return request.get('/inquiry/selectByPage', { params: params }); +} +//缁煎悎灞曠ず=>鍒楄〃鏌ヨ=>鏍规嵁ID鏌ヨWKT +export function inquiry_selectWktById(params) { + return request.get('/inquiry/selectWktById', { params: params }); +} + +//璧勬枡棣�=>鍒嗛〉鏌ヨ +export function dataLib_selectByPage(params) { + return request.get('/dataLib/selectByPage', { params: params }); +} +//璧勬枡棣�=>鏌ヨ瀛楁淇℃伅 +export function dataLib_selectFields(params) { + return request.get('/dataLib/selectFields', { params: params }); +} +//璧勬枡棣�=>鏌ヨ闃堝�� +export function dataLib_selectDomains(params) { + return request.get('/dataLib/selectDomains', { params: params }); +} //璇锋眰绔欏満鐐瑰唴瀹� export function querySitePoint(size, index, name) { return service.get( '/LFServer/SitePoint/Query?pageSize=' + - size + - '&pageIndex=' + - (index - 1) + - '&name=' + - name + size + + '&pageIndex=' + + (index - 1) + + '&name=' + + name ); } //璇锋眰绔欏満鐐规暟閲� @@ -476,11 +509,11 @@ export function queryStationSeries(size, index, name) { return service.get( '/LFServer/StationSeries/Query?pageSize=' + - size + - '&pageIndex=' + - (index - 1) + - '&name=' + - name + size + + '&pageIndex=' + + (index - 1) + + '&name=' + + name ); } //璇锋眰绠¢亾涓績绾挎暟閲� @@ -492,11 +525,11 @@ export function queryMarker(size, index, name) { return service.get( '/LFServer/Marker/Query?pageSize=' + - size + - '&pageIndex=' + - (index - 1) + - '&name=' + - name + size + + '&pageIndex=' + + (index - 1) + + '&name=' + + name ); } //璇锋眰鏍囨々鏁伴噺 @@ -556,22 +589,3 @@ export function getPerms() { return request.get('perms/selectPermsEntity'); } -// 鏌ヨ鍊煎煙琛ㄧ粨鏋勬爲 -export function getDomainTabs() { - return request.get('domain/selectTabs'); -} -//鍒嗛〉鏌ヨ -export function getSingleTab(params) { - return request.get('domain/selectByPageAndCount', { params: params }); -} -//鏇存柊鍊煎煙鏁版嵁 -export function updateDomain(params) { - return request.post('domain/update', params); -} -export function deleteDomain(params) { - return request.get('domain/deletes', { params: params }); -} -//鎻掑叆鍊煎煙鏁版嵁 -export function insertDomain(params) { - return request.post('domain/insert', params); -} \ No newline at end of file diff --git a/src/assets/lang/en.js b/src/assets/lang/en.js index 81842c5..b446fea 100644 --- a/src/assets/lang/en.js +++ b/src/assets/lang/en.js @@ -78,17 +78,6 @@ modifySuccessfully: 'modify successfully', tipsUp: 'Are you sure to save the changes?', }, - domainManage: { - index:'index', - bak: "bak", - bsm: "bsm", - codeDesc: "codeDesc", - domCode: "domCode", - domDesc: "domDesc", - domName: "domName", - level: "level", - orderid: "orderid", - }, styleManage: 'Style Manage', styleObj: { index: 'Index', @@ -361,8 +350,6 @@ flatterrain: 'Flat Terrain', terrainexcavation: 'Terrain Excavation', removepaint: 'Remove Paint', - openFile: 'open File', - saveFile: 'save File', synthobj: { m1: 'Horizontal distance', m2: 'Spatial distance', diff --git a/src/assets/lang/zh.js b/src/assets/lang/zh.js index 2c083b6..1cb3596 100644 --- a/src/assets/lang/zh.js +++ b/src/assets/lang/zh.js @@ -78,18 +78,6 @@ modifySuccessfully: '淇敼鎴愬姛', tipsUp: '鏄惁纭畾淇濆瓨淇敼鍐呭?', }, - domainManage: { - index: '搴忓彿', - bak: "澶囨敞", - bsm: "鏍囪瘑鐮�", - codeDesc: "缂栫爜鎻忚堪", - domCode: "缂栫爜", - domDesc: "鍊煎煙琛ㄦ弿杩�", - domName: "鍊煎煙鍚嶇О", - level: "灞傜骇", - orderid: "搴忓彿", - - }, styleManage: '鏍峰紡绠$悊', styleObj: { index: '搴忓彿', @@ -360,8 +348,6 @@ flatterrain: '鍦板舰骞虫暣', terrainexcavation: '鍦板舰寮�鎸�', removepaint: '娓呴櫎缁樺埗', - openFile: '鎵撳紑', - saveFile: '淇濆瓨', synthobj: { m1: '姘村钩璺濈', m2: '绌洪棿璺濈', diff --git a/src/components/MapView/mapExportApply.vue b/src/components/MapView/mapExportApply.vue new file mode 100644 index 0000000..60265f6 --- /dev/null +++ b/src/components/MapView/mapExportApply.vue @@ -0,0 +1,7 @@ +<template></template> + +<script> +export default {}; +</script> + +<style></style> diff --git a/src/components/MapView/mapExportBox.vue b/src/components/MapView/mapExportBox.vue new file mode 100644 index 0000000..6a8f2dc --- /dev/null +++ b/src/components/MapView/mapExportBox.vue @@ -0,0 +1,57 @@ +<template> + <div class="exportBox"> + <map-layer-info ref="mapLayerInfo" /> + </div> +</template> + +<script> +import mapLayerInfo from '../../views/Tools/mapinfo.vue'; +export default { + components: { + mapLayerInfo, + }, + data() { + return { + formInline: {}, + options: [ + { + value: '1:100涓囧浘骞�', + label: '1:100涓囧浘骞�', + }, + { + value: '1:500涓囧浘骞�', + label: '1:500涓囧浘骞�', + }, + { + value: '1:1000涓囧浘骞�', + label: '1:1000涓囧浘骞�', + }, + { + value: '1:1500涓囧浘骞�', + label: '1:1500涓囧浘骞�', + }, + ], + value: '1:100涓囧浘骞�', + }; + }, + mounted() {}, + methods: { + showExport(res) { + var value = { name: 'exportLayer', id: res }; + this.$bus.$emit('mapChangeBox', value); + }, + }, +}; +</script> + +<style lang="less"> +.exportBox { + width: 100%; + height: 100%; + position: relative; + background: rgba(0, 0, 0, 0.5); + margin: 0; + padding: 0; + padding: 1%; +} +</style> diff --git a/src/components/MapView/mapExportLayer.vue b/src/components/MapView/mapExportLayer.vue new file mode 100644 index 0000000..8f6f4eb --- /dev/null +++ b/src/components/MapView/mapExportLayer.vue @@ -0,0 +1,26 @@ +<template> + <div class="exportLayerBox"></div> +</template> + +<script> +export default { + data() { + return {}; + }, + methods: { + changeRowType() { + this.rowtype = !this.rowtype; + }, + }, +}; +</script> + +<style lang="less"> +.exportLayerBox { + width: 100%; + height: 100%; + border: 1px solid gray; + overflow: hidden; + margin: 0; +} +</style> diff --git a/src/components/MapView/mapMenuPop.vue b/src/components/MapView/mapMenuPop.vue index 63e3749..2b4d2f9 100644 --- a/src/components/MapView/mapMenuPop.vue +++ b/src/components/MapView/mapMenuPop.vue @@ -14,11 +14,19 @@ <div class="rightBox"> <div class="rightTitle"> <span>绠¢亾</span> - <el-link :underline="false" class="boxClose" + <el-link :underline="false" @click="closeMenPop" class="boxClose" ><i class="el-icon-close"></i> </el-link> + <el-link :underline="false" class="boxClose" + ><i class="el-icon-download"></i> + </el-link> </div> - <el-table :data="tableData" height="220"> + <el-table + :data="tableData" + @selection-change="handleSelectionChange" + height="240" + > + <el-table-column type="selection" width="55" /> <el-table-column align="center" type="index" label="搴忓彿" width="50" /> <el-table-column label="瀹氫綅" width="100" align="center"> <template slot-scope="scope"> @@ -39,16 +47,16 @@ ></el-table-column> </el-table> <div class="rightPage"> - <!-- <el-pagination + <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listPage.pageIndex" :page-sizes="[10, 20, 30, 40]" :page-size="listPage.pageSize" layout="total, sizes, prev, pager, next, jumper" - :total="listPage.pageCount" + :total="count" > - </el-pagination> --> + </el-pagination> </div> </div> </div> @@ -68,8 +76,8 @@ listPage: { pageSize: 10, pageIndex: 1, - pageCount: 0, }, + count: 0, attributeData: [], option: [], tableData: [], @@ -86,14 +94,33 @@ domainsLayer: [], optionx: [], imagePoint: null, + multipleSelection: [], }; }, methods: { + handleSelectionChange(val) { + this.multipleSelection = val; + }, + handleSizeChange(val) { + this.listdata.pageSize = val; + this.listdata.pageIndex = 1; + this.getTableData(); + }, + handleCurrentChange(val) { + this.listdata.pageIndex = val; + this.getTableData(); + }, + closeMenPop() { + sgworld.Creator.SimpleGraphic.clear(); + this.$store.state.mapPopBoolean = false; + this.$store.state.mapPopBoxFlag = null; + }, startTableMssage() { this.listdata.pageIndex = 1; this.listdata.pageSize = 10; this.listdata.name = null; this.option = []; + this.multipleSelection = []; }, setTableAll() { this.startTableMssage(); @@ -101,7 +128,6 @@ this.querylayer = this.$store.state.mapSpaceQueryLayer; this.option = this.$store.state.mapSpaceQueryLayer; this.listdata.name = this.option[0].entity; - this.getTableDateHidder(); }, async getTableDateHidder() { @@ -174,6 +200,7 @@ } }, setTableChange(res) { + this.multipleSelection = []; this.listdata.pageIndex = 1; this.listdata.pageSize = 10; this.listdata.name = res.entity; @@ -181,13 +208,12 @@ }, async getTableData() { this.tableData = []; - const data = await dataQuerySelectByPage(this.listdata); if (data.code != 200) { this.$message.error('鍒楄〃璋冪敤澶辫触'); } - debugger; var val_Data = data.result; + this.count = data.count; for (var i in val_Data) { var valste = val_Data[i]; for (var j in this.optionx) { diff --git a/src/components/MapView/mapMenuTop.vue b/src/components/MapView/mapMenuTop.vue index 33cfaa7..773148e 100644 --- a/src/components/MapView/mapMenuTop.vue +++ b/src/components/MapView/mapMenuTop.vue @@ -153,6 +153,7 @@ }, //鑾峰彇閫夋嫨鏍戠殑鑺傜偣 getCheckedNodes() { + this.treeChange = []; var valTree = this.$refs.tree.getCheckedNodes(); if (valTree.length == 0) return; diff --git a/src/components/MapView/mapSpacePop.vue b/src/components/MapView/mapSpacePop.vue index 610fdd7..e46e507 100644 --- a/src/components/MapView/mapSpacePop.vue +++ b/src/components/MapView/mapSpacePop.vue @@ -97,8 +97,8 @@ <script> import { - dataQuerySelectByPage, - dataQuerySelectWktById, + inquiry_selectByPage, + inquiry_selectWktById, inquiry_selectFields, inquiry_selectDomains, decr, @@ -289,7 +289,7 @@ ' ' + this.formInline.input; } - const data = await dataQuerySelectByPage(this.listdata); + const data = await inquiry_selectByPage(this.listdata); if (data.code != 200) { this.$message.error('鍒楄〃璋冪敤澶辫触'); } @@ -314,7 +314,7 @@ gid: row.gid, name: this.spaceLayer, }; - const data = await dataQuerySelectWktById(param); + const data = await inquiry_selectWktById(param); if (data.code != 200) { this.$message.error('鍒楄〃璋冪敤澶辫触'); } diff --git a/src/components/login.vue b/src/components/login.vue index eb56f17..2a63505 100644 --- a/src/components/login.vue +++ b/src/components/login.vue @@ -153,15 +153,15 @@ <script> // import { login } from '../utils/api' -import validCode from "./verificationCode.vue"; -import { mapActions } from "vuex"; +import validCode from './verificationCode.vue'; +import { mapActions } from 'vuex'; export default { components: { validCode }, data() { let validUserName = (rule, value, callback) => { if (!value) { - return callback(new Error("鐢ㄦ埛鍚嶄笉鑳戒负绌�")); + return callback(new Error('鐢ㄦ埛鍚嶄笉鑳戒负绌�')); } else { callback(); } @@ -169,7 +169,7 @@ let validPassword = (rule, value, callback) => { if (!value) { - return callback(new Error("瀵嗙爜涓嶈兘涓虹┖")); + return callback(new Error('瀵嗙爜涓嶈兘涓虹┖')); } else { callback(); } @@ -177,25 +177,25 @@ const checkValidCode = (rule, value, callback) => { if (!value) { - callback(new Error("璇疯緭鍏ラ獙璇佺爜")); + callback(new Error('璇疯緭鍏ラ獙璇佺爜')); } else if (value.toUpperCase() !== this.validCode.toUpperCase()) { - callback(new Error("楠岃瘉鐮佷笉姝g‘")); + callback(new Error('楠岃瘉鐮佷笉姝g‘')); } else { callback(); } }; return { - validCode: "", + validCode: '', loading: false, loginForm: { - uid: "admin", - pwd: "Admin@123", + uid: 'admin', + pwd: 'Admin@123', }, rules: { - uid: [{ validator: validUserName, trigger: "blur" }], - pwd: [{ validator: validPassword, trigger: "blur" }], - validCode: [{ validator: checkValidCode, trigger: "blur" }], + uid: [{ validator: validUserName, trigger: 'blur' }], + pwd: [{ validator: validPassword, trigger: 'blur' }], + validCode: [{ validator: checkValidCode, trigger: 'blur' }], }, }; }, @@ -204,7 +204,7 @@ }, methods: { // 鑾峰彇vuex涓瑼ctions閲岀殑鏂规硶 - ...mapActions(["login", "getpublickey"]), + ...mapActions(['login', 'getpublickey']), getCode(data) { console.log(data); this.validCode = data; //鍦╠ata涓畾涔変竴涓� validCode:'',鐢ㄦ潵璁板綍楠岃瘉鐮併�� @@ -214,20 +214,20 @@ if (valid) { this.loading = true; this.login(this.loginForm) - .then(response => { - this.$router.push("/") - + .then((response) => { + this.$router.push('/'); + this.loading = false; //璋冪敤褰曟帴鍙� }) - .catch(response => { + .catch((response) => { this.loading = false; }); //濡傛灉鐧诲綍澶辫触锛岄渶瑕佸埛鏂伴獙璇佺爜鐨� this.$refs.refresh.createdCode(); - this.validCode = ""; //娓呯┖楠岃瘉鐮佽緭鍏ユ鐨勫唴瀹� + this.validCode = ''; //娓呯┖楠岃瘉鐮佽緭鍏ユ鐨勫唴瀹� } else { - console.log("error submit!!"); + console.log('error submit!!'); return false; } }); @@ -238,7 +238,7 @@ </script> <!-- Add "scoped" attribute to limit CSS to this component only --> -<style scoped > +<style scoped> .container { width: 100%; height: 100%; diff --git a/src/components/mapsdk.vue b/src/components/mapsdk.vue index 682e776..3dfee35 100644 --- a/src/components/mapsdk.vue +++ b/src/components/mapsdk.vue @@ -1,170 +1,162 @@ <template> - <div class="mapBox"> - <div id="mapdiv"> - <div class="menu_Top" 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="menu_Popup" v-if="$store.state.mapPopBoolean"> - <map-menu-pop v-if="$store.state.mapPopBoxFlag == '1'" /> - <map-space-pop v-if="$store.state.mapPopBoxFlag == '2'" /> - </div> - <div class="bufferBox" v-if="showBufferBoxDialog"> - <el-card class="box-card"> - <div slot="header" class="clearfix"> - <span>缂撳啿鍖哄垎鏋�</span> - <div style="float: right; cursor: pointer"> - <i class="el-icon-close" @click="closeBufferBox(1)"></i> - </div> + <div id="mapdiv"> + <div class="menu_Top" 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="menu_Popup" v-if="$store.state.mapPopBoolean"> + <map-menu-pop v-if="$store.state.mapPopBoxFlag == '1'" /> + <map-space-pop v-if="$store.state.mapPopBoxFlag == '2'" /> + </div> + <div class="bufferBox" v-if="showBufferBoxDialog"> + <el-card class="box-card"> + <div slot="header" class="clearfix"> + <span>缂撳啿鍖哄垎鏋�</span> + <div style="float: right; cursor: pointer"> + <i class="el-icon-close" @click="closeBufferBox(1)"></i> </div> - <div class="box-body"> - <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-form-item> - </el-form> + </div> + <div class="box-body"> + <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-form-item> + </el-form> + </div> + </el-card> + </div> + <div class="coordLocalBox" v-if="showCoordLocalBoxDialog"> + <el-card class="box-card"> + <div slot="header" class="clearfix"> + <span>鍧愭爣瀹氫綅</span> + <div style="float: right; cursor: pointer"> + <i class="el-icon-close" @click="closeBufferBox(2)"></i> </div> - </el-card> - </div> - <div class="coordLocalBox" v-if="showCoordLocalBoxDialog"> - <el-card class="box-card"> - <div slot="header" class="clearfix"> - <span>鍧愭爣瀹氫綅</span> - <div style="float: right; cursor: pointer"> - <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-item label="缁忓害:"> + <el-input v-model="coordFrom.lon"></el-input> + </el-form-item> + <el-form-item label="绾害:"> + <el-input v-model="coordFrom.lat"></el-input> + </el-form-item> + <el-form-item label="楂樺害:"> + <el-input v-model="coordFrom.height"></el-input> + </el-form-item> + <el-form-item> + <el-button @click="setCoordLocal" type="info">瀹氫綅</el-button> + </el-form-item> + </el-form> + </div> + </el-card> + </div> + <div class="toponymicLocalBox" v-if="showToponymicLocalBoxDialog"> + <el-card class="box-card"> + <div slot="header" class="clearfix"> + <span>鍦板悕瀹氫綅</span> + <div style="float: right; cursor: pointer"> + <i class="el-icon-close" @click="closeBufferBox(3)"></i> </div> - <div class="box-body"> - <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-form-item label="绾害:"> - <el-input v-model="coordFrom.lat"></el-input> - </el-form-item> - <el-form-item label="楂樺害:"> - <el-input v-model="coordFrom.height"></el-input> - </el-form-item> - <el-form-item> - <el-button @click="setCoordLocal" type="info">瀹氫綅</el-button> - </el-form-item> - </el-form> + </div> + <div class="box-body"> + <el-form :model="comprehensive" :inline="true" label-width="50px"> + <el-form-item label="鍦板悕:"> + <el-input + style="width: 200px" + v-model="comprehensive.name" + ></el-input> + </el-form-item> + <el-form-item> + <el-button type="info">鏌ヨ</el-button> + </el-form-item> + </el-form> + <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="瀹氫綅"> + <template slot-scope="scope"> + <el-button + @click="handleLocation(scope.$index, scope.row)" + size="small" + icon="el-icon-place" + ></el-button> + </template> + </el-table-column> + <el-table-column prop="name" align="center" label="鍦板悕"> + </el-table-column> + </el-table> + <div style="margin-top: 10px" class="pagination_box"> + <el-pagination + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + :current-page="listData.pageIndex" + :page-sizes="[10, 20, 30, 40]" + :page-size="listData.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="count" + > + </el-pagination> </div> - </el-card> - </div> - <div class="toponymicLocalBox" v-if="showToponymicLocalBoxDialog"> - <el-card class="box-card"> - <div slot="header" class="clearfix"> - <span>鍦板悕瀹氫綅</span> - <div style="float: right; cursor: pointer"> - <i class="el-icon-close" @click="closeBufferBox(3)"></i> - </div> + </div> + </el-card> + </div> + <div class="pathAnalysisBox" v-if="showPathAnalysisBoxDialog"> + <el-card class="box-card"> + <div slot="header" class="clearfix"> + <span>璺緞鍒嗘瀽</span> + <div style="float: right; cursor: pointer"> + <i class="el-icon-close" @click="closeBufferBox(4)"></i> </div> - <div class="box-body"> - <el-form :model="comprehensive" :inline="true" label-width="50px"> - <el-form-item label="鍦板悕:"> - <el-input - style="width: 200px" - v-model="comprehensive.name" - ></el-input> - </el-form-item> - <el-form-item> - <el-button type="info">鏌ヨ</el-button> - </el-form-item> - </el-form> - <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="瀹氫綅"> - <template slot-scope="scope"> - <el-button - @click="handleLocation(scope.$index, scope.row)" - size="small" - icon="el-icon-place" - ></el-button> - </template> - </el-table-column> - <el-table-column prop="name" align="center" label="鍦板悕"> - </el-table-column> - </el-table> - <div style="margin-top: 10px" class="pagination_box"> - <el-pagination - @size-change="handleSizeChange" - @current-change="handleCurrentChange" - :current-page="listData.pageIndex" - :page-sizes="[10, 20, 30, 40]" - :page-size="listData.pageSize" - layout="total, sizes, prev, pager, next, jumper" - :total="count" + </div> + <div class="box-body"> + <el-form ref="form" :model="pathFrom" label-width="50px"> + <el-form-item label="缁忓害:"> + <el-input style="width: 300px" v-model="pathFrom.lon"></el-input> + <el-link + :underline="false" + @click="showMouseLeftClick(1)" + style="margin-left: 10px" + ><i style="color: white" class="el-icon-plus"></i + ></el-link> + </el-form-item> + <el-form-item label="绾害:"> + <el-input style="width: 300px" v-model="pathFrom.lat"></el-input> + <el-link + :underline="false" + @click="showMouseLeftClick(2)" + style="margin-left: 10px" + ><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-pagination> - </div> - </div> - </el-card> - </div> - <div class="pathAnalysisBox" v-if="showPathAnalysisBoxDialog"> - <el-card class="box-card"> - <div slot="header" class="clearfix"> - <span>璺緞鍒嗘瀽</span> - <div style="float: right; cursor: pointer"> - <i class="el-icon-close" @click="closeBufferBox(4)"></i> - </div> - </div> - <div class="box-body"> - <el-form ref="form" :model="pathFrom" label-width="50px"> - <el-form-item label="缁忓害:"> - <el-input - style="width: 300px" - v-model="pathFrom.lon" - ></el-input> - <el-link - :underline="false" - @click="showMouseLeftClick(1)" - style="margin-left: 10px" - ><i style="color: white" class="el-icon-plus"></i - ></el-link> - </el-form-item> - <el-form-item label="绾害:"> - <el-input - style="width: 300px" - v-model="pathFrom.lat" - ></el-input> - <el-link - :underline="false" - @click="showMouseLeftClick(2)" - style="margin-left: 10px" - ><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-form-item> - </el-form> - </div> - </el-card> - </div> + </el-form-item> + </el-form> + </div> + </el-card> + </div> + <div + @click="changeMenulayer" + class="center CenDiv" + :class="{ center1: centerFlag }" + > <div - @click="changeMenulayer" - class="center CenDiv" - :class="{ center1: centerFlag }" - > - <div - id="cenBg" - v-bind:class="{ active: isActive, menuLayer: isMenuLayer }" - ></div> - </div> + id="cenBg" + v-bind:class="{ active: isActive, menuLayer: isMenuLayer }" + ></div> </div> </div> </template> @@ -175,6 +167,7 @@ import mapMenuPop from './MapView/mapMenuPop.vue'; import mapSpaceTop from './MapView/mapSpaceTop.vue'; import mapSpacePop from './MapView/mapSpacePop.vue'; + import { select_Comprehensive_ByPageAndCount, select_Comprehensive_SelectWktById, @@ -403,24 +396,38 @@ }, //鏄剧ず寮圭獥 showChangeBox(res) { - if (res.name == 'Query') { - if (res.id == '6') { - } else if (res.id == '7') { - } else { - this.showBufferBoxDialog = true; - } - } else if (res.name == 'Coord') { - if (res.id == '1') { - this.showCoordLocalBoxDialog = true; - } else if (res.id == '2') { - this.showToponymicLocalBoxDialog = true; - this.getToponymicData(); - } - } else if (res.name == 'Analysis') { - if (res.id == '3') { - this.showPathAnalysisBoxDialog = true; - } + switch (res.name) { + case 'Query': + if (res.id == '6') { + } else if (res.id == '7') { + } else { + this.showBufferBoxDialog = true; + } + break; + case 'Coord': + if (res.id == '1') { + this.showCoordLocalBoxDialog = true; + } else if (res.id == '2') { + this.showToponymicLocalBoxDialog = true; + this.getToponymicData(); + } + break; + case 'Analysis': + if (res.id == '3') { + this.showPathAnalysisBoxDialog = true; + } + break; + case 'exportLayer': + if (res.id == 1) { + } else if (res.id == 2) { + this.changeMenulayer(); + } + break; } + // if (res.name == 'Query') { + // } else if (res.name == 'Coord') { + // } else if (res.name == 'Analysis') { + // } }, handleSizeChange(val) { this.listData.pageSize = val; @@ -731,127 +738,139 @@ </script> <style scoped lang="less"> -.mapBox { +// .mapBox { +// width: 100%; +// height: 100%; +// overflow: hidden; +// margin: 0; +// padding: 0; + +#mapdiv { width: 100%; height: 100%; overflow: hidden; margin: 0; padding: 0; + position: relative; - #mapdiv { - width: 100%; - height: 100%; - overflow: hidden; - margin: 0; - padding: 0; + .toponymicLocalBox { + width: 750px; + height: 450x; + z-index: 40; position: absolute; - - .toponymicLocalBox { - width: 750px; - height: 450x; - z-index: 40; - position: absolute; - right: 1%; - bottom: 1%; + right: 1%; + bottom: 1%; + } + .bufferBox { + width: 412px; + height: 230px; + z-index: 40; + position: absolute; + right: 1%; + bottom: 1%; + } + .coordLocalBox { + width: 350px; + height: 370px; + z-index: 40; + position: absolute; + right: 1%; + bottom: 1%; + } + .pathAnalysisBox { + width: 412px; + z-index: 40; + position: absolute; + right: 1%; + bottom: 1%; + } + .exportBoxLayer { + z-index: 40; + position: absolute; + top: 3%; + left: 20%; + } + .exportMenuLayer { + z-index: 40; + position: absolute; + top: 15%; + left: 2%; + width: 15%; + } + .box-body { + padding: 18px; + /deep/ .el-form-item__label { + color: white !important; } - .bufferBox { - width: 412px; - height: 230px; - z-index: 40; - position: absolute; - right: 1%; - bottom: 1%; - } - .coordLocalBox { - width: 350px; - height: 370px; - z-index: 40; - position: absolute; - right: 1%; - bottom: 1%; - } - .pathAnalysisBox { - width: 412px; - - z-index: 40; - position: absolute; - right: 1%; - bottom: 1%; - } - .box-body { - padding: 18px; - /deep/ .el-form-item__label { - color: white !important; - } - /deep/ .el-input__inner { - background: rgba(255, 255, 255, 0.2) !important; - color: white !important; - } - - /deep/.el-table, - .el-table__expanded-cell { - background-color: transparent; - color: white; - } - - /deep/ .el-table tr { - background-color: transparent !important; - } - /deep/ .el-table tbody tr:hover > td { - background-color: rgba(255, 255, 255, 0.2) !important; - } - /deep/.el-table鈥揺nable-row-transition .el-table__body td, - .el-table .cell { - background-color: transparent !important; - } - /deep/ .el-table th.el-table__cell { - background-color: transparent !important; - color: white; - } - /deep/.el-pager li { - background-color: transparent !important; - color: white; - } - /deep/ .btn-prev { - background-color: transparent !important; - } - /deep/ .btn-next { - background-color: transparent !important; - color: white !important; - } - /deep/ .el-pagination__total { - color: white; - } - /deep/ .el-pagination__jump { - color: white; - } + /deep/ .el-input__inner { + background: rgba(255, 255, 255, 0.2) !important; + color: white !important; } - .box-card { - background-color: rgba(0, 0, 0, 0.6); - border: 1px solid rgba(32, 160, 255, 0.6); + /deep/.el-table, + .el-table__expanded-cell { + background-color: transparent; color: white; } - .menu_Top { - background: rgba(0, 0, 0, 0.5); - width: 100%; - height: 6%; - padding: 1%; - position: absolute; - z-index: 40; - } - .menu_Popup { - background: rgba(0, 0, 0, 0.6); - width: 60%; - height: 45%; - left: 20%; - bottom: 5%; - position: absolute; - z-index: 40; + /deep/ .el-table tr { + background-color: transparent !important; + } + /deep/ .el-table tbody tr:hover > td { + background-color: rgba(255, 255, 255, 0.2) !important; + } + /deep/.el-table鈥揺nable-row-transition .el-table__body td, + .el-table .cell { + background-color: transparent !important; + } + /deep/ .el-table th.el-table__cell { + background-color: transparent !important; + color: white; + } + /deep/.el-pager li { + background-color: transparent !important; + color: white; + } + /deep/ .btn-prev { + background-color: transparent !important; + } + /deep/ .btn-next { + background-color: transparent !important; + color: white !important; + } + /deep/ .el-pagination__total { + color: white; + } + /deep/ .el-pagination__jump { + color: white; } } + + .box-card { + background-color: rgba(0, 0, 0, 0.6); + border: 1px solid rgba(32, 160, 255, 0.6); + color: white; + } + .menu_Top { + background: rgba(0, 0, 0, 0.5); + width: 100%; + height: 6%; + padding: 1%; + position: absolute; + z-index: 40; + } + .menu_Popup { + background: rgba(0, 0, 0, 0.6); + width: 60%; + height: 45%; + + left: 20%; + bottom: 5%; + position: absolute; + z-index: 40; + } } +// } // /deep/ // /deep/ .el-input__inner { @@ -896,23 +915,23 @@ // ::v-deep .el-pagination__jump { // color: white; // } -// .center { -// left: 1%; -// } -// .CenDiv { -// position: absolute; -// bottom: 1%; -// height: 40px; -// width: 60px; -// z-index: 101; -// display: flex; -// flex-direction: column; -// justify-content: space-between; -// box-shadow: 3px 3px 6px #666; -// border: 1px solid rgba(204, 204, 204, 0.76); -// border-radius: 5px; -// cursor: pointer; -// } +.center { + left: 1%; +} +.CenDiv { + position: absolute; + bottom: 1%; + height: 40px; + width: 60px; + z-index: 101; + display: flex; + flex-direction: column; + justify-content: space-between; + box-shadow: 3px 3px 6px #666; + border: 1px solid rgba(204, 204, 204, 0.76); + border-radius: 5px; + cursor: pointer; +} // .center1 { // right: 1%; // } @@ -930,22 +949,22 @@ // .CenDiv:hover { // border: 1px solid #409eff; // } -// .active { -// width: 100%; -// height: 100%; -// background: url('../assets/img/Layer/imgLayer2.png') no-repeat center; -// position: absolute; -// background-size: 100% 100%; -// border-radius: 5px; -// } -// .menuLayer { -// width: 100%; -// height: 100%; -// background: url('../assets/img/Layer/imgLayer1.png') no-repeat center; -// position: absolute; -// background-size: 100% 100%; -// border-radius: 5px; -// } +.active { + width: 100%; + height: 100%; + background: url('../assets/img/Layer/imgLayer2.png') no-repeat center; + position: absolute; + background-size: 100% 100%; + border-radius: 5px; +} +.menuLayer { + width: 100%; + height: 100%; + background: url('../assets/img/Layer/imgLayer1.png') no-repeat center; + position: absolute; + background-size: 100% 100%; + border-radius: 5px; +} // .menuSelect .el-input__inner { // background: rgba(255, 255, 255, 0.2) !important; diff --git a/src/components/navMenu.vue b/src/components/navMenu.vue index 800d365..ab90e09 100644 --- a/src/components/navMenu.vue +++ b/src/components/navMenu.vue @@ -1,16 +1,23 @@ <template> - <div class="topMenu"> - <div class="logo"> - <img src="../assets/img/www.terra-it.cn.png" alt="" /> - </div> - <div class="rightWrapper"> - <div class="menu"> - <ul> - <li v-for="item in menuList" :key="item.id"> - {{ item.cnName }} - </li> - </ul> + <div class="leftMenu"> + <div class="leftTopWrapper"> + <div class="logo"> + <img src="../assets/img/www.terra-it.cn.png" alt="" /> </div> + <div class="menu"> + <el-menu + active-text-color="#ffd04b" + class="el-menu-vertical-demo" + :default-active="activeIndex" + background-color="#586884" + text-color="#fff" + @select="handleselect" + > + <customElMenu :menuData="menuList"></customElMenu> + </el-menu> + </div> + </div> + <div class="leftBotWrapper"> <div class="userInfo"> <img src="../assets/img/user.png" alt="" /> <span>admin</span> @@ -18,18 +25,22 @@ <span @click="switchLang"> 鍒囨崲璇█</span> </div> + <div class="btnBox"> + <div><img src="../assets/img/leftBtn.png" alt="" /></div> + <div><img src="../assets/img/rightBtn.png" alt="" /></div> + </div> </div> </div> </template> <script> -import { logout } from "@/api/api"; -import { removeToken, getToken } from "@/utils/auth"; -import customElMenu from "../components/customElMenu.vue"; -import { queryMenuTree, getPerms } from "../api/api"; +import { logout } from '@/api/api'; +import { removeToken, getToken } from '@/utils/auth'; +import customElMenu from '../components/customElMenu.vue'; +import { queryMenuTree, getPerms } from '../api/api'; export default { - name: "navMenu", + name: 'navMenu', //import寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� components: { customElMenu, @@ -39,10 +50,10 @@ oriData: [], //鍘熷鏍戞暟鎹� dirData: [], //el鏍戞暟鎹� newData: [], //鎷栧姩鍚庢暟鎹� - lang: "zh", - activeIndex: "/", + lang: 'zh', + activeIndex: '/', menuList: [], - editTitle: "", + editTitle: '', showPopover: false, showEditInfoWrapper: false, showEdit: false, @@ -50,7 +61,7 @@ editCatalogue: false, editUnit: false, itemdetail: {}, - formLabelWidth: "70px", + formLabelWidth: '70px', }; }, mounted() { @@ -82,15 +93,14 @@ if (res.code == 200) { if (res.result.length != 0) { let menuLists = res.result.filter((value) => { - return value.pid == 1; + return value.type == 1; }); - // console.log(menuLists); - this.menuList = menuLists; + this.menuList = this.treeData(menuLists); } else { - alert("鏆傛棤鑿滃崟鏍忔暟鎹�"); + alert('鏆傛棤鑿滃崟鏍忔暟鎹�'); } } else { - console.log("鎺ュ彛鎶ラ敊"); + console.log('鎺ュ彛鎶ラ敊'); } }); }, @@ -101,93 +111,93 @@ return cloneData.filter((father) => { // 寰幆鎵�鏈夐」 let branchArr = cloneData.filter((child) => father.id == child.pid); // 瀵规瘮ID锛屽垎鍒笂涓嬬骇鑿滃崟锛屽苟杩斿洖鏁版嵁 - branchArr.length > 0 ? (father.children = branchArr) : ""; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊� + branchArr.length > 0 ? (father.children = branchArr) : ''; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊� // 灞炰簬鍚屼竴瀵硅薄闂锛屼緥濡傦細浠� a=b銆乧=1 锛岀劧鍚庡啀浠� b.c=c 锛� 閭d箞 a.c=b.c=c=1 锛涘悓鐞嗭紝鍚庣画浠� c.d=2 ,閭d箞 a.c.d 涔熸槸=2锛� // 鐢辨寰幆澶氭鍚庯紝灏辫兘褰㈡垚鐩稿簲鐨勬爲褰㈡暟鎹粨鏋� return father.pid == 1; // 杩斿洖涓�绾ц彍鍗� }); } else { - alert("鏆傛棤鑿滃崟鏍忔暟鎹�"); + alert('鏆傛棤鑿滃崟鏍忔暟鎹�'); } }, logOut() { - this.$confirm("纭鏄惁閫�鍑虹櫥褰�?", "鎻愮ず", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "warning", + this.$confirm('纭鏄惁閫�鍑虹櫥褰�?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning', }) .then(async () => { const data = await logout({ token: getToken() }); - // console.log(data); + console.log(data); if (data.code != 200) { - return this.$message.error("閫�鍑虹櫥褰曞け璐�"); + return this.$message.error('閫�鍑虹櫥褰曞け璐�'); } removeToken(); - this.$router.push("/login"); + this.$router.push('/login'); this.$message({ - message: "閫�鍑虹櫥褰曟垚鍔�", - type: "success", + message: '閫�鍑虹櫥褰曟垚鍔�', + type: 'success', }); }) .catch(() => { this.$message({ - type: "info", - message: "宸插彇娑�", + type: 'info', + message: '宸插彇娑�', }); }); }, switchLang() { //褰撳墠en - if (this.lang == "en") { + if (this.lang == 'en') { //璇█鎹㈡垚zh - this.lang = "zh"; + this.lang = 'zh'; //鑿滃崟鎹负zh - this.$store.commit("changeLang", "zh"); + this.$store.commit('changeLang', 'zh'); //i18鎹㈡垚zh this.$i18n.locale = this.lang; } //褰撳墠zh else { - this.lang = "en"; + this.lang = 'en'; this.$i18n.locale = this.lang; - this.$store.commit("changeLang", "en"); //浼犻�掔偣鍑荤殑鑺傜偣 + this.$store.commit('changeLang', 'en'); //浼犻�掔偣鍑荤殑鑺傜偣 } }, handleselect(index, indexPath, e) { - // console.log(e.$attrs.perms); - this.$store.commit("currentPerms", e.$attrs.perms.perms); + console.log(e.$attrs.perms); + this.$store.commit('currentPerms', e.$attrs.perms.perms); if (Window.ws != null) { Window.ws.close(); Window.ws.onclose = () => { - console.log("鏈嶅姟鍣ㄥ叧闂�"); + console.log('鏈嶅姟鍣ㄥ叧闂�'); }; Window.ws = null; } - if (index.indexOf("http") != -1) { - this.$router.push("/databaseMonitoring"); - this.$store.commit("getIframe", index); + if (index.indexOf('http') != -1) { + this.$router.push('/databaseMonitoring'); + this.$store.commit('getIframe', index); } else if (isNaN(Number(index))) { this.$router.push(index); } }, getUserPerms() { getPerms().then((res) => { - if (res.code == 200) this.$store.commit("getPermsEntity", res.result); + if (res.code == 200) this.$store.commit('getPermsEntity', res.result); }); }, }, watch: { $route() { let str = this.$route.path; - if (str[0] == "/") { + if (str[0] == '/') { this.activeIndex = str.slice(1); } }, }, created() { let str = this.$route.path; - if (str[0] == "/") { + if (str[0] == '/') { this.activeIndex = str.slice(1); } }, @@ -195,58 +205,66 @@ </script> <style lang="less" scoped> //@import url(); 寮曞叆鍏叡css绫� -.topMenu { +.leftMenu { + // width: 300px; + height: 99%; + // background-color: #bfa; +} +.leftTopWrapper { width: 100%; height: 100%; - background-image: linear-gradient(rgb(34, 33, 33), rgb(27, 31, 78)); - display: flex; - justify-content: space-between; - .logo { - width: 500px; - height: 100%; - position: relative; + // background-color: rgb(139, 0, 0); + width: 249px; + height: 52px; img { - width: 70%; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - margin: auto; + width: 100%; } } - .rightWrapper { - width: 70%; - height: 100%; - display: flex; - .menu { + .menu { + height: 90%; + margin-top: 22px; + overflow: auto; + // background-color: rgb(120, 121, 120); + .el-menu { height: 100%; - width: 80%; - background-color: rgb(120, 121, 120); - ul { - display: flex; - justify-content: space-around; - li { - width: 120px; - height: 120px; - background: #bfa; + width: 280px; + border-right: none; + /deep/ .el-submenu { + margin-bottom: 10px; + .el-submenu__title { + background-color: transparent !important; } } + .faSub { + background-color: #586884; + } } - .userInfo { - background-color: pink; - - // width: 138px; - font-size: 16px; - font-family: Microsoft YaHei; - font-weight: 400; - color: #fcfcfc; - // display: flex; - // justify-content: space-between; - // align-items: center; - // cursor: pointer; - } + } +} +.leftBotWrapper { + width: 258px; + position: absolute; + left: 19px; + bottom: 17px; + display: flex; + justify-content: space-between; + align-items: center; + .userInfo { + // width: 138px; + font-size: 16px; + font-family: Microsoft YaHei; + font-weight: 400; + color: #fcfcfc; + display: flex; + justify-content: space-between; + align-items: center; + cursor: pointer; + } + .btnBox { + width: 65px; + display: flex; + justify-content: space-between; } } </style> diff --git a/src/main.js b/src/main.js index 9446029..7830c30 100644 --- a/src/main.js +++ b/src/main.js @@ -12,6 +12,7 @@ import 'element-ui/lib/theme-chalk/index.css'; Vue.prototype.$echarts = echarts; import * as echarts from 'echarts'; +import drag from './JS/drag'; Vue.use(ElementUI, { locale }); Vue.prototype.$http = axios; Vue.prototype.$bus = new Vue(); diff --git a/src/router/index.js b/src/router/index.js index f07342e..74467bf 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -6,6 +6,7 @@ import Synthesis from '../views/Synthesis/index.vue'; //缁煎悎灞曠ず import Thematic from '../views/Thematic/index.vue'; //涓撻鍦板浘 import Archive from '../views/Archive/index.vue'; //璧勬枡棣� +import ExportMap from '../views/exportMap/index.vue'; import menuSettings from '@/views/maintenance/menuSettings.vue'; //鑿滃崟璁剧疆 import rests from '@/views/maintenance/rests.vue'; //鍏朵粬 import authorityManagement from '@/views/maintenance/authorityManagement.vue'; //鏉冮檺绠$悊 @@ -27,7 +28,6 @@ import SpatialData from '../views/datamanage/SpatialData.vue'; //鏁版嵁绠$悊-绌洪棿鏁版嵁 import versionManage from '../views/datamanage/versionManage.vue'; //鏁版嵁绠$悊-鐗堟湰绠$悊 import dictionaryManage from '../views/datamanage/dictionaryManage.vue'; //鏁版嵁绠$悊-瀛楀吀绠$悊 -import domainManage from '../views/datamanage/domainManage.vue'; //鏁版嵁绠$悊-鍊煎煙绠$悊 import styleManage from '../views/datamanage/styleManage.vue'; //鏁版嵁绠$悊-鏍峰紡绠$悊 import addStyle from '../views/datamanage/addStyle.vue'; //鏁版嵁绠$悊-鏍峰紡绠$悊-娣诲姞鏍峰紡 @@ -71,6 +71,15 @@ component: Synthesis, meta: { title: '缁煎悎灞曠ず', + requireAuth: true, // 鏍囪瘑璇ヨ矾鐢辨槸鍚﹂渶瑕佺櫥褰� + }, + }, + { + path: '/ExportMap', + name: 'ExportMap', + component: ExportMap, + meta: { + title: '鍦ㄧ嚎鍒跺浘', requireAuth: true, // 鏍囪瘑璇ヨ矾鐢辨槸鍚﹂渶瑕佺櫥褰� }, }, @@ -154,15 +163,6 @@ name: 'dictionaryManage', meta: { title: '瀛楀吀绠$悊', - requireAuth: true, // 鏍囪瘑璇ヨ矾鐢辨槸鍚﹂渶瑕佺櫥褰� - }, - }, - { - path: '/domainManage', - component: domainManage, - name: 'domainManage', - meta: { - title: '鍊煎煙绠$悊', requireAuth: true, // 鏍囪瘑璇ヨ矾鐢辨槸鍚﹂渶瑕佺櫥褰� }, }, diff --git a/src/views/Archive/index.vue b/src/views/Archive/index.vue index 8a4a421..b458064 100644 --- a/src/views/Archive/index.vue +++ b/src/views/Archive/index.vue @@ -5,6 +5,7 @@ <div class="title_active">{{ $t('archive.name') }}</div> <el-divider /> <el-tree + ref="tree" :data="tree" :props="defaultProps" show-checkbox @@ -14,165 +15,299 @@ </div> <div class="right_active"> <el-card class="arch_card"> - <el-row :gutter="20"> - <el-col :span="6"></el-col> - <el-col :span="4" - ><div style="text-align: right; margin-top: 6px"> - {{ $t('archive.keyword') }}: - </div> - </el-col> - <el-col :span="4"> - <el-input :placeholder="$t('common.pleaseInput')" - /></el-col> - <el-col :span="4" - ><el-button type="primary">{{ $t('common.iquery') }}</el-button> - <el-button v-if="archStatus.download" type="primary">{{ - $t('common.download') - }}</el-button> - </el-col> - <el-col :span="6"> </el-col> - </el-row> + <div> + <el-form :inline="true" :model="formInline" class="demo-form-inline"> + <el-form-item> + <el-input + v-model="formInline.name" + placeholder="璇疯緭鍏�" + ></el-input> + </el-form-item> + <el-form-item> + <el-button plain @click="getArchTableData">鏌ヨ</el-button> + </el-form-item> + <el-form-item> + <el-button plain>閲嶇疆</el-button> + </el-form-item> + <el-form-item> + <el-button plain>涓嬭浇</el-button> + </el-form-item> + <el-form-item> + <el-button plain @click="showDialogBox">绌洪棿鏌ヨ</el-button> + </el-form-item> + </el-form> + </div> <el-divider /> - <el-card shadow="never" class="middle_card"> - <el-table :data="tableData" style="width: 10000px" stripe> - <el-table-column - prop="name" - :label="$t('archive.uname')" - width="180" - /> - <el-table-column - prop="type" - sortable - :label="$t('archive.type')" - width="180" - /> - <el-table-column - prop="count" - sortable - :label="$t('archive.modifications')" - width="180" - /> - <el-table-column - prop="timer" - sortable - :label="$t('archive.creationtime')" - /> - <el-table-column - prop="state" - :label="$t('archive.state')" - width="180" - /> - </el-table> - </el-card> - <el-divider /> - - <el-pagination - :currentPage="currentPage4" - :page-size="pageSize4" - :page-sizes="[10, 20, 50, 100]" - :small="small" - :disabled="disabled" - :background="background" - layout="total, sizes, prev, pager, next, jumper" - :total="400" - @size-change="handleSizeChange" - @current-change="handleCurrentChange" - /> + <div class="centerBox"> + <el-collapse v-model="activeNames" @change="handleChange" accordion> + <el-collapse-item + v-for="(item, index) in companyList" + :key="index" + :name="item.entity" + :title="item.tabDesc" + > + <div class="centerTable"> + <el-table :data="tableData" height="550" border stripe> + <el-table-column type="selection" width="55" /> + <el-table-column + align="center" + type="index" + label="搴忓彿" + width="50" + /> + <el-table-column + v-for="(item, index) in attributeData" + :key="index" + :label="item.alias" + :prop="item.field" + show-overflow-tooltip + align="center" + ></el-table-column> + </el-table> + <el-divider /> + <el-pagination + :current-page="listdata.pageIndex" + :page-sizes="[10, 20, 30, 40]" + :page-size="listdata.pageSize" + :small="small" + :disabled="disabled" + :background="background" + layout="total, sizes, prev, pager, next, jumper" + :total="count" + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + /> + </div> + </el-collapse-item> + </el-collapse> + </div> </el-card> </div> + + <el-dialog + title="绌洪棿鏌ヨ" + :visible.sync="dialogVisible" + width="92%" + style="margin-left: 16%" + top="5vh" + :before-close="handleClose" + > + <div style="height: 720px; width: 100%"> + <mapsdk></mapsdk> + </div> + </el-dialog> </div> </template> <script> +import mapsdk from '../../components/mapsdk.vue'; +import { + inquiry_SelectTabs, + dataLib_selectFields, + dataLib_selectByPage, + dataLib_selectDomains, +} from '../../api/api.js'; export default { + components: { + mapsdk, + }, data() { return { + dialogVisible: false, + activeNames: null, + listdata: { + pageIndex: 1, + pageSize: 10, + filter: null, + name: null, + wkt: null, + }, + companyList: [], + formInline: {}, + count: 0, tree: [ { - label: '鏂囩尞', - children: [ - { - label: '绠¢亾鏍囧噯鏂囩尞', - url: '', - }, - { - label: '宸ヤ笟绠¢亾宸ョ▼鏂藉伐鍙婇獙鏀惰鑼�', - url: '', - }, - { - label: '缁煎悎绠$嚎璁捐鏍囧噯', - url: '', - }, - ], + tabDesc: '鍩虹鏁版嵁', + value: 'BD', + children: [], }, { - label: '鍥剧焊', //label瀵瑰簲鐖剁骇鏍囩 - children: [ - { - label: 'XXX绠$嚎璁捐鍥剧焊', - url: ' ', - }, - { - label: 'XXXXXX绠$嚎璁捐鍥�', - url: ' ', - }, - { - label: 'XXXXX绠$嚎璁捐鍥�', - url: ' ', - }, - ], - }, - { - label: '鏁版嵁', //label瀵瑰簲鐖剁骇鏍囩 - children: [ - { - label: '绠¢亾', - url: ' ', - }, - { - label: '闃�闂�', - url: ' ', - }, - { - label: '娑堣垂璁惧', - url: ' ', - }, - ], + tabDesc: '涓氬姟鏁版嵁', + value: 'BS', + children: [], }, ], defaultProps: { chilren: 'children', //"children"鍐呯殑姣忎釜瀵硅薄瑙f瀽涓轰竴涓瓙椤�; - label: 'label', //鎵�鏈�"label"鎵�鍦ㄧ殑瀵硅薄瑙f瀽涓轰竴涓埗椤� + label: 'tabDesc', //鎵�鏈�"label"鎵�鍦ㄧ殑瀵硅薄瑙f瀽涓轰竴涓埗椤� }, - tableData: [ - { - timer: '2016-05-01', - name: 'Tom', - count: '3', - type: '涓氬姟鍥惧眰', - state: 'x', - }, - { - timer: '2016-05-02', - name: 'Tom', - count: '2', - type: '涓氬姟鍥惧眰', - state: 'x', - }, - { - timer: '2016-05-03', - name: 'Tom', - count: '1', - type: '涓氬姟鍥惧眰', - state: 'x', - }, - ], + attributeData: [], + tableData: [], archStatus: { download: false, }, + archOption: [], + queryLayer: null, }; }, + methods: { + handleClose() { + this.dialogVisible = false; + this.$store.state.mapMenuBoolean = false; + this.$store.state.mapMenuBoxFlag = null; + this.$store.state.mapPopBoolean = false; + this.$store.state.mapPopBoxFlag = null; + }, + showDialogBox() { + this.$store.state.mapMenuBoolean = true; + this.$store.state.mapMenuBoxFlag = '1'; + this.dialogVisible = true; + }, + //鑾峰彇琛ㄦ牸鏁版嵁 + getArchTableData() { + this.companyList = []; + this.activeNames = null; + var valTree = this.$refs.tree.getCheckedNodes(); + if (valTree.length == 0) { + this.$message.error('璇烽�夋嫨瑕佹煡璇㈢殑鍥惧眰璧勬枡!'); + return; + } + for (var i in valTree) { + this.listdata.name = valTree[i].entity; + var filedData = this.getCollapseDomFiled(); + this.archOption.push({ + name: valTree[i].entity, + fileds: filedData, + table: this.getCollapseTable(filedData), + }); + } + + this.companyList = valTree; + }, + //鑾峰彇姣忎釜琛ㄥ瓧娈靛悕绉板強闃堝�� + async getCollapseDomFiled() { + //鏌ヨ瀛楁淇℃伅; + const fileds = await dataLib_selectFields({ + name: this.listdata.name, + }); + if (fileds.code != 200) { + this.$message.error('璋冪敤鍒楄〃澶辫触,璇疯仈绯诲伐浣滀汉鍛�!'); + return; + } + //鏌ヨ闃堝�间俊鎭紱 + const domains = await dataLib_selectDomains({ + name: this.listdata.name, + }); + if (domains.code != 200) { + this.$message.error('璋冪敤鍒楄〃澶辫触,璇疯仈绯诲伐浣滀汉鍛�!'); + return; + } + var data1 = fileds.result; + var data2 = domains.result; + var std = []; + for (var i in data1) { + if (data1[i].showtype == 1) { + if (data1[i].domainNa != null) { + data1[i].domainNa = this.getDomainNaFild(data1[i].domainNa, data2); + } + std.push(data1[i]); + } + } + return std; + }, + //鍊煎煙瀛楁鍖归厤 + getDomainNaFild(res, result) { + for (var i in result) { + if (result[i].domName == res) { + return result[i].codeDesc; + } + } + return null; + }, + + //鑾峰彇姣忎釜琛ㄧ殑table + async getCollapseTable(res) { + var res_val; + res.then((val) => { + res_val = val; + }); + + if (this.formInline.name != null) { + this.listdata.filter = 'name like ' + this.formInline.name; + } + const fileds = await dataLib_selectByPage(this.listdata); + if (fileds.code != 200) { + this.$message.error('璋冪敤鍒楄〃澶辫触,璇疯仈绯诲伐浣滀汉鍛�!'); + return; + } + for (var i in fileds.result) { + let val_Data = fileds.result[i]; + + for (var j in res_val) { + if (res_val[j].domainNa != null && res_val[j].domainNa != undefined) { + val_Data[res_val[j].field] = res_val[j].domainNa; + } + } + } + return fileds; + }, + + //鎶樺彔闈㈡澘鍒囨崲浜嬩欢 + handleChange(val) { + if (val == '') return; + var that = this; + this.listdata.name = val; + this.listdata.pageSize = 10; + this.listdata.pageIndex = 1; + for (var i in this.archOption) { + if (this.archOption[i].name == val) { + this.queryLayer = this.archOption[i].fileds; + this.archOption[i].fileds.then((res) => { + that.attributeData = res; + }); + this.archOption[i].table.then((res) => { + this.count = res.count; + this.tableData = res.result; + }); + } + } + }, + //鍒嗛〉鐐瑰嚮浜嬩欢 + handleSizeChange(val) { + this.listdata.pageSize = val; + this.listdata.pageIndex = 1; + var res = this.getCollapseTable(this.queryLayer); + res.then((res) => { + this.tableData = res.result; + }); + }, + handleCurrentChange(val) { + this.listdata.pageIndex = val; + var res = this.getCollapseTable(this.queryLayer); + res.then((res) => { + this.tableData = res.result; + }); + }, + //鑾峰彇鏍� + async getTreeData() { + const data = await inquiry_SelectTabs(); + if (data.code != 200) { + this.$message.error('鍒楄〃璋冪敤澶辫触'); + } + var option = data.result; + + for (var i in option) { + var val_Data = option[i]; + val_Data.id = '1' + i; + if (option[i].ns == 'bd') { + this.tree[0].children.push(val_Data); + } else { + this.tree[1].children.push(val_Data); + } + } + }, + //鏉冮檺绠$悊 showArchMenu(res) { switch (res.tag) { case '/download': @@ -190,16 +325,18 @@ this.showArchMenu(permsEntity[i]); } } + this.getTreeData(); }, }; </script> -<style> +<style scped lang="less"> .archive { width: 100%; height: 100%; position: relative; } + .archive .left_active { width: 21%; height: 100%; @@ -215,9 +352,37 @@ width: 100%; height: 100%; } +.archive .centerBox { + max-height: 800px; + overflow: auto; +} + +.archive .centerBox::-webkit-scrollbar { + /*婊氬姩鏉℃暣浣撴牱寮�*/ + width: 10px; /*楂樺鍒嗗埆瀵瑰簲妯珫婊氬姩鏉$殑灏哄*/ + height: 1px; +} +.archive .centerBox::-webkit-scrollbar-thumb { + /*婊氬姩鏉¢噷闈㈠皬鏂瑰潡*/ + border-radius: 10px; + -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); + background: #e5e5e5; +} +.archive .centerBox::-webkit-scrollbar-track { + /*婊氬姩鏉¢噷闈㈣建閬�*/ + -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); + border-radius: 10px; + background: #ffffff; +} + +.archive .centerTable { + height: 600px; +} .archive .arch_card .el-card__body { padding: 10px; + overflow-y: auto; } + .archive .el-divider--horizontal { margin: 10px 0 !important; } diff --git a/src/views/Home.vue b/src/views/Home.vue index be05f22..c072e13 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,13 +1,17 @@ <template> <div class="home"> <el-container> - <el-header> - <nav-menu></nav-menu> - </el-header> - <el-main> - <router-view /> - </el-main> + <el-container> + <el-aside> + <nav-menu></nav-menu> + </el-aside> + <el-main> + <!-- <synthesis class="showsynthesis" v-show="shwomMapview"></synthesis> --> + <router-view /> + </el-main> + </el-container> </el-container> + <!-- <iframe src="http://localhost/LFWeb/test.html" width="100%" height="100%"></iframe> --> </div> </template> @@ -18,30 +22,35 @@ name: "Home", components: { navMenu, + }, data() { return { shwomMapview: true, }; }, - methods: {}, + methods: { + + }, }; </script> <style lang="less"> .home { height: 100vh; position: relative; + background-color: #3b4d6e; + .el-aside { + margin: 26px 0 0 27px; + width: 249px; + // background-color: #bfa; + } .el-container { height: 100%; - .el-header { - padding: 0; - height: 160px !important; - } - .el-main { - margin: 0px; - padding: 10px; - background-color: rgb(53, 53, 57); - } + } + .el-main { + margin: 0px; + padding: 10px; + background: rgb(61, 76, 112); } } </style> diff --git a/src/views/Synthesis/coverage.vue b/src/views/Synthesis/coverage.vue index f5ffdf7..a36bd9e 100644 --- a/src/views/Synthesis/coverage.vue +++ b/src/views/Synthesis/coverage.vue @@ -31,12 +31,12 @@ // class: "a2", // }, { - id: '3', + id: '2', name: 'synthesis.release', class: 'a3', }, { - id: '2', + id: '3', name: 'synthesis.export', class: 'a4', }, @@ -61,8 +61,11 @@ checkCourvage(res) { switch (res.id) { case '1': //鍥惧眰绠$悊 - // 鎵撳紑宸ョ▼鏍戝脊绐� - + break; + case '2': //鍦烘櫙鍙戝竷 + break; + case '3': //鍦烘櫙瀵煎嚭! + this.$store.state.exportLayer != this.$store.state.exportLayer; break; } }, diff --git a/src/views/Synthesis/index.vue b/src/views/Synthesis/index.vue index 43e74b1..b16b0a7 100644 --- a/src/views/Synthesis/index.vue +++ b/src/views/Synthesis/index.vue @@ -23,44 +23,26 @@ <measurement /> </el-tab-pane> <el-tab-pane v-if="menuStatus.menu8" :label="$t('synthesis.plotting')"> - <plotting @drawing="showBtn" /> + <plotting /> </el-tab-pane> </el-tabs> <el-card class="box-card"> <map-div></map-div> </el-card> - <div class="plotBox"> - <el-collapse-transition> - <div class="transition-box" v-show="showBtnBox"> - <ul> - <li - @click="changePlot(item)" - v-for="item in itemsOne" - :key="item.id" - > - <div class="divli"> - <div :class="item.class" class="backimge8"></div> - </div> - <div class="div_li">{{ $t(item.name) }}</div> - </li> - </ul> - </div> - </el-collapse-transition> - </div> </div> </template> <script> -import coverage from "./coverage.vue"; //鍥惧眰 -import viewport from "./viewport.vue"; //瑙嗗浘 -import wander from "./wander.vue"; //婕父 -import analyse from "./analyse.vue"; //鍒嗘瀽 -import iqyery from "./inquire.vue"; //鏌ヨ -import orientation from "./orientation.vue"; //瀹氫綅 -import measurement from "./measurement.vue"; //娴嬮噺 -import plotting from "./plotting.vue"; //鏍囩粯 -import MapDiv from "../../components/MapDiv"; -import { getPerms } from "../../api/api"; +import coverage from './coverage.vue'; //鍥惧眰 +import viewport from './viewport.vue'; //瑙嗗浘 +import wander from './wander.vue'; //婕父 +import analyse from './analyse.vue'; //鍒嗘瀽 +import iqyery from './inquire.vue'; //鏌ヨ +import orientation from './orientation.vue'; //瀹氫綅 +import measurement from './measurement.vue'; //娴嬮噺 +import plotting from './plotting.vue'; //鏍囩粯 +import MapDiv from '../../components/MapDiv'; +import { getPerms } from '../../api/api'; export default { components: { coverage, @@ -75,59 +57,6 @@ }, data() { return { - showBtnBox: false, - itemsOne: [ - { - id: "1", - name: "synthesis.point", - class: "h1", - }, - { - id: "2", - name: "synthesis.line", - class: "h2", - }, - // { - // id: "3", - // name: "synthesis.rectangle", - // class: "h3", - // }, - { - id: "4", - name: "synthesis.polygon", - class: "h4", - }, - // { - // id: "7", - // name: "synthesis.symboliclabel", - // class: "h7", - // }, - // { - // id: "5", - // name: "synthesis.flatterrain", - // class: "h5", - // }, - // { - // id: "6", - // name: "synthesis.terrainexcavation", - // class: "h6", - // }, - { - id: "8", - name: "synthesis.removepaint", - class: "h8", - }, - // { - // id: "9", - // name: "synthesis.openFile", - // class: "h6", - // }, - // { - // id: "10", - // name: "synthesis.saveFile", - // class: "h8", - // }, - ], iframeSrc: null, messageName: null, permsId: null, @@ -144,88 +73,14 @@ }; }, watch: {}, - created() {}, methods: { - showBtn() { - this.showBtnBox = !this.showBtnBox; - }, - changePlot(res) { - sgworld.Creator.SimpleGraphic.edit(true, { editProp: true }); - switch (res.id) { - case "1": - sgworld.Creator.createSimpleGraphic( - "point", - {}, - function (entity) {} - ); - break; - case "2": - sgworld.Creator.createSimpleGraphic( - "polyline", - {}, - function (entity) {} - ); - break; - case "3": - sgworld.Creator.createSimpleGraphic( - "rectangle", - {}, - function (entity) {} - ); - break; - case "4": - sgworld.Creator.createSimpleGraphic( - "polygon", - {}, - function (entity) {} - ); - break; - case "6": - if (window.Excavation) { - window.Excavation.clear(); - window.Excavation = null; - } else { - this.$refs.terrainDig.open(); - } - break; - case "5": - if (window.TerrainFlattening) { - window.TerrainFlattening.remove(); - window.TerrainFlattening = null; - } else { - this.$refs.modelPress.open(); - } - break; - case "7": - sgworld.Creator.createModelLibrary(); - break; - case "8": - this.clearAll(); - break; - case "10": - - break; - } - }, - - clearAll() { - sgworld.Creator.SimpleGraphic.clear(); - if (window.Excavation) { - window.Excavation.clear(); - window.Excavation = null; - } - if (window.TerrainFlattening) { - window.TerrainFlattening.remove(); - window.TerrainFlattening = null; - } - }, tepostmessage(res) { const msg = { - message: "changeTool", + message: 'changeTool', data: res, }; document - .getElementById("sunIframe") + .getElementById('sunIframe') .contentWindow.postMessage(msg, this.iframeSrc); }, showMenuChange(res, result) { @@ -239,28 +94,28 @@ }, showMenuStatus(res) { switch (res.cnName) { - case "鍥惧眰": + case '鍥惧眰': this.menuStatus.menu1 = true; break; - case "瑙嗗浘": + case '瑙嗗浘': this.menuStatus.menu2 = true; break; - case "婕父": + case '婕父': this.menuStatus.menu3 = true; break; - case "鍒嗘瀽": + case '鍒嗘瀽': this.menuStatus.menu4 = true; break; - case "鏌ヨ": + case '鏌ヨ': this.menuStatus.menu5 = true; break; - case "瀹氫綅": + case '瀹氫綅': this.menuStatus.menu6 = true; break; - case "娴嬮噺": + case '娴嬮噺': this.menuStatus.menu7 = true; break; - case "鏍囩粯": + case '鏍囩粯': this.menuStatus.menu8 = true; break; } @@ -270,7 +125,7 @@ if (this.$store.state.currentPerms) { val = this.$store.state.currentPerms; } else { - val = "/comprehensive"; + val = '/comprehensive'; } var permsEntity = this.$store.state.permsEntity; @@ -294,7 +149,7 @@ }, mounted() { //this.messageName = this.$store.state.teNmme; - this.$bus.$on("changetool", (e) => { + this.$bus.$on('changetool', (e) => { this.tepostmessage(e); }); }, @@ -305,8 +160,8 @@ }; </script> -<style > -.synthesis .el-card { +<style> +.el-card { border: transparent !important; } .synthesis { @@ -335,14 +190,13 @@ } .synthesis .box-card { height: 88%; - position: relative; border-radius: 0px; } .synthesis .el-card .el-card__body { padding: 0px; } -.synthesis .cardbox { +.cardbox { width: 98%; height: 86%; position: absolute; @@ -350,54 +204,5 @@ .synthesis .el-tabs--border-card { border: transparent; background: transparent; -} -.synthesis .divli { - width: 100%; - height: 50%; - position: relative; -} -.synthesis li { - list-style: none; - float: left; - height: 60px; - text-align: center; - margin: 2px; - position: relative; - cursor: pointer; - margin-top: 5px; -} -.synthesis .backimge8 { - width: 30px; - height: 30px; - position: absolute; - background-size: 100% 100%; - margin: 0% 30%; -} -.synthesis .plotBox { - width: 160px; - /* height:; */ - position: absolute; - top: 115px; - left: 5px; - background-color: #596882; -} -.synthesis .plotBox .transition-box ul { - display: flex; - flex-wrap: wrap; - justify-content: space-evenly; - align-items: center; - width: 100%; - border-radius: 4px; - text-align: center; - color: #fff; - /* background-color: #bfa; */ - box-sizing: border-box; -} -.synthesis .plotBox .transition-box li { - margin: 5px; - width: 46%; - margin-left: 0; - /* background-color: #fff; */ - justify-content: space-between; } </style> diff --git a/src/views/Synthesis/measurement.vue b/src/views/Synthesis/measurement.vue index 1f51786..f2c2c7b 100644 --- a/src/views/Synthesis/measurement.vue +++ b/src/views/Synthesis/measurement.vue @@ -82,7 +82,6 @@ methods: { showViewMenu(res) { if (res.cnName != '娴嬮噺') return; - console.log('娴嬮噺', res.tag); }, clearMeasure(id) { if (id) { diff --git a/src/views/Synthesis/plotting.vue b/src/views/Synthesis/plotting.vue index ebef7b6..dd33b88 100644 --- a/src/views/Synthesis/plotting.vue +++ b/src/views/Synthesis/plotting.vue @@ -1,47 +1,41 @@ <template> <div class="box"> - <div class="tooltip"></div> - <input type="file" accept=".kml" class="file" style="display: none" /> - <ul> - <li style="margin-left: 20px" @click="drawing"> + <li + style="margin-left: 20px" + @click="changePlot(item)" + v-for="item in itemsOne" + > <div class="divli"> - <div class="backimge8 h1"></div> + <div :class="item.class" class="backimge8"></div> </div> - <div class="div_li">鏍囩粯</div> + <div class="div_li">{{ $t(item.name) }}</div> </li> - <li style="margin-left: 20px" id="open"> + <li v-if="plotStatus.delete" style="margin-left: 20px"> <div class="divli"> - <div class="backimge8 h1"></div> + <div class="backimge8"><i class="el-icon-delete"></i></div> </div> - <div class="div_li">鎵撳紑json</div> + <div class="div_li">鍒犻櫎</div> </li> - <li style="margin-left: 20px" @click="save"> + <li v-if="plotStatus.upload" style="margin-left: 20px"> <div class="divli"> - <div class="backimge8 h1"></div> + <div class="backimge8"><i class="el-icon-upload2"></i></div> </div> - <div class="div_li">淇濆瓨json</div> + <div class="div_li">涓婁紶</div> </li> - <li style="margin-left: 20px" @click="kmlopen"> + <li v-if="plotStatus.upload" style="margin-left: 20px"> <div class="divli"> - <div class="backimge8 h1"></div> + <div class="backimge8"><i class="el-icon-plus"></i></div> </div> - <div class="div_li">鍘熺敓kml</div> + <div class="div_li">鏂板</div> </li> - <li style="margin-left: 20px" @click="handleOpenClick"> + <li v-if="plotStatus.upload" style="margin-left: 20px"> <div class="divli"> - <div class="backimge8 h1"></div> + <div class="backimge8"><i class="el-icon-edit"></i></div> </div> - <div class="div_li">瀵煎叆KML鏂囦欢</div> - </li> - <li style="margin-left: 20px" @click="handleSaveClick"> - <div class="divli"> - <div class="backimge8 h1"></div> - </div> - <div class="div_li">瀵煎嚭KML鏂囦欢</div> + <div class="div_li">淇敼</div> </li> </ul> - <terrainDig ref="terrainDig" /> <modelPress ref="modelPress" /> </div> @@ -49,19 +43,60 @@ <script> // 娴嬮噺-淇℃伅寮圭獥 -import terrainDig from "../Tools/terrainDig.vue"; -import modelPress from "../Tools/modelPress.vue"; +import terrainDig from '../Tools/terrainDig.vue'; +import modelPress from '../Tools/modelPress.vue'; export default { components: { terrainDig, modelPress }, data() { return { - id: "", plotStatus: { - delete: true, - upload: true, - insert: true, - update: true, + delete: false, + upload: false, + insert: false, + update: false, }, + itemsOne: [ + { + id: '1', + name: 'synthesis.point', + class: 'h1', + }, + { + id: '2', + name: 'synthesis.line', + class: 'h2', + }, + { + id: '3', + name: 'synthesis.rectangle', + class: 'h3', + }, + { + id: '4', + name: 'synthesis.polygon', + class: 'h4', + }, + { + id: '7', + name: 'synthesis.symboliclabel', + class: 'h7', + }, + { + id: '5', + name: 'synthesis.flatterrain', + class: 'h5', + }, + { + id: '6', + name: 'synthesis.terrainexcavation', + class: 'h6', + }, + { + id: '8', + name: 'synthesis.removepaint', + class: 'h8', + }, + ], }; }, created() { @@ -73,170 +108,80 @@ this.showViewMenu(cover_perms[i]); } } - layui.use("upload", function () { - var upload = layui.upload; - upload.render({ - elem: "#open", - accept: "file", //鏅�氭枃浠� - auto: false, - choose: function (obj) { - var files = obj.pushFile(); - for (var key in files) { - sgworld.Creator.SimpleGraphic.open(files[key]); - break; - } - }, - }); - }); }, methods: { - handleSaveClick() { - let funDownload = function (content, filename) { - let eleLink = document.createElement("a"); - eleLink.download = filename; - eleLink.style.display = "none"; - // 瀛楃鍐呭杞彉鎴恇lob鍦板潃 - let blob = new Blob([content]); - eleLink.href = URL.createObjectURL(blob); - // 瑙﹀彂鐐瑰嚮 - document.body.appendChild(eleLink); - eleLink.click(); - // 鐒跺悗绉婚櫎 - document.body.removeChild(eleLink); - }; - let entities = new Cesium.EntityCollection(); - let dataSources = sgworld.Viewer.dataSources; - for (let i = 0, j = dataSources.length; i < j; i++) { - for (let v of dataSources.get(i).entities.values) { - entities.add(v); - } - } - for (let v of sgworld.Viewer.entities.values) { - entities.add(v); - } - - if (entities.values.length) { - console.log(sgworld.Viewer.entities); - - let promise = Cesium.exportKml({ entities: sgworld.Viewer.entities }); - console.log(entities); - // let promise = Cesium.exportKml({ entities: entities }); - promise.then(function (e) { - - funDownload(e.kml, new Date().getTime() + ".kml"); - }); - } else { - alert("褰撳墠鍦烘櫙娌℃湁entities瀹炰綋"); - } - }, - handleOpenClick() { - // let that = this; - let fileInput = document.querySelector(".file"); - fileInput.onchange = function (evt) { - let files = evt.target.files; - if (files.length > 0) { - let file = evt.target.files[0]; - - let fileReader = new FileReader(); - fileReader.readAsDataURL(file); - fileReader.onload = () => { - sgworld.Viewer.dataSources - .add( - Cesium.KmlDataSource.load(fileReader.result, { - camera: sgworld.Viewer.scene.camera, - canvas: sgworld.Viewer.scene.canvas, - }) - ) - .then((KmlDataSource) => { - console.log(KmlDataSource); - // let entities = kmlDataSource.entities; - }); - }; - - // let fileReader = new FileReader(); - // fileReader.onload = function () { - // sgworld.Viewer.dataSources - // .add( - // Cesium.KmlDataSource.load(new Blob([this.result]), { - // camera: sgworld.Viewer.scene.camera, - // canvas: sgworld.Viewer.scene.canvas, - // clampToGround: false, - // }) - // ) - // .then(function (kmlDataSource) { - // let entities = kmlDataSource.entities; - // let item = entities.values[entities.values.length - 1]; - // sgworld.Viewer.zoomTo(entities); - // }); - // fileInput = null; - // fileReader = null; - // }; - // fileReader.readAsText(file); - } - // fileInput.value = null; - }; - fileInput.click(); - }, - - preview(event) { - var reader = new FileReader(); - reader.readAsDataURL(file); - //鐩戝惉鏂囦欢璇诲彇缁撴潫鍚庝簨浠� - reader.onloadend = function (e) { - $(".img").attr("src", e.target.result); //e.target.result灏辨槸鏈�鍚庣殑璺緞鍦板潃 - }; - // let files = document.getElementById(this.id).files[0]; - // this.imgDataUrl = this.getObjectURL(files); - // // this.$emit("sendImgUrl", this.imgDataUrl, this.id); - // console.log("sendImgUrl", this.imgDataUrl, this.id); - }, - getObjectURL(file) { - let url = null; - if (window.createObjectURL != undefined) { - // basic - url = window.createObjectURL(file); - } else if (window.webkitURL != undefined) { - // webkit or chrome - url = window.webkitURL.createObjectURL(file); - } else if (window.URL != undefined) { - // mozilla(firefox) - url = window.URL.createObjectURL(file); - } - return url; - }, showViewMenu(res) { - if (res.cnName != "鏍囩粯") return; + if (res.cnName != '鏍囩粯') return; switch (res.tag) { - case "/delete": + case '/delete': this.plotStatus.delete = true; break; - case "/upload": + case '/upload': this.plotStatus.upload = true; break; - case "/insert": + case '/insert': this.plotStatus.insert = true; break; - case "/update": + case '/update': this.plotStatus.update = true; break; } }, - save() { - // var val_result = sgworld.Viewer.entities._entities._array; - // console.log(val_result[0]); - // console.log(sgworld.Core); - // console.log(sgworld.Core.getEntityPropValue(val_result[0], show)); - sgworld.Creator.SimpleGraphic.save(); - }, - kmlopen() { - sgworld.Creator.addKmlLayer( - "kml鏁版嵁", - "http://183.162.245.49:82/sdkdemo_2022/demo/kml/facilities/facilities.kml", - true - ); - }, - drawing() { - this.$emit("drawing"); + changePlot(res) { + switch (res.id) { + case '1': + sgworld.Creator.createSimpleGraphic( + 'point', + {}, + function (entity) {} + ); + break; + case '2': + sgworld.Creator.createSimpleGraphic( + 'polyline', + {}, + function (entity) {} + ); + break; + case '3': + sgworld.Creator.createSimpleGraphic( + 'rectangle', + {}, + function (entity) {} + ); + break; + case '4': + sgworld.Creator.createSimpleGraphic( + 'polygon', + {}, + function (entity) {} + ); + break; + case '6': + if (window.Excavation) { + window.Excavation.clear(); + window.Excavation = null; + } else { + this.$refs.terrainDig.open(); + } + + break; + case '5': + if (window.TerrainFlattening) { + window.TerrainFlattening.remove(); + window.TerrainFlattening = null; + } else { + this.$refs.modelPress.open(); + } + + break; + case '7': + sgworld.Creator.createModelLibrary(); + break; + case '8': + this.clearAll(); + break; + } }, clearAll() { sgworld.Creator.SimpleGraphic.clear(); @@ -259,7 +204,6 @@ height: 100%; position: relative; } - .box li { list-style: none; float: left; @@ -274,34 +218,34 @@ margin: 0px; } .h1 { - background: url("../../assets/img/synthesis/妞渾 5 鎷疯礉 3.png") no-repeat + background: url('../../assets/img/synthesis/妞渾 5 鎷疯礉 3.png') no-repeat center; } .h2 { - background: url("../../assets/img/synthesis/妞渾 3 鎷疯礉 16.png") no-repeat + background: url('../../assets/img/synthesis/妞渾 3 鎷疯礉 16.png') no-repeat center; } .h3 { - background: url("../../assets/img/synthesis/妞渾 3 鎷疯礉 20.png") no-repeat + background: url('../../assets/img/synthesis/妞渾 3 鎷疯礉 20.png') no-repeat center; } .h4 { - background: url("../../assets/img/synthesis/妞渾 3 鎷疯礉 23.png") no-repeat + background: url('../../assets/img/synthesis/妞渾 3 鎷疯礉 23.png') no-repeat center; } .h5 { - background: url("../../assets/img/synthesis/鐭╁舰 14 鎷疯礉.png") no-repeat + background: url('../../assets/img/synthesis/鐭╁舰 14 鎷疯礉.png') no-repeat center; } .h6 { - background: url("../../assets/img/synthesis/鐭╁舰 14 鎷疯礉 7.png") no-repeat + background: url('../../assets/img/synthesis/鐭╁舰 14 鎷疯礉 7.png') no-repeat center; } .h7 { - background: url("../../assets/img/synthesis/鏂囨湰椋庢牸.png") no-repeat center; + background: url('../../assets/img/synthesis/鏂囨湰椋庢牸.png') no-repeat center; } .h8 { - background: url("../../assets/img/synthesis/娓呴櫎.png") no-repeat center; + background: url('../../assets/img/synthesis/娓呴櫎.png') no-repeat center; } .backimge8 { width: 30px; diff --git a/src/views/datamanage/SpatialData.vue b/src/views/datamanage/SpatialData.vue index da0a00a..94fe260 100644 --- a/src/views/datamanage/SpatialData.vue +++ b/src/views/datamanage/SpatialData.vue @@ -1,6 +1,6 @@ <template> <div class="authorityManagement_box"> - <My-bread :list="['鏁版嵁绠$悊', '绌洪棿鏁版嵁']"></My-bread> + <My-bread :list="['鏁版嵁绠$悊', '鏁版嵁妫�绱�']"></My-bread> <el-divider /> <div class="searchComp"> <el-form ref="ruleForm" :model="ruleForm" :inline="true"> @@ -16,39 +16,37 @@ >鏌ヨ</el-button > <el-button - @click="resetForm('ruleForm')" icon="el-icon-refresh" type="info" size="small" >閲嶇疆</el-button > - <el-button - v-if="btnStatus.delete" + <!-- <el-button + v-if="btnStatus.delete" @click="DelFormData" icon="el-icon-delete" type="danger" size="small" >鍒犻櫎</el-button - > + > --> <el-button - v-if="!FBtest" - @click="testfb()" + v-if="btnStatus.download" icon="el-icon-position" type="success" size="small" - >鍙戝竷</el-button + >涓嬭浇</el-button > - <el-button + <!-- <el-button v-else @click="testfb()" icon="el-icon-position" type="success" size="small" >鍙栨秷</el-button - > + > --> </el-form-item> - <el-form-item> + <!-- <el-form-item> <span v-if="FBtest"> <i class="dotClass" style="background-color: springgreen"></i> </span> @@ -58,13 +56,13 @@ </el-form-item> <el-form-item v-if="FBtest"> 鍙戝竷鍦板潃锛歨ttp://192.168.20.39/SG/default/streamer.ashx - </el-form-item> + </el-form-item> --> </el-form> </div> <div class="bottom"> <div class="leftTree"> <el-tree - :data="data" + :data="tree" :props="defaultProps" :default-expanded-keys="[1]" node-key="id" @@ -83,75 +81,23 @@ > <el-table-column type="selection" width="55" /> <el-table-column width="50" type="index" label="搴忓彿" /> - <el-table-column min-width="150" prop="pipename" label="绠¢亾鍚嶇О" /> <el-table-column - min-width="150" - v-if="tableType == '鍦虹珯鐐�'" - prop="sitename" - label="鍦虹珯鍚嶇О" - /> - <el-table-column - min-width="150" - v-if="tableType == '鍦虹珯鐐�'" - prop="type" - label="鍦虹珯绫诲瀷" - /> - <el-table-column - min-width="150" - v-if="tableType == '绠¢亾涓績绾�'" - prop="seriesname" - label="绔欏垪鍚嶇О" - /> - <el-table-column - min-width="50" - v-if="tableType == '绠¢亾涓績绾�'" - prop="stationvalue" - label="绔欏垪閲岀▼" - /> - <el-table-column - min-width="50" - v-if="tableType == '绠¢亾涓績绾�'" - prop="transportm" - label="杈撻�佷粙璐�" - /> - <el-table-column - min-width="50" - v-if="tableType == '绠¢亾涓績绾�'" - prop="diameter" - label="绠″緞" - /> - <el-table-column - min-width="150" - v-if="tableType == '鏍囨々'" - prop="name" - label="鏍囨々鍚嶇О" - /> - <el-table-column - min-width="150" - v-if="tableType == '鏍囨々'" - prop="type" - label="鏍囨々绫诲瀷" - /> - - <el-table-column - min-width="70" - prop="create_user" - label="鍏ュ簱浜哄憳" - /> - <el-table-column - min-width="100" - prop="create_time" - label="鍏ュ簱鏃堕棿" - /> + v-for="(item, index) in attributeData" + :key="index" + :label="item.alias" + :prop="item.field" + show-overflow-tooltip + align="center" + ></el-table-column> <el-table-column min-width="80" label="鎿嶄綔"> <template slot-scope="scope"> <el-link @click="showDetail(scope.$index, scope.row)" >鏌ョ湅</el-link > <el-link - @click="handleEdit(scope.$index, scope.row)" + @click="dialogFormVisible = true" style="margin-left: 10px" - >淇敼</el-link + >闄勪欢</el-link > </template> </el-table-column> @@ -165,9 +111,9 @@ v-if="changePag" @size-change="handleSizeChange" @current-change="handleCurrentChange" - :current-page="currentPage" + :current-page="this.listData.pageIndex" :page-sizes="[10, 20, 50, 100]" - :page-size="10" + :page-size="this.listData.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="count" > @@ -184,179 +130,113 @@ </div> </div> <div class="contentBox"> - <p>绠¢亾鍚嶇О锛歿{ itemdetail.pipename }}</p> - <el-divider></el-divider> - <div v-if="tableType == '鍦虹珯鐐�'"> - <p>鍦虹珯鍚嶇О锛歿{ itemdetail.sitename }}</p> - <el-divider></el-divider> - <p>鍦虹珯绫诲瀷锛歿{ itemdetail.type }}</p> - <el-divider></el-divider> - </div> - <div v-if="tableType == '绠¢亾涓績绾�'"> - <p>绔欏垪鍚嶇О锛歿{ itemdetail.seriesname }}</p> - <el-divider></el-divider> - <p>绔欏垪閲岀▼锛歿{ itemdetail.stationvalue }}</p> - <el-divider></el-divider> - <p>杈撻�佷粙璐細{{ itemdetail.transportm }}</p> - <el-divider></el-divider> - <p>绠″緞锛歿{ itemdetail.diameter }}</p> - <el-divider></el-divider> - </div> - <div v-if="tableType == '鏍囨々'"> - <p>鏍囨々鍚嶇О锛歿{ itemdetail.name }}</p> - <el-divider></el-divider> - <p>鏍囨々绫诲瀷锛歿{ itemdetail.type }}</p> - <el-divider></el-divider> - </div> - <p>鍏ュ簱浜哄憳锛歿{ itemdetail.create_user }}</p> - <el-divider></el-divider> - <p>鍏ュ簱鏃堕棿锛歿{ itemdetail.create_time }}</p> + <ul> + <li v-for="(item, index) in itemdetail"> + <p> + <label> {{ item.label }}:</label> + <label class="boxlabel">{{ item.value }}</label> + </p> + <el-divider></el-divider> + </li> + </ul> </div> </el-card> </div> - <el-dialog title="淇敼璇︽儏" :visible.sync="dialogFormVisible"> - <el-form :model="upform"> - <el-form-item label="绠¢亾鍚嶇О" :label-width="formLabelWidth"> - <el-input v-model="upform.pipename" autocomplete="off"></el-input> + <el-dialog title="闄勪欢鎸傛帴" width="30%" :visible.sync="dialogFormVisible"> + <el-form :model="formInline" class="demo-form-inline"> + <el-form-item label="娣诲姞鏁版嵁"> + <el-input + v-model="formInline.file" + style="width: 300px; margin-right: 20px" + placeholder="璇烽�夋嫨" + disabled + ></el-input> + <input + name="file1" + type="file" + id="insertFile" + multiple="multiple" + style="display: none" + @change="insertFile( )" + /> + <el-link @click="getInsertFile( )" :underline="false" + ><i class="el-icon-folder-opened"></i + ></el-link> </el-form-item> - <el-form-item - v-if="tableType == '鍦虹珯鐐�'" - label="鍦虹珯鍚嶇О" - :label-width="formLabelWidth" - > - <el-input v-model="upform.sitename" autocomplete="off"></el-input> + <el-form-item> + <el-row > + <el-col :span="2"> <el-link type="primary" :underline="false" >娣诲姞</i></el-link></el-col> + <el-col :span="2"> <el-link type="primary" :underline="false" >鍒犻櫎</i></el-link></el-col> + <el-col :span="2"> <el-link type="primary" :underline="false" >娓呯┖</i></el-link></el-col> + </el-row> </el-form-item> - <el-form-item - v-if="tableType == '鍦虹珯鐐�'" - label="鍦虹珯绫诲瀷" - :label-width="formLabelWidth" - > - <el-input v-model="upform.type" autocomplete="off"></el-input> + <el-form-item> + <el-table + ref="filterTable" + height="99%" + border + style="width: 100%" + > + <el-table-column width="50" type="index" label="搴忓彿" /> + <el-table-column prop="date" + label="鏂囦欢璺緞" + /> + + <el-table-column + prop="name" + label="鏂囦欢鍚嶇О" + /> + + </el-table> </el-form-item> - <el-form-item - v-if="tableType == '绠¢亾涓績绾�'" - label="绔欏垪鍚嶇О" - :label-width="formLabelWidth" - > - <el-input v-model="upform.seriesname" autocomplete="off"></el-input> - </el-form-item> - <el-form-item - v-if="tableType == '绠¢亾涓績绾�'" - label="绔欏垪閲岀▼" - :label-width="formLabelWidth" - > - <el-input v-model="upform.stationvalue" autocomplete="off"></el-input> - </el-form-item> - <el-form-item - v-if="tableType == '绠¢亾涓績绾�'" - label="杈撻�佷粙璐�" - :label-width="formLabelWidth" - > - <el-input v-model="upform.transportm" autocomplete="off"></el-input> - </el-form-item> - <el-form-item - v-if="tableType == '绠¢亾涓績绾�'" - label="绠″緞" - :label-width="formLabelWidth" - > - <el-input v-model="upform.diameter" autocomplete="off"></el-input> - </el-form-item> - <el-form-item - v-if="tableType == '鏍囨々'" - label="鏍囨々鍚嶇О" - :label-width="formLabelWidth" - > - <el-input v-model="upform.name" autocomplete="off"></el-input> - </el-form-item> - <el-form-item - v-if="tableType == '鏍囨々'" - label="鏍囨々绫诲瀷" - :label-width="formLabelWidth" - > - <el-input v-model="upform.type" autocomplete="off"></el-input> + <el-form-item> + +<el-row :gutter="20"> + <el-col :span="12" :offset="8"> <el-button plain>纭</el-button> <el-button plain>鍙栨秷</el-button></el-col> +</el-row> </el-form-item> </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="updateForm">纭� 瀹�</el-button> - <el-button @click="dialogFormVisible = false">鍙� 娑�</el-button> - </div> + </el-dialog> </div> </template> <script> +import $ from 'jquery'; import { - querySitePointCount, - querySitePoint, - queryMarkerCount, - queryMarker, - queryStationSeries, - queryStationSeriesCount, - UpdateSitePoint, - UpdateStationSeries, - UpdatgeMarker, - dltSitePoint, - dltStationSeries, - dltMarker, -} from "../../api/api"; + dataQuery_selectTabs, + dataQuery_selectDomains, + dataQuery_selectFields, + dataQuery_selectByPage, +} from '../../api/api'; -import catalogueTree from "../../components/catalogueTree.vue"; -import MyBread from "../../components/MyBread.vue"; +import catalogueTree from '../../components/catalogueTree.vue'; +import MyBread from '../../components/MyBread.vue'; export default { //import寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� - name: "dataSearch", + name: 'dataSearch', components: { MyBread, catalogueTree }, data() { return { - data: [ + formInline: { + file:'' + }, + tree: [ { - id: 1, - label: "绌洪棿鍏ュ簱鏁版嵁", - children: [ - { - label: "鍦虹珯鐐�", - }, - { - label: "绠¢亾涓績绾�", - }, - { - label: "鏍囨々", - }, - ], + tabDesc: '鍩虹鏁版嵁', + value: 'BD', + children: [], + }, + { + tabDesc: '涓氬姟鏁版嵁', + value: 'BS', + children: [], }, ], - FBtest: false, - formLabelWidth: "120px", - dialogFormVisible: false, - upform: { - gid: "", - pipename: "", - sitename: "", - type: "", - seriesname: "", - stationvalue: "", - transportm: "", - diameter: "", - name: "", - }, - tableType: null, defaultProps: { - children: "children", - label: "label", + children: 'children', + label: 'tabDesc', }, - changePag: true, - showinfoBox: false, - itemdetail: {}, - ruleForm: { - name: "", - }, - count: 0, - pageSize: 10, - pageNum: 1, - tableData: [], - currentPage: 1, - searchName: "", - multipleSelection: [], btnStatus: { select: false, delete: false, @@ -365,60 +245,168 @@ insert: false, update: false, }, + tableType: null, + ruleForm: { + name: '', + }, + FBtest: false, + tableData: [], + formLabelWidth: '120px', + dialogFormVisible: false, + upform: { + gid: '', + pipename: '', + sitename: '', + type: '', + seriesname: '', + stationvalue: '', + transportm: '', + diameter: '', + name: '', + }, + + changePag: true, + showinfoBox: false, + itemdetail: {}, + + tableData: [], + attributeData: [], + currentPage: 1, + searchName: '', + multipleSelection: [], + filedsLayer: null, + count: 0, + listData: { + pageSize: 10, + pageIndex: 1, + name: null, + filter: null, + wkt: null, + }, }; }, created() { // this.getSPData(10, 1, ""); // this.getSPCount(""); this.showPermsBtn(); + this.getTreeDataAll(); }, methods: { + //闄勪欢=>鏂囦欢閫夋嫨 + getInsertFile(){ + $("#insertFile").click(); + }, + insertFile(){ + var val = document.getElementById("insertFile").files; + if (!val || !val.length) return; + + this.formInline.file = val[0].name; + }, + //鑾峰彇鐩綍鏍戞暟鎹� + async getTreeDataAll() { + const data = await dataQuery_selectTabs(); + if (data.code != 200) { + this.$message.error('鍒楄〃璋冪敤澶辫触'); + } + var option = data.result; + + for (var i in option) { + var val_Data = option[i]; + val_Data.id = '1' + i; + if (option[i].ns == 'bd') { + this.tree[0].children.push(val_Data); + } else { + this.tree[1].children.push(val_Data); + } + } + }, + //鎺堟潈绠$悊 showPermsBtn() { let currentPerms = this.$store.state.currentPerms; let permsEntity = this.$store.state.permsEntity; permsEntity .filter((item) => item.perms == currentPerms) - .map((item) => (this.btnStatus[item.tag.substr(1)] = true)); + .map((item) => { + console.log(item); + this.btnStatus[item.tag.substr(1)] = true; + }); }, + //鏍戠偣鍑讳簨浠� handleNodeClick(data) { - this.closeDetial(); - this.changePag = false; - this.tableData = []; - this.currentPage = 1; - switch (data.label) { - case "绌洪棿鍏ュ簱鏁版嵁": - this.tableType = null; - // this.$nextTick(() => { - // this.changePag = true; - // }); - break; - case "鍦虹珯鐐�": - this.tableType = "鍦虹珯鐐�"; - this.getSPData(10, 1, ""); - this.getSPCount(""); - // this.$nextTick(() => { - // this.changePag = true; - // }); - break; - case "绠¢亾涓績绾�": - this.tableType = "绠¢亾涓績绾�"; - this.getSSData(10, 1, ""); - this.getSSCount(""); - // this.$nextTick(() => { - // this.changePag = true; - // }); - break; - case "鏍囨々": - this.tableType = "鏍囨々"; - this.getMData(10, 1, ""); - this.getMCount(""); - break; - } - this.$nextTick(() => { - this.changePag = true; - }); + //鍒ゆ柇鐐瑰嚮鏄惁涓哄瓙鑺傜偣 + if (data.children != null) return; + this.listData.name = data.entity; //瑕佹煡璇㈣〃鏍肩被鍨嬶紱 + this.filedsLayer = this.getCollapseDomFiled(); //鑾峰彇姣忎釜琛ㄥ瓧娈靛悕绉板強闃堝�� + //鑾峰彇table淇℃伅 + this.getCollapseTable(this.filedsLayer); }, + //鑾峰彇琛ㄦ牸淇℃伅 + async getCollapseTable(res) { + res.then((val) => { + this.attributeData = val; + }); + if (this.ruleForm.name != null) { + this.listData.filter = 'name like ' + this.ruleForm.name; + } + const data = await dataQuery_selectByPage(this.listData); + if (data.code != 200) { + this.$message.error('璋冪敤鍒楄〃澶辫触,璇疯仈绯诲伐浣滀汉鍛�!'); + return; + } + var res_val = this.attributeData; + this.count = data.count; + for (var i in data.result) { + let val_Data = data.result[i]; + for (var j in res_val) { + if (res_val[j].domainNa != null && res_val[j].domainNa != undefined) { + val_Data[res_val[j].field] = res_val[j].domainNa; + } + } + } + this.tableData = data.result; + }, + //鑾峰彇姣忎釜琛ㄥ瓧娈靛悕绉板強闃堝�� + async getCollapseDomFiled() { + //鏌ヨ瀛楁淇℃伅; + const fileds = await dataQuery_selectFields({ + name: this.listData.name, + }); + if (fileds.code != 200) { + this.$message.error('璋冪敤鍒楄〃澶辫触,璇疯仈绯诲伐浣滀汉鍛�!'); + return; + } + + //鏌ヨ闃堝�间俊鎭紱 + const domains = await dataQuery_selectDomains({ + name: this.listData.name, + }); + if (domains.code != 200) { + this.$message.error('璋冪敤鍒楄〃澶辫触,璇疯仈绯诲伐浣滀汉鍛�!'); + return; + } + var data1 = fileds.result; + var data2 = domains.result; + var std = []; + for (var i in data1) { + if (data1[i].showtype == 1) { + if (data1[i].domainNa != null) { + data1[i].domainNa = this.getDomainNaFild(data1[i].domainNa, data2); + } + std.push(data1[i]); + } + } + return std; + }, + //鍊煎煙瀛楁鍖归厤 + getDomainNaFild(res, result) { + for (var i in result) { + if (result[i].domName == res) { + return result[i].codeDesc; + } + } + return null; + }, // 璇锋眰鍦虹珯鐐瑰唴瀹� getSPData(size, num, name) { querySitePoint(size, num, name).then((res) => { @@ -458,48 +446,30 @@ }, // 鍏抽敭瀛楁煡璇� - submitForm(formName) { - this.$refs[formName].validate((valid) => { - if (valid) { - this.searchName = this.ruleForm.name.trim(); - switch (this.tableType) { - case "鍦虹珯鐐�": - this.getSPData(10, 1, this.searchName); - this.getSPCount(this.searchName); - break; - case "绠¢亾涓績绾�": - this.getSSData(10, 1, this.searchName); - this.getSSCount(this.searchName); - break; - case "鏍囨々": - this.getMData(10, 1, this.searchName); - this.getMCount(this.searchName); - break; - } - } else { - console.log("error submit!!"); - return false; - } - }); + submitForm() { + this.listData.pageIndex = 1; + this.listData.pageSize = 10; + //鑾峰彇table淇℃伅 + this.getCollapseTable(this.filedsLayer); + }, + //鍒嗛〉鐐瑰嚮浜嬩欢 + handleSizeChange(val) { + this.listdata.pageSize = val; + this.listdata.pageIndex = 1; + //鑾峰彇table淇℃伅 + this.getCollapseTable(this.filedsLayer); + }, + handleCurrentChange(val) { + this.listdata.pageIndex = val; + //鑾峰彇table淇℃伅 + this.getCollapseTable(this.filedsLayer); }, // 閲嶇疆鏌ヨ resetForm(formName) { - this.searchName = ""; + this.searchName = ''; this.$refs[formName].resetFields(); - switch (this.tableType) { - case "鍦虹珯鐐�": - this.getSPData(10, 1, ""); - this.getSPCount(""); - break; - case "绠¢亾涓績绾�": - this.getSSData(10, 1, ""); - this.getSSCount(""); - break; - case "鏍囨々": - this.getMData(10, 1, ""); - this.getMCount(""); - break; - } + //鑾峰彇table淇℃伅 + this.getCollapseTable(this.filedsLayer); }, // 鍙戝竷鎸夐挳 @@ -513,9 +483,9 @@ // .then(() => { const loading = this.$loading({ lock: true, - text: "Loading", - spinner: "el-icon-loading", - background: "rgba(0, 0, 0, 0.7)", + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)', }); setTimeout(() => { loading.close(); @@ -527,9 +497,18 @@ }, // 鏌ョ湅鐣岄潰 showDetail(index, row) { - // console.log(index, row); + console.log(index, row); + console.log(this.attributeData); this.showinfoBox = true; - this.itemdetail = row; + + var std = []; + for (var i in this.attributeData) { + std.push({ + label: this.attributeData[i].alias, + value: row[this.attributeData[i].field], + }); + } + this.itemdetail = std; }, // 鍏抽棴鏌ョ湅 closeDetial() { @@ -545,15 +524,15 @@ // 鎻愪氦淇敼 updateForm() { let params = {}; - this.$confirm("鏄惁纭畾缂栬緫?", "鎻愮ず", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "warning", + this.$confirm('鏄惁纭畾缂栬緫?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning', }) .then(() => { this.dialogFormVisible = false; switch (this.tableType) { - case "鍦虹珯鐐�": + case '鍦虹珯鐐�': params = { gid: this.upform.gid, pipename: this.upform.pipename, @@ -563,15 +542,15 @@ UpdateSitePoint(params).then((res) => { if (res.data == 1) { this.$message({ - message: "淇敼鎴愬姛", - type: "success", + message: '淇敼鎴愬姛', + type: 'success', }); } - this.getSPData(10, 1, ""); - this.getSPCount(""); + this.getSPData(10, 1, ''); + this.getSPCount(''); }); break; - case "绠¢亾涓績绾�": + case '绠¢亾涓績绾�': params = { gid: this.upform.gid, pipename: this.upform.pipename, @@ -583,15 +562,15 @@ UpdateStationSeries(params).then((res) => { if (res.data == 1) { this.$message({ - message: "淇敼鎴愬姛", - type: "success", + message: '淇敼鎴愬姛', + type: 'success', }); } - this.getSSData(10, 1, ""); - this.getSSCount(""); + this.getSSData(10, 1, ''); + this.getSSCount(''); }); break; - case "鏍囨々": + case '鏍囨々': params = { gid: this.upform.gid, pipename: this.upform.pipename, @@ -601,12 +580,12 @@ UpdatgeMarker(params).then((res) => { if (res.data == 1) { this.$message({ - message: "淇敼鎴愬姛", - type: "success", + message: '淇敼鎴愬姛', + type: 'success', }); } - this.getMData(10, 1, ""); - this.getMCount(""); + this.getMData(10, 1, ''); + this.getMCount(''); }); break; } @@ -621,7 +600,7 @@ // this.getMetaCount(""); // }); }) - .catch(() => {}); + .catch(() => { }); }, // 鑾峰彇澶氶�夐�変腑鐨勫璞� handleSelectionChange(val) { @@ -633,47 +612,47 @@ for (var i in this.multipleSelection) { std.push(this.multipleSelection[i].gid); } - this.$confirm("纭畾鏄惁鍒犻櫎鎵�閫夊唴瀹�?", "鎻愮ず", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "warning", + this.$confirm('纭畾鏄惁鍒犻櫎鎵�閫夊唴瀹�?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning', }) .then(() => { switch (this.tableType) { - case "鍦虹珯鐐�": + case '鍦虹珯鐐�': dltSitePoint(std).then((res) => { if (res.data !== 0) { this.$message({ - message: "鍒犻櫎鎴愬姛", - type: "success", + message: '鍒犻櫎鎴愬姛', + type: 'success', }); } - this.getSPData(10, 1, ""); - this.getSPCount(""); + this.getSPData(10, 1, ''); + this.getSPCount(''); }); break; - case "绠¢亾涓績绾�": + case '绠¢亾涓績绾�': dltStationSeries(std).then((res) => { if (res.data !== 0) { this.$message({ - message: "鍒犻櫎鎴愬姛", - type: "success", + message: '鍒犻櫎鎴愬姛', + type: 'success', }); } - this.getSSData(10, 1, ""); - this.getSSCount(""); + this.getSSData(10, 1, ''); + this.getSSCount(''); }); break; - case "鏍囨々": + case '鏍囨々': dltMarker(std).then((res) => { if (res.data !== 0) { this.$message({ - message: "鍒犻櫎鎴愬姛", - type: "success", + message: '鍒犻櫎鎴愬姛', + type: 'success', }); } - this.getMData(10, 1, ""); - this.getMCount(""); + this.getMData(10, 1, ''); + this.getMCount(''); }); break; } @@ -686,48 +665,7 @@ // }); // }); }) - .catch(() => {}); - }, - // 鏉℃暟淇敼 - handleSizeChange(val) { - this.pageSize = val; - switch (this.tableType) { - case "绌洪棿鍏ュ簱鏁版嵁": - break; - case "鍦虹珯鐐�": - this.getSPData(this.pageSize, 1, ""); - this.getSPCount(""); - - break; - case "绠¢亾涓績绾�": - this.getSSData(this.pageSize, 1, ""); - this.getSSCount(""); - break; - case "鏍囨々": - this.getMData(this.pageSize, 1, ""); - this.getMCount(""); - break; - } - }, - // 椤垫暟淇敼 - handleCurrentChange(val) { - this.pageNum = val; - switch (this.tableType) { - case "绌洪棿鍏ュ簱鏁版嵁": - break; - case "鍦虹珯鐐�": - this.getSPData(this.pageSize, this.pageNum, ""); - this.getSPCount(""); - break; - case "绠¢亾涓績绾�": - this.getSSData(this.pageSize, this.pageNum, ""); - this.getSSCount(""); - break; - case "鏍囨々": - this.getMData(this.pageSize, this.pageNum, ""); - this.getMCount(""); - break; - } + .catch(() => { }); }, }, }; diff --git a/src/views/datamanage/metadataManage.vue b/src/views/datamanage/metadataManage.vue index afecd65..2b2f1fb 100644 --- a/src/views/datamanage/metadataManage.vue +++ b/src/views/datamanage/metadataManage.vue @@ -10,10 +10,7 @@ <div class="inquire"> <el-form ref="queryForm" :model="queryForm" :inline="true"> <el-form-item label="鍏抽敭瀛�" prop="name"> - <el-input - v-model="queryForm.name" - :placeholder="$t('common.pleaseInput')" - /> + <el-input v-model="queryForm.name" placeholder="璇疯緭鍏�" /> </el-form-item> <el-form-item> <el-button @@ -648,6 +645,7 @@ } .infoBox { width: 500px; + border: 1px solid #eee; position: absolute; z-index: 100; diff --git a/src/views/exportMap/index.vue b/src/views/exportMap/index.vue new file mode 100644 index 0000000..7abb0e6 --- /dev/null +++ b/src/views/exportMap/index.vue @@ -0,0 +1,527 @@ +<template> + <div class="exportmap"> + <div id="mapView" class="mapView"> + <div class="topMenu"> + <el-form :inline="true" :model="formInline" class="demo-form-inline"> + <el-form-item> + <el-link + style="color: white" + @click="setLeftMenu" + :underline="false" + >鍥惧眰</el-link + > + </el-form-item> + <el-form-item> + <el-link + style="color: white" + @click="changeMenulayer" + :underline="false" + ><i class="el-icon-menu"></i>搴曞浘</el-link + > + </el-form-item> + <el-form-item> + <el-select v-model="value" 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-form-item> + <el-link style="color: white" :underline="false" + ><i class="el-icon-rank"></i> + </el-link> + </el-form-item> + <el-form-item> + <el-link + style="color: white" + @click="showMapApply = !showMapApply" + :underline="false" + >鍑哄浘鐢宠 + </el-link></el-form-item + > + <el-form-item> + <el-link + style="color: white" + @click="showMapList = true" + :underline="false" + >鍑哄浘鍒楄〃</el-link + ></el-form-item + > + <el-form-item label="鏃嬭浆"> + <el-input + v-model="formInline.role" + placeholder="璇疯緭鍏ュ唴瀹�" + ></el-input> + </el-form-item> + <el-form-item> + <el-button plain size="mini" @click="setMapRole">鏃嬭浆</el-button> + <el-button plain size="mini" @click="setMapAddDraw()" + >缁樺埗</el-button + > + <el-button plain size="mini" @click="setMapRemoveDraw()" + >娓呴櫎</el-button + > + </el-form-item> + </el-form> + </div> + <div class="leftMeu" v-if="showleftMenu"> + <div class="topHeader"> + <div style="float: left">鍥惧眰</div> + <div style="float: right"> + <el-link @click="showleftMenu = false" :underline="false" + ><i class="el-icon-close"></i + ></el-link> + </div> + <div style="float: right; margin-right: 5%"> + <el-link :underline="false" @click="changeRowType" + ><i + :class=" + rowtype == true ? 'el-icon-arrow-down' : 'el-icon-arrow-up' + " + ></i + ></el-link> + </div> + </div> + <div class="topContent" v-if="rowtype"> + <el-link + @click="dialogVisible = true" + style="color: white" + :underline="false" + > + <i class="el-icon-plus">娣诲姞</i></el-link + > + <el-divider /> + <el-tree + :data="data" + show-checkbox + node-key="id" + :props="defaultProps" + :default-expanded-keys="[1]" + @check-change="handleTreeNodeClick" + > + </el-tree> + </div> + </div> + <div v-drag class="mapApplay" v-if="showMapApply"> + <label>鍑哄浘鐢宠</label> + <el-divider /> + <el-form ref="form" :model="form" label-width="80px"> + <el-form-item label="鍑哄浘鍚嶇О"> + <el-input v-model="form.name"></el-input> + </el-form-item> + <el-form-item> + <el-table + ref="singleTable" + :data="tableData" + style="width: 100%" + height="200" + > + <el-table-column type="index" width="50"> </el-table-column> + <el-table-column property="date" label="鏃ユ湡" width="120"> + </el-table-column> + <el-table-column property="name" label="濮撳悕" width="120"> + </el-table-column> + <el-table-column property="address" label="鍦板潃"> + </el-table-column> + </el-table> + </el-form-item> + + <el-form-item> + <el-button type="primary" @click="setMapApply">绔嬪嵆鍒涘缓</el-button> + <el-button @click="showMapApply = false">鍙栨秷</el-button> + </el-form-item> + </el-form> + </div> + <div v-drag class="mapApplay" v-if="showMapList"> + <div> + <label>鍑哄浘鍒楄〃</label> + <div style="float: right"> + <el-link @click="showMapList = false" :underline="false" + ><i class="el-icon-close"></i + ></el-link> + </div> + <div style="float: right; margin-right: 20px"> + <el-button type="warning" size="mini" plain>鎵归噺涓嬭浇</el-button> + </div> + </div> + <el-divider /> + <el-table + ref="singleTable" + :data="tableData" + style="width: 100%" + height="200" + > + <el-table-column type="index" width="50"> </el-table-column> + <el-table-column property="date" label="鏃ユ湡" width="120"> + </el-table-column> + <el-table-column property="name" label="濮撳悕" width="120"> + </el-table-column> + <el-table-column property="address" label="鍦板潃"> </el-table-column> + </el-table> + </div> + <div + @click="changeMenulayer" + class="center CenDiv" + :class="{ center1: centerFlag }" + > + <div + id="cenBg" + v-bind:class="{ active: isActive, menuLayer: isMenuLayer }" + ></div> + </div> + </div> + <el-dialog + title="鎻愮ず" + :visible.sync="dialogVisible" + width="30%" + :before-close="handleClose" + > + <el-form ref="layerform" :model="layerform" label-width="80px"> + <el-form-item label="鏈嶅姟鍚嶇О"> + <el-input v-model="layerform.name"></el-input> + </el-form-item> + <el-form-item label="鏈嶅姟绫诲瀷"> + <el-radio-group v-model="layerform.type"> + <el-radio label="WMS"></el-radio> + </el-radio-group> + </el-form-item> + <el-form-item label="鏈嶅姟鍦板潃"> + <el-input type="textarea" v-model="layerform.resource"></el-input> + </el-form-item> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-button @click="dialogVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="setAddMapLayer">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import ImageWMS from 'ol/source/ImageWMS'; +import Map from 'ol/Map'; +import XYZ from 'ol/source/XYZ'; +import View from 'ol/View'; +import Image from 'ol/layer/Image'; +import TileLayer from 'ol/layer/Tile'; +import { transform } from 'ol/proj'; +import Draw, { createRegularPolygon, createBox } from 'ol/interaction/Draw.js'; +import { OSM, Vector as VectorSource } from 'ol/source'; +import { Vector as VectorLayer } from 'ol/layer'; +import LayerVector from 'ol/layer/Vector'; +import Style from 'ol/style/Style'; +import Fill from 'ol/style/Fill'; +import Stroke from 'ol/style/Stroke'; +import Circle from 'ol/style/Circle'; +import mapviewVue from '../../components/mapview.vue'; +export default { + data() { + return { + dialogVisible: false, + showleftMenu: false, + showMapApply: false, + showMapList: false, + centerFlag: false, + isActive: true, + isMenuLayer: false, + rowtype: true, + form: {}, + formInline: { role: '' }, + layerform: {}, + tableData: [], + options: [{}], + value: '', + data: [ + { + id: 1, + label: '鍥惧眰', + children: [], + }, + ], + defaultProps: { + children: 'children', + label: 'label', + }, + draw: null, + vector: null, + source: null, + }; + }, + mounted() { + this.initMap(); + }, + methods: { + setMapRemoveDraw() { + if (this.draw != null) { + mapView.removeLayer(this.vector); + } + }, + setMapAddDraw() { + this.setMapRemoveDraw(); + + this.source = new VectorSource({ wrapX: false }); + + this.vector = new VectorLayer({ + source: this.source, + }); + mapView.addLayer(this.vector); + + let type = 'Circle'; + let geometryFunction = createBox(); + this.draw = new Draw({ + source: this.source, + type, + geometryFunction, + }); + mapView.addInteraction(this.draw); + this.draw.on('drawend', (e) => { + let feature = e.feature; + let geom = feature.getGeometry(); + var extent = geom.getExtent(); + var a1 = transform([extent[0], extent[1]], 'EPSG:3857', 'EPSG:4326'); + var a2 = transform([extent[2], extent[3]], 'EPSG:3857', 'EPSG:4326'); + var std = [a1, a2]; + console.log(std); + + mapView.removeInteraction(this.draw); + }); + }, + setMapRole() { + var value = parseFloat(this.formInline.role); + var role = (Math.PI / 180) * value; + mapView.getView().setRotation(role); + }, + setMapApply() {}, + handleClose() {}, + handleTreeNodeClick(data, nodes) { + if (data.label == '鍥惧眰') return; + if (nodes == true) { + var wmsLayer = new Image({ + source: new ImageWMS({ + ratio: 1, + url: data.resource, + crossOrigin: 'anonymous', + //serverType: 'geoserver', + params: { + VERSION: '1.3.0', + FORMAT: 'image/png', + LAYERS: '', + srs: 'EPSG:900913', + tiled: true, + styles: '', + }, + }), + }); + wmsLayer.name = data.label; + mapView.addLayer(wmsLayer); + } else { + var len = mapView.getAllLayers(); + for (var i in len) { + var layer = mapView.getLayers().item(i); + if (layer.name == data.label) { + mapView.removeLayer(layer); + } + } + } + }, + setAddMapLayer() { + this.dialogVisible = false; + this.data[0].children.push({ + label: this.layerform.name, + type: this.layerform.type, + resource: this.layerform.resource, + }); + }, + + setLeftMenu() { + this.showleftMenu = true; + this.rowtype = true; + }, + //宸︿晶鑿滃崟鐐瑰嚮浜嬩欢 + changeRowType() { + this.rowtype = !this.rowtype; + }, + //鍦板浘鍒濆鍖� + initMap() { + var vectorLayer = new TileLayer({ + source: new XYZ({ + url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}', + }), + }); + var imageLayer = new TileLayer({ + source: new XYZ({ + url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=6&x={x}&y={y}&z={z}', + }), + }); + + window.mapView = new Map({ + target: 'mapView', + layers: [imageLayer, vectorLayer], + view: new View({ + center: transform([105.02, 34.9], 'EPSG:4326', 'EPSG:3857'), + zoom: 4, + projection: 'EPSG:3857', + }), + }); + this.formInline.role = mapView.getView().getRotation(); + }, + //鍒囨崲搴曞浘 + changeMenulayer() { + this.isActive = !this.isActive; + this.isMenuLayer = !this.isMenuLayer; + this.setLayerVisible(); + }, + setLayerVisible() { + if (this.isActive == true) { + mapView.getLayers().item(0).setVisible(false); + mapView.getLayers().item(1).setVisible(true); + } else { + mapView.getLayers().item(0).setVisible(true); + mapView.getLayers().item(1).setVisible(false); + } + }, + }, +}; +</script> + +<style lang="less"> +.exportmap { + width: 100%; + height: 100%; + background: white; + margin: 0; + padding: 0; + overflow: hidden; + .mapView { + width: 100%; + height: 100%; + .topMenu { + background: rgba(0, 0, 0, 0.5); + z-index: 40; + position: absolute; + left: 40%; + top: 3%; + padding-top: 1%; + padding-left: 1%; + padding-right: 1%; + } + .mapApplay { + width: 40%; + position: absolute; + background: rgba(0, 0, 0, 0.5); + z-index: 40; + top: 15%; + margin-left: 20%; + padding: 1%; + label { + color: white; + } + } + .mapList { + width: 40%; + position: absolute; + background: rgba(0, 0, 0, 0.5); + z-index: 40; + top: 15%; + margin-left: 20%; + padding: 1%; + } + .leftMeu { + position: absolute; + width: 13%; + z-index: 40; + top: 10%; + margin-left: 1%; + border-radius: 5px; + padding: 1%; + } + .topHeader { + padding: 5%; + background: rgba(0, 0, 0, 0.5); + width: 100%; + border-radius: 5px; + color: white; + height: 25px; + border: 1px solid gray; + } + .topContent { + background: rgba(0, 0, 0, 0.5); + width: 100%; + padding: 5%; + border-radius: 5px; + border: 1px solid gray; + } + + .el-icon-close { + color: white; + } + .el-icon-arrow-down { + color: white; + } + .el-icon-arrow-up { + color: white; + } + + .contentHeader { + border-top: 1px solid gray; + padding: 3%; + width: 94%; + color: white; + } + .center { + margin-left: 1%; + } + .CenDiv { + position: absolute; + bottom: 3%; + height: 40px; + width: 60px; + z-index: 101; + display: flex; + flex-direction: column; + justify-content: space-between; + box-shadow: 3px 3px 6px #666; + border: 1px solid rgba(204, 204, 204, 0.76); + border-radius: 5px; + cursor: pointer; + } + .center1 { + margin-left: 1%; + } + .right { + position: absolute; + top: 50px; + right: 0; + width: 20%; + height: calc(100% - 50px); + + display: flex; + flex-direction: column; + justify-content: space-between; + } + .CenDiv:hover { + border: 1px solid #409eff; + } + .active { + width: 100%; + height: 100%; + background: url('../../assets/img/Layer/imgLayer2.png') no-repeat center; + position: absolute; + background-size: 100% 100%; + border-radius: 5px; + } + .menuLayer { + width: 100%; + height: 100%; + background: url('../../assets/img/Layer/imgLayer1.png') no-repeat center; + position: absolute; + background-size: 100% 100%; + border-radius: 5px; + } + } +} +</style> diff --git a/src/views/maintenance/menuSettings.vue b/src/views/maintenance/menuSettings.vue index 75cbe2f..f34517f 100644 --- a/src/views/maintenance/menuSettings.vue +++ b/src/views/maintenance/menuSettings.vue @@ -183,7 +183,7 @@ <script> import MyBread from '../../components/MyBread.vue'; import { - queryMenuAll, + queryMenuTree, updateMenuTree, updateMenuTrees, queryMaxId, @@ -296,7 +296,7 @@ // queryMaxId().then((res) => { // this.id = res.data; // }); - queryMenuAll().then((res) => { + queryMenuTree().then((res) => { if (res.code == 200) { this.menuList = this.treeData(res.result); this.oriData = res.result; diff --git a/src/views/maintenance/mochaitmo.vue b/src/views/maintenance/mochaitmo.vue new file mode 100644 index 0000000..08322f0 --- /dev/null +++ b/src/views/maintenance/mochaitmo.vue @@ -0,0 +1,14 @@ +<template> + <div class="mochaitmo_Box"></div> +</template> + +<script> +export default {}; +</script> + +<style lang="less"> +.mochaitmo_Box { + width: 100%; + height: 100%; +} +</style> diff --git a/src/views/userManage/userInfoManage.vue b/src/views/userManage/userInfoManage.vue index 16508af..361dd6b 100644 --- a/src/views/userManage/userInfoManage.vue +++ b/src/views/userManage/userInfoManage.vue @@ -1013,6 +1013,7 @@ this.queryInfo(); }, showPermsMenu(res) { + console.log(res.tag); switch (res.tag) { case "/delete": this.menuStatus.delete = true; -- Gitblit v1.9.3