|
@@ -70,16 +70,37 @@ const mutations = {
|
|
|
};
|
|
|
|
|
|
const actions = {
|
|
|
- async fetchRealtimeMonitoringCount({ commit }, datas) {
|
|
|
- const res = await invigilateCount(datas);
|
|
|
+ async fetchRealtimeMonitoringCount({ state, commit }, datas) {
|
|
|
+ if (
|
|
|
+ !state.cacheExamActivity.examId ||
|
|
|
+ !state.cacheExamActivity.examActivityId
|
|
|
+ )
|
|
|
+ return;
|
|
|
+ const res = await invigilateCount({ ...datas, ...state.cacheExamActivity });
|
|
|
commit("setRealtimeMonitoring", res.data.data.length);
|
|
|
},
|
|
|
async fetchWarningManageCount({ commit }, datas) {
|
|
|
- const res = await invigilationWarningCount(datas);
|
|
|
+ if (
|
|
|
+ !state.cacheExamActivity.examId ||
|
|
|
+ !state.cacheExamActivity.examActivityId
|
|
|
+ )
|
|
|
+ return;
|
|
|
+ const res = await invigilationWarningCount({
|
|
|
+ ...datas,
|
|
|
+ ...state.cacheExamActivity,
|
|
|
+ });
|
|
|
commit("setWarningManage", res.data.data.count);
|
|
|
},
|
|
|
async fetchReexamPendingCount({ commit }, datas) {
|
|
|
- const res = await reexamPendingCount(datas);
|
|
|
+ if (
|
|
|
+ !state.cacheExamActivity.examId ||
|
|
|
+ !state.cacheExamActivity.examActivityId
|
|
|
+ )
|
|
|
+ return;
|
|
|
+ const res = await reexamPendingCount({
|
|
|
+ ...datas,
|
|
|
+ ...state.cacheExamActivity,
|
|
|
+ });
|
|
|
commit("setReexamPending", res.data.data.count);
|
|
|
},
|
|
|
// 上一页,下一页 ------->
|