新增检测计划默认显示,为空判断

This commit is contained in:
sjl
2025-06-11 16:01:23 +08:00
parent 16b446bf20
commit 1eb141e559

View File

@@ -390,11 +390,11 @@ const open = async (sign: string,
boundPqDevList.value = []; boundPqDevList.value = [];
//楼下场景新增下拉框需要默认 //楼下场景新增下拉框需要默认
formContent.scriptId = pqScriptList.value[0].id; formContent.scriptId = pqScriptList.value[0]?.id ?? '';
formContent.errorSysId = pqErrSysList.value[0].id; formContent.errorSysId = pqErrSysList.value[0]?.id ?? '';
formContent.sourceIds = pqSourceList.value[0].id; formContent.sourceIds = pqSourceList.value[0]?.id ?? '';
formContent.datasourceIds = dictStore.getDictData('Datasource')[0].code; formContent.datasourceIds = dictStore.getDictData('Datasource')[0]?.code ?? '';
formContent.dataRule = dictStore.getDictData('Data_Rule')[0].id; formContent.dataRule = dictStore.getDictData('Data_Rule')[0]?.id ?? '';
}else{//编辑时先给表单赋值(这会没接收被检设备),需要手动再给被检设备复制后整体表单赋值 }else{//编辑时先给表单赋值(这会没接收被检设备),需要手动再给被检设备复制后整体表单赋值