소스 검색

优化聊天记录取值逻辑

yanqiliang 2 달 전
부모
커밋
69b2d20343
2개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 4
      src/pages/nurse/MedicalRecord/MedicalRecord.jsx
  2. 1 1
      src/pages/nurse/Patient/PatientCourse.jsx

+ 4 - 4
src/pages/nurse/MedicalRecord/MedicalRecord.jsx

@@ -476,14 +476,14 @@ class MedicalRecord extends React.Component {
                     if (admID) {
                         this.setState({
                             baseInfo: res.result.baseInfo,
-                            diagnoseTempObj: res.result.diagnoseObj,
-                            orderTempPresc: res.result.orderPresc,
+                            diagnoseTempObj: res.result.diagnoseObj || [],
+                            orderTempPresc: res.result.orderPresc || [],
                         })
                     } else {
                         this.setState({
                             baseInfo: res.result.baseInfo,
-                            diagnoseObj: res.result.diagnoseObj,
-                            orderPresc: res.result.orderPresc,
+                            diagnoseObj: res.result.diagnoseObj || [],
+                            orderPresc: res.result.orderPresc || [],
                         })
                     }
 

+ 1 - 1
src/pages/nurse/Patient/PatientCourse.jsx

@@ -174,7 +174,7 @@ class PatientCourse extends Component {
         let data = {
             params: [{
                 admID: admID,
-                frUser: 'user' + (userData.userID || ''),
+                frUser: 'user' + (this.state.consultationInfo?.admDocID || userData.userID || ''),
                 toUser: 'patient' + (this.props.patID || patientData.patID || ''),
                 lastMsgID: ''
             }]