From f0f200abf841d5d7fe5e2921e6ded8f0147e9c92 Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期三, 10 七月 2024 18:02:07 +0800 Subject: [PATCH] feat 用户列表增加部门条件 随机试卷列表增加部门,时间,科目条件 补考直接展示学生 试卷标题默认展示一个 --- src/App.vue | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 45 insertions(+), 1 deletions(-) diff --git a/src/App.vue b/src/App.vue index ec9032c..588a76a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,7 +5,51 @@ </template> <script> +import { mapGetters, mapState, mapActions } from 'vuex' +import departmentApi from '@/api/department' +import enumItem from '@/store/modules/enumItem' export default { - name: 'App' + name: 'App', + data(){ + return{ + depart:[], + queryParam: { + level: null, + pageIndex: 1, + pageSize: 100 + }, + } + }, + created () { + console.log(this.Islogin) + }, + computed:{ + ...mapState('enumItem',{Islogin:state => state.user.levelEnum}) + }, + mounted () { + if (! sessionStorage.getItem('deptAdmin')) { + this.$router.push({ path: '/' }) + } + this.seachPageDepartMentList() + }, + methods:{ + async seachPageDepartMentList () { + let that = this + await departmentApi.pageList(this.queryParam).then(res => { + console.log(res) + if (res.code == 1) { + that.depart = res.response + console.log(that.depart) + this.depart.map(item=>{ + item.key = item.id + item.value = item.name + }) + enumItem.state.user.levelEnum = that.depart + + } + }) + } + } } + </script> -- Gitblit v1.8.0