From 4f39d2d3ee69813f106e06fc8a8d168ecccc941c Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 15 三月 2024 15:32:17 +0800 Subject: [PATCH] 成绩统计详情增加时间查询 --- src/views/login/index.vue | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index c3b3a26..84d58a8 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,7 +162,10 @@ 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) + sessionStorage.setItem('deptAdmin', result.response.deptAdmin) _this.$router.push({ path: '/' }) } else { _this.loading = false -- Gitblit v1.8.0