add exam index init value

This commit is contained in:
xiaomlove
2021-06-11 02:21:42 +08:00
parent 3bb15d6a41
commit 6719fb494f
8 changed files with 141 additions and 12 deletions
+3
View File
@@ -84,6 +84,9 @@ const api = {
avoidExamUser: (id) => {
return axios.put('exam-users-avoid', {id});
},
recoverExamUser: (id) => {
return axios.put('exam-users-recover', {id});
},
storeExamUser: (params) => {
return axios.post('exam-users', params);
},
+16
View File
@@ -125,6 +125,15 @@
<el-button type="info" size="small">Avoid</el-button>
</template>
</el-popconfirm>
<el-popconfirm
v-if="examInfo.status === -1"
title="Confirm Recover ?"
@confirm="handleRecoverExam(examInfo.id)"
>
<template #reference>
<el-button type="primary" size="small">Recover</el-button>
</template>
</el-popconfirm>
</td>
</tr>
</table>
@@ -205,6 +214,12 @@ export default {
await fetchPageData()
}
const handleRecoverExam = async (id) => {
let res = await api.recoverExamUser(id)
ElMessage.success(res.msg)
await fetchPageData()
}
const handleAssignExam = async () => {
assignExam.value.open(id)
}
@@ -230,6 +245,7 @@ export default {
handleRemoveExam,
handleAvoidExam,
handleAssignExam,
handleRecoverExam,
handleEnableUser,
handleViewInviteInfo,
handleDisableUser,