From db5455a1bcea1d8e69cfc13fc8f74ea10f59ad6f Mon Sep 17 00:00:00 2001
From: qirong <2032486488@qq.com>
Date: 星期五, 27 十月 2023 13:37:09 +0800
Subject: [PATCH] 部门修改
---
src/views/login/index.vue | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index c3b3a26..37ef440 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -3,7 +3,7 @@
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
<div class="title-container">
- <h3 class="title">闈掔緤鍦ㄧ嚎鑰冭瘯绠$悊绯荤粺</h3>
+ <h3 class="title">鍦ㄧ嚎鑰冭瘯绠$悊绯荤粺</h3>
</div>
<el-form-item prop="userName">
@@ -60,6 +60,8 @@
<script>
import { mapMutations } from 'vuex'
import loginApi from '@/api/login'
+import departmentApi from '@/api/department'
+import enumItem from '@/store/modules/enumItem'
export default {
name: 'Login',
@@ -79,6 +81,12 @@
}
}
return {
+ depart:[],
+ queryParam: {
+ level: null,
+ pageIndex: 1,
+ pageSize: 100
+ },
loginForm: {
userName: '',
password: '',
@@ -131,6 +139,22 @@
this.$refs.password.focus()
})
},
+ async seachPageDepartMentList () {
+ let that = this
+ await departmentApi.pageList(this.queryParam).then(res => {
+ console.log(res)
+ if (res.code == 1) {
+ that.depart = res.response.list
+ console.log(that.depart)
+ this.depart.map(item=>{
+ item.key = item.id
+ item.value = item.name
+ })
+ enumItem.state.user.levelEnum = that.depart
+
+ }
+ })
+ },
handleLogin () {
let _this = this
this.$refs.loginForm.validate(valid => {
@@ -138,6 +162,8 @@
this.loading = true
loginApi.login(this.loginForm).then(function (result) {
if (result && result.code === 1) {
+ console.log(result)
+ _this.seachPageDepartMentList()
_this.setUserName(_this.loginForm.userName)
_this.$router.push({ path: '/' })
} else {
--
Gitblit v1.8.0