From 563eec5d6bba95f46be5c5961c581f0627082235 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期四, 15 六月 2023 17:48:34 +0800 Subject: [PATCH] 1 --- src/components/js/login.vue | 384 ++++++++++++++++++++++++++++++++++++++ src/assets/lang/zh.js | 6 public/config/config.js | 12 src/assets/css/index.css | 18 + src/components/login.vue | 23 + src/views/datamanage/catalogueManage.vue | 18 - src/assets/lang/en.js | 6 src/components/js/config.js | 72 +++++++ src/components/navMenu.vue | 13 src/views/datamanage/dataUpdata.vue | 18 + 10 files changed, 521 insertions(+), 49 deletions(-) diff --git a/public/config/config.js b/public/config/config.js index 525d8e4..0bcd99e 100644 --- a/public/config/config.js +++ b/public/config/config.js @@ -2,21 +2,21 @@ var isWeb = false; var is_production = false;//鍒ゆ柇鏄惁涓虹敓浜х幆澧� -var webHost = isWeb ? "103.85.165.99" + ":8052" : '192.168.20.205' + ":8088"; +var webHost = isWeb ? "103.85.165.99" + ":8052" : '192.168.20.83' + ":8088"; // var webHost = isWeb ? "103.85.165.99" + ":8052" : '192.168.16.162' + ":12316"; -var fmeHost = isWeb ? "103.85.165.99" + ":8051" : '192.168.20.205' + ":88"; +var fmeHost = isWeb ? "103.85.165.99" + ":8051" : '192.168.20.83' + ":88"; -var iisHost = isWeb ? "103.85.165.99" + ":8050" : '192.168.20.205' + ":80"; +var iisHost = isWeb ? "103.85.165.99" + ":8050" : '192.168.20.83' + ":80"; -var menuStartName = "绠¢亾鍩虹澶ф暟鎹钩鍙�"; +var menuStartName = "SmartEarth涓夌淮鍦扮悊淇℃伅绯荤粺骞冲彴V7.0"; var LFData = "http://" + iisHost + "/LFData"; -var BASE_URL = 'http://' + webHost + '/server'; +var BASE_URL = 'http://' + webHost + '/MoonServer'; // WebSocket 鏈嶅姟鍦板潃 -var socketUrl = 'ws://' + webHost + '/server/ws/select'; +var socketUrl = 'ws://' + webHost + '/MoonServer/ws/select'; // GeoServerUrl var geoServerURl = 'http://' + webHost + '/geoserver/LF/wms'; diff --git a/src/assets/css/index.css b/src/assets/css/index.css index 5d0b969..6abc1a2 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -43,10 +43,20 @@ /* width: 415px; height: 70px; background: url("../img/LOGO.png") no-repeat center; */ - width: 18%; + width: 19%; height: 50px; - background: url("../img/menu/navtitle.png") no-repeat center center; - background-size: 100% 100%; + padding-left: 5px; + display: flex; + align-items: center; + + font-size: 20px; + font-family: Microsoft YaHei; + font-weight: bold; + color: #ffffff; + background: linear-gradient(0deg, #79a8ff 0%, #ffffff 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + } .topMenu { @@ -102,6 +112,8 @@ color: #fff } + + .changeStyle { color: #fec801; } diff --git a/src/assets/lang/en.js b/src/assets/lang/en.js index 69e8700..356a689 100644 --- a/src/assets/lang/en.js +++ b/src/assets/lang/en.js @@ -67,8 +67,8 @@ dataManage: { dataManage: 'Data Manage', catalogueManage: 'Directory management', - projectManagement: 'Project Management', - dataUpdata: 'dataUpdata', + projectManagement: 'Data Resource Catalog Management', + dataUpdata: 'Data warehousing and updating', datawarehousing: 'Data warehousing', rangeManage: 'Range management', dataRetrieval: 'Data query', @@ -284,7 +284,7 @@ }, operatManage: { organizationManage: 'Organizational management', - operatManage: 'Operat Manage', + operatManage: 'Operation and maintenance supervision', ResourceLog: 'Resource Log', DownloadLog: 'Download Log', UserRoleAuthorization: 'User Role Authorization', diff --git a/src/assets/lang/zh.js b/src/assets/lang/zh.js index b3642d3..8f6b505 100644 --- a/src/assets/lang/zh.js +++ b/src/assets/lang/zh.js @@ -67,8 +67,8 @@ dataManage: { dataManage: '鏁版嵁绠$悊', catalogueManage: '鐩綍绠$悊', - projectManagement: '椤圭洰绠$悊', - dataUpdata: '鏁版嵁涓婁紶', + projectManagement: '鏁版嵁璧勬簮鐩綍绠$悊', + dataUpdata: '鏁版嵁鍏ュ簱涓庢洿鏂�', datawarehousing: '鏁版嵁鍏ュ簱', rangeManage: '鍊煎煙绠$悊', dataRetrieval: '鏁版嵁鏌ヨ', @@ -278,7 +278,7 @@ }, }, operatManage: { - operatManage: '杩愮淮绠$悊', + operatManage: '杩愮淮鐩戠', ResourceLog: '璧勬簮鏃ュ織', organizationManage: '鍗曚綅绠$悊', DownloadLog: '涓嬭浇鏃ュ織', diff --git a/src/components/js/config.js b/src/components/js/config.js new file mode 100644 index 0000000..ab45b8e --- /dev/null +++ b/src/components/js/config.js @@ -0,0 +1,72 @@ +//var isWeb = location.hostname.indexOf("103.85.165.") > -1; +var isWeb = false; +var is_production = false;//鍒ゆ柇鏄惁涓虹敓浜х幆澧� + +var webHost = isWeb ? "103.85.165.99" + ":8052" : '192.168.20.83' + ":8088"; +// var webHost = isWeb ? "103.85.165.99" + ":8052" : '192.168.16.162' + ":12316"; + +var fmeHost = isWeb ? "103.85.165.99" + ":8051" : '192.168.20.83' + ":88"; + +var iisHost = isWeb ? "103.85.165.99" + ":8050" : '192.168.20.83' + ":80"; + +var menuStartName = "SmartEarth涓夌淮鍦扮悊淇℃伅绯荤粺骞冲彴V7.0"; + +var LFData = "http://" + iisHost + "/LFData"; + +var BASE_URL = 'http://' + webHost + '/server'; + +// WebSocket 鏈嶅姟鍦板潃 +var socketUrl = 'ws://' + webHost + '/server/ws/select'; + +// GeoServerUrl +var geoServerURl = 'http://' + webHost + '/geoserver/LF/wms'; + +var geoserverWFS = '/geoserver/LF/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=LF%3Abs_project&maxFeatures=50&outputFormat=application%2Fjson&cql_filter=projname='; + +var geoserverWFSLine = '/geoserver/LF/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=LF%3Am_pipeline&maxFeatures=50&outputFormat=application%2Fjson&cql_filter=projname='; + +// 妯″瀷鍔犺浇鍦板潃 +var modelUrl = LFData; + +// DEM +var demLayer = LFData + '/dem'; + +// 缁煎悎灞曠ず +window.sceneConfig = { + // Sdk璁稿彲 + licenseServer: 'http://' + iisHost + '/LFServer', + // MPT鍚嶇О + mptName: "china_5m.Ei.397334", + // SG鍦板潃 + SGUrl: "http://" + iisHost + "/SG/Elevation", + // Fly鍦板潃 + // fly: 'http://' + iisHost + '/LFData/fly/' + (isWeb ? "lfy_web.fly" : "lf_127.fly"), + fly: 'http://' + iisHost + '/LFData/fly/' + (isWeb ? "lfgd.fly" : "lfgd_127.fly"), + // + positionBtn: [], + //褰卞儚 + baseUrl: "http://" + iisHost + "/LFData/2d/tiles/img/{z}/{x}/{y}.png", + //鐭㈤噺 + baseUrl_sl: 'http://' + iisHost + '/LFData/2d/tiles/vec/{z}/{x}/{y}.png', + //鍦板舰 + baseUrl_yx: 'http://' + iisHost + '/LFData/2d/tiles/ter/{z}/{x}/{y}.png' +}; +//宸ョ偣淇℃伅琛� +var workSite = [ + { + name: "鍕樺療淇℃伅琛�", + table: "s_survey_information", + ns: 'bs', + }, +] +var dirTemplateFile = '宸ョ▼椤圭洰-鐩綍绠$悊妯20230613.xlsx' +var gaoDeBaseUrl = [{ + url: 'http://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}', + label: '楂樺痉鐭㈤噺', +}, { + url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}', + label: '楂樺痉褰卞儚', +}, { + url: 'http://webst02.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=8', + label: '楂樺痉褰卞儚鏍囨敞' +}]; diff --git a/src/components/js/login.vue b/src/components/js/login.vue new file mode 100644 index 0000000..4a88b67 --- /dev/null +++ b/src/components/js/login.vue @@ -0,0 +1,384 @@ +<template> + <div class="container"> + <vue-particles + :particleOpacity="0.7" + :particlesNumber="80" + shapeType="circle" + :particleSize="4" + :linesWidth="1" + :lineLinked="true" + :lineOpacity="0.4" + :linesDistance="80" + :moveSpeed="2" + :hoverEffect="true" + hoverMode="grab" + :clickEffect="false" + clickMode="bubble" + > + </vue-particles> + <div class="MapMenu"> + <iframe + id="ifream" + style="border: none" + width="100%" + height="100%" + v-bind:src="reportUrl" + ></iframe> + </div> + <div class="title_img"> + <img + src="../assets/img/lg_03.png" + alt="" + /> + </div> + <div class="login"> + <div class="login_title"> + <span>鐢ㄦ埛鐧诲綍</span> + </div> + <el-form + :model="loginForm" + :rules="rules" + ref="loginForm" + class="loginForm" + > + <el-form-item prop="uid"> + <el-input + v-model="loginForm.uid" + placeholder="杈撳叆鐧诲綍璐﹀彿" + class="nobr" + size="meddle" + autocomplete="off" + > + <i + slot="prefix" + class="el-icon-user" + ></i> + </el-input> + </el-form-item> + + <el-form-item prop="pwd"> + <el-input + show-password + v-model="loginForm.pwd" + placeholder="璇疯緭鍏ョ櫥褰曞瘑鐮�" + class="nobr" + autocomplete="off" + > + <i + slot="prefix" + class="el-icon-lock" + ></i> + </el-input> + </el-form-item> + + <el-form-item required> + <el-col :span="18"> + <el-form-item prop="validCode"> + <el-input + v-model="loginForm.validCode" + placeholder="璇疯緭鍏ラ獙璇佺爜锛堝拷鐣ュぇ灏忓啓锛�" + class="nobr" + ></el-input> + </el-form-item> + </el-col> + + <el-col + :span="6" + align="right" + > + <validCode + v-model="validCode" + ref="refresh" + @sendData="getCode" + ></validCode> + </el-col> + </el-form-item> + <el-form-item> + <img + src="../assets/img/zhengshu.png" + alt="" + /><span style="color: black">璇佷功瀹夎涓庢坊鍔犱俊浠荤珯鐐�</span> + </el-form-item> + <el-form-item> + <img + src="../assets/img/document.png" + alt="" + /><span style="color: black">浣跨敤甯姪鏂囨。</span> + </el-form-item> + <el-form-item> + <el-button + type="primary" + class="nobr loginbtn" + style="" + :loading="loading" + @click="submitForm('loginForm')" + >鐧诲綍</el-button> + </el-form-item> + </el-form> + </div> + </div> +</template> + +<script> +import { getPerms } from "../api/api"; +import validCode from "./verificationCode.vue"; +import { mapActions } from "vuex"; +import moment from "moment"; + +export default { + components: { validCode }, + data() { + let validUserName = (rule, value, callback) => { + if (!value) { + return callback(new Error("鐢ㄦ埛鍚嶄笉鑳戒负绌�")); + } else { + callback(); + } + }; + + let validPassword = (rule, value, callback) => { + if (!value) { + return callback(new Error("瀵嗙爜涓嶈兘涓虹┖")); + } else { + callback(); + } + }; + + const checkValidCode = (rule, value, callback) => { + if (!value) { + callback(new Error("璇疯緭鍏ラ獙璇佺爜")); + } else if (value.toUpperCase() !== this.validCode.toUpperCase()) { + callback(new Error("楠岃瘉鐮佷笉姝g‘")); + } else { + callback(); + } + }; + // loginForm: { + // uid: "admin", + // pwd: "Admin@1234_lf", + // } + return { + validCode: "", + loading: false, + loginForm: { + uid: "", + pwd: "", + }, + rules: { + uid: [{ validator: validUserName, trigger: "blur" }], + pwd: [{ validator: validPassword, trigger: "blur" }], + validCode: [{ validator: checkValidCode, trigger: "blur" }], + showSessionId: "", + reportUrl: "", + }, + }; + }, + mounted() { + this.getpublickey(); + }, + methods: { + handlePaste(e) { + e.preventDefault(); + }, + // 鑾峰彇vuex涓瑼ctions閲岀殑鏂规硶 + ...mapActions(["login", "getpublickey"]), + getCode(data) { + this.validCode = data; //鍦╠ata涓畾涔変竴涓� validCode:'',鐢ㄦ潵璁板綍楠岃瘉鐮併�� + }, + + submitForm(formName) { + this.$refs[formName].validate((valid) => { + if (valid) { + this.loading = true; + this.login(this.loginForm) + .then((response) => { + if (response.code != 200) { + this.loading = false; + this.$message({ + message: response.msg, + type: "error", + }); + // Message({ + // message: response.msg, + // type: "error", + // duration: 5 * 1000, + // }); + return; + } + + if (response.msg != "") { + this.$message({ + message: response.msg, + type: "warning", + }); + } + this.setCookies(response); + + getPerms().then((res) => { + if (res.code == 200) { + this.$store.commit("getPermsEntity", res.result); + + if (res.result.length != 0) { + sessionStorage.setItem("routerName", "/Thematic"); + sessionStorage.setItem("changeSelectStyle", 1); + this.$router.push("/"); + } else { + this.$message({ + message: "璇锋偍鑱旂郴绠$悊鍛樺垎閰嶈鑹茶彍鍗�", + type: "error", + }); + } + this.loading = false; + } else { + this.loading = false; + console.log("error submit!!"); + } + }); + + this.loading = false; + //璋冪敤褰曟帴鍙� + }) + .catch((response) => { + this.loading = false; + }); + //濡傛灉鐧诲綍澶辫触锛岄渶瑕佸埛鏂伴獙璇佺爜鐨� + this.$refs.refresh.createdCode(); + this.validCode = ""; //娓呯┖楠岃瘉鐮佽緭鍏ユ鐨勫唴瀹� + } else { + this.loading = false; + console.log("error submit!!"); + return false; + } + }); + }, + setCookies(res) { + var timeData = moment(res.result.expire).format("YYYY-MM-DD HH:mm:ss"); + var LfPrems = { + token: res.result.token, + uname: res.result.uname, + time: timeData, + userid: res.result.createUser, + expire: res.result.expire, + autoLogOut: res.result.autoLogOut, + }; + LfPrems = JSON.stringify(LfPrems); + localStorage.setItem("LFToken", LfPrems); + }, + enterLogin() { + document.onkeydown = (e) => { + e = window.event || e; + + if ( + this.$route.path == "/login" && + (e.code == "Enter" || e.code == "enter" || e.code == "NumpadEnter") + ) { + //鏈�閲嶈鏈�鍚庤皟鐢�1.鐧诲綍鏍¢獙鏂规硶 + //this.login(); + this.submitForm("loginForm"); + } + }; + }, + startURL() { + var url = window.location.href; + var testurl = ""; + if (url.indexOf("web") != -1) { + testurl = "/web"; + } + this.reportUrl = + window.location.origin + testurl + "/mapscreen/index.html"; + }, + }, + created() { + this.startURL(); + this.enterLogin(); + }, +}; +</script> + +<!-- Add "scoped" attribute to limit CSS to this component only --> +<style lang="less" scoped> +.container { + width: 100%; + height: 100%; + position: fixed; + top: 0px; + left: 0px; + right: 0px; + bottom: 0px; + + background: url("../assets/img/login.jpg") no-repeat center; + background-size: 100% 100%; + .MapMenu { + width: 100%; + height: 100%; + top: 5%; + left: 1%; + position: absolute; + } +} +.title_img { + position: absolute; + left: 20%; + top: 8%; + width: 20%; + /* transform: translateX(-50%); */ +} +.title_img img { + width: 100%; +} +.main_img { + position: absolute; + left: 17%; + top: 12%; + /* transform: translateX(-50%); */ +} +.main_img img { + width: 100%; +} +.login { + width: 472px; + height: 571px; + position: absolute; + left: 75%; + top: 45%; + transform: translate(-50%, -40%); + background: rgba(255, 255, 255, 0.9); + border-radius: 8px; +} + +.login_title { + margin-top: 47px; + margin-left: 48px; + font-size: 25px; + font-family: Microsoft YaHei; + font-weight: bold; + color: #3b4d6e; + /* background-color: #bfa; */ +} +.loginForm { + margin-top: 61px; + margin-left: 48px; + /* background-color: #bfa; */ + width: 385px; +} +.el-form-item { + /* margin-bottom: 12px; */ + height: 41px; +} +.el-input /deep/ .el-input__inner { + /* background: rgba(80, 152, 255, 0.24); */ + border-color: rgba(0, 0, 0, 0.1); + color: #000; +} + +.el-input /deep/ .el-input-group__prepend { + border: 0; + padding: 0 !important; +} +.loginbtn { + width: 384px; + height: 50px; + background: #3b4d6e; + border-radius: 5px; +} +</style> diff --git a/src/components/login.vue b/src/components/login.vue index 4a88b67..75e84bb 100644 --- a/src/components/login.vue +++ b/src/components/login.vue @@ -26,10 +26,11 @@ ></iframe> </div> <div class="title_img"> - <img + <!-- <img src="../assets/img/lg_03.png" alt="" - /> + /> --> + SmartEarth涓夌淮鍦扮悊淇℃伅绯荤粺骞冲彴V7.0 </div> <div class="login"> <div class="login_title"> @@ -217,11 +218,11 @@ getPerms().then((res) => { if (res.code == 200) { this.$store.commit("getPermsEntity", res.result); - + debugger if (res.result.length != 0) { sessionStorage.setItem("routerName", "/Thematic"); sessionStorage.setItem("changeSelectStyle", 1); - this.$router.push("/"); + this.$router.push("/bankController"); } else { this.$message({ message: "璇锋偍鑱旂郴绠$悊鍛樺垎閰嶈鑹茶彍鍗�", @@ -318,10 +319,16 @@ } .title_img { position: absolute; - left: 20%; - top: 8%; - width: 20%; - /* transform: translateX(-50%); */ + left: 13%; + top: 10%; + + font-size: 40px; + font-family: Microsoft YaHei; + font-weight: bold; + color: #ffffff; + background: linear-gradient(0deg, #79a8ff 0%, #ffffff 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; } .title_img img { width: 100%; diff --git a/src/components/navMenu.vue b/src/components/navMenu.vue index e863a03..76c4e0a 100644 --- a/src/components/navMenu.vue +++ b/src/components/navMenu.vue @@ -4,7 +4,9 @@ @click.stop > <div class="topBox"> - <div class="topTitle"></div> + <div class="topTitle"> + SmartEarth涓夌淮鍦扮悊淇℃伅绯荤粺骞冲彴V7.0 + </div> <div class="topMenu"> <div class="menuContent"> <div @@ -43,10 +45,10 @@ </div> <div class="topUser"> <div class="userLanguage"> - <div + <!-- <div class="userImage theme" @click="themeChange" - ></div> + ></div> --> <div class="userImage user2" @click="switchLang" @@ -142,8 +144,9 @@ }, created() { }, mounted() { - this.$store.state.themeflag = false; - $("#app").removeClass("Black_theme"); + this.$store.state.themeflag = true; + + $("#app").addClass("Black_theme"); this.getMenuTree(); if (sessionStorage.getItem('changeliSelect')) { this.$set(this, 'changeliSelect', sessionStorage.getItem('changeliSelect')) diff --git a/src/views/datamanage/catalogueManage.vue b/src/views/datamanage/catalogueManage.vue index 77f16aa..85de3dd 100644 --- a/src/views/datamanage/catalogueManage.vue +++ b/src/views/datamanage/catalogueManage.vue @@ -169,7 +169,7 @@ clearable /> </el-form-item> - <el-form-item + <!-- <el-form-item :label="$t('dataManage.dataUpObj.inspectionItems')" :label-width="formLabelWidth" > @@ -187,17 +187,9 @@ > </el-option> </el-select> - <!-- <el-input - - type="textarea" - style=" max-width: 420px" - :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" - clearable - /> --> - <!-- resize="none"--> - <!-- style="height: 100%; overflow: auto; max-width: 400px"--> - </el-form-item> - <el-form-item + + </el-form-item> --> + <!-- <el-form-item :label="$t('dataManage.dataUpObj.fileExtension')" :label-width="formLabelWidth" > @@ -208,7 +200,7 @@ :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuesuffix')" clearable /> - </el-form-item> + </el-form-item> --> <!-- <el-form-item :label="$t('dataManage.dataUpObj.inspectionItems')" :label-width="formLabelWidth" diff --git a/src/views/datamanage/dataUpdata.vue b/src/views/datamanage/dataUpdata.vue index 738e08a..03a9f06 100644 --- a/src/views/datamanage/dataUpdata.vue +++ b/src/views/datamanage/dataUpdata.vue @@ -130,6 +130,7 @@ :disabled="tableData.length == 0 ? false : true" v-model="formInline.verid" :placeholder="$t('common.choose')" + size="small" > <el-option v-for="item in verOption" @@ -141,7 +142,7 @@ </el-select> </el-form-item> <!-- 鏁版嵁涓撲笟 --> - <el-form-item + <!-- <el-form-item :label="$t('dataManage.dataUpObj.dataSpecialty')" style="margin-right: 2%" size="small" @@ -152,12 +153,6 @@ v-model="formInline.specialtyId" :placeholder="$t('common.choose')" > - <!-- <el-option - v-for="item in specialtyOption" - :key="item.value" - :label="item.label" - :value="item.value"> - </el-option>--> <el-option :label="$t('shuJuGuanLi.pselect.SurveyingAndMapping')" @@ -180,7 +175,7 @@ value='绾胯矾涓撲笟' /> </el-select> - </el-form-item> + </el-form-item> --> <!-- 鍧愭爣绯� --> <el-form-item :label="$t('dataManage.dataUpObj.coordinateSystem')" @@ -1924,6 +1919,7 @@ getPerms() { var val = this.$store.state.currentPerms; var permsEntity = this.$store.state.permsEntity; + if (!permsEntity || !permsEntity.length) { getPerms().then((res) => { if (res.code == 200) { @@ -3174,4 +3170,10 @@ .text-center { text-align: center; } +/deep/ .el-tabs--card > .el-tabs__header .el-tabs__nav { + border: none !important; +} +/deep/ .el-tabs--card > .el-tabs__header .el-tabs__item { + border: none !important; +} </style> -- Gitblit v1.9.3