mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
添加任务列表刷新问题
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
})
|
||||
|
||||
@@ -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(() => {});
|
||||
|
||||
@@ -477,6 +477,7 @@ export default {
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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("创建投票信息成功")
|
||||
|
||||
Reference in New Issue
Block a user