|
|
@ -213,9 +213,6 @@ const formsSuccess = async (formType,data) => { |
|
|
|
const detailRef = ref() |
|
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
|
detailMasterId.value = row.id |
|
|
|
InspectionStageApi.getInspectionStageNoPage({masterId:row.id}).then(res=>{ |
|
|
|
detailList.value = res |
|
|
|
}) |
|
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicDynamicRule') |
|
|
|
} |
|
|
|
|
|
|
@ -323,15 +320,16 @@ const detailValidate = (type,data) => { |
|
|
|
} |
|
|
|
|
|
|
|
const detailOpenForm = (type, row, masterParmas) => { |
|
|
|
|
|
|
|
detailMasterId.value = masterParmas.masterId |
|
|
|
InspectionStageApi.getInspectionStageNoPage({masterId:masterParmas.masterId}).then(res=>{ |
|
|
|
detailList.value = res |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const validateIfRepeat = (type,data) => { |
|
|
|
let mergedArray: any[] = []; |
|
|
|
if(type == 'create'){ |
|
|
|
if(type == 'create' || type == 'update'){ |
|
|
|
mergedArray = [data, ...detailList.value]; |
|
|
|
}else if(type == 'update'){ |
|
|
|
mergedArray = [...detailList.value]; |
|
|
|
} |
|
|
|
const stageSet = new Set(mergedArray.map(item => item.stage)); |
|
|
|
return stageSet.size === mergedArray.length; |
|
|
|