feat:合并

This commit is contained in:
songwc
2022-11-07 17:25:00 +08:00
parent 2f093f96c7
commit fe744abde2
3 changed files with 94 additions and 53 deletions

View File

@@ -501,6 +501,7 @@
margin-right: 25px;
cursor: pointer;
"
@click="decideType(element.lei, element.courseId)"
>
编辑
</span>
@@ -871,6 +872,10 @@ export default {
name: "默认关卡",
},
],
isRefEdit: 1, //外链编辑
isLiveEdit: 1, //直播编辑
EditRefId: null, //要编辑的外链的id
EditLiveId: null, //要编辑的直播的id
tableData: [
{
key: 1,
@@ -1687,18 +1692,39 @@ export default {
let obj = {
chapterId: state.isactive,
routerTaskIdList: state.selectRow,
}
};
api
.moveTask(obj)
.then((res) => {
console.log("移动成功", res);
message.destroy();
message.success("移动成功");
})
.catch((err) => {
console.log("移动失败",err);
})
}
.moveTask(obj)
.then((res) => {
console.log("移动成功", res);
message.destroy();
message.success("移动成功");
})
.catch((err) => {
console.log("移动失败", err);
});
};
//打开编辑外链的弹窗
const showEditRefDrawer = (id) => {
state.addrefvisible = true;
state.isRefEdit = 2;
state.EditRefId = id;
};
//打开编辑直播的弹窗
const showEditLiveDrawer = (id) => {
state.addlivevisible = true;
state.isLiveEdit = 2;
state.EditLiveId = id;
};
//编辑的按钮
const decideType = (type, id) => {
console.log(type, id);
if (type == "外链") {
showEditRefDrawer(id);
} else if (type == "直播") {
showEditLiveDrawer(id);
}
};
return {
...toRefs(state),
// tableDataFunc,
@@ -1737,6 +1763,9 @@ export default {
deletecTaskAll,
moveTask,
showDeleteModal,
showEditRefDrawer,
showEditLiveDrawer,
decideType,
};
},
};