装备新增优化

This commit is contained in:
hongchao 2024-12-20 16:42:24 +08:00
parent a1df56f610
commit faa7a61755
1 changed files with 49 additions and 1 deletions

View File

@ -245,6 +245,7 @@ const getDetailData = async (row: any) => {
examinationPdf,
devInfoProperties,
identifyCode,
tableList,
} = res
Object.assign(addAndEditForm, {
@ -267,6 +268,7 @@ const getDetailData = async (row: any) => {
insurancePdf,
examinationPdf,
devInfoProperties,
tableList,
})
if (settleinTitle.value == '装备编辑') {
@ -288,7 +290,53 @@ const getDetailData = async (row: any) => {
descriptionFormList.value[0].examinationPdfs = examinationPdf
options.value = []
addAndEditForm.deviceTypeList = getSelectId(deviceTypeTree.value, addAndEditForm.typeId)
warningDays.value = addAndEditForm.deviceTypeList.maintenanceAlarmDay
propertyNames.value = addAndEditForm.devInfoProperties
equipTableList.value = [];
if(isEditForm.value == true){
if(addAndEditForm.tableList!=null){
addAndEditForm.tableList.forEach((item:any) =>{
equipTableList.value.push({
identifyCodes: item.identifyCodes,
name2: item.insurancePdf[0].fileUrl,
checkMan: item.checkMan,
checkDate: item.checkDate,
nextCheckDate: item.nextCheckDate,
name6: item.examinationPdf[0].fileUrl,
insurancePdf: item.insurancePdf,
examinationPdf: item.examinationPdf,
})
})
}else{
equipTableList.value = [{
identifyCodes: '',
name2: '',
checkMan: '',
checkDate: '',
nextCheckDate: '',
name6: '',
insurancePdf: [],
examinationPdf: [],
}]
}
}else{
if(addAndEditForm.tableList!=null){
addAndEditForm.tableList.forEach((item:any) =>{
equipTableList.value.push({
identifyCodes: item.identifyCodes,
name2: item.insurancePdf[0].fileUrl,
checkMan: item.checkMan,
checkDate: item.checkDate,
nextCheckDate: item.nextCheckDate,
name6: item.examinationPdf[0].fileUrl,
insurancePdf: item.insurancePdf,
examinationPdf: item.examinationPdf,
})
})
}else{
equipTableList.value = []
}
}
// addAndEditForm.deviceTypeList[0].data.propertyNames.forEach((item:any) =>{
// options.value.push({'label':item,'value':item})
// })
@ -2074,7 +2122,7 @@ const changeDate = (row:any,index:number) => {
"
>
<el-button size="mini" type="primary" @click="handleAddBack">添加</el-button>
<el-button size="mini" type="danger" @click="handleDeleteBack($index)">删除</el-button>
<el-button size="mini" type="danger" @click="handleDeleteBack($index)" v-show="$index!=0">删除</el-button>
</div>
</template>
</el-table-column>