| | |
| | | image:body.image, |
| | | request_doctor:body.requestDoctor, |
| | | request_department:body.requestDepartment, |
| | | request_date:body.requestDate, |
| | | request_date:getDateString(body.requestDate), |
| | | exam_department:body.examDepartment, |
| | | diagnostician_doctor:body.diagnosticianDoctor, |
| | | check_date:body.checkDate, |
| | | check_date:getDateString(body.checkDate), |
| | | check_result:body.checkResult, |
| | | diagnosis:body.diagnosis, |
| | | exam_type_id:body.examTypeId, |
| | |
| | | |
| | | return age; |
| | | } |
| | | |
| | | /** |
| | | * 时间戳转string 输出: "2024-01-08 00:00:00" (假设时区为东八区) |
| | | * @param {*} date |
| | | */ |
| | | function getDateString(date){ |
| | | try{ |
| | | if(date){ |
| | | let timestamp = 1734624000000; |
| | | let d = new Date(timestamp); |
| | | return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')} ${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`; |
| | | }else{ |
| | | return '' |
| | | } |
| | | } |
| | | catch(err){ |
| | | console.log(err) |
| | | return '' |
| | | } |
| | | |
| | | |
| | | } |