链路:保存时添加错误提示

This commit is contained in:
高云鹏 2024-11-21 16:39:08 +08:00
parent 229805f40b
commit 6645e4598f
2 changed files with 6 additions and 5 deletions

View File

@ -424,7 +424,11 @@ const saveMappingList = (data: any[]) => {
if (res.success) {
ElMessage.success('保存成功!')
resetExcel()
}else{
ElMessage.warning(res.msg ?? '保存失败!')
}
}).catch(()=>{
ElMessage.error('保存失败!')
})
}
const uploadRef = ref<UploadInstance>()

View File

@ -713,7 +713,7 @@ export const createUpLoadExcelData = (workbookData: any) => {
continue
}
params[sheetkeyMap[fieldKey]] = sheets[item].cellData[key][fieldKey]?.v ?? ''
}
}
sheetData.params = JSON.stringify(params)
data.push(sheetData)
}
@ -723,9 +723,7 @@ export const createUpLoadExcelData = (workbookData: any) => {
}
export const createSheetData = (data: any, protocol: string | number) => {
console.log('createSheetData')
if (!protocol) return {}
const excelCellDataMap: any = {}
const headerData = createHeaderData(protocol)
const resultData: any = {}
@ -754,8 +752,7 @@ export const createSheetData = (data: any, protocol: string | number) => {
})
})
resultData[item] = result
})
})
return resultData
}