Преглед изворни кода

Merge branch 'newVersion6.0' of http://192.168.2.236:10080/zhouna/newICSS into newVersion6.0

zhangxc пре 4 година
родитељ
комит
9aee2803b2

+ 1 - 1
src/components/DiagnosticList/index.jsx

@@ -303,7 +303,7 @@ class DiagnosticList extends Component {
                                        onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                                     >
                                       <span title={item.name} className={style['diag-name-box']} style={{'max-width': '300px'}}>
-                                        {item.name}ss
+                                        {item.name}
                                       </span>
                                       {/* <img className={`${style['info-img']}`}
                                           title='点击i图标可查看详细说明'

+ 14 - 4
src/components/PatInfo/index.jsx

@@ -1,7 +1,7 @@
 import React, { Component } from "react";
 import style from "./index.less";
 import Select from './Select/index'
-import {timesYMDTime} from '@utils/tools';
+import { timesYMDTime, timestampToTime} from '@utils/tools';
 import config from '@config/index';
 import Notify from '@commonComp/Notify';
 import { getHospitalInfo } from '@store/async-actions/historyTemplates';
@@ -43,7 +43,8 @@ class PatInfo extends Component {
         {
           label: 'systemTime',
           id: 'systemTime',
-          value: timesYMDTime(new Date().getTime()),
+          // value: timesYMDTime(new Date().getTime()),
+          value: timestampToTime(new Date().getTime()),
           title: '就诊时间',
           maxlength: 100
         },
@@ -101,7 +102,16 @@ class PatInfo extends Component {
       return item.id === e.target.id
     })      
     if (patientItem.id === 'patientAge'){
-      patientItem.value = e.target.value.replace(/[^\d]+/, '')
+      let temp = Math.round(e.target.value.replace(/[^\d\.]+/, ''))
+      if (isNaN(temp)){
+        patientItem.value = 50
+        Notify.info('请输入正确的年龄')
+        return 
+      }else {
+        patientItem.value = temp
+      }
+      
+      // patientItem.value = e.target.value.replace(/[^\d\.]+/, '')   //小数四舍五入_楼超强2020914
     } else {
       patientItem.value = e.target.value;
     }
@@ -168,7 +178,7 @@ class PatInfo extends Component {
                     ></Select>
                   )}
                   {item.id === 'patientAge' && (<input id={item.id} type="text" autocomplete="off" maxlength={11} value={item.value} onChange={this.handleChange} onFocus={this.inputOnFocus}/>)}
-                  {item.id === 'systemTime' && (<input id={item.id} type="text" autocomplete="off" disabled value={item.value} onChange={this.handleChange} onFocus={this.inputOnFocus}/>)}
+                  {item.id === 'systemTime' && (<input id={item.id} type="text" autocomplete="off" disabled value={item.value.split(' ')[0]} onChange={this.handleChange} onFocus={this.inputOnFocus}/>)}
                   {item.id !== 'patientAge' && item.id !== 'patientSex' && item.id !== 'systemTime' && (<input id={item.id} type="text" maxlength={item.maxlength} autocomplete="off" value={item.value} onChange={this.handleChange} onFocus={this.inputOnFocus}/>) }                  
                 </div>
               )

+ 1 - 1
src/store/actions/patInfo.js

@@ -80,7 +80,7 @@ export const reInitPatInfo = (state, action) => {
   res.patInfoData[1].value = action.params && action.params.patName;
   res.patInfoData[2].value = action.params && action.params.age;
   res.patInfoData[3].value = action.params && action.params.sex;
-  res.patInfoData[4].value = action.params && action.params.inquiryDate;
+  res.patInfoData[4].value = action.params && action.params.inquiryDate;   //2020/9/14
   res.patInfoData[5].value = action.params && action.params.deptName;
   res.patInfoData[6].value = action.params && action.params.doctorName;
   res.patInfoData[7].value = action.params && action.params.inquiryCode;

+ 9 - 7
src/store/async-actions/diagnosticSearch.js

@@ -41,13 +41,15 @@ export const getSearchList = (val,flag) => {
                 const data = res.data.data;let curDate=[];
 
                 let arr = data.diseaseNames||[];
-                    for (var key in arr) {
-                        let obj = {}
-                        obj['name'] = arr[key];
-                        obj['uniqueName'] = arr[key];
-                        obj['conceptId'] = '';
-                        curDate.push(obj)
-                    }
+                for(let i = 0;i < arr.length;i++){
+                    let tmp = arr[i]
+                    let obj = {}
+                    obj['name'] = tmp.name;
+                    obj['uniqueName'] = tmp.name;
+                    obj['conceptId'] = '';
+                    obj['icd10Code'] = tmp.icd10Code;
+                    curDate.push(obj)
+                }
                 if(flag){ 
                     dispatch({
                         type: GET_SEARCH,

+ 3 - 2
src/store/async-actions/print.js

@@ -159,8 +159,9 @@ export const saveMedicalData = () =>{
         "dataJson": JSON.stringify(Object.assign({}, jsonData)),
         "deptName": formatFormParmas('hospitalDeptName', patInfoData),
         "doctorName": formatFormParmas('doctorName', patInfoData),
-        "inquiryCode": formatFormParmas('recordId', patInfoData),
-        "inquiryDate": inquiryDate,
+        "inquiryCode": formatFormParmas('recordId', patInfoData), 
+        "inquiryDate": formatFormParmas('systemTime', patInfoData),   // 2020/9/14 编辑状态保存原有时间 _lcq
+        // "inquiryDate": inquiryDate,
         "modeName": modeName,
         "patName": formatFormParmas('patientName', patInfoData),
         "preview": JSON.stringify(preview),  // 左侧病历预览信息