|
@@ -182,14 +182,14 @@ const handleSingleExport = async () => {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
const wb = XLSX.utils.book_new()
|
|
const wb = XLSX.utils.book_new()
|
|
|
- const headers = ['日期', '时间', '体温', '脉搏', '呼吸', '血压', '血氧']
|
|
|
|
|
|
|
+ const headers = ['日期', '时间', '体温', '脉搏', '呼吸', '血压', '血氧', '测量人']
|
|
|
const colCount = headers.length
|
|
const colCount = headers.length
|
|
|
|
|
|
|
|
// 查询该长者所有数据
|
|
// 查询该长者所有数据
|
|
|
const data = await getVitalSignsPage({ ...queryParams, pageNo: 1, pageSize: 99999 })
|
|
const data = await getVitalSignsPage({ ...queryParams, pageNo: 1, pageSize: 99999 })
|
|
|
- const records: Recordable[] = data.list || []
|
|
|
|
|
|
|
+ const records: Recordable[] = Array.isArray(data?.list) ? data.list : []
|
|
|
if (records.length === 0) {
|
|
if (records.length === 0) {
|
|
|
- message.warning('未查询到该长者的生命体征数据')
|
|
|
|
|
|
|
+ message.warning(`未查询到长者「${queryParams.elderName}」的生命体征数据,无法导出`)
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -201,7 +201,7 @@ const handleSingleExport = async () => {
|
|
|
const first = records[0]
|
|
const first = records[0]
|
|
|
const infoItems = [
|
|
const infoItems = [
|
|
|
{ label: '姓名:', value: first.elderName || '', start: 0, span: 3 },
|
|
{ label: '姓名:', value: first.elderName || '', start: 0, span: 3 },
|
|
|
- { label: '床号:', value: first.bedName || '', start: 4, span: 3 }
|
|
|
|
|
|
|
+ { label: '床号:', value: first.bedName || '', start: 4, span: 4 }
|
|
|
]
|
|
]
|
|
|
const infoRow: string[] = new Array(colCount).fill('')
|
|
const infoRow: string[] = new Array(colCount).fill('')
|
|
|
infoItems.forEach((item) => {
|
|
infoItems.forEach((item) => {
|
|
@@ -216,7 +216,8 @@ const handleSingleExport = async () => {
|
|
|
stripMetric(row.pulse),
|
|
stripMetric(row.pulse),
|
|
|
stripMetric(row.respiratoryRate),
|
|
stripMetric(row.respiratoryRate),
|
|
|
[stripMetric(row.systolicPressure), stripMetric(row.diastolicPressure)].filter(Boolean).join('/'),
|
|
[stripMetric(row.systolicPressure), stripMetric(row.diastolicPressure)].filter(Boolean).join('/'),
|
|
|
- stripMetric(row.bloodOxygenSaturation)
|
|
|
|
|
|
|
+ stripMetric(row.bloodOxygenSaturation),
|
|
|
|
|
+ row.measuringName || ''
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
// 护士签名行
|
|
// 护士签名行
|
|
@@ -234,7 +235,16 @@ const handleSingleExport = async () => {
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
// 列宽
|
|
// 列宽
|
|
|
- ws['!cols'] = [{ wch: 14 }, { wch: 12 }, { wch: 10 }, { wch: 10 }, { wch: 10 }, { wch: 12 }, { wch: 10 }]
|
|
|
|
|
|
|
+ ws['!cols'] = [
|
|
|
|
|
+ { wch: 14 },
|
|
|
|
|
+ { wch: 12 },
|
|
|
|
|
+ { wch: 10 },
|
|
|
|
|
+ { wch: 10 },
|
|
|
|
|
+ { wch: 10 },
|
|
|
|
|
+ { wch: 12 },
|
|
|
|
|
+ { wch: 10 },
|
|
|
|
|
+ { wch: 12 }
|
|
|
|
|
+ ]
|
|
|
|
|
|
|
|
// 行高
|
|
// 行高
|
|
|
ws['!rows'] = [
|
|
ws['!rows'] = [
|