检测计划列表编辑
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user