|
@@ -1,5 +1,5 @@
|
|
|
import { LOGIN,GET_TOKEN,GetInfo,InfoWatch,InfoWatchDay,
|
|
|
- InfoWatchMoth } from '@/api'
|
|
|
+ InfoWatchMoth,TeacherHomeworkList } from '@/api'
|
|
|
import { getToken, setToken, removeToken } from '@/utils/auth'
|
|
|
import axios from '@/axios'
|
|
|
const user = {
|
|
@@ -11,6 +11,7 @@ const user = {
|
|
|
monitorTeacherList:[],
|
|
|
dayTeacherList:[],
|
|
|
mothTeacherList:[],
|
|
|
+ TeacherHomeworkList:[]
|
|
|
},
|
|
|
|
|
|
mutations: {
|
|
@@ -34,6 +35,9 @@ const user = {
|
|
|
},
|
|
|
SET_TEACHER_MOTH: (state, monitorTeacherList) => {
|
|
|
state.mothTeacherList = mothTeacherList
|
|
|
+ },
|
|
|
+ SET_TEACHER_HOMELISt: (state, TeacherHomeworkList) => {
|
|
|
+ state.TeacherHomeworkList = TeacherHomeworkList
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -86,32 +90,42 @@ const user = {
|
|
|
axios.post(InfoWatch, data).then(response => {
|
|
|
const data = response.data
|
|
|
commit('SET_TEACHER', data);
|
|
|
- debugger
|
|
|
resolve(response)
|
|
|
}).catch(error => {
|
|
|
reject(error)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ // 校区管理员当月数据
|
|
|
+ InfoWatchMoth({ commit, state }, data) {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ axios.post(InfoWatchMoth, data).then(response => {
|
|
|
+ const data = response.data
|
|
|
+ commit('SET_TEACHER_MOTH', data);
|
|
|
+ resolve(response)
|
|
|
+ }).catch(error => {
|
|
|
+ reject(error)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 校区管理员当天数据
|
|
|
InfoWatchDay({ commit, state }, data) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
axios.post(InfoWatchDay, data).then(response => {
|
|
|
const data = response.data
|
|
|
commit('SET_TEACHER_DAY', data);
|
|
|
- debugger
|
|
|
resolve(response)
|
|
|
}).catch(error => {
|
|
|
reject(error)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- // 校区管理员当月数据
|
|
|
- InfoWatchMoth({ commit, state }, data) {
|
|
|
+ // 查看老师批改作业列表
|
|
|
+ TeacherHomeworkList({ commit, state }, data) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- axios.post(InfoWatchMoth, data).then(response => {
|
|
|
+ axios.post(TeacherHomeworkList, data).then(response => {
|
|
|
const data = response.data
|
|
|
- commit('SET_TEACHER_MOTH', data);
|
|
|
+ commit('SET_TEACHER_HOMELISt', data);
|
|
|
debugger
|
|
|
resolve(response)
|
|
|
}).catch(error => {
|