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

bug fixes

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