提交 a408c8a8 authored 作者: matian's avatar matian

fix:删除增加弹框提示

上级 1a5a9f94
......@@ -25,7 +25,15 @@
</el-dropdown>
</div>
<template v-slot:table-x="{ row }">
<el-button type="text" @click="handleDetail(row)">查看详情</el-button>
<router-link
:to="{
path: 'markingPaper',
query: { eid: exam_id, sid: row.student_id }
}"
target="_blank"
>
<el-button type="text">查看详情</el-button>
</router-link>
</template>
<el-dialog title="转移考生" :visible.sync="dialogVisible" width="40%">
<div>
......@@ -144,7 +152,6 @@ export default {
},
methods: {
handleDetail(row) {
// console.log(row)
this.$router.push({
path: 'markingPaper',
query: { eid: this.exam_id, sid: row.student_id }
......@@ -205,11 +212,15 @@ export default {
},
// 删除考生
delStudent() {
this.$confirm('确认删除该考试吗?删除后不可恢复').then(_ => {
const studentId = this.multipleSelection.map(item => item.student_id).toString()
deleteStudent({ id: studentId }).then(res => {
if (res.code === 0) {
this.$message.success('删除成功')
}
})
this.$refs.list.refetch()
})
},
// 导出明细
exportDetail() {
......
......@@ -104,10 +104,12 @@ export default {
// 单个删除
handleDelete(row) {
this.$confirm('确认删除考试吗?删除后不可恢复').then(_ => {
this.$confirm('确认删除考试吗?删除后不可恢复').then(_ => {
const params = { id: row.exam_id }
delExamPaper(params).then(res => {
if (res.code === 0) {
this.$message.success('删除考试成功')
}
})
this.$refs.list.refetch()
})
......
......@@ -140,6 +140,7 @@ export default {
},
// 删除选中试题
handleRemove() {
this.$confirm('确认删除选中试题吗?删除后不可恢复').then(_ => {
this.questions = this.questions.filter(item => {
if (item.children) {
item.children = item.children.filter(item => !this.multipleSelection.includes(item.id))
......@@ -147,6 +148,7 @@ export default {
return !this.multipleSelection.includes(item.id)
})
this.multipleSelection = []
})
},
// 保存试卷
handleSubmit() {
......
......@@ -90,7 +90,9 @@ export default {
},
methods: {
removeChidren(n) {
this.$confirm('确认删除该考试吗?删除后不可恢复').then(_ => {
this.chidrenList.splice(n, 1)
})
},
submitForm() {
let flag = false
......
......@@ -174,14 +174,18 @@ export default {
// 删除试题
handleDelete(id) {
console.log(id)
this.$confirm('确认删除该试题吗?删除后不可恢复').then(_ => {
const ids = id ? [id] : this.deleteQuestions
deleteQuestion({ ids: ids }).then(res => {
if (res.code === 0) {
this.$message({
message: '删除成功',
type: 'success'
})
}
this.$refs.list.refetch()
})
})
},
// 创建成功刷新列表
handleCreateSuccess() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论