添加任务列表刷新问题

This commit is contained in:
zhangyc
2022-12-01 16:11:41 +08:00
parent 6be6404bc1
commit d52e08444e
7 changed files with 22 additions and 21 deletions

View File

@@ -319,7 +319,7 @@ export default {
state.textV1 = "";
state.textV2 = "";
state.time = "";
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
};

View File

@@ -251,8 +251,8 @@ export default {
if (props.edit) {
api
.updateDiscuss(obj)
.then((res) => {
updateTask(res);
.then(async(res) => {
await updateTask(res);
closeDrawer();
ctx.emit("changeData", false);
message.destroy();
@@ -265,8 +265,8 @@ export default {
} else {
api
.createDiscuss(obj)
.then((res) => {
updateTask(res);
.then(async(res) => {
await updateTask(res);
closeDrawer();
ctx.emit("changeData", false);
message.destroy();

View File

@@ -304,9 +304,9 @@ export default {
};
if (props.EditWorkId > 0) {
updateWorkTaskUsing(obj)
.then((res) => {
.then(async(res) => {
// console.log("添加成功", res);
updateTask(res);
await updateTask(res);
ctx.emit("changeData", false);
closeDrawer();
})
@@ -316,9 +316,9 @@ export default {
});
} else {
createWorkTask(obj)
.then((res) => {
.then(async(res) => {
console.log("添加成功", res);
updateTask(res);
await updateTask(res);
ctx.emit("changeData", false);
closeDrawer();
})

View File

@@ -640,20 +640,20 @@ export default {
if (props.edit) {
api
.updateLiveBroadcastMessage(state.obj)
.then((res) => {
.then(async(res) => {
message.destroy();
message.success("提交成功");
updateTask(res);
await updateTask(res);
closeDrawer();
})
.catch(() => {});
} else {
api
.createLiveBroadcast(state.obj)
.then((res) => {
.then(async(res) => {
message.destroy();
message.success("提交成功");
updateTask(res);
await updateTask(res);
closeDrawer();
})
.catch(() => {});

View File

@@ -477,6 +477,7 @@ export default {
})
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
closeDrawer();
})
.catch(() => {

View File

@@ -727,8 +727,8 @@ export default {
if (props.edit) {
// 编辑任务
updateExamination(obj)
.then((res) => {
updateTask(res);
.then(async(res) => {
await updateTask(res);
closeDrawer();
})
.catch(() => {
@@ -737,8 +737,8 @@ export default {
} else {
// 创建任务
createExamination(obj)
.then((res) => {
updateTask(res);
.then(async(res) => {
await updateTask(res);
closeDrawer();
})
.catch(() => {

View File

@@ -353,9 +353,9 @@ export default {
if (props.edit) {
api
.editVote(obj)
.then((res) => {
.then(async(res) => {
console.log("updte======");
updateToTask(res);
await updateToTask(res);
closeDrawer();
message.destroy();
message.success("修改投票信息成功")
@@ -367,8 +367,8 @@ export default {
} else {
api
.createVote(obj)
.then((res) => {
updateToTask(res);
.then(async(res) => {
await updateToTask(res);
closeDrawer();
message.destroy();
message.success("创建投票信息成功")