mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
添加任务列表刷新问题
This commit is contained in:
@@ -319,7 +319,7 @@ export default {
|
|||||||
state.textV1 = "";
|
state.textV1 = "";
|
||||||
state.textV2 = "";
|
state.textV2 = "";
|
||||||
state.time = "";
|
state.time = "";
|
||||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
|
||||||
localStorage.setItem("stageId", props.chooseStageId);
|
localStorage.setItem("stageId", props.chooseStageId);
|
||||||
localStorage.setItem("chapterId", props.isactive);
|
localStorage.setItem("chapterId", props.isactive);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -251,8 +251,8 @@ export default {
|
|||||||
if (props.edit) {
|
if (props.edit) {
|
||||||
api
|
api
|
||||||
.updateDiscuss(obj)
|
.updateDiscuss(obj)
|
||||||
.then((res) => {
|
.then(async(res) => {
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
@@ -265,8 +265,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
api
|
api
|
||||||
.createDiscuss(obj)
|
.createDiscuss(obj)
|
||||||
.then((res) => {
|
.then(async(res) => {
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
|
|||||||
@@ -304,9 +304,9 @@ export default {
|
|||||||
};
|
};
|
||||||
if (props.EditWorkId > 0) {
|
if (props.EditWorkId > 0) {
|
||||||
updateWorkTaskUsing(obj)
|
updateWorkTaskUsing(obj)
|
||||||
.then((res) => {
|
.then(async(res) => {
|
||||||
// console.log("添加成功", res);
|
// console.log("添加成功", res);
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
})
|
})
|
||||||
@@ -316,9 +316,9 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
createWorkTask(obj)
|
createWorkTask(obj)
|
||||||
.then((res) => {
|
.then(async(res) => {
|
||||||
console.log("添加成功", res);
|
console.log("添加成功", res);
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -640,20 +640,20 @@ export default {
|
|||||||
if (props.edit) {
|
if (props.edit) {
|
||||||
api
|
api
|
||||||
.updateLiveBroadcastMessage(state.obj)
|
.updateLiveBroadcastMessage(state.obj)
|
||||||
.then((res) => {
|
.then(async(res) => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("提交成功");
|
message.success("提交成功");
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
} else {
|
} else {
|
||||||
api
|
api
|
||||||
.createLiveBroadcast(state.obj)
|
.createLiveBroadcast(state.obj)
|
||||||
.then((res) => {
|
.then(async(res) => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("提交成功");
|
message.success("提交成功");
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
|||||||
@@ -477,6 +477,7 @@ export default {
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||||
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -727,8 +727,8 @@ export default {
|
|||||||
if (props.edit) {
|
if (props.edit) {
|
||||||
// 编辑任务
|
// 编辑任务
|
||||||
updateExamination(obj)
|
updateExamination(obj)
|
||||||
.then((res) => {
|
.then(async(res) => {
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@@ -737,8 +737,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
// 创建任务
|
// 创建任务
|
||||||
createExamination(obj)
|
createExamination(obj)
|
||||||
.then((res) => {
|
.then(async(res) => {
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|||||||
@@ -353,9 +353,9 @@ export default {
|
|||||||
if (props.edit) {
|
if (props.edit) {
|
||||||
api
|
api
|
||||||
.editVote(obj)
|
.editVote(obj)
|
||||||
.then((res) => {
|
.then(async(res) => {
|
||||||
console.log("updte======");
|
console.log("updte======");
|
||||||
updateToTask(res);
|
await updateToTask(res);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("修改投票信息成功")
|
message.success("修改投票信息成功")
|
||||||
@@ -367,8 +367,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
api
|
api
|
||||||
.createVote(obj)
|
.createVote(obj)
|
||||||
.then((res) => {
|
.then(async(res) => {
|
||||||
updateToTask(res);
|
await updateToTask(res);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("创建投票信息成功")
|
message.success("创建投票信息成功")
|
||||||
|
|||||||
Reference in New Issue
Block a user