From 4151d1c5274377d57f613919d6660e3ca5f81182 Mon Sep 17 00:00:00 2001 From: gongdi <410827992@qq.com> Date: Tue, 8 Feb 2022 17:28:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=8B=E6=B5=A6=E5=AD=A6=E6=A0=A1=20?= =?UTF-8?q?=E5=BE=85=E5=8A=9E=E5=B7=A5=E4=BD=9C=E9=98=B6=E6=AE=B5=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4=20=E5=85=AC=E8=BD=A6=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E8=87=AA=E5=8A=A8=E5=AE=A1=E6=89=B9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../todoHandle/business/BusinessItem.vue | 207 +++++++++++++++++- .../pages/homePages/login/login.vue | 92 +++++--- 2 files changed, 253 insertions(+), 46 deletions(-) diff --git a/src/views/screenAdaptation/pages/adminCenter/messageProcessing/todoHandle/business/BusinessItem.vue b/src/views/screenAdaptation/pages/adminCenter/messageProcessing/todoHandle/business/BusinessItem.vue index ef2d264..f1db037 100644 --- a/src/views/screenAdaptation/pages/adminCenter/messageProcessing/todoHandle/business/BusinessItem.vue +++ b/src/views/screenAdaptation/pages/adminCenter/messageProcessing/todoHandle/business/BusinessItem.vue @@ -1,5 +1,5 @@ diff --git a/src/views/screenAdaptation/pages/homePages/login/login.vue b/src/views/screenAdaptation/pages/homePages/login/login.vue index fc6408d..750f84e 100644 --- a/src/views/screenAdaptation/pages/homePages/login/login.vue +++ b/src/views/screenAdaptation/pages/homePages/login/login.vue @@ -7,25 +7,31 @@ >
-
+
+ +
@@ -37,10 +43,11 @@ * */ import ModalPanel from '../../../../../components/common/modal/ModalPanel'; import LoginBox from './loginBox.vue'; - import {Icon,Input,Button,Spin} from 'ant-design-vue'; + import {Icon, Input, Button, Spin} from 'ant-design-vue'; import CommonInter from '../../../api/commonInter'; import AInputPassword from "ant-design-vue/es/input/Password"; import InterfaceConfig from '../../../../../commonInterface/interfaceConfig'; + import StaticParams from '../../../../../global-llibs/staticParams'; export default{ data(){ return { @@ -51,6 +58,18 @@ passwordErrorTips: "",//密码错误提示 } }, + created(){ + //回车按键登陆 + var _this = this; + document.onkeydown = function (e) { + let key = window.event.keyCode; + if (key == 13) { + if (StaticParams.trim(_this.account) !== "" || StaticParams.trim(_this.password) !== "") { + _this.login(); + } + } + } + }, props: { showPanel: { type: Boolean, @@ -58,7 +77,7 @@ } }, methods: { - closePanel:function () { + closePanel: function () { this.$bus.emit("hide-login-panel"); }, /** @@ -77,7 +96,7 @@ this.passwordErrorTips = ""; } }, - login:function () { + login: function () { let _this = this; if (this.account.trim() == "") { this.accountErrorTips = "账号不能为空"; @@ -117,11 +136,11 @@ // this.isLogining = false; // } // }) - }else { + } else { this.passwordErrorTips = result[0].data.info; this.isLogining = false; } - }else { + } else { this.isLogining = false; } }) @@ -129,26 +148,26 @@ /** * 构建BaseConfig基本信息 */ - buildBaseInfo:function () { + buildBaseInfo: function () { //存储BaseConfig中的userInfo this.BaseConfig.userInfo.identity_id_cookie = this.Cookie.get('identity_id'); this.BaseConfig.userInfo.person_id_cookie = this.Cookie.get('person_id'); this.BaseConfig.userInfo.identity_id = this.Cookie.get('identity_id'); this.BaseConfig.userInfo.person_id = this.Cookie.get('person_id'); this.InterfaceConfig.callInterface([{ - url:InterfaceConfig.getValueByKey.url, - params:{key:'common.server.location'}, - method:InterfaceConfig.getValueByKey.method, - isTestLogin:InterfaceConfig.getValueByKey.isTestLogin - }],(res)=>{ - if (res[0].status === 200){ + url: InterfaceConfig.getValueByKey.url, + params: {key: 'common.server.location'}, + method: InterfaceConfig.getValueByKey.method, + isTestLogin: InterfaceConfig.getValueByKey.isTestLogin + }], (res) => { + if (res[0].status === 200) { let env = res[0].data; this.BaseConfig.pt_type = env["common.server.location"]; window.pt_type = env["common.server.location"]; this.BaseConfig.ConfigFn.setParamsValue(); this.BaseConfig.ConfigFn.getPersonInfo_I(); - let interval = setInterval(()=>{ - if (window.person_info_my){ + let interval = setInterval(() => { + if (window.person_info_my) { clearInterval(interval); //store存储 this.$store.commit('userStore/setUser', { @@ -159,7 +178,7 @@ this.isLogining = false; this.$bus.emit("hide-login-panel"); } - },500) + }, 500) } }) }, @@ -208,31 +227,32 @@ AInputPassword, ModalPanel, LoginBox, - AIcon:Icon, - AInput:Input, - AButton:Button, - ASpin:Spin + AIcon: Icon, + AInput: Input, + AButton: Button, + ASpin: Spin } }