功能细化
This commit is contained in:
@@ -98,7 +98,9 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ["catalogueId","catalogueTitle"],
|
||||
data() {
|
||||
|
||||
return {
|
||||
drawerVisible: true,
|
||||
selectType: [],
|
||||
@@ -163,16 +165,44 @@ export default {
|
||||
} else if (this.multipleSelection.length > 1) {
|
||||
this.$message.error("只可以选择一门课程进行迁移哦~");
|
||||
} else {
|
||||
this.$confirm(
|
||||
`即将迁移到 ${this.multipleSelection[0].title}课程内, 是否继续?'`,
|
||||
this.$confirm(
|
||||
`${this.catalogueTitle}目录 即将迁移到 ${this.multipleSelection[0].title}课程内, 是否继续?`,
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}
|
||||
).then(() => {
|
||||
).then(() => {
|
||||
|
||||
if(!this.catalogueId){
|
||||
this.$message.error('请重新选择您要转移的课程目录')
|
||||
return
|
||||
}
|
||||
// console.log(this.catalogueId, this.multipleSelection[0].id)
|
||||
// 走接口 并关闭
|
||||
this.drawerHandleClose()
|
||||
this.$http
|
||||
.request({
|
||||
url: this.$http.adornUrl(
|
||||
`/master/course/courseCatalogueTransfer`
|
||||
),
|
||||
method: "POST",
|
||||
data: {
|
||||
courseId: this.multipleSelection[0].id, //新课程id
|
||||
catalogueId: this.catalogueId //目录id
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
console.log("********:", res);
|
||||
this.$message.success('操作成功')
|
||||
this.drawerHandleClose()
|
||||
}).catch(()=>{
|
||||
this.$message.error('操作失败')
|
||||
});
|
||||
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs["moveCourse"].getDataList();
|
||||
// });
|
||||
|
||||
Reference in New Issue
Block a user