-- fix bug

This commit is contained in:
yuping
2023-03-02 12:03:12 +08:00
parent 369fa8e263
commit 5888be784d

View File

@@ -541,7 +541,12 @@ const deleteStage = () => {
content: projectInfo.value.stageList.length === 1 ? "当前为最后一个阶段,删除后任务将被移出,为无阶段模式,确认删除阶段吗?" : '确认删除此阶段吗?', content: projectInfo.value.stageList.length === 1 ? "当前为最后一个阶段,删除后任务将被移出,为无阶段模式,确认删除阶段吗?" : '确认删除此阶段吗?',
ok: () => { ok: () => {
message.success("删除成功"); message.success("删除成功");
projectInfo.value.stageList[activeIndex.value].id ? (projectInfo.value.stageList[activeIndex.value].deleted = true) : projectInfo.value.stageList.splice(activeIndex.value, 1) if (projectInfo.value.stageList[activeIndex.value].id) {
projectInfo.value.stageList[activeIndex.value].deleted = true
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList?.forEach((t, i) => t.id ? (t.deleted = true) : projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.splice(i, 1));
} else {
projectInfo.value.stageList.splice(activeIndex.value, 1)
}
activeIndex.value && (activeIndex.value = activeIndex.value - 1); activeIndex.value && (activeIndex.value = activeIndex.value - 1);
}, },
}); });