提交 386caf67 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 5ac73792
......@@ -53,7 +53,7 @@ export default {
{
label: '删除',
isShow(row) {
return row.status !== 2
return row.status === -1
},
onClick: row => {
this.handleRemove(row)
......
......@@ -47,7 +47,7 @@ export default {
{
label: '删除',
isShow(row) {
return row.status !== 2
return row.status === -1
},
onClick: row => {
this.handleRemove(row)
......
......@@ -140,18 +140,31 @@ export default {
},
// 获取课程
getCourses() {
api.getRetakeCourses().then(response => {
this.courseList = response || []
if (!this.isEdit && !this.isView && !this.courseList.length) {
this.$alert('您没有需要重修的课程', {
type: 'warning',
confirmButtonText: '确定',
callback: action => {
this.goBack()
}
})
}
})
api
.getRetakeCourses()
.then(response => {
this.courseList = response || []
if (!this.isEdit && !this.isView && !this.courseList.length) {
this.$alert('您没有需要重修的课程', {
type: 'warning',
confirmButtonText: '确定',
callback: action => {
this.goBack()
}
})
}
})
.catch(() => {
if (!this.isEdit && !this.isView) {
this.$alert('您没有需要重修的课程', {
type: 'warning',
confirmButtonText: '确定',
callback: action => {
this.goBack()
}
})
}
})
},
// 获取详情
getDetail() {
......
......@@ -59,15 +59,6 @@ export default {
onClick: row => {
this.handleCancel(row)
}
},
{
label: '删除',
isShow(row) {
return [0, 1].includes(row.status)
},
onClick: row => {
this.handleRemove(row)
}
}
]
}
......
......@@ -45,7 +45,7 @@ export default {
{
label: '删除',
isShow(row) {
return row.status !== 2
return row.status === -1
},
onClick: row => {
this.handleRemove(row)
......
......@@ -45,7 +45,7 @@ export default {
{
label: '删除',
isShow(row) {
return row.status !== 2
return row.status === -1
},
onClick: row => {
this.handleRemove(row)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论