mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 13:32:41 +08:00
exam_user add status: avoid
This commit is contained in:
3
admin/src/utils/api.js
vendored
3
admin/src/utils/api.js
vendored
@@ -81,6 +81,9 @@ const api = {
|
||||
deleteExamUser: (id) => {
|
||||
return axios.delete('exam-users/' + id);
|
||||
},
|
||||
avoidExamUser: (id) => {
|
||||
return axios.put('exam-users-avoid', {id});
|
||||
},
|
||||
storeExamUser: (params) => {
|
||||
return axios.post('exam-users', params);
|
||||
},
|
||||
|
||||
@@ -116,6 +116,15 @@
|
||||
<el-button type="danger" size="small">Remove</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
<el-popconfirm
|
||||
v-if="examInfo.status === 0"
|
||||
title="Confirm Avoid ?"
|
||||
@confirm="handleAvoidExam(examInfo.id)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button type="info" size="small">Avoid</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -190,6 +199,12 @@ export default {
|
||||
await fetchPageData()
|
||||
}
|
||||
|
||||
const handleAvoidExam = async (id) => {
|
||||
let res = await api.avoidExamUser(id)
|
||||
ElMessage.success(res.msg)
|
||||
await fetchPageData()
|
||||
}
|
||||
|
||||
const handleAssignExam = async () => {
|
||||
assignExam.value.open(id)
|
||||
}
|
||||
@@ -213,6 +228,7 @@ export default {
|
||||
return {
|
||||
...toRefs(state),
|
||||
handleRemoveExam,
|
||||
handleAvoidExam,
|
||||
handleAssignExam,
|
||||
handleEnableUser,
|
||||
handleViewInviteInfo,
|
||||
|
||||
Reference in New Issue
Block a user