编辑讨论获取信息

This commit is contained in:
岳佳鑫
2022-11-07 19:33:21 +08:00
parent 2ed621cdeb
commit 74b52ac5fc
2 changed files with 21 additions and 6 deletions

View File

@@ -168,14 +168,21 @@ export default {
}; };
if(props.edit){ if(props.edit){
//console.log("编辑"); //console.log("编辑");
console.log("props.editDiscussId",props.editDiscussId)
let obj = {
discussId: props.editDiscussId,
}
console.log(obj)
api api
.updateDiscuss(obj) .getDiscussDetail(obj)
.then((res) => { .then((res) => {
console.log("编辑成功", res); console.log("获取成功",res.data);
message.success("编辑成功");
closeDrawer();
}) })
.catch((err) => console.log(err)); .catch((err) => {
console.log("获取失败",err.data);
})
}else{ }else{
api api
.createDiscuss(obj) .createDiscuss(obj)

View File

@@ -852,6 +852,7 @@ export default {
isLiveEdit: 1, //直播编辑 isLiveEdit: 1, //直播编辑
EditRefId: null, //要编辑的外链的id EditRefId: null, //要编辑的外链的id
EditLiveId: null, //要编辑的直播的id EditLiveId: null, //要编辑的直播的id
editDiscussId:null,//要编辑的讨论的id
projectNameList: [ projectNameList: [
{ {
id: 1, id: 1,
@@ -1776,6 +1777,11 @@ export default {
const showDrawerAddDiscuss = () => { const showDrawerAddDiscuss = () => {
state.adddiscussvisible = true; state.adddiscussvisible = true;
}; };
//打开编辑讨论的弹窗
const showEditAddDiscuss = (id)=>{
state.editDiscussId = id
state.adddiscussvisible = true;
}
const showDrawerAddActive = () => { const showDrawerAddActive = () => {
state.addactivevisible = true; state.addactivevisible = true;
}; };
@@ -1899,7 +1905,9 @@ export default {
} else if (type == "投票") { } else if (type == "投票") {
showDrawerAddVote(id); showDrawerAddVote(id);
} else if (type == "讨论") { } else if (type == "讨论") {
showDrawerAddDiscuss(id); showEditAddDiscuss(id);
} else if (type == "活动") {
showDrawerAddActive(id);
} }
}; };
return { return {