mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 12:56:45 +08:00
-- fix bug
This commit is contained in:
@@ -477,17 +477,20 @@ const deleteTaskAll = () => {
|
||||
return
|
||||
}
|
||||
dialog({
|
||||
content: '确定要批量删除任务吗?',
|
||||
content: '确定要删除所选任务吗?',
|
||||
ok: () => {
|
||||
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.filter(t => t.checked).forEach((t,i) => {
|
||||
if(t.id){
|
||||
t.checked = false;
|
||||
t.deleted = true;
|
||||
}else{
|
||||
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.splice(i,1)
|
||||
for (let i = 0; i < projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.length; i++) {
|
||||
const t = projectInfo.value.stageList[activeIndex.value].taskDraftDtoList[i]
|
||||
if (t.checked) {
|
||||
if (t.id) {
|
||||
t.checked = false;
|
||||
t.deleted = true;
|
||||
} else {
|
||||
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.splice(i, 1);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -497,7 +500,7 @@ const confirmDelTask = (index) => {
|
||||
content: '确定要删除此任务吗?',
|
||||
ok: () => {
|
||||
message.success("删除成功");
|
||||
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList[index].id?(projectInfo.value.stageList[activeIndex.value].taskDraftDtoList[index].deleted = true):projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.splice(index,1)
|
||||
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList[index].id ? (projectInfo.value.stageList[activeIndex.value].taskDraftDtoList[index].deleted = true) : projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.splice(index, 1)
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -535,7 +538,7 @@ const deleteStage = () => {
|
||||
content: projectInfo.value.stageList.length === 1 ? "当前为最后一个阶段,删除后任务将被移出,为无阶段模式,确认删除阶段吗?" : '确认删除此阶段吗?',
|
||||
ok: () => {
|
||||
message.success("删除成功");
|
||||
projectInfo.value.stageList[activeIndex.value].id?(projectInfo.value.stageList[activeIndex.value].deleted = true):projectInfo.value.stageList.splice(activeIndex.value,1)
|
||||
projectInfo.value.stageList[activeIndex.value].id ? (projectInfo.value.stageList[activeIndex.value].deleted = true) : projectInfo.value.stageList.splice(activeIndex.value, 1)
|
||||
activeIndex.value && (activeIndex.value = activeIndex.value - 1);
|
||||
},
|
||||
});
|
||||
@@ -556,12 +559,12 @@ const removeAllLevel = () => {
|
||||
content: '确定要删除所有阶段吗?',
|
||||
ok: () => {
|
||||
message.success("删除成功");
|
||||
projectInfo.value.stageList.forEach((t,i) => {
|
||||
if(t.id){
|
||||
projectInfo.value.stageList.forEach((t, i) => {
|
||||
if (t.id) {
|
||||
t.checked = false;
|
||||
t.deleted = true;
|
||||
}else{
|
||||
projectInfo.value.stageList.splice(i,1)
|
||||
} else {
|
||||
projectInfo.value.stageList.splice(i, 1)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user