|
@@ -30,7 +30,8 @@ const user = {
|
|
|
getTeacherSalaryList:[],
|
|
|
getTeacherIdStatus:"",
|
|
|
getAllotManagerList:"",
|
|
|
- homeworkRecoveryList:[]
|
|
|
+ homeworkRecoveryList:[],
|
|
|
+ BeforetoTeacherAllotCode:""
|
|
|
},
|
|
|
|
|
|
mutations: {
|
|
@@ -97,6 +98,9 @@ const user = {
|
|
|
SET_MANAGERLIST_ALLOTIST:(state,getAllotManagerList) => {
|
|
|
state.getAllotManagerList = getAllotManagerList
|
|
|
},
|
|
|
+ SET_GET_SUCCESS_CODE:(state,BeforetoTeacherAllotCode) => {
|
|
|
+ state.BeforetoTeacherAllotCode = BeforetoTeacherAllotCode
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
actions: {
|
|
@@ -108,16 +112,19 @@ const user = {
|
|
|
if (res && res.code == '999') {
|
|
|
const data = res.data
|
|
|
const accessToken = data.accessToken
|
|
|
+ const unionid = localStorage.getItem("unionid")
|
|
|
commit('SET_TOKEN', data);
|
|
|
localStorage.setItem("accessToken",data.accessToken)
|
|
|
dispatch('GetInfo').then(res => { // 拉取用户信息
|
|
|
- const roles = res.data.role
|
|
|
+ const roles = res.data.role
|
|
|
+ const userId = res.data.userId
|
|
|
+ localStorage.setItem("userId",userId)
|
|
|
if (roles == 0) {
|
|
|
Message.error('无用户角色')
|
|
|
}
|
|
|
if (roles == 1) {
|
|
|
Message.success('在线批改老师角色登录成功')
|
|
|
- window.open('http://120.77.207.0:8081/kmt/index.html?accessToken=' + accessToken);
|
|
|
+ window.open('http://120.77.207.0:8081/kmt/index.html?unionid=' + unionid);
|
|
|
}
|
|
|
if (roles == 2) {
|
|
|
Message.success('校区管理员角色登录成功')
|
|
@@ -145,6 +152,7 @@ const user = {
|
|
|
if (res && res.code == '999') {
|
|
|
const data = res.data
|
|
|
const accessToken = data.accessToken
|
|
|
+ const unionid = localStorage.getItem("unionid")
|
|
|
commit('SET_TOKEN', data);
|
|
|
localStorage.setItem("accessToken",data.accessToken)
|
|
|
dispatch('GetInfo').then(res => { // 拉取用户信息
|
|
@@ -154,7 +162,7 @@ const user = {
|
|
|
}
|
|
|
if (roles == 1) {
|
|
|
Message.success('在线批改老师角色登录成功')
|
|
|
- window.open('http://120.77.207.0:8081/kmt/index.html?accessToken=' + accessToken);
|
|
|
+ window.open('http://120.77.207.0:8081/kmt/index.html?unionid=' + unionid);
|
|
|
}
|
|
|
if (roles == 2) {
|
|
|
Message.success('校区管理员角色登录成功')
|
|
@@ -325,6 +333,20 @@ const user = {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ // 校区管理员去批改前分配老师
|
|
|
+ BeforetoTeacherAllot({ commit, state }, data) {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ axios.post(TeacherAllot, data).then(response => {
|
|
|
+ const data = response || {}
|
|
|
+ if (data.code === '999'){
|
|
|
+ commit('SET_GET_SUCCESS_CODE',new Date());
|
|
|
+ Message.success('分配成功')
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ reject(error)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 登出
|
|
|
// 查看超级管理员校区列表
|
|
|
SuperManagerList({ commit, state }, data) {
|