Browse Source

Merge branch 'optimize' into dev/new1

Luolei 6 years ago
parent
commit
8f9b6c6ebb
31 changed files with 442 additions and 249 deletions
  1. 1 1
      src/common/components/Calendar/index.jsx
  2. 2 2
      src/components/AddAssistCheck/Textarea/index.jsx
  3. 85 32
      src/components/AddAssistCheck/index.jsx
  4. 111 79
      src/components/AddAssistCheck/index.less
  5. 2 2
      src/components/AddInspect/SlideExcel/index.jsx
  6. 42 17
      src/components/AddInspect/SlideSelect/index.jsx
  7. 10 10
      src/components/AddInspect/index.jsx
  8. 2 1
      src/components/AssistCheck/index.jsx
  9. 14 14
      src/components/EmergencyProcedure/EmergencyPart/PartSec/index.jsx
  10. 8 8
      src/components/EmergencyProcedure/EmergencyPart/PartTrd/index.jsx
  11. 12 8
      src/components/EmergencyProcedure/EmergencyPart/index.jsx
  12. 4 4
      src/components/EmergencyProcedure/emergency.js
  13. 11 1
      src/components/Inspect/index.jsx
  14. 11 4
      src/components/MedicalInfo/index.jsx
  15. 5 2
      src/components/PreviewBody/Inspect/index.jsx
  16. 29 3
      src/components/PreviewBody/index.jsx
  17. 6 5
      src/components/PushItems/index.jsx
  18. 11 4
      src/components/ScaleSearch/index.jsx
  19. 1 2
      src/components/WrapModalBody/Item/index.jsx
  20. 7 1
      src/components/WrapModalBody/WrapModalTable/index.jsx
  21. 30 25
      src/components/WrapModalBody/index.jsx
  22. 5 0
      src/components/WrapModalBody/index.less
  23. 1 1
      src/components/WrapModalBodyPac/WrapModalRight/index.jsx
  24. 5 1
      src/components/WrapModalBodyPac/index.less
  25. 3 2
      src/containers/AssistCheck.js
  26. 4 4
      src/containers/Inspect.js
  27. 3 2
      src/store/actions/inspect.js
  28. 2 2
      src/store/async-actions/inspect.js
  29. 10 12
      src/store/reducers/assistCheck.js
  30. 4 0
      src/store/reducers/inspect.js
  31. 1 0
      src/utils/tools.js

+ 1 - 1
src/common/components/Calendar/index.jsx

@@ -139,7 +139,7 @@ class Calendar extends React.Component {
         <Content selectTime={this.state.select} year={this.state.year} month={this.state.month} day={this.state.day} handleClick={(info) => this.handleChange(info)} canSelectFuture={this.props.canSelectFuture} />
         {this.genTimeComponent()}
         {
-          this.props.sure ? <div className={style.timeSure} onClick={() => this.timeSure({})}>确定</div> : ''
+          this.props.sure ? <div className={style.timeSure} onClick={() => this.timeSure({})} id="getSureTime">确定</div> : ''
         }
       </div>
     )

+ 2 - 2
src/components/AddAssistCheck/Textarea/index.jsx

@@ -66,11 +66,11 @@ class Textarea extends Component {
     this.textInput.current.previousSibling.focus();
   }
   render() {
-    const {idx} = this.props;
+    const {idx,disabled} = this.props;
     return (
       <div className={style.textWap}>
         <div className={style.divTextarea}
-            contenteditable={true}
+            contenteditable={disabled?false:true}
             ref={this.$dom}
             onInput={this.handleInput}
             onKeyUp={this.handleInput}

+ 85 - 32
src/components/AddAssistCheck/index.jsx

@@ -3,7 +3,7 @@ import { SearchOption, Calendar, ConfirmModal, Notify, Add ,DelToast} from '@com
 import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
-import { getPageCoordinate } from '@utils/tools';
+import { getPageCoordinate,getCurrentDate } from '@utils/tools';
 import close from './img/close.png';
 
 class AddAssistCheck extends React.Component {
@@ -26,6 +26,7 @@ class AddAssistCheck extends React.Component {
     this.handleDelClick = this.handleDelClick.bind(this)
     this.delConfirm = this.delConfirm.bind(this)
     this.handleCancel = this.handleCancel.bind(this)
+    this.timeSure = this.timeSure.bind(this)
   }
 
   handleDelClick(id,item) {
@@ -80,7 +81,7 @@ class AddAssistCheck extends React.Component {
         }
       }
     });
-    this.getCurrentDate();
+    getCurrentDate(1);
   }
   handleSearchShow(e) {
     let tmpShow = this.state.show;
@@ -140,42 +141,94 @@ class AddAssistCheck extends React.Component {
       }
     </ul>
   }
+  handleChangeDate(){}
+  timeSure(date,idx){
+    this.props.handleChangeDate(date,idx)
+    this.setState({ date: false })
+  }
+
   getAssistLabel() {
-    const { assistLabel, handleChangeAssistValue, handleChangeDate, isRead, handlePush, winWidth,getInfomation } = this.props;
+    const { assistLabel,checkedListImport, handleChangeAssistValue, handleChangeDate, isRead, handlePush, winWidth,getInfomation,assistList } = this.props;
+    console.log(checkedListImport)
     const { visible,activeName,id,date } = this.state;
-    return <ul className={styles.labelWrap} id="datePick">
+    return <React.Fragment>
       {
-        assistLabel.map((item, idx) => {
-          return (<li key={item.questionId} className={`${styles.assistLists} ${styles.clearfix}`}>
-            <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
-              <span className={styles.tagSpan}>
-                {item.name}:
-                <span className={styles.imgInfo} onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
-              </span>
-            </span>
-            <div className={styles.textareaWrap}>
-              <Textarea value={item.value} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
-            </div>
-            <div className={styles.pointerFinger}>
-              <p onClick={() => this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
-              <i onClick={() => this.handleShowDate(idx)}></i>
-              {/*<a href="javascript:void(0);" onClick={() => { this.handleDelClick(idx,item) }}><img src={close} alt="" /></a>*/}
-              <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span>
-              {
-                this.state.date && idx == this.state.active ?<Calendar handleChange={(info) => { handleChangeDate(info, idx); this.setState({ date: false }) }} top={30}></Calendar>:null
-              }
-            </div>
-          <DelToast show={idx==id?visible:false}
-                    name={activeName} 
-                    cancel={this.handleCancel}
-                    confirm={this.delConfirm}/>
-          </li>)
+        checkedListImport.map((part,index)=>{
+          return <ul className={`${styles.labelWrap} ${styles.labelWrapSpec}`}>
+            {
+              part.map((item, idx) => {
+                return (<li className={`${styles.assistLists} ${styles.clearfix}`}>
+                  <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
+                    <span className={styles.tagSpan}>
+                      {item.name}:
+                      <span className={styles.imgInfo} onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
+                    </span>
+                  </span>
+                  <div className={styles.textareaWrap}>
+                    <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
+                  </div>
+                  <div className={styles.pointerFinger}>
+                    <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
+                    {/* <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span> */}
+                  </div>
+                <DelToast show={idx==id?visible:false}
+                          name={activeName} 
+                          cancel={this.handleCancel}
+                          confirm={this.delConfirm}/>
+                </li>)
+              })
+            }
+          </ul>
         })
       }
-    </ul>
+
+      <ul className={styles.labelWrap} id="datePick">
+        {
+          assistLabel.map((item, idx) => {
+            let staticTime = {}
+            if(item.time){
+              let tmp1 = (item.time).split(' ')[0].split('-')
+              let tmp2 = (item.time).split(' ').length>1&&(item.time).split(' ')[1].split(':')
+              staticTime = {
+                year: tmp1[0]-0,
+                month: tmp1[1]-0,
+                day: tmp1[2]-0,
+                hour: tmp2[0],
+                minute: tmp2[1],
+                second: tmp2[2]
+              }
+            }
+            return (item.disabled?null:<li className={`${styles.assistLists} ${styles.clearfix}`}>
+              <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
+                <span className={styles.tagSpan}>
+                  {item.name}:
+                  <span className={styles.imgInfo} onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
+                </span>
+              </span>
+              <div className={styles.textareaWrap}>
+                <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
+              </div>
+              <div className={styles.pointerFinger}>
+                <p onClick={() => this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
+                <i onClick={() => this.handleShowDate(idx)}></i>
+                {/*<a href="javascript:void(0);" onClick={() => { this.handleDelClick(idx,item) }}><img src={close} alt="" /></a>*/}
+                <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span>
+                {
+                  this.state.date && idx == this.state.active ?<Calendar timeLis={staticTime} isShow={true} timeSure={(date)=>this.timeSure(date,idx)} needTime={true} sure={true} handleChange={(info) => { this.handleChangeDate(info, idx) }} top={30}></Calendar>:null
+                }
+              </div>
+            <DelToast show={idx==id?visible:false}
+                      name={activeName} 
+                      cancel={this.handleCancel}
+                      confirm={this.delConfirm}/>
+            </li>)
+          })
+        }
+      </ul>
+    </React.Fragment> 
   }
   render() {
-    const { handleChangeValue, list,assistVal,windowHeight } = this.props;
+    const { handleChangeValue, list,assistVal,windowHeight,assistList } = this.props;
     const { visible,pageTop } = this.state;
     return (
       <div className={styles.wrapper}>
@@ -185,7 +238,7 @@ class AddAssistCheck extends React.Component {
           {this.state.show ? <SearchOption windowHeight={windowHeight} pageTop={pageTop} height={280} handleChangeValue={handleChangeValue} visible={true}>
             {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
             {
-              list && list.length>0 || (assistVal != '')?'':<div>
+              (list && list.length>0) || (assistVal != '') || (assistList&&assistList.length==0)?'':<div>
                 <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用辅检项</p>
                 {
                   this.getCommonList()

File diff suppressed because it is too large
+ 111 - 79
src/components/AddAssistCheck/index.less


+ 2 - 2
src/components/AddInspect/SlideExcel/index.jsx

@@ -31,7 +31,7 @@ class SlideExcel extends Component {
     })
   }
   render() {
-    const {items,item,idx,dateTime,getInfomation} = this.props;
+    const {items,item,idx,getInfomation,dateTime} = this.props;
     const {show} = this.state;
     return (
       <li className={`${styles.excelDataLis} clearfix`} style={{border:items.lisExcelRes.length-1 == idx? 0:''}}>
@@ -52,7 +52,7 @@ class SlideExcel extends Component {
                       </td>
                       <td style={{width:'20%'}}>
                         {
-                          getStatusImg(value.type,value.value,0)
+                          getStatusImg(value.type,value.value,1)
                         }
                         {value.unit}</td>
                       <td style={{width:'25%'}}>

+ 42 - 17
src/components/AddInspect/SlideSelect/index.jsx

@@ -4,31 +4,39 @@ import { normalVal,timestampToTime } from '@utils/tools';
 import { InspectCommon, Calendar,DelToast} from '@commonComp';
 import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
+import $ from 'jquery';
 import date1 from '../img/date1.png';
 import close from '../img/close.png';
 
 class SlideSelect extends Component {
   constructor(props) {
     super(props);
-    const date = new Date();
     this.state = {
       show:false,
       activeInd:false,
       activeName:'',
-      timeLis: {
-        year: date.getFullYear(),
-        month: date.getMonth() + 1,
-        day: date.getDate(),
-        hour: '00',
-        minute: '00',
-        second: '00'
-      },
     };
     this.toTime = this.toTime.bind(this)
     this.handleSlide = this.handleSlide.bind(this)
     this.handleDel = this.handleDel.bind(this)
     this.handleCancel = this.handleCancel.bind(this)
     this.delConfirm = this.delConfirm.bind(this)
+    this.timeSure = this.timeSure.bind(this)
+  }
+  handleChangeDate(date) {
+    // console.log(date,'外')
+  }
+  componentDidMount() {
+    $(document).click((event) => {
+      let inspectToggleDate = document.getElementById("inspectToggleDate")
+      let timeIcon = document.getElementById("timeIcon")
+      let calendarDate = document.getElementById("calendarDate")
+      if (calendarDate) {
+        if (inspectToggleDate != event.target && timeIcon != event.target && !calendarDate.contains(event.target)) {
+          this.props.handleShowDate();
+        }
+      }
+    });
   }
   toTime(time){
     let tmpTim = time.split(',').join('')-0
@@ -71,12 +79,26 @@ class SlideSelect extends Component {
     })
   }
   timeSure(date){
-    console.log(date)
+    const {handleChangeDate} = this.props;
+    handleChangeDate&&handleChangeDate(date)
   }
   render() {
     const {getInfomation,handleConfirm,changeActivePart,handleDelClick,getItemList,date,item,idx,handleFillShow,showDetails,handleLabelSub,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,handleChangeDate,showToast} = this.props;
-    const {show,activeInd,activeName,timeLis} = this.state;
+    const {show,activeInd,activeName} = this.state;
     let numPlus = 0,numPlus1 = 0;
+    let staticTime = {}
+    if(dateTime){
+      let tmp1 = dateTime.split(' ')[0].split('-')            
+      let tmp2 = (dateTime).split(' ').length>1&&(dateTime).split(' ')[1].split(':')
+      staticTime = {
+        year: tmp1[0]-0,
+        month: tmp1[1]-0,
+        day: tmp1[2]-0,
+        hour: tmp2[0],
+        minute: tmp2[1],
+        second: tmp2[2]
+      }
+    }
     return (
       <li key={item.questionId} className={styles.slideLi}> 
         {
@@ -118,12 +140,12 @@ class SlideSelect extends Component {
                                     </td>
                                     {showDetails(val)}
                                     <td style={{width:'25%'}}>
-                                        {normalVal(val.minValue,val.maxValue)}
+                                      {val.questionDetailList.length > 0?'':normalVal(val.minValue,val.maxValue)}
                                     </td>
                                     <td style={{width:'25%'}}>{'化验时间:'+item.time}</td>
                                 </tr>
                             }
-                        })):(item.details.map((val,num)=>{
+                        })):(item.details.map((val)=>{
                           if(val.value && val.value != '' ){
                               ++numPlus1;
                               if(numPlus1 < 5){
@@ -136,7 +158,7 @@ class SlideSelect extends Component {
                                     </td>
                                     {showDetails(val)}
                                     <td style={{width:'25%'}}>
-                                        {normalVal(val.minValue,val.maxValue)}
+                                        {val.questionDetailList.length > 0?'':normalVal(val.minValue,val.maxValue)}
                                     </td>
                                     <td style={{width:'25%'}}>{'化验时间:'+item.time}</td>
                                 </tr>
@@ -175,15 +197,18 @@ class SlideSelect extends Component {
                     >
                     
                         <div className={styles.searchResultT}>
-                            <img style={{"position":"absolute","top":"8px","right":"8px",cursor:"pointer"}} src={date1} alt="" onClick={handleShowDate}/>
-                            <p style={{position:"absolute",right:"25px",top:"4px",lineHeight:"28px",cursor:"pointer",paddingRight:"10px"}} onClick={handleShowDate}>
+                            <img style={{"position":"absolute","top":"8px","right":"8px",cursor:"pointer"}} onClick={handleShowDate} src={date1} alt="" id="inspectToggleDate"/>
+                            <p style={{position:"absolute",right:"25px",top:"4px",lineHeight:"28px",cursor:"pointer",paddingRight:"10px"}} onClick={handleShowDate} id="timeIcon">
                                 {
                                   dateTime
                                 }
                             </p>
                             <div style={{display:date?"block":"none",position:"relative"}}>
                                 {/* 日期组件 */}
-                                <Calendar timeLis={timeLis} isShow={true} timeSure={this.timeSure} needTime={true} sure={true} handleChange={handleChangeDate}></Calendar>
+                                {
+                                  date?<Calendar timeLis={staticTime} isShow={true} timeSure={this.timeSure} needTime={true} sure={true} handleChange={this.handleChangeDate}></Calendar>:null
+                                }
+                                {/* <Calendar timeLis={staticTime} isShow={true} timeSure={this.timeSure} needTime={true} sure={true} handleChange={handleChangeDate}></Calendar> */}
                             </div>
                         </div>
                             {/* 填写单内容显示 */}

+ 10 - 10
src/components/AddInspect/index.jsx

@@ -82,9 +82,9 @@ class Inspect extends React.Component {
   }
   componentDidMount() {
     $(document).click((event) => {
-      let searchWrap = $('#searchWrap')[0];   // 搜索按钮
-      let searchOption = $('#searchOption')[0];   // 搜索列表
-      let inspectFill = $('#inspectFill')[0];         // 公共填写单
+      let searchWrap = document.getElementById("searchWrap");   // 搜索按钮
+      let searchOption = document.getElementById("searchOption");   // 搜索列表
+      let inspectFill = document.getElementById("inspectFill");         // 公共填写单
 
       let _del = $('#delBox')[0];       // 删除弹窗  
       let _impClose = $('#impClose')[0];         // 导入删除按钮
@@ -96,7 +96,7 @@ class Inspect extends React.Component {
         }
       }
       if (inspectFill) {
-        if (event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
+        if ($(event.target).attr('id') != "getSureTime"&&event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
           this.setState({ showFill: false, date: false });
         }
       }
@@ -110,7 +110,7 @@ class Inspect extends React.Component {
         }
       }
     });
-    this.setState({ dateTime: getCurrentDate(1) })
+    // this.setState({ dateTime: getCurrentDate(1) })
   }
   componentWillReceiveProps(nextProps) {
     if (nextProps.fillActive.name != this.props.fillActive.name) {
@@ -121,9 +121,9 @@ class Inspect extends React.Component {
     this.setState({ showFill: false })
   }
   handleChangeDate(info) {
-    let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')
-    // let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')+' '+h.toString().padStart(2,'0')+m.toString().padStart(2,'0')+s.toString().padStart(2,'0');
-    // this.setState({ dateTime: date, date: false })
+    // let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')
+    let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')+' '+info.hour.toString().padStart(2,'0')+':'+info.minute.toString().padStart(2,'0')+':'+info.second.toString().padStart(2,'0');
+    this.setState({ dateTime: date, date: false })
   }
   handleSearchShow(e) {
     let tmpShow = this.state.show;
@@ -317,7 +317,7 @@ class Inspect extends React.Component {
     }
   }
   render() {
-    const { getInfomation, handleChangeValue, inspectVal, list, labelList, windowHeight, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
+    const { getInfomation, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
     const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
 
     return (
@@ -386,7 +386,7 @@ class Inspect extends React.Component {
           {this.state.show ? <SearchOption windowHeight={windowHeight} height={280} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
             {list && list.length > 0 ? this.getSearchList(list) : (inspectVal == '' ? '' : <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>暂无筛选项</p>)}
             {
-              list && list.length > 0 || (inspectVal != '') ? '' : <div>
+              (list && list.length > 0) || (inspectVal != '') || (inspectList&&inspectList.length==0) ? '' : <div>
                 <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>常用化验项</p>
                 {
                   this.getCommonList()

+ 2 - 1
src/components/AssistCheck/index.jsx

@@ -164,7 +164,7 @@ class AssistCheck extends React.Component {
       dragBox('previewWrapper', 'previewStatic', 'del')
     }
     render(){
-        const {checkedList,selectOneCheck,msgObj,selectGroupList,allCheckImport,hospitalSonInspect,handleSearchs,allCheck,message,hospitalPac, handleGetSonList,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
+        const {checkedList,checkedListImport,selectOneCheck,msgObj,selectGroupList,allCheckImport,hospitalSonInspect,handleSearchs,allCheck,message,hospitalPac, handleGetSonList,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
         const {showSlideImport,checkSystemIpt,handleBindFileApi,showInIcss,onClose} = this;
         const {importLis,ieVersion,hide} = this.state;
         // if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -240,6 +240,7 @@ class AssistCheck extends React.Component {
                             assistList={assistList}
                             assistVal={assistVal}
                             windowHeight={windowHeight}
+                            checkedListImport={checkedListImport}
                         >
                         </AddAssistCheck>
                     </div>

+ 14 - 14
src/components/EmergencyProcedure/EmergencyPart/PartSec/index.jsx

@@ -11,11 +11,11 @@ class PartSec extends React.Component{
       partClick:false,
     }
   }
-  componentWillReceiveProps(nextState){
-    if(nextState.idx != this.props.idx){
-      this.setState({partCom:true})
-    }
-  }
+  // componentWillReceiveProps(nextState){
+  //   if(nextState.idx != this.props.idx){
+  //     this.setState({partCom:true})
+  //   }
+  // }
   makeSureCom(link,num){
     const {idx,makeSureCom,makeSureWar} = this.props
     if(idx == 0){
@@ -51,7 +51,7 @@ class PartSec extends React.Component{
     })
   }
   handleStepSecClick(){
-    const {idx,makeSureCom} = this.props
+    const {idx,makeSureCom,reback,resback} = this.props
     if(idx == 0){
       return <React.Fragment>
         <div className={`${styles.nextCom} ${styles.next}`}>
@@ -148,13 +148,13 @@ class PartSec extends React.Component{
             <img onClick={()=>{this.backSec()}} src={back} alt=""/>
           </div>
           <h4>{'结合症状体征是否危机生命是否濒死休克'}</h4>
-          <div className={`${styles.nextWar} ${styles.next}`}>
+          <div style={{display:reback?'block':'none'}} className={`${styles.nextWar} ${styles.next}`}>
             <span>是</span> 
-            <i onClick={()=>{makeSureCom('',true,1)}}>确定</i>
+            <i onClick={()=>{makeSureCom('',true,1,false)}}>确定</i>
           </div>
-          <div className={`${styles.nextCom} ${styles.next}`}>
+          <div style={{display:reback?'block':'none'}} className={`${styles.nextCom} ${styles.next}`}>
             <span>否</span> 
-            <i onClick={()=>{makeSureCom('',true,0)}}>确定</i>
+            <i onClick={()=>{makeSureCom('',true,0,false)}}>确定</i>
           </div>
         </React.Fragment>
       }else{
@@ -174,13 +174,13 @@ class PartSec extends React.Component{
             <img onClick={()=>{this.backSec()}} src={back} alt=""/>
           </div>
           <h4>判断右心负荷是否增加</h4>
-          <div className={`${styles.nextWar} ${styles.next}`}>
+          <div style={{display:resback?'block':'none'}} className={`${styles.nextWar} ${styles.next}`}>
             <span>右心负荷增加(DDI阳性)</span> 
-            <i onClick={()=>{makeSureCom('',true,1)}}>确定</i>
+            <i onClick={()=>{makeSureCom('',true,1,false)}}>确定</i>
           </div>
-          <div className={`${styles.nextCom} ${styles.next}`}>
+          <div style={{display:resback?'block':'none'}} className={`${styles.nextCom} ${styles.next}`}>
             <span>右心负荷不增加(DDI阴性)</span> 
-            <i onClick={()=>{makeSureCom('',true,0)}}>确定</i>
+            <i onClick={()=>{makeSureCom('',true,0,false)}}>确定</i>
           </div>
         </React.Fragment>
       }else{

+ 8 - 8
src/components/EmergencyProcedure/EmergencyPart/PartTrd/index.jsx

@@ -89,9 +89,9 @@ class PartTrd extends React.Component {
     }
     this.handleTrdPart = this.handleTrdPart.bind(this)
   }
-  backSec() {
+  backSec(flg) {
     const { makeSureCom } = this.props
-    makeSureCom('', false, 0)
+    makeSureCom('', false, 0,flg)
   }
   changeTrdShow(flg, num) {
     this.setState({
@@ -199,7 +199,7 @@ class PartTrd extends React.Component {
       return <React.Fragment>
         <div className={`${num ? styles.nextWar : styles.nextCom} ${styles.next}`}>
           <span>{num ? '是' : '否'}</span>
-          <img onClick={() => { this.backSec() }} src={back} alt="" />
+          <img onClick={() => { this.backSec(true) }} src={back} alt="" />
         </div>
         {
           num ? <React.Fragment>
@@ -229,7 +229,7 @@ class PartTrd extends React.Component {
         return <React.Fragment>
           <div className={`${num ? styles.nextWar : styles.nextCom} ${styles.next}`}>
             <span>{num ? '右心负荷增加(DDI阳性)' : '右心负荷不增加(DDI阴性)'}</span>
-            <img onClick={() => { this.backSec() }} src={back} alt="" />
+            <img onClick={() => { this.backSec(true) }} src={back} alt="" />
           </div>
           {
             num ? <React.Fragment>
@@ -263,11 +263,11 @@ class PartTrd extends React.Component {
               </div>
               <div className={`${styles.hold}`}>
                 <span className={styles.holdLeft}>阴性</span>
-                <span className={styles.holdRight}>请相关科室会寻找病因</span>
+                <span className={styles.holdRight}>请相关科室会寻找病因</span>
               </div>
             </React.Fragment> : <React.Fragment>
                 <h4>建议ACLS(高级心脏生命支持)</h4>
-                <h4>请相关科室会寻找病因</h4>
+                <h4>请相关科室会寻找病因</h4>
               </React.Fragment>
           }
         </React.Fragment>
@@ -286,11 +286,11 @@ class PartTrd extends React.Component {
               </div>
               <div className={`${styles.hold}`}>
                 <span className={styles.holdLeft}>阴性</span>
-                <span className={styles.holdRight}>请相关科室会寻找病因</span>
+                <span className={styles.holdRight}>请相关科室会寻找病因</span>
               </div>
             </React.Fragment> : <React.Fragment>
                 <span className={styles.emergencyBtnS}>排除肺栓塞</span>
-                <h4>请相关科室会寻找病因</h4>
+                <h4>请相关科室会寻找病因</h4>
               </React.Fragment>
           }
         </React.Fragment>

+ 12 - 8
src/components/EmergencyProcedure/EmergencyPart/index.jsx

@@ -12,6 +12,8 @@ class EmergencyProcedure extends React.Component {
       trdShow:false,
       trdNum:'',
       num:'',
+      back:true,
+      resback:true,
     }
     this.makeSureWar = this.makeSureWar.bind(this)
     this.makeSureCom = this.makeSureCom.bind(this)
@@ -26,17 +28,17 @@ class EmergencyProcedure extends React.Component {
       });
     }
   }
-  // componentWillReceiveProps(nextState){
-  //   if(nextState.idx != this.props.idx){
-  //     this.setState({trdShow:false})
-  //   }
-  // }
+  componentWillReceiveProps(nextState){
+    if(nextState.idx != this.props.idx){
+      this.setState({trdShow:false})
+    }
+  }
   makeSureWar(num){
     this.setState({
       trdNum:num
     })
   }
-  makeSureCom(link,flg,num){
+  makeSureCom(link,flg,num,back){
     const {setDataIdx,idx} = this.props
     if(idx == 0){
       if(link){
@@ -55,11 +57,13 @@ class EmergencyProcedure extends React.Component {
         trdShow:flg,
         num:num
       })
+      this.setState({back:back})
     }else if(idx == 3){
       this.setState({
         trdShow:flg,
         num:num
       })
+      this.setState({resback:back})
     }else if(idx == 5){
       this.setState({
         trdShow:flg,
@@ -76,13 +80,13 @@ class EmergencyProcedure extends React.Component {
   render(){
     const {data,idx} = this.props
     const {makeSureCom,makeSureWar} = this
-    const {secShow,trdShow,num,trdNum} = this.state
+    const {secShow,trdShow,num,trdNum,back,resback} = this.state
     return <div className={styles.emergencyParts} ref={this.$cont}>
       <div className={`${styles.partFst} ${styles.partPub}`}>
         <p>步骤1</p>
         <h4>{data.step1.checks}</h4>
       </div>
-      {secShow?<PartSec idx={idx} data={data.step2} makeSureCom={makeSureCom} makeSureWar={makeSureWar}></PartSec>:null}
+      {secShow?<PartSec idx={idx} data={data.step2} resback={resback} reback={back} makeSureCom={makeSureCom} makeSureWar={makeSureWar}></PartSec>:null}
       {trdShow?<PartTrd idx={idx} num={num} trdNum={trdNum} makeSureCom={this.makeSureCom}></PartTrd>:null}
     </div>
   }

+ 4 - 4
src/components/EmergencyProcedure/emergency.js

@@ -264,7 +264,7 @@ let data = [
                   },
                   {
                     message:'阴性',
-                    result:'请相关科室会寻找病因',
+                    result:'请相关科室会寻找病因',
                     text:'',
                     link:''
                   }
@@ -275,7 +275,7 @@ let data = [
                 links:[
                   {
                     message:'建议ACLS(高级心脏生命支持)',
-                    text:'请相关科室会寻找病因',
+                    text:'请相关科室会寻找病因',
                     diagnose:'',
                     result:'',
                     link:''
@@ -303,7 +303,7 @@ let data = [
                   },
                   {
                     message:'阴性',
-                    result:'请相关科室会寻找病因',
+                    result:'请相关科室会寻找病因',
                     text:'',
                     link:''
                   }
@@ -314,7 +314,7 @@ let data = [
                 links:[
                   {
                     message:'排除肺栓塞',
-                    text:'请相关科室会寻找病因'
+                    text:'请相关科室会寻找病因'
                   }
                 ]
               },

+ 11 - 1
src/components/Inspect/index.jsx

@@ -7,7 +7,7 @@ import Notify from '@commonComp/Notify';
 import store from '@store';
 import $ from 'jquery';
 import { host, prefix } from '@utils/config.js';
-import { isIE, getUrlArgObject } from '@utils/tools.js';
+import { isIE, getUrlArgObject,getCurrentDate } from '@utils/tools.js';
 import { dragBox } from '@utils/drag';
 import WrapModalBody from '../WrapModalBody';
 
@@ -117,6 +117,16 @@ class Inspect extends React.Component {
                   let res = JSON.parse(xhr.response);
                   if(res.code == 0){
                     let message = res.data.messages;
+                    if(res.data.lisExcelRes){
+                      for(let i = 0;i < res.data.lisExcelRes.length;i++){
+                        let tmpLisExcelItem = res.data.lisExcelRes[i]
+                        if(tmpLisExcelItem.lisExcelItem){
+                          for(let j = 0;j < tmpLisExcelItem.lisExcelItem.length;j++){
+                            tmpLisExcelItem.lisExcelItem[j].time = tmpLisExcelItem.lisExcelItem[j].time||getCurrentDate(1)
+                          }
+                        }
+                      }
+                    }
                     store.dispatch(getExcelList(res.data));
                     fetchPushInfos && fetchPushInfos();
                     if (message && message.length != 0) {

+ 11 - 4
src/components/MedicalInfo/index.jsx

@@ -9,7 +9,8 @@ class MedicalInfo extends Component {
         this.$inp = React.createRef();
         this.$cont = React.createRef();
         this.state={
-          val:''
+          val:'',
+          hasSearch: false
         };
         this.search = this.search.bind(this);
         this.handleChange = this.handleChange.bind(this);
@@ -28,6 +29,11 @@ class MedicalInfo extends Component {
             });
     }
     search(){
+      if(this.state.hasSearch === false) {
+        this.setState({
+          hasSearch: true
+        })
+      }
       const {handleChangeValue} = this.props;
       const val = this.$inp.current.value;
       handleChangeValue&&handleChangeValue(val);
@@ -46,7 +52,8 @@ class MedicalInfo extends Component {
       const {clearResult} = this.props;
       this.$inp.current.value = '';
       this.setState({
-        val:''
+        val:'',
+        hasSearch: false
       });
       clearResult&&clearResult();
   }
@@ -62,7 +69,7 @@ class MedicalInfo extends Component {
   }
     render() {
         const {searchResult} = this.props;
-        const {val} = this.state;
+        const {val, hasSearch} = this.state;
         return (
             <div className={style['search-cont']} ref={this.$cont}>
               <div className={style['search-box']}>
@@ -78,7 +85,7 @@ class MedicalInfo extends Component {
                     <ul>
                       {this.getSearchList()}
                     </ul>
-              </div>:<p className={style['no-data']}>暂无搜索结果!</p>}
+              </div>:hasSearch&&<p className={style['no-data']}>暂无搜索结果!</p>}
              </div>
 
 

+ 5 - 2
src/components/PreviewBody/Inspect/index.jsx

@@ -1,5 +1,5 @@
 import style from "../index.less";
-import { normalVal } from '@utils/tools';
+import { normalVal,getStatusImg } from '@utils/tools';
 
 const PreviewInspect = (props) => {
   const { dataJson, toTime ,dateTime,showDetails  } = props;
@@ -15,7 +15,10 @@ const PreviewInspect = (props) => {
                   item.lisExcelItem && item.lisExcelItem.map((value) => {
                     return <tr className={style.assistTableTrSec}>
                       <td className={style.assistTableTdFst}>{value.itemName}</td>
-                      <td className={style.assistTableTdSec}><span style={{ color: value.type == 1 ? "red" : null }}>{value.value}</span> {value.unit}</td>
+                      <td className={style.assistTableTdSec}>
+                        {getStatusImg(value.type,value.value,1)}
+                        {value.unit}
+                      </td>
                       <td className={style.assistTableTdTrd}>
                         {normalVal(value.min, value.max)}
                       </td>

+ 29 - 3
src/components/PreviewBody/index.jsx

@@ -1,6 +1,6 @@
 import React, { Component } from "react";
 import style from "./index.less";
-import { normalVal, filterDataArr, filterOtherDataArr,timestampToTime } from '@utils/tools';
+import { getStatusImg, filterDataArr, filterOtherDataArr,timestampToTime } from '@utils/tools';
 import Notify from '@commonComp/Notify';
 import Information from '../Information';
 import PreviewInspect from './Inspect';
@@ -51,6 +51,32 @@ class PreviewBody extends Component {
     this.setState({ dateTime: date })
   }
   showDetails(val) {
+    let min = val.minValue, max = val.maxValue, value = val.value, dom = '';
+    if (!isNaN(min) && !isNaN(max)) {//有最大值最小值
+      if (isNaN(value)) {//输入的不是数据
+        dom = getStatusImg(1, value, 1)
+      } else if (value <= min) {//下降
+        dom = getStatusImg(3, value, 1)
+      } else if (value >= max) {//上升
+        dom = getStatusImg(2, value, 1)
+      } else {//正常
+        dom = getStatusImg(0, value, 1)
+      }
+    } else if (isNaN(min) && !isNaN(max)) {//有最大值无最小值
+      if (value >= max) {//上升
+        dom = getStatusImg(2, value, 1)
+      } else {//正常
+        dom = getStatusImg(0, value, 1)
+      }
+    } else if (!isNaN(min) && isNaN(max)) {//有最小值无最大值
+      if (value <= min) {//下降
+        dom = getStatusImg(3, value, 1)
+      } else {//正常
+        dom = getStatusImg(0, value, 1)
+      }
+    } else {//无最大最小值
+      dom = getStatusImg(1, value, 1)
+    }
     if (val.questionDetailList.length > 0) {
       return val.questionDetailList.map((item) => {
         if (val.value == item.name) {
@@ -58,7 +84,7 @@ class PreviewBody extends Component {
         }
       })
     } else {
-      return <td className={style.assistTableTdSec}><span style={{ color: (val.value - 0).toString() == 'NaN' ? "red" : (val.maxValue || val.minValue) ? (val.value > val.maxValue || val.value < val.minValue ? "red" : null) : null }}>{val.value}</span> {val.labelSuffix}</td>
+      return <td className={style.assistTableTdSec}>{dom} {val.labelSuffix}</td>
     }
   }
 
@@ -77,8 +103,8 @@ class PreviewBody extends Component {
   render() {
     const { show, preInfo, dataJson, dataStr, baseObj, flg ,showAssessBtn,showHistoryCases} = this.props;
     const other_yjs = dataStr.other?filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other):'';
-    const noData = JSON.stringify(preInfo) == '{}';
     const isChronic = (dataJson.diagChronicMagItem&&dataJson.diagChronicMagItem.name)||(dataJson.mainChronicDesease&&dataJson.mainChronicDesease.name);
+    const noData = JSON.stringify(preInfo) == '{}';
     return <div className={style['content']} style={{ width: flg ? '700' : '820' }}>
       <div className={style['contents']} id="content" style={{ margin: "0 auto", maxWidth: "620px" }}>
         <Information baseObj={baseObj} preInfo={preInfo}></Information>

+ 6 - 5
src/components/PushItems/index.jsx

@@ -68,7 +68,7 @@ class PushItems extends Component {
       name: '',
       questionId: '',
       showType: 1,
-      time:getCurrentDate(),
+      time:getCurrentDate(1),
       value:''
     }
     if(checkedAssay.length > 0){
@@ -206,10 +206,11 @@ class PushItems extends Component {
               />
             )}
             <div className={style["diagnose"]}>
-              {vigilant.length === 0 &&
-                determine.length === 0 &&
-                doubt.length === 0 &&
-                possible.length === 0 && (
+              {vigilant&&vigilant.length === 0 &&
+                determine&&determine.length === 0 &&
+                doubt&&doubt.length === 0 &&
+                possible&&possible.length === 0 && 
+                likely&&likely.length === 0 && (
                   <div className={style["doubt"]}>
                     <h1>
                       <img src={doubtImg} />

+ 11 - 4
src/components/ScaleSearch/index.jsx

@@ -9,7 +9,8 @@ class ScaleSearch extends Component {
     this.$inp = React.createRef();
     this.$cont = React.createRef();
     this.state={
-      val:''
+      val:'',
+      hasSearch: false
     };
     this.search = this.search.bind(this);
     this.handleChange = this.handleChange.bind(this);
@@ -43,6 +44,11 @@ class ScaleSearch extends Component {
     });
   }
   search(){
+    if(this.state.hasSearch === false){
+      this.setState({
+        hasSearch: true
+      })
+    }
     const {handleChangeValue} = this.props;
     const val = this.$inp.current.value;
     handleChangeValue&&handleChangeValue(val);
@@ -61,7 +67,8 @@ class ScaleSearch extends Component {
     const {clearResult} = this.props;
     this.$inp.current.value = '';
     this.setState({
-      val:''
+      val:'',
+      hasSearch: false
     });
     clearResult&&clearResult();
   }
@@ -77,7 +84,7 @@ class ScaleSearch extends Component {
   }
   render() {
     const {searchResult} = this.props;
-    const {val} = this.state;
+    const {val, hasSearch} = this.state;
     return (
         <div className={style['search-cont']} ref={this.$cont}>
           <div className={style['search-box']}>
@@ -93,7 +100,7 @@ class ScaleSearch extends Component {
             <ul>
               {this.getSearchList()}
             </ul>
-          </div>:<p className={style['no-data']}>暂无搜索结果!</p>}
+          </div>:hasSearch && <p className={style['no-data']}>暂无搜索结果!</p>}
         </div>
     )
 

+ 1 - 2
src/components/WrapModalBody/Item/index.jsx

@@ -1,8 +1,7 @@
 import React from "react";
 import style from "../index.less";
-import {getCalendarDate,getCurrentDate} from "@utils/tools";
+import {getCurrentDate} from "@utils/tools";
 import TimeInterval from '../../TimeInterval';
-
 class Item extends React.Component {
   constructor(props) {
     super(props);

+ 7 - 1
src/components/WrapModalBody/WrapModalTable/index.jsx

@@ -5,6 +5,12 @@ class WrapModalTable extends React.Component {
   constructor(props) {
     super(props)
   }
+  shouldComponentUpdate(nextProps,nextState){
+    if(JSON.stringify(nextProps.hospitalInspect) == JSON.stringify(this.props.hospitalInspect)){
+      return false
+    }
+    return true
+  }
   render() {
     const { hospitalInspect, handleGetSonList } = this.props;
     return <div className={style['modalTable']}>
@@ -25,7 +31,7 @@ class WrapModalTable extends React.Component {
         <table>
           {
             hospitalInspect && hospitalInspect.map((item, idx) => {
-              return <tr onClick={() => handleGetSonList(item.groupName)}>
+              return <tr onClick={() => handleGetSonList(item.groupName,item.reportTime)}>
                 <td className={`${style.fst} ellipsOver`}>{idx + 1}</td>
                 <td title={item.specimenType} className={`${style.sec} ellipsOver`}>{item.specimenType}</td>
                 <td title={item.groupName} className={`${style.trd} ellipsOver`}>{item.groupName}</td>

+ 30 - 25
src/components/WrapModalBody/index.jsx

@@ -5,32 +5,37 @@ import WrapModalTable from "./WrapModalTable";
 import WrapModalTableSon from "./WrapModalTableSon";
 import WrapModalRight from "./WrapModalRight";
 
-const WrapModalBody =(props)=>{
-  const { handleSearch, hospitalInspect,height,selectOneCheck,showInIcss, handleGetSonList,selectWaring,message, hospitalSonInspect,allCheckImport,allCheck,checkedList,selectGroupList } = props;
-  return <div className={style['container']}>
-    <div className={`${style.left}`}>
-      <WrapModalTitle handleSearch={handleSearch} message={message}></WrapModalTitle>
-      <WrapModalTable
-        hospitalInspect={hospitalInspect}
-        handleGetSonList={handleGetSonList}
-      ></WrapModalTable>
-      {
-        hospitalSonInspect && hospitalSonInspect.lisExcelWrapper?
-        <WrapModalTableSon
-          allCheck={allCheck}
-          checkedList={checkedList}
-          selectWaring={selectWaring}
-          allCheckImport={allCheckImport}
-          selectOneCheck={selectOneCheck}
-          selectGroupList={selectGroupList}
-          hospitalSonInspect={hospitalSonInspect}
-        ></WrapModalTableSon>:null
-      }
+class WrapModalBody extends React.Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { handleSearch, hospitalInspect,height,selectOneCheck,showInIcss, handleGetSonList,selectWaring,message, hospitalSonInspect,allCheckImport,allCheck,checkedList,selectGroupList } = this.props;
+    return <div className={style['container']}>
+      <div className={`${style.left}`}>
+        <WrapModalTitle handleSearch={handleSearch} message={message}></WrapModalTitle>
+        <WrapModalTable
+          hospitalInspect={hospitalInspect}
+          handleGetSonList={handleGetSonList}
+        ></WrapModalTable>
+        {
+          hospitalSonInspect && hospitalSonInspect.lisExcelWrapper?
+          <WrapModalTableSon
+            allCheck={allCheck}
+            checkedList={checkedList}
+            selectWaring={selectWaring}
+            allCheckImport={allCheckImport}
+            selectOneCheck={selectOneCheck}
+            selectGroupList={selectGroupList}
+            hospitalSonInspect={hospitalSonInspect}
+          ></WrapModalTableSon>:null
+        }
+      </div>
+      <div className={`${style.right}`}>
+        <WrapModalRight showInIcss={showInIcss} height={height} selectGroupList={selectGroupList}></WrapModalRight>
+      </div>
     </div>
-    <div className={`${style.right}`}>
-      <WrapModalRight showInIcss={showInIcss} height={height} selectGroupList={selectGroupList}></WrapModalRight>
-    </div>
-  </div>
+  }
 }
 
 export default WrapModalBody;

+ 5 - 0
src/components/WrapModalBody/index.less

@@ -50,6 +50,7 @@
         font-size: 12px;
       }
       input {
+        background-color: #faf8f8;
         font-size: 12px;
         height: 26px;
         line-height: 26px;
@@ -89,6 +90,10 @@
         width: 126px;
         text-align: center;
       }
+      input {
+        cursor: pointer;
+        background-color: #fff;
+      }
     }
   }    
   .modalRightT{

+ 1 - 1
src/components/WrapModalBodyPac/WrapModalRight/index.jsx

@@ -16,7 +16,7 @@ const WrapModalRight = (props) =>{
             <ul className={style.partLis}>
               {part.pacsResultDTO&&part.pacsResultDTO.map((item)=>{
                 return <li>
-                  <p className={style.itemName}>{item.checkItem}</p>
+                  {/* <p className={style.itemName}>{item.checkItem}</p> */}
                   <p>
                     影像诊断 : <span style={{color: '#5D5D5D'}}>{item.imagingResults}</span>
                   </p>

+ 5 - 1
src/components/WrapModalBodyPac/index.less

@@ -50,12 +50,12 @@
         font-size: 12px;
       }
       input {
+        background-color: #faf8f8;
         font-size: 12px;
         height: 26px;
         line-height: 26px;
         padding: 0 3px;
         box-sizing: border-box;
-        cursor: pointer;
       }
     }
     .code{
@@ -89,6 +89,10 @@
         width: 126px;
         text-align: center;
       }
+      input {
+        cursor: pointer;
+        background-color: #fff;
+      }
     }
   }    
   .modalRightT{

+ 3 - 2
src/containers/AssistCheck.js

@@ -25,7 +25,8 @@ function mapStateToProps(state) {//console.log(state)
         checkedList: state.assistCheck.checkedList,
         selectGroupList: state.assistCheck.selectGroupList,
         allCheck: state.assistCheck.allCheck,
-        msgObj: state.assistCheck.msgObj
+        msgObj: state.assistCheck.msgObj,
+        checkedListImport: state.assistCheck.checkedListImport,
     }
 }
 
@@ -66,7 +67,7 @@ function mapDispatchToProps(dispatch, store) {
             dispatch(changeAssistVal(val,idx))
         },
         handleChangeDate(info,idx){
-            let date = info.year+'-'+(info.month<10?'0'+info.month:info.month)+'-'+(info.day<10?'0'+info.day:info.day);
+            let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')+' '+info.hour.toString().padStart(2,'0')+':'+info.minute.toString().padStart(2,'0')+':'+info.second.toString().padStart(2,'0');
             dispatch(changeDate(date,idx))
         },
         //右侧推送

+ 4 - 4
src/containers/Inspect.js

@@ -7,7 +7,7 @@ import {
   getSearchList,
   getSublableList,
   getImportList,
-  getSonDetailList
+  getSonDetailLists
 } from '@store/async-actions/inspect';
 import {
   setLabel,
@@ -27,7 +27,7 @@ import {
   getConceptDetail
 } from '@store/async-actions/pushMessage';
 
-function mapStateToProps(state) {//console.log(state.inspect)
+function mapStateToProps(state) {//console.log(state)
   return {
     list: state.inspect.list,
     labelList: state.inspect.labelList,
@@ -65,8 +65,8 @@ function mapDispatchToProps(dispatch, store) {
     handleSearch(data) {
       dispatch(getImportList(data))
     },
-    handleGetSonList(name) {
-      dispatch(getSonDetailList(name))
+    handleGetSonList(name,time) {
+      dispatch(getSonDetailLists(name,time))
     },
     handleChangeValue(val) {
       dispatch(getSearchList(val))

+ 3 - 2
src/store/actions/inspect.js

@@ -24,10 +24,11 @@ export const getHospitalInspectList = (list) => ({         //检索医院化验
     type:SEARCH_HOSPITAL_INSPECT,
     list
 })
-export const getHospitalInspectDetailList = (list,name) => ({         //检索医院化验项
+export const getHospitalInspectDetailList = (list,name,time) => ({         //检索医院化验项
     type:SEARCH_HOSPITAL_INSPECT_SON,
     list,
-    name
+    name,
+    time
 })
 
 export const setLabel = (idx,sign) => ({          //搜索后点击选中的结果

+ 2 - 2
src/store/async-actions/inspect.js

@@ -68,12 +68,12 @@ export const getImportList = (data) => {
         })
     }
 };
-export const getSonDetailList = (name) => {
+export const getSonDetailLists = (name,time) => {
     return (dispatch) => {
         axios.json('/dockingImport/getByGroupNameLisData',{groupName:name})
         .then((res)=>{
             const data = res.data.data;
-            dispatch(getHospitalInspectDetailList(data,name))
+            dispatch(getHospitalInspectDetailList(data,name,time))
         })
     }
 };

+ 10 - 12
src/store/reducers/assistCheck.js

@@ -24,36 +24,35 @@ const initSearchList = {
   selectGroupList: [], //选的组的明细可能有多个组
   allCheck: false, //全选反选
   checkedList: [], //选中的小项
+  checkedListImport: [], //辅检导入
   msgObj:{
     name:'',
     patientNum:''
   }
 }
+import { getCurrentDate} from '@utils/tools';
 
-function getCurrentDate() {
-  let myDate = new Date();
-  let year = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
-  let mon = myDate.getMonth() - 0 + 1; //获取当前月份(0-11,0代表1月)
-  let day = myDate.getDate(); //获取当前日(1-31)
-  let date = year + '-' + (mon < 10 ? '0' + mon : mon) + '-' + (day < 10 ? '0' + day : day);
-  return date;
-}
 export default (state = initSearchList, action) => {
 
   if (action.type == SHOW_IN_ICSSS) {
     const newState = Object.assign({}, state);
     let tmpGroup = JSON.parse(JSON.stringify(newState.selectGroupList))
-    let tempArrs = newState.assistLabel,tmpString ='';
+    let tmpListImport = JSON.parse(JSON.stringify(newState.checkedListImport))
+    let tempArrs = newState.assistLabel,tmpString ='',importLis=[];
     for (let i = 0; i < tmpGroup.length; i++) {
       for (let k = 0; k < tmpGroup[i].pacsResultDTO.length; k++) {
         let tmpObj = {}
-        tmpObj.time = tmpGroup[i].Rtime.split(' ')[0]
+        tmpObj.time = tmpGroup[i].Rtime
+        tmpObj.disabled = true
         tmpObj.name = tmpGroup[i].pacsResultDTO[k].checkItem
         tmpObj.value = tmpGroup[i].pacsResultDTO[k].imagingResults
         tmpObj.imagingDiagnose = tmpGroup[i].pacsResultDTO[k].imagingDiagnose
+        importLis.push(tmpObj)
         tempArrs.push(tmpObj)
       }
     }
+    tmpListImport.push(importLis)
+    newState.checkedListImport = [...tmpListImport]
     for (let j = 0; j < tempArrs.length; j++) {
       let tmpVal = tempArrs[j].value ? tempArrs[j].value.trim() : tempArrs[j].value;
       tmpString += (tempArrs[j].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArrs[j].time ? '报告日期:' + tempArrs[j].time : '') + ';')
@@ -122,7 +121,6 @@ export default (state = initSearchList, action) => {
       }
       newState.selectGroupList = tmpGroup //右侧已选中的项目
       if (tempArr.length == listWrap.pacsResultDTO.length) {
-
         newState.allCheck = true;
       } else {
         newState.allCheck = false;
@@ -235,7 +233,7 @@ export default (state = initSearchList, action) => {
     }
     for (let i = 0; i < tempArr.length; i++) {
       if (tempArr[i].questionId == action.id && i == action.idx) {
-        tempArr[i].time = getCurrentDate();
+        tempArr[i].time = getCurrentDate(1);
         tempArrs.push(tempArr[i]);
         newState.assistLabel = [...tempArrs];
       }

+ 4 - 0
src/store/reducers/inspect.js

@@ -56,6 +56,9 @@ export default (state = initSearchList, action) => {
             menus:'',
             lisExcelItem:[]
           }
+          for(let k = 0;k < tmpGroup[i].lisExcelWrapper.length;k++){
+            tmpGroup[i].lisExcelWrapper[k].time = tmpGroup[i].Rtime
+          }
           tmpObj.menus = tmpGroup[i].groupName
           tmpObj.lisExcelItem = tmpGroup[i].lisExcelWrapper
           excelDataLis.lisExcelRes.push(tmpObj)
@@ -229,6 +232,7 @@ export default (state = initSearchList, action) => {
         }else{
           newState.allCheck = false;
         }
+        tmpArr.Rtime = action.time
         newState.hospitalInspectObj = tmpArr
         return newState;
     }

+ 1 - 0
src/utils/tools.js

@@ -166,6 +166,7 @@ const getAllDataList =(baseList) =>{           //获取所有模块结构化的
     jsonData.checkBodyIsEmpty = baseList.checkBody.isEmpty;
     jsonData.lis.labelList = baseList.inspect.labelList;      //化验
     jsonData.lis.getExcelDataList =  baseList.inspect.getExcelDataList;      //化验导入
+    jsonData.checkedListImport = baseList.assistCheck.checkedListImport;     //辅检导入
     jsonData.pacs = baseList.assistCheck.assistLabel;     //辅检
     jsonData.diag = baseList.diagnosticList.diagnosticList;      //诊断
     jsonData.advice = baseList.pushMessage.advice;       //医嘱