讲师管理bug

This commit is contained in:
zhangsir
2024-12-23 09:14:56 +08:00
parent 9de8eb61d8
commit f5bb824397
2 changed files with 38 additions and 24 deletions

View File

@@ -4474,9 +4474,13 @@ function onFocusEnd(){
dialog({
content: "确定撤回吗?",
ok: () => {
message.success("撤回成功");
record.publishStatus ? (state.tableData1[index].publishStatus = 0) : (state.tableData1[index].auditStatus = 0);
handle({ offcourseId: id, type: 0 });
handle({ offcourseId: id, type: 0 }).then(res=>{
message.success("撤回成功");
record.publishStatus ? (state.tableData1[index].publishStatus = 0) : (state.tableData1[index].auditStatus = 0);
}).catch(err=>{
message.destroy();
message.error(err.data.msg);
})
},
});
};
@@ -4860,10 +4864,14 @@ function onFocusEnd(){
dialog({
content: "确定删除该课程吗?",
ok: async () => {
message.success("删除成功");
state.tableLoading = true;
await handle({ offcourseId: id, type: -1 });
getTableDate();
await handle({ offcourseId: id, type: -1 }).then(res=>{
message.success("删除成功");
state.tableLoading = true;
getTableDate();
}).catch(err=>{
message.destroy()
message.error(err.data.msg)
})
},
});
};
@@ -4912,9 +4920,14 @@ function onFocusEnd(){
dialog({
content: "确定停用该课程吗?",
ok: () => {
message.success("停用成功");
record.status = 0;
handle({ offcourseId: record.id, type: -2 });
handle({ offcourseId: record.id, type: -2 }).then(res=>{
console.log(res,'handleStop')
message.success("停用成功");
record.status = 0;
}).catch(err=>{
message.destroy()
message.error(err.data.msg)
})
},
});
};