课程管理列表适应管理端的调整

This commit is contained in:
daihh
2023-03-04 14:39:16 +08:00
parent c33f71f64f
commit 9778a7f7ee
3 changed files with 54 additions and 7 deletions

View File

@@ -374,14 +374,19 @@ export default {
catalogs: {
addNewZhang: false,
addNewCell: false,
}
},
extendRefId:'',
extendRefType:'',
};
},
mounted() {
let chooseFlag=this.$route.query.f;
this.extendRefId=this.$route.query.refId;
this.extendRefType=this.$route.query.refId;
if(chooseFlag && chooseFlag=='choose'){
this.forChoose=true;
}
if(this.$route.query && this.$route.query.page && this.$route.query.page == 'manage') {
this.pageManage=true;
}
@@ -484,12 +489,18 @@ export default {
},
// 复制
copyCourse(item) {
let $this=this;
this.$confirm('您确定要复制此课程吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
apiCourse.copyCourse(item.id).then(rs=>{
let reqdata={
id:item.id,
refId:$this.extendRefId,
refType:$this.extendRefType,
}
apiCourse.copyCourse(reqdata).then(rs=>{
if(rs.status==200){
this.$message.success("复制课程成功");
this.searchData();
@@ -614,6 +625,12 @@ export default {
if(pageReset){
this.page.pageIndex=1;
}
if(this.extendRefId){
this.params.refId=this.extendRefId;
}
if(this.extendRefType){
this.params.refType=this.extendRefType;
}
this.params.resOwner1 = this.resOwner[0];
this.params.resOwner2 = this.resOwner[1];
this.params.resOwner3 = this.resOwner[2];