From 5d2106137232b0559a14a28165094f0e1b28d14f Mon Sep 17 00:00:00 2001 From: TreeWish <1131093754@qq.com> Date: 星期一, 20 二月 2023 18:11:14 +0800 Subject: [PATCH] Merge branch 'master' of http://103.85.165.99:8989/r/LFWEB_NEW --- src/views/datamanage/metadataManage.vue | 817 +++---- src/assets/img/lg_03.png | 0 src/views/Archive/index.vue | 185 + src/views/datamanage/projectManage.vue | 195 src/views/Synthesis/LeftMenu.vue | 34 src/views/maintenance/userManagement.vue | 195 + src/assets/css/content.css | 11 src/views/datamanage/styleManage.vue | 201 + src/components/MapView/mapSpaceTop.vue | 100 src/api/api.js | 4 src/views/AuthorizationManagement/menuRoleAuthorization.vue | 201 + src/views/datamanage/dictionaryManage.vue | 688 ++--- src/views/Thematic/index.vue | 23 src/views/Archive/dataApplication.vue | 2 src/views/maintenance/downlog.vue | 69 src/views/userManage/roleManage.vue | 193 + src/views/exportMap/index.vue | 2 public/index.html | 168 src/views/AuthorizationManagement/userRoleAuthorization.vue | 311 +- src/views/AuthorizationManagement/roleResAuthorization.vue | 12 src/components/login.vue | 22 src/views/AuthorizationManagement/roleMenuAuthorization.vue | 11 src/components/MapView/mapMenuPop.vue | 9 src/views/Tools/queryinfo.vue | 12 src/components/Screen/left.vue | 3 src/views/datamanage/dataUpdata.vue | 1087 +++++---- src/views/datamanage/SpatialData.vue | 64 src/assets/lang/zh.js | 21 src/views/Tools/LayerTree.vue | 39 src/assets/css/global.css | 1 src/views/userManage/orgManage.vue | 2 src/components/MapView/mapMenuTop.vue | 18 src/views/datamanage/versionManage.vue | 563 ++-- src/views/datamanage/catalogueManage.vue | 452 ++- src/assets/lang/en.js | 13 src/views/datamanage/domainManage.vue | 343 +-- src/components/MapView/mapSpacePop.vue | 136 37 files changed, 3,398 insertions(+), 2,809 deletions(-) diff --git a/public/index.html b/public/index.html index 107f6f9..7a800e2 100644 --- a/public/index.html +++ b/public/index.html @@ -1,83 +1,99 @@ <!DOCTYPE html> <html lang=""> - <head> - <meta charset="utf-8" /> - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <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" /> +<head> + <meta charset="utf-8" /> - <script src="./SmartEarthSDK/Workers/polyfill.min.js"></script> - <script src="./SmartEarthSDK/Cesium/Cesium.js"></script> - <script src="./SmartEarthSDK/SmartEarth.min.js"></script> - <script src="./SmartEarthSDK/Workers/TreeTool.js"></script> - <script src="./config/config.js"></script> - <script src="./config/rsa.min.js"></script> - <script src="./config/rollups.js"></script> + <meta name="viewport" content="width=device-width,initial-scale=1.0" /> - <style> - .esriControlsBR { - display: none; - } - .ol-overlaycontainer-stopevent { - /* display: none; */ - } - .ol-control button { - display: block; - margin: 1px; - padding: 0; - color: rgb(102, 102, 102); - font-weight: bold; - text-decoration: none; - font-size: inherit; - text-align: center; - height: 1.375em; - width: 1.375em; - line-height: 0.4em; - background-color: #fff; - border: none; - border-radius: 2px; - } - .ol-full-screen { - display: none; - position: absolute; - right: 0.5em; - top: 0.5em; - } - .ol-rotate { - display: none; - position: absolute; - top: 3em; - right: 0.5em; - transition: opacity 0.25s linear, visibility 0s linear; - } - .ol-scale-line { - display: none; - right: 0.3em; - bottom: 0.5em; - position: absolute; - } - .ol-scale-line-inner { - /* padding: 5px 10px; */ - color: rgb(102, 102, 102); - font-weight: bold; - background-color: #fff; - text-align: center; - border-radius: 5px; - } - .ol-zoom { - display: none; - right: 0.3em; - bottom: 3em; - position: absolute; - } - </style> - </head> + <meta http-equiv="Expires" content="0" /> + <meta http-equiv="Cache" content="no-cache" /> + <meta http-equiv="Pragma" content="no-cache" /> + <meta http-equiv="Cache-control" content="no-cache" /> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> + <title> </title> - <body> - <div id="app"></div> - </body> -</html> + <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> + <script src="./SmartEarthSDK/Workers/TreeTool.js"></script> + <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; */ + } + + .ol-control button { + display: block; + margin: 1px; + padding: 0; + color: rgb(102, 102, 102); + font-weight: bold; + text-decoration: none; + font-size: inherit; + text-align: center; + height: 1.375em; + width: 1.375em; + line-height: 0.4em; + background-color: #fff; + border: none; + border-radius: 2px; + } + + .ol-full-screen { + display: none; + position: absolute; + right: 0.5em; + top: 0.5em; + } + + .ol-rotate { + display: none; + position: absolute; + top: 3em; + right: 0.5em; + transition: opacity 0.25s linear, visibility 0s linear; + } + + .ol-scale-line { + display: none; + right: 0.3em; + bottom: 0.5em; + position: absolute; + } + + .ol-scale-line-inner { + /* padding: 5px 10px; */ + color: rgb(102, 102, 102); + font-weight: bold; + background-color: #fff; + text-align: center; + border-radius: 5px; + } + + .ol-zoom { + display: none; + right: 0.3em; + bottom: 3em; + position: absolute; + } + </style> +</head> + +<body> + <div id="app"></div> +</body> + +</html> \ No newline at end of file diff --git a/src/api/api.js b/src/api/api.js index 3a8f37d..365999d 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -701,7 +701,7 @@ //璧勬枡棣�=>鍒嗛〉鏌ヨ鍏冩暟鎹� export function dataLib_selectByPageForMeta(params) { - return request.get('/dataLib/selectByPageForMeta', { params: params }); + return request.get('/dataLib/selectMetasForPage', { params: params }); } //璧勬枡棣�=>鍒嗛〉鏌ヨ export function dataLib_selectDownloadFile(params) { @@ -937,7 +937,7 @@ //椤圭洰绠$悊鏌ヨ鐩綍 export function project_selectDirAll(params) { - return request.get('/project/selectDirRoot', { params: params }); + return request.get('/project/selectProject', { params: params }); } //椤圭洰绠$悊=銆嬫牴鎹洰褰旾D鏌ヨ export function project_selectByDirid(params) { diff --git a/src/assets/css/content.css b/src/assets/css/content.css index 1a2899e..358e39a 100644 --- a/src/assets/css/content.css +++ b/src/assets/css/content.css @@ -24,6 +24,9 @@ } /*鎷栨嫿鍖篸iv鏍峰紡*/ +.menuRoleAuthorization_resize, +.userRoleAuthorization_resize1, +.userRoleAuthorization_resize, .resize { cursor: col-resize; float: left; @@ -39,9 +42,15 @@ /*z-index: 99999;*/ font-size: 32px; color: white; + } - +.menuRoleAuthorization_resize{ + /* left: 10px; */ +} /*鎷栨嫿鍖洪紶鏍囨偓鍋滄牱寮�*/ +.menuRoleAuthorization_resize, +.userRoleAuthorization_resize1, +.userRoleAuthorization_resize, .resize:hover { color: #444444; } diff --git a/src/assets/css/global.css b/src/assets/css/global.css index 5a1435c..1f770e0 100644 --- a/src/assets/css/global.css +++ b/src/assets/css/global.css @@ -52,6 +52,7 @@ .flex_box{ display: flex; flex-wrap: wrap; + align-items: center; } .table_box { diff --git a/src/assets/img/lg_03.png b/src/assets/img/lg_03.png new file mode 100644 index 0000000..9b4ff35 --- /dev/null +++ b/src/assets/img/lg_03.png Binary files differ diff --git a/src/assets/lang/en.js b/src/assets/lang/en.js index 9b6bd87..228e3d1 100644 --- a/src/assets/lang/en.js +++ b/src/assets/lang/en.js @@ -97,11 +97,13 @@ selectMetadata: 'Select Metadata', entryName: 'Entry Name', selectWBSData: 'Select WBS Data', - - coordinateSystem: 'Coordinate System' + coordinateSystem: 'Coordinate System', + fileExtension:"File extension", + inspectionItems:"Inspection items", + code:'Code' }, - metadataManage: 'metadataManage', + metadataManage: 'Source Data Management', dataLoading: 'dataLoading', SpatialData: 'SpatialData', versionManage: 'versionManage', @@ -509,6 +511,8 @@ type2: 'Thematic map', type3: 'Metadata', type4: 'Business data', + type5: 'Pipeline analysis', + type6: 'Statistical report', }, dataApply: { type1: 'Cancel', @@ -520,7 +524,8 @@ status: 'status', careatetime: 'Date of application', ReApply: 'Re apply', - details: 'details' + details: 'details', + ApplicationCancel: "Application Cancel", }, loglog: { serialnumber: 'Serial Number', diff --git a/src/assets/lang/zh.js b/src/assets/lang/zh.js index 02549d3..44bc28f 100644 --- a/src/assets/lang/zh.js +++ b/src/assets/lang/zh.js @@ -1,6 +1,6 @@ const zh = { common: { - bak:'澶囨敞', + bak: '澶囨敞', domCode: '缂栫爜', confirm: '纭', choose: '璇烽�夋嫨', @@ -41,7 +41,7 @@ size: '澶у皬', versionName: '鐗堟湰鍚嶇О', type: '绫诲瀷', - fileType:'鏂囦欢绫诲瀷', + fileType: '鏂囦欢绫诲瀷', quayTest: '璐ㄦ', md5: 'MD5鐮�', lineNuber: '琛屾暟', @@ -94,13 +94,13 @@ selectData: '閫夋嫨鏁版嵁', selectMetadata: '閫夋嫨鍏冩暟鎹�', entryName: '椤圭洰鍚嶇О', - - selectWBSData: '閫夋嫨WBS鏁版嵁', - - coordinateSystem: '鍧愭爣绯�' + coordinateSystem: '鍧愭爣绯�', + fileExtension: "鏂囦欢鎵╁睍鍚�", + inspectionItems: "妫�鏌ラ」", + code: '缂栫爜' }, - metadataManage: '鍏冩暟鎹鐞�', + metadataManage: '婧愭暟鎹鐞�', dataLoading: '鏁版嵁鍏ュ簱', SpatialData: '绌洪棿鏁版嵁绠$悊', versionManage: '鐗堟湰绠$悊', @@ -424,7 +424,7 @@ synthesis: { import: '瀵煎叆KML', export: '瀵煎嚭KML', - import1:'瀵煎叆SHP', + import1: '瀵煎叆SHP', export1: '瀵煎嚭SHP', pipelineAnalysis: '绠¢亾鍒嗘瀽', synthesis: '缁煎悎灞曠ず', @@ -518,13 +518,16 @@ status: '鐘舵��', careatetime: '鐢宠鏃ユ湡', ReApply: '閲嶆柊鐢宠', - details: '璇︽儏' + details: '璇︽儏', + ApplicationCancel: "鐢宠鍙栨秷", }, downlog: { type1: 'Shp鏂囦欢', type2: '涓撻鍥�', type3: '鍏冩暟鎹�', type4: '涓氬姟鏁版嵁', + type5: '绠¢亾鍒嗘瀽', + type6: '缁熻鎶ュ憡', }, loglog: { serialnumber: '搴忓彿', diff --git a/src/components/MapView/mapMenuPop.vue b/src/components/MapView/mapMenuPop.vue index dde75e2..a862f2a 100644 --- a/src/components/MapView/mapMenuPop.vue +++ b/src/components/MapView/mapMenuPop.vue @@ -359,7 +359,7 @@ this.ruleForm.wkt = decr(this.listdata.wkt) this.ruleForm.tabs = this.option; this.dialogInsertVisible = true; - } + }download }, async signGetPublicKey() { @@ -474,6 +474,7 @@ } this.$store.state.queryInfo = []; if (this.$store.state.primitLayer != null) { + sgworld.Viewer.entities.remove(this.$store.state.primitLayer); sgworld.Creator.DeleteObject(this.$store.state.primitLayer); this.$store.state.primitLayer = null; } @@ -669,19 +670,20 @@ } }, primitivesAddLayer(res) { - debugger + switch (res.type) { case "Point": var val = Cesium.Cartesian3.fromDegrees( res.coordinates[0], res.coordinates[1], - 200 + ); var point = Viewer.entities.add({ position: val, billboard: { // 鍥惧儚鍦板潃锛孶RI鎴朇anvas鐨勫睘鎬� image: SmartEarthRootUrl + "Workers/image/mark.png", + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 澶у皬鏄惁浠ョ背涓哄崟浣� sizeInMeters: false, // 鐩稿浜庡潗鏍囩殑鍨傜洿浣嶇疆 @@ -694,6 +696,7 @@ show: true } }); + point.billboard.disableDepthTestDistance = Number.POSITIVE_INFINITY; this.$store.state.queryInfo.push(point) break; case "LineString": diff --git a/src/components/MapView/mapMenuTop.vue b/src/components/MapView/mapMenuTop.vue index 3ad1f8f..25f6627 100644 --- a/src/components/MapView/mapMenuTop.vue +++ b/src/components/MapView/mapMenuTop.vue @@ -108,7 +108,7 @@ <script> import queryinfo from "../../views/Tools/queryinfo.vue" import $ from 'jquery'; -import { inquiry_SelectTabs, inquiry_uploadShp, encr } from '../../api/api.js'; +import { inquiry_SelectTabs, inquiry_uploadShp, encr, dataLib_selectTabs } from '../../api/api.js'; import { getToken } from '@/utils/auth'; import * as turf from '@turf/turf'; export default { @@ -187,12 +187,18 @@ } }, async getAllTable() { - const data = await inquiry_SelectTabs(); + const data = await dataLib_selectTabs({ + pageIndex: 1, + pageSize: 500 + }); if (data.code != 200) { this.$message.error('鍒楄〃璋冪敤澶辫触'); } - var option = data.result; - + var option = data.result.filter((res) => { + if (res.rows != 0) { + return res; + } + }) for (var i in option) { var val_Data = option[i]; val_Data.id = '1' + i; @@ -236,6 +242,7 @@ formData.append(val[i].name, val[i]); // fs.files[i].name,file } } + if (count != 4) { this.$message({ @@ -255,7 +262,8 @@ if (rs.code !== 200) { return this.$message.error('鐢ㄦ埛瑙掕壊璇锋眰閿欒'); } - this.$store.state.mapMenuShpFile = rs.result; + + this.$store.state.mapMenuShpFile = rs.result.wkt; this.showMapMenuPop(); }, error: (e) => { diff --git a/src/components/MapView/mapSpacePop.vue b/src/components/MapView/mapSpacePop.vue index 8a265ff..37ef809 100644 --- a/src/components/MapView/mapSpacePop.vue +++ b/src/components/MapView/mapSpacePop.vue @@ -45,12 +45,14 @@ ></el-input> </el-form-item> <el-form-item> - <el-button size="small" + <el-button + size="small" plain @click="setSpaceTableLayer" >鏌ヨ</el-button> <el-button - plain size="small" + plain + size="small" @click="restSpacePopLayer" >閲嶇疆</el-button> </el-form-item> @@ -140,6 +142,11 @@ attributeData: [], optionx: [], options: [], + conditions: [ + ['<>', 'like'], + ['>=', '>', ' =', '<=', '<', '<>'], + ['>=', '<='], + ], options1: [ { value: '=', @@ -220,15 +227,35 @@ this.showSpacePopLayer(); }, changeValue(value) { + var obj = {}; obj = this.optionx.find(function (item) { - return item.value === value; + return item.field === value; }); - if (obj.type == 'serial' || obj.type == 'int') { - this.options = this.options2; + // debugger + // if (obj.type == 'serial' || obj.type == 'int') { + // this.options = this.options2; + // } else { + // this.options = this.options1; + // } + this.options = []; + + var std = []; + + if (obj.type == "text" || obj.type == "blob") { + std = this.conditions[0]; + } else if (obj.type == "date" || obj.type == "datetime") { + std = this.conditions[2]; } else { - this.options = this.options1; + std = this.conditions[1]; } + for (var i in std) { + this.options.push({ + label: std[i], + value: std[i], + }); + } + this.formInline.region = this.options[0].value; }, setListDataStart() { @@ -240,11 +267,22 @@ showSpacePopLayer() { let val_date = this.optionx[0]; this.formInline.name = val_date.field; - if (val_date.type == 'serial' || val_date.type == 'int') { - this.options = this.options2; + this.options = []; + var std = []; + if (val_date.type == "text" || val_date.type == "blob") { + std = this.conditions[0]; + } else if (val_date.type == "date" || val_date.type == "datetime") { + std = this.conditions[2]; } else { - this.options = this.options1; + std = this.conditions[1]; } + for (var i in std) { + this.options.push({ + label: std[i], + value: std[i], + }); + } + this.formInline.region = this.options[0].value; this.getSpaceTableLayer(); }, @@ -336,6 +374,7 @@ var val1 = decr(data.result); if (val1) { if (this.$store.state.primitLayer != null) { + sgworld.Viewer.entities.remove(this.$store.state.primitLayer); sgworld.Creator.DeleteObject(this.$store.state.primitLayer); this.$store.state.primitLayer = null; } @@ -352,37 +391,63 @@ this.getSpaceTableLayer(); }, setMapLoaction(res) { - if (this.$store.state.primitLayer != null) { - sgworld.Creator.DeleteObject(this.$store.state.primitLayer); - this.$store.state.primitLayer = null; - } + if (this.$store.state.primitLayer != null) { + sgworld.Creator.DeleteObject(this.$store.state.primitLayer); + // this.$store.state.primitLayer = null; + sgworld.Viewer.entities.remove(this.$store.state.primitLayer); + this.$store.state.primitLayer = null; + } var coord = res.coordinates; if (res.type == 'Point') { - this.$store.state.primitLayer = sgworld.Creator.CreateLabel( - { X: coord[0], Y: coord[1], Altitude: 2000 }, - '', - SmartEarthRootUrl + 'Workers/image/mark.png', - { - disableDepthTestDistance: Infinity, - scale: 0.8, - }, - 0, - '宸℃鐐�' + var val = Cesium.Cartesian3.fromDegrees( + res.coordinates[0], + res.coordinates[1], + ); - sgworld.Navigate.flyToObj(this.$store.state.primitLayer.item); - } else if (res.type == 'MultiPolygon') { + this.$store.state.primitLayer = Viewer.entities.add({ + position: val, + billboard: { + // 鍥惧儚鍦板潃锛孶RI鎴朇anvas鐨勫睘鎬� + image: SmartEarthRootUrl + "Workers/image/mark.png", + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, + // 澶у皬鏄惁浠ョ背涓哄崟浣� + sizeInMeters: false, + // 鐩稿浜庡潗鏍囩殑鍨傜洿浣嶇疆 + verticalOrigin: Cesium.VerticalOrigin.CENTER, + // 鐩稿浜庡潗鏍囩殑姘村钩浣嶇疆 + horizontalOrigin: Cesium.HorizontalOrigin.LEFT, + // 搴旂敤浜庡浘鍍忕殑缁熶竴姣斾緥銆傛瘮渚嬪ぇ浜庝細1.0鏀惧ぇ鏍囩锛岃�屾瘮渚嬪皬浜庝細1.0缂╁皬鏍囩銆� + scale: 1.0, + // 鏄惁鏄剧ず + show: true + } + }); + this.$store.state.primitLayer.billboard.disableDepthTestDistance = Number.POSITIVE_INFINITY; + + sgworld.Navigate.flyToObj(this.$store.state.primitLayer) + + } else if (res.type == 'MultiPolygon' || res.type == 'LineString') { var val = res.coordinates[0][0]; var std = []; for (var i in val) { - std.push({ x: val[i][0], y: val[i][1], z: 1000 }) + std.push({ x: val[i][0], y: val[i][1] }) } - this.$store.state.primitLayer = sgworld.Creator.createPolygon(std, { - fillColor: '#ffff00', - outlineColor: '#fff', - outlineWidth: 2 - }, 1, 0, "闈�"); - sgworld.Navigate.flyToObj(this.$store.state.primitLayer.item); + this.$store.state.primitLayer = Viewer.entities.add({ + polyline: { + positions: Cesium.Cartesian3.fromDegreesArray(std), + width: 5, + material: new Cesium.Color(1.0, 0.0, 0.0, 0.3), + clampToGround: true, + } + }) + + // this.$store.state.primitLayer = sgworld.Creator.createPolygon(std, { + // fillColor: '#ffff00', + // outlineColor: '#fff', + // outlineWidth: 2 + // }, 1, 0, "闈�"); + sgworld.Navigate.flyToObj(this.$store.state.primitLayer); } else if (res.type == 'MultiLineString') { var line = res.coordinates[0]; var std = []; @@ -390,7 +455,7 @@ std.push({ x: line[i][0], y: line[i][1], z: 1000 }) } - this.$store.state.primitLayer = sgworld.Creator.createPolyline(std, "#ffff00", 1, 0, "绾�"); + this.$store.state.primitLayer = sgworld.Creator.createPolyline(std, "#ffff00", 1, 0, "绾�"); sgworld.Navigate.flyToObj(this.$store.state.primitLayer.item); } }, @@ -412,19 +477,16 @@ } .rightTitle { padding: 5px; - + width: 100%; .boxClose { float: right; margin-right: 20px; - } } .bottomPage { position: absolute; bottom: 1%; } - - } </style> diff --git a/src/components/MapView/mapSpaceTop.vue b/src/components/MapView/mapSpaceTop.vue index c4f97a7..562c9a2 100644 --- a/src/components/MapView/mapSpaceTop.vue +++ b/src/components/MapView/mapSpaceTop.vue @@ -2,6 +2,20 @@ <div class="spaceBox"> <el-select v-model="menuTopFrom.queryLayer" + @change="menuTreeCheck" + placeholder="璇烽�夋嫨..." + filterable + > + <el-option + v-for="item in layerData" + :key="item.entity" + :label="item.tabDesc" + :value="item.entity" + > + </el-option> + </el-select> + <!-- <el-select + v-model="menuTopFrom.queryLayer" placeholder="璇烽�夋嫨..." > <el-option @@ -37,14 +51,14 @@ >閲嶇疆</el-button> </div> </el-option> - </el-select> + </el-select> --> <queryinfo ref="queryinfo" /> </div> </template> <script> import queryinfo from "../../views/Tools/queryinfo.vue" -import { inquiry_SelectTabs } from '../../api/api.js'; +import { inquiry_SelectTabs, dataLib_selectTabs } from '../../api/api.js'; export default { components: { queryinfo }, data() { @@ -53,20 +67,20 @@ queryLayer: '', }, layerData: [ - { - id: 1, - label: '鍩虹鏁版嵁', - tabDesc: '鍩虹鏁版嵁', - value: 'BD', - children: [], - }, - { - id: 2, - label: '鍩虹鏁版嵁', - tabDesc: '涓氬姟鏁版嵁', - value: 'BS', - children: [], - }, + // { + // id: 1, + // label: '鍩虹鏁版嵁', + // tabDesc: '鍩虹鏁版嵁', + // value: 'BD', + // children: [], + // }, + // { + // id: 2, + // label: '涓氬姟鏁版嵁', + // tabDesc: '涓氬姟鏁版嵁', + // value: 'BS', + // children: [], + // }, ], defaultProps: { children: 'children', @@ -80,29 +94,40 @@ }, methods: { async getAllTable() { - const data = await inquiry_SelectTabs(); + // const data = await inquiry_SelectTabs(); + const data = await dataLib_selectTabs({ + pageIndex: 1, + pageSize: 500 + }) 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; - val_Data.label = val_Data.tabDesc ; - if (option[i].ns == 'bd') { - this.layerData[0].children.push(val_Data); - } else { - this.layerData[1].children.push(val_Data); + this.layerData = option.filter((res) => { + if (res.rows != 0) { + return res; } - } + }) + + + // for (var i in option) { + // // console.log(option[i].tableType) + // var val_Data = option[i]; + // val_Data.id = '1' + i; + // val_Data.label = val_Data.tabDesc; + // if (option[i].ns == 'bd') { + // this.layerData[0].children.push(val_Data); + // } else { + // this.layerData[1].children.push(val_Data); + // } + // } }, getCheckedNodes() { this.$store.state.mapSpaceQueryLayer = this.mapSpaceQueryLayer; // this.$store.state.mapPopBoolean = true; this.$store.state.mapPopBoxFlag = '2'; - // this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close(); - this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("绌洪棿鏌ヨ", null, { + this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close(); + this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("灞炴��", null, { close: () => { if (this.$store.state.primitLayer != null) { @@ -120,17 +145,11 @@ this.menuTopFrom.queryLayer = null; this.$refs.treeForm.setCheckedKeys([]); }, - menuTreeCheck(node, list) { - if (list.checkedNodes.length > 0) { - this.menuTopFrom.queryLayer = node.tabDesc; - this.mapSpaceQueryLayer = node.entity; - if (list.checkedKeys.length == 2) { - //鍗曢�夊疄鐜� - this.$refs.treeForm.setCheckedKeys([node.id]); - } - } else { - this.menuid = null; - } + menuTreeCheck(value) { + + this.mapSpaceQueryLayer = value; + + this.getCheckedNodes(); }, }, }; @@ -146,5 +165,4 @@ } </style> <style lang="less" scoped> - </style> diff --git a/src/components/Screen/left.vue b/src/components/Screen/left.vue index 11b7732..2886037 100644 --- a/src/components/Screen/left.vue +++ b/src/components/Screen/left.vue @@ -60,12 +60,15 @@ this.ProjectreeDisplay = false; this.leftMessage = "init"; this.OpenLeftInitChart(); + this.$parent.ChangeWidth("leftView"); + }, //鎵撳紑宸ョ▼鏍� OpenLeftProjectTree() { this.ChartDisplay = false; this.ProjectreeDisplay = true; this.leftMessage = "projectree"; + this.$parent.ChangeWidth("leftTree"); }, //澶у睆鐣岄潰鍥捐〃 OpenLeftInitChart() { diff --git a/src/components/login.vue b/src/components/login.vue index bb7ee00..4e4c1af 100644 --- a/src/components/login.vue +++ b/src/components/login.vue @@ -25,14 +25,14 @@ v-bind:src="reportUrl" ></iframe> </div> - <div class="title_img"> + <div class="title_img"> <img - src="../assets/img/loginLogo.png" + src="../assets/img/lg_03.png" alt="" /> </div> <div class="login"> - + <div class="login_title"> <span>鐢ㄦ埛鐧诲綍</span> </div> @@ -82,6 +82,7 @@ ></el-input> </el-form-item> </el-col> + <el-col :span="6" @@ -274,7 +275,12 @@ }, startURL() { - this.reportUrl = window.location.origin + '/mapscreen/index.html'; + var url = window.location.href; + var testurl = ''; + if (url.indexOf('web') != -1) { + testurl = '/web'; + } + this.reportUrl = window.location.origin + testurl + '/mapscreen/index.html'; } }, created() { @@ -304,12 +310,12 @@ left: 1%; position: absolute; } - } .title_img { position: absolute; - left: 10%; - top:8%; + left: 17%; + top: 8%; + width: 20%; /* transform: translateX(-50%); */ } .title_img img { @@ -331,7 +337,7 @@ left: 75%; top: 45%; transform: translate(-50%, -40%); - background: rgba(255, 255, 255, 0.6); + background: rgba(255, 255, 255, 0.8); border-radius: 8px; } diff --git a/src/views/Archive/dataApplication.vue b/src/views/Archive/dataApplication.vue index 57bb3db..0174136 100644 --- a/src/views/Archive/dataApplication.vue +++ b/src/views/Archive/dataApplication.vue @@ -136,7 +136,7 @@ @click="handleApplyCancel(scope.$index, scope.row)" v-if="matchState(scope,/[]/)" plain - >{{$t('dataApply.type1')}}</el-button> + >{{$t('dataApply.ApplicationCancel')}}</el-button> <el-button type="warning" size="mini" diff --git a/src/views/Archive/index.vue b/src/views/Archive/index.vue index 3bf4906..dccea42 100644 --- a/src/views/Archive/index.vue +++ b/src/views/Archive/index.vue @@ -153,7 +153,7 @@ @change="handleChange1" :props="{ label: 'name', - value: 'id', + value: 'code', children: 'children', checkStrictly: true, emitPath: false, @@ -171,7 +171,7 @@ <el-button icon="el-icon-search" @click="searchDataLibSelectTabs" - size="mini" + size="small" >{{ $t('common.iquery') }}</el-button> @@ -179,7 +179,7 @@ icon="el-icon-refresh" @click="restDataLibSelectTabs" type="info" - size="mini" + size="small" >{{ $t('common.reset') }}</el-button> @@ -187,7 +187,7 @@ <el-form-item> <el-button @click="getSpaceMapVisibale" - size="mini" + size="small" >{{ $t('synthesis.rangequery') }}</el-button> @@ -195,7 +195,7 @@ <el-form-item> <el-button @click="getdownloadList" - size="mini" + size="small" >{{ $t('synthesis.DownloadList') }}</el-button> @@ -205,14 +205,14 @@ <div v-if="isMenuActive"> <ul> <li - v-for="(item, index) in dataType" + v-for="(item, index) in dataTypeList" :key="index" > <div class="menu_div" @click="getShowTable(item)" > - {{ item.tabDesc }} + {{ item.tabDesc }} <span style="margin-left:20px">{{item.rows}}鏉�</span> </div> </li> </ul> @@ -939,6 +939,7 @@ } }; return { + dataTypeList: [], loading: false, downloadLogVisible: false, downloadListVisible: false, @@ -1010,9 +1011,9 @@ listData: { pageIndex: 1, pageSize: 10, - depid: null, - dirid: null, - name: null + depcode: null, + dirs: null, + tab: null }, count: 0, count1: 0, @@ -1042,6 +1043,10 @@ pageSize: 10, count: 0, name: null, + }, + queryList: { + showList1: '', + showList2: '' } }; }, @@ -1108,10 +1113,14 @@ return; } this.downloadLogVisible = false; + var obj = { entities: [this.listTypeData.name], // bpachydrogeology,bhydrogeologyattach filter: this.listTypeData.filter, - pwd: encrypt.encrypt(this.codeForm.password) + pwd: encrypt.encrypt(this.codeForm.password), + depcodes: [this.listData.depcode], + dirs: this.listData.dirs + }; this.loading = true; var that = this; @@ -1198,6 +1207,20 @@ } } } + var std = ""; + for (var i in this.checkedEntryName) { + for (var j in this.showList1) { + if (this.showList1[j].name == this.checkedEntryName[i]) { + if (std.length != 0) { + std += "," + } + std += this.showList1[j].id + } + } + } + this.queryList.showList2 = std; + + this.getQueryShowListData(); }, handleCheckedDataTypeChange(res) { if (this.checkedDataType.indexOf(res.name) != -1) { @@ -1210,16 +1233,80 @@ } } } - + var std = ""; + for (var i in this.checkedDataType) { + for (var j in this.showList) { + if (this.showList[j].name == this.checkedDataType[i]) { + if (std.length != 0) { + std += "," + } + std += this.showList[j].id + } + } + } + this.queryList.showList1 = std; + this.getQueryShowListData(); }, changeListDataType(res) { if (this.isShowFirstCheck == false) { this.dataTypeName = res.name; + this.queryList.showList1 = res.id; + this.getQueryShowListData(); } }, + + getQueryShowListData() { + var a1 = ""; + if (this.queryList.showList1 != "" && this.queryList.showList1 != null) { + a1 = this.queryList.showList1; + } + if (this.queryList.showList2 != "" && this.queryList.showList2 != null) { + if (a1.length != 0) { + a1 += "," + } + a1 += this.queryList.showList2; + } + this.listData.dirs = a1; + this.listData.pageIndex = 1; + this.listData.pageSize = 10; + if (this.isMenuActive == true) { + this.getDataLibSelectTabs() + } else { + this.queryInfo(); + } + + + }, + + restDataLibSelectTabs() { + this.formInline.tab = "" + this.queryList = { + showList1: null, + showList2: null, + } + this.formInline.depid = this.companyOption1[0].code; + this.listData.depcode = this.companyOption1[0].code; + this.checkedDataType = [] + this.dataTypeName = '涓嶉檺'; + this.dataTypeName = null; + this.checkedDataType = ['涓嶉檺']; + this.isShowFirstCheck = false + this.checkedDataType = [] + this.dataTypeName = '涓嶉檺'; + this.queryList.showList1 = null; + this.isShowSecondCheck = false; + this.checkedEntryName = [] + this.EntryName = '涓嶉檺'; + this.queryList.showList2 = null; + this.getQueryShowListData(); + }, + + changeListEntryName(res) { if (this.isShowSecondCheck == false) { this.EntryName = res.name; + this.queryList.showList2 = res.id; + this.getQueryShowListData(); } }, getSpaceMapVisibale() { @@ -1247,6 +1334,17 @@ this.$store.state.download = false; this.$store.state.mapPopBoolean = false; this.$store.state.mapPopBoxFlag = null; + sgworld.Creator.SimpleGraphic.clear(); + if (this.entityaLayers.length != 0) { + for (var i in this.entityaLayers) { + sgworld.Viewer.entities.remove(this.entityaLayers[i]); + } + this.entityaLayers = []; + } + + + + }, moreEvent(res) { switch (res) { @@ -1265,9 +1363,13 @@ if (this.isShowFirstCheck == false) { this.checkedDataType = [] this.dataTypeName = '涓嶉檺'; + this.queryList.showList1 = null; + this.getQueryShowListData(); } else { this.dataTypeName = null; - this.checkedDataType = ['涓嶉檺'] + this.checkedDataType = ['涓嶉檺']; + this.queryList.showList1 = null; + this.getQueryShowListData(); } break; @@ -1276,9 +1378,13 @@ if (this.isShowSecondCheck == false) { this.checkedEntryName = [] this.EntryName = '涓嶉檺'; + this.queryList.showList2 = null; + this.getQueryShowListData(); } else { this.EntryName = null; this.checkedEntryName = ['涓嶉檺'] + this.queryList.showList2 = null; + this.getQueryShowListData(); } break; } @@ -1288,27 +1394,12 @@ this.formInline.tab = "" switch (res) { case 1: - this.listData = { - pageIndex: 1, - pageSize: 10, - - } - this.getDataLibSelectTabs(); this.isMenuActive = true; - + this.getQueryShowListData(); break; case 2: - this.listData = { - pageIndex: 1, - pageSize: 10, - depid: null, - dirid: null, - name: null, - verid: null - } - this.isMenuActive = false; - this.getMetaData(); + this.getQueryShowListData(); break; } }, @@ -1329,9 +1420,12 @@ this.$message.error('鍗曚綅鍒楄〃鑾峰彇澶辫触'); return; } - this.formInline.depid = 1; + // this.formInline.depid = 1; this.companyOption1 = this.treeData(res.result); - // this.getMetaData(); + this.formInline.depid = this.companyOption1[0].code; + this.listData.depcode = this.companyOption1[0].code; + + this.getQueryShowListData(); }, // 鏌ヨ @@ -1468,8 +1562,7 @@ this.codeForm.repassword = ''; }, getMetaData() { - this.listData.dirid = this.formInline.dirid - this.listData.depid = this.formInline.depid; + dataLib_selectByPageForMeta(this.listData).then((res) => { this.tableData1 = res.result; @@ -1484,10 +1577,9 @@ this.getMetaData(); }, handleChange1(value) { - this.listData.pageSize = 10; - this.listData.pageIndex = 1; this.formInline.depid = value; - this.getMetaData(); + this.listData.depcode = value; + this.getQueryShowListData(); }, //鏍戝垪琛ㄧ敓鎴� treeData(source) { @@ -1506,13 +1598,7 @@ this.queryInfo(); } }, - restDataLibSelectTabs() { - this.formInline.tab = "" - this.listData.pageIndex = 1; - this.listData.pageSize = 10 - this.searchDataLibSelectTabs(); - }, async getDataLibSelectTabs() { this.listData.tab = this.formInline.tab const data = await dataLib_selectTabs(this.listData); @@ -1520,13 +1606,13 @@ this.$message.error('鍒楄〃璋冪敤澶辫触'); return; } + this.count = data.count; - this.dataType = data.result; + + this.dataTypeList = data.result; }, showDetail1(row) { - this.showinfoBox1 = true; - this.itemdetail1 = row; }, // 鍏抽棴鏌ョ湅 @@ -1724,7 +1810,8 @@ } else { this.listTypeData.filter = null; } - + this.listTypeData.depcode = this.listData.depcode; + this.listTypeData.dirs = this.listData.dirs const data = await dataLib_selectByPage(this.listTypeData); if (data.code != 200) { this.$message.error('璋冪敤鍒楄〃澶辫触,璇疯仈绯诲伐浣滀汉鍛�!'); @@ -1789,6 +1876,7 @@ var data2 = domains.result; this.formInline.fileName = "" var std = []; + this.filedsOption=[]; for (var i in data1) { if (data1[i].type != 'geomtry' && data1[i].type != 'null') { @@ -2193,5 +2281,8 @@ /deeep/.el-form-item { margin-bottom: 0px; } + .el-dialog__wrapper { + z-index: 9999; + } } </style> diff --git a/src/views/AuthorizationManagement/menuRoleAuthorization.vue b/src/views/AuthorizationManagement/menuRoleAuthorization.vue index 6f66b42..3c7ffeb 100644 --- a/src/views/AuthorizationManagement/menuRoleAuthorization.vue +++ b/src/views/AuthorizationManagement/menuRoleAuthorization.vue @@ -1,5 +1,5 @@ <template> - <div class="menuSettings_box"> + <div class="menuSettings_box menuRoleAuthorization"> <!-- <My-bread :list="[ `${$t('operatManage.operatManage')}`, @@ -8,15 +8,16 @@ ]" ></My-bread> <el-divider /> --> - <div class="menuSettings_tree subpage_Div"> - <My-bread :list="[ + <div class="menuSettings_tree subpage_Div menuRoleAuthorization_left"> + <My-bread + :list="[ `${$t('operatManage.operatManage')}`, `${$t('operatManage.UserRoleAuthorization')}`, - ]"></My-bread> + ]" + ></My-bread> <el-divider /> <div class="menuTreeBox"> - <div class="card_tree"> <el-tree :data="depList" @@ -31,10 +32,10 @@ > </el-tree> </div> - </div> </div> - <div class="menuTreeBox "> + <!-- <div class="menuRoleAuthorization_resize" title="鏀剁缉渚ц竟鏍�">鈰�</div> --> + <div class="menuTreeBox menuRoleAuthorization_mid"> <!-- <div class="left_tree subpage_Div"> <el-tree :data="depList" @@ -61,11 +62,12 @@ margin-left: 10px; display: flex; align-items: center; + flex-wrap: wrap; " > <span> {{ - $t('operatManage.UserRoleAuthorizationObj.PermissionTable') + $t("operatManage.UserRoleAuthorizationObj.PermissionTable") }}</span > <div class="btn" style="margin-left: auto"> @@ -76,9 +78,8 @@ size="small" :disabled="roleid == null ? true : false" @click="adduser" - >{{ - $t('operatManage.UserRoleAuthorizationObj.Added') + $t("operatManage.UserRoleAuthorizationObj.Added") }}</el-button > <el-button @@ -89,7 +90,7 @@ @click="deletesUser" :disabled="roleid == null ? true : false" >{{ - $t('operatManage.UserRoleAuthorizationObj.delete') + $t("operatManage.UserRoleAuthorizationObj.delete") }}</el-button > </div> @@ -98,7 +99,7 @@ <el-table :data="tableData" style="width: 100%" - height="77%" + height="calc(100% - 124px)" @selection-change="handleSelectionChange" > <el-table-column type="selection" width="55"> </el-table-column> @@ -115,9 +116,7 @@ </el-table-column> </el-table> - <div - class="pagination_box" - > + <div class="pagination_box"> <el-pagination @size-change="userhandleSizeChange" @current-change="userhandleCurrentChange" @@ -212,28 +211,26 @@ </el-pagination> </div> <div slot="footer" class="dialog-footer"> - <el-button size="small" @click="dialogTableVisible = false">{{ - $t('dataManage.dictionaryManageObj.cancel') + <el-button size="small" @click="dialogTableVisible = false">{{ + $t("dataManage.dictionaryManageObj.cancel") }}</el-button> - <el-button - size="small" type="primary" - @click="addConfirm" - >{{ $t('dataManage.dictionaryManageObj.confirm') }}</el-button - > + <el-button size="small" type="primary" @click="addConfirm">{{ + $t("dataManage.dictionaryManageObj.confirm") + }}</el-button> </div> </el-dialog> </div> </template> <script> -import MyBread from '../../components/MyBread.vue'; +import MyBread from "../../components/MyBread.vue"; import { selectMenuRecursives, select_menuAuth_ByPageAndCount, menuAuthDeletes, select_AuthMenu_ByPageAndCount, menuAuthinserts, -} from '../../api/api'; +} from "../../api/api"; export default { //import寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� components: { @@ -262,18 +259,18 @@ usercount: 0, tableData: [], // 褰撳墠閫夋嫨鐨勮鐨刬d - templateSelection: '', + templateSelection: "", // 褰撳墠閫夋嫨鐨勮鐨勬暟鎹� checkList: [], defaultProps: { - children: 'children', - label: 'cnName', + children: "children", + label: "cnName", }, oriData: [], //鍘熷鏍戞暟鎹� depList: [], //el鏍戞暟鎹� backUpData: {}, - formLabelWidth: '170px', + formLabelWidth: "170px", listData: { pageIndex: 1, pageSize: 10, @@ -286,6 +283,50 @@ }; }, methods: { + //宸﹀彸鎷栧嫊 + dragControllerDiv() { + var resize = document.getElementsByClassName( + "menuRoleAuthorization_resize" + ); + var left = document.getElementsByClassName("menuRoleAuthorization_left"); + var mid = document.getElementsByClassName("menuRoleAuthorization_mid"); + var box = document.getElementsByClassName("menuRoleAuthorization"); + for (let i = 0; i < resize.length; i++) { + // 榧犳爣鎸変笅浜嬩欢 + resize[i].onmousedown = function (e) { + //棰滆壊鏀瑰彉鎻愰啋 + resize[i].style.background = "#818181"; + var startX = e.clientX; + resize[i].left = resize[i].offsetLeft; + // 榧犳爣鎷栧姩浜嬩欢 + document.onmousemove = function (e) { + var endX = e.clientX; + var moveLen = resize[i].left + (endX - startX); // 锛坋ndx-startx锛�=绉诲姩鐨勮窛绂汇�俽esize[i].left+绉诲姩鐨勮窛绂�=宸﹁竟鍖哄煙鏈�鍚庣殑瀹藉害 + var maxT = box[i].clientWidth - resize[i].offsetWidth; // 瀹瑰櫒瀹藉害 - 宸﹁竟鍖哄煙鐨勫搴� = 鍙宠竟鍖哄煙鐨勫搴� + + if (moveLen < 205) moveLen = 205; // 宸﹁竟鍖哄煙鐨勬渶灏忓搴︿负32px + if (moveLen > maxT - 300) moveLen = maxT - 300; //鍙宠竟鍖哄煙鏈�灏忓搴︿负150px + + resize[i].style.left = moveLen; // 璁剧疆宸︿晶鍖哄煙鐨勫搴� + + for (let j = 0; j < left.length; j++) { + left[j].style.width = moveLen + "px"; + mid[j].style.width = box[i].clientWidth - moveLen - 10 + "px"; + } + }; + // 榧犳爣鏉惧紑浜嬩欢 + document.onmouseup = function (evt) { + //棰滆壊鎭㈠ + resize[i].style.background = "#d6d6d6"; + document.onmousemove = null; + document.onmouseup = null; + resize[i].releaseCapture && resize[i].releaseCapture(); //褰撲綘涓嶅湪闇�瑕佺户缁幏寰楅紶鏍囨秷鎭氨瑕佸簲璇ヨ皟鐢≧eleaseCapture()閲婃斁鎺� + }; + resize[i].setCapture && resize[i].setCapture(); //璇ュ嚱鏁板湪灞炰簬褰撳墠绾跨▼鐨勬寚瀹氱獥鍙i噷璁剧疆榧犳爣鎹曡幏 + return false; + }; + } + }, /** * sws */ @@ -295,7 +336,7 @@ //鑾峰彇鐩綍鏍戞渶澶D锛屾柊寤鸿妭鐐逛娇鐢� const data = await selectMenuRecursives({ name: menuStartName }); if (data.code !== 200) { - return this.$message.error('璇锋眰鍗曚綅鎶ラ敊'); + return this.$message.error("璇锋眰鍗曚綅鎶ラ敊"); } this.depList = this.treeData(data.result); @@ -305,7 +346,7 @@ 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灞炴�э紝骞惰祴鍊� return father.pid == 0; // 杩斿洖涓�绾ц彍鍗� }); }, @@ -332,10 +373,10 @@ }, addConfirm() { - this.$confirm('纭畾鏄惁鏂板', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning', + this.$confirm("纭畾鏄惁鏂板", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", }) .then(async () => { let arr = []; @@ -345,11 +386,11 @@ const data = await menuAuthinserts(arr); if (data.code !== 200) { - return this.$message.error('鏂板澶辫触'); + return this.$message.error("鏂板澶辫触"); } this.$message({ - type: 'success', - message: '鏂板鎴愬姛!', + type: "success", + message: "鏂板鎴愬姛!", }); this.dialogTableVisible = false; this.getRole(); @@ -366,31 +407,33 @@ this.usermultipleSelection.forEach((e) => { arr.push(e.id); }); - this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ潈闄�, 鏄惁缁х画?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning' - }).then(async () => { - const data = await menuAuthDeletes({ ids: arr.toString() }); - if (data.code == 200) { - this.InsertFormdialog = false; + this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ潈闄�, 鏄惁缁х画?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(async () => { + const data = await menuAuthDeletes({ ids: arr.toString() }); + if (data.code == 200) { + this.InsertFormdialog = false; + this.$message({ + message: "鍒犻櫎鎴愬姛锛�", + type: "success", + }); + this.getRole(); + } else { + this.$message({ + message: "鍒犻櫎澶辫触锛�", + type: "warning", + }); + } + }) + .catch(() => { this.$message({ - message: '鍒犻櫎鎴愬姛锛�', - type: 'success', + type: "info", + message: "宸插彇娑堝垹闄�", }); - this.getRole(); - } else { - this.$message({ - message: '鍒犻櫎澶辫触锛�', - type: 'warning', - }); - } - }).catch(() => { - this.$message({ - type: 'info', - message: '宸插彇娑堝垹闄�' }); - }); // const data = await menuAuthDeletes({ ids: arr.toString() }); // if (data.code !== 200) { // return this.$message.error('鍒犻櫎澶辫触'); @@ -406,7 +449,7 @@ this.addlistData.menuid = this.roleid; const data = await select_AuthMenu_ByPageAndCount(this.addlistData); if (data.code !== 200) { - return this.$message.error('鏂板鐢ㄦ埛鍒楄〃璇锋眰閿欒'); + return this.$message.error("鏂板鐢ㄦ埛鍒楄〃璇锋眰閿欒"); } this.gridData = data.result; this.addcount = data.count; @@ -445,20 +488,20 @@ async getRole() { const data = await select_menuAuth_ByPageAndCount(this.listData); if (data.code !== 200) { - return this.$message.error('鐢ㄦ埛瑙掕壊璇锋眰閿欒'); + return this.$message.error("鐢ㄦ埛瑙掕壊璇锋眰閿欒"); } this.tableData = data.result; this.usercount = data.count; }, showPermsMenu(res) { switch (res.tag) { - case '/delete': + case "/delete": this.menuStatus.delete = true; break; - case '/insert': + case "/insert": this.menuStatus.insert = true; break; - case '/update': + case "/update": this.menuStatus.update = true; break; } @@ -474,6 +517,9 @@ } this.getMenuTree(); }, + mounted() { + // this.dragControllerDiv(); + }, }; </script> <style lang="less" scoped> @@ -483,43 +529,48 @@ width: 98%; padding: 1%; border-radius: 10px; - + position: relative; display: flex; - justify-content: space-between; - + // justify-content: space-between; + .menuTreeBox { width: 100%; - height: 91%; + height: 98%; .left_tree { width: 29%; height: 92%; padding: 10px; - + border-radius: 5px; float: left; overflow-y: auto; border-radius: 10px; - } .right_menu { border-radius: 10px; width: 97%; height: 100%; padding: 10px; - + border-radius: 5px; float: right; } } - - - + .divider { margin-top: 8px; } } -.subpage_Div{ +.subpage_Div { border-radius: 10px; } +.el-table, +.el-table /deep/ .el-table__expanded-cell { + background-color: transparent !important; +} +.el-table /deep/ th, +.el-table /deep/ tr { + background-color: transparent !important; +} </style> \ No newline at end of file diff --git a/src/views/AuthorizationManagement/roleMenuAuthorization.vue b/src/views/AuthorizationManagement/roleMenuAuthorization.vue index 70cb1bf..1221f5a 100644 --- a/src/views/AuthorizationManagement/roleMenuAuthorization.vue +++ b/src/views/AuthorizationManagement/roleMenuAuthorization.vue @@ -46,6 +46,7 @@ style="width: 100%" @row-click="singleElection" highlight-current-row + height="calc(100% - 135px)" > <el-table-column align="center" @@ -149,7 +150,7 @@ :data="menuTableData" stripe style="width: 100%" - height="78%" + height="calc(100% - 124px)" @selection-change="handleSelectionChange" > <el-table-column @@ -568,5 +569,13 @@ margin-top: 8px; } } +.el-table, +.el-table /deep/ .el-table__expanded-cell { + background-color: transparent !important; +} +.el-table /deep/ th, +.el-table /deep/ tr { + background-color: transparent !important; +} </style> diff --git a/src/views/AuthorizationManagement/roleResAuthorization.vue b/src/views/AuthorizationManagement/roleResAuthorization.vue index 787ecae..6a75c3b 100644 --- a/src/views/AuthorizationManagement/roleResAuthorization.vue +++ b/src/views/AuthorizationManagement/roleResAuthorization.vue @@ -40,7 +40,7 @@ style="width: 100%" @row-click="singleElection" highlight-current-row - height="78%" + height="calc(100% - 124px)" > <el-table-column align="center" @@ -127,7 +127,7 @@ :data="usertableData" stripe style="width: 100%" - height="78%" + height="calc(100% - 124px)" @selection-change="handleSelectionChange" > <el-table-column @@ -702,4 +702,12 @@ } } } +.el-table, +.el-table /deep/ .el-table__expanded-cell { + background-color: transparent !important; +} +.el-table /deep/ th, +.el-table /deep/ tr { + background-color: transparent !important; +} </style> diff --git a/src/views/AuthorizationManagement/userRoleAuthorization.vue b/src/views/AuthorizationManagement/userRoleAuthorization.vue index 6df114f..5919f9d 100644 --- a/src/views/AuthorizationManagement/userRoleAuthorization.vue +++ b/src/views/AuthorizationManagement/userRoleAuthorization.vue @@ -1,14 +1,15 @@ <template> - <div class="menuSettings_box"> - <div class="menuSettings_tree subpage_Div"> - <My-bread :list="[ + <div class="menuSettings_box userRoleAuthorization userRoleAuthorization1"> + <div class="menuSettings_tree subpage_Div userRoleAuthorization_left"> + <My-bread + :list="[ `${$t('operatManage.operatManage')}`, `${$t('operatManage.UserRoleAuthorization')}`, - ]"></My-bread> + ]" + ></My-bread> <el-divider /> <div class="menuTreeBox"> - <div class="card_tree"> <el-tree :data="depList" @@ -23,11 +24,18 @@ > </el-tree> </div> - </div> </div> - <div class="menuSettings_tree subpage_Div"> - <div style=" + <!-- <div class="userRoleAuthorization_resize" title="鏀剁缉渚ц竟鏍�">鈰�</div> --> + <div + class=" + menuSettings_tree + subpage_Div + userRoleAuthorization_mid userRoleAuthorization_left1 + " + > + <div + style=" font-size: 14px; color: #409eff; line-height: 1; @@ -35,27 +43,26 @@ position: relative; top: 10px; margin-left: 10px; - "> - {{ $t('operatManage.UserRoleAuthorizationObj.RoleTable') }} + " + > + {{ $t("operatManage.UserRoleAuthorizationObj.RoleTable") }} </div> <el-divider /> <el-table :data="tableData" style="width: 100%" @row-click="singleElection" - height="78%" + height="calc(100% - 124px)" > - <el-table-column - align="center" - width="55" - > + <el-table-column align="center" width="55"> <template slot-scope="scope"> <!-- 鍙互鎵嬪姩鐨勪慨鏀筶abel鐨勫�硷紝浠庤�屾帶鍒堕�夋嫨鍝竴椤� --> <el-radio class="radio" v-model="templateSelection" :label="scope.row.id" - > </el-radio> + > </el-radio + > </template> </el-table-column> <el-table-column @@ -70,10 +77,7 @@ > </el-table-column> </el-table> - <div - style="text-align: center; margin-top: 20px" - class="pagination_box" - > + <div style="text-align: center; margin-top: 20px" class="pagination_box"> <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" @@ -86,9 +90,10 @@ </el-pagination> </div> </div> - <div class="menuSettings_tree subpage_Div"> - - <div style=" + <!-- <div class="userRoleAuthorization_resize1" title="鏀剁缉渚ц竟鏍�">鈰�</div> --> + <div class="menuSettings_tree subpage_Div userRoleAuthorization_mid1"> + <div + style=" font-size: 14px; color: #409eff; line-height: 1; @@ -98,13 +103,13 @@ margin-left: 10px; display: flex; align-items: center; - "> + flex-wrap: wrap; + " + > <span> - {{ $t('operatManage.UserRoleAuthorizationObj.userTable') }}</span> - <div - class="btn" - style="margin-left: auto" + {{ $t("operatManage.UserRoleAuthorizationObj.userTable") }}</span > + <div class="btn" style="margin-left: auto"> <el-button v-if="menuStatus.insert" type="success" @@ -112,7 +117,8 @@ size="small" :disabled="roleid == null ? true : false" @click="adduser" - >{{ $t('operatManage.UserRoleAuthorizationObj.Added') }}</el-button> + >{{ $t("operatManage.UserRoleAuthorizationObj.Added") }}</el-button + > <el-button v-if="menuStatus.delete" type="danger" @@ -120,7 +126,8 @@ size="small" @click="deletesUser" :disabled="roleid == null ? true : false" - >{{ $t('operatManage.UserRoleAuthorizationObj.delete') }}</el-button> + >{{ $t("operatManage.UserRoleAuthorizationObj.delete") }}</el-button + > </div> </div> <el-divider class="divider" /> @@ -128,13 +135,10 @@ <el-table :data="usertableData" style="width: 100%" - height="78%" + height="calc(100% - 124px)" @selection-change="handleSelectionChange" > - <el-table-column - type="selection" - width="55" - > </el-table-column> + <el-table-column type="selection" width="55"> </el-table-column> <el-table-column align="center" type="index" @@ -147,10 +151,7 @@ </el-table-column> </el-table> - <div - style="margin-top: 20px; text-align: center" - class="pagination_box" - > + <div style="margin-top: 20px; text-align: center" class="pagination_box"> <el-pagination @size-change="userhandleSizeChange" @current-change="userhandleCurrentChange" @@ -172,10 +173,7 @@ height="40vh" @selection-change="addhandleSelectionChange" > - <el-table-column - type="selection" - width="55" - > </el-table-column> + <el-table-column type="selection" width="55"> </el-table-column> <el-table-column align="center" type="index" @@ -187,10 +185,7 @@ > </el-table-column> </el-table> - <div - style="margin-top: 20px; text-align: center" - class="pagination_box" - > + <div style="margin-top: 20px; text-align: center" class="pagination_box"> <el-pagination @size-change="addhandleSizeChange" @current-change="addhandleCurrentChange" @@ -202,28 +197,20 @@ > </el-pagination> </div> - <div - slot="footer" - class="dialog-footer" - > - <el-button - size="small" - @click="dialogTableVisible = false" - >{{ - $t('dataManage.dictionaryManageObj.cancel') + <div slot="footer" class="dialog-footer"> + <el-button size="small" @click="dialogTableVisible = false">{{ + $t("dataManage.dictionaryManageObj.cancel") }}</el-button> - <el-button - size="small" - type="primary" - @click="addConfirm" - >{{ $t('dataManage.dictionaryManageObj.confirm') }}</el-button> + <el-button size="small" type="primary" @click="addConfirm">{{ + $t("dataManage.dictionaryManageObj.confirm") + }}</el-button> </div> </el-dialog> </div> </template> <script> -import MyBread from '../../components/MyBread.vue'; +import MyBread from "../../components/MyBread.vue"; import { queryDepTree, select_Role_ByPageAndCount, @@ -231,7 +218,7 @@ roleUserdeletes, userselectByPageForRole, roleUserinserts, -} from '../../api/api'; +} from "../../api/api"; export default { //import寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� components: { @@ -255,18 +242,18 @@ usercount: 0, tableData: [], // 褰撳墠閫夋嫨鐨勮鐨刬d - templateSelection: '', + templateSelection: "", // 褰撳墠閫夋嫨鐨勮鐨勬暟鎹� checkList: [], defaultProps: { - children: 'children', - label: 'name', + children: "children", + label: "name", }, oriData: [], //鍘熷鏍戞暟鎹� depList: [], //el鏍戞暟鎹� backUpData: {}, - formLabelWidth: '170px', + formLabelWidth: "170px", listData: { pageIndex: 1, pageSize: 10, @@ -284,11 +271,105 @@ }; }, methods: { + //宸﹀彸鎷栧嫊 + dragControllerDiv() { + let resize = document.getElementsByClassName( + "userRoleAuthorization_resize" + ); + let left = document.getElementsByClassName("userRoleAuthorization_left"); + let mid = document.getElementsByClassName("userRoleAuthorization_mid"); + let box = document.getElementsByClassName("userRoleAuthorization"); + for (let i = 0; i < resize.length; i++) { + // 榧犳爣鎸変笅浜嬩欢 + resize[i].onmousedown = function (e) { + //棰滆壊鏀瑰彉鎻愰啋 + resize[i].style.background = "#818181"; + let startX = e.clientX; + resize[i].left = resize[i].offsetLeft; + // 榧犳爣鎷栧姩浜嬩欢 + document.onmousemove = function (e) { + let endX = e.clientX; + let moveLen = resize[i].left + (endX - startX); // 锛坋ndx-startx锛�=绉诲姩鐨勮窛绂汇�俽esize[i].left+绉诲姩鐨勮窛绂�=宸﹁竟鍖哄煙鏈�鍚庣殑瀹藉害 + let maxT = box[i].clientWidth - resize[i].offsetWidth; // 瀹瑰櫒瀹藉害 - 宸﹁竟鍖哄煙鐨勫搴� = 鍙宠竟鍖哄煙鐨勫搴� + + if (moveLen < 205) moveLen = 205; // 宸﹁竟鍖哄煙鐨勬渶灏忓搴︿负32px + if (moveLen > maxT - 300) moveLen = maxT - 300; //鍙宠竟鍖哄煙鏈�灏忓搴︿负150px + + resize[i].style.left = moveLen; // 璁剧疆宸︿晶鍖哄煙鐨勫搴� + + for (let j = 0; j < left.length; j++) { + left[j].style.width = moveLen + "px"; + mid[j].style.width = box[i].clientWidth - moveLen - 10 + "px"; + } + }; + // 榧犳爣鏉惧紑浜嬩欢 + document.onmouseup = function (evt) { + //棰滆壊鎭㈠ + resize[i].style.background = "#d6d6d6"; + document.onmousemove = null; + document.onmouseup = null; + resize[i].releaseCapture && resize[i].releaseCapture(); //褰撲綘涓嶅湪闇�瑕佺户缁幏寰楅紶鏍囨秷鎭氨瑕佸簲璇ヨ皟鐢≧eleaseCapture()閲婃斁鎺� + }; + resize[i].setCapture && resize[i].setCapture(); //璇ュ嚱鏁板湪灞炰簬褰撳墠绾跨▼鐨勬寚瀹氱獥鍙i噷璁剧疆榧犳爣鎹曡幏 + return false; + }; + } + }, + dragControllerDiv1() { + let resize = document.getElementsByClassName( + "userRoleAuthorization_resize1" + ); + let left = document.getElementsByClassName("userRoleAuthorization_left1"); + let left1 = document.getElementsByClassName("userRoleAuthorization_left"); + let mid = document.getElementsByClassName("userRoleAuthorization_mid1"); + let box = document.getElementsByClassName("userRoleAuthorization1"); + console.log(resize) + console.log(box) + console.log(left1) + for (let i = 0; i < resize.length; i++) { + // 榧犳爣鎸変笅浜嬩欢 + resize[i].onmousedown = function (e) { + console.log(e) + //棰滆壊鏀瑰彉鎻愰啋 + resize[i].style.background = "#818181"; + let startX = e.clientX; + resize[i].left = resize[i].offsetLeft; + // 榧犳爣鎷栧姩浜嬩欢 + document.onmousemove = function (e) { + + let endX = e.clientX; + console.log(endX ,startX) + let moveLen = resize[i].left + (endX - startX) - left1[i].offsetWidth ; // 锛坋ndx-startx锛�=绉诲姩鐨勮窛绂汇�俽esize[i].left+绉诲姩鐨勮窛绂�=宸﹁竟鍖哄煙鏈�鍚庣殑瀹藉害 + let maxT = box[i].clientWidth - resize[i].offsetWidth; // 瀹瑰櫒瀹藉害 - 宸﹁竟鍖哄煙鐨勫搴� = 鍙宠竟鍖哄煙鐨勫搴� + + if (moveLen < 205) moveLen = 205; // 宸﹁竟鍖哄煙鐨勬渶灏忓搴︿负32px + if (moveLen > maxT - 300) moveLen = maxT - 300; //鍙宠竟鍖哄煙鏈�灏忓搴︿负150px + + resize[i].style.left = moveLen; // 璁剧疆宸︿晶鍖哄煙鐨勫搴� + + for (let j = 0; j < left.length; j++) { + left[j].style.width = moveLen + "px"; + mid[j].style.width = box[i].clientWidth - moveLen - 10 + "px"; + } + }; + // 榧犳爣鏉惧紑浜嬩欢 + document.onmouseup = function (evt) { + //棰滆壊鎭㈠ + resize[i].style.background = "#d6d6d6"; + document.onmousemove = null; + document.onmouseup = null; + resize[i].releaseCapture && resize[i].releaseCapture(); //褰撲綘涓嶅湪闇�瑕佺户缁幏寰楅紶鏍囨秷鎭氨瑕佸簲璇ヨ皟鐢≧eleaseCapture()閲婃斁鎺� + }; + resize[i].setCapture && resize[i].setCapture(); //璇ュ嚱鏁板湪灞炰簬褰撳墠绾跨▼鐨勬寚瀹氱獥鍙i噷璁剧疆榧犳爣鎹曡幏 + return false; + }; + } + }, addConfirm() { - this.$confirm('纭畾鏄惁鏂板', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning', + this.$confirm("纭畾鏄惁鏂板", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", }) .then(async () => { let arr = []; @@ -297,16 +378,16 @@ }); const data = await roleUserinserts(arr); if (data.code !== 200) { - return this.$message.error('鏂板澶辫触'); + return this.$message.error("鏂板澶辫触"); } this.$message({ - type: 'success', - message: '鏂板鎴愬姛!', + type: "success", + message: "鏂板鎴愬姛!", }); this.dialogTableVisible = false; this.getuserList(); }) - .catch(() => { }); + .catch(() => {}); }, adduser() { this.dialogTableVisible = true; @@ -318,31 +399,33 @@ this.usermultipleSelection.forEach((e) => { arr.push(e.id); }); - this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ潈闄�, 鏄惁缁х画?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning' - }).then(async () => { - const data = await roleUserdeletes({ ids: arr.toString() }); - if (data.code == 200) { - this.InsertFormdialog = false; + this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ潈闄�, 鏄惁缁х画?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(async () => { + const data = await roleUserdeletes({ ids: arr.toString() }); + if (data.code == 200) { + this.InsertFormdialog = false; + this.$message({ + message: "鍒犻櫎鎴愬姛锛�", + type: "success", + }); + this.getuserList(); + } else { + this.$message({ + message: "鍒犻櫎澶辫触锛�", + type: "warning", + }); + } + }) + .catch(() => { this.$message({ - message: '鍒犻櫎鎴愬姛锛�', - type: 'success', + type: "info", + message: "宸插彇娑堝垹闄�", }); - this.getuserList(); - } else { - this.$message({ - message: '鍒犻櫎澶辫触锛�', - type: 'warning', - }); - } - }).catch(() => { - this.$message({ - type: 'info', - message: '宸插彇娑堝垹闄�' }); - }); // const data = await roleUserdeletes({ ids: arr.toString() }); // if (data.code !== 200) { // return this.$message.error('鍒犻櫎澶辫触'); @@ -405,7 +488,7 @@ const data = await queryDepTree(); if (data.code !== 200) { - return this.$message.error('璇锋眰鍗曚綅鎶ラ敊'); + return this.$message.error("璇锋眰鍗曚綅鎶ラ敊"); } this.depList = this.treeData(data.result); }, @@ -414,7 +497,7 @@ 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灞炴�э紝骞惰祴鍊� return father.pid == 0; // 杩斿洖涓�绾ц彍鍗� }); }, @@ -444,7 +527,7 @@ this.addlistData.debid = this.debid; const data = await userselectByPageForRole(this.addlistData); if (data.code !== 200) { - return this.$message.error('鏂板鐢ㄦ埛鍒楄〃璇锋眰閿欒'); + return this.$message.error("鏂板鐢ㄦ埛鍒楄〃璇锋眰閿欒"); } this.gridData = data.result; this.addcount = data.count; @@ -453,7 +536,7 @@ async getuserList() { const data = await roleUserselectByPageForRole(this.userlistData); if (data.code !== 200) { - return this.$message.error('鐢ㄦ埛鍒楄〃璇锋眰閿欒'); + return this.$message.error("鐢ㄦ埛鍒楄〃璇锋眰閿欒"); } this.usertableData = data.result; this.usercount = data.count; @@ -462,20 +545,20 @@ async getRole() { const data = await select_Role_ByPageAndCount(this.listData); if (data.code !== 200) { - return this.$message.error('鐢ㄦ埛瑙掕壊璇锋眰閿欒'); + return this.$message.error("鐢ㄦ埛瑙掕壊璇锋眰閿欒"); } this.tableData = data.result; this.count = data.count; }, showPermsMenu(res) { switch (res.tag) { - case '/delete': + case "/delete": this.menuStatus.delete = true; break; - case '/insert': + case "/insert": this.menuStatus.insert = true; break; - case '/update': + case "/update": this.menuStatus.update = true; break; } @@ -491,6 +574,11 @@ } this.getMenuTree(); }, + mounted() { + //宸﹀彸鎷栧嫊 + // this.dragControllerDiv(); + // this.dragControllerDiv1(); + }, }; </script> <style lang="less" scoped> @@ -499,7 +587,7 @@ height: 98%; width: 98%; padding: 1%; - +// position: relative; display: flex; justify-content: space-between; @@ -510,8 +598,6 @@ padding: 10px; border-radius: 10px; box-sizing: border-box; - overflow: hidden; - .saveBtn { position: absolute; left: 250px; @@ -522,11 +608,18 @@ overflow: auto; } } - .divider { margin-top: 8px; } } +.el-table, +.el-table /deep/ .el-table__expanded-cell { + background-color: transparent !important; +} +.el-table /deep/ th, +.el-table /deep/ tr { + background-color: transparent !important; +} </style> diff --git a/src/views/Synthesis/LeftMenu.vue b/src/views/Synthesis/LeftMenu.vue index 8a000da..eb6449d 100644 --- a/src/views/Synthesis/LeftMenu.vue +++ b/src/views/Synthesis/LeftMenu.vue @@ -411,13 +411,6 @@ //浜岀礆鑿滃崟鐐瑰嚮鍒囨崲 setChangeTwoMenu(res) { - - - //鍏抽棴鎵撳紑鐨勪俊鎭獥浣� - - - - this.showTwoMenuFlag = res.id; this.$store.state.mapMenuBoolean = false; this.$store.state.mapMenuBoxFlag = null; this.$store.state.mapPopBoolean = false; @@ -427,8 +420,11 @@ window.model.deleteObject(); window.model = null; } - - if (this.isMenuFlag != val) { + sgworld.Analysis.clearCurtainContrast(); + if (this.isMenuFlag == "d") { + this.clearAllAnalsy(); + } + if (this.isMenuFlag !=val) { sgworld.Creator.SimpleGraphic.clear(); this.isMenuFlag = val; if (this.entityaLayers.length != 0) { @@ -442,11 +438,12 @@ } this.$store.state.queryInfo = []; if (this.$store.state.primitLayer != null) { + sgworld.Viewer.entities.remove(this.$store.state.primitLayer); sgworld.Creator.DeleteObject(this.$store.state.primitLayer); this.$store.state.primitLayer = null; } } - + this.showTwoMenuFlag = res.id; switch (val) { case 'a': //鍥惧眰绠$悊 @@ -1086,6 +1083,23 @@ break; } }, + clearAllAnalsy() { + // switch (this.showTwoMenuFlag) { + // case 'd1': + // that.isolineFlag = false; + // elevationTool.tf = that.isolineFlag; + // elevationTool.render(); + // break; + // case 'd2': + // that.isslopeFlag = false; + // elevationTool.type = 'none'; + // elevationTool.render(); + // break; + // } + }, + + + setAnalsy(res) { //this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close("queryinfo"); var that = this; diff --git a/src/views/Thematic/index.vue b/src/views/Thematic/index.vue index 0918c76..aa5b715 100644 --- a/src/views/Thematic/index.vue +++ b/src/views/Thematic/index.vue @@ -3,12 +3,13 @@ <mapsdk></mapsdk> <top class="title" ref="title"></top> <left class="mapleft" :style="{ width: leftWidth }" ref="mapleft"></left> - <right class="mapright" :style="{ width: rightWidth }" ref="mapright"></right> - <bottom class="mapbottom" ref="mapbottom"></bottom> - </div> + <right class="mapright" :style="{ width: rightWidth }" ref="mapright"></right> + <bottom class="mapbottom" ref="mapbottom"></bottom> +</div> </template> <script> + import mapsdk from "@/components/Screen/mapsdk.vue" import top from "../../components/Screen/top.vue" import left from "@/components/Screen/left.vue" @@ -24,8 +25,8 @@ rightWidth: "20%", } }, - mounted() {}, - created() {}, + mounted() { }, + created() { }, methods: { //淇敼宸︿晶瀹藉害 ChangeWidth(parm) { @@ -36,6 +37,11 @@ this.leftWidth = "20%" } } + debugger; + if (parm == "leftView" || parm == "leftTree") { this.leftWidth = "20%" } + + + if (parm == "right") { if (this.rightWidth == "20%") { this.rightWidth = "36px" @@ -55,6 +61,7 @@ position: absolute; display: flex; } + .title { position: absolute; top: 0; @@ -63,6 +70,7 @@ width: 100%; z-index: 999; } + .mapleft { position: absolute; top: 90px; @@ -71,6 +79,7 @@ height: calc(100% - 180px); z-index: 999; } + .mapright { position: absolute; top: 90px; @@ -79,6 +88,7 @@ height: calc(100% - 180px); z-index: 999; } + .mapbottom { position: absolute; left: 0; @@ -86,5 +96,4 @@ height: 90px; width: 100%; z-index: 999; -} -</style> +}</style> diff --git a/src/views/Tools/LayerTree.vue b/src/views/Tools/LayerTree.vue index 6696753..c924ce0 100644 --- a/src/views/Tools/LayerTree.vue +++ b/src/views/Tools/LayerTree.vue @@ -49,14 +49,14 @@ v-show="menuVisible" > <div @click="addSameLevelNode()"> - <i class="el-icon-circle-plus-outline"></i> 鍚岀骇澧炲姞 + <i class="el-icon-circle-plus-outline"></i> 娣诲姞鍥惧眰缁� </div> <div class="add" @click="addChildNode()" v-show="firstLevel" > - <i class="el-icon-circle-plus-outline"></i> 瀛愮骇澧炲姞 + <i class="el-icon-circle-plus-outline"></i> 娣诲姞鍥惧眰 </div> <div class="delete" @@ -69,6 +69,12 @@ @click="editNode()" > <i class="el-icon-edit"></i> 淇敼鑺傜偣 + </div> + <div + class="edit" + @click="showLayerAttribute()" + > + <i class="el-icon-edit"></i> 灞炴�� </div> <!-- <div class="edit" @@ -137,6 +143,7 @@ >纭� 瀹�</el-button> </span> </el-dialog> + <queryinfo ref="queryinfo" /> </div> </template> @@ -146,7 +153,7 @@ import Image from 'ol/layer/Image'; import GeoJSON from 'ol/format/GeoJSON.js'; import Map from 'ol/Map.js'; - +import queryinfo from './queryinfo.vue'; import { Vector as VectorSource } from "ol/source"; import { Vector as VectorLayer, } from "ol/layer"; @@ -155,6 +162,7 @@ import { perms_selectLayers } from '../../api/api.js' export default { name: 'tree', + components: { queryinfo }, data() { return { eleId: '', @@ -332,7 +340,29 @@ this.$refs.tree.remove(this.currentNode); }, + //灞炴�ф樉绀� + showLayerAttribute(data) { + this.foo(); + this.currentData = data ? data : this.currentData; + var layer = this.currentData.layer.replaceAll('_', ""); + this.$store.state.mapSpaceQueryLayer = layer; + // this.$store.state.mapPopBoolean = true; + this.$store.state.mapPopBoxFlag = '2'; + this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close(); + this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("灞炴��", null, { + close: () => { + if (this.$store.state.primitLayer != null) { + sgworld.Creator.DeleteObject(this.$store.state.primitLayer); + this.$store.state.primitLayer = null; + } + + if (window.Viewer.scene.primitives.length != 0) { + window.Viewer.scene.primitives.removeAll() + } + } + }); + }, // 缂栬緫鑺傜偣 editNode(data) { @@ -536,6 +566,7 @@ return this.$message.error("鍥惧眰鍒楄〃鏌ヨ澶辫触"); } + this.newData = data.result; this.oriData = data.result; var std = []; @@ -553,6 +584,7 @@ } else if (data.result[i].type == 2) { if (data.result[i].url != null) { + var layer_entity = { id: data.result[i].id, pid: data.result[i].pid, @@ -560,6 +592,7 @@ resource: data.result[i].url, type: data.result[i].type, isEdit: false, + layer: data.result[i].enName, layerType: data.result[i].serveType } layer_list.push(layer_entity) diff --git a/src/views/Tools/queryinfo.vue b/src/views/Tools/queryinfo.vue index 92dc996..b283a42 100644 --- a/src/views/Tools/queryinfo.vue +++ b/src/views/Tools/queryinfo.vue @@ -61,15 +61,17 @@ // 鍏抽棴寮圭獥 close(id) { let index = this.PopupData.findIndex((item) => { - console.log(item); + console.log(item); return item.id === id; }); let data = this.PopupData.splice(index, 1)[0]; // data.close && data.close(); - - - - + if(this.$store.state.primitLayer != null){ +sgworld.Viewer.entities.remove(this.$store.state.primitLayer); + sgworld.Creator.DeleteObject(this.$store.state.primitLayer); + this.$store.state.primitLayer = null + } + }, // 鎵撳紑寮圭獥 open(title, value, style = {}) { diff --git a/src/views/datamanage/SpatialData.vue b/src/views/datamanage/SpatialData.vue index 5855eb5..ebf3c52 100644 --- a/src/views/datamanage/SpatialData.vue +++ b/src/views/datamanage/SpatialData.vue @@ -50,6 +50,15 @@ $t('synthesis.rangequery') }}</el-button> </el-form-item> + <el-form-item style="float: right"> + <el-button + @click="resetForm" + type="info" + size="small" + icon="el-icon-refresh" + >{{$t('common.reset')}}</el-button> + + </el-form-item> <el-form-item style="float: right"> <el-button @click="submitForm" @@ -69,12 +78,12 @@ </el-form-item> </el-form> </div> - <div class="contenttable"> + <div class="table_box" style="height:calc(100% - 89px)"> <el-table ref="filterTable" :data="tableData" style="width: 100%" - height="100%" + height="calc(100% - 57px)" > <el-table-column type="selection" @@ -95,7 +104,7 @@ align="center" ></el-table-column> <el-table-column - min-width="120" + :label="$t('common.operate')" > <template slot-scope="scope"> @@ -112,7 +121,6 @@ </el-table-column> </el-table> <div - style="margin-top: 20px; " class="pagination_box" > <el-pagination @@ -1107,48 +1115,36 @@ padding: 1%; .spatialContent { width: 100%; - height: 92%; + height: calc(100% - 75px); display: flex; justify-content: space-between; .spatial_leftTree { - width: calc(15% - 0px); + width: calc(23% - 0px); height: 100%; - + padding: 10px; border-radius: 5px; - padding: 1%; - max-height: 670px; + box-sizing: border-box; overflow-y: auto; } - .spatial_rightContent { - // width: 80%; - // height: 91%; - + .contentshuju { + width: 75%; + height: 100%; border-radius: 5px; - padding: 1%; - overflow-y: auto; + padding: 10px; + box-sizing: border-box; + border: 1px solid #dcdfe6; } } } -.contentshuju{ - width: 80%; - height: 91%; - border-radius: 5px; - padding: 1%; - max-height: 670px; - border: 1px solid #dcdfe6; -} -.contentshujutou{ - height: 50px; - padding: 1%; + +.contentshujutou { + padding: 8px; + // margin-top: 10px; border-radius: 5px; border: 1px solid #dcdfe6; -} -.contenttable{ - min-height: 520px; - height: 530px; - margin-top: 10px; -} -/deep/ .el-table__body{ - min-height: 525px; + margin-bottom: 20px; + .el-form-item { + margin: 5px; + } } </style> diff --git a/src/views/datamanage/catalogueManage.vue b/src/views/datamanage/catalogueManage.vue index 07980fc..609328c 100644 --- a/src/views/datamanage/catalogueManage.vue +++ b/src/views/datamanage/catalogueManage.vue @@ -1,13 +1,15 @@ <template> <div class="subpage_Box"> - <My-bread :list="[ - `${$t('dataManage.dataManage')}`, - `${$t('dataManage.catalogueManage')}`, - ]"></My-bread> - <el-divider /> <div class="cataLogContent"> <div class="cataLog_leftTree subpage_Div"> - <div style="min-width:450px"> + <My-bread + :list="[ + `${$t('dataManage.dataManage')}`, + `${$t('dataManage.catalogueManage')}`, + ]" + ></My-bread> + <el-divider /> + <div style="min-width: 450px"> <el-tree ref="tree" :props="defaultProps" @@ -18,26 +20,26 @@ :default-expanded-keys="expandData" @node-click="handleNodeClick" > - </el-tree> </div> </div> <div class="cataLog_rightContent subpage_Div"> - <div style="align-items: center;display:flex;justify-content:space-between"> + <div + style=" + align-items: center; + display: flex; + justify-content: space-between; + " + > <el-breadcrumb separator="/"> <el-breadcrumb-item :to="{ path: '/' }">{{ - $t('dataManage.dictionaryManageObj.particulars') - }}</el-breadcrumb-item> + $t("dataManage.dictionaryManageObj.particulars") + }}</el-breadcrumb-item> </el-breadcrumb> - <div style="margin-right: -5px;"> - + <div style="margin-right: -5px"> <div class="menuTop"> - <el-form - :inline="true" - class="demo-form-inline" - > + <el-form :inline="true" class="demo-form-inline"> <el-form-item> - <el-upload action accept=".xlsx, .xls" @@ -46,13 +48,10 @@ :on-change="handleChange" :file-list="fileList" > - <el-button - type="success" - icon="el-icon-plus" - size="small" - >涓婁紶鏂囦欢</el-button> + <el-button type="success" icon="el-icon-plus" size="small" + >涓婁紶鏂囦欢</el-button + > </el-upload> - </el-form-item> <el-form-item> <el-button @@ -62,7 +61,8 @@ type="success" icon="el-icon-plus" size="small" - >鏂板鍚岀骇</el-button> + >鏂板鍚岀骇</el-button + > </el-form-item> <el-form-item> <el-button @@ -72,7 +72,8 @@ type="success" icon="el-icon-plus" size="small" - >鏂板瀛愮骇</el-button> + >鏂板瀛愮骇</el-button + > </el-form-item> <el-form-item> <el-button @@ -82,7 +83,8 @@ type="danger" icon="el-icon-delete" size="small" - >鍒犻櫎</el-button> + >鍒犻櫎</el-button + > </el-form-item> <el-form-item> <el-button @@ -92,7 +94,8 @@ type="info" icon="el-icon-top" size="small" - >鍚戜笂绉诲姩</el-button> + >鍚戜笂绉诲姩</el-button + > </el-form-item> <el-form-item> <el-button @@ -102,26 +105,21 @@ type="info" icon="el-icon-bottom" size="small" - >鍚戜笅绉诲姩</el-button> + >鍚戜笅绉诲姩</el-button + > </el-form-item> - </el-form> </div> - </div> </div> <el-divider /> - <el-form - :model="itemdetail" - ref="itemdetail" - :rules="rules" - > + <el-form :model="itemdetail" ref="itemdetail" :rules="rules"> <el-form-item prop="name" :label="$t('dataManage.dataUpObj.directoryName')" :label-width="formLabelWidth" > - <el-input v-model="itemdetail.name" style="max-width: 400px;"/> + <el-input v-model="itemdetail.name" style="max-width: 400px" /> </el-form-item> <el-form-item :label="$t('dataManage.dataUpObj.catalogDescription')" @@ -129,6 +127,40 @@ > <el-input v-model="itemdetail.descr" + type="textarea" + resize="none" + style="height: 100%; overflow: auto; max-width: 400px" + /> + </el-form-item> + <el-form-item + :label="$t('dataManage.dataUpObj.fileExtension')" + :label-width="formLabelWidth" + > + <el-input + v-model="itemdetail.exts" + type="textarea" + resize="none" + style="height: 100%; overflow: auto;max-width: 400px;" + /> + </el-form-item> + <el-form-item + :label="$t('dataManage.dataUpObj.inspectionItems')" + :label-width="formLabelWidth" + > + <el-input + v-model="itemdetail.checks" + type="textarea" + resize="none" + style="height: 100%; overflow: auto;max-width: 400px;" + /> + </el-form-item> + <el-form-item + :label="$t('dataManage.dataUpObj.code')" + :label-width="formLabelWidth" + > + <el-input + v-model="itemdetail.code" + disabled type="textarea" resize="none" style="height: 100%; overflow: auto;max-width: 400px;" @@ -142,7 +174,7 @@ v-model="itemdetail.bak" type="textarea" resize="none" - style="max-width: 400px;" + style="max-width: 400px" /> </el-form-item> <div class="btnBox"> @@ -151,17 +183,15 @@ class="primary" size="small" @click="updCata('itemdetail')" - >{{ - $t('common.preservation') - }}</el-button> + >{{ $t("common.preservation") }}</el-button + > <el-button v-if="menuStatus.update" type="info" size="small" @click="reset" - >{{ - $t('common.cancel') - }}</el-button> + >{{ $t("common.cancel") }}</el-button + > </div> </el-form> </div> @@ -185,52 +215,71 @@ :visible.sync="dialogFormVisible" :before-close="handleClose" > - <el-form - :model="ruleForm" - ref="ruleForm" - :rules="rules" - > + <el-form :model="ruleForm" ref="ruleForm" :rules="rules"> <el-form-item :label="$t('dataManage.dataUpObj.directoryName')" prop="name" :label-width="formLabelWidth" > - <el-input - v-model="ruleForm.name" - autocomplete="off" - ></el-input> + <el-input v-model="ruleForm.name" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dataUpObj.catalogDescription')" :label-width="formLabelWidth" > + <el-input v-model="ruleForm.descr" autocomplete="off"></el-input> + </el-form-item> + <el-form-item + :label="$t('dataManage.dataUpObj.fileExtension')" + :label-width="formLabelWidth" + > <el-input - v-model="ruleForm.descr" - autocomplete="off" - ></el-input> + v-model="ruleForm.exts" + type="textarea" + resize="none" + style="height: 100%; overflow: auto; " + /> + </el-form-item> + <el-form-item + :label="$t('dataManage.dataUpObj.inspectionItems')" + :label-width="formLabelWidth" + > + <el-input + v-model="ruleForm.checks" + type="textarea" + resize="none" + style="height: 100%; overflow: auto; " + /> + </el-form-item> + <el-form-item + :label="$t('dataManage.dataUpObj.code')" + :label-width="formLabelWidth" + > + <el-input + v-model="ruleForm.code" + disabled + type="textarea" + resize="none" + style="height: 100%; overflow: auto; " + /> </el-form-item> <el-form-item :label="$t('dataManage.dataUpObj.catalogRemarks')" :label-width="formLabelWidth" > - <el-input - v-model="ruleForm.bak" - autocomplete="off" - ></el-input> + <el-input v-model="ruleForm.bak" autocomplete="off"></el-input> </el-form-item> </el-form> - <div - slot="footer" - class="dialog-footer" - > + <div slot="footer" class="dialog-footer"> <el-button @click="resetForm('ruleForm')">{{ - $t('common.cancel') + $t("common.cancel") }}</el-button> <el-button class="primary" @click="submitForm('ruleForm')" v-loading.fullscreen.lock="fullscreenLoading" - >{{ $t('common.preservation') }}</el-button> + >{{ $t("common.preservation") }}</el-button + > </div> </el-dialog> </div> @@ -245,19 +294,19 @@ insertDir, deleteDir, getPerms, -} from '../../api/api'; -import * as XSLX from 'xlsx'; -import MyBread from '../../components/MyBread.vue'; -import clone from '@turf/clone'; +} from "../../api/api"; +import * as XSLX from "xlsx"; +import MyBread from "../../components/MyBread.vue"; +import clone from "@turf/clone"; export default { - name: 'catalogueManage', + name: "catalogueManage", components: { MyBread, }, data() { let validName = (rule, value, callback) => { - if (value === '' || value === null || value === undefined) { - return callback(new Error('鐩綍鍚嶇О涓嶈兘涓虹┖')); + if (value === "" || value === null || value === undefined) { + return callback(new Error("鐩綍鍚嶇О涓嶈兘涓虹┖")); } else { callback(); } @@ -269,8 +318,8 @@ update: false, }, defaultProps: { - children: 'children', - label: 'name', + children: "children", + label: "name", }, fullscreenLoading: false, oriData: [], //鍘熷鏍戞暟鎹� @@ -279,21 +328,21 @@ newData: [], //鎷栧姩鍚庡師濮嬫暟鎹� itemdetail: {}, itemaName: null, - backUpData: '', - formLabelWidth: '150px', - delChildID: '', + backUpData: "", + formLabelWidth: "150px", + delChildID: "", delChildIDs: [], dialogFormVisible: false, ruleForm: { level: null, orderNum: null, pid: null, - name: '', - descr: '', - bak: '', + name: "", + descr: "", + bak: "", }, rules: { - name: [{ required: true, validator: validName, trigger: 'blur' }], + name: [{ required: true, validator: validName, trigger: "blur" }], }, newNode: null, expandData: [], @@ -329,12 +378,15 @@ } const XLSX = require("xlsx"); const wb = XLSX.read(binary, { - type: "binary" + type: "binary", }); - const outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]], { defval: null }); // 榛樿绗竴琛屼笅涓虹┖涔熻兘瑙f瀽鍑虹涓�鍥涜 + const outdata = XLSX.utils.sheet_to_json( + wb.Sheets[wb.SheetNames[0]], + { defval: null } + ); // 榛樿绗竴琛屼笅涓虹┖涔熻兘瑙f瀽鍑虹涓�鍥涜 var data = [...outdata]; const arr = []; - data.map(v => { + data.map((v) => { const obj = {}; obj.name = v.name; obj.pname = v.pname; @@ -344,9 +396,9 @@ obj.pid = null; arr.push(obj); }); - that.tableData = arr - that.setInsertData(that.tableData) - } + that.tableData = arr; + that.setInsertData(that.tableData); + }; } }, setInsertData(res) { @@ -354,15 +406,14 @@ if (list.length != 0) { if (list[0].pname != null) { - return this.$message.error('涓婁紶鏁版嵁閿欒锛岀涓�鏉℃暟鎹笉涓虹┖'); + return this.$message.error("涓婁紶鏁版嵁閿欒锛岀涓�鏉℃暟鎹笉涓虹┖"); } - this.getAllNodeId(list) + this.getAllNodeId(list); } }, async getAllNodeId(res) { for (let i = 0; i < res.length; i++) { - var val = res[i]; if (val.pname == null) { @@ -371,29 +422,25 @@ } else { this.tableData.filter((child) => { if (child.name == val.pname) { - val.pid = child.id; val.orderNum = i + 1; } - }) + }); } const data = await insertDir(val); if (data.code != 200) { - } this.tableData.filter((child) => { if (child.name == val.name && child.pname == val.pname) { child.id = data.result; } - }) + }); this.itemaName = data.result; this.getDirTree(); - - if (res[i].children) { - this.getAllNodeId(res[i].children) + this.getAllNodeId(res[i].children); } } }, @@ -403,7 +450,7 @@ // 寰幆鎵�鏈夐」 let branchArr = cloneData.filter((child) => father.name == child.pname); // 瀵规瘮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.pname == null; // 杩斿洖涓�绾ц彍鍗� @@ -411,10 +458,10 @@ }, readFile(file) { //鏂囦欢璇诲彇 - return new Promise(resolve => { + return new Promise((resolve) => { let reader = new FileReader(); reader.readAsBinaryString(file); //浠ヤ簩杩涘埗鐨勬柟寮忚鍙� - reader.onload = ev => { + reader.onload = (ev) => { resolve(ev.target.result); }; }); @@ -441,32 +488,28 @@ // }); if (this.itemaName != null) { this.$nextTick(() => { - - this.expandData = [this.itemaName] + this.expandData = [this.itemaName]; this.$refs.tree.setCurrentKey(this.itemaName); - }); } - - } else { - console.log('鎺ュ彛鎶ラ敊'); + console.log("鎺ュ彛鎶ラ敊"); } }); }, handleClose() { - this.$confirm('纭鍏抽棴锛�') + this.$confirm("纭鍏抽棴锛�") .then((_) => { this.resetForm(); }) - .catch((_) => { }); + .catch((_) => {}); }, treeData(source) { let cloneData = JSON.parse(JSON.stringify(source)); // 瀵规簮鏁版嵁娣卞害鍏嬮殕 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 == 0; // 杩斿洖涓�绾ц彍鍗� @@ -482,104 +525,103 @@ } } switch (res) { - case 1://鍚戜笂绉诲姩 + case 1: //鍚戜笂绉诲姩 if (currentId != 0) { const tempChildrenNodex1 = pchildNodes[currentId - 1]; const tempChildrenNodex2 = pchildNodes[currentId]; - tempChildrenNodex2.orderNum = pchildNodes[currentId - 1].data.orderNum; - tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum - var arr = []; - this.oriData.filter(res => { - if (res.id == tempChildrenNodex2.data.id) { - res.orderNum = tempChildrenNodex2.orderNum; - arr.push(res) - } else if (res.id == tempChildrenNodex1.data.id) { - res.orderNum = tempChildrenNodex1.orderNum; - arr.push(res) - } - - }) - this.newData = arr; - this.sendChange(); - } else { - this.$message({ - message: '澶勪簬椤剁锛屼笉鑳界户缁笂绉�', - type: 'warning' - }); - } - break; - case 2://鍚戜笅绉诲姩 - if (currentId < (pchildNodes.length - 1)) { - const tempChildrenNodex1 = pchildNodes[currentId + 1]; - const tempChildrenNodex2 = pchildNodes[currentId]; - tempChildrenNodex2.orderNum = pchildNodes[currentId + 1].data.orderNum; + tempChildrenNodex2.orderNum = + pchildNodes[currentId - 1].data.orderNum; tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum; var arr = []; - this.oriData.filter(res => { + this.oriData.filter((res) => { if (res.id == tempChildrenNodex2.data.id) { res.orderNum = tempChildrenNodex2.orderNum; - arr.push(res) + arr.push(res); } else if (res.id == tempChildrenNodex1.data.id) { res.orderNum = tempChildrenNodex1.orderNum; - arr.push(res) + arr.push(res); } - }) + }); this.newData = arr; this.sendChange(); } else { this.$message({ - message: '澶勪簬搴曠锛屼笉鑳界户缁笅绉�', - type: 'warning' + message: "澶勪簬椤剁锛屼笉鑳界户缁笂绉�", + type: "warning", }); - } break; - + case 2: //鍚戜笅绉诲姩 + if (currentId < pchildNodes.length - 1) { + const tempChildrenNodex1 = pchildNodes[currentId + 1]; + const tempChildrenNodex2 = pchildNodes[currentId]; + tempChildrenNodex2.orderNum = + pchildNodes[currentId + 1].data.orderNum; + tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum; + var arr = []; + this.oriData.filter((res) => { + if (res.id == tempChildrenNodex2.data.id) { + res.orderNum = tempChildrenNodex2.orderNum; + arr.push(res); + } else if (res.id == tempChildrenNodex1.data.id) { + res.orderNum = tempChildrenNodex1.orderNum; + arr.push(res); + } + }); + this.newData = arr; + this.sendChange(); + } else { + this.$message({ + message: "澶勪簬搴曠锛屼笉鑳界户缁笅绉�", + type: "warning", + }); + } + break; } }, setDelNode() { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ョ洰褰�, 鏄惁缁х画?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning' - }).then(() => { - this.remove(this.newNode, this.itemdetail) - }).catch(() => { - this.$message({ - type: 'info', - message: '宸插彇娑堝垹闄�' - }); + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.remove(this.newNode, this.itemdetail) + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' }); + }); }, setNewNode(res) { var id, lever, orderNum; - if (res == 1) {//鏂板鍚岀骇 + if (res == 1) { + //鏂板鍚岀骇 id = this.itemdetail.pid; - orderNum = this.getMaxOrderNum(this.newNode.parent.childNodes) + orderNum = this.getMaxOrderNum(this.newNode.parent.childNodes); lever = this.itemdetail.level; - } else if (res == 2) {//鏂板瀛愮骇 + } else if (res == 2) { + //鏂板瀛愮骇 id = this.itemdetail.id; - orderNum = this.getMaxOrderNum(this.newNode.childNodes) + orderNum = this.getMaxOrderNum(this.newNode.childNodes); lever = this.itemdetail.level + 1; } this.ruleForm.pid = id; this.ruleForm.level = lever; - this.ruleForm.orderNum = orderNum + this.ruleForm.orderNum = orderNum; this.dialogFormVisible = true; }, getMaxOrderNum(res) { var val = -100; for (var i in res) { if (res[i].data.orderNum > val) { - val = res[i].data.orderNum + val = res[i].data.orderNum; } } val = val + 1; return val; }, - - append(node, data) { this.dialogFormVisible = true; @@ -607,8 +649,8 @@ if (res.code == 200) { this.$message({ - message: '娣诲姞鎴愬姛', - type: 'success', + message: "娣诲姞鎴愬姛", + type: "success", }); this.itemaName = res.result; this.itemdetail = {}; @@ -621,7 +663,7 @@ }) .catch((res) => { this.itemdetail = {}; - this.$message.error('娣诲姞澶辫触'); + this.$message.error("娣诲姞澶辫触"); this.fullscreenLoading = false; console.log(res); }); @@ -635,10 +677,10 @@ remove(node, data) { this.itemaName = node.parent.data.id; - this.$confirm('姝ゆ搷浣滃皢鍒犻櫎璇ヨ妭鐐�, 鏄惁缁х画?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning', + this.$confirm("姝ゆ搷浣滃皢鍒犻櫎璇ヨ妭鐐�, 鏄惁缁х画?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", }) .then(() => { //鍏勫紵閲嶆柊鎺掑簭 @@ -659,29 +701,29 @@ .then((res) => { if (res[0].code == 200 && res[1].code == 200) { this.$message({ - type: 'success', - message: '鍒犻櫎鎴愬姛!', + type: "success", + message: "鍒犻櫎鎴愬姛!", }); this.itemdetail = {}; this.getDirTree(); } else if (res[0].code == 200) { - this.$message.error('鍒犻櫎鎴愬姛锛屼綅缃皟鏁村け璐�'); + this.$message.error("鍒犻櫎鎴愬姛锛屼綅缃皟鏁村け璐�"); } else if (res[1].code == 200) { - this.$message.error('鍒犻櫎澶辫触,浣嶇疆璋冩暣鎴愬姛'); + this.$message.error("鍒犻櫎澶辫触,浣嶇疆璋冩暣鎴愬姛"); } else { - this.$message.error('鍒犻櫎澶辫触'); + this.$message.error("鍒犻櫎澶辫触"); } }) .catch(() => { - this.$message.error('鍒犻櫎澶辫触'); + this.$message.error("鍒犻櫎澶辫触"); this.itemdetail = {}; }); //閲嶇疆瑕佸垹闄ょ殑瀛怚D this.delChildIDs = []; }) .catch(() => { - this.$message('宸插彇娑堝垹闄�'); + this.$message("宸插彇娑堝垹闄�"); }); // this.dialogMessage="鏄惁鍒犻櫎" // this.dialogFlag = 1; @@ -723,20 +765,20 @@ this.old_dirDat = JSON.parse(JSON.stringify(this.dirList)); //灏嗗浠界殑dir閲嶆柊璧嬪�� }, handleDrop(draggingNode, dropNode, dropType, ev) { - this.$confirm('姝ゆ搷浣滃皢淇濆瓨鐩綍鏇存敼, 鏄惁缁х画?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning', + this.$confirm("姝ゆ搷浣滃皢淇濆瓨鐩綍鏇存敼, 鏄惁缁х画?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", }) .then(() => { //鐖惰妭鐐� - let data = dropType != 'inner' ? dropNode.parent.data : dropNode.data; + let data = dropType != "inner" ? dropNode.parent.data : dropNode.data; // 鐖惰妭鐐逛腑鍏ㄩ儴瀛愯妭鐐� let nodeData = - dropNode.level == 1 && dropType != 'inner' ? data : data.children; + dropNode.level == 1 && dropType != "inner" ? data : data.children; //鍙樻洿鑺傜偣 nodeData.forEach((item, i) => { - if (dropType != 'inner') { + if (dropType != "inner") { if (draggingNode.data.pid === dropNode.data.pid) { item.pid = item.pid; } else { @@ -760,7 +802,7 @@ this.sendChange(); }) .catch(() => { - this.$message('宸插彇娑堟洿鏀�'); + this.$message("宸插彇娑堟洿鏀�"); this.dirList = this.old_dirDat; //灏嗗浠界殑dir閲嶆柊璧嬪�� }); }, @@ -771,11 +813,11 @@ this.getDirTree(); return; } else { - this.$message.error('淇敼澶辫触锛岃閲嶈瘯锛�'); + this.$message.error("淇敼澶辫触锛岃閲嶈瘯锛�"); } }) .catch(() => { - this.$message.error('淇敼澶辫触锛岃閲嶈瘯锛�'); + this.$message.error("淇敼澶辫触锛岃閲嶈瘯锛�"); }); }, handleNodeClick(data, node) { @@ -802,7 +844,7 @@ }, 500); }) .catch((res) => { - this.$message.error('淇敼澶辫触锛岃閲嶈瘯锛�'); + this.$message.error("淇敼澶辫触锛岃閲嶈瘯锛�"); this.fullscreenLoading = false; }); } else { @@ -814,20 +856,19 @@ reset(formName) { this.itemdetail = {}; // this.$refs[formName].resetFields(); - if (this.backUpData != '') { + if (this.backUpData != "") { this.itemdetail = JSON.parse(this.backUpData); } }, showPermsMenu(res) { - switch (res.tag) { - case '/delete': + case "/delete": this.menuStatus.delete = true; break; - case '/insert': + case "/insert": this.menuStatus.insert = true; break; - case '/update': + case "/update": this.menuStatus.update = true; break; } @@ -844,7 +885,6 @@ } for (var i = 0; i < permsEntity.length; i++) { if (val === permsEntity[i].perms) { - this.showPermsMenu(permsEntity[i]); } } @@ -859,29 +899,28 @@ <style lang="less" scoped> .subpage_Box { - height: 98%; + height: 96%; width: 98%; - padding: 1%; + padding: 1%; + border-radius: 10px; .cataLogContent { width: 100%; height: 100%; - max-height: 670px; display: flex; - align-items: center; + // align-items: center; justify-content: space-between; .cataLog_leftTree { - width: 15%; - height: 100%; + width: 30%; + height: 98%; border-radius: 5px; - padding: 1%; + padding: 10px; overflow-y: auto; } .cataLog_rightContent { - width: 80%; - height: 100%; - max-height: 670px; + width: 66%; + height: 98%; border-radius: 5px; - padding: 1%; + padding: 10px; .menuTop { /deep/ .el-form-item { margin-bottom: 0px; @@ -890,4 +929,7 @@ } } } +.btnBox{ + text-align: right; +} </style> diff --git a/src/views/datamanage/dataUpdata.vue b/src/views/datamanage/dataUpdata.vue index 394b056..58e7da8 100644 --- a/src/views/datamanage/dataUpdata.vue +++ b/src/views/datamanage/dataUpdata.vue @@ -18,7 +18,7 @@ :label="$t('dataManage.dataUpObj.uploaddata')" name="first" > - <div class="subpage_Iquery subpage_Div"> + <div class="inquire subpage_Div" ref="container"> <el-form :inline="true" :model="formInline" @@ -159,80 +159,80 @@ </el-option> </el-select> </el-form-item> - - <!-- 閫夋嫨鏁版嵁 --> - <el-form-item> - <el-link - :disabled="tableData.length == 0 ? false : true" - v-show="formInline.specialtyData == '璇烽�夋嫨鏁版嵁'" - @click="setSelectFile" - :underline="false" - type="primary" - >{{$t('dataManage.dataUpObj.selectData') }}</el-link> - <el-link - v-show="formInline.specialtyData != '璇烽�夋嫨鏁版嵁'" - @click="restSelectFile" - :underline="false" - type="primary" - >{{$t('common.reset') }}</el-link> - <input - id="selectDataFile" - type="file" - name="file" - multiple="multiple" - :accept="formInline.selectFileType" - @change="handleSelectFileChange" - style="display: none" - ></input> - </el-form-item> - <el-form-item> - <el-input - placeholder="璇疯緭鍏ュ唴瀹�" - v-model="formInline.specialtyData" - style="width:210px;" - disabled - > - </el-input> - </el-form-item> - <!-- 閫夋嫨鍏冩暟鎹� --> - <el-form-item v-show="uploadFlag"> - <el-link - :disabled="tableData.length == 0 ? false : true" - v-show="formInline.metaData == '璇烽�夋嫨鍏冩暟鎹�'" - @click="setMetaFile" - :underline="false" - type="primary" - >{{$t('dataManage.dataUpObj.selectMetadata') }}</el-link> - <el-link - v-show="formInline.metaData != '璇烽�夋嫨鍏冩暟鎹�'" - @click="restMetaFile" - :underline="false" - type="primary" - >{{$t('common.reset') }}</el-link> - <input - id="metaDataFile" - type="file" - name="file" - multiple="multiple" - accept=".xls,.xlsx" - style="display: none" - @change="handleMetaFileChange" - ></input> - </el-form-item> - <el-form-item - v-show="uploadFlag" - style="margin-left: 0.7%;" - > - <el-input - placeholder="璇疯緭鍏ュ唴瀹�" - v-model="formInline.metaData" - style="width:210px;" - disabled - > - </el-input> - </el-form-item> - <!-- 閫夋嫨WBS鏁版嵁 --> - <el-form-item v-show="!uploadFlag"> + <div class="flex_box"> + <div style="margin-right: auto"> + <!-- 閫夋嫨鏁版嵁 --> + <el-form-item> + <el-link + :disabled="tableData.length == 0 ? false : true" + v-show="formInline.specialtyData == '璇烽�夋嫨鏁版嵁'" + @click="setSelectFile" + :underline="false" + type="primary" + >{{$t('dataManage.dataUpObj.selectData') }}</el-link> + <el-link + v-show="formInline.specialtyData != '璇烽�夋嫨鏁版嵁'" + @click="restSelectFile" + :underline="false" + type="primary" + >{{$t('common.reset') }}</el-link> + <input + id="selectDataFile" + type="file" + name="file" + multiple="multiple" + :accept="formInline.selectFileType" + @change="handleSelectFileChange" + style="display: none" + ></input> + </el-form-item> + <el-form-item> + <el-input + placeholder="璇疯緭鍏ュ唴瀹�" + v-model="formInline.specialtyData" + style="width:210px;" + disabled + > + </el-input> + </el-form-item> + <!-- 閫夋嫨鍏冩暟鎹� --> + <el-form-item v-show="uploadFlag"> + <el-link + :disabled="tableData.length == 0 ? false : true" + v-show="formInline.metaData == '璇烽�夋嫨鍏冩暟鎹�'" + @click="setMetaFile" + :underline="false" + type="primary" + >{{$t('dataManage.dataUpObj.selectMetadata') }}</el-link> + <el-link + v-show="formInline.metaData != '璇烽�夋嫨鍏冩暟鎹�'" + @click="restMetaFile" + :underline="false" + type="primary" + >{{$t('common.reset') }}</el-link> + <input + id="metaDataFile" + type="file" + name="file" + multiple="multiple" + accept=".xls,.xlsx" + style="display: none" + @change="handleMetaFileChange" + ></input> + </el-form-item> + <el-form-item + v-show="uploadFlag" + > + <el-input + placeholder="璇疯緭鍏ュ唴瀹�" + v-model="formInline.metaData" + style="width:210px;" + disabled + > + </el-input> + </el-form-item> + <!-- 閫夋嫨WBS鏁版嵁 --> + <el-form-item v-show="!uploadFlag"> <el-link :disabled="tableData.length == 0 ? false : true" v-show="formInline.wbsData == '璇烽�夋嫨WBS鏁版嵁'" @@ -256,8 +256,8 @@ style="display: none" @change="handleWBSFileChange" ></input> - </el-form-item> - <el-form-item v-show="!uploadFlag"> + </el-form-item> + <el-form-item v-show="!uploadFlag"> <el-input placeholder="璇烽�夋嫨WBS鏁版嵁" v-model="formInline.wbsData" @@ -265,8 +265,10 @@ disabled > </el-input> - </el-form-item> - <el-form-item style="float: right;"> + </el-form-item> + </div> + <div> + <el-form-item> <!-- 涓婁紶 --> <el-button v-if="menuStatus.upload" @@ -308,16 +310,21 @@ >{{$t('common.quayTest')}} </el-button> - </el-form-item> + </el-form-item> + </div> + </div> + + </el-form> - </el-form> + </div> <!-- 涓婁紶鏁版嵁鍒楄〃 --> - <div class="subpage_Content subpage_Div"> + <div class="table_box" :style="styleVar"> <el-table - style="min-height: 470px;" + style="width:100%" :data="tableData" @selection-change="handleSelectionChange" + height="calc(100% - 57px)" > <el-table-column type="selection" @@ -376,12 +383,14 @@ :label="$t('dataManage.dataUpObj.receiptdata')" name="second" > - <div class="subpage_Iquery subpage_Div"> + <div class="inquire subpage_Div" ref="container1"> <el-form :inline="true" :model="formWarehousing" class="demo-form-inline" > + <div class="flex_box"> + <div style="margin-right: auto"> <el-form-item :label="$t('dataManage.dataUpObj.describe')"> <el-input v-model="formWarehousing.name" @@ -389,7 +398,9 @@ style="width: 200px;" ></el-input> </el-form-item> - <el-form-item style="float: right;"> + </div> + <div> + <el-form-item> <el-button v-if="menuStatus.delete" @click="setWarehouseDel" @@ -412,7 +423,7 @@ type="info" >{{ $t('common.reset') }}</el-button> </el-form-item> - <el-form-item style="float: right;"> + <el-form-item> <el-button v-if="menuStatus.upload" :disabled="multipleDelete.length == 0 ? true : false" @@ -422,17 +433,20 @@ size="small" >{{ $t('common.enclosure') }}</el-button> </el-form-item> + </div> + </div> + + </el-form> </div> <!-- 鍏ュ簱 --> - <div class="bottom"> - <div class="rightTable subpage_Div"> - <div class="table_box"> + + <div class="table_box" :style="styleVar1"> <el-table ref="filterTable" :data="waretableData" style="width: 100%" - height="99%" + height="calc(100% - 57px)" @selection-change="handleDelteChange" > <el-table-column @@ -514,8 +528,7 @@ width="100" /> </el-table> - </div> - <div class="pagination_box"> + <div class="pagination_box"> <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" @@ -527,8 +540,9 @@ > </el-pagination> </div> - </div> - </div> + </div> + + </el-tab-pane> </el-tabs> <!-- 璐ㄦ寮圭獥 --> @@ -1055,9 +1069,9 @@ </template> <script> -import $ from 'jquery'; -import MyBread from '../../components/MyBread.vue'; -import { getToken } from '@/utils/auth'; +import $ from "jquery"; +import MyBread from "../../components/MyBread.vue"; +import { getToken } from "@/utils/auth"; import { dataUploadSelectPath, selectdirTab, @@ -1075,38 +1089,45 @@ dataUpload_insertFiles, dataUpload_selectFields, dataUpload_selectDbData, -} from '../../api/api'; +} from "../../api/api"; export default { - name: 'dataUpdata', + name: "dataUpdata", components: { MyBread, }, data() { return { - coordinateOption: [], - disOptions: [{ - name: '宕╁娌荤悊', - value: '宕╁娌荤悊', - }, { - name: '涓嶇ǔ瀹氭枩鍧℃不鐞�', - value: '涓嶇ǔ瀹氭枩鍧℃不鐞�', - }, { - name: '鍦伴潰濉岄櫡娌荤悊', - value: '鍦伴潰濉岄櫡娌荤悊', - }, { - name: '楂橀櫋杈瑰潯娌荤悊', - value: '楂橀櫋杈瑰潯娌荤悊', - }, { - name: '娉ョ煶娴佹不鐞�', - value: '娉ョ煶娴佹不鐞�', - }, { - name: '姘存瘉娌荤悊', - value: '姘存瘉娌荤悊', - }, { - name: '婊戝潯娌荤悊', - value: '婊戝潯娌荤悊', - }], + disOptions: [ + { + name: "宕╁娌荤悊", + value: "宕╁娌荤悊", + }, + { + name: "涓嶇ǔ瀹氭枩鍧℃不鐞�", + value: "涓嶇ǔ瀹氭枩鍧℃不鐞�", + }, + { + name: "鍦伴潰濉岄櫡娌荤悊", + value: "鍦伴潰濉岄櫡娌荤悊", + }, + { + name: "楂橀櫋杈瑰潯娌荤悊", + value: "楂橀櫋杈瑰潯娌荤悊", + }, + { + name: "娉ョ煶娴佹不鐞�", + value: "娉ョ煶娴佹不鐞�", + }, + { + name: "姘存瘉娌荤悊", + value: "姘存瘉娌荤悊", + }, + { + name: "婊戝潯娌荤悊", + value: "婊戝潯娌荤悊", + }, + ], testQuayVisible: false, formCheckAll: { names: null, @@ -1119,17 +1140,17 @@ xmmc: null, names: null, sjzy: null, - tolerance: '0.001', - gcdOffset: '20', - rangeOffset: '200', - kzdOffset: '100', - xgMax: '0.005', - coordinateSystem: 'CGCS2000/degree', - imgResolution: '0.2', - demTolerance: '5', - demChangeRate: '200', - lazDensity: '1', - imgResolution: '0.2', + tolerance: "0.001", + gcdOffset: "20", + rangeOffset: "200", + kzdOffset: "100", + xgMax: "0.005", + coordinateSystem: "CGCS2000/degree", + imgResolution: "0.2", + demTolerance: "5", + demChangeRate: "200", + lazDensity: "1", + imgResolution: "0.2", }, quayTestShow: { checkOsgb: false, @@ -1154,7 +1175,7 @@ name: null, }, count: 0, - formWarehousing: { name: '' }, + formWarehousing: { name: "" }, multipleSelection: [], tableData: [], entryOption: [], @@ -1162,45 +1183,53 @@ verOption: [], catalogOption: [], activeTabName: "first", - uploadOption: [{ - value: 'v1', - label: '鍗曟枃浠朵笂浼�' - }, { - value: 'v2', - label: '椤圭洰鏁翠綋涓婁紶' - }], + uploadOption: [ + { + value: "v1", + label: "鍗曟枃浠朵笂浼�", + }, + { + value: "v2", + label: "椤圭洰鏁翠綋涓婁紶", + }, + ], formInline: { - uploadType: 'v1', + uploadType: "v1", dirid: null, verid: null, - specialtyId: '娴嬮噺涓撲笟', - specialtyData: '璇烽�夋嫨鏁版嵁', - metaData: '璇烽�夋嫨鍏冩暟鎹�', - wbsData: '璇烽�夋嫨WBS鏁版嵁', + specialtyId: "娴嬮噺涓撲笟", + specialtyData: "璇烽�夋嫨鏁版嵁", + metaData: "璇烽�夋嫨鍏冩暟鎹�", + wbsData: "璇烽�夋嫨WBS鏁版嵁", entryId: null, - selectFileType: '*.*', + selectFileType: "*.*", coordinateId: null, path: null, }, cascader: { - label: 'name', - value: 'id', - children: 'children', + label: "name", + value: "id", + children: "children", emitPath: false, }, - specialtyOption: [{ - value: '娴嬮噺涓撲笟', - label: '娴嬮噺涓撲笟' - }, { - value: '鍕樺療涓撲笟', - label: '鍕樺療涓撲笟' - }, { - value: '鍦扮伨涓撲笟', - label: '鍦扮伨涓撲笟' - }, { - value: '娲炲簱涓撲笟', - label: '娲炲簱涓撲笟' - }], + specialtyOption: [ + { + value: "娴嬮噺涓撲笟", + label: "娴嬮噺涓撲笟", + }, + { + value: "鍕樺療涓撲笟", + label: "鍕樺療涓撲笟", + }, + { + value: "鍦扮伨涓撲笟", + label: "鍦扮伨涓撲笟", + }, + { + value: "娲炲簱涓撲笟", + label: "娲炲簱涓撲笟", + }, + ], fileType: [], pathBak: null, progress: 0, @@ -1212,9 +1241,9 @@ tableWareThree: [], wareSelectOne: null, wareSelectTwo: null, - activeName: '', - activeName2: '', - activeName3: '', + activeName: "", + activeName2: "", + activeName3: "", wareTableFlag: null, insertWareList: null, loading: false, @@ -1233,15 +1262,22 @@ update: false, upload: false, download: false, - }, jindutiao: 0, jindudialogVisible: false, jindutiaoname: [], enclosureData: [], enclosureVisible: false, - enclosureTitle: '', - } + enclosureTitle: "", + tableHeight: 0, + timer: 0, + styleVar: { + height: "calc(100% - 109px)", + }, + styleVar1: { + height: "calc(100% - 109px)", + }, + }; }, mounted() { @@ -1255,92 +1291,119 @@ this.getFilePath(); //鏉冮檺鑾峰彇 this.getPerms(); + window.addEventListener("resize", this.onResize); + this.calHeight(); }, - watch: { - + beforeDestroy() { + this.timer && clearTimeout(this.timer); + window.removeEventListener("resize", this.onResize); }, + watch: {}, methods: { + onResize() { + this.timer && clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.calHeight(); + }, 500); + }, + calHeight() { + this.$nextTick(() => { + const rect = this.$refs.container.getBoundingClientRect(); + const rect1 = this.$refs.container1.getBoundingClientRect(); + console.log(rect) + console.log(rect1) + this.tableHeight = `${rect.height + 40}px`; + this.styleVar["height"] = `calc(100% - ${rect.height + 40}px)`; + this.styleVar1["height"] = `calc(100% - ${rect1.height + 40}px)`; + }); + }, + editFromDataClose() { + this.updateFormdialog = false; + this.$nextTick(() => { + this.editForm = JSON.parse(this.initialForm); + }); + }, //闄勪欢鍙樺寲 uploadAnFilesChange() { var formData = new FormData(); var fs = document.getElementById("editimageFile"); if (fs.files.length == 0) { - this.$message.error('璇烽�夋嫨瑕佷笂浼犵殑鏂囦欢'); + this.$message.error("璇烽�夋嫨瑕佷笂浼犵殑鏂囦欢"); return; } for (var i = 0, c = fs.files.length; i < c; i++) { formData.append("file", fs.files[i]); // fs.files[i].name,file } for (var i in this.enclosureData) { - formData.append('ids', this.enclosureData[i]) + formData.append("ids", this.enclosureData[i]); } - const that = this - that.jindudialogVisible = true - that.$set(this, 'jindutiaoname', "闄勪欢涓婁紶") - that.$set(this, 'jindutiao', 0) + const that = this; + that.jindudialogVisible = true; + that.$set(this, "jindutiaoname", "闄勪欢涓婁紶"); + that.$set(this, "jindutiao", 0); this.loading = true; - $.ajax(BASE_URL + "/dataUpload/uploadXlsAnnex?token=" + getToken() + "&path=" + this.formInline.path, { - type: "post", - data: formData, - async: true, - cache: false, - processData: false, - contentType: false, - success: (rs) => { - this.loading = false; - if (rs.code != 200) { - return this.$message.error('闄勪欢涓婁紶澶辫触'); - } + $.ajax( + BASE_URL + + "/dataUpload/uploadXlsAnnex?token=" + + getToken() + + "&path=" + + this.formInline.path, + { + type: "post", + data: formData, + async: true, + cache: false, + processData: false, + contentType: false, + success: (rs) => { + this.loading = false; + if (rs.code != 200) { + return this.$message.error("闄勪欢涓婁紶澶辫触"); + } - this.$set(this, 'jindutiao', 100) - this.$message({ - message: '闄勪欢涓婁紶鎴愬姛', - type: 'success' - }); - - }, - error: (rs) => { - this.loading = false; - this.$message.error('闄勪欢涓婁紶澶辫触'); - }, - xhr: function () { - var myXhr = $.ajaxSettings.xhr(); - if (myXhr.upload) { //妫�鏌pload灞炴�ф槸鍚﹀瓨鍦� - myXhr.upload.addEventListener('progress', that.progressHandlingFunction, false); //缁戝畾progress浜嬩欢鐨勫洖璋冨嚱鏁� - } - return myXhr; //xhr瀵硅薄杩斿洖缁檍Query浣跨敤 + this.$set(this, "jindutiao", 100); + this.$message({ + message: "闄勪欢涓婁紶鎴愬姛", + type: "success", + }); + }, + error: (rs) => { + this.loading = false; + this.$message.error("闄勪欢涓婁紶澶辫触"); + }, + xhr: function () { + var myXhr = $.ajaxSettings.xhr(); + if (myXhr.upload) { + //妫�鏌pload灞炴�ф槸鍚﹀瓨鍦� + myXhr.upload.addEventListener( + "progress", + that.progressHandlingFunction, + false + ); //缁戝畾progress浜嬩欢鐨勫洖璋冨嚱鏁� + } + return myXhr; //xhr瀵硅薄杩斿洖缁檍Query浣跨敤 + }, } - }); - - - - - - - - - + ); }, //閫夋嫨涓婁紶闄勪欢鐨勬枃浠� uploadAnFiles() { - $('#editimageFile').click(); + $("#editimageFile").click(); }, //涓婁紶闄勪欢 - uploadAnnex() { - - }, + uploadAnnex() {}, //闄勪欢涓婁紶 setEnclosure() { var enclosureData = [ - 'bd.b_pac_hydrogeology', - 'bd.b_pac_frozensoil', - 'bd.b_pac_geologic_hazard', - 'bd.b_pac_marine_meteorological', - 'bd.b_pac_meteorological', - 'bs.m_equipment_nameplate', - 'bs.m_hydraulic_protection', - 'bs.m_marker', - 'bs.s_borehole' + "bd.b_pac_hydrogeology", + "bd.b_pac_frozensoil", + "bd.b_pac_geologic_hazard", + "bd.b_pac_marine_meteorological", + "bd.b_pac_meteorological", + "bs.m_equipment_nameplate", + "bs.m_hydraulic_protection", + "bs.m_marker", + "bs.s_borehole", ]; var std = []; this.enclosureData = []; @@ -1349,14 +1412,13 @@ var row = this.multipleDelete[i]; if (row.tab && row.rows && enclosureData.indexOf(row.tab) > -1) { - - this.enclosureData.push(row.id) + this.enclosureData.push(row.id); } else { - std.push(row.name) + std.push(row.name); } } if (std.length != 0) { - this.enclosureTitle = std.toString() + this.enclosureTitle = std.toString(); this.enclosureVisible = true; } else { this.uploadAnFiles(); @@ -1364,21 +1426,20 @@ }, //鏉冮檺閰嶇疆 showPermsMenu(res) { - switch (res.tag) { - case '/delete': + case "/delete": this.menuStatus.delete = true; break; - case '/insert': + case "/insert": this.menuStatus.insert = true; break; - case '/update': + case "/update": this.menuStatus.update = true; break; - case '/upload': + case "/upload": this.menuStatus.upload = true; break; - case '/download': + case "/download": this.menuStatus.download = true; break; } @@ -1395,7 +1456,6 @@ } for (var i = 0; i < permsEntity.length; i++) { if (val === permsEntity[i].perms) { - this.showPermsMenu(permsEntity[i]); } } @@ -1414,16 +1474,16 @@ var val = res.tab.split("."); const data = await dataUpload_selectFields({ ns: val[0], - tab: val[1] - }) + tab: val[1], + }); if (data.code != 200) { - this.$message.error('瀛楁鍒楄〃璋冪敤澶辫触'); - return + this.$message.error("瀛楁鍒楄〃璋冪敤澶辫触"); + return; } var val_data = data.result; for (var i in val_data) { - if (val_data[i].alias.indexOf('ID') != -1) { - val_data[i].alias = val_data[i].alias.replace('ID', '') + if (val_data[i].alias.indexOf("ID") != -1) { + val_data[i].alias = val_data[i].alias.replace("ID", ""); } } this.dialogVisible = true; @@ -1433,14 +1493,14 @@ id: res.id, pageIndex: 1, pageSize: 10, - } + }; this.getDataLoaderSelectDbData(); }, async getDataLoaderSelectDbData() { const data1 = await dataUpload_selectDbData(this.listLoader); if (data1.code != 200) { - this.$message.error('瀛楁鍒楄〃璋冪敤澶辫触'); - return + this.$message.error("瀛楁鍒楄〃璋冪敤澶辫触"); + return; } var val = data1.result; for (var i in val) { @@ -1450,10 +1510,10 @@ val[i].verid = val[i].verName; val[i].updateuser = val[i].updateName; if (val[i].createtime != null) { - val[i].createtime = this.changetimeLayer(val[i].createtime) + val[i].createtime = this.changetimeLayer(val[i].createtime); } if (val[i].updatetime != null) { - val[i].updatetime = this.changetimeLayer(val[i].updatetime) + val[i].updatetime = this.changetimeLayer(val[i].updatetime); } } this.dbTableData = data1.result; @@ -1462,9 +1522,9 @@ //鑷姩鍖归厤鍙栨秷 setInsrtWareTableClose() { this.dialogWarehousing = false; - this.activeName = ''; - this.activeName2 = ''; - this.activeName3 = ''; + this.activeName = ""; + this.activeName2 = ""; + this.activeName3 = ""; this.tableWareThree = []; this.tableWareTwo = []; this.tableWareOne = []; @@ -1485,15 +1545,17 @@ } this.loading = true; - const res = await dataUpload_insertFiles(JSON.stringify(this.insertWareList)); - this.loading = false + const res = await dataUpload_insertFiles( + JSON.stringify(this.insertWareList) + ); + this.loading = false; if (res.code != 200) { - this.$message.error('鏁版嵁鍏ュ簱澶辫触'); + this.$message.error("鏁版嵁鍏ュ簱澶辫触"); return; } this.$message({ - message: '鏁版嵁鍏ュ簱鎴愬姛', - type: 'success' + message: "鏁版嵁鍏ュ簱鎴愬姛", + type: "success", }); this.setInsrtWareTableClose(); }, @@ -1503,10 +1565,10 @@ var val2 = this.tableWareTwo; var std = []; for (var i = 0; i < val1.length; i++) { - const stdTab = this.setSplitWare(val1[i].tab) + const stdTab = this.setSplitWare(val1[i].tab); for (var j = 0; j < val2.length; j++) { if (val2[j].tab == stdTab) { - std.push(val1[i].tab) + std.push(val1[i].tab); val1[i].entity = val2[j].entity; val1[i].tabDesc = val2[j].tabDesc; val1[i].tabs = val2[j].tab; @@ -1515,8 +1577,10 @@ } } } - std.forEach(item => { - this.tableWareOne = this.tableWareOne.filter(items => items.tab !== item); + std.forEach((item) => { + this.tableWareOne = this.tableWareOne.filter( + (items) => items.tab !== item + ); }); }, setSplitWare(res) { @@ -1539,36 +1603,36 @@ if (this.tableWareOne.indexOf(value1) != -1) { } else { this.tableWareOne.push(value1); - this.tableWareThree.splice(res, 1) - this.activeName = ''; - this.activeName2 = ''; - this.activeName3 = ''; + this.tableWareThree.splice(res, 1); + this.activeName = ""; + this.activeName2 = ""; + this.activeName3 = ""; } }, //鏁版嵁鍖归厤鍚戝彸 setWareTableChangeRight() { this.wareSelectOne.entity = this.wareSelectTwo.entity; this.wareSelectOne.tabDesc = this.wareSelectTwo.tabDesc; - this.wareSelectOne.tabs = this.wareSelectTwo.ns + "." + this.wareSelectTwo.tab; + this.wareSelectOne.tabs = + this.wareSelectTwo.ns + "." + this.wareSelectTwo.tab; if (this.tableWareThree.indexOf(this.wareSelectOne) != -1) { - } else { - this.tableWareThree.push(this.wareSelectOne) + this.tableWareThree.push(this.wareSelectOne); this.tableWareOne.forEach((value, index, array) => { if (value.tab == this.wareSelectOne.tab) { - this.tableWareOne.splice(index, 1) + this.tableWareOne.splice(index, 1); } - }) - this.activeName = ''; - this.activeName2 = ''; - this.activeName3 = ''; + }); + this.activeName = ""; + this.activeName2 = ""; + this.activeName3 = ""; } }, //鏌ヨ鎵�鏈夌殑琛� async getDataLoaderSelectTabs() { const res = await dataUpload_selectTabs(); if (res.code != 200) { - this.$message.error('鏁版嵁璇锋眰澶辫触'); + this.$message.error("鏁版嵁璇锋眰澶辫触"); return; } this.tableWareTwo = res.result; @@ -1576,12 +1640,12 @@ //鏁版嵁鍖归厤宸︿晶鐐瑰嚮浜嬩欢 singleElection(row) { this.wareSelectOne = row; - this.activeName = row.eventid + this.activeName = row.eventid; }, //鏁版嵁鍖归厤宸︿晶涓棿鐐瑰嚮浜嬩欢 singleElection2(row) { this.wareSelectTwo = row; - this.activeName2 = row.entity + this.activeName2 = row.entity; }, //鏁版嵁鍖归厤宸︿晶鍙充晶鐐瑰嚮浜嬩欢 singleElection3(res) { @@ -1590,26 +1654,30 @@ }, //寮�鍚暟鎹尮閰� showWareHousing() { - this.getDataLoaderSelectTabs() + this.getDataLoaderSelectTabs(); this.dialogWarehousing = true; - }, //鏁版嵁鍏ュ簱 async setFileWare() { - if (this.pathBak != null) {//鏄惁鏈夎川妫�鏂规 - if (this.formInline.uploadType == 'v1') {//鍗曟枃浠朵笂浼� + if (this.pathBak != null) { + //鏄惁鏈夎川妫�鏂规 + if (this.formInline.uploadType == "v1") { + //鍗曟枃浠朵笂浼� var std = []; for (var i in this.tableData) { - if (this.tableData[i].name.indexOf('.zip') != -1) { + if (this.tableData[i].name.indexOf(".zip") != -1) { if (this.tableData[i].code != null) { std.push(this.tableData[i].name); } } } if (std.length != 0) { - return this.$message.error(std.toString() + ",鏈川妫�鎴栬川妫�澶辫触,涓嶈兘鍏ュ簱"); + return this.$message.error( + std.toString() + ",鏈川妫�鎴栬川妫�澶辫触,涓嶈兘鍏ュ簱" + ); } - } else if (this.formInline.uploadType == 'v2') {//鏁翠綋椤圭洰涓婁紶 + } else if (this.formInline.uploadType == "v2") { + //鏁翠綋椤圭洰涓婁紶 if (this.tableData.length != 2) { return this.$message.error("璇蜂繚鐣欎竴涓獄ip鏁版嵁,涓�涓猈BS鏁版嵁杩涜鍏ュ簱"); @@ -1621,20 +1689,20 @@ } } if (std.length != 0) { - return this.$message.error(std.toString() + ",鏈川妫�鎴栬川妫�澶辫触,涓嶈兘鍏ュ簱"); + return this.$message.error( + std.toString() + ",鏈川妫�鎴栬川妫�澶辫触,涓嶈兘鍏ュ簱" + ); } - } - } var obj = { dirid: this.formInline.dirid, epsgCode: this.formInline.coordinateId, path: this.formInline.path, verid: this.formInline.verid, - } + }; //鏌ヨ鏄犲皠 - const data = await dataUpload_selectMappers(obj) + const data = await dataUpload_selectMappers(obj); if (data.code != 200) { return this.$message.error("鏁版嵁鏄犲皠澶辫触"); } @@ -1643,38 +1711,43 @@ this.insertWareList = data.result; for (var i in result) { if (result[i].type == "shp" || result[i].type == "gdb") { - std.push(result[i]) + std.push(result[i]); } } if (std.length != 0) { this.tableWareOne = std; - this.showWareHousing() + this.showWareHousing(); } else { this.setInsrtWareTable(); } - }, //涓嬭浇鏃ュ織 handerLogClick(res) { - for (var i in res.code) { - var url = BASE_URL + '/dataUpload/downloadResult?token=' + getToken() + "&id=" + res.code[i]; + var url = + BASE_URL + + "/dataUpload/downloadResult?token=" + + getToken() + + "&id=" + + res.code[i]; $("#downFrame").attr("src", url).click(); } - }, //鏁翠綋鏂囦欢璐ㄦ鎻愪氦 commonTestQuay() { this.testQuayVisible = false; if (this.formCheckAll.diZaiType != "NO") { - this.formCheckAll.isDiZai = "YES" + this.formCheckAll.isDiZai = "YES"; } this.loading = true; this.getStartTestQuayTaskStatus(); }, //鏁翠綋鏂囦欢澶氭潯鏁版嵁璐ㄦ async getStartTestQuayTaskStatus() { - if (this.multipleSelection == 0 || this.taskStatus == this.multipleSelection.length) { + if ( + this.multipleSelection == 0 || + this.taskStatus == this.multipleSelection.length + ) { this.loading = false; return; } @@ -1682,16 +1755,16 @@ var name = this.multipleSelection[i].name; var path = this.multipleSelection[i].path; if (name.indexOf(".zip") != -1) { - this.formCheckAll.zipPath = path + this.formCheckAll.zipPath = path; } else if (name.indexOf(".xls") != -1) { - this.formCheckAll.wbsPath = path + this.formCheckAll.wbsPath = path; } else if (name.indexOf(".xlsx") != -1) { - this.formCheckAll.wbsPath = path + this.formCheckAll.wbsPath = path; } } const data = await dataUpload_uploadChecks(this.formCheckAll); if (data.code != 200) { - this.$message.error('鏁版嵁璐ㄦ鎻愪氦澶辫触'); + this.$message.error("鏁版嵁璐ㄦ鎻愪氦澶辫触"); this.taskStatus++; this.getStartTestQuayTaskStatus(); return; @@ -1699,9 +1772,8 @@ var reset = data.result; this.progress = 0; this.setIntel = setInterval(() => { - this.sendTaskStatus(reset) - }, 5000) - + this.sendTaskStatus(reset); + }, 5000); }, //鍗曟枃浠舵暟鎹川妫�鎻愪氦 @@ -1713,7 +1785,10 @@ }, //鍗曟枃浠跺鏉℃暟鎹川妫� async getStartTaskStatus() { - if (this.multipleSelection == 0 || this.taskStatus == this.multipleSelection.length) { + if ( + this.multipleSelection == 0 || + this.taskStatus == this.multipleSelection.length + ) { this.loading = false; return; } @@ -1723,14 +1798,15 @@ this.getStartTaskStatus(); } else { this.quayTestForms.names = this.pathBak; - var value = this.$refs['selectcascader'].getCheckedNodes(); + var value = this.$refs["selectcascader"].getCheckedNodes(); var bak = value[0].data.fullName.split("\\"); this.quayTestForms.xmmc = bak[this.taskStatus]; this.quayTestForms.sjzy = this.formInline.specialtyId; - this.quayTestForms.zipPath = this.multipleSelection[this.taskStatus].path; + this.quayTestForms.zipPath = + this.multipleSelection[this.taskStatus].path; const data = await dataUpload_uploadChecks(this.quayTestForms); if (data.code != 200) { - this.$message.error('鏁版嵁璐ㄦ鎻愪氦澶辫触'); + this.$message.error("鏁版嵁璐ㄦ鎻愪氦澶辫触"); this.taskStatus++; this.getStartTaskStatus(); return; @@ -1738,36 +1814,42 @@ var reset = data.result; this.progress = 0; this.setIntel = setInterval(() => { - this.getselectTaskStatus(reset) - }, 5000) + this.getselectTaskStatus(reset); + }, 5000); } - }, async getselectTaskStatus(res) { var std = 0; for (var i = 0; i < res.length; i++) { - const data = await dataUpload_selectTaskStatus({ id: res[i] }) + const data = await dataUpload_selectTaskStatus({ id: res[i] }); - std += data.progress + std += data.progress; if (data.status == 5) { - } else { - if (data.status == 1 && data.resultFile == null) {//璐ㄦ鎴愬姛 + if (data.status == 1 && data.resultFile == null) { + //璐ㄦ鎴愬姛 for (var i in this.tableData) { - if (this.tableData[i].path == this.multipleSelection[this.taskStatus].path) { + if ( + this.tableData[i].path == + this.multipleSelection[this.taskStatus].path + ) { this.tableData[i].status = "璐ㄦ鎴愬姛"; } } if (this.progress == 1) { - clearInterval(this.setIntel) + clearInterval(this.setIntel); this.setIntel = null; this.taskStatus++; - this.getStartTaskStatus() + this.getStartTaskStatus(); } - } else {//浠诲姟澶辫触 + } else { + //浠诲姟澶辫触 for (var i in this.tableData) { - if (this.tableData[i].path == this.multipleSelection[this.taskStatus].path) { + if ( + this.tableData[i].path == + this.multipleSelection[this.taskStatus].path + ) { this.tableData[i].status = "璐ㄦ澶辫触"; } } @@ -1778,16 +1860,18 @@ } } } - clearInterval(this.setIntel) + clearInterval(this.setIntel); this.setIntel = null; this.taskStatus++; - this.getStartTaskStatus() + this.getStartTaskStatus(); } } } this.progress = std / (res.length * 100); for (var i in this.tableData) { - if (this.tableData[i].path == this.multipleSelection[this.taskStatus].path) { + if ( + this.tableData[i].path == this.multipleSelection[this.taskStatus].path + ) { this.tableData[i].status = parseInt(this.progress * 100) + "%"; } } @@ -1795,12 +1879,13 @@ async sendTaskStatus(res) { var std = 0; for (var i = 0; i < res.length; i++) { - const data = await dataUpload_selectTaskStatus({ id: res[i] }) + const data = await dataUpload_selectTaskStatus({ id: res[i] }); std += data.progress; if (data.status == 5) { } else { - if (data.status == 1 && data.resultFile == null) {//璐ㄦ鎴愬姛 + if (data.status == 1 && data.resultFile == null) { + //璐ㄦ鎴愬姛 for (var i in this.tableData) { for (var j in this.multipleSelection) { if (this.tableData[i].path == this.multipleSelection[j].path) { @@ -1809,11 +1894,12 @@ } } if (this.progress == 1) { - clearInterval(this.setIntel) + clearInterval(this.setIntel); this.setIntel = null; this.loading = false; } - } else {//浠诲姟澶辫触 + } else { + //浠诲姟澶辫触 for (var i in this.tableData) { for (var j in this.multipleSelection) { if (this.tableData[i].path == this.multipleSelection[j].path) { @@ -1829,7 +1915,7 @@ } } - clearInterval(this.setIntel) + clearInterval(this.setIntel); this.setIntel = null; this.loading = false; // this.taskStatus++; @@ -1891,16 +1977,13 @@ // } // clearInterval(this.setIntel) // this.setIntel = null; - - - }, //鍒犻櫎涓婁紶鐨勬枃浠� async setFileDelete() { var data = JSON.stringify(this.multipleSelection); const res = await dataUploadDeleteFiles(data); if (res.code != 200) { - this.$message.error('鍒犻櫎澶辫触'); + this.$message.error("鍒犻櫎澶辫触"); return; } this.getFileLength(); @@ -1918,7 +2001,7 @@ async getFileLength() { const res = await dataUploadSelectFiles(this.formInline.path); if (res.code != 200) { - this.$message.error('鏂囦欢涓婁紶鏁版嵁鑾峰彇澶辫触'); + this.$message.error("鏂囦欢涓婁紶鏁版嵁鑾峰彇澶辫触"); return; } if (res.result == null) { @@ -1928,9 +2011,8 @@ res.result[i].status = "--"; res.result[i].code = null; } - this.tableData = res.result + this.tableData = res.result; } - }, //涓婁紶鏂囦欢 setFileUpload() { @@ -1938,117 +2020,131 @@ var formData = new FormData(); var fs1 = document.getElementById("selectDataFile"); if (fs1.files.length == 0) { - return this.$message.error('璇烽�夋嫨闇�瑕佷笂浼犵殑鏁版嵁鏂囦欢'); + return this.$message.error("璇烽�夋嫨闇�瑕佷笂浼犵殑鏁版嵁鏂囦欢"); } var fs2 = null; - if (this.formInline.uploadType == 'v1') {//鍗曟枃浠堕」鐩笂浼� + if (this.formInline.uploadType == "v1") { + //鍗曟枃浠堕」鐩笂浼� fs2 = document.getElementById("metaDataFile"); if (this.pathBak != null && this.pathBak.indexOf("checkMain") > -1) { if (fs2.files.length == 0) { - return this.$message.error('璇烽�夋嫨闇�瑕佷笂浼犵殑鍏冩暟鎹枃浠�'); + return this.$message.error("璇烽�夋嫨闇�瑕佷笂浼犵殑鍏冩暟鎹枃浠�"); } } - } else if (this.formInline.uploadType == 'v2') {//鏁翠綋椤圭洰涓婁紶 + } else if (this.formInline.uploadType == "v2") { + //鏁翠綋椤圭洰涓婁紶 fs2 = document.getElementById("wbsDataFile"); if (fs2.files.length == 0) { - return this.$message.error('璇烽�夋嫨闇�瑕佷笂浼犵殑WBS鏁版嵁鏂囦欢'); + return this.$message.error("璇烽�夋嫨闇�瑕佷笂浼犵殑WBS鏁版嵁鏂囦欢"); } } for (var i = 0, c = fs1.files.length; i < c; i++) { formData.append(fs1.files[i].name, fs1.files[i]); - this.fileType.push({ name: fs1.files[i].name, type: "selectData" }) + this.fileType.push({ name: fs1.files[i].name, type: "selectData" }); } if (fs2 != null) { for (var i = 0, c = fs2.files.length; i < c; i++) { formData.append(fs2.files[i].name, fs2.files[i]); - if (this.formInline.uploadType == 'v1') { - this.fileType.push({ name: fs2.files[i].name, type: "metaData" }) - } else if (this.formInline.uploadType == 'v2') { - this.fileType.push({ name: fs2.files[i].name, type: "wbsData" }) + if (this.formInline.uploadType == "v1") { + this.fileType.push({ name: fs2.files[i].name, type: "metaData" }); + } else if (this.formInline.uploadType == "v2") { + this.fileType.push({ name: fs2.files[i].name, type: "wbsData" }); } } } - const that = this - that.jindudialogVisible = true - let listval = [] + const that = this; + that.jindudialogVisible = true; + let listval = []; formData.forEach((key, val) => { listval.push({ - name: val - }) - }) - that.$set(this, 'jindutiaoname', listval) - that.$set(this, 'jindutiao', 0) - this.loading = true; - $.ajax(BASE_URL + "/dataUpload/uploadFiles?token=" + token + "&path=" + this.formInline.path, { - type: "post", - data: formData, - async: true, - cache: false, - processData: false, - contentType: false, - success: (rs) => { - this.loading = false; - if (rs.code != 200) { - return this.$message.error('鏁版嵁涓婁紶澶辫触'); - } - this.getFileLength(); - this.$set(this, 'jindutiao', 100) - this.$message({ - message: '涓婁紶鎴愬姛', - type: 'success' - }); - this.clearFileSelect(); - }, - error: (rs) => { - this.loading = false; - this.$message.error('鏁版嵁涓婁紶澶辫触'); - }, - xhr: function () { - var myXhr = $.ajaxSettings.xhr(); - - if (myXhr.upload) { //妫�鏌pload灞炴�ф槸鍚﹀瓨鍦� - myXhr.upload.addEventListener('progress', that.progressHandlingFunction, false); //缁戝畾progress浜嬩欢鐨勫洖璋冨嚱鏁� - } - return myXhr; //xhr瀵硅薄杩斿洖缁檍Query浣跨敤 - } + name: val, + }); }); + that.$set(this, "jindutiaoname", listval); + that.$set(this, "jindutiao", 0); + this.loading = true; + $.ajax( + BASE_URL + + "/dataUpload/uploadFiles?token=" + + token + + "&path=" + + this.formInline.path, + { + type: "post", + data: formData, + async: true, + cache: false, + processData: false, + contentType: false, + success: (rs) => { + this.loading = false; + if (rs.code != 200) { + return this.$message.error("鏁版嵁涓婁紶澶辫触"); + } + this.getFileLength(); + this.$set(this, "jindutiao", 100); + this.$message({ + message: "涓婁紶鎴愬姛", + type: "success", + }); + this.clearFileSelect(); + }, + error: (rs) => { + this.loading = false; + this.$message.error("鏁版嵁涓婁紶澶辫触"); + }, + xhr: function () { + var myXhr = $.ajaxSettings.xhr(); + + if (myXhr.upload) { + //妫�鏌pload灞炴�ф槸鍚﹀瓨鍦� + myXhr.upload.addEventListener( + "progress", + that.progressHandlingFunction, + false + ); //缁戝畾progress浜嬩欢鐨勫洖璋冨嚱鏁� + } + return myXhr; //xhr瀵硅薄杩斿洖缁檍Query浣跨敤 + }, + } + ); }, progressHandlingFunction(event) { - var loaded = event.loaded;//宸蹭笂浼� + var loaded = event.loaded; //宸蹭笂浼� var loaded = Math.floor(100 * (event.loaded / event.total) - 1); //璁$畻宸茬粡涓婁紶鐨勭櫨鍒嗘瘮 $("#prog").html(loaded + "%"); //搴旂敤鍒版樉绀篣I锛屽彲鏍规嵁鑷繁闇�瑕佷慨鏀� - this.jindutiao = loaded - this.$set(this, 'jindutiao', loaded) + this.jindutiao = loaded; + this.$set(this, "jindutiao", loaded); }, format(percentage) { - return percentage === 100 ? '涓婁紶瀹屾瘯' : `${percentage}%`; + return percentage === 100 ? "涓婁紶瀹屾瘯" : `${percentage}%`; }, //鑾峰彇鏂囦欢涓婁紶璺緞 async getFilePath() { const res = await dataUploadSelectPath(); if (res.code != 200) { - this.$message.error('鏂囦欢涓婁紶璺緞鑾峰彇澶辫触'); + this.$message.error("鏂囦欢涓婁紶璺緞鑾峰彇澶辫触"); return; } this.formInline.path = res.result; }, //椤圭洰鍚嶇О鍒囨崲 entryNameChange(res) { - var val = this.entryOption.filter(rs => { + var val = this.entryOption.filter((rs) => { if (rs.name == res) { return rs; } }); this.pathBak = val[0].bak; - this.formInline.dirid = val[0].id + this.formInline.dirid = val[0].id; this.getselectVerByDirid(); }, //鑾峰彇椤圭洰鍚嶇О async setProjectName() { - const data = await dataUpload_selectProject() + const data = await dataUpload_selectProject(); if (data.code != 200) { - this.$message.error('椤圭洰鍒楄〃鑾峰彇澶辫触'); - return + this.$message.error("椤圭洰鍒楄〃鑾峰彇澶辫触"); + return; } this.entryOption = data.result; this.formInline.entryId = this.entryOption[0].name; @@ -2058,10 +2154,10 @@ }, //鑾峰彇鎵�鏈夊潗鏍囩郴 async setCoordinateSystem() { - const data = await dataUpload_selectCoords() + const data = await dataUpload_selectCoords(); if (data.code != 200) { - this.$message.error('鍧愭爣绯诲垪琛ㄨ幏鍙栧け璐�'); - return + this.$message.error("鍧愭爣绯诲垪琛ㄨ幏鍙栧け璐�"); + return; } this.coordinateOption = data.result; this.formInline.coordinateId = this.coordinateOption[0].epsgcode; @@ -2072,7 +2168,7 @@ }, //閲嶇疆WPS閫夋嫨 restWBSFile() { - this.formInline.wbsData = '璇烽�夋嫨WBS鏁版嵁'; + this.formInline.wbsData = "璇烽�夋嫨WBS鏁版嵁"; document.getElementById("wbsDataFile").value = ""; }, //WBS鏁版嵁Change浜嬩欢 @@ -2081,28 +2177,28 @@ var len = event.currentTarget.files.length; for (var i = 0; i < len; i++) { var f = event.currentTarget.files[i]; - std.push(f.name) + std.push(f.name); } this.formInline.wbsData = std.toString(); }, //鏁版嵁璐ㄦ寮圭獥鍏抽棴--椤圭洰鏁翠綋 handleTestQuayCloseDown() { - this.$confirm('纭鍏抽棴锛�') - .then(_ => { - this.closeTestQuayCloseDialog() + this.$confirm("纭鍏抽棴锛�") + .then((_) => { + this.closeTestQuayCloseDialog(); }) - .catch(_ => { }); + .catch((_) => {}); }, closeTestQuayCloseDialog() { this.testQuayVisible = false; }, //鏁版嵁璐ㄦ寮圭獥鍏抽棴--鍗曟枃浠� handleQuayTestCloseDown() { - this.$confirm('纭鍏抽棴锛�') - .then(_ => { - this.closeQuayTestCloseDialog() + this.$confirm("纭鍏抽棴锛�") + .then((_) => { + this.closeQuayTestCloseDialog(); }) - .catch(_ => { }); + .catch((_) => {}); }, closeQuayTestCloseDialog() { this.quayTestVisible = false; @@ -2110,52 +2206,51 @@ //鏁版嵁璐ㄦ鐐瑰嚮浜嬩欢 handleQuayTestClick() { if (this.pathBak == null) { - return this.$message('鏃犺川妫�鏂规'); + return this.$message("鏃犺川妫�鏂规"); } if (this.multipleSelection.length == 0) { - return this.$message('璇烽�夋嫨闇�瑕佽川妫�鐨勬枃浠�'); + return this.$message("璇烽�夋嫨闇�瑕佽川妫�鐨勬枃浠�"); } if (this.formInline.uploadType == "v1") { - var value = this.$refs['selectcascader'].getCheckedNodes(); + var value = this.$refs["selectcascader"].getCheckedNodes(); var fileType = value[0].data.fullName; this.quayTestForms.names = fileType; this.quayTestForms.sjzy = this.formInline.specialtyId; this.quayTestVisible = true; - } else if (this.formInline.uploadType == "v2") { var fileZip = []; var fileExcel = []; for (var i in this.multipleSelection) { - if (this.multipleSelection[i].name.indexOf('.zip') != -1) { + if (this.multipleSelection[i].name.indexOf(".zip") != -1) { fileZip.push(this.multipleSelection[i].name); - } else if (this.multipleSelection[i].name.indexOf('.xls') != -1) { + } else if (this.multipleSelection[i].name.indexOf(".xls") != -1) { fileExcel.push(this.multipleSelection[i].name); - } else if (this.multipleSelection[i].name.indexOf('.xlsx') != -1) { + } else if (this.multipleSelection[i].name.indexOf(".xlsx") != -1) { fileExcel.push(this.multipleSelection[i].name); } } if (fileZip.length != 1) { - return this.$message('璇烽�夋嫨涓�涓暣浣撻」鐩枃浠�'); + return this.$message("璇烽�夋嫨涓�涓暣浣撻」鐩枃浠�"); } if (fileExcel.length != 1) { - return this.$message('璇烽�夋嫨涓�涓猈BS鏂囦欢'); + return this.$message("璇烽�夋嫨涓�涓猈BS鏂囦欢"); } this.formCheckAll.names = this.pathBak; - var val = this.entryOption.filter(res => { + var val = this.entryOption.filter((res) => { if (res.id == this.formInline.dirid) { return res; } - }) + }); - this.formCheckAll.xmmc = val[0].name - this.formCheckAll.sjzy = this.formInline.specialtyId + this.formCheckAll.xmmc = val[0].name; + this.formCheckAll.sjzy = this.formInline.specialtyId; if (this.formCheckAll.sjzy.indexOf("鍦扮伨") != -1) { this.formCheckAll.isDiZai = true; - this.formCheckAll.diZaiType = this.disOptions[0].value + this.formCheckAll.diZaiType = this.disOptions[0].value; } else { this.formCheckAll.isDiZai = false; - this.formCheckAll.diZaiType = "NO" + this.formCheckAll.diZaiType = "NO"; } this.testQuayVisible = true; } @@ -2168,14 +2263,14 @@ std.push(this.multipleDelete[i].id); } - const res = await dataUpload_deleteMetas({ ids: std.toString() }) + const res = await dataUpload_deleteMetas({ ids: std.toString() }); this.loading = false; if (res.code != 200) { - this.$message.error('鍒犻櫎澶辫触'); + this.$message.error("鍒犻櫎澶辫触"); } else { this.$message({ - message: '鍒犻櫎鎴愬姛', - type: 'success' + message: "鍒犻櫎鎴愬姛", + type: "success", }); this.setStartWareTable(); } @@ -2186,17 +2281,17 @@ pageIndex: 1, pageSize: 10, name: this.formWarehousing.name, - } + }; this.getAllWareTable(); }, //涓婁紶鏁版嵁鍒楄〃閲嶇疆 setWarehouseReset() { - this.formWarehousing.name = ''; + this.formWarehousing.name = ""; this.listData = { pageIndex: 1, pageSize: 10, name: null, - } + }; this.getAllWareTable(); }, //鏍煎紡鍖栨椂闂� @@ -2210,28 +2305,28 @@ var s = time.getSeconds(); return ( y + - '-' + + "-" + this.add0(m) + - '-' + + "-" + this.add0(d) + - ' ' + + " " + h + - ':' + + ":" + mm + - ':' + + ":" + s ); }, //鏍煎紡鍖栨椂闂� add0(m) { - return m < 10 ? '0' + m : m; + return m < 10 ? "0" + m : m; }, //澶у皬鍊兼敼鍙� changeSizeFile(row, column, cellValue, index) { if (cellValue >= 1024) { - return parseFloat(cellValue / 1204).toFixed(3) + "GB" + return parseFloat(cellValue / 1204).toFixed(3) + "GB"; } else { - return cellValue + "MB" + return cellValue + "MB"; } }, //涓婁紶鏁版嵁鍒楄〃娓呭崟閫夋嫨 @@ -2244,14 +2339,14 @@ pageIndex: 1, pageSize: 10, name: null, - } + }; this.getAllWareTable(); }, //鑾峰彇鏁版嵁涓婁紶鍒楄〃娓呭崟 async getAllWareTable() { const res = await dataUpload_selectByPageForUpload(this.listData); if (res.code != 200) { - this.$message.error('鍒楄〃鏁版嵁鑾峰彇澶辫触'); + this.$message.error("鍒楄〃鏁版嵁鑾峰彇澶辫触"); return; } this.count = res.count; @@ -2263,7 +2358,6 @@ this.listData.pageSize = val; this.getAllWareTable(); }, - //鏁版嵁涓婁紶鍒楄〃娓呭崟page鍒囨崲 handleCurrentChange(val) { @@ -2281,7 +2375,7 @@ var len = event.currentTarget.files.length; for (var i = 0; i < len; i++) { var f = event.currentTarget.files[i]; - std.push(f.name) + std.push(f.name); } this.formInline.specialtyData = std.toString(); }, @@ -2291,7 +2385,7 @@ }, //閲嶇疆鍏冩暟鎹� restMetaFile() { - this.formInline.metaData = '璇烽�夋嫨鍏冩暟鎹�'; + this.formInline.metaData = "璇烽�夋嫨鍏冩暟鎹�"; document.getElementById("metaDataFile").value = ""; }, //閫夋嫨鍏冩暟鎹枃浠跺垏鎹� @@ -2300,19 +2394,19 @@ var len = event.currentTarget.files.length; for (var i = 0; i < len; i++) { var f = event.currentTarget.files[i]; - std.push(f.name) + std.push(f.name); } this.formInline.metaData = std.toString(); }, //From琛ㄥ崟鍒濆鍖� setFromStart() { - this.formInline.verid = null - this.formInline.specialtyId = '娴嬮噺涓撲笟' - this.formInline.specialtyData = '璇烽�夋嫨鏁版嵁' - this.formInline.metaData = '璇烽�夋嫨鍏冩暟鎹�' - this.formInline.entryId = null - this.formInline.selectFileType = '*.*' + this.formInline.verid = null; + this.formInline.specialtyId = "娴嬮噺涓撲笟"; + this.formInline.specialtyData = "璇烽�夋嫨鏁版嵁"; + this.formInline.metaData = "璇烽�夋嫨鍏冩暟鎹�"; + this.formInline.entryId = null; + this.formInline.selectFileType = "*.*"; this.formInline.coordinateId = this.coordinateOption[0].epsgcode; }, //閫夋嫨鏁版嵁 @@ -2321,24 +2415,23 @@ }, //閲嶇疆鏁版嵁 restSelectFile() { - this.formInline.specialtyData = '璇烽�夋嫨鏁版嵁'; + this.formInline.specialtyData = "璇烽�夋嫨鏁版嵁"; document.getElementById("selectDataFile").value = ""; - }, //鍏ュ簱绫诲瀷鍒囨崲 uploadTypeChange(res) { this.setFromStart(); if (res == "v2") { - this.uploadFlag = false - this.formInline.selectFileType = '.zip' - this.formInline.entryId = this.entryOption[0].name + this.uploadFlag = false; + this.formInline.selectFileType = ".zip"; + this.formInline.entryId = this.entryOption[0].name; this.formInline.dirid = this.entryOption[0].id; this.getselectVerByDirid(); this.pathBak = this.entryOption[0].bak; } else { this.getStartDirChecked(this.catalogOption); this.getselectVerByDirid(); - this.uploadFlag = true + this.uploadFlag = true; } this.formInline.uploadType = res; }, @@ -2346,9 +2439,11 @@ async getselectVerByDirid() { this.verOption = []; this.formInline.verid = ""; - const res = await dataUploadSelectVerByDirid({ dirid: this.formInline.dirid }); + const res = await dataUploadSelectVerByDirid({ + dirid: this.formInline.dirid, + }); if (res.code != 200) { - this.$message.error('鐗堟湰鍒楄〃鑾峰彇澶辫触'); + this.$message.error("鐗堟湰鍒楄〃鑾峰彇澶辫触"); return; } this.verOption = res.result; @@ -2358,40 +2453,40 @@ async getSelectdirTab() { const res = await selectdirTab(); if (res.code != 200) { - this.$message.error('鐩綍鍒楄〃鑾峰彇澶辫触'); + this.$message.error("鐩綍鍒楄〃鑾峰彇澶辫触"); return; } this.catalogOption = this.treeData(res.result); - this.formInline.dirName = this.catalogOption[0].name + this.formInline.dirName = this.catalogOption[0].name; this.getStartDirChecked(this.catalogOption); - this.getselectVerByDirid() + this.getselectVerByDirid(); }, getStartDirChecked(res) { if (res.length != 0) { if (res[0].children == null || res[0].children == undefined) { - this.formInline.dirid = res[0].id + this.formInline.dirid = res[0].id; } else { - this.getStartDirChecked(res[0].children) + this.getStartDirChecked(res[0].children); } } }, //鍗曟枃浠惰川妫�寮圭獥鍒濆鍖� startQuayTestForms() { - this.quayTestForms = { - tolerance: '0.001', - gcdOffset: '20', - rangeOffset: '200', - kzdOffset: '100', - xgMax: '0.005', - coordinateSystem: 'CGCS2000/degree', - imgResolution: '0.2', - demTolerance: '5', - demChangeRate: '200', - lazDensity: '1', - imgResolution: '0.2', - }, - this.quayTestShow = { + (this.quayTestForms = { + tolerance: "0.001", + gcdOffset: "20", + rangeOffset: "200", + kzdOffset: "100", + xgMax: "0.005", + coordinateSystem: "CGCS2000/degree", + imgResolution: "0.2", + demTolerance: "5", + demChangeRate: "200", + lazDensity: "1", + imgResolution: "0.2", + }), + (this.quayTestShow = { checkOsgb: false, checkXls: false, checkLaz: false, @@ -2404,7 +2499,7 @@ checkMath: false, checkMeta: false, checkMain: false, - } + }); }, //鐩綍鍒囨崲 catalogChange(data, node, nodeData) { @@ -2423,11 +2518,11 @@ } var fileType = node.data.code; if (fileType == null) { - fileType = "*.*" + fileType = "*.*"; } this.formInline.selectFileType = fileType; this.formInline.dirid = node.data.id; - this.formInline.dirName = node.data.name + this.formInline.dirName = node.data.name; this.getselectVerByDirid(); }, //Tabsq鍒囨崲 @@ -2435,6 +2530,7 @@ if (tab.name == "second") { this.setStartWareTable(); } + this.calHeight(); }, //鏍戝垪琛ㄧ敓鎴� treeData(source) { @@ -2442,11 +2538,11 @@ 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灞炴�э紝骞惰祴鍊� return father.pid == 0; // 杩斿洖涓�绾ц彍鍗� }); }, - } + }, }; </script> <style lang="less" scoped> @@ -2472,4 +2568,27 @@ } } } +.inquire { + padding: 8px; + margin-top: 20px; + + border-radius: 5px; + + margin-bottom: 20px; + .el-form-item { + margin: 5px; + } +} +.el-tabs { + height: calc(100% - 70px); +} +/deep/ .el-tabs__content { + height: calc(100% - 49px); +} +/deep/ .el-tab-pane { + height: 100%; +} +.text-center { + text-align: center; +} </style> \ No newline at end of file diff --git a/src/views/datamanage/dictionaryManage.vue b/src/views/datamanage/dictionaryManage.vue index 1a969c0..5762d6b 100644 --- a/src/views/datamanage/dictionaryManage.vue +++ b/src/views/datamanage/dictionaryManage.vue @@ -1,272 +1,262 @@ <template> <div class="dictionaryBox"> - <My-bread :list="[ + <My-bread + :list="[ `${$t('dataManage.dataManage')}`, `${$t('dataManage.dictionaryManage')}`, - ]"></My-bread> + ]" + ></My-bread> <el-divider /> <div class="mainBox"> - <div class="dictionaryContent"> + <div class="dictionary_leftTree subpage_Div"> - <ul> - <li - @click="getTableDesc(item)" - v-for="item in optionCount" - :class="{ active: activeName == item.tab }" - > - {{ item.tabDesc }} - </li> - </ul> - </div> - </div> + <ul> + <li + @click="getTableDesc(item)" + v-for="(item, i) in optionCount" + :class="{ active: activeName == item.tab }" + :key="i" + > + {{ item.tabDesc }} + </li> + </ul> + </div> + <div class="right subpage_Div"> <div class="inquire"> - <el-form - :inline="true" - :model="formInline" - class="demo-form-inline" - > - <el-form-item :label="$t('dataManage.dictionaryManageObj.tableName')"> - <el-input - v-model="formInline.tab" - :placeholder="$t('common.pleaseInput')" - style="width:200px" - ></el-input> - </el-form-item> - <el-form-item style="float:right"> - <el-button - v-if="btnStatus.insert" - icon="el-icon-edit" - size="small" - @click="InsertFormdialog = true" - type="success" - >{{ $t('common.append') }}</el-button> - <el-button - v-if="btnStatus.delete" - icon="el-icon-delete" - size="small" - @click="DelFormData" - type="danger" - >{{ - $t('common.delete') - }}</el-button> - <el-button - icon="el-icon-search" - size="small" - @click="getSelectDictTab" - class="primary" - >{{ $t('common.iquery') }}</el-button> - <el-button - icon="el-icon-refresh" - size="small" - @click="getRemoveForm" - type="info" - >{{ $t('common.reset') }}</el-button> - </el-form-item> - </el-form> + <el-form :inline="true" :model="formInline" class="demo-form-inline"> + <el-form-item + :label="$t('dataManage.dictionaryManageObj.tableName')" + > + <el-input + v-model="formInline.tab" + :placeholder="$t('common.pleaseInput')" + style="width: 200px" + ></el-input> + </el-form-item> + <el-form-item style="float: right"> + <el-button + v-if="btnStatus.insert" + icon="el-icon-edit" + size="small" + @click="InsertFormdialog = true" + type="success" + >{{ $t("common.append") }}</el-button + > + <el-button + v-if="btnStatus.delete" + icon="el-icon-delete" + size="small" + @click="DelFormData" + type="danger" + >{{ $t("common.delete") }}</el-button + > + <el-button + icon="el-icon-search" + size="small" + @click="getSelectDictTab" + class="primary" + >{{ $t("common.iquery") }}</el-button + > + <el-button + icon="el-icon-refresh" + size="small" + @click="getRemoveForm" + type="info" + >{{ $t("common.reset") }}</el-button + > + </el-form-item> + </el-form> </div> - <div class="table_box"> + <div class="table_box" style="height:calc(100% - 89px)"> <el-table - :data="tableData" - style="width: 100%" - @selection-change="handleSelectionChange" - height="100%" - > - <el-table-column - type="selection" - width="55" - /> - <el-table-column - prop="orderNum" - :label="$t('dataManage.dictionaryManageObj.number')" - /> - <el-table-column - min-width="100" - prop="field" - :label="$t('dataManage.dictionaryManageObj.fieldName')" - /> - <el-table-column - min-width="90" - prop="alias" - :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" - /> - <el-table-column - min-width="100" - prop="type" - :label="$t('dataManage.dictionaryManageObj.fieldType')" - /> - <el-table-column - min-width="60" - prop="len" - :label="$t('dataManage.dictionaryManageObj.fieldLength')" - /> - <el-table-column - min-width="60" - prop="precision" - :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" - /> - <el-table-column - min-width="100" - prop="tab" - :label="$t('dataManage.dictionaryManageObj.rangeAssociationTable')" - /> - <el-table-column - min-width="100" - prop="bak" - :label="$t('dataManage.dictionaryManageObj.remark')" - /> - <el-table-column - min-width="100" - prop="createTime" - :label="$t('dataManage.dictionaryManageObj.creationTime')" - :formatter="formatData" - /> - <el-table-column - min-width="100" - prop="createUser" - :label="$t('dataManage.dictionaryManageObj.createPersonnel')" - /> - <el-table-column - min-width="100" - prop="updateTime" - :label="$t('dataManage.dictionaryManageObj.updateTime')" - :formatter="formatData" - /> - <el-table-column - min-width="100" - prop="updateUser" - :label="$t('dataManage.dictionaryManageObj.updatePersonnel')" - /> + :data="tableData" + style="width: 100%" + @selection-change="handleSelectionChange" + height="calc(100% - 57px)" + > + <el-table-column type="selection" width="55" /> + <el-table-column + prop="orderNum" + :label="$t('dataManage.dictionaryManageObj.number')" + /> + <el-table-column + min-width="100" + prop="field" + :label="$t('dataManage.dictionaryManageObj.fieldName')" + /> + <el-table-column + min-width="90" + prop="alias" + :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" + /> + <el-table-column + min-width="100" + prop="type" + :label="$t('dataManage.dictionaryManageObj.fieldType')" + /> + <el-table-column + min-width="60" + prop="len" + :label="$t('dataManage.dictionaryManageObj.fieldLength')" + /> + <el-table-column + min-width="60" + prop="precision" + :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" + /> + <el-table-column + min-width="100" + prop="tab" + :label=" + $t('dataManage.dictionaryManageObj.rangeAssociationTable') + " + /> + <el-table-column + min-width="100" + prop="bak" + :label="$t('dataManage.dictionaryManageObj.remark')" + /> + <el-table-column + min-width="100" + prop="createTime" + :label="$t('dataManage.dictionaryManageObj.creationTime')" + :formatter="formatData" + /> + <el-table-column + min-width="100" + prop="createUser" + :label="$t('dataManage.dictionaryManageObj.createPersonnel')" + /> + <el-table-column + min-width="100" + prop="updateTime" + :label="$t('dataManage.dictionaryManageObj.updateTime')" + :formatter="formatData" + /> + <el-table-column + min-width="100" + prop="updateUser" + :label="$t('dataManage.dictionaryManageObj.updatePersonnel')" + /> - <el-table-column - min-width="100" - :label="$t('dataManage.dictionaryManageObj.operation')" - > - <template slot-scope="scope"> - <el-link - v-if="btnStatus.select" - @click="showDetail(scope.$index, scope.row)" - >{{ $t('dataManage.dictionaryManageObj.lookOver') }}</el-link> - <el-link - v-if="btnStatus.update" - @click="handleEdit(scope.$index, scope.row)" - style="margin-left: 10px; " - >{{ $t('dataManage.dictionaryManageObj.revamp') }}</el-link> - </template> - </el-table-column> - </el-table> - <div - class="pagination_box" - style="margin-top: 20px" - > - <el-pagination - @size-change="handleSizeChange" - @current-change="handleCurrentChange" - :current-page="listData.pageIndex" - :page-sizes="[10, 20, 50, 100]" - :page-size="listData.pageSize" - layout="total, sizes, prev, pager, next, jumper" - :total="count" - > - </el-pagination> - </div> + <el-table-column + min-width="100" + :label="$t('dataManage.dictionaryManageObj.operation')" + > + <template slot-scope="scope"> + <el-link + v-if="btnStatus.select" + @click="showDetail(scope.$index, scope.row)" + >{{ $t("dataManage.dictionaryManageObj.lookOver") }}</el-link + > + <el-link + v-if="btnStatus.update" + @click="handleEdit(scope.$index, scope.row)" + style="margin-left: 10px" + >{{ $t("dataManage.dictionaryManageObj.revamp") }}</el-link + > + </template> + </el-table-column> + </el-table> + <div class="pagination_box"> + <el-pagination + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + :current-page="listData.pageIndex" + :page-sizes="[10, 20, 50, 100]" + :page-size="listData.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="count" + > + </el-pagination> + </div> </div> </div> </div> - <div - class="infoBox box_div " - v-show="showinfoBox" - > - - <div - slot="header" - class="clearfix" - > - <span>{{ $t('dataManage.dictionaryManageObj.particulars') }}</span> - <div - style="float: right; cursor: pointer" - @click="closeDetial" - > + <div class="infoBox box_div" v-show="showinfoBox"> + <div slot="header" class="clearfix"> + <span>{{ $t("dataManage.dictionaryManageObj.particulars") }}</span> + <div style="float: right; cursor: pointer" @click="closeDetial"> <i class="el-icon-close"></i> </div> </div> <el-divider></el-divider> <div class="contentBox"> <p> - {{ $t('dataManage.dictionaryManageObj.tableName') }}锛歿{ - itemdetail.tab - }} + {{ $t("dataManage.dictionaryManageObj.tableName") }}锛歿{ + itemdetail.tab + }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.dictionaryManageObj.tableAliasName') }}锛歿{ - itemdetail.tabDesc - }} + {{ $t("dataManage.dictionaryManageObj.tableAliasName") }}锛歿{ + itemdetail.tabDesc + }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.dictionaryManageObj.fieldName') }}锛歿{ - itemdetail.field - }} + {{ $t("dataManage.dictionaryManageObj.fieldName") }}锛歿{ + itemdetail.field + }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.dictionaryManageObj.fieldAliasName') }}锛歿{ - itemdetail.alias - }} + {{ $t("dataManage.dictionaryManageObj.fieldAliasName") }}锛歿{ + itemdetail.alias + }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.dictionaryManageObj.fieldType') }}锛歿{ - itemdetail.type - }} + {{ $t("dataManage.dictionaryManageObj.fieldType") }}锛歿{ + itemdetail.type + }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.dictionaryManageObj.fieldLength') }}锛歿{ - itemdetail.len - }} + {{ $t("dataManage.dictionaryManageObj.fieldLength") }}锛歿{ + itemdetail.len + }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.dictionaryManageObj.FieldPrecision') }}锛歿{ - itemdetail.precision - }} + {{ $t("dataManage.dictionaryManageObj.FieldPrecision") }}锛歿{ + itemdetail.precision + }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.dictionaryManageObj.remark') }}锛歿{ - itemdetail.bak - }} + {{ $t("dataManage.dictionaryManageObj.remark") }}锛歿{ + itemdetail.bak + }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.dictionaryManageObj.creationTime') }}锛歿{ - itemdetail.createTime - }} + {{ $t("dataManage.dictionaryManageObj.creationTime") }}锛歿{ + itemdetail.createTime + }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.dictionaryManageObj.createPersonnel') }}锛歿{ - itemdetail.createUser - }} + {{ $t("dataManage.dictionaryManageObj.createPersonnel") }}锛歿{ + itemdetail.createUser + }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.dictionaryManageObj.updateTime') }}锛歿{ - itemdetail.updateTime - }} + {{ $t("dataManage.dictionaryManageObj.updateTime") }}锛歿{ + itemdetail.updateTime + }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.dictionaryManageObj.updatePersonnel') }}锛歿{ - itemdetail.updateUser - }} + {{ $t("dataManage.dictionaryManageObj.updatePersonnel") }}锛歿{ + itemdetail.updateUser + }} </p> </div> - </div> <el-dialog top="3vh" @@ -279,103 +269,68 @@ :label="$t('dataManage.dictionaryManageObj.number')" :label-width="formLabelWidth" > - <el-input - v-model="upform.orderNum" - autocomplete="off" - ></el-input> + <el-input v-model="upform.orderNum" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.tableName')" :label-width="formLabelWidth" > - <el-input - v-model="upform.tab" - autocomplete="off" - ></el-input> + <el-input v-model="upform.tab" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.tableAliasName')" :label-width="formLabelWidth" > - <el-input - v-model="upform.tabDesc" - autocomplete="off" - ></el-input> + <el-input v-model="upform.tabDesc" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldName')" :label-width="formLabelWidth" > - <el-input - v-model="upform.field" - autocomplete="off" - ></el-input> + <el-input v-model="upform.field" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" :label-width="formLabelWidth" > - <el-input - v-model="upform.alias" - autocomplete="off" - ></el-input> + <el-input v-model="upform.alias" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldType')" :label-width="formLabelWidth" > - <el-input - v-model="upform.type" - autocomplete="off" - ></el-input> + <el-input v-model="upform.type" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldLength')" :label-width="formLabelWidth" > - <el-input - v-model="upform.len" - autocomplete="off" - ></el-input> + <el-input v-model="upform.len" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" :label-width="formLabelWidth" > - <el-input - v-model="upform.precision" - autocomplete="off" - ></el-input> + <el-input v-model="upform.precision" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.remark')" :label-width="formLabelWidth" > - <el-input - v-model="upform.bak" - autocomplete="off" - ></el-input> + <el-input v-model="upform.bak" autocomplete="off"></el-input> </el-form-item> </el-form> - <div - slot="footer" - class="dialog-footer" - > + <div slot="footer" class="dialog-footer"> <el-button type="info" size="small" @click="dialogFormVisible = false" - >{{ - $t('dataManage.dictionaryManageObj.cancel') - }}</el-button> - <el-button - class="primary" - size="small" - @click="updateForm" - >{{ - $t('dataManage.dictionaryManageObj.confirm') + >{{ $t("dataManage.dictionaryManageObj.cancel") }}</el-button + > + <el-button class="primary" size="small" @click="updateForm">{{ + $t("dataManage.dictionaryManageObj.confirm") }}</el-button> </div> </el-dialog> @@ -390,65 +345,44 @@ :label="$t('dataManage.dictionaryManageObj.number')" :label-width="formLabelWidth" > - <el-input - v-model="insertform.orderNum" - autocomplete="off" - ></el-input> + <el-input v-model="insertform.orderNum" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.tableName')" :label-width="formLabelWidth" > - <el-input - v-model="insertform.tab" - autocomplete="off" - ></el-input> + <el-input v-model="insertform.tab" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.tableAliasName')" :label-width="formLabelWidth" > - <el-input - v-model="insertform.tabDesc" - autocomplete="off" - ></el-input> + <el-input v-model="insertform.tabDesc" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldName')" :label-width="formLabelWidth" > - <el-input - v-model="insertform.field" - autocomplete="off" - ></el-input> + <el-input v-model="insertform.field" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" :label-width="formLabelWidth" > - <el-input - v-model="insertform.alias" - autocomplete="off" - ></el-input> + <el-input v-model="insertform.alias" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldType')" :label-width="formLabelWidth" > - <el-input - v-model="insertform.type" - autocomplete="off" - ></el-input> + <el-input v-model="insertform.type" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldLength')" :label-width="formLabelWidth" > - <el-input - v-model="insertform.len" - autocomplete="off" - ></el-input> + <el-input v-model="insertform.len" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" @@ -464,29 +398,15 @@ :label="$t('dataManage.dictionaryManageObj.remark')" :label-width="formLabelWidth" > - <el-input - v-model="insertform.bak" - autocomplete="off" - ></el-input> + <el-input v-model="insertform.bak" autocomplete="off"></el-input> </el-form-item> </el-form> - <div - slot="footer" - class="dialog-footer" - > - <el-button - type="info" - size="small" - @click="InsertFormdialog = false" - >{{ - $t('dataManage.dictionaryManageObj.cancel') + <div slot="footer" class="dialog-footer"> + <el-button type="info" size="small" @click="InsertFormdialog = false">{{ + $t("dataManage.dictionaryManageObj.cancel") }}</el-button> - <el-button - type="primary" - size="small" - @click="insertFromData" - >{{ - $t('dataManage.dictionaryManageObj.confirm') + <el-button type="primary" size="small" @click="insertFromData">{{ + $t("dataManage.dictionaryManageObj.confirm") }}</el-button> </div> </el-dialog> @@ -500,18 +420,18 @@ deleteDicts, updateDict, insertDict, -} from '../../api/api'; -import MyBread from '../../components/MyBread.vue'; +} from "../../api/api"; +import MyBread from "../../components/MyBread.vue"; export default { - name: 'dictionaryManage', + name: "dictionaryManage", components: { MyBread }, data() { return { - activeName: '', + activeName: "", formInline: [], listData: { - ns: '', - tab: '', + ns: "", + tab: "", pageIndex: 1, pageSize: 10, }, @@ -526,7 +446,7 @@ insertform: {}, multipleSelection: [], - formLabelWidth: '130px', + formLabelWidth: "130px", btnStatus: { select: false, delete: false, @@ -572,13 +492,13 @@ this.startQueryNameData(); }, async startQueryNameData() { - if (this.listData.tab == '') { + if (this.listData.tab == "") { delete this.listData.tab; } const data = await selectByPageAndCount(this.listData); if (data.code != 200) { - this.$message.error('鍒楄〃璋冪敤澶辫触'); + this.$message.error("鍒楄〃璋冪敤澶辫触"); } this.tableData = data.result; @@ -601,7 +521,7 @@ async updateForm() { const data = await updateDict(this.upform); if (data.code != 200) { - this.$message.error('淇敼澶辫触'); + this.$message.error("淇敼澶辫触"); return; } this.dialogFormVisible = false; @@ -619,27 +539,29 @@ for (var i in this.multipleSelection) { std.push(this.multipleSelection[i].id); } - this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ュ瓧娈�, 鏄惁缁х画?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning' - }).then(async () => { + this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ュ瓧娈�, 鏄惁缁х画?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(async () => { const data = await deleteDicts({ ids: std.toString() }); if (data.code != 200) { - this.$message.error('鍒犻櫎澶辫触'); + this.$message.error("鍒犻櫎澶辫触"); } this.listData.pageIndex = 1; this.listData.pageSize = 10; this.startQueryNameData(); this.$message({ - type: 'success', - message: '鍒犻櫎鎴愬姛!' + type: "success", + message: "鍒犻櫎鎴愬姛!", }); - }).catch(() => { + }) + .catch(() => { this.$message({ - type: 'info', - message: '宸插彇娑堝垹闄�' - }); + type: "info", + message: "宸插彇娑堝垹闄�", + }); }); }, @@ -668,11 +590,11 @@ var h = time.getHours(); var mm = time.getMinutes(); var s = time.getSeconds(); - return y + '-' + this.add0(m) + '-' + this.add0(d); + return y + "-" + this.add0(m) + "-" + this.add0(d); }, //鏍煎紡鍖栨椂闂� add0(m) { - return m < 10 ? '0' + m : m; + return m < 10 ? "0" + m : m; }, getRemoveForm() { this.formInline.tab = null; @@ -682,7 +604,7 @@ async getSelectDictTab() { const data = await selectDictTab({ name: this.formInline.tab }); if (data.code != 200) { - this.$message.error('涓嬫媺璋冪敤澶辫触'); + this.$message.error("涓嬫媺璋冪敤澶辫触"); } this.optionCount = data.result; @@ -703,19 +625,12 @@ height: 98%; width: 98%; padding: 1%; - .dictionaryContent { - width: 16.5%; - height: 92%; - // display: flex; - // justify-content: space-between; .dictionary_leftTree { - width: 100%; - height: 80%; - min-height: 700px; - + width: calc(23% - 0px); + height: 100%; + padding: 10px; border-radius: 5px; - padding: 1%; - max-height: 670px; + box-sizing: border-box; overflow-y: auto; li { border-bottom: 1px solid #dcdfe6; @@ -737,7 +652,7 @@ padding: 1%; overflow-y: auto; } - } + .infinite-list-item { background: rgba(255, 255, 255, 0.3); @@ -751,56 +666,37 @@ } } .mainBox { - width: 100%; - height: 92%; - display: flex; - justify-content: space-between; - .leftTree { - width: 15%; - height: 91%; - - border-radius: 5px; - padding: 1%; - max-height: 670px; - overflow-y: auto; - } - .right { - width: 80%; - height: 91%; - - border-radius: 5px; - padding: 1%; - max-height: 670px; - // overflow-y: auto; - .inquire { - // margin-bottom: 10px; - padding: 1%; - - border-radius: 5px; - border: 1px solid #dcdfe6; - .el-form-item { - margin: 5px; - } - } - .table_box { - width: 100%; - height: 80%; - margin: 0 auto; - // overflow: auto; - margin-top: 10px; - - .el-table /deep/ th.el-table__cell > .cell { - padding: 15px !important; - } - - .el-table--border::after, - .el-table--group::after { - width: 0; - } - .el-table::before { - height: 0; - } - } - } + width: 100%; + height: calc(100% - 75px); + display: flex; + justify-content: space-between; + .leftTree { + width: calc(23% - 0px); + height: 100%; + padding: 10px; + border-radius: 5px; + box-sizing: border-box; + overflow-y: auto; } + .right { + width: 75%; + height: 100%; + border-radius: 5px; + padding: 10px; + box-sizing: border-box; + border: 1px solid #dcdfe6; + .inquire { + // margin-bottom: 10px; + padding: 8px; + // margin-top: 10px; + border-radius: 5px; + border: 1px solid #dcdfe6; + margin-bottom: 20px; + .el-form-item { + margin: 5px; + } + } + + } +} </style> diff --git a/src/views/datamanage/domainManage.vue b/src/views/datamanage/domainManage.vue index 40e96f5..6421b94 100644 --- a/src/views/datamanage/domainManage.vue +++ b/src/views/datamanage/domainManage.vue @@ -1,17 +1,16 @@ <template> <div class="domainBox"> - <My-bread :list="[ + <My-bread + :list="[ `${$t('dataManage.dataManage')}`, `${$t('dataManage.rangeManage')}`, - ]"></My-bread> + ]" + ></My-bread> <el-divider /> <div class="mainBox"> <div class="leftTree subpage_Div"> - <el-input - v-model="filterInput" - style="width:200px" - ></el-input> - <div style="width:450px"> + <el-input v-model="filterInput" style="width: 200px"></el-input> + <div style="width: 450px"> <el-tree :data="domainData" :props="defaultProps" @@ -24,61 +23,55 @@ </div> <div class="right subpage_Div"> <div class="inquire"> - <el-form - ref="queryForm" - :model="queryForm" - :inline="true" - > - <el-form-item - :label="$t('dataManage.vmobj.keyword')" - prop="name" - > + <el-form ref="queryForm" :model="queryForm" :inline="true"> + <el-form-item :label="$t('dataManage.vmobj.keyword')" prop="name"> <el-input v-model="queryForm.code" :placeholder="$t('common.pleaseInput')" - style="width:200px" + style="width: 200px" /> </el-form-item> - <el-form-item style="float: right;"> + <el-form-item style="float: right"> <el-button v-if="btnStatus.insert" @click="showAddDialog" icon="el-icon-plus" size="small" type="success" - >{{ $t('common.append') }}</el-button> + >{{ $t("common.append") }}</el-button + > <el-button v-if="btnStatus.delete" @click="deleteInfo" type="danger" size="small" icon="el-icon-delete" - >{{ $t('common.delete') }}</el-button> + >{{ $t("common.delete") }}</el-button + > <el-button @click="queryInfo('queryForm')" icon="el-icon-search" size="small" class="primary" - >{{ $t('common.iquery') }}</el-button> + >{{ $t("common.iquery") }}</el-button + > <el-button @click="resetInfo('queryForm')" icon="el-icon-delete" size="small" type="info" - >{{ $t('common.empty') }}</el-button> + >{{ $t("common.empty") }}</el-button + > </el-form-item> </el-form> </div> - <div class="table_box"> + <div class="table_box" style="height: calc(100% - 89px)"> <el-table :data="tableData" @selection-change="handleSelectionChange" - height="100%" + height="calc(100% - 57px)" > - <el-table-column - type="selection" - width="50" - /> + <el-table-column type="selection" width="50" /> <el-table-column align="center" type="index" @@ -126,30 +119,25 @@ :label="$t('dataManage.domainManage.bak')" /> - <el-table-column - min-width="150" - :label="$t('common.operate')" - > + <el-table-column min-width="150" :label="$t('common.operate')"> <template slot-scope="scope"> <el-button class="primary" @click="showDetail(scope.row)" size="small" - >{{ $t('common.details') }}</el-button> + >{{ $t("common.details") }}</el-button + > <el-button v-if="btnStatus.update" type="warning" @click="handleEdit(scope.$index, scope.row)" size="small" - >{{ $t('common.update') }}</el-button> + >{{ $t("common.update") }}</el-button + > </template> </el-table-column> </el-table> - </div> - <div - class="pagination_box" - style="margin-top: 20px" - > + <div class="pagination_box" style="margin-top: 20px"> <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" @@ -161,66 +149,47 @@ > </el-pagination> </div> + </div> + </div> </div> - <div - class="infoBox subpage_Div box_div" - v-show="showinfoBox" - > - - <div - slot="header" - class="clearfix" - > - <span>{{ $t('common.details') }}</span> - <div - style="float: right; cursor: pointer" - @click="closeDetial" - > + <div class="infoBox subpage_Div box_div" v-show="showinfoBox"> + <div slot="header" class="clearfix"> + <span>{{ $t("common.details") }}</span> + <div style="float: right; cursor: pointer" @click="closeDetial"> <i class="el-icon-close"></i> </div> </div> <el-divider></el-divider> <div class="contentBox"> <p> - {{ $t('dataManage.domainManage.domName') }}锛歿{ - itemdetail.domName - }} + {{ $t("dataManage.domainManage.domName") }}锛歿{ itemdetail.domName }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.domainManage.domDesc') }}锛歿{ - itemdetail.domDesc - }} + {{ $t("dataManage.domainManage.domDesc") }}锛歿{ itemdetail.domDesc }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.domainManage.domCode') }}锛歿{ - itemdetail.domCode - }} + {{ $t("dataManage.domainManage.domCode") }}锛歿{ itemdetail.domCode }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.domainManage.codeDesc') }}锛歿{ - itemdetail.codeDesc - }} + {{ $t("dataManage.domainManage.codeDesc") }}锛歿{ + itemdetail.codeDesc + }} </p> <el-divider></el-divider> - <p>{{ $t('dataManage.domainManage.bsm') }}锛歿{ itemdetail.bsm }}</p> + <p>{{ $t("dataManage.domainManage.bsm") }}锛歿{ itemdetail.bsm }}</p> + <el-divider></el-divider> + <p>{{ $t("dataManage.domainManage.level") }}锛歿{ itemdetail.level }}</p> <el-divider></el-divider> <p> - {{ $t('dataManage.domainManage.level') }}锛歿{ itemdetail.level }} + {{ $t("dataManage.domainManage.orderid") }}锛歿{ itemdetail.orderid }} </p> <el-divider></el-divider> - <p> - {{ $t('dataManage.domainManage.orderid') }}锛歿{ - itemdetail.orderid - }} - </p> - <el-divider></el-divider> - <p>{{ $t('dataManage.domainManage.bak') }}锛歿{ itemdetail.bak }}</p> + <p>{{ $t("dataManage.domainManage.bak") }}锛歿{ itemdetail.bak }}</p> </div> - </div> <el-dialog width="510px" @@ -233,17 +202,14 @@ :visible.sync="dialogFormVisible" :before-close="handleClose" > - <el-form - :model="editForm" - ref="editForm" - > + <el-form :model="editForm" ref="editForm"> <el-form-item :label="$t('dataManage.domainManage.domName')" :label-width="formLabelWidth" > <el-select :popper-append-to-body="false" - style="width:100%" + style="width: 100%" v-model="editForm.domName" placeholder="璇烽�夋嫨" > @@ -261,102 +227,70 @@ :label="$t('dataManage.domainManage.domDesc')" :label-width="formLabelWidth" > - <el-input - v-model="editForm.domDesc" - autocomplete="off" - ></el-input> + <el-input v-model="editForm.domDesc" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.domainManage.domCode')" :label-width="formLabelWidth" > - <el-input - v-model="editForm.domCode" - autocomplete="off" - ></el-input> + <el-input v-model="editForm.domCode" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.domainManage.codeDesc')" :label-width="formLabelWidth" > - <el-input - v-model="editForm.codeDesc" - autocomplete="off" - ></el-input> + <el-input v-model="editForm.codeDesc" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.domainManage.bsm')" :label-width="formLabelWidth" > - <el-input - v-model="editForm.bsm" - autocomplete="off" - ></el-input> + <el-input v-model="editForm.bsm" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.domainManage.level')" :label-width="formLabelWidth" > - <el-input - v-model="editForm.level" - autocomplete="off" - ></el-input> + <el-input v-model="editForm.level" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.domainManage.orderid')" :label-width="formLabelWidth" > - <el-input - v-model="editForm.orderid" - autocomplete="off" - ></el-input> + <el-input v-model="editForm.orderid" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.domainManage.bak')" :label-width="formLabelWidth" > - <el-input - v-model="editForm.bak" - autocomplete="off" - ></el-input> + <el-input v-model="editForm.bak" autocomplete="off"></el-input> </el-form-item> </el-form> - <div - v-if="behavior == '淇敼淇℃伅'" - slot="footer" - class="dialog-footer" - > - <el-button - size="small" - @click="cancelEdit()" - >{{ $t('common.reset') }}</el-button> + <div v-if="behavior == '淇敼淇℃伅'" slot="footer" class="dialog-footer"> + <el-button size="small" @click="cancelEdit()">{{ + $t("common.reset") + }}</el-button> <el-button size="small" class="primary" type="info" @click="sendEdit('editForm')" v-loading.fullscreen.lock="fullscreenLoading" - >{{ $t('common.confirm') }}</el-button> + >{{ $t("common.confirm") }}</el-button + > </div> - <div - v-else - slot="footer" - class="dialog-footer" - > - <el-button - type="info" - size="small" - @click="cancelAdd('editForm')" - >{{ - $t('common.reset') + <div v-else slot="footer" class="dialog-footer"> + <el-button type="info" size="small" @click="cancelAdd('editForm')">{{ + $t("common.reset") }}</el-button> <el-button size="small" class="primary" @click="sendAdd('editForm')" v-loading.fullscreen.lock="fullscreenLoading" - >{{ $t('common.confirm') }}</el-button> + >{{ $t("common.confirm") }}</el-button + > </div> </el-dialog> </div> @@ -370,37 +304,37 @@ deleteDomain, updateDomain, domain_selectDomainNames, -} from '../../api/api'; -import MyBread from '../../components/MyBread.vue'; +} from "../../api/api"; +import MyBread from "../../components/MyBread.vue"; export default { - name: 'domainManage', + name: "domainManage", components: { MyBread }, data() { return { - filterInput: '', + filterInput: "", domainOptions: [], multipleSelection: [], - behavior: '', - formLabelWidth: '100px', + behavior: "", + formLabelWidth: "100px", dialogFormVisible: false, showinfoBox: false, fullscreenLoading: false, itemdetail: {}, editForm: { - domName: '', + domName: "", }, queryForm: { - code: '', + code: "", }, insertform: {}, - initialForm: '', + initialForm: "", tableData: [], count: 0, rowFlag: null, listData: { - ns: '', - tab: '', + ns: "", + tab: "", pageIndex: 1, pageSize: 10, }, @@ -414,21 +348,21 @@ }, domainData: [ { - val: '鍩虹鏁版嵁', + val: "鍩虹鏁版嵁", children: [], }, { - val: '涓氬姟鏁版嵁', + val: "涓氬姟鏁版嵁", children: [], }, - { - val: '鍏冩暟鎹�', + { + val: "鍏冩暟鎹�", children: [], }, ], defaultProps: { - children: 'children', - label: 'val', + children: "children", + label: "val", }, }; }, @@ -456,7 +390,7 @@ this.listData.pageSize = 10; const res = await domain_selectDomainNames(data); if (res.code != 200) { - this.$message.error('domain璋冪敤澶辫触'); + this.$message.error("domain璋冪敤澶辫触"); } var std = []; for (var i = 0; i < res.result.length; i++) { @@ -491,9 +425,9 @@ }, getAllTabelData() { getDomainTabs().then((res) => { - let bdres = res.result.filter((item) => item.ns == 'bd'); - let bsres = res.result.filter((item) => item.ns == 'bs'); - let mdres = res.result.filter((item) => item.ns == 'md'); + let bdres = res.result.filter((item) => item.ns == "bd"); + let bsres = res.result.filter((item) => item.ns == "bs"); + let mdres = res.result.filter((item) => item.ns == "md"); for (var i in bdres) { // bdres[i].val = bdres[i].tabDesc + '(' + bdres[i].tab + ')'; bdres[i].val = bdres[i].tabDesc; @@ -502,13 +436,13 @@ // bsres[i].val = bsres[i].tabDesc + '(' + bsres[i].tab + ')'; bsres[i].val = bsres[i].tabDesc; } - for (var i in mdres) { + for (var i in mdres) { // bsres[i].val = bsres[i].tabDesc + '(' + bsres[i].tab + ')'; mdres[i].val = mdres[i].tabDesc; } this.domainData[0].children = bdres; this.domainData[1].children = bsres; - this.domainData[2].children = mdres; + this.domainData[2].children = mdres; }); }, handleSelectionChange(val) { @@ -539,21 +473,21 @@ resetInfo() { this.queryForm = {}; this.$store.state.verCateNode = {}; - this.$bus.$emit('clearTressLabel', true); + this.$bus.$emit("clearTressLabel", true); this.listData.pageIndex = 1; this.listData.pageSize = 10; this.queryInfo(); }, // 鍒犻櫎澶氭潯 deleteInfo() { - this.$confirm('纭畾鏄惁鍒犻櫎鎵�閫夊唴瀹�?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning', + this.$confirm("纭畾鏄惁鍒犻櫎鎵�閫夊唴瀹�?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", }) .then(() => { if (this.multipleSelection.length == 0) { - alert('璇烽�夋嫨瑕佸垹闄ょ殑瀵硅薄'); + alert("璇烽�夋嫨瑕佸垹闄ょ殑瀵硅薄"); return; } else { var std = []; @@ -564,8 +498,8 @@ console.log(res); if (res.code == 200) { this.$message({ - type: 'success', - message: '鍒犻櫎鎴愬姛!', + type: "success", + message: "鍒犻櫎鎴愬姛!", }); this.multipleSelection = []; getSingleTab(this.listData).then((res) => { @@ -576,18 +510,18 @@ }, 500); }); } else { - this.$message.error('鍒犻櫎澶辫触'); + this.$message.error("鍒犻櫎澶辫触"); this.multipleSelection = []; } }); } }) .catch(() => { - this.$message('宸插彇娑堝垹闄�'); + this.$message("宸插彇娑堝垹闄�"); }); }, showAddDialog() { - this.behavior = '鏂板鐢ㄦ埛'; + this.behavior = "鏂板鐢ㄦ埛"; this.editForm = {}; this.dialogFormVisible = true; }, @@ -606,8 +540,8 @@ this.fullscreenLoading = false; if (res.code == 200) { this.$message({ - message: '娣诲姞鎴愬姛', - type: 'success', + message: "娣诲姞鎴愬姛", + type: "success", }); getSingleTab(this.listData).then((res) => { setTimeout(() => { @@ -622,22 +556,22 @@ }, 500); }) .catch((res) => { - alert('娣诲姞澶辫触锛岃閲嶈瘯锛�'); + alert("娣诲姞澶辫触锛岃閲嶈瘯锛�"); this.fullscreenLoading = false; }); } else { - console.log('error submit!!'); + console.log("error submit!!"); return false; } }); }, handleClose(done) { - this.$confirm('鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴锛�') + this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴锛�") .then((_) => { this.editForm = {}; done(); }) - .catch((_) => { }); + .catch((_) => {}); }, // 鏌ョ湅鐣岄潰 showDetail(row) { @@ -654,7 +588,7 @@ this.dialogFormVisible = true; this.initialForm = JSON.stringify(row); //澶囦唤 this.editForm = row; - this.behavior = '淇敼淇℃伅'; + this.behavior = "淇敼淇℃伅"; }, editFromDataClose() { this.dialogFormVisible = false; @@ -663,10 +597,10 @@ // 鎻愪氦淇敼 sendEdit() { - this.$confirm('鏄惁纭畾缂栬緫?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning', + this.$confirm("鏄惁纭畾缂栬緫?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", }) .then(() => { this.dialogFormVisible = false; @@ -682,22 +616,22 @@ }, 500); }); this.$message({ - message: '淇敼鎴愬姛', - type: 'success', + message: "淇敼鎴愬姛", + type: "success", }); this.editForm = {}; } else { - alert('淇敼澶辫触锛岃閲嶈瘯锛�'); + alert("淇敼澶辫触锛岃閲嶈瘯锛�"); this.fullscreenLoading = false; } }) .catch(() => { - alert('淇敼澶辫触锛岃閲嶈瘯锛�'); + alert("淇敼澶辫触锛岃閲嶈瘯锛�"); this.fullscreenLoading = false; }); }) .catch(() => { - alert('淇敼澶辫触锛岃閲嶈瘯锛�'); + alert("淇敼澶辫触锛岃閲嶈瘯锛�"); this.fullscreenLoading = false; }); }, @@ -731,11 +665,11 @@ watch: { pathId: { immediate: true, - handler(val) { }, + handler(val) {}, }, filterInput(val) { this.$refs.tree.filter(val); - } + }, }, }; </script> @@ -747,55 +681,36 @@ padding: 1%; .mainBox { width: 100%; - height: 92%; + height: calc(100% - 75px); display: flex; justify-content: space-between; .leftTree { - width: 15%; - height: 91%; + width: calc(23% - 0px); + height: 100%; border-radius: 5px; - padding: 1%; - max-height: 670px; + padding: 10px; + box-sizing: border-box; overflow-y: auto; } .right { - width: 80%; - height: 91%; - + width: 75%; + height: 100%; border-radius: 5px; - padding: 1%; - max-height: 670px; - // overflow-y: auto; + padding: 10px; + box-sizing: border-box; + border: 1px solid #dcdfe6; .inquire { - // margin-bottom: 10px; - padding: 1%; - + padding: 8px; + // margin-top: 10px; border-radius: 5px; border: 1px solid #dcdfe6; + margin-bottom: 20px; .el-form-item { margin: 5px; } } - .table_box { - width: 100%; - height: 80%; - margin: 0 auto; - overflow: auto; - margin-top: 10px; - .el-table /deep/ th.el-table__cell > .cell { - padding: 15px !important; - } - - .el-table--border::after, - .el-table--group::after { - width: 0; - } - .el-table::before { - height: 0; - } - } } } } diff --git a/src/views/datamanage/metadataManage.vue b/src/views/datamanage/metadataManage.vue index dcb5d3e..ff7d664 100644 --- a/src/views/datamanage/metadataManage.vue +++ b/src/views/datamanage/metadataManage.vue @@ -1,36 +1,36 @@ <template> <div class="authorityManagement_box"> - <My-bread :list="[ + <My-bread + :list="[ `${$t('dataManage.dataManage')}`, `${$t('dataManage.metadataManage')}`, - ]"></My-bread> + ]" + ></My-bread> <el-divider /> - <div class="inquire subpage_Div"> - <el-form - ref="queryForm" - :model="queryForm" - :inline="true" - > - <el-form-item> - <el-select - :popper-append-to-body="false" - v-model="queryForm.depName" - > - <el-option - :value="queryForm.depid" - :label="queryForm.depName" - style=" height:auto" - > - <el-tree - ref="tree" - :data="companyOption1" - node-key="id" - :props="cascader" - @node-click="handleChange1" - /> - </el-option> - </el-select> - <!-- <el-cascader + <div class="inquire subpage_Div" ref="container"> + <el-form ref="queryForm" :model="queryForm" :inline="true"> + <div class="flex_box"> + <div style="margin-right: auto"> + <el-form-item> + <el-select + :popper-append-to-body="false" + v-model="queryForm.depName" + > + <el-option + :value="queryForm.depid" + :label="queryForm.depName" + style="height: auto" + > + <el-tree + ref="tree" + :data="companyOption1" + node-key="id" + :props="cascader" + @node-click="handleChange1" + /> + </el-option> + </el-select> + <!-- <el-cascader v-model="queryForm.depid" :show-all-levels="false" :options="companyOption1" @@ -43,27 +43,27 @@ emitPath: false, }" ></el-cascader> --> - </el-form-item> - <el-form-item> - <el-select - :popper-append-to-body="false" - v-model="queryForm.dirName" - > - <el-option - :value="queryForm.dirid" - :label="queryForm.dirName" - style=" height:auto" - > - <el-tree - ref="tree" - :data="companyOption" - node-key="id" - :props="cascader" - @node-click="handleChange" - /> - </el-option> - </el-select> - <!-- <el-cascader + </el-form-item> + <el-form-item> + <el-select + :popper-append-to-body="false" + v-model="queryForm.dirName" + > + <el-option + :value="queryForm.dirid" + :label="queryForm.dirName" + style="height: auto" + > + <el-tree + ref="tree" + :data="companyOption" + node-key="id" + :props="cascader" + @node-click="handleChange" + /> + </el-option> + </el-select> + <!-- <el-cascader v-model="queryForm.dirid" :show-all-levels="false" :options="companyOption" @@ -76,30 +76,71 @@ emitPath: false, }" ></el-cascader> --> - </el-form-item> - <el-form-item> - <el-select - :popper-append-to-body="false" - v-model="queryForm.verid" - placeholder="璇烽�夋嫨" - @change="verHandleChange($event)" - > - <el-option - v-for="item in verOptions" - :key="item.id" - :label="item.name" - :value="item.id" - > - </el-option> - </el-select> - </el-form-item> - <el-form-item prop="name"> - <el-input - v-model="queryForm.name" - :placeholder="$t('common.pleaseInput')" - style="width:200px" - /> - </el-form-item> + </el-form-item> + <el-form-item> + <el-select + :popper-append-to-body="false" + v-model="queryForm.verid" + placeholder="璇烽�夋嫨" + @change="verHandleChange($event)" + > + <el-option + v-for="item in verOptions" + :key="item.id" + :label="item.name" + :value="item.id" + > + </el-option> + </el-select> + </el-form-item> + <el-form-item prop="name"> + <el-input + v-model="queryForm.name" + :placeholder="$t('common.pleaseInput')" + style="width: 200px" + /> + </el-form-item> + </div> + <div> + <el-form-item> + <el-button + @click="resetInfo('queryForm')" + icon="el-icon-refresh" + type="info" + size="small" + >{{ $t("common.reset") }}</el-button + > + </el-form-item> + <el-form-item> + <el-button + @click="queryInfo()" + icon="el-icon-search" + class="primary" + size="small" + >{{ $t("common.iquery") }}</el-button + > + </el-form-item> + <el-form-item v-if="btnStatus.delete"> + <el-button + type="danger" + size="small" + @click="deleteMetaInfo" + icon="el-icon-delete" + >{{ $t("common.delete") }}</el-button + > + </el-form-item> + <el-form-item v-if="btnStatus.download"> + <el-button + @click="downFormData" + icon="el-icon-download" + type="success" + size="small" + >{{ $t("common.download") }}</el-button + > + </el-form-item> + </div> + </div> + <!-- <el-form-item style="float:right"> <el-button @click="queryInfo()" @@ -142,133 +183,79 @@ size="small" >{{ $t('common.download') }}</el-button> </el-form-item> --> - <el-form-item style="float:right"> - <el-button - @click="resetInfo('queryForm')" - icon="el-icon-refresh" - type="info" - size="small" - >{{ $t('common.reset') }}</el-button> - </el-form-item> - <el-form-item style="float:right"> - <el-button - @click="queryInfo()" - icon="el-icon-search" - class="primary" - size="small" - >{{ $t('common.iquery') }}</el-button> - </el-form-item> - <el-form-item v-if="btnStatus.delete" style="float:right"> - <el-button - type="danger" - size="small" - @click="deleteMetaInfo" - icon="el-icon-delete" - >{{ $t('common.delete') }}</el-button> - </el-form-item> - <el-form-item v-if="btnStatus.download" style="float:right"> - <el-button - @click="downFormData" - icon="el-icon-download" - type="success" - size="small" - >{{ $t('common.download') }}</el-button> - </el-form-item> </el-form> </div> - <div class="bottom"> - <div class="rightTable subpage_Div"> - <div class="table_box"> - <el-table - :data="tableData" - style="width: 100%" - @selection-change="handleSelectionChange" - height="95%" + <div class="table_box subpage_Div" :style="styleVar"> + <el-table + :data="tableData" + style="width: 100%" + @selection-change="handleSelectionChange" + height="calc(100% - 57px)" + > + <el-table-column type="selection" width="55" /> + <el-table-column + :label="$t('dataManage.dictionaryManageObj.number')" + type="index" + width="50" > - <el-table-column - type="selection" - width="55" - /> - <el-table-column - :label="$t('dataManage.dictionaryManageObj.number')" - type="index" - width="50" - > - </el-table-column> - <el-table-column - prop="name" - :label="$t('dataManage.vmobj.name')" - /> - <el-table-column - prop="type" - :label="$t('dataManage.vmobj.format')" - /> - <el-table-column - prop="sizes" - :label="$t('dataManage.vmobj.size')" - :formatter="stateFormatSizes" - /> - <el-table-column - prop="depName" - :label="$t('dataManage.vmobj.depName')" - /> - <el-table-column - prop="dirName" - :label="$t('dataManage.vmobj.dirName')" - width="200" - /> - <el-table-column - prop="verName" - :label="$t('dataManage.vmobj.versionNumber')" - /> - <el-table-column :label="$t('dataManage.dataUpObj.tableName')"> - <template slot-scope="scope"> - <a @click="detail(scope.row)">{{ - scope.row.tab - }}</a> - </template> - </el-table-column> + </el-table-column> + <el-table-column prop="name" :label="$t('dataManage.vmobj.name')" /> + <el-table-column prop="type" :label="$t('dataManage.vmobj.format')" /> + <el-table-column + prop="sizes" + :label="$t('dataManage.vmobj.size')" + :formatter="stateFormatSizes" + /> + <el-table-column + prop="depName" + :label="$t('dataManage.vmobj.depName')" + /> + <el-table-column + prop="dirName" + :label="$t('dataManage.vmobj.dirName')" + width="200" + /> + <el-table-column + prop="verName" + :label="$t('dataManage.vmobj.versionNumber')" + /> + <el-table-column :label="$t('dataManage.dataUpObj.tableName')"> + <template slot-scope="scope"> + <a @click="detail(scope.row)">{{ scope.row.tab }}</a> + </template> + </el-table-column> - <!-- <el-table-column + <!-- <el-table-column prop="tab" :label="$t('dataManage.vmobj.tab')" :formatter="formatData" /> --> - <el-table-column - prop="rows" - :label="$t('dataManage.vmobj.row')" - /> - <el-table-column - prop="uname" - :label="$t('dataManage.vmobj.createonuser')" - /> - <el-table-column - prop="createTime" - :label="$t('dataManage.vmobj.createontime')" - :formatter="formatData" - /> - <el-table-column - min-width="100" - :label="$t('common.operate')" - > - <template slot-scope="scope"> - <el-link @click="showDetail(scope.row)">{{ - $t('common.details') - }}</el-link> - <el-link - v-if="btnStatus.update" - @click="editInfo(scope.row)" - style="margin-left: 10px; " - >{{ $t('common.edit') }}</el-link> - </template> - </el-table-column> - </el-table> - </div> - <div - style="margin-top: 0px" - class="pagination_box" - > + <el-table-column prop="rows" :label="$t('dataManage.vmobj.row')" /> + <el-table-column + prop="uname" + :label="$t('dataManage.vmobj.createonuser')" + /> + <el-table-column + prop="createTime" + :label="$t('dataManage.vmobj.createontime')" + :formatter="formatData" + /> + <el-table-column min-width="100" :label="$t('common.operate')"> + <template slot-scope="scope"> + <el-link @click="showDetail(scope.row)">{{ + $t("common.details") + }}</el-link> + <el-link + v-if="btnStatus.update" + @click="editInfo(scope.row)" + style="margin-left: 10px" + >{{ $t("common.edit") }}</el-link + > + </template> + </el-table-column> + </el-table> + <div class="pagination_box"> <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" @@ -281,12 +268,11 @@ </el-pagination> </div> </div> - </div> + <div - class="infoBox" + class="infoBox box_div" v-show="showinfoBox" > - <el-card class="box-card"> <div slot="header" class="clearfix" @@ -299,59 +285,52 @@ <i class="el-icon-close"></i> </div> </div> + <el-divider></el-divider> <div class="contentBox" style="padding:1%" > <p>{{ $t('dataManage.vmobj.name') }}锛歿{ itemdetail.name }}</p> <el-divider></el-divider> - <p>{{ $t('dataManage.vmobj.format') }}锛歿{ itemdetail.type }}</p> + <p>{{ $t("dataManage.vmobj.format") }}锛歿{ itemdetail.type }}</p> <el-divider></el-divider> - <p>{{ $t('common.size') }}锛歿{ setInfoBoxSize(itemdetail.sizes) }}</p> + <p>{{ $t("common.size") }}锛歿{ setInfoBoxSize(itemdetail.sizes) }}</p> <el-divider></el-divider> - <p>{{ $t('dataManage.vmobj.depName') }}锛歿{ itemdetail.depName }}</p> + <p>{{ $t("dataManage.vmobj.depName") }}锛歿{ itemdetail.depName }}</p> + <el-divider></el-divider> + <p>{{ $t("dataManage.vmobj.dirName") }}锛歿{ itemdetail.dirName }}</p> <el-divider></el-divider> <p> - {{ $t('dataManage.vmobj.dirName') }}锛歿{ - itemdetail.dirName - }} + {{ $t("dataManage.vmobj.versionNumber") }}锛歿{ itemdetail.verName }} + </p> + <el-divider></el-divider> + <p>{{ $t("dataManage.vmobj.tab") }}锛歿{ itemdetail.tab }}</p> + <el-divider></el-divider> + <p>{{ $t("dataManage.vmobj.row") }}锛歿{ itemdetail.row }}</p> + <el-divider></el-divider> + <p> + {{ $t("dataManage.vmobj.createonuser") }}锛歿{ itemdetail.uname }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.vmobj.versionNumber') }}锛歿{ itemdetail.verName }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.tab') }}锛歿{ itemdetail.tab }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.row') }}锛歿{ itemdetail.row }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.createonuser') }}锛歿{ itemdetail.uname }} - </p> - <el-divider></el-divider> - <p> - {{ $t('dataManage.vmobj.createontime') }}锛歿{ + {{ $t("dataManage.vmobj.createontime") }}锛歿{ setInfoBoxTime(itemdetail.createTime) }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.vmobj.updateonuser') }}锛歿{ + {{ $t("dataManage.vmobj.updateonuser") }}锛歿{ itemdetail.updateUser }} </p> <el-divider></el-divider> <p> - {{ $t('dataManage.vmobj.updateontime') }}锛歿{ + {{ $t("dataManage.vmobj.updateontime") }}锛歿{ setInfoBoxTime(itemdetail.updateTime) }} </p> </div> - </el-card> + </div> <el-dialog width="80vh" @@ -364,50 +343,38 @@ :visible.sync="dialogFormVisible" :before-close="handleClose" > - <el-form - :model="editForm" - ref="editForm" - > + <el-form :model="editForm" ref="editForm"> <el-form-item :label="$t('dataManage.vmobj.name')" :label-width="formLabelWidth" > - <el-input - v-model="editForm.name" - autocomplete="off" - ></el-input> + <el-input v-model="editForm.name" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.vmobj.format')" :label-width="formLabelWidth" > - <el-input - v-model="editForm.type" - autocomplete="off" - ></el-input> + <el-input v-model="editForm.type" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.vmobj.size')" :label-width="formLabelWidth" > - <el-input - v-model="editForm.sizes" - autocomplete="off" - ></el-input> + <el-input v-model="editForm.sizes" autocomplete="off"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.vmobj.depName')" :label-width="formLabelWidth" > <el-select - style="width:100%" + style="width: 100%" :popper-append-to-body="false" v-model="editForm.depName" > <el-option :value="editForm.depid" :label="editForm.depName" - style=" height:auto" + style="height: auto" > <el-tree ref="tree" @@ -430,14 +397,14 @@ :label-width="formLabelWidth" > <el-select - style="width:100%" + style="width: 100%" :popper-append-to-body="false" v-model="editForm.dirName" > <el-option :value="editForm.dirid" :label="editForm.dirName" - style=" height:auto" + style="height: auto" > <el-tree ref="tree" @@ -459,10 +426,7 @@ :label="$t('dataManage.vmobj.describe')" :label-width="formLabelWidth" > - <el-input - v-model="editForm.describe" - autocomplete="off" - ></el-input> + <el-input v-model="editForm.describe" autocomplete="off"></el-input> </el-form-item> <!-- <el-form-item :label="$t('dataManage.vmobj.gather')" @@ -471,41 +435,29 @@ <el-input v-model="editForm.gather" autocomplete="off"></el-input> </el-form-item> --> </el-form> - <div - v-if="behavior == '淇敼淇℃伅'" - slot="footer" - class="dialog-footer" - > - <el-button - size="small" - @click="cancelEdit()" - >{{ - $t('common.reset') + <div v-if="behavior == '淇敼淇℃伅'" slot="footer" class="dialog-footer"> + <el-button size="small" @click="cancelEdit()">{{ + $t("common.reset") }}</el-button> <el-button size="small" type="primary" @click="sendEdit('editForm')" v-loading.fullscreen.lock="fullscreenLoading" - >{{ $t('common.submit') }}</el-button> + >{{ $t("common.submit") }}</el-button + > </div> - <div - v-else - slot="footer" - class="dialog-footer" - > - <el-button - size="small" - @click="cancelAdd('editForm')" - >{{ - $t('common.reset') + <div v-else slot="footer" class="dialog-footer"> + <el-button size="small" @click="cancelAdd('editForm')">{{ + $t("common.reset") }}</el-button> <el-button size="small" type="primary" @click="sendAdd('editForm')" v-loading.fullscreen.lock="fullscreenLoading" - >{{ $t('common.submit') }}</el-button> + >{{ $t("common.submit") }}</el-button + > </div> </el-dialog> <el-dialog @@ -513,7 +465,7 @@ :visible.sync="dialogVisible" width="70%" > - <div style="height:600px"> + <div style="height: 600px"> <el-table ref="filterTable" :data="dbTableData" @@ -536,10 +488,7 @@ align="center" ></el-table-column> </el-table> - <div - style="margin-top: 10px" - class="pagination_box" - > + <div style="margin-top: 10px" class="pagination_box"> <el-pagination @size-change="handleLoaderSizeChange" @current-change="handleLoaderCurrentChange" @@ -552,13 +501,9 @@ </el-pagination> </div> </div> - </el-dialog> - <div - class="downloadBox box_div subpage_Div" - v-if="showCodeBox" - > - <h4 style="padding: 20px">{{$t('common.passworld')}}</h4> + <div class="downloadBox box_div subpage_Div" v-if="showCodeBox"> + <h4 style="padding: 20px">{{ $t("common.passworld") }}</h4> <el-form :model="codeForm" :rules="rules" @@ -566,20 +511,14 @@ label-width="100px" class="codeForm" > - <el-form-item - :label="$t('common.passworld')" - prop="password" - > + <el-form-item :label="$t('common.passworld')" prop="password"> <el-input type="password" v-model="codeForm.password" show-password ></el-input> </el-form-item> - <el-form-item - :label="$t('common.SPassword')" - prop="repassword" - > + <el-form-item :label="$t('common.SPassword')" prop="repassword"> <el-input type="password" v-model="codeForm.repassword" @@ -591,15 +530,15 @@ class="primary" size="small" @click="download('codeForm')" - >{{$t('common.confirm')}}</el-button> - <el-button - type="info" - size="small" - @click="closeDown('codeForm')" - >{{$t('common.cancel')}}</el-button> + >{{ $t("common.confirm") }}</el-button + > + <el-button type="info" size="small" @click="closeDown('codeForm')">{{ + $t("common.cancel") + }}</el-button> </el-form-item> </el-form> </div> + <iframe id="downFrame" src="" @@ -609,8 +548,8 @@ </template> <script> -import $ from 'jquery' -import { getToken } from '@/utils/auth'; +import $ from "jquery"; +import { getToken } from "@/utils/auth"; import { select_meta_ByPageAndCount, // queryDataCount, @@ -625,19 +564,19 @@ meta_selectDownloadFile, meta_selectFields, meta_selectByPageForUpload, - meta_selectVerByDirid -} from '../../api/api'; + meta_selectVerByDirid, +} from "../../api/api"; -import MyBread from '../../components/MyBread.vue'; +import MyBread from "../../components/MyBread.vue"; export default { - name: 'metadataManage', + name: "metadataManage", components: { MyBread }, data() { var repasswordValidator = (rule, value, callback) => { - if (value === '') { - callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�')); + if (value === "") { + callback(new Error("璇峰啀娆¤緭鍏ュ瘑鐮�")); } else if (value !== this.codeForm.password) { - callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!')); + callback(new Error("涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!")); } else { callback(); } @@ -646,9 +585,7 @@ var passwordreg = /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![a-z0-9]+$)(?![a-z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![0-9\W!@#$%^&*`~()\\-_+=,.?;<>]+$)[a-zA-Z0-9\W!@#$%^&*`~()\\-_+=,.?;<>]{12,20}$/; if (!passwordreg.test(value)) { - callback( - new Error('瀵嗙爜蹇呴』鐢辨暟瀛椼�佸瓧姣嶃�佺壒娈婂瓧绗︾粍鍚�,璇疯緭鍏�13-20浣�') - ); + callback(new Error("瀵嗙爜蹇呴』鐢辨暟瀛椼�佸瓧姣嶃�佺壒娈婂瓧绗︾粍鍚�,璇疯緭鍏�13-20浣�")); } else { callback(); } @@ -656,40 +593,43 @@ return { verOptions: [], defaultProps: { - children: 'children', - label: 'name', + children: "children", + label: "name", }, dirComPanyOption: [], companyOption: [], companyOption1: [], - activeName: '', + activeName: "", optionCount: [], showCodeBox: false, value: true, multipleSelection: [], - formLabelWidth: '120px', + formLabelWidth: "120px", dialogFormVisible: false, editForm: {}, showinfoBox: false, fullscreenLoading: false, itemdetail: {}, queryForm: { - name: '', - dirid: '', - depid: '', - verid: '' + name: "", + dirid: "", + depid: "", + verid: "", }, - behavior: '', - initialForm: '', + behavior: "", + initialForm: "", codeForm: { - password: '', - repassword: '', + password: "", + repassword: "", }, rules: { - password: [{ required: true, message: '璇疯緭鍏ュ瘑鐮�', trigger: 'blur' }, { validator: passwordValidator, trigger: 'blur' }], + password: [ + { required: true, message: "璇疯緭鍏ュ瘑鐮�", trigger: "blur" }, + { validator: passwordValidator, trigger: "blur" }, + ], repassword: [ - { required: true, message: '璇疯緭鍏ョ‘璁ゅ瘑鐮�', trigger: 'blur' }, - { validator: repasswordValidator, trigger: 'blur' }, + { required: true, message: "璇疯緭鍏ョ‘璁ゅ瘑鐮�", trigger: "blur" }, + { validator: repasswordValidator, trigger: "blur" }, ], }, tableData: [], @@ -711,12 +651,12 @@ pageIndex: 1, name: null, dirid: null, - depid: null + depid: null, }, cascader: { - label: 'name', - value: 'id', - children: 'children', + label: "name", + value: "id", + children: "children", checkStrictly: true, emitPath: false, }, @@ -728,33 +668,55 @@ }, count1: 0, attributeData: [], + tableHeight: 0, + timer: 0, + styleVar: { + height: "calc(100% - 109px)", + }, }; }, created() { - // this.getSelectDictTab(); this.showPermsBtn(); this.getQueryDepTree(); this.signGetPublicKey(); - }, - + beforeDestroy() { + this.timer && clearTimeout(this.timer); + window.removeEventListener("resize", this.onResize); + }, + mounted() { + window.addEventListener("resize", this.onResize); + this.calHeight(); + }, methods: { + onResize() { + this.timer && clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.calHeight(); + }, 500); + }, + calHeight() { + this.$nextTick(() => { + const rect = this.$refs.container.getBoundingClientRect(); + this.tableHeight = `${rect.height + 97}px`; + this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`; + }); + }, async detail(res) { var val = res.tab.split("."); const data = await meta_selectFields({ ns: val[0], - tab: val[1] - }) + tab: val[1], + }); if (data.code != 200) { - this.$message.error('瀛楁鍒楄〃璋冪敤澶辫触'); - return + this.$message.error("瀛楁鍒楄〃璋冪敤澶辫触"); + return; } this.dialogVisible = true; - this.attributeData = data.result; @@ -762,15 +724,15 @@ id: res.id, pageIndex: 1, pageSize: 10, - } + }; this.getDataLoaderSelectDbData(); }, async getDataLoaderSelectDbData() { const data1 = await meta_selectByPageForUpload(this.listLoader); if (data1.code != 200) { - this.$message.error('瀛楁鍒楄〃璋冪敤澶辫触'); - return + this.$message.error("瀛楁鍒楄〃璋冪敤澶辫触"); + return; } var option = data1.result; @@ -781,12 +743,11 @@ option[i].updateuser = option[i].updateName; option[i].verid = option[i].verName; if (option[i].createtime != null) { - option[i].createtime = this.setInfoBoxTime(option[i].createtime) + option[i].createtime = this.setInfoBoxTime(option[i].createtime); } if (option[i].updatetime != null) { - option[i].updatetime = this.setInfoBoxTime(option[i].updatetime) + option[i].updatetime = this.setInfoBoxTime(option[i].updatetime); } - } this.dbTableData = data1.result; this.count1 = data1.count; @@ -812,32 +773,32 @@ async getQueryDepTree() { const res = await selectdepTab(); if (res.code != 200) { - this.$message.error('鍗曚綅鍒楄〃鑾峰彇澶辫触'); + this.$message.error("鍗曚綅鍒楄〃鑾峰彇澶辫触"); return; } this.companyOption1 = this.treeData(res.result); - this.queryForm.depid = this.companyOption1[0].id - this.queryForm.depName = this.companyOption1[0].name + this.queryForm.depcode = this.companyOption1[0].code; + this.queryForm.depName = this.companyOption1[0].name; this.getQueryDirTree(); - }, async getQueryDirTree() { const res = await selectdirTab(); if (res.code != 200) { - this.$message.error('鍗曚綅鍒楄〃鑾峰彇澶辫触'); + this.$message.error("鍗曚綅鍒楄〃鑾峰彇澶辫触"); return; } this.companyOption = this.treeData(res.result); - this.queryForm.dirid = this.companyOption[0].id - this.queryForm.dirName = this.companyOption[0].name + this.queryForm.dirid = this.companyOption[0].id; + this.queryForm.dircode = this.companyOption[0].code; + this.queryForm.dirName = this.companyOption[0].name; this.getQueryVerList(); }, async getQueryVerList() { - const data = await meta_selectVerByDirid({ dirid: this.queryForm.dirid }) + const data = await meta_selectVerByDirid({ dirid: this.queryForm.dirid }); if (data.code != 200) { - this.$message.error('鐗堟湰鍒楄〃鑾峰彇澶辫触'); + this.$message.error("鐗堟湰鍒楄〃鑾峰彇澶辫触"); return; } this.verOptions = data.result; @@ -853,28 +814,27 @@ handleChange(data, node, nodeData) { this.listData.pageSize = 10; this.listData.pageIndex = 1; + this.queryForm.dircode = data.code; this.queryForm.dirid = data.id; - this.queryForm.dirName = data.name - this.getQueryVerList() + this.queryForm.dirName = data.name; + this.getQueryVerList(); }, handleChange1(data, node, nodeData) { this.listData.pageSize = 10; this.listData.pageIndex = 1; - this.queryForm.depid = data.id; - this.queryForm.depName = data.name + this.queryForm.depcode = data.code; + this.queryForm.depName = data.name; this.getMetaData(); }, handleChange2(data, node, nodeData) { - this.editForm.depid = data.id; - this.editForm.depName = data.name - + this.editForm.depcode = data.code; + this.editForm.depName = data.name; }, handleChange3(data, node, nodeData) { - this.editForm.dirid = data.id; - this.editForm.dirName = data.name - + this.editForm.dircode = data.code; + this.editForm.dirName = data.name; }, //鏍煎紡鍖栧垪琛� formatData(row, column) { @@ -892,9 +852,9 @@ }, setInfoBoxSize(res) { if (res >= 1024) { - return parseFloat(res / 1024).toFixed(3) + ' GB'; + return parseFloat(res / 1024).toFixed(3) + " GB"; } else { - return res + ' MB'; + return res + " MB"; } }, //鏍煎紡鍖栨椂闂� @@ -909,41 +869,40 @@ var s = time.getSeconds(); return ( y + - '-' + + "-" + this.add0(m) + - '-' + + "-" + this.add0(d) + - ' ' + + " " + h + - ':' + + ":" + mm + - ':' + + ":" + s ); }, //鏍煎紡鍖栨椂闂� add0(m) { - return m < 10 ? '0' + m : m; + return m < 10 ? "0" + m : m; }, //鍗曚綅杞崲 stateFormatSizes(row, column) { if (row.sizes >= 1024) { const val = parseFloat(row.sizes / 1024).toFixed(3); - return val + ' GB'; + return val + " GB"; } else { - return row.sizes + ' MB'; + return row.sizes + " MB"; } }, //鐩綍鏍戣幏鍙� async getSelectDictTab() { const res = await selectdirTab(); if (res.code != 200) { - this.$message.error('鍒楄〃璋冪敤澶辫触'); + this.$message.error("鍒楄〃璋冪敤澶辫触"); } this.optionCount = this.treeData(res.result); this.dirComPanyOption = this.treeData(res.result); - this.listData.dirid = this.optionCount[0].id; - + this.listData.depcode = this.optionCount[0].code; }, handleNodeClick(data) { this.listData.pageSize = 10; @@ -996,14 +955,13 @@ // }, // 璇锋眰鏁版嵁鍐呭 getMetaData() { - this.listData.depid = this.queryForm.depid; - this.listData.dirid = this.queryForm.dirid; + this.listData.depcode = this.queryForm.depcode; + this.listData.dircode = this.queryForm.dircode; this.listData.verid = this.queryForm.verid; // this.listData.dirid = 57 select_meta_ByPageAndCount(this.listData).then((res) => { - this.tableData = res.result; this.count = res.count; }); @@ -1023,6 +981,8 @@ this.listData.name = null; this.queryForm.dirid = this.companyOption[0].id; this.queryForm.depid = this.companyOption1[0].id; + this.queryForm.dircode = this.companyOption[0].code; + this.queryForm.depcode = this.companyOption1[0].code; this.queryForm.dirName = this.companyOption[0].name; this.queryForm.depName = this.companyOption1[0].name; this.getQueryVerList(); @@ -1030,7 +990,7 @@ }, //鏂板鎸夐挳 showAddDialog() { - this.behavior = '鏂板鐢ㄦ埛'; + this.behavior = "鏂板鐢ㄦ埛"; this.editForm = {}; this.dialogFormVisible = true; }, @@ -1041,7 +1001,6 @@ sendAdd(formName) { this.$refs[formName].validate((valid) => { if (valid) { - console.log(this.editForm); this.fullscreenLoading = true; insertMeta(this.editForm) .then((res) => { @@ -1052,8 +1011,8 @@ this.listData.pageIndex = 1; this.getMetaData(); this.$message({ - message: '娣诲姞鎴愬姛', - type: 'success', + message: "娣诲姞鎴愬姛", + type: "success", }); this.editForm = {}; this.dialogFormVisible = false; @@ -1061,11 +1020,11 @@ }, 500); }) .catch((res) => { - alert('淇敼澶辫触锛岃閲嶈瘯锛�'); + alert("淇敼澶辫触锛岃閲嶈瘯锛�"); this.fullscreenLoading = false; }); } else { - console.log('error submit!!'); + console.log("error submit!!"); return false; } }); @@ -1076,10 +1035,10 @@ }, // 鍒犻櫎澶氭潯 deleteMetaInfo() { - this.$confirm('纭畾鏄惁鍒犻櫎鎵�閫夊唴瀹�?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning', + this.$confirm("纭畾鏄惁鍒犻櫎鎵�閫夊唴瀹�?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", }) .then(() => { var std = []; @@ -1089,21 +1048,21 @@ deleteMeta({ ids: std.toString() }).then((res) => { if (res.code == 200) { this.$message({ - type: 'success', - message: '鍒犻櫎鎴愬姛!', + type: "success", + message: "鍒犻櫎鎴愬姛!", }); this.multipleSelection = []; this.listData.pageSize = 10; this.listData.pageIndex = 1; this.getMetaData(); } else { - this.$message.error('鍒犻櫎澶辫触'); + this.$message.error("鍒犻櫎澶辫触"); this.multipleSelection = []; } }); }) .catch(() => { - this.$message('宸插彇娑堝垹闄�'); + this.$message("宸插彇娑堝垹闄�"); }); }, @@ -1126,26 +1085,26 @@ delete row.updateUser; delete row.updateUser; this.initialForm = JSON.stringify(row); //澶囦唤 - this.behavior = '淇敼淇℃伅'; + this.behavior = "淇敼淇℃伅"; this.editForm = JSON.parse(JSON.stringify(row)); this.dialogFormVisible = true; this.getSelectDictTab(); }, handleClose(done) { - this.$confirm('纭鍏抽棴锛�') + this.$confirm("纭鍏抽棴锛�") .then((_) => { this.editForm = {}; done(); }) - .catch((_) => { }); + .catch((_) => {}); }, // 鎻愪氦淇敼 sendEdit() { - this.$confirm('鏄惁纭畾缂栬緫?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning', + this.$confirm("鏄惁纭畾缂栬緫?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", }) .then(() => { this.dialogFormVisible = false; @@ -1157,8 +1116,8 @@ this.listData.pageIndex = 1; this.getMetaData(); this.$message({ - message: '淇敼鎴愬姛', - type: 'success', + message: "淇敼鎴愬姛", + type: "success", }); this.editForm = {}; this.dialogFormVisible = false; @@ -1167,7 +1126,7 @@ }); }) .catch(() => { - alert('淇敼澶辫触锛岃閲嶈瘯锛�'); + alert("淇敼澶辫触锛岃閲嶈瘯锛�"); this.fullscreenLoading = false; }); }, @@ -1179,43 +1138,50 @@ async download() { var std = []; for (var i in this.multipleSelection) { - std.push(this.multipleSelection[i].id) + std.push(this.multipleSelection[i].id); } var obj = { pwd: encrypt.encrypt(this.codeForm.repassword), - ids: std + ids: std, }; - const res = await meta_downloadReq(JSON.stringify(obj)) + const res = await meta_downloadReq(JSON.stringify(obj)); if (res.code != 200) { - this.$message.error('涓嬭浇璇锋眰澶辫触'); - return + this.$message.error("涓嬭浇璇锋眰澶辫触"); + return; } var downObj = { guid: res.result, - pwd: encodeURIComponent(encrypt.encrypt(this.codeForm.repassword)) - } - const data = await meta_selectDownloadFile(downObj) + pwd: encodeURIComponent(encrypt.encrypt(this.codeForm.repassword)), + }; + const data = await meta_selectDownloadFile(downObj); if (data.code != 200) { - this.$message.error('涓嬭浇璇锋眰澶辫触'); - return + this.$message.error("涓嬭浇璇锋眰澶辫触"); + return; } - var token = getToken() - var url = BASE_URL + "/meta/downloadFile?token=" + token + "&guid=" + res.result + "&pwd=" + encodeURIComponent(encrypt.encrypt(this.codeForm.repassword)); + var token = getToken(); + var url = + BASE_URL + + "/meta/downloadFile?token=" + + token + + "&guid=" + + res.result + + "&pwd=" + + encodeURIComponent(encrypt.encrypt(this.codeForm.repassword)); $("#downFrame").attr("src", url).click(); this.closeDown(); }, closeDown() { this.showCodeBox = false; - this.codeForm.password = ''; - this.codeForm.repassword = ''; + this.codeForm.password = ""; + this.codeForm.repassword = ""; }, downFormData() { if (this.multipleSelection.length == 0) { - alert('璇峰厛閫夋嫨瑕佷笅杞界殑鏂囦欢'); + alert("璇峰厛閫夋嫨瑕佷笅杞界殑鏂囦欢"); return; } this.showCodeBox = true; @@ -1236,7 +1202,7 @@ 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灞炴�э紝骞惰祴鍊� return father.pid == 0; // 杩斿洖涓�绾ц彍鍗� }); }, @@ -1251,35 +1217,14 @@ padding: 1%; .inquire { - position: relative; - - padding-bottom: 8px; + padding: 8px; + margin-top: 20px; border-radius: 5px; - padding: 1%; + + margin-bottom: 20px; .el-form-item { margin: 5px; - } - } - .bottom { - width: 100%; - margin-top: 1%; - height: 74%; - display: flex; - justify-content: space-between; - - .rightTable { - width: 98%; - height: 92%; - - border-radius: 5px; - padding: 1%; - .table_box { - width: 100%; - height: 93%; - margin: 0 auto; - overflow: auto; - } } } diff --git a/src/views/datamanage/projectManage.vue b/src/views/datamanage/projectManage.vue index f493dd3..b5e56b6 100644 --- a/src/views/datamanage/projectManage.vue +++ b/src/views/datamanage/projectManage.vue @@ -1,9 +1,11 @@ <template> <div class="verSionBox"> - <My-bread :list="[ + <My-bread + :list="[ `${$t('dataManage.dataManage')}`, `${$t('dataManage.projectManage')}`, - ]"></My-bread> + ]" + ></My-bread> <el-divider /> <div class="verSionContent"> <div class="verSion_leftTree subpage_Div"> @@ -21,15 +23,10 @@ </div> <div class="verSion_rightContent subpage_Div"> <el-form - style=" height: 44px; - padding: 1%; - display: flex; - flex-direction: row-reverse; - border-radius: 5px; - border: 1px solid #dcdfe6;" :inline="true" class="demo-form-inline" > + <el-form-item> <el-button v-if="btnStatus.insert" @@ -38,16 +35,17 @@ :disabled="count1 != 0 ? true : false" type="success" size="small" - >{{ $t('common.append') }}</el-button> + >{{ $t("common.append") }}</el-button + > </el-form-item> </el-form> <!-- <el-divider class="eldivider" /> --> - <div style="height: 80%; margin-top: 10px;"> + <div class="table_box" style="height:calc(100% - 89px)"> <el-table ref="filterTable" :data="dbTableData" - height="100%" - border + height="calc(100% - 57px)" + style="width: 100%" > <el-table-column @@ -104,10 +102,7 @@ prop="remarks" :label="$t('dataManage.projectObj.remarks')" /> - <el-table-column - label="鎿嶄綔" - width="200" - > + <el-table-column label="鎿嶄綔" width="200"> <template slot-scope="scope"> <el-button v-if="btnStatus.delete" @@ -115,24 +110,20 @@ icon="el-icon-delete" size="small" type="danger" - >{{ $t('common.delete') }}</el-button> + >{{ $t("common.delete") }}</el-button + > <el-button v-if="btnStatus.update" @click="EditProject(scope.row)" icon="el-icon-edit" type="info" size="small" - >{{ $t('common.update') }}</el-button> + >{{ $t("common.update") }}</el-button + > </template> </el-table-column> </el-table> - <div - style="margin-top: 10px" - class="pagination_box" - > - - </div> - + <div style="margin-top: 10px" class="pagination_box"></div> </div> </div> </div> @@ -170,13 +161,10 @@ <el-input v-model="editFrom.projtype"></el-input> </el-form-item> <el-form-item :label="$t('dataManage.projectObj.location')"> - <el-input - :disabled="true" - v-model="editFrom.geom" - ></el-input> + <el-input :disabled="true" v-model="editFrom.geom"></el-input> <el-link @click="ShowInner" - style=" margin-left: 20px" + style="margin-left: 20px" icon="el-icon-plus" > </el-link> @@ -211,22 +199,16 @@ </el-form-item> </el-form> </div> - <div - slot="footer" - class="dialog-footer" - > + <div slot="footer" class="dialog-footer"> <el-button type="info" size="small" :disabled="behavior != '鏂板椤圭洰' ? true : false" @click="setRestEditFrom" - >{{ $t('common.reset') }}</el-button> - <el-button - size="small" - type="primary" - @click="insertEditFrom" - >{{ - $t('common.confirm') + >{{ $t("common.reset") }}</el-button + > + <el-button size="small" type="primary" @click="insertEditFrom">{{ + $t("common.confirm") }}</el-button> </div> </el-dialog> @@ -241,13 +223,13 @@ project_delete, project_update, project_selectLocation, -} from '../../api/api'; -import ProjectOl from '../../components/ProjectOl.vue'; -import MyBread from '../../components/MyBread.vue'; -import moment from 'moment'; +} from "../../api/api"; +import ProjectOl from "../../components/ProjectOl.vue"; +import MyBread from "../../components/MyBread.vue"; +import moment from "moment"; export default { - name: 'versionManage', + name: "versionManage", components: { MyBread, ProjectOl }, data() { return { @@ -257,13 +239,13 @@ showMap: false, count: null, projectFrom: {}, - editFrom: { geom: ' ' }, + editFrom: { geom: " " }, dirId: null, elProject: [], dirList: [], //el鏍戞暟鎹� defaultProps: { - children: 'children', - label: 'name', + children: "children", + label: "name", }, dbTableData: [], btnStatus: { @@ -301,13 +283,13 @@ this.showMap = true; }, outerClose(done) { - this.$confirm('纭鍏抽棴锛�') + this.$confirm("纭鍏抽棴锛�") .then((_) => { this.setRestEditFrom(); this.getSelectProject(); done(); }) - .catch((_) => { }); + .catch((_) => {}); }, async innerClose() { this.showMap = false; @@ -315,10 +297,12 @@ var wkt = this.$wkt.parse(this.$store.state.projeOl); - const data = await project_selectLocation({ x: wkt.coordinates[0], y: wkt.coordinates[1] }) - console.log(data.result) + const data = await project_selectLocation({ + x: wkt.coordinates[0], + y: wkt.coordinates[1], + }); + console.log(data.result); if (data.code == 200) { - for (var i in data.result) { var key = data.result[i].key; var val = data.result[i].value; @@ -334,18 +318,18 @@ this.editFrom.geom = this.$store.state.projeOl; }, async insertEditFrom() { - if (this.behavior == '鏂板椤圭洰') { + if (this.behavior == "鏂板椤圭洰") { this.editFrom.dirid = this.dirId; const data = await project_insert(this.editFrom); if (data.code != 200) { - this.$message.error('椤圭洰鏂板澶辫触'); + this.$message.error("椤圭洰鏂板澶辫触"); return; } this.outerVisible = false; } else { const data = await project_update(this.editFrom); if (data.code != 200) { - this.$message.error('椤圭洰淇敼澶辫触'); + this.$message.error("椤圭洰淇敼澶辫触"); return; } this.outerVisible = false; @@ -355,40 +339,42 @@ this.setRestEditFrom(); }, setRestEditFrom() { - this.editFrom = { geom: ' ' }; + this.editFrom = { geom: " " }; this.$store.state.projeOl = null; }, //鍒犻櫎椤圭洰 async deleteProject(row) { - this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ラ」鐩�, 鏄惁缁х画?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning' - }).then(async () => { - const data = await project_delete({ gid: row.gid }); - if (data.code == 200) { + this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ラ」鐩�, 鏄惁缁х画?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(async () => { + const data = await project_delete({ gid: row.gid }); + if (data.code == 200) { + this.$message({ + message: "鍒犻櫎鎴愬姛锛�", + type: "success", + }); + this.getRoleTabelData(); + } else { + this.$message({ + message: "鍒犻櫎澶辫触锛�", + type: "warning", + }); + } + }) + .catch(() => { this.$message({ - message: "鍒犻櫎鎴愬姛锛�", - type: "success", + type: "info", + message: "宸插彇娑堝垹闄�", }); - this.getRoleTabelData(); - } else { - this.$message({ - message: "鍒犻櫎澶辫触锛�", - type: "warning", - }); - } - }).catch(() => { - this.$message({ - type: 'info', - message: '宸插彇娑堝垹闄�' }); - }); }, //淇敼椤圭洰 EditProject(row) { - this.behavior = '淇敼椤圭洰'; + this.behavior = "淇敼椤圭洰"; this.outerVisible = true; this.editFrom = row; this.$store.state.projeOl = row.geom; @@ -396,16 +382,17 @@ //鏂板椤圭洰 insertProject() { if (this.dirId == null) { - this.$message.error('璇烽�夋嫨闇�瑕佹柊澧炵殑鐩綍'); + this.$message.error("璇烽�夋嫨闇�瑕佹柊澧炵殑鐩綍"); return; } - this.behavior = '鏂板椤圭洰'; + this.behavior = "鏂板椤圭洰"; this.outerVisible = true; }, //鐩綍鏍戠偣鍑讳簨浠� handleNodeClick(data) { //鑾峰彇鐩綍ID - this.dirId = data.id; + // this.dirId = data.id; + this.dirId = data.code this.getSelectProject(); }, @@ -414,7 +401,7 @@ this.listLoader.dirid = this.dirId; const data = await project_selectByDirid(this.listLoader); if (data.code != 200) { - this.$message.error('鍒楄〃鑾峰彇澶辫触'); + this.$message.error("鍒楄〃鑾峰彇澶辫触"); return; } @@ -431,7 +418,7 @@ async getSelectdirTab() { const res = await project_selectDirAll(); if (res.code != 200) { - this.$message.error('鐩綍鍒楄〃鑾峰彇澶辫触'); + this.$message.error("鐩綍鍒楄〃鑾峰彇澶辫触"); return; } this.dirList = this.treeData(res.result); @@ -443,7 +430,7 @@ 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灞炴�э紝骞惰祴鍊� return father.pid == 0; // 杩斿洖涓�绾ц彍鍗� }); }, @@ -458,26 +445,25 @@ width: 98%; padding: 1%; .verSionContent { - width: 100%; - height: 92%; + width: 100%; + height: calc(100% - 75px); display: flex; justify-content: space-between; .verSion_leftTree { - width: 15%; - height: 91%; - + width: calc(23% - 0px); + height: 100%; + padding: 10px; border-radius: 5px; - padding: 1%; - max-height: 670px; + box-sizing: border-box; overflow-y: auto; } .verSion_rightContent { - width: 80%; - height: 91%; - max-height: 670px; + width: 75%; + height: 100%; border-radius: 5px; - padding: 1%; - overflow-y: auto; + padding: 10px; + box-sizing: border-box; + border: 1px solid #dcdfe6; } .projectli { height: 46px; @@ -502,5 +488,16 @@ } } } +.demo-form-inline{ + padding: 8px; + // margin-top: 10px; + border-radius: 5px; + border: 1px solid #dcdfe6; + margin-bottom: 20px; + text-align: right; + .el-form-item { + margin: 5px; + } +} </style> - > + diff --git a/src/views/datamanage/styleManage.vue b/src/views/datamanage/styleManage.vue index b4c1f9a..2d9714a 100644 --- a/src/views/datamanage/styleManage.vue +++ b/src/views/datamanage/styleManage.vue @@ -5,13 +5,15 @@ `${$t('dataManage.styleManage')}`, ]"></My-bread> <el-divider /> - <div class="searchComp subpage_Div" style="padding: 1%;"> + <div class="searchComp subpage_Div" ref="container"> <el-form ref="ruleForm" :model="ruleForm" :inline="true" > - <el-form-item + <div class="flex_box"> + <div style="margin-right: auto"> + <el-form-item :label="$t('dataManage.vmobj.keyword')" prop="name" > @@ -21,7 +23,9 @@ style="width:200px" /> </el-form-item> - <el-form-item style="float: right;"> + </div> + <div> + <el-form-item> <el-button v-if="btnStatus.insert" @click="setInsertShow()" @@ -49,15 +53,18 @@ size="small" >{{ $t('common.empty') }}</el-button> </el-form-item> + </div> + </div> + + </el-form> </div> - <div class="bottom"> - <div class="rightTable subpage_Div"> - <div class="table_box"> + + <div class="table_box" :style="styleVar"> <el-table :data="tableData" style="width: 100%" - height="95%" + height="calc(100% - 57px)" @selection-change="handleSelectionChange" > <el-table-column @@ -141,8 +148,7 @@ </template> </el-table-column> </el-table> - </div> - <div + <div class="pagination_box" > <el-pagination @@ -156,8 +162,9 @@ > </el-pagination> </div> - </div> - </div> + </div> + + <div class="infoBox subpage_Div box_div" v-show="showinfoBox" @@ -915,7 +922,7 @@ updateStyle, upload_style, queryDepTree, - selectdirTab + selectdirTab, } from "../../api/api"; export default { name: "styleManage", @@ -927,9 +934,7 @@ insertFileName: "", insertViewName: "", - insertform: { - - }, + insertform: {}, dialogFormVisible: false, InsertFormdialog: false, showCata: false, @@ -973,9 +978,9 @@ editCompanyOption: [], editcatalogOption: [], cascader: { - label: 'name', - value: 'id', - children: 'children', + label: "name", + value: "id", + children: "children", checkStrictly: true, emitPath: false, }, @@ -983,17 +988,44 @@ children: "children", label: "name", }, - selectOptionWidth: '', - selectheight: 'auto', - defaultexpand: false + selectOptionWidth: "", + selectheight: "auto", + defaultexpand: false, + tableHeight: 0, + timer: 0, + styleVar: { + height: "calc(100% - 109px)", + }, }; }, created() { this.getRoleTabelData(); this.showPermsBtn(); - this.getQueryDepTree(); this.getSelectdirTab(); + this.getQueryDepTree(); + this.getSelectdirTab(); + }, + beforeDestroy() { + this.timer && clearTimeout(this.timer); + window.removeEventListener("resize", this.onResize); + }, + mounted() { + window.addEventListener("resize", this.onResize); + this.calHeight(); }, methods: { + onResize() { + this.timer && clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.calHeight(); + }, 500); + }, + calHeight() { + this.$nextTick(() => { + const rect = this.$refs.container.getBoundingClientRect(); + this.tableHeight = `${rect.height + 97}px`; + this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`; + }); + }, showPermsBtn() { let currentPerms = this.$store.state.currentPerms; let permsEntity = this.$store.state.permsEntity; @@ -1007,8 +1039,8 @@ document.getElementById("insertFile").value = ""; document.getElementById("insertimageFile").value = ""; - this.guidFile = ''; - this.fileGuid = ''; + this.guidFile = ""; + this.fileGuid = ""; }, getInsertFile(res) { if (res == 0) { @@ -1018,8 +1050,6 @@ } }, insertFileData: function (res) { - - if (res == 0) { let val = document.getElementById("insertFile").files; @@ -1154,30 +1184,32 @@ for (var i in this.multipleSelection) { std.push(this.multipleSelection[i].id); } - this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ牱寮�, 鏄惁缁х画?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning' - }).then(async () => { - const data = await deleteStyles({ ids: std.toString() }); - if (data.code == 200) { + this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ牱寮�, 鏄惁缁х画?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(async () => { + const data = await deleteStyles({ ids: std.toString() }); + if (data.code == 200) { + this.$message({ + message: "鍒犻櫎鎴愬姛锛�", + type: "success", + }); + this.getRoleTabelData(); + } else { + this.$message({ + message: "鍒犻櫎澶辫触锛�", + type: "warning", + }); + } + }) + .catch(() => { this.$message({ - message: "鍒犻櫎鎴愬姛锛�", - type: "success", + type: "info", + message: "宸插彇娑堝垹闄�", }); - this.getRoleTabelData(); - } else { - this.$message({ - message: "鍒犻櫎澶辫触锛�", - type: "warning", - }); - } - }).catch(() => { - this.$message({ - type: 'info', - message: '宸插彇娑堝垹闄�' }); - }); }, showDirTree(res) { this.dirFlag = res; @@ -1216,11 +1248,9 @@ }, insertFromDataClose() { this.InsertFormdialog = false; - this.insertform = { - - } + this.insertform = {}; this.insertFileGuid = ""; - this.insertViewGuid = "" + this.insertViewGuid = ""; this.filesReset(); }, handleClose() { @@ -1228,7 +1258,7 @@ this.insertform = { fileGuid: null, viewGuid: null, - } + }; this.filesReset(); }, async insertFromData() { @@ -1254,9 +1284,9 @@ this.insertform = { fileGuid: null, viewGuid: null, - } + }; this.insertFileGuid = ""; - this.insertViewGuid = "" + this.insertViewGuid = ""; this.filesReset(); this.$message({ message: "娣诲姞鎴愬姛锛�", @@ -1276,7 +1306,7 @@ } this.listData.name = this.ruleForm.name; const data = await select_Style_ByPageAndCount(this.listData); - + if (data.code != 200) { this.$message.error("鍒楄〃璋冪敤澶辫触"); } @@ -1323,7 +1353,7 @@ if (!val || !val.length) return; var formData = new FormData(); formData.append("file0", val[0]); - var res = $.ajax(+ "/style/upload", { + var res = $.ajax(+"/style/upload", { type: "post", data: formData, async: false, @@ -1501,7 +1531,6 @@ }, handleEdit(index, row) { - this.upflag = true; this.dialogFormVisible = true; this.upform = row; @@ -1525,7 +1554,7 @@ }); this.startFromData(); }) - .catch(() => { }); + .catch(() => {}); }, // 鑾峰彇澶氶�� @@ -1539,16 +1568,15 @@ catalogChange(res) { this.insertform.dirid = res; this.upform.dirid = res; - }, handcatalogChange(data, node, nodeData) { - this.$set(this.insertform, 'dirid', data.id) - this.$set(this.insertform, 'dirName', data.name) + this.$set(this.insertform, "dirid", data.id); + this.$set(this.insertform, "dirName", data.name); // this.insertform.dirid = data.id; // this.insertform.dirName = data.name }, handleNodeClickto(data, node, nodeData) { - this.insertform.depid = data.id + this.insertform.depid = data.id; this.upform.dirid = data.id; this.upform.dirName = data.name; }, @@ -1558,24 +1586,23 @@ }, companyChange(res) { this.insertform.depid = res; - }, handcompanyChange(data, node, nodeData) { - this.$set(this.insertform, 'depid', data.id) + this.$set(this.insertform, "depid", data.id); // this.insertform.depid = data.id; - this.$set(this.insertform, 'depName', data.name) + this.$set(this.insertform, "depName", data.name); // this.insertform.depName = data.name; }, //鏂板鏁版嵁 setInsertShow() { this.InsertFormdialog = true; - this.$set(this, 'insertform', {}) + this.$set(this, "insertform", {}); }, //鐩綍鍒楄〃鑾峰彇 async getSelectdirTab() { const res = await selectdirTab(); if (res.code != 200) { - this.$message.error('鐩綍鍒楄〃鑾峰彇澶辫触'); + this.$message.error("鐩綍鍒楄〃鑾峰彇澶辫触"); return; } this.insertform.dirid = 1; @@ -1587,7 +1614,7 @@ async getQueryDepTree() { const res = await queryDepTree(); if (res.code != 200) { - this.$message.error('鍗曚綅鍒楄〃鑾峰彇澶辫触'); + this.$message.error("鍗曚綅鍒楄〃鑾峰彇澶辫触"); return; } this.insertform.depid = 1; @@ -1596,7 +1623,7 @@ this.editCompanyOption = this.treeData(res.result); }, handleNodeClick(data, node, nodeData) { - this.upform.depid = data.id + this.upform.depid = data.id; this.upform.depName = data.name; }, //鏍戝垪琛ㄧ敓鎴� @@ -1605,16 +1632,16 @@ 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灞炴�э紝骞惰祴鍊� return father.pid == 0; // 杩斿洖涓�绾ц彍鍗� }); }, setOptionWidth(event) { // 涓嬫媺妗嗚仛鐒︼紝璁剧疆寮规鐨勫搴� this.$nextTick(() => { - this.selectOptionWidth = event.srcElement.offsetWidth + 'px'; + this.selectOptionWidth = event.srcElement.offsetWidth + "px"; }); - } + }, }, }; </script> @@ -1630,16 +1657,18 @@ } .searchComp { - margin: 10px auto; + padding: 8px; + margin-top: 20px; border-radius: 5px; + margin-bottom: 20px; .el-form-item { margin: 5px; } - .el-input { - width: 467px; - } + // .el-input { + // width: 467px; + // } } .leftTree { position: absolute; @@ -1659,27 +1688,7 @@ margin: 10px auto 0; } } - .bottom { - width: 100%; - margin-top: 1%; - height: 74%; - display: flex; - justify-content: space-between; - .rightTable { - width: 98%; - height: 92%; - - border-radius: 5px; - padding: 1%; - .table_box { - width: 100%; - height: 93%; - margin: 0 auto; - overflow: auto; - } - } - } .BoxFlex { display: flex; justify-content: space-around; diff --git a/src/views/datamanage/versionManage.vue b/src/views/datamanage/versionManage.vue index 1e63074..e62c085 100644 --- a/src/views/datamanage/versionManage.vue +++ b/src/views/datamanage/versionManage.vue @@ -1,38 +1,38 @@ <template> <div class="verSionBox"> - <My-bread :list="[ + <My-bread + :list="[ `${$t('dataManage.dataManage')}`, `${$t('dataManage.versionManage')}`, - ]"></My-bread> + ]" + ></My-bread> <el-divider /> - <div class="inquire subpage_Div"> - <el-form - ref="ruleForm" - :model="ruleForm" - :inline="true" - > - <el-form-item> - <el-select - :popper-append-to-body="false" - v-model="ruleForm.dirid" - placeholder="璇烽�夋嫨" - style="width:200px" - > - <el-option - :value="ruleForm.dirid" - :label="ruleForm.depName" - style=" height:auto" - > - <el-tree - ref="tree" - :data="companyOption" - node-key="id" - :props="props" - @node-click="handleChange" - /> - </el-option> - </el-select> - <!-- <el-cascader + <div class="inquire subpage_Div" ref="container"> + <el-form ref="ruleForm" :model="ruleForm" :inline="true"> + <div class="flex_box"> + <div style="margin-right: auto"> + <el-form-item> + <el-select + :popper-append-to-body="false" + v-model="ruleForm.dirid" + placeholder="璇烽�夋嫨" + style="width: 200px" + > + <el-option + :value="ruleForm.dirid" + :label="ruleForm.depName" + style="height: auto" + > + <el-tree + ref="tree" + :data="companyOption" + node-key="id" + :props="props" + @node-click="handleChange" + /> + </el-option> + </el-select> + <!-- <el-cascader v-model="ruleForm.dirid" :show-all-levels="false" :options="companyOption" @@ -45,132 +45,130 @@ emitPath: false, }" ></el-cascader> --> - </el-form-item> - <el-form-item> - <el-input - v-model="ruleForm.name" - :placeholder="$t('common.pleaseInput')" - /> - </el-form-item> - <el-form-item style="float: right;"> - <el-button - type="success" - v-if="btnStatus.insert" - @click="(InsertFormdialog = true), getSelectdirTab()" - icon="el-icon-plus" - size="small" - >{{ $t('common.append') }}</el-button> - <el-button - @click="onSubmit('ruleForm')" - icon="el-icon-search" - size="small" - class="primary" - >{{ $t('common.iquery') }}</el-button> - <el-button - type="info" - @click="resetForm('ruleForm')" - icon="el-icon-delete" - size="small" - >{{ $t('common.empty') }}</el-button> - </el-form-item> - </el-form> - </div> - <div class="bottom"> - <div class="rightTable subpage_Div"> - <div class="table_box"> - <el-table - :data="tableData" - style="width: 100%" - height="95%" - > - <el-table-column - align="center" - type="index" - :label="$t('dataManage.vmobj.index')" - width="70px" - /> - <el-table-column - align="center" - prop="id" - v-if="false" - /> - <el-table-column - align="center" - prop="name" - :label="$t('common.versionName')" - /> - <el-table-column - align="center" - prop="depName" - :label="$t('dataManage.vmobj.catalogue')" - /> - <el-table-column - align="center" - prop="descr" - :label="$t('dataManage.vmobj.describe')" - /> - <el-table-column - align="center" - prop="createName" - :label="$t('dataManage.vmobj.createonuser')" - /> - <el-table-column - align="center" - prop="createTime" - :label="$t('dataManage.vmobj.createontime')" - :formatter="formatTime" - /> - <el-table-column - align="center" - prop="UpdateUser" - :label="$t('dataManage.vmobj.updateonuser')" - /> - <el-table-column - align="center" - prop="updateTime" - :label="$t('dataManage.vmobj.updateontime')" - :formatter="formatTime" - /> - <el-table-column - min-width="150" - :label="$t('common.operate')" - > - <template slot-scope="scope"> - <el-button - v-if="btnStatus.update" - @click=" - handleEdit(scope.$index, scope.row); - getSelectdirTab(); - " - type="warning" - size="small" - >{{ $t('common.update') }}</el-button> - <el-button - v-if="btnStatus.delete" - @click="handleDelete(scope.$index, scope.row)" - type="danger" - size="small" - >{{ $t('common.delete') }}</el-button> - </template> - </el-table-column> - </el-table> - </div> - <div - class="pagination_box" - > - <el-pagination - @size-change="handleSizeChange" - @current-change="handleCurrentChange" - :current-page="listData.pageIndex" - :page-sizes="[10, 20, 50, 100]" - :page-size="listData.pageSize" - layout="total, sizes, prev, pager, next, jumper" - :total="count" - > - </el-pagination> + </el-form-item> + <el-form-item> + <el-input + v-model="ruleForm.name" + :placeholder="$t('common.pleaseInput')" + /> + </el-form-item> </div> + <div> + <el-form-item> + <el-button + type="success" + v-if="btnStatus.insert" + @click="(InsertFormdialog = true), getSelectdirTab()" + icon="el-icon-plus" + size="small" + >{{ $t("common.append") }}</el-button + > + <el-button + @click="onSubmit('ruleForm')" + icon="el-icon-search" + size="small" + class="primary" + >{{ $t("common.iquery") }}</el-button + > + <el-button + type="info" + @click="resetForm('ruleForm')" + icon="el-icon-delete" + size="small" + >{{ $t("common.empty") }}</el-button + > + </el-form-item> + </div> + </div> + </el-form> + </div> + + <div class="table_box" :style="styleVar"> + <el-table + :data="tableData" + style="width: 100%" + height="calc(100% - 57px)" + > + <el-table-column + align="center" + type="index" + :label="$t('dataManage.vmobj.index')" + width="70px" + /> + <el-table-column align="center" prop="id" v-if="false" /> + <el-table-column + align="center" + prop="name" + :label="$t('common.versionName')" + /> + <el-table-column + align="center" + prop="depName" + :label="$t('dataManage.vmobj.catalogue')" + /> + <el-table-column + align="center" + prop="descr" + :label="$t('dataManage.vmobj.describe')" + /> + <el-table-column + align="center" + prop="createName" + :label="$t('dataManage.vmobj.createonuser')" + /> + <el-table-column + align="center" + prop="createTime" + :label="$t('dataManage.vmobj.createontime')" + :formatter="formatTime" + /> + <el-table-column + align="center" + prop="UpdateUser" + :label="$t('dataManage.vmobj.updateonuser')" + /> + <el-table-column + align="center" + prop="updateTime" + :label="$t('dataManage.vmobj.updateontime')" + :formatter="formatTime" + /> + <el-table-column min-width="150" :label="$t('common.operate')"> + <template slot-scope="scope"> + <el-button + v-if="btnStatus.update" + @click=" + handleEdit(scope.$index, scope.row); + getSelectdirTab(); + " + type="warning" + size="small" + >{{ $t("common.update") }}</el-button + > + <el-button + v-if="btnStatus.delete" + @click="handleDelete(scope.$index, scope.row)" + type="danger" + size="small" + >{{ $t("common.delete") }}</el-button + > + </template> + </el-table-column> + </el-table> + <div class="pagination_box"> + <el-pagination + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + :current-page="listData.pageIndex" + :page-sizes="[10, 20, 50, 100]" + :page-size="listData.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="count" + > + </el-pagination> </div> - </div> + </div> + <el-dialog :title="$t('dataManage.vmobj.editVersion')" :visible.sync="dialogFormVisible" @@ -191,16 +189,16 @@ :label="$t('dataManage.vmobj.catalogue')" :label-width="formLabelWidth" > - <el-select + <el-select :popper-append-to-body="false" v-model="upform.dirid" placeholder="璇烽�夋嫨" - style="width:300px" + style="width: 300px" > <el-option :value="upform.dirid" :label="upform.depName" - style=" height:auto" + style="height: auto" > <el-tree ref="tree" @@ -230,23 +228,12 @@ ></el-input> </el-form-item> </el-form> - <div - slot="footer" - type="info" - class="dialog-footer" - > - <el-button - size="small" - @click="editFromDataClose" - >{{ - $t('common.close') + <div slot="footer" type="info" class="dialog-footer"> + <el-button size="small" @click="editFromDataClose">{{ + $t("common.close") }}</el-button> - <el-button - size="small" - @click="editFromData" - class="primary" - >{{ - $t('common.confirm') + <el-button size="small" @click="editFromData" class="primary">{{ + $t("common.confirm") }}</el-button> </div> </el-dialog> @@ -271,16 +258,16 @@ :label="$t('dataManage.vmobj.catalogue')" :label-width="formLabelWidth" > - <el-select + <el-select :popper-append-to-body="false" v-model="insertform.path" placeholder="璇烽�夋嫨" - style="width:300px" + style="width: 300px" > <el-option :value="insertform.path" :label="insertform.dirName" - style=" height:auto" + style="height: auto" > <el-tree ref="tree" @@ -311,23 +298,12 @@ ></el-input> </el-form-item> </el-form> - <div - slot="footer" - class="dialog-footer" - > - <el-button - @click="insertFromDataClose" - type="info" - size="small" - >{{ - $t('common.close') + <div slot="footer" class="dialog-footer"> + <el-button @click="insertFromDataClose" type="info" size="small">{{ + $t("common.close") }}</el-button> - <el-button - @click="insertFromData" - class="primary" - size="small" - >{{ - $t('common.confirm') + <el-button @click="insertFromData" class="primary" size="small">{{ + $t("common.confirm") }}</el-button> </div> </el-dialog> @@ -423,27 +399,27 @@ deleteVersion, updateVersion, selectdirTab, -} from '../../api/api'; -import verDirTree from './verDirTree.vue'; -import MyBread from '../../components/MyBread.vue'; -import verDirTrees from './verDirTrees.vue'; -import moment from 'moment'; +} from "../../api/api"; +import verDirTree from "./verDirTree.vue"; +import MyBread from "../../components/MyBread.vue"; +import verDirTrees from "./verDirTrees.vue"; +import moment from "moment"; export default { - name: 'versionManage', + name: "versionManage", components: { MyBread, verDirTree, verDirTrees }, data() { return { props: { - label: 'name', - value: 'id', - children: 'children', + label: "name", + value: "id", + children: "children", checkStrictly: true, emitPath: false, }, catalogOption: [], editcatalogOption: [], showCata: false, - formLabelWidth: '100px', + formLabelWidth: "100px", dialogFormVisible: false, InsertFormdialog: false, showinfoBox: false, @@ -462,9 +438,9 @@ pageSize: 10, }, cascader: { - label: 'name', - value: 'id', - children: 'children', + label: "name", + value: "id", + children: "children", checkStrictly: true, emitPath: false, }, @@ -476,35 +452,61 @@ insert: false, update: false, }, + + tableHeight: 0, + timer: 0, + styleVar: { + height: "calc(100% - 109px)", + }, }; }, created() { this.getQueryDirTree(); this.getRoleTabelData(); this.showPermsBtn(); - this.$set(this.ruleForm, 'depName', '璇烽�夋嫨') + this.$set(this.ruleForm, "depName", "璇烽�夋嫨"); }, computed: { pathId() { return this.$store.state.cataNode.id; }, }, - + beforeDestroy() { + this.timer && clearTimeout(this.timer); + window.removeEventListener("resize", this.onResize); + }, + mounted() { + window.addEventListener("resize", this.onResize); + this.calHeight(); + }, methods: { + onResize() { + this.timer && clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.calHeight(); + }, 500); + }, + calHeight() { + this.$nextTick(() => { + const rect = this.$refs.container.getBoundingClientRect(); + this.tableHeight = `${rect.height + 97}px`; + this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`; + }); + }, //鐩綍鍒囨崲 catalogChange(value) { this.insertform.dirid = value; }, - catalogChangeAdd (data, node, nodeData) { - this.$set(this.insertform, 'path', data.id) - this.$set(this.insertform, 'dirName', data.name) + catalogChangeAdd(data, node, nodeData) { + this.$set(this.insertform, "path", data.id); + this.$set(this.insertform, "dirName", data.name); }, upCatalogChange(val) { this.upform.dirid == val; }, handlupCatalogChange(data, node, nodeData) { - this.$set(this.upform, 'dirid', data.id) - this.$set(this.upform, 'depName', data.name) + this.$set(this.upform, "dirid", data.id); + this.$set(this.upform, "depName", data.name); // this.upform.dirid == data.id; // this.upform.depName = data.name; }, @@ -512,16 +514,15 @@ async getQueryDirTree() { const res = await selectdirTab(); if (res.code != 200) { - this.$message.error('鐩綍鍒楄〃鑾峰彇澶辫触'); + this.$message.error("鐩綍鍒楄〃鑾峰彇澶辫触"); return; } this.companyOption = this.treeData(res.result); - this.ruleForm.dirid = this.companyOption[0].id - + this.ruleForm.dirid = this.companyOption[0].id; }, - handleChange (data, node, nodeData) { - this.$set(this.ruleForm, 'dirid', data.id) - this.$set(this.ruleForm, 'depName', data.name) + handleChange(data, node, nodeData) { + this.$set(this.ruleForm, "dirid", data.id); + this.$set(this.ruleForm, "depName", data.name); // this.ruleForm.dirid = data.id; // this.ruleForm.depName = data.name; this.onSubmit(); @@ -535,7 +536,7 @@ async getSelectdirTab() { const res = await selectdirTab(); if (res.code != 200) { - this.$message.error('鐩綍鍒楄〃鑾峰彇澶辫触'); + this.$message.error("鐩綍鍒楄〃鑾峰彇澶辫触"); return; } this.insertform.name = this.getYMD(); @@ -550,9 +551,9 @@ let myYear = myDate.getFullYear(); //鑾峰彇瀹屾暣鐨勫勾浠�(4浣�,1970-????) let myMonth = myDate.getMonth() + 1; //鑾峰彇褰撳墠鏈堜唤(0-11,0浠h〃1鏈�) let myToday = myDate.getDate(); //鑾峰彇褰撳墠鏃�(1-31) - myMonth = myMonth > 9 ? myMonth : '0' + myMonth; - myToday = myToday > 9 ? myToday : '0' + myToday; - let nowDate = 'V' + myYear + myMonth + myToday; + myMonth = myMonth > 9 ? myMonth : "0" + myMonth; + myToday = myToday > 9 ? myToday : "0" + myToday; + let nowDate = "V" + myYear + myMonth + myToday; return nowDate; }, @@ -562,7 +563,7 @@ 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灞炴�э紝骞惰祴鍊� return father.pid == 0; // 杩斿洖涓�绾ц彍鍗� }); }, @@ -575,9 +576,9 @@ }, resetForm() { this.ruleForm = {}; - this.ruleForm.dirid = this.companyOption[0].id + this.ruleForm.dirid = this.companyOption[0].id; this.$store.state.verCateNode = {}; - this.$bus.$emit('clearTressLabel', true); + this.$bus.$emit("clearTressLabel", true); this.getRoleTabelData(); }, onSubmit() { @@ -586,7 +587,7 @@ this.getRoleTabelData(); }, async getRoleTabelData() { - if (this.listData.tab == '') { + if (this.listData.tab == "") { delete this.listData.tab; } @@ -596,7 +597,7 @@ const data = await select_Ver_ByPageAndCount(this.listData); if (data.code != 200) { - this.$message.error('鍒楄〃璋冪敤澶辫触'); + this.$message.error("鍒楄〃璋冪敤澶辫触"); } this.tableData = data.result; this.count = data.count; @@ -630,8 +631,8 @@ async editFromData() { if (this.upform.depName == null) { this.$message({ - message: '璇烽�夋嫨瑙掕壊鎵�灞炲崟浣�', - type: 'warning', + message: "璇烽�夋嫨瑙掕壊鎵�灞炲崟浣�", + type: "warning", }); return; } @@ -640,14 +641,14 @@ this.dialogFormVisible = false; this.upform = {}; this.$message({ - message: '淇敼鎴愬姛锛�', - type: 'success', + message: "淇敼鎴愬姛锛�", + type: "success", }); this.getRoleTabelData(); } else { this.$message({ - message: '淇敼澶辫触锛�', - type: 'warning', + message: "淇敼澶辫触锛�", + type: "warning", }); } }, @@ -658,8 +659,8 @@ async insertFromData() { if (this.insertform.dirid == null) { this.$message({ - message: '璇烽�夋嫨瑙掕壊鎵�灞炲崟浣�', - type: 'warning', + message: "璇烽�夋嫨瑙掕壊鎵�灞炲崟浣�", + type: "warning", }); return; } @@ -668,49 +669,51 @@ this.InsertFormdialog = false; this.insertform = {}; this.$message({ - message: '娣诲姞鎴愬姛锛�', - type: 'success', + message: "娣诲姞鎴愬姛锛�", + type: "success", }); this.getRoleTabelData(); } else { this.$message({ - message: '娣诲姞澶辫触锛�', - type: 'warning', + message: "娣诲姞澶辫触锛�", + type: "warning", }); } }, formatTime(row, column) { let date = row[column.property]; if (date === undefined || date === null) { - return ''; + return ""; } - return moment(parseInt(date)).format('YYYY-MM-DD HH:mm:ss'); + return moment(parseInt(date)).format("YYYY-MM-DD HH:mm:ss"); }, handleDelete(index, row) { - this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ョ増鏈俊鎭�, 鏄惁缁х画?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning' - }).then(async () => { + this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ョ増鏈俊鎭�, 鏄惁缁х画?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(async () => { const data = await deleteVersion(row.id); if (data.code == 200) { this.InsertFormdialog = false; this.$message({ - message: '鍒犻櫎鎴愬姛锛�', - type: 'success', + message: "鍒犻櫎鎴愬姛锛�", + type: "success", }); this.getRoleTabelData(); } else { this.$message({ - message: '鍒犻櫎澶辫触锛�', - type: 'warning', + message: "鍒犻櫎澶辫触锛�", + type: "warning", }); } - }).catch(() => { + }) + .catch(() => { this.$message({ - type: 'info', - message: '宸插彇娑堝垹闄�' - }); + type: "info", + message: "宸插彇娑堝垹闄�", + }); }); }, handleEdit(index, row) { @@ -721,7 +724,7 @@ watch: { pathId: { immediate: true, - handler(val) { }, + handler(val) {}, }, }, }; @@ -748,35 +751,35 @@ } } .inquire { - position: relative; + padding: 8px; + margin-top: 20px; - padding-bottom: 8px; + border-radius: 5px; + + margin-bottom: 20px; + .el-form-item { + margin: 5px; + } +} +.bottom { + width: 100%; + margin-top: 1%; + height: 74%; + display: flex; + justify-content: space-between; + + .rightTable { + width: 98%; + height: 92%; border-radius: 5px; padding: 1%; - .el-form-item { - margin: 5px; + .table_box { + width: 100%; + height: 93%; + margin: 0 auto; + overflow: auto; } } - .bottom { - width: 100%; - margin-top: 1%; - height: 74%; - display: flex; - justify-content: space-between; - - .rightTable { - width: 98%; - height: 92%; - - border-radius: 5px; - padding: 1%; - .table_box { - width: 100%; - height: 93%; - margin: 0 auto; - overflow: auto; - } - } - } +} </style> diff --git a/src/views/exportMap/index.vue b/src/views/exportMap/index.vue index a66e89a..885e890 100644 --- a/src/views/exportMap/index.vue +++ b/src/views/exportMap/index.vue @@ -534,7 +534,7 @@ var token = "?token=" + getToken() var a = document.createElement("a") // 鍒涘缓涓�涓猘鏍囩鍏冪礌 a.style.display = "none" // 璁剧疆鍏冪礌涓嶅彲瑙� - a.href = BASE_URL + "/mark/downloadFile" + token + "&guid=" + guid + a.href = BASE_URL + "/export/downloadFile" + token + "&guid=" + guid document.body.appendChild(a) // 鍔犲叆 a.click() // 瑙﹀彂鐐瑰嚮,涓嬭浇 diff --git a/src/views/maintenance/downlog.vue b/src/views/maintenance/downlog.vue index d46f532..3a3743b 100644 --- a/src/views/maintenance/downlog.vue +++ b/src/views/maintenance/downlog.vue @@ -1,14 +1,19 @@ <template> <div class="logLog_box"> - <My-bread - :list="[ + <My-bread :list="[ `${$t('operatManage.operatManage')}`, `${$t('operatManage.DownloadLog')}`, - ]" - ></My-bread> + ]"></My-bread> <el-divider /> - <div class="inquire subpage_Div" ref="container"> - <el-form :inline="true" ref="sizeForm" :model="sizeForm"> + <div + class="inquire subpage_Div" + ref="container" + > + <el-form + :inline="true" + ref="sizeForm" + :model="sizeForm" + > <div class="flex_box"> <div style="margin-right: auto"> <el-form-item @@ -31,10 +36,30 @@ v-model="sizeForm.type" :placeholder="$t('operatManage.operationLogObj.pleaseSelect')" > - <el-option :label="$t('downlog.type1')" value="1" /> - <el-option :label="$t('downlog.type2')" value="2" /> - <el-option :label="$t('downlog.type3')" value="3" /> - <el-option :label="$t('downlog.type4')" value="4" /> + <el-option + :label="$t('downlog.type1')" + value="1" + /> + <el-option + :label="$t('downlog.type2')" + value="2" + /> + <el-option + :label="$t('downlog.type3')" + value="3" + /> + <el-option + :label="$t('downlog.type4')" + value="4" + /> + <el-option + :label="$t('downlog.type5')" + value="5" + /> + <el-option + :label="$t('downlog.type6')" + value="6" + /> </el-select> </el-form-item> <el-form-item @@ -73,21 +98,22 @@ icon="el-icon-search" size="small" type="primary" - >{{ $t("operatManage.operationLogObj.inquire") }}</el-button - > + >{{ $t("operatManage.operationLogObj.inquire") }}</el-button> <el-button @click="resAllTable" icon="el-icon-delete" type="info" size="small" - >{{ $t("operatManage.operationLogObj.empty") }}</el-button - > + >{{ $t("operatManage.operationLogObj.empty") }}</el-button> </el-form-item> </div> </div> </el-form> </div> - <div class="table_box subpage_Div" :style="styleVar"> + <div + class="table_box subpage_Div" + :style="styleVar" + > <el-table :data="tableData" style="width: 100%" @@ -134,7 +160,10 @@ :formatter="formatData" /> </el-table> - <div style="margin-top: 25px" class="pagination_box"> + <div + style="margin-top: 25px" + class="pagination_box" + > <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" @@ -225,11 +254,17 @@ return "涓撻鍥�"; break; case 3: - return "鍏冩暟鎹�"; + return "婧愭暟鎹�"; break; case 4: return "涓氬姟鏁版嵁"; break; + case 5: + return "绠¢亾鍒嗘瀽"; + break; + case 6: + return "缁熻鎶ュ憡"; + break; default: return "鏈煡鏁版嵁"; break; diff --git a/src/views/maintenance/userManagement.vue b/src/views/maintenance/userManagement.vue index 1338a82..066530d 100644 --- a/src/views/maintenance/userManagement.vue +++ b/src/views/maintenance/userManagement.vue @@ -1,22 +1,30 @@ <template> <div class="userInfo_box"> - <My-bread - :list="[ + <My-bread :list="[ `${$t('operatManage.operatManage')}`, `${$t('userManage.userManage')}`, - ]" - ></My-bread> + ]"></My-bread> <el-divider /> - <div class="inquire subpage_Div" ref="container"> - <el-form ref="queryForm" :model="queryForm" :inline="true"> + <div + class="inquire subpage_Div" + ref="container" + > + <el-form + ref="queryForm" + :model="queryForm" + :inline="true" + > <div class="flex_box"> <div style="margin-right: auto"> <el-form-item prop="uname" :label="$t('userManage.userInfoObj.uname')" > - <el-input v-model="queryForm.uname" style="width: 200px" /> + <el-input + v-model="queryForm.uname" + style="width: 200px" + /> </el-form-item> <el-form-item prop="depid" @@ -47,6 +55,16 @@ <div> <el-form-item> <el-button + type="primary" + size="small" + @click="queryInfo('queryForm')" + icon="el-icon-search" + > + {{ $t("operatManage.ELM.search") }} + </el-button> + </el-form-item> + <el-form-item> + <el-button type="info" size="small" @click="resetInfo('queryForm')" @@ -62,7 +80,7 @@ @click="editPwd" type="warning" icon="el-icon-unlock" - >{{ $t("common.changepassWord") }} + >{{ $t("common.changepassWord") }} </el-button> </el-form-item> <el-form-item> @@ -91,15 +109,22 @@ </div> </el-form> </div> - <div class="table_box" :style="styleVar"> + <div + class="table_box" + :style="styleVar" + > <el-table ref="filterTable" :data="tableData" style="width: 100%" class="table_height" height="calc(100% - 57px)" + @selection-change="handleSelectionChange" > - <el-table-column type="selection" width="55" /> + <el-table-column + type="selection" + width="55" + /> <el-table-column align="center" type="index" @@ -180,11 +205,23 @@ :label="$t('userManage.userInfoObj.status')" > <template slot-scope="scope"> - <el-tag v-if="scope.row.status == 0" type="success">姝e父</el-tag> - <el-tag v-if="scope.row.status == 1" type="info">绂佺敤</el-tag> - <el-tag v-if="scope.row.status == 2" type="warning">鍒犻櫎</el-tag> + <el-tag + v-if="scope.row.status == 0" + type="success" + >姝e父</el-tag> + <el-tag + v-if="scope.row.status == 1" + type="info" + >绂佺敤</el-tag> + <el-tag + v-if="scope.row.status == 2" + type="warning" + >鍒犻櫎</el-tag> <el-tag v-if="scope.row.status == 3">鐢宠</el-tag> - <el-tag v-if="scope.row.status == 4" type="danger">鎷掓壒</el-tag> + <el-tag + v-if="scope.row.status == 4" + type="danger" + >鎷掓壒</el-tag> </template> </el-table-column> <!-- <el-table-column @@ -204,12 +241,14 @@ plain @click="editInfo(scope.row)" size="small" - >{{ $t("common.update") }}</el-button - > + >{{ $t("common.update") }}</el-button> </template> </el-table-column> </el-table> - <div style="margin-top: 25px" class="pagination_box"> + <div + style="margin-top: 25px" + class="pagination_box" + > <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" @@ -247,8 +286,14 @@ v-if="behavior == '鏂板鐢ㄦ埛'" :label-width="formLabelWidth" > - <el-input v-model="editForm.uid" autocomplete="off"></el-input> - <div class="isNewUser" v-if="isNewUser"> + <el-input + v-model="editForm.uid" + autocomplete="off" + ></el-input> + <div + class="isNewUser" + v-if="isNewUser" + > <img src="../../assets/img/success.png" /> {{ $t("userManage.userInfoObj.uid") }} </div> @@ -308,7 +353,10 @@ :label="$t('userManage.userInfoObj.username')" :label-width="formLabelWidth" > - <el-input v-model="editForm.uname" autocomplete="off"></el-input> + <el-input + v-model="editForm.uname" + autocomplete="off" + ></el-input> </el-form-item> <el-form-item prop="sex" @@ -335,7 +383,10 @@ :label="$t('userManage.userInfoObj.nativePlace')" :label-width="formLabelWidth" > - <el-input v-model="editForm.natives" autocomplete="off"></el-input> + <el-input + v-model="editForm.natives" + autocomplete="off" + ></el-input> </el-form-item> <el-form-item prop="depid" @@ -386,7 +437,10 @@ :label="$t('userManage.userInfoObj.identityCard')" :label-width="formLabelWidth" > - <el-input v-model="editForm.idcard" autocomplete="off"></el-input> + <el-input + v-model="editForm.idcard" + autocomplete="off" + ></el-input> </el-form-item> </div> <div style="width: 45%"> @@ -395,35 +449,50 @@ :label="$t('userManage.userInfoObj.job')" :label-width="formLabelWidth" > - <el-input v-model="editForm.job" autocomplete="off"></el-input> + <el-input + v-model="editForm.job" + autocomplete="off" + ></el-input> </el-form-item> <el-form-item prop="edu" :label="$t('userManage.userInfoObj.edu')" :label-width="formLabelWidth" > - <el-input v-model="editForm.edu" autocomplete="off"></el-input> + <el-input + v-model="editForm.edu" + autocomplete="off" + ></el-input> </el-form-item> <el-form-item prop="addr" :label="$t('userManage.userInfoObj.addr')" :label-width="formLabelWidth" > - <el-input v-model="editForm.addr" autocomplete="off"></el-input> + <el-input + v-model="editForm.addr" + autocomplete="off" + ></el-input> </el-form-item> <el-form-item prop="email" :label="$t('userManage.userInfoObj.email')" :label-width="formLabelWidth" > - <el-input v-model="editForm.email" autocomplete="off"></el-input> + <el-input + v-model="editForm.email" + autocomplete="off" + ></el-input> </el-form-item> <el-form-item prop="contact" :label="$t('userManage.userInfoObj.contact')" :label-width="formLabelWidth" > - <el-input v-model="editForm.contact" autocomplete="off"></el-input> + <el-input + v-model="editForm.contact" + autocomplete="off" + ></el-input> </el-form-item> <el-form-item prop="status" @@ -450,12 +519,23 @@ :label="$t('userManage.userInfoObj.remarks')" :label-width="formLabelWidth" > - <el-input v-model="editForm.bak" autocomplete="off"></el-input> + <el-input + v-model="editForm.bak" + autocomplete="off" + ></el-input> </el-form-item> </div> </el-form> - <div v-if="behavior == '淇敼淇℃伅'" slot="footer" class="dialog-footer"> - <el-button size="small" type="info" @click="cancelEdit()">{{ + <div + v-if="behavior == '淇敼淇℃伅'" + slot="footer" + class="dialog-footer" + > + <el-button + size="small" + type="info" + @click="cancelEdit()" + >{{ $t("common.reset") }}</el-button> <el-button @@ -463,11 +543,18 @@ type="primary" @click="sendEdit('editForm')" v-loading.fullscreen.lock="fullscreenLoading" - >{{ $t("common.submit") }}</el-button - > + >{{ $t("common.submit") }}</el-button> </div> - <div v-else slot="footer" class="dialog-footer"> - <el-button size="small" type="info" @click="cancelAdd('editForm')">{{ + <div + v-else + slot="footer" + class="dialog-footer" + > + <el-button + size="small" + type="info" + @click="cancelAdd('editForm')" + >{{ $t("common.reset") }}</el-button> <el-button @@ -475,8 +562,7 @@ type="primary" @click="sendAdd('editForm')" v-loading.fullscreen.lock="fullscreenLoading" - >{{ $t("common.submit") }}</el-button - > + >{{ $t("common.submit") }}</el-button> </div> </el-dialog> <el-dialog @@ -486,7 +572,11 @@ :visible.sync="resetPwd" :before-close="handleClose" > - <el-form :model="pwdForm" ref="pwdForm" :rules="rules"> + <el-form + :model="pwdForm" + ref="pwdForm" + :rules="rules" + > <el-form-item prop="adminPwd" :label="$t('common.AdminPassword')" @@ -524,8 +614,15 @@ ></el-input> </el-form-item> </el-form> - <div slot="footer" class="dialog-footer"> - <el-button size="small" type="info" @click="cancelReset - 'pwdForm'">{{ + <div + slot="footer" + class="dialog-footer" + > + <el-button + size="small" + type="info" + @click="cancelReset - 'pwdForm'" + >{{ $t("common.reset") }}</el-button> <el-button @@ -533,8 +630,7 @@ type="primary" @click="sendReset('pwdForm')" v-loading.fullscreen.lock="fullscreenLoading" - >{{ $t("common.submit") }}</el-button - > + >{{ $t("common.submit") }}</el-button> </div> </el-dialog> </div> @@ -825,6 +921,9 @@ if (res.code == 200) { this.depList = this.treeData(res.result); this.treeOptions = this.treeData(res.result); + this.queryForm.depName = this.depList[0].name; + this.queryInfo.depid = this.depList[0].id; + this.queryInfo(); } else { this.$notify.error({ title: res.code, @@ -832,7 +931,7 @@ }); } }) - .catch((res) => {}); + .catch((res) => { }); queryPageUser({ pageIndex: 1, @@ -849,7 +948,7 @@ }); } }) - .catch((res) => {}); + .catch((res) => { }); }, treeData(source) { let cloneData = JSON.parse(JSON.stringify(source)); // 瀵规簮鏁版嵁娣卞害鍏嬮殕 @@ -888,6 +987,9 @@ //閲嶇疆鎸夐挳 resetInfo(formName) { this.$refs[formName].resetFields(); + this.queryForm.depName = this.depList[0].name; + this.queryInfo.depid = this.depList[0].id; + this.queryInfo(); }, //鏂板鎸夐挳 showAddDialog() { @@ -985,12 +1087,12 @@ //閲嶇疆瀵嗙爜 editPwd() { - + var std = []; for (var i in this.multipleSelection) { std.push(this.multipleSelection[i].id); } - + if (std.length == 0) { alert("璇峰厛閫夋嫨鐢ㄦ埛"); return; @@ -1061,6 +1163,7 @@ handeditChange(data, node, nodeData) { this.$set(this.editForm, "depid", data.id); this.$set(this.editForm, "depName", data.name); + this.$set(this.editForm, "depcode", data.code); this.$refs.editcaderHandle.dropDownVisible = false; }, //鍏抽棴寮瑰嚭妗� @@ -1102,7 +1205,7 @@ done(); }) - .catch((_) => {}); + .catch((_) => { }); }, //鎻愪氦缂栬緫 sendEdit(formName) { diff --git a/src/views/userManage/orgManage.vue b/src/views/userManage/orgManage.vue index a61d071..2f58857 100644 --- a/src/views/userManage/orgManage.vue +++ b/src/views/userManage/orgManage.vue @@ -109,6 +109,7 @@ :label-width="formLabelWidth" > <el-input + disabled v-model="itemdetail.code" autocomplete="off" style="max-width: 400px;" @@ -119,6 +120,7 @@ :label-width="formLabelWidth" > <el-input + v-model="itemdetail.uncode" autocomplete="off" style="max-width: 400px;" diff --git a/src/views/userManage/roleManage.vue b/src/views/userManage/roleManage.vue index 6f4f786..5bbfdf8 100644 --- a/src/views/userManage/roleManage.vue +++ b/src/views/userManage/roleManage.vue @@ -1,18 +1,29 @@ <template> <div class="logLog_box"> - <My-bread - :list="[ + <My-bread :list="[ `${$t('operatManage.operatManage')}`, `${$t('userManage.roleManage')}`, - ]" - ></My-bread> + ]"></My-bread> <el-divider /> - <div class="inquire subpage_Div" ref="container"> - <el-form ref="ruleForm" :model="roleForm" :inline="true"> + <div + class="inquire subpage_Div" + ref="container" + > + <el-form + ref="ruleForm" + :model="roleForm" + :inline="true" + > <div class="flex_box"> <div style="margin-right: auto"> - <el-form-item :label="$t('userManage.RM.roleName')" prop="username"> - <el-input v-model="roleForm.username" style="width: 200px" /> + <el-form-item + :label="$t('userManage.RM.roleName')" + prop="username" + > + <el-input + v-model="roleForm.username" + style="width: 200px" + /> </el-form-item> <el-form-item :label="$t('userManage.RM.ownedSystem')" @@ -47,21 +58,22 @@ </div> <div> <el-form-item> - <el-button type="info" size="small" @click="resetForm('ruleForm')" - ><i class="el-icon-delete"></i> {{ + <el-button + type="info" + size="small" + @click="resetForm('ruleForm')" + ><i class="el-icon-delete"></i> {{ $t("userManage.RM.reset") - }}</el-button - > + }}</el-button> </el-form-item> <el-form-item> <el-button size="small" type="primary" @click="onSubmit('ruleForm')" - ><i class="el-icon-search"></i> {{ + ><i class="el-icon-search"></i> {{ $t("userManage.RM.query") - }}</el-button - > + }}</el-button> </el-form-item> <el-form-item> <el-button @@ -69,10 +81,9 @@ size="small" @click="handleDelete()" v-if="menuStatus.delete" - ><i class="el-icon-delete"></i> {{ + ><i class="el-icon-delete"></i> {{ $t("common.delete") - }}</el-button - > + }}</el-button> </el-form-item> <el-form-item> <el-button @@ -80,10 +91,9 @@ size="small" @click="setInsertFormdialog" v-if="menuStatus.insert" - ><i class="el-icon-circle-plus-outline"></i> {{ + ><i class="el-icon-circle-plus-outline"></i> {{ $t("userManage.RM.add") - }}</el-button - > + }}</el-button> </el-form-item> </div> </div> @@ -135,21 +145,31 @@ </el-form-item> --> </el-form> </div> - <div class="table_box subpage_Div" :style="styleVar"> + <div + class="table_box subpage_Div" + :style="styleVar" + > <el-table :data="tableData" style="width: 100%" height="calc(100% - 57px)" @selection-change="handleSelectionChange" > - <el-table-column type="selection" width="55" /> + <el-table-column + type="selection" + width="55" + /> <el-table-column align="center" type="index" :label="$t('userManage.RM.index')" width="70px" /> - <el-table-column align="center" prop="id" v-if="false" /> + <el-table-column + align="center" + prop="id" + v-if="false" + /> <el-table-column align="center" prop="name" @@ -216,17 +236,18 @@ type="warning" @click="handleEdit(scope.$index, scope.row)" size="small" - >{{ $t("common.update") }}</el-button - > + >{{ $t("common.update") }}</el-button> <el-button @click="showDetail(scope.$index, scope.row)" size="small" - >{{ $t("common.see") }}</el-button - > + >{{ $t("common.see") }}</el-button> </template> </el-table-column> </el-table> - <div style="margin-top: 25px" class="pagination_box"> + <div + style="margin-top: 25px" + class="pagination_box" + > <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" @@ -310,8 +331,14 @@ :label="$t('userManage.RM.isAdmin')" :label-width="formLabelWidth" > - <el-radio v-model="insertform.isAdmin" label="1">鏄�</el-radio> - <el-radio v-model="insertform.isAdmin" label="0">鍚�</el-radio> + <el-radio + v-model="insertform.isAdmin" + label="1" + >鏄�</el-radio> + <el-radio + v-model="insertform.isAdmin" + label="0" + >鍚�</el-radio> </el-form-item> <el-form-item :label="$t('userManage.RM.remarks')" @@ -324,11 +351,21 @@ ></el-input> </el-form-item> </el-form> - <div slot="footer" class="dialog-footer"> - <el-button size="small" @click="insertFromClose">{{ + <div + slot="footer" + class="dialog-footer" + > + <el-button + size="small" + @click="insertFromClose" + >{{ $t("common.close") }}</el-button> - <el-button type="primary" size="small" @click="insertFromData">{{ + <el-button + type="primary" + size="small" + @click="insertFromData" + >{{ $t("common.confirm") }}</el-button> </div> @@ -345,7 +382,10 @@ :label="$t('userManage.RM.roleName')" :label-width="formLabelWidth" > - <el-input v-model="updateform.name" autocomplete="off"></el-input> + <el-input + v-model="updateform.name" + autocomplete="off" + ></el-input> </el-form-item> <el-form-item @@ -390,49 +430,87 @@ :label="$t('userManage.RM.isAdmin')" :label-width="formLabelWidth" > - <el-radio v-model="updateform.isAdmin" label="1">鏄�</el-radio> - <el-radio v-model="updateform.isAdmin" label="0">鍚�</el-radio> + <el-radio + v-model="updateform.isAdmin" + label="1" + >鏄�</el-radio> + <el-radio + v-model="updateform.isAdmin" + label="0" + >鍚�</el-radio> </el-form-item> <el-form-item :label="$t('userManage.RM.describe')" :label-width="formLabelWidth" > - <el-input v-model="updateform.descr" autocomplete="off"></el-input> + <el-input + v-model="updateform.descr" + autocomplete="off" + ></el-input> </el-form-item> <el-form-item :label="$t('userManage.RM.remarks')" :label-width="formLabelWidth" > - <el-input v-model="updateform.bak" autocomplete="off"></el-input> + <el-input + v-model="updateform.bak" + autocomplete="off" + ></el-input> </el-form-item> </el-form> - <div slot="footer" class="dialog-footer"> - <el-button size="small" @click="updateFromClose">{{ + <div + slot="footer" + class="dialog-footer" + > + <el-button + size="small" + @click="updateFromClose" + >{{ $t("common.close") }}</el-button> - <el-button type="primary" size="small" @click="updateFromData">{{ + <el-button + type="primary" + size="small" + @click="updateFromData" + >{{ $t("common.confirm") }}</el-button> </div> </el-dialog> - <div class="leftTree subpage_Div box_div" v-if="showCata"> + <div + class="leftTree subpage_Div box_div" + v-if="showCata" + > <div class="treeBox"> <role-dep-tree></role-dep-tree> </div> <div class="btnBox"> - <el-button type="primary" size="small" @click="selectCataName" - >纭畾</el-button - > - <el-button type="info" size="small" @click="showCata = false" - >鍙栨秷</el-button - > + <el-button + type="primary" + size="small" + @click="selectCataName" + >纭畾</el-button> + <el-button + type="info" + size="small" + @click="showCata = false" + >鍙栨秷</el-button> </div> </div> - <div class="infoBox box_div subpage_Div" v-show="showinfoBox"> - <div slot="header" class="clearfix"> + <div + class="infoBox box_div subpage_Div" + v-show="showinfoBox" + > + <div + slot="header" + class="clearfix" + > <span>{{ $t("dataManage.styleObj.deInformation") }}</span> - <div style="float: right; cursor: pointer" @click="closeDetial"> + <div + style="float: right; cursor: pointer" + @click="closeDetial" + > <i class="el-icon-close"></i> </div> </div> @@ -562,7 +640,7 @@ }; }, methods: { - onResize() { + onResize() { this.timer && clearTimeout(this.timer); this.timer = setTimeout(() => { this.calHeight(); @@ -679,7 +757,7 @@ if (data.code != 200) { this.$message.error("鍒楄〃璋冪敤澶辫触"); } - console.log(data); + this.tableData = data.result; this.count = data.count; }, @@ -801,7 +879,12 @@ this.updateform = row; this.updateform.isAdmin = row.isAdmin.toString(); const data = await selectDep({ id: row.depid }); - this.updateform.depValue = data.result.name; + if (data.result == null) { + this.updateform.depValue = null; + } else { + this.updateform.depValue = data.result.name; + } + this.UpdateFormdialog = true; }, onSubmit() { -- Gitblit v1.9.3