检测计划列表编辑

This commit is contained in:
sjl
2025-07-29 18:35:46 +08:00
parent 6e22c01dd8
commit 0079f7415e
3 changed files with 56 additions and 26 deletions

View File

@@ -487,17 +487,28 @@ const exportClick = () => {
// 打开 drawer(新增、编辑)
const openDialog = (titleType: string, row: Partial<Plan.ReqPlan> = {}) => {
if(modeStore.currentMode == '比对式'){
if(row.children?.length > 0){
planPopup.value?.open(titleType, row,modeStore.currentMode,0)//0主计划 1子计划 2修改子计划
}else{
planPopup.value?.open(titleType, row,modeStore.currentMode,2)//0主计划 1子计划 2修改子计划
let planType = 0; // 0主计划 1子计划 2修改子计划
if (modeStore.currentMode === '比对式') {
if (titleType === 'add') {
// 新增只能是主计划
planType = 0;
} else {
// 编辑情况
if (row.children?.length > 0) {
// 有子计划 -> 主计划
planType = 0;
} else if (row.origin == null) {
// 没有来源 -> 主计划
planType = 0;
} else {
// 其他 -> 修改子计划
planType = 2;
}
}else{
planPopup.value?.open(titleType, row,modeStore.currentMode,0)//0主计划 1子计划 2修改子计划
}
}
planPopup.value?.open(titleType, row, modeStore.currentMode, planType);
}