From 746e355df3ce7b588f40e96e4f20ba35266e7190 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 22 八月 2023 11:28:42 +0800
Subject: [PATCH] 1.人员管理开发完成
---
src/views/login/index.vue | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 0a0ff51..4cb4a4b 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -103,7 +103,7 @@
<el-button
:loading="loading"
type="primary"
- style="width:100%;margin-top:20px;letter-spacing: 10px"
+ style="width:100%;margin-top:30px;letter-spacing: 10px;height: 40px;"
@click.native.prevent="handleLogin"
>鐧诲綍
</el-button>
@@ -143,7 +143,9 @@
<script>
import { validUsername } from '@/utils/validate'
import { getCookie, removeCookie, setCookie } from '@/utils/auth'
-import { ForcedOffline } from '@/api/user'
+import { ForcedOffline, UserTorgData } from '@/api/user'
+import { ButtonData } from '@/api/basicSettings'
+import Vue from 'vue'
export default {
name: 'Login',
@@ -217,11 +219,18 @@
if (valid) {
this.loading = true
this.$store.dispatch('user/login', this.loginForm).then(() => {
- console.log(getCookie('code') === '302', 9999)
if (getCookie('code') === '302') {
this.dialogVisible = true
} else {
this.$router.push({ path: this.redirect || '/' })
+ // ButtonData().then(res => {
+ // localStorage.setItem('ButtonData', JSON.stringify(res.data))
+ // })
+ // UserTorgData({ usercode: getCookie('usercode') }).then(res => {
+ // setCookie('username', res.data.user)
+ // // sessionStorage.setItem('username', res.data.user)
+ // sessionStorage.setItem('torg', JSON.stringify(res.data.torg))
+ // })
}
this.loading = false
}).catch(() => {
@@ -235,6 +244,7 @@
},
dialogVisibleCancel() {
+ // localStorage.removeItem('token')
this.dialogVisible = false
},
async dialogVisibleConfirm() {
@@ -244,7 +254,7 @@
}
const res = await ForcedOffline(data)
if (res.code === '200') {
- this.$message.success('寮哄埗涓嬬嚎鎴愬姛锛�')
+ this.$notify.success('寮哄埗涓嬬嚎鎴愬姛锛�')
this.dialogVisible = false
this.$router.push({ path: this.redirect || '/' })
// await this.handleLogin()
@@ -439,7 +449,8 @@
-webkit-text-fill-color: #000 !important;
}
}
-::v-deep .el-dialog__title{
+
+::v-deep .el-dialog__title {
color: red;
}
@@ -456,6 +467,7 @@
display: flex;
justify-content: end;
}
+
::v-deep .dialogVisible .el-button--primary {
background-color: #42b983 !important;
height: 30px;
@@ -465,6 +477,7 @@
border: none;
padding: 0 20px;
}
+
::v-deep .dialogVisible .el-button--default {
height: 30px;
display: flex;
--
Gitblit v1.9.3