Browse Source

Merge remote-tracking branch 'origin/optimize' into optimize

zhouna 6 năm trước cách đây
mục cha
commit
ad46f19a80
71 tập tin đã thay đổi với 21253 bổ sung380 xóa
  1. 1 1
      src/common/components/Calendar/MonthItem/index.less
  2. 1 0
      src/common/components/Calendar/SelectList/index.less
  3. 3 1
      src/common/components/Calendar/Time/index.jsx
  4. 3 1
      src/common/components/Calendar/Time/index.less
  5. 4 3
      src/common/components/Calendar/YearItem/index.less
  6. 1 1
      src/common/components/Calendar/index.jsx
  7. 2 1
      src/common/components/Calendar/index.less
  8. 2 2
      src/common/components/WrapModalContainer/index.jsx
  9. 4 3
      src/common/components/WrapModalContainer/index.less
  10. BIN
      src/common/images/down.png
  11. BIN
      src/common/images/up.png
  12. 10 0
      src/common/less/variables.less
  13. 4 4
      src/components/AddAssistCheck/index.jsx
  14. 11 3
      src/components/AddInspect/SlideExcel/index.jsx
  15. 6 0
      src/components/AddInspect/SlideExcel/index.less
  16. 1 1
      src/components/AddInspect/index.jsx
  17. BIN
      src/components/AssistCheck/dists/FileAPI.flash.camera.swf
  18. BIN
      src/components/AssistCheck/dists/FileAPI.flash.image.swf
  19. BIN
      src/components/AssistCheck/dists/FileAPI.flash.swf
  20. 3608 0
      src/components/AssistCheck/dists/FileAPI.html5.js
  21. 2 0
      src/components/AssistCheck/dists/FileAPI.html5.min.js
  22. 4418 0
      src/components/AssistCheck/dists/FileAPI.js
  23. 2 0
      src/components/AssistCheck/dists/FileAPI.min.js
  24. 11008 0
      src/components/AssistCheck/dists/jQuery.js
  25. 4 0
      src/components/AssistCheck/dists/jq.js
  26. 2 0
      src/components/AssistCheck/dists/jquery.fileapi.min.js
  27. 205 5
      src/components/AssistCheck/index.jsx
  28. 50 12
      src/components/AssistCheck/index.less
  29. 20 10
      src/components/Emergency/HisList/index.jsx
  30. 4 3
      src/components/Emergency/HisList/index.less
  31. 3 4
      src/components/Emergency/index.jsx
  32. 3 3
      src/components/Emergency/index.less
  33. 88 34
      src/components/Inspect/index.jsx
  34. 13 6
      src/components/Inspect/index.less
  35. 86 64
      src/components/TimeInterval/index.jsx
  36. 1 0
      src/components/TimeInterval/index.less
  37. 7 7
      src/components/WrapModalBody/Item/index.jsx
  38. 37 0
      src/components/WrapModalBody/WrapModalRight/index.jsx
  39. 33 10
      src/components/WrapModalBody/WrapModalTable/index.jsx
  40. 75 0
      src/components/WrapModalBody/WrapModalTableSon/index.jsx
  41. 6 11
      src/components/WrapModalBody/WrapModalTitle/index.jsx
  42. BIN
      src/components/WrapModalBody/img/check-circle.png
  43. BIN
      src/components/WrapModalBody/img/check-right.png
  44. 27 15
      src/components/WrapModalBody/index.jsx
  45. 176 2
      src/components/WrapModalBody/index.less
  46. 105 0
      src/components/WrapModalBodyPac/Item/index.jsx
  47. 33 0
      src/components/WrapModalBodyPac/WrapModalRight/index.jsx
  48. 45 0
      src/components/WrapModalBodyPac/WrapModalTable/index.jsx
  49. 66 0
      src/components/WrapModalBodyPac/WrapModalTableSon/index.jsx
  50. 12 0
      src/components/WrapModalBodyPac/WrapModalTitle/index.jsx
  51. BIN
      src/components/WrapModalBodyPac/img/check-circle.png
  52. BIN
      src/components/WrapModalBodyPac/img/check-right.png
  53. 37 0
      src/components/WrapModalBodyPac/index.jsx
  54. 275 0
      src/components/WrapModalBodyPac/index.less
  55. 30 4
      src/containers/AssistCheck.js
  56. 33 5
      src/containers/Inspect.js
  57. 22 1
      src/store/actions/assistCheck.js
  58. 25 1
      src/store/actions/inspect.js
  59. 5 0
      src/store/actions/patInfo.js
  60. 32 1
      src/store/async-actions/assistCheck.js
  61. 2 8
      src/store/async-actions/fetchModules.js
  62. 28 1
      src/store/async-actions/inspect.js
  63. 23 2
      src/store/async-actions/patInfo.js
  64. 294 120
      src/store/reducers/assistCheck.js
  65. 211 23
      src/store/reducers/inspect.js
  66. 6 3
      src/store/reducers/patInfo.js
  67. 5 0
      src/store/types/assistCheck.js
  68. 6 2
      src/store/types/inspect.js
  69. 2 1
      src/store/types/patInfo.js
  70. 1 0
      src/utils/drag.js
  71. 24 1
      src/utils/tools.js

+ 1 - 1
src/common/components/Calendar/MonthItem/index.less

@@ -1,13 +1,13 @@
 @import "~@less/mixin.less";
 
 .item{
-  display: inline-block;
   width: 42px;
   height: 24px;
   margin: 5px 0 0 5px;
   text-align: center;
   font-size: @font-size-h5;
   line-height: 24px;
+  float: left;
   cursor: pointer;
   vertical-align: middle;
   &.gray{

+ 1 - 0
src/common/components/Calendar/SelectList/index.less

@@ -98,6 +98,7 @@
     background-color: #fff;
     .items{
       font-size: 0;
+      overflow: hidden;
     }
   }
 }

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

@@ -47,7 +47,9 @@ class Time extends React.Component {
     render() {
         return (
             <div className={styles.wrapper}>
-                <input value={this.props.hour} onInput={(e)=>this.handleHourChange(window.parseInt(e.target.value))} />&nbsp;{'时'}&nbsp;<input value={this.props.minute} onInput={(e)=>this.handleMinuteChange(window.parseInt(e.target.value))}/>&nbsp;{'分'}&nbsp;<input value={this.props.second} onInput={(e)=>this.handleSecondChange(window.parseInt(e.target.value))}/>&nbsp;{'秒'}
+                <input className={styles.input} value={this.props.hour} onInput={(e)=>this.handleHourChange(window.parseInt(e.target.value))} />&nbsp;{'时'}&nbsp;
+                <input className={styles.input} value={this.props.minute} onInput={(e)=>this.handleMinuteChange(window.parseInt(e.target.value))}/>&nbsp;{'分'}&nbsp;
+                <input className={styles.input} value={this.props.second} onInput={(e)=>this.handleSecondChange(window.parseInt(e.target.value))}/>&nbsp;{'秒'}
             </div>
         )
     }

+ 3 - 1
src/common/components/Calendar/Time/index.less

@@ -3,7 +3,9 @@
 .wrapper{
   margin-top: 5px;
   text-align: center;
-  input{
+  height: 34px;
+  line-height: 34px;
+  .input{
     width: 40px;
     border: 1px solid @border-color;
     height: 22px;

+ 4 - 3
src/common/components/Calendar/YearItem/index.less

@@ -1,12 +1,13 @@
 @import "~@less/mixin.less";
 
 .item{
-  display: inline-block;
+  float: left;
   width: 60px;
-  height: 15px;
+  height: 20px;
   text-align: center;
   font-size: @font-size-h5;
-  line-height: 15px;
+  line-height: 20px;
+  margin: 3px 0;
   cursor: pointer;
   &.gray{
     color:@gray;

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

@@ -124,7 +124,7 @@ class Calendar extends React.Component {
   }
   render() {
     return (
-      <div className={style.wrapper} style={{ top: this.props.top }}>
+      <div className={style.wrapper} id="calendarDate" style={{ top: this.props.top }}>
         <div className={style.top}>
           <div className={style.year}>
             <YearList select={this.state.year} canSelectFuture={this.props.canSelectFuture} handleChange={(info) => this.handleYearSelect(info)} />

+ 2 - 1
src/common/components/Calendar/index.less

@@ -56,12 +56,13 @@
     line-height: 26px;
     position: absolute;
     right: 5px;
-    bottom: 15px;
+    bottom: 10px;
     box-sizing: border-box;
     color:#1F547E;
     border: 1px solid #b1d2ec;
     background-color: #deecf8;
     text-align: center;
+    cursor: pointer;
     &:hover{
       background-color: #ECF4FB;
     }

+ 2 - 2
src/common/components/WrapModalContainer/index.jsx

@@ -12,11 +12,11 @@ class WrapModalContainer extends React.Component {
     dragBox('previewWrapper','previewStatic','add')
   }
   render() {
-    const { onClose, children,title,width } = this.props;
+    const { onClose, children,title,width,height } = this.props;
     const domNode = document.getElementById('root');
     return ReactDom.createPortal(<div className={style['container']}>
       <div className={style['shade']} onClick={onClose}></div>
-      <div className={style['modal']} id="previewWrapper" style={{width:width+'px',marginLeft:(-width/2)+'px'}}>
+      <div className={style['modal']} id="previewWrapper" style={{width:width+'px',marginLeft:(-width/2)+'px',height:height,marginTop:(-height/2)+'px'}}>
         <div id="previewStatic" className={`${style['close']} drag-title`}>{title}<img src={close} onClick={onClose} /></div>
         {children}
       </div>

+ 4 - 3
src/common/components/WrapModalContainer/index.less

@@ -19,10 +19,11 @@
     background: #fff;
     position: fixed;
     left: 50%;
+    top:50%;
     margin-left: -410px;
-    top: 7%;  
-    bottom: 7%;
-    height: 86%;
+    // top: 7%;  
+    // bottom: 7%;
+    // height: 86%;
     overflow: hidden;
     padding-top: 40px;
   }

BIN
src/common/images/down.png


BIN
src/common/images/up.png


+ 10 - 0
src/common/less/variables.less

@@ -207,6 +207,16 @@
   -ms-user-select: none;
   user-select: none;
 }
+:global(.clearfix) {
+  zoom: 1;
+}
+:global(.clearfix:after) {
+  content: "";
+  display: block;
+  height: 0;
+  clear: both;
+  visibility: hidden;
+}
 // 加入病历
 .add-record{
   float: right;

+ 4 - 4
src/components/AddAssistCheck/index.jsx

@@ -140,7 +140,7 @@ class AddAssistCheck extends React.Component {
   }
   getAssistLabel() {
     const { assistLabel, handleChangeAssistValue, handleChangeDate, isRead, handlePush, winWidth,getInfomation } = this.props;
-    const { visible,activeName,id } = this.state;
+    const { visible,activeName,id,date } = this.state;
     return <ul className={styles.labelWrap} id="datePick">
       {
         assistLabel.map((item, idx) => {
@@ -159,9 +159,9 @@ class AddAssistCheck extends React.Component {
               <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>
-              <div style={{ display: this.state.date && idx == this.state.active ? "block" : "none", position: "relative" }}>
-                <Calendar isShow={true} handleChange={(info) => { handleChangeDate(info, idx); this.setState({ date: false }) }}></Calendar>
-              </div>
+              {
+                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} 

+ 11 - 3
src/components/AddInspect/SlideExcel/index.jsx

@@ -1,6 +1,6 @@
 import React, { Component } from "react";
 import styles from "./index.less";
-import { normalVal,timestampToTime } from '@utils/tools';
+import { normalVal,timestampToTime,getStatusImg } from '@utils/tools';
 import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
 class SlideExcel extends Component {
@@ -50,7 +50,11 @@ class SlideExcel extends Component {
                           <span className={styles.imgInfo} onClick={()=>getInfomation({name: value.uniqueName || '',type:12, position: 1})}></span>
                         </span>
                       </td>
-                      <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
+                      <td style={{width:'20%'}}>
+                        {
+                          getStatusImg(value.type,value.value,0)
+                        }
+                        {value.unit}</td>
                       <td style={{width:'25%'}}>
                           {normalVal(value.min,value.max)}
                       </td>
@@ -65,7 +69,11 @@ class SlideExcel extends Component {
                             <span className={styles.imgInfo} onClick={()=>getInfomation({name: value.uniqueName || '',type:12, position: 1})}></span>
                           </span>
                         </td>
-                        <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
+                        <td style={{width:'20%'}}>
+                          {
+                            getStatusImg(value.type,value.value,0)
+                          } 
+                          {value.unit}</td>
                         <td style={{width:'25%'}}>
                             {normalVal(value.min,value.max)}
                         </td>

+ 6 - 0
src/components/AddInspect/SlideExcel/index.less

@@ -164,6 +164,12 @@
   background: url('../img/info3.png') no-repeat center center;
   background-size: 100% auto; 
 }
+.excelDataTitle {
+  .tagSpan {
+    display: inline-block;
+    line-height: 28px;
+  }
+}
 .tagSpan {
   position: relative;
 }

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

@@ -360,7 +360,7 @@ class Inspect extends React.Component {
             }
           </ul>
         </div>
-        <div style={{ position: "relative", clear: "both" }}>
+        <div style={{ position: "relative", clear: "both",top:"5px" }}>
           <Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
           {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>)}

BIN
src/components/AssistCheck/dists/FileAPI.flash.camera.swf


BIN
src/components/AssistCheck/dists/FileAPI.flash.image.swf


BIN
src/components/AssistCheck/dists/FileAPI.flash.swf


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3608 - 0
src/components/AssistCheck/dists/FileAPI.html5.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2 - 0
src/components/AssistCheck/dists/FileAPI.html5.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 4418 - 0
src/components/AssistCheck/dists/FileAPI.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2 - 0
src/components/AssistCheck/dists/FileAPI.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 11008 - 0
src/components/AssistCheck/dists/jQuery.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 4 - 0
src/components/AssistCheck/dists/jq.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2 - 0
src/components/AssistCheck/dists/jquery.fileapi.min.js


+ 205 - 5
src/components/AssistCheck/index.jsx

@@ -1,21 +1,221 @@
 import React from 'react';
-import {ItemBox} from '@commonComp';
 import AddAssistCheck from '../AddAssistCheck';
+import { ItemBox, ConfirmModal, WrapModalContainer } from '@commonComp';
+import styles from './index.less';
+import Notify from '@commonComp/Notify';
+import $ from 'jquery';
+import { isIE, getUrlArgObject } from '@utils/tools.js';
+import { dragBox } from '@utils/drag';
+import WrapModalBodyPac from '../WrapModalBodyPac';
+import { getExcelList } from '@store/actions/inspect';
+import store from '@store';
+import { host, prefix } from '@utils/config.js';
 
-import styles from './index.less'
+
+// (function ($) {
+//   var FileAPI = {
+//     // @default: "./dist/"
+//     staticPath: './dists/',
+
+//     // @default: FileAPI.staticPath + "FileAPI.flash.swf"
+//     flashUrl: './dists/FileAPI.flash.swf',
+
+//     // @default: FileAPI.staticPath + "FileAPI.flash.image.swf"
+//     flashImageUrl: './dists/FileAPI.flash.image.swf'
+//   };
+//   return FileAPI
+// })($)
+
+// import "./dists/FileAPI.js";
+
+// const isLocal = window.location.hostname.indexOf('localhost') != -1;
+// const qhost = isLocal ? host + prefix : prefix;
+// const api = {
+//   upload: qhost + '/lisExcelRes/lisExcelAnalysis'
+// };
+// let numFlg = 0;
 class AssistCheck extends React.Component {
     constructor(props){
         super(props);
-        
+        this.state={
+          val: '',
+          visible: false,
+          dom: [],
+          isIE: isIE(),
+          ieVersion: null,
+          height: '-1',
+          hide: false,
+          importLis:false
+        }
+        this.showSlideImport=this.showSlideImport.bind(this)
+        // this.handleBindFileApi=this.handleBindFileApi.bind(this)
+        this.checkSystemIpt=this.checkSystemIpt.bind(this)
+        this.showInIcss=this.showInIcss.bind(this)
+        this.onClose=this.onClose.bind(this)
+        this.handleImportExcel=this.handleImportExcel.bind(this)
+    } 
+    // componentDidMount() {
+    //   $(document).click((event) => {
+    //     let searchWrap = $('#importExcelBtns')[0];   // 导入按钮按钮
+    //     let searchOption = $('#importExcelLists')[0];   // 下拉列表
+    //     if (searchOption) {
+    //       if(searchWrap != event.target){
+    //         this.setState({ importLis: false });
+    //       }
+    //     }
+    //   });
+    // }
+    handleImportExcel() {
+      this.inputRef.click();
+    }
+    showSlideImport(){
+      let flg = this.state.importLis
+      this.setState({
+        importLis:!flg
+      })
     }
 
+    // handleBindFileApi(){
+    //   const {message} = this.props;
+    //   var ua = navigator.userAgent;
+    //   var _isIE = ua.indexOf("MSIE") > -1;
+    //   if (_isIE) {
+    //     let version = ua.match(/MSIE ([\d.]+)/)[1];
+    //     this.setState({
+    //       ieVersion: version
+    //     })
+    //   }
+    //   $('iframe').bind('load', function () { })
+    //   const { fetchPushInfos } = this.props;
+    //   // FileAPI.debug = true
+    //   $.support.cors = true;
+    //   const that = this;
+    //   var choose = document.getElementById('choose');
+    //   FileAPI.event.on(choose, 'change', function (evt) {
+    //     var files = FileAPI.getFiles(evt);
+    //     FileAPI.filterFiles(files, function (file, info) {
+    //       let name = file.name;
+    //       // if( name.split('.')[1] == 'xlsx' || name.split('.')[1] == 'xls' ){
+    //       //     Notify.error('请选择正确的excel表格')
+    //       //     return false;
+    //       // }else{
+    //       //     return true;
+    //       //   }
+    //         return true;
+    //     },
+    //       function (files, rejected) {
+    //         if (files.length) {
+    //           //console.log(files[0])
+    //           const securityCode = getUrlArgObject("code");
+    //           const appKeyId = getUrlArgObject("appI");
+    //           const appKeySecret = getUrlArgObject("appS");
+    //           FileAPI.upload({
+    //             // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
+    //             url: api.upload,
+    //             data: { hospitalCode: message == '{}' ? '' : message.hospitalCode },
+    //             files: { uploadfile: files[0] },
+    //             headers: {
+    //               appKeyId: appKeyId,
+    //               appKeySecret: appKeySecret,
+    //               securityCode: securityCode
+    //             },
+    //             complete: function (err, xhr) {
+    //               if (!err) {
+    //                 let res = JSON.parse(xhr.response);
+    //                 let message = res.data.messages;
+    //                 // store.dispatch(getExcelList(res.data));
+    //                 // fetchPushInfos && fetchPushInfos();
+    //                 // if (message && message.length != 0) {
+    //                 //   that.setState({
+    //                 //     visible: true,
+    //                 //     dom: message,
+    //                 //     height: message.length
+    //                 //   })
+    //                 // }
+    //                 // $("#choose").val("");
+    //               } else {
+    //                 let res = JSON.parse(xhr.response);
+    //                 Notify.error(res.msg)
+    //               }
+    //             }
+    //           });
+    //         }
+    //       });
+    //   });
+    // }
+    
+    onClose() {
+      this.setState({
+        hide: false
+      })
+      dragBox('previewWrapper', 'previewStatic', 'del')
+    }
+    checkSystemIpt() {
+      this.setState({
+        hide: true
+      })
+    }
+    showInIcss(){
+      const {showInIcss} = this.props
+      this.setState({
+        hide: false
+      })
+      showInIcss&&showInIcss();
+      dragBox('previewWrapper', 'previewStatic', 'del')
+    }
     render(){
-        const {list,getInfomation,windowHeight,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
+        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 {showSlideImport,checkSystemIpt,handleBindFileApi,showInIcss,onClose} = this;
+        const {importLis,ieVersion,hide} = this.state;
+        // if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
+        //   ++numFlg
+        //   numFlg == 1?handleBindFileApi():null
+        // }
         return (
             <div className={styles.wrapper}>
                 <div className={styles.top}>
                     <span id="assistResultData">辅检结果数据</span>
-                    {/* <button>导入辅检结果</button> */}
+                    <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
+                        <p id="importPacBtn" className={styles.importInspectBtn}>导入辅检结果</p>
+                    </div>
+                    {/* {
+                      hospitalMsg.importWayLis == 3 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
+                        导入化验结果
+                        <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
+                      </div> : hospitalMsg.importWayLis == 22 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
+                        检查系统导入
+                      </div> : hospitalMsg.importWayLis == 2 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
+                        <p id="importExcelBtns" className={styles.importInspectBtn}>导入化验结果</p>
+                        {
+                          importLis?<ul className={styles.importSelect} id="importExcelLists">
+                            <li className={styles.excelIpt}>
+                              <div onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>本地导入</div>
+                              <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
+                            </li>
+                            <li className={`${styles.excelIpt} ${styles.systemIpt}`} onClick={checkSystemIpt}>检查系统导入</li>
+                          </ul>:null
+                        }
+                          </div> : null
+                      } */}
+                    {
+                      hide ? <WrapModalContainer title={'导入辅检数据'} width={1000} height={650} onClose={onClose}>
+                        <WrapModalBodyPac
+                          hospitalSonInspect={hospitalSonInspect}
+                          hospitalPac={hospitalPac}
+                          handleGetSonList={handleGetSonList}
+                          handleSearch={handleSearchs}
+                          allCheckImport={allCheckImport}
+                          allCheck={allCheck}
+                          selectGroupList={selectGroupList}
+                          checkedList={checkedList}
+                          selectOneCheck={selectOneCheck}
+                          showInIcss={showInIcss}
+                          message={message}
+                          msgObj={msgObj}
+                          height={650}
+                        ></WrapModalBodyPac>
+                      </WrapModalContainer> : null
+                    }
                 </div>
                 <ItemBox 
                     className={styles.title}

+ 50 - 12
src/components/AssistCheck/index.less

@@ -18,19 +18,57 @@
         position: relative;
         z-index: 2;
     }
-    button {
-        float: right;
-        width: 90px;
-        height: 28px;
-        line-height: 28px;
-        border: 1px solid @template-color;
-        color: @template-color;
-        background-color: #fff;
-        border-radius: 5px;
-        font-size: 12px;
-        outline: none;
-    }
+}
+
+.importInspectBtn {
+  padding: 0 8px;
+  font-size: 12px;
+}
+.pushButton {
+    float: right;
+    width: 90px;
+    height: 28px;
+    line-height: 28px;
+    border: 1px solid @template-color;
+    color: @template-color;
+    background-color: #fff;
+    border-radius: 5px;
+    font-size: 12px;
+    position: relative;
+    bottom: 3px;
+    cursor: pointer;
+    text-align: center;
+    box-sizing: content-box;
 }
 .title {
     margin-top: -23px !important;
+}
+.importInspect{
+  padding: 0 !important;
+}
+.importInspectBtn {
+  padding: 0 8px;
+  font-size: 12px;
+}
+.importSelect {
+  position: absolute;
+  width: 120%;
+  top: 29px;
+  left: 0;
+  z-index: 99;
+  font-size: 12px;
+  box-shadow: 0 10px 20px 0 #989DA3;
+  border: 1px solid #dedede;
+  background-color: #fff;
+  // display: none;
+  li {
+    height: 34px;
+    line-height: 34px;
+    padding-left: 10px;
+    cursor: pointer;
+  }
+  li:hover {
+    background-color: @ipt-color;
+    color: #2A9BD5;
+  }
 }

+ 20 - 10
src/components/Emergency/HisList/index.jsx

@@ -17,8 +17,8 @@ class HisList extends Component {
       hasSecond:-1,
       all:false,
       index:0,
-      startTime:getCurrentDate(false,'/')+' 00:00:00',
-      endTime:getCurrentDate(false,'/')+' 23:59:59',
+      startTime:getCurrentDate(false)+' 00:00:00',
+      endTime:getCurrentDate(false)+' 23:59:59',
     }
     this.handleGetMore = this.handleGetMore.bind(this);
     this.handleSelect = this.handleSelect.bind(this);
@@ -32,8 +32,8 @@ class HisList extends Component {
     const {handleFilter} = this.props;
     const {endTime} = this.state;
     const obj = {
-      startDate:date.replace(/\//g,'-'),
-      endDate:endTime.replace(/\//g,'-'),
+      startDate:date,
+      endDate:endTime,
       flag:999 //自定义以区分筛选条件
     }
     handleFilter&&handleFilter(obj);
@@ -43,8 +43,8 @@ class HisList extends Component {
     const {handleFilter} = this.props;
     const {startTime} = this.state;
     const obj = {
-      startDate:startTime.replace(/\//g,'-'),
-      endDate:data.replace(/\//g,'-'),
+      startDate:startTime,
+      endDate:date,
       flag:999 //自定义以区分筛选条件
     }
     handleFilter&&handleFilter(obj);
@@ -73,7 +73,7 @@ class HisList extends Component {
     return '';
   }
 
-  handleSelect(e,id){console.log(e,id)
+  handleSelect(e,id){
     e.stopPropagation();
     let {select} = this.state;
     if(select.indexOf(id)==-1){
@@ -129,7 +129,17 @@ class HisList extends Component {
   handleDownload(){
     const { handleDownload } = this.props;
     const {select} = this.state;
-    handleDownload&&handleDownload(select);
+    if(select.length>0){
+      handleDownload&&handleDownload(select);
+    }
+  }
+
+  getExportStyle(){
+    const {select} = this.state;
+    if(select.length>0){
+      return `${style['export']} ${style['exp-select']}`
+    }
+    return style['export'];
   }
 
   getList(){
@@ -172,10 +182,10 @@ class HisList extends Component {
       <div className={style['all-box']}>
         <img src={this.getAllIcon()} className={style['check-all']} onClick={this.handleAll}/>
         <span onClick={this.handleAll}>全选</span>
-        <span className={style['export']} onClick={this.handleDownload}>导出已选数据</span>
+        <span className={this.getExportStyle()} onClick={this.handleDownload}>导出已选数据</span>
       </div>
     </div>
   }
 }
 
-export default HisList;
+export default HisList;

+ 4 - 3
src/components/Emergency/HisList/index.less

@@ -94,19 +94,20 @@
       margin: 0 8px 0 0;
     }
     .export{
-      color: #2A9BD5;
+      color: #E2EFF6;
       display: inline-block;
       width: 92px;
       height: 30px;
       line-height: 30px;
       text-align: center;
-      border: 1px solid #2A9BD5;
+      border: 1px solid #E2EFF6;
       border-radius: 4px;
       margin-left: 177px;
+      cursor: pointer;
     }
     .exp-select{
       color: #2A9BD5;
       border-color: #2A9BD5;
     }
   }
-}
+}

+ 3 - 4
src/components/Emergency/index.jsx

@@ -73,9 +73,8 @@ class EmergencyHis extends Component{
     });
   }
   //点击搜索结果
-  handleListClick(item){console.log(333,item)
+  handleListClick(item){
     const { handleChangeValue } = this.props;
-    // this.searInp.current.innerText = '';
     this.searInp.current.value = item.name;
     handleChangeValue('');
     this.setState({
@@ -85,8 +84,8 @@ class EmergencyHis extends Component{
   }
   getBtnStyle(){
     const {valChange} = this.state;
-    if(valChange){
-      return `${style['add-btn']} ${style['gray-btn']}`
+    if(!valChange){
+      return `${style['add-btn']} ${style['comfirn-btn']}`
     }
     return style['add-btn'];
   }

+ 3 - 3
src/components/Emergency/index.less

@@ -87,9 +87,9 @@
         margin-left: 10px;
         cursor: pointer;
       }
-      .gray-btn{
-        color: #7C828E;
-        border-color: #7C828E;
+      .comfirn-btn{
+        color: #fff;
+        background: #2A9BD5;
       }
       .add-tip{
         font-size: 12px;

+ 88 - 34
src/components/Inspect/index.jsx

@@ -8,7 +8,7 @@ import store from '@store';
 import $ from 'jquery';
 import { host, prefix } from '@utils/config.js';
 import { isIE, getUrlArgObject } from '@utils/tools.js';
-import {dragBox} from '@utils/drag';
+import { dragBox } from '@utils/drag';
 import WrapModalBody from '../WrapModalBody';
 
 
@@ -33,6 +33,7 @@ const qhost = isLocal ? host + prefix : prefix;
 const api = {
   upload: qhost + '/lisExcelRes/lisExcelAnalysis'
 };
+let numFlg = 0;
 
 class Inspect extends React.Component {
   constructor(props) {
@@ -44,15 +45,31 @@ class Inspect extends React.Component {
       isIE: isIE(),
       ieVersion: null,
       height: '-1',
-      hide: false
+      hide: false,
+      importLis:false
     }
     this.handleImportExcel = this.handleImportExcel.bind(this)
     this.cancel = this.cancel.bind(this)
     this.getWarings = this.getWarings.bind(this)
     this.checkSystemIpt = this.checkSystemIpt.bind(this)
     this.onClose = this.onClose.bind(this)
-  }
+    this.handleBindFileApi = this.handleBindFileApi.bind(this)
+    this.showInIcss = this.showInIcss.bind(this)
+    this.showSlideImport = this.showSlideImport.bind(this)
+  }  
   componentDidMount() {
+    $(document).click((event) => {
+      let searchWrap = $('#importInspectBtn')[0];   // 导入按钮按钮
+      let searchOption = $('#importList')[0];   // 下拉列表
+      if (searchOption) {
+        if(searchWrap != event.target){
+          this.setState({ importLis: false });
+        }
+      }
+    });
+  }
+  handleBindFileApi(){
+    const {message} = this.props;
     var ua = navigator.userAgent;
     var _isIE = ua.indexOf("MSIE") > -1;
     if (_isIE) {
@@ -69,17 +86,15 @@ class Inspect extends React.Component {
     var choose = document.getElementById('choose');
     FileAPI.event.on(choose, 'change', function (evt) {
       var files = FileAPI.getFiles(evt);
-      var baseData = store.getState().patInfo.message;
       FileAPI.filterFiles(files, function (file, info) {
         let name = file.name;
         // if( name.split('.')[1] == 'xlsx' || name.split('.')[1] == 'xls' ){
         //     Notify.error('请选择正确的excel表格')
-        //     return;
+        //     return false;
         // }else{
-        //     alert(9)
         //     return true;
-        // }
-        return true;
+        //   }
+          return true;
       },
         function (files, rejected) {
           if (files.length) {
@@ -90,17 +105,12 @@ class Inspect extends React.Component {
             FileAPI.upload({
               // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
               url: api.upload,
-              data: { hospitalCode: baseData == '{}' ? '' : baseData.hospitalCode },
+              data: { hospitalCode: message == '{}' ? '' : message.hospitalCode },
               files: { uploadfile: files[0] },
               headers: {
                 appKeyId: appKeyId,
                 appKeySecret: appKeySecret,
                 securityCode: securityCode
-                // 'Content-Type':'Content-Type: multipart/form-data'
-                // 'Content-Type':'application/json;charset=UTF-8'
-                // 'Content-type': "text/plain"
-                // "Content-Type": 'multipart/form-data',
-                // 'Accept':'application/json'
               },
               complete: function (err, xhr) {
                 if (!err) {
@@ -156,40 +166,84 @@ class Inspect extends React.Component {
       hide: true
     })
   }
-  onClose(){
+  onClose() {
     this.setState({
       hide: false
     })
-    dragBox('previewWrapper','previewStatic','del')
+    dragBox('previewWrapper', 'previewStatic', 'del')
+  }
+  showInIcss(){
+    const {showInIcss} = this.props
+    this.setState({
+      hide: false
+    })
+    showInIcss&&showInIcss();
+    dragBox('previewWrapper', 'previewStatic', 'del')
+  }
+  showSlideImport(){
+    let flg = this.state.importLis
+    this.setState({
+      importLis:!flg
+    })
   }
   render() {
-    const { fetchPushInfos, getInfomation, inspectVal,handleSearch, windowHeight, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
-    const { ieVersion, isIE, hide } = this.state;
-    const { checkSystemIpt,onClose } = this;
+    const { fetchPushInfos, hospitalSonInspect, checkedList,selectWaring,message, selectOneCheck, selectGroupList, allCheckImport, allCheck, hospitalInspect, handleGetSonList, getInfomation, hospitalMsg, inspectVal, handleSearch, windowHeight, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
+    const { ieVersion, isIE, hide,importLis } = this.state;
+    const { checkSystemIpt, onClose,handleBindFileApi,showInIcss,showSlideImport } = this;
+    if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
+      ++numFlg
+      numFlg == 1?handleBindFileApi():null
+    }
     return (
-      <div className={styles.wrapper} >
+      <div className={styles.wrapper}>
         {/* 导入功能插件,ie8/9权限问题暂未解决,先隐藏 */}
         <div className={styles.top}>
           <span id="inspectResultData">化验结果数据</span>
           {/* <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}> */}
-          <div className={this.getStyle()}>
-            {/* <button disabled={ieVersion&&ieVersion>9?true:false}>导入化验结果</button>*/}
-            <div className={styles.pushButton}>导入化验结果
-            <ul className={styles.importSelect}>
-              <li className={styles.excelIpt}>
-                <div onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>本地导入</div>
+          <div className={this.getStyle()} style={{ display: hospitalMsg.importWayLis == 0 ? 'none' : 'block' }}>
+            {/* <button disabled={ieVersion&&ieVersion>9?true:false}>导入化验结果</button> */}
+            {/* <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
+
+            {/* {0没有,1本地,2医院,3本地和医院} */}
+            {
+              hospitalMsg.importWayLis == 3 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
+                <p className={styles.importInspectBtn}>导入化验结果</p>
                 <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
-              </li>
-              <li className={`${styles.excelIpt} ${styles.systemIpt}`} onClick={checkSystemIpt}>检查系统导入</li>
-            </ul>
-            
-            </div>
+              </div> : hospitalMsg.importWayLis == 22 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
+                <p className={styles.importInspectBtn}>导入化验结果</p>
+              </div> : hospitalMsg.importWayLis == 2 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
+                <p id="importInspectBtn" className={styles.importInspectBtn}>导入化验结果</p>
+                {
+                  importLis?<ul className={styles.importSelect} id="importList">
+                    <li className={styles.excelIpt}>
+                      <div onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>本地导入</div>
+                      <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
+                    </li>
+                    <li className={`${styles.excelIpt} ${styles.systemIpt}`} onClick={checkSystemIpt}>检查系统导入</li>
+                  </ul>:null
+                }
+                  </div> : null
+            }
+
             {
-              hide ? <WrapModalContainer title={'导入化验数据'} width={1000} onClose={onClose}>
-                <WrapModalBody handleSearch={handleSearch}></WrapModalBody>
+              hide ? <WrapModalContainer title={'导入化验数据'} width={1000} height={650} onClose={onClose}>
+                <WrapModalBody
+                  hospitalSonInspect={hospitalSonInspect}
+                  hospitalInspect={hospitalInspect}
+                  handleGetSonList={handleGetSonList}
+                  handleSearch={handleSearch}
+                  allCheckImport={allCheckImport}
+                  allCheck={allCheck}
+                  selectGroupList={selectGroupList}
+                  checkedList={checkedList}
+                  selectOneCheck={selectOneCheck}
+                  selectWaring={selectWaring}
+                  showInIcss={showInIcss}
+                  message={message}
+                  height={650}
+                ></WrapModalBody>
               </WrapModalContainer> : null
             }
-            {/* <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
           </div>
         </div>
         <ItemBox

+ 13 - 6
src/components/Inspect/index.less

@@ -43,11 +43,11 @@
         border-radius: 5px;
         color: @template-color;
         cursor: pointer;
-        &:hover {
-          .importSelect {
-            display: block !important;
-          }
-        }
+        // &:hover {
+        //   .importSelect {
+        //     display: block !important;
+        //   }
+        // }
     }
 }
 .title {
@@ -75,6 +75,13 @@
     color: #fff;
     // cursor: pointer;
 }
+.importInspect{
+  padding: 0 !important;
+}
+.importInspectBtn {
+  padding: 0 8px;
+  font-size: 12px;
+}
 .importSelect {
   position: absolute;
   width: 120%;
@@ -85,7 +92,7 @@
   box-shadow: 0 10px 20px 0 #989DA3;
   border: 1px solid #dedede;
   background-color: #fff;
-  display: none;
+  // display: none;
   li {
     height: 34px;
     line-height: 34px;

+ 86 - 64
src/components/TimeInterval/index.jsx

@@ -1,7 +1,8 @@
 import React from "react";
 import style from "./index.less";
-import { Calendar} from '@commonComp';
-import {getCalendarDate,getCurrentDate} from "@utils/tools";
+import $ from "jquery";
+import { Calendar } from '@commonComp';
+import { getCalendarDate, getCurrentDate } from "@utils/tools";
 /**
  * top  定位距离
  * sure 是否显示确认按钮
@@ -14,90 +15,111 @@ class TimeInterval extends React.Component {
   constructor(props) {
     super(props);
     const date = new Date();
-    this.state={
-      startTime:getCurrentDate(false,'/')+' 00:00:00',
-      endTime:getCurrentDate(false,'/')+' 23:59:59',
-      show:false,
-      flg:0,
-      timeLisStart:{
-        year:  date.getFullYear(),
-        month:  date.getMonth() + 1,
-        day:  date.getDate(),
-        hour:'00',
-        minute:'00',
-        second:'00'
+    this.state = {
+      startTime: getCurrentDate(false) + ' 00:00:00',
+      endTime: getCurrentDate(false) + ' 23:59:59',
+      show: false,
+      flg: 0,
+      timeLisStart: {
+        year: date.getFullYear(),
+        month: date.getMonth() + 1,
+        day: date.getDate(),
+        hour: '00',
+        minute: '00',
+        second: '00'
       },
-      timeLisEnd:{
-        year:  date.getFullYear(),
-        month:  date.getMonth() + 1,
-        day:  date.getDate(),
-        hour:'23',
-        minute:'59',
-        second:'59'
+      timeLisEnd: {
+        year: date.getFullYear(),
+        month: date.getMonth() + 1,
+        day: date.getDate(),
+        hour: '23',
+        minute: '59',
+        second: '59'
       }
     }
     this.handleShowTime = this.handleShowTime.bind(this)
     this.timeSure = this.timeSure.bind(this)
   }
-  handleChangeDate(date){
+  handleChangeDate(date) {
     // console.log(date,'外')
   }
-  timeSure(date){
-    const {getStartTime,getEndTime} = this.props;
-    if(this.state.flg == 1){
+  componentDidMount() {
+    $(document).click((event) => {
+      let startTimeDes = document.getElementById("startTimeDes")
+      let endTimeDes = document.getElementById("endTimeDes")  
+      let calendarDate = document.getElementById("calendarDate")
+      if (calendarDate) {
+        if (startTimeDes != event.target && endTimeDes != event.target && !calendarDate.contains(event.target)) {
+          this.setState({ show: false });
+        }
+      }
+    });
+  }
+  timeSure(date) {
+    const { getStartTime, getEndTime } = this.props;
+    if (this.state.flg == 1) {
       this.setState({
-        show:false,
-        startTime:getCalendarDate(date,true,'/'),//页面显示的时间
-        timeLisStart:date//事件组件的日期
+        show: false,
+        startTime: getCalendarDate(date, true),//页面显示的时间
+        timeLisStart: date//事件组件的日期
       })
-      getStartTime(getCalendarDate(date,true,'/'))
-    }else if(this.state.flg == 2){
+      getStartTime(getCalendarDate(date, true))
+    } else if (this.state.flg == 2) {
       this.setState({
-        show:false,
-        endTime:getCalendarDate(date,true,'/'),
-        timeLisEnd:date
+        show: false,
+        endTime: getCalendarDate(date, true),
+        timeLisEnd: date
       })
-      getEndTime(getCalendarDate(date,true,'/'))
+      getEndTime(getCalendarDate(date, true))
     }
   }
-  handleShowTime(flg){
-    if(this.state.show){
-      this.setState({show:false},()=>{
+  handleShowTime(flg) {
+    if (this.state.show) {
+      if(flg == this.state.flg){
         this.setState({
-          show:true,
-          flg:flg
+          show: false,
+          flg: flg
         })
-      })
-    }else{
+      }else{
+        this.setState({ show: false }, () => {
+          this.setState({
+            show: true,
+            flg: flg
+          })
+        })
+      }
+    } else {
       this.setState({
-        show:true,
-        flg:flg
+        show: true,
+        flg: flg
       })
     }
   }
   render() {
-    const {startTime,endTime,show,timeLisStart,timeLisEnd,flg} = this.state
-    const {handleShowTime,timeSure,handleChangeDate} = this
+    const { startTime, endTime, show, timeLisStart, timeLisEnd, flg } = this.state
+    const { handleShowTime, timeSure, handleChangeDate } = this
     return <div className={style.timeWrap}>
-          <div className={style.timeIpts}>
-            <input 
-              value={startTime} 
-              readOnly 
-              className={style.ipt} 
-              onClick={()=>handleShowTime(1)} 
-              type="text" 
-              placeholder="起始时间"/>~
-            <input 
-              value={endTime}
-              readOnly
-              className={style.ipt}
-               onClick={()=>handleShowTime(2)}
-               type="text"
-               placeholder="终止时间"/>
-          </div>
-          {
-            show?<Calendar timeLis={flg==2?timeLisEnd:timeLisStart} top={40} sure={true} timeSure={timeSure} needTime={true} isShow={true} handleChange={handleChangeDate}></Calendar>:null
-          }
+      <div className={style.timeIpts}>
+        <input
+          value={startTime}
+          readOnly
+          className={style.ipt}
+          onClick={() => handleShowTime(1)}
+          type="text"
+          id="startTimeDes"
+          placeholder="起始时间" />~
+              <input
+          value={endTime}
+          readOnly
+          id="endTimeDes"
+          className={style.ipt}
+          onClick={() => handleShowTime(2)}
+          type="text"
+          placeholder="终止时间" />
+      </div>
+        {
+          show ? <Calendar timeLis={flg == 2 ? timeLisEnd : timeLisStart} top={40} sure={true} timeSure={timeSure} needTime={true} isShow={true} handleChange={handleChangeDate}></Calendar> : null
+        }
     </div>
   }
 }

+ 1 - 0
src/components/TimeInterval/index.less

@@ -10,4 +10,5 @@
 input.ipt {
   width: 126px;
   text-align: center;
+  font-size: 12px;
 }

+ 7 - 7
src/components/WrapModalBody/Item/index.jsx

@@ -7,8 +7,8 @@ class Item extends React.Component {
   constructor(props) {
     super(props);
     this.state={
-      startTime:getCurrentDate(false,'/')+' 00:00:00',
-      endTime:getCurrentDate(false,'/')+' 23:59:59',
+      startTime:getCurrentDate(false)+' 00:00:00',
+      endTime:getCurrentDate(false)+' 23:59:59',
       code:'',
       name:'',
       sex:'',
@@ -49,12 +49,12 @@ class Item extends React.Component {
     }
   }
   render() {
-    const {handleSearch} = this.props
+    const {handleSearch,message} = this.props
     return <div className={style['items']}>
       <ul>
         <li className={`${style.code} ${style.pubLi}`}>
           <span>门诊号 : </span>
-          <input type="text" value={this.state.code}
+          <input type="text" value={this.state.code || message.recordId} readOnly
             onInput={(e) => { 
                 this.handleInput(e,1)
             }}
@@ -64,7 +64,7 @@ class Item extends React.Component {
         </li>
         <li className={`${style.name} ${style.pubLi}`}>
           <span>姓名 : </span>
-          <input type="text" value={this.state.name}
+          <input type="text" value={this.state.name || message.patientName} readOnly
             onInput={(e) => { 
                 this.handleInput(e,2)
             }}
@@ -74,7 +74,7 @@ class Item extends React.Component {
         </li>
         <li className={`${style.sex} ${style.pubLi}`}>
           <span>性别 : </span>
-          <input type="text" value={this.state.sex}
+          <input type="text" value={this.state.sex || message.patientSex} readOnly
             onInput={(e) => { 
                 this.handleInput(e,3)
             }}
@@ -84,7 +84,7 @@ class Item extends React.Component {
         </li>
         <li className={`${style.age} ${style.pubLi}`}>
           <span>年龄 : </span>
-          <input type="text" value={this.state.age}
+          <input type="text" value={this.state.age||message.patientAge} readOnly
             onInput={(e) => { 
                 this.handleInput(e,4)
             }}

+ 37 - 0
src/components/WrapModalBody/WrapModalRight/index.jsx

@@ -0,0 +1,37 @@
+import React from "react";
+import style from "../index.less";
+import {getStatusImg} from "@utils/tools";
+
+const WrapModalRight = (props) => {
+  const {selectGroupList,height,showInIcss} = props;
+  return <div className={style['modalRight']}>
+    <div className={`${style.modalRightT} clearfix`}>
+      <span className={style.tip}>已选化验项</span>
+      <span className={style.btnS} onClick={showInIcss}>确认选择</span>
+    </div>
+    <div className={style.modalRightB} style={{height:(height-106)+'px'}}>
+      {
+        selectGroupList&&selectGroupList.map((part)=>{
+          return <div className={style['modalRightPart']}>
+            <div className={style.title}>{part.groupName}</div>
+            <ul className={style.partLis}>
+              {part.lisExcelWrapper&&part.lisExcelWrapper.map((item)=>{
+                return <li>
+                  <p className={style.itemName}>{item.itemName}</p>
+                  <p>
+                    {
+                      getStatusImg(item.type,item.value,1)
+                    } 
+                    <span style={{color: '#5D5D5D'}}>{item.unit} ( {item.min}-{item.max} )</span>
+                  </p>
+                </li>
+              })}
+            </ul>
+        </div>
+        })
+      }
+    </div>
+  </div>
+}
+
+export default WrapModalRight;

+ 33 - 10
src/components/WrapModalBody/WrapModalTable/index.jsx

@@ -1,16 +1,39 @@
 import React from "react";
 import style from "../index.less";
 
-class WrapModalTable extends React.Component {
-  constructor(props) {
-    super(props)
-  }
-  render() {
-    const { list,message } = this.props;
-    return <div className={style['modalTable']}>
-      table
+const WrapModalTable = (props) => {
+  const { hospitalInspect, handleGetSonList } = props;
+  return <div className={style['modalTable']}>
+    <div className={style.tablePubP}>
+      <table>
+        <tr className={style.head}>
+          <td className={`${style.fst} ellipsOver`}>编号</td>
+          <td className={`${style.sec} ellipsOver`}>标本类型</td>
+          <td className={`${style.trd} ellipsOver`}>组名称</td>
+          <td className={`${style.four} ellipsOver`}>送检医生</td>
+          <td className={`${style.fif} ellipsOver`}>送检时间</td>
+          <td className={`${style.six} ellipsOver`}>报告时间</td>
+          <td className={`${style.sev} ellipsOver`} style={{display:hospitalInspect.length>5?'':'none'}}></td>
+        </tr>
+      </table>
     </div>
-  }
+    <div className={`${style.parentTable} ${style.tablePubP}`}>
+      <table>
+        {
+          hospitalInspect && hospitalInspect.map((item, idx) => {
+            return <tr onClick={() => handleGetSonList(item.groupName)}>
+              <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>
+              <td title={item.inspectDoctor} className={`${style.four} ellipsOver`}>{item.inspectDoctor}</td>
+              <td title={item.inspectTime} className={`${style.fif} ellipsOver`}>{item.inspectTime}</td>
+              <td title={item.reportTime} className={`${style.six} ellipsOver`}>{item.reportTime}</td>
+            </tr>
+          })
+        }
+      </table>
+    </div>
+  </div>
 }
 
-export default WrapModalTable;
+export default WrapModalTable;

+ 75 - 0
src/components/WrapModalBody/WrapModalTableSon/index.jsx

@@ -0,0 +1,75 @@
+import React from "react";
+import style from "../index.less";
+import check_circle from '../img/check-circle.png';
+import check_right from '../img/check-right.png';
+import {getStatusImg} from '@utils/tools';
+
+class WrapModalTableSon extends React.Component {
+  constructor(props) {
+    super(props)
+    this.getImgPath = this.getImgPath.bind(this)
+  }
+  getImgPath(name,groupName,item){
+    const { checkedList,selectOneCheck } = this.props;
+    let num = 0;
+    for(let k = 0;k < checkedList.length;k++){
+      let tmpLis = checkedList[k];
+      if(tmpLis == name){
+        return <img className={style.check} onClick={()=>selectOneCheck(name,groupName,item)} src={check_right} alt="" />
+      }else{
+        ++num
+      }
+    }
+    if(num == checkedList.length){
+      return <img className={style.check} onClick={()=>selectOneCheck(name,groupName,item)} src={check_circle} alt="" />
+    }
+  }
+  render() {
+    const { hospitalSonInspect,allCheckImport,allCheck,selectWaring } = this.props;
+    return <div className={style['modalTable']}>
+      <div className={style.sonTitle}>
+        <span>组名称 : {hospitalSonInspect.groupName}</span><span className={style.btn} onClick={selectWaring}>选中异常值数据</span>
+      </div>
+      <div className={`${style.SonTable}`}>
+        <table>
+          <tr className={style.head}>
+            <td className={`${style.fst} ellipsOver`} onClick={allCheckImport}><img className={style.check} src={allCheck?check_right:check_circle} alt="" />全选</td>
+            <td className={`${style.sec} ellipsOver`}>编号</td>
+            <td className={`${style.trd} ellipsOver`}>项目名称</td>
+            <td className={`${style.four} ellipsOver`}>结果</td>
+            <td className={`${style.fif} ellipsOver`}>单位</td>
+            <td className={`${style.six} ellipsOver`}>参考值</td>
+            <td className={`${style.sev} ellipsOver`} style={{display:(hospitalSonInspect && hospitalSonInspect.lisExcelWrapper && hospitalSonInspect.lisExcelWrapper.length)>5?'':'none'}}></td>
+          </tr>
+        </table>
+      </div>
+      <div className={`${style.parentTable} ${style.SonTable}`}>
+        <table>
+          {/* {type-0正常1异常2上升3下降} */}
+          {
+            hospitalSonInspect && hospitalSonInspect.lisExcelWrapper && hospitalSonInspect.lisExcelWrapper.map((item, idx) => {
+              return <tr>
+                <td className={`${style.fst} ellipsOver`}>
+                  {
+                    this.getImgPath(item.itemName,hospitalSonInspect.groupName,item)
+                  }
+                </td>
+                <td className={`${style.sec} ellipsOver`}>{idx+1}</td>
+                <td title={item.itemName} className={`${style.trd} ellipsOver`}>{item.itemName}</td>
+                <td title={item.value} className={`${style.four} ellipsOver`}>
+                  {
+                    getStatusImg(item.type,item.value,0)
+                  }
+                </td>
+                <td title={item.unit} className={`${style.fif} ellipsOver`}>{item.unit}</td>
+                <td title={`${item.min}-${item.max}`} className={`${style.six} ellipsOver`}>{item.min}-{item.max}</td>
+              </tr>
+            })
+          }
+        </table>
+      </div>
+    </div>
+  }
+}
+
+export default WrapModalTableSon;

+ 6 - 11
src/components/WrapModalBody/WrapModalTitle/index.jsx

@@ -2,16 +2,11 @@ import React from "react";
 import style from "../index.less";
 import Item from "../Item";
 
-class WrapModalTitle extends React.Component {
-  constructor(props) {
-    super(props)
-  }
-  render() {
-    const {handleSearch} = this.props
-    return <div className={style['modalTop']}>
-      <Item handleSearch={handleSearch}></Item>
-    </div>
-  }
+const WrapModalTitle =(props)=>{
+  const { handleSearch,message } = props
+  return <div className={style['modalTop']}>
+    <Item handleSearch={handleSearch} message={message}></Item>
+  </div>
 }
 
-export default WrapModalTitle;
+export default WrapModalTitle;

BIN
src/components/WrapModalBody/img/check-circle.png


BIN
src/components/WrapModalBody/img/check-right.png


+ 27 - 15
src/components/WrapModalBody/index.jsx

@@ -2,23 +2,35 @@ import React from "react";
 import style from "./index.less";
 import WrapModalTitle from "./WrapModalTitle";
 import WrapModalTable from "./WrapModalTable";
+import WrapModalTableSon from "./WrapModalTableSon";
+import WrapModalRight from "./WrapModalRight";
 
-class WrapModalBody extends React.Component {
-  constructor(props) {
-    super(props)
-  }
-  render() {
-    const { handleSearch } = this.props;
-    return <div className={style['container']}>
-      <div className={`${style.left}`}>
-        <WrapModalTitle handleSearch={handleSearch}></WrapModalTitle>
-        <WrapModalTable></WrapModalTable>
-      </div>
-      <div className={`${style.right}`}>
-        sdsd
-      </div>
+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
+          allCheckImport={allCheckImport}
+          allCheck={allCheck}
+          hospitalSonInspect={hospitalSonInspect}
+          selectGroupList={selectGroupList}
+          checkedList={checkedList}
+          selectOneCheck={selectOneCheck}
+          selectWaring={selectWaring}
+        ></WrapModalTableSon>:null
+      }
     </div>
-  }
+    <div className={`${style.right}`}>
+      <WrapModalRight showInIcss={showInIcss} height={height} selectGroupList={selectGroupList}></WrapModalRight>
+    </div>
+  </div>
 }
 
 export default WrapModalBody;

+ 176 - 2
src/components/WrapModalBody/index.less

@@ -2,13 +2,13 @@
 
 .container {
   height: 100%;
-  background-color: @ipt-wrap-color;
+  // background-color: @ipt-wrap-color;
   position: relative;
   .left {
     position: absolute;
     top: 0;
     left: 0;
-    width: 761px;
+    width: 762px;
     height: 100%;
     border-right: 1px solid #D8D8D8;
   }
@@ -55,6 +55,7 @@
         line-height: 26px;
         padding: 0 3px;
         box-sizing: border-box;
+        cursor: pointer;
       }
     }
     .code{
@@ -89,5 +90,178 @@
         text-align: center;
       }
     }
+  }    
+  .modalRightT{
+    height: 46px;
+    line-height: 46px;
+    background-color: #F0F0F0;
+    padding: 0 20px;
+    position: absolute;
+    width: 100%;
+    span.tip {
+      font-size: 12px;
+      float: left;
+    }
+    span.btnS {
+      font-size: 12px;
+      float: right;
+      width: 64px;
+      height: 26px;
+      line-height: 26px;
+      margin-top: 10px;
+      color: #fff;
+      text-align: center;
+      border-radius: 4px;
+      background-color: @blue;
+      cursor: pointer;
+    }
+  }
+  .modalRightB{
+    padding: 20px;
+    margin-bottom: 20px;
+    overflow: auto;
+    position: absolute;
+    top: 46px;
+    height: 100%;
+    width: 100%;
+    .title {
+      font-size: 14px;
+      padding-bottom: 6px;
+    }
+    .partLis {
+      width: 100%;
+      padding: 10px;
+      margin-bottom: 20px;
+      background-color: #E9F5FA;
+      li {
+        padding: 5px 0;
+      }
+      p {
+        line-height: 22px;
+      }
+      .itemName {
+        line-height: 22px;
+      }
+    }
+  }
+  .modalTable {
+    .tablePubP {
+      td.fst {
+        width: 48px;
+        max-width: 48px;
+      }
+      td.sec {
+        width: 116px;
+        max-width: 116px;
+      }
+      td.trd {
+        // width: 215px;
+        // max-width: 215px;
+        // cursor: pointer;
+      }
+      td.four {
+        width: 87px;
+        max-width: 87px;
+      }
+      td.fif {
+        width: 150px;
+        max-width: 150px;
+      }
+      td.six {
+        width: 150px;
+        max-width: 150px;
+      }
+      td.sev {
+        width: 17px;
+        max-width: 17px;
+      }
+    }
+    .parentTable {
+      height: 206px;
+      overflow: auto;
+      tr {
+        cursor: pointer;
+      }
+    }
+    .SonTable {
+      .check {
+        width: 20px;
+        height: 20px;
+        position: relative;
+        top: 5px;
+      }
+      td.fst {
+        width: 72px;
+        max-width: 72px;
+        cursor: pointer;
+      }
+      td.sec {
+        width: 59px;
+        max-width: 59px;
+      }
+      td.trd {
+        // width: 215px;
+        // max-width: 215px;
+        cursor: default;
+      }
+      td.four {
+        width: 87px;
+        max-width: 87px;
+      }
+      td.fif {
+        width: 150px;
+        max-width: 150px;
+      }
+      td.six {
+        width: 150px;
+        max-width: 150px;
+      }
+      td.sev {
+        width: 17px;
+        max-width: 17px;
+      }
+    }
+    .sonTitle {
+      height: 46px;
+      line-height: 46px;
+      background-color: #F0F0F0;
+      padding: 0 20px;
+      .btn {
+        font-size: 12px;
+        float: right;
+        height: 26px;
+        line-height: 24px;
+        border: 1px solid #9C9C9C;
+        border-radius: 4px;
+        padding: 0 11px;
+        margin-top: 10px;
+        cursor: pointer;
+        &:hover {
+          background-color: @blue;
+          border: 1px solid @blue;
+          color: #fff;
+        }
+      }
+      
+    }
+    table {
+      border-collapse: collapse;
+      tr {
+        height: 40px;
+        line-height: 40px;
+        text-align: center;
+        td {
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+          border: 1px solid #E7EAEB;
+          padding: 0 5px;
+          box-sizing: border-box;
+        }
+      }
+      .head {
+        background-color: #EAF7FA;
+      }
+    }
   }
 }

+ 105 - 0
src/components/WrapModalBodyPac/Item/index.jsx

@@ -0,0 +1,105 @@
+import React from "react";
+import style from "../index.less";
+import {getCalendarDate,getCurrentDate} from "@utils/tools";
+import TimeInterval from '../../TimeInterval';
+
+class Item extends React.Component {
+  constructor(props) {
+    super(props);
+    this.state={
+      startTime:getCurrentDate(false,'/')+' 00:00:00',
+      endTime:getCurrentDate(false,'/')+' 23:59:59',
+      code:'',
+      name:'',
+      sex:'',
+      age:''
+    }
+    this.getStartTime = this.getStartTime.bind(this)
+    this.getEndTime = this.getEndTime.bind(this)
+    this.handleInput = this.handleInput.bind(this)
+  }
+  getStartTime(date){
+    this.setState({startTime:date})
+  }
+  getEndTime(date){
+    this.setState({endTime:date})
+  }
+  handleInput(e,val){
+    switch(val){
+      case 1:
+        this.setState({
+          code:e.target.value
+        })
+        break;
+      case 2:
+        this.setState({
+          name:e.target.value
+        })
+        break;
+      case 3:
+        this.setState({
+          sex:e.target.value
+        })
+        break;
+      case 4:
+        this.setState({
+          age:e.target.value
+        })
+        break;
+    }
+  }
+  render() {
+    const {handleSearch,message} = this.props
+    return <div className={style['items']}>
+      <ul>
+        <li className={`${style.code} ${style.pubLi}`}>
+          <span>门诊号 : </span>
+          <input type="text" value={this.state.code || message.recordId} readOnly
+            onInput={(e) => { 
+                this.handleInput(e,1)
+            }}
+            onPropertyChange={(e) => {  
+                this.handleInput(e,1)
+            }} />
+        </li>
+        <li className={`${style.name} ${style.pubLi}`}>
+          <span>姓名 : </span>
+          <input type="text" value={this.state.name || message.patientName} readOnly
+            onInput={(e) => { 
+                this.handleInput(e,2)
+            }}
+            onPropertyChange={(e) => {  
+                this.handleInput(e,2)
+            }} />
+        </li>
+        <li className={`${style.sex} ${style.pubLi}`}>
+          <span>性别 : </span>
+          <input type="text" value={this.state.sex || message.patientSex} readOnly
+            onInput={(e) => { 
+                this.handleInput(e,3)
+            }}
+            onPropertyChange={(e) => {  
+                this.handleInput(e,3)
+            }} />
+        </li>
+        <li className={`${style.age} ${style.pubLi}`}>
+          <span>年龄 : </span>
+          <input type="text" value={this.state.age||message.patientAge} readOnly
+            onInput={(e) => { 
+                this.handleInput(e,4)
+            }}
+            onPropertyChange={(e) => {  
+                this.handleInput(e,4)
+            }} />
+        </li>
+        <li className={`${style.time} ${style.pubLi}`}>
+          <span>送检时间 : </span>
+          <TimeInterval getStartTime={this.getStartTime} getEndTime={this.getEndTime}></TimeInterval>
+        </li>
+      </ul>
+      <div className={style.search} onClick={()=>handleSearch(this.state)}>检索</div>
+    </div>
+  }
+}
+
+export default Item;

+ 33 - 0
src/components/WrapModalBodyPac/WrapModalRight/index.jsx

@@ -0,0 +1,33 @@
+import React from "react";
+import style from "../index.less";
+
+const WrapModalRight = (props) =>{
+  const {selectGroupList,height,showInIcss} = props;
+  return <div className={style['modalRight']}>
+    <div className={`${style.modalRightT} clearfix`}>
+      <span className={style.tip}>已选辅检项</span>
+      <span className={style.btnS} onClick={showInIcss}>确认选择</span>
+    </div>
+    <div className={style.modalRightB} style={{height:(height-106)+'px'}}>
+      {
+        selectGroupList&&selectGroupList.map((part)=>{
+          return <div className={style['modalRightPart']}>
+            <div className={style.title}>{part.checkItem}</div>
+            <ul className={style.partLis}>
+              {part.pacsResultDTO&&part.pacsResultDTO.map((item)=>{
+                return <li>
+                  <p className={style.itemName}>{item.checkItem}</p>
+                  <p>
+                    影像诊断 : <span style={{color: '#5D5D5D'}}>{item.imagingResults}</span>
+                  </p>
+                </li>
+              })}
+            </ul>
+        </div>
+        })
+      }
+    </div>
+  </div>
+}
+
+export default WrapModalRight;

+ 45 - 0
src/components/WrapModalBodyPac/WrapModalTable/index.jsx

@@ -0,0 +1,45 @@
+import React from "react";
+import style from "../index.less";
+
+const WrapModalTable = (props) => {
+  const { hospitalPac, handleGetSonList,msgObj } = props;
+  return <div className={style['modalTable']}>
+    <div className={style.tablePubP}>
+      <table>
+        <tr className={style.head}>
+          <td className={`${style.fst} ellipsOver`}>申请单号</td>
+          <td className={`${style.sec} ellipsOver`}>申请时间</td>
+          <td className={`${style.trd} ellipsOver`}>检查项目</td>
+          <td className={`${style.four} ellipsOver`}>检查号</td>
+          <td className={`${style.fif} ellipsOver`}>类型</td>
+          <td className={`${style.six} ellipsOver`}>患者姓名</td>
+          <td className={`${style.sev} ellipsOver`}>病人编号</td>
+          <td className={`${style.egt} ellipsOver`}>检查时间</td>
+          <td className={`${style.egt} ellipsOver`}>报告时间</td>
+          <td className={`${style.nig} ellipsOver`} style={{display:hospitalPac.length>4?'':'none'}}></td>
+        </tr>
+      </table>
+    </div>
+    <div className={`${style.parentTable} ${style.tablePubP}`}>
+      <table>
+        {
+          hospitalPac && hospitalPac.map((item, idx) => {
+            return <tr onClick={() => handleGetSonList(item.checkItem,item.reportTime)}>
+              <td title={item.applicationNum} className={`${style.fst} ellipsOver`}>{item.applicationNum}</td>
+              <td title={item.applicationDate} className={`${style.sec} ellipsOver`}>{item.applicationDate}</td>
+              <td title={item.checkItem} className={`${style.trd} ellipsOver`}>{item.checkItem}</td>
+              <td title={item.checkNum} className={`${style.four} ellipsOver`}>{item.checkNum}</td>
+              <td title={item.type} className={`${style.fif} ellipsOver`}>{item.type}</td>
+              <td title={msgObj.name} className={`${style.six} ellipsOver`}>{msgObj.name}</td>
+              <td title={msgObj.patientNum} className={`${style.sev} ellipsOver`}>{msgObj.patientNum}</td>
+              <td title={item.inspectTime} className={`${style.egt} ellipsOver`}>{item.inspectTime}</td>
+              <td title={item.reportTime} className={`${style.egt} ellipsOver`}>{item.reportTime}</td>
+            </tr>
+          })
+        }
+      </table>
+    </div>
+  </div>
+}
+
+export default WrapModalTable;

+ 66 - 0
src/components/WrapModalBodyPac/WrapModalTableSon/index.jsx

@@ -0,0 +1,66 @@
+import React from "react";
+import style from "../index.less";
+import check_circle from '../img/check-circle.png';
+import check_right from '../img/check-right.png';
+
+class WrapModalTableSon extends React.Component {
+  constructor(props) {
+    super(props)
+    this.getImgPath = this.getImgPath.bind(this)
+  }
+  getImgPath(name,checkItem,item){
+    const { checkedList,selectOneCheck } = this.props;
+    let num = 0;
+    for(let k = 0;k < checkedList.length;k++){
+      let tmpLis = checkedList[k];
+      if(tmpLis == name){
+        return <img className={style.check} onClick={()=>selectOneCheck(name,checkItem,item)} src={check_right} alt="" />
+      }else{
+        ++num
+      }
+    }
+    if(num == checkedList.length){
+      return <img className={style.check} onClick={()=>selectOneCheck(name,checkItem,item)} src={check_circle} alt="" />
+    }
+  }
+  render() {
+    const { hospitalSonInspect,allCheckImport,allCheck } = this.props;
+    return <div className={style['modalTable']}>
+      <div className={style.sonTitle}>
+        <span>组名称 : {hospitalSonInspect.checkItem}</span>
+      </div>
+      <div className={`${style.SonTable}`}>
+        <table>
+          <tr className={style.head}>
+            <td className={`${style.fst} ellipsOver`} onClick={allCheckImport}><img className={style.check} src={allCheck?check_right:check_circle} alt="" />全选</td>
+            <td className={`${style.sec} ellipsOver`}>检查项目</td>
+            <td className={`${style.trd} ellipsOver`}>影像所见</td>
+            <td className={`${style.four} ellipsOver`}>影像诊断</td>
+            <td className={`${style.sev} ellipsOver`} style={{display:(hospitalSonInspect && hospitalSonInspect.pacsResultDTO && hospitalSonInspect.pacsResultDTO.length)>5?'':'none'}}></td>
+          </tr>
+        </table>
+      </div>
+      <div className={`${style.parentTables} ${style.SonTable}`}>
+        <table>
+          {/* {type-0正常1异常2上升3下降} */}
+          {
+            hospitalSonInspect && hospitalSonInspect.pacsResultDTO && hospitalSonInspect.pacsResultDTO.map((item, idx) => {
+              return <tr>
+                <td className={`${style.fst} ellipsOver`}>
+                  {
+                    this.getImgPath(item.checkItem,hospitalSonInspect.checkItem,item)
+                  }
+                </td>
+                <td title={item.checkItem} className={`${style.sec} ellipsOver`}>{item.checkItem}</td>
+                <td title={item.imagingDiagnose} className={`${style.trd} ellipsOver`}>{item.imagingDiagnose}</td>
+                <td title={item.imagingResults} className={`${style.four} ellipsOver`}>{item.imagingResults}</td>
+              </tr>
+            })
+          }
+        </table>
+      </div>
+    </div>
+  }
+}
+
+export default WrapModalTableSon;

+ 12 - 0
src/components/WrapModalBodyPac/WrapModalTitle/index.jsx

@@ -0,0 +1,12 @@
+import React from "react";
+import style from "../index.less";
+import Item from "../Item";
+
+const WrapModalTitle = (props) => {
+  const { handleSearch,message } = props
+  return <div className={style['modalTop']}>
+    <Item handleSearch={handleSearch} message={message}></Item>
+  </div>
+}
+
+export default WrapModalTitle;

BIN
src/components/WrapModalBodyPac/img/check-circle.png


BIN
src/components/WrapModalBodyPac/img/check-right.png


+ 37 - 0
src/components/WrapModalBodyPac/index.jsx

@@ -0,0 +1,37 @@
+import React from "react";
+import style from "./index.less";
+import WrapModalTitle from "./WrapModalTitle";
+import WrapModalTable from "./WrapModalTable";
+import WrapModalTableSon from "./WrapModalTableSon";
+import WrapModalRight from "./WrapModalRight";
+
+const WrapModalBody =(props)=>{
+  const { handleSearch,msgObj, hospitalPac,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
+        hospitalPac={hospitalPac}
+        msgObj={msgObj}
+        handleGetSonList={handleGetSonList}
+      ></WrapModalTable>
+      {
+        hospitalSonInspect && hospitalSonInspect.pacsResultDTO?
+        <WrapModalTableSon
+          allCheckImport={allCheckImport}
+          allCheck={allCheck}
+          hospitalSonInspect={hospitalSonInspect}
+          selectGroupList={selectGroupList}
+          checkedList={checkedList}
+          selectOneCheck={selectOneCheck}
+          selectWaring={selectWaring}
+        ></WrapModalTableSon>:null
+      }
+    </div>
+    <div className={`${style.right}`}>
+      <WrapModalRight showInIcss={showInIcss} height={height} selectGroupList={selectGroupList}></WrapModalRight>
+    </div>
+  </div>
+}
+
+export default WrapModalBody;

+ 275 - 0
src/components/WrapModalBodyPac/index.less

@@ -0,0 +1,275 @@
+@import "~@less/mixin.less";
+
+.container {
+  height: 100%;
+  // background-color: @ipt-wrap-color;
+  position: relative;
+  .left {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 762px;
+    height: 100%;
+    border-right: 1px solid #D8D8D8;
+  }
+  .right {
+    position: absolute;
+    right: 0;
+    top: 0;
+    width: 238px;
+    height: 100%;
+  }
+  .modalTop {
+    height: 46px;
+    line-height: 46px;
+    background-color: @ipt-bg-color;
+    padding: 0 20px;
+  }
+  .items {
+    .search {
+      font-size: 12px;
+      float: right;
+      height: 26px;
+      line-height: 24px;
+      border: 1px solid #9C9C9C;
+      border-radius: 4px;
+      padding: 0 11px;
+      margin-top: 10px;
+      cursor: pointer;
+    }
+    .search:hover {
+      background-color: @blue;
+      border: 1px solid @blue;
+      color: #fff;
+    }
+    .pubLi {
+      float: left;
+      margin-right: 5px;
+      position: relative;
+      span {
+        font-size: 12px;
+      }
+      input {
+        font-size: 12px;
+        height: 26px;
+        line-height: 26px;
+        padding: 0 3px;
+        box-sizing: border-box;
+        cursor: pointer;
+      }
+    }
+    .code{
+      input {
+        width: 74px;
+      }
+    }
+    .name {
+      input {
+        width: 42px;
+      }
+    }
+    .sex {
+      input {
+        width: 28px;
+      }
+    }
+    .age {
+      input {
+        width: 28px;
+      }
+    }
+    .time {
+      .timeIpts{
+        height: 26px;
+        line-height: 26px;
+        display: inline-block;
+        background-color: #fff;
+      }
+      input.ipt {
+        width: 126px;
+        text-align: center;
+      }
+    }
+  }    
+  .modalRightT{
+    height: 46px;
+    line-height: 46px;
+    background-color: #F0F0F0;
+    padding: 0 20px;
+    position: absolute;
+    width: 100%;
+    span.tip {
+      font-size: 12px;
+      float: left;
+    }
+    span.btnS {
+      font-size: 12px;
+      float: right;
+      width: 64px;
+      height: 26px;
+      line-height: 26px;
+      margin-top: 10px;
+      color: #fff;
+      text-align: center;
+      border-radius: 4px;
+      background-color: @blue;
+      cursor: pointer;
+    }
+  }
+  .modalRightB{
+    padding: 20px;
+    margin-bottom: 20px;
+    overflow: auto;
+    position: absolute;
+    top: 46px;
+    height: 100%;
+    width: 100%;
+    .title {
+      font-size: 14px;
+      padding-bottom: 6px;
+    }
+    .partLis {
+      width: 100%;
+      padding: 10px;
+      margin-bottom: 20px;
+      background-color: #E9F5FA;
+      li {
+        padding: 5px 0;
+      }
+      p {
+        line-height: 22px;
+      }
+      .itemName {
+        line-height: 22px;
+      }
+    }
+  }
+  .modalTable {
+    .tablePubP {
+      td.fst {
+        width: 70px;
+        max-width: 70px;
+      }
+      td.sec {
+        width: 100px;
+        max-width: 100px;
+      }
+      td.trd {
+        width: 112px;
+        max-width: 112px;
+        cursor: pointer;
+      }
+      td.four {
+        width: 80px;
+        max-width: 80px;
+      }
+      td.fif {
+        width: 48px;
+        max-width: 48px;
+      }
+      td.six {
+        width: 70px;
+        max-width: 70px;
+      }
+      td.sev {
+        width: 80px;
+        max-width: 80px;
+      }
+      td.egt {
+        width: 100px;
+        max-width: 100px;
+      }
+      td.nig {
+        width: 17px;
+        max-width: 17px;
+      }
+    }
+    .parentTable {
+      height: 326px;
+      overflow-y: auto;
+      overflow-x: hidden;
+      tr {
+        cursor: pointer;
+      }
+    }
+    .parentTables {
+      height: 86px;
+      overflow-y: auto;
+      overflow-x: hidden;
+    }
+    
+    .SonTable {
+      .check {
+        width: 20px;
+        height: 20px;
+        position: relative;
+        top: 5px;
+      }
+      td.fst {
+        width: 72px;
+        max-width: 72px;
+        cursor: pointer;
+      }
+      td.sec {
+        width: 100px;
+        max-width: 100px;
+      }
+      td.trd {
+        // width: 215px;
+        // max-width: 215px;
+        cursor: default;
+      }
+      td.four {
+        width: 100px;
+        max-width: 100px;
+      }
+      td.sev {
+        width: 17px;
+        max-width: 17px;
+      }
+    }
+    .sonTitle {
+      height: 46px;
+      line-height: 46px;
+      background-color: #F0F0F0;
+      padding: 0 20px;
+      .btn {
+        font-size: 12px;
+        float: right;
+        height: 26px;
+        line-height: 24px;
+        border: 1px solid #9C9C9C;
+        border-radius: 4px;
+        padding: 0 11px;
+        margin-top: 10px;
+        cursor: pointer;
+        &:hover {
+          background-color: @blue;
+          border: 1px solid @blue;
+          color: #fff;
+        }
+      }
+      
+    }
+    table {
+      tr {
+        height: 40px;
+        line-height: 40px;
+        text-align: center;
+        td {
+          border-collapse: collapse;
+          // overflow: hidden;
+          // text-overflow: ellipsis;
+          // white-space: nowrap;
+          border: 1px solid #E7EAEB;
+          padding: 0 5px;
+          box-sizing: border-box;
+          // line-height: 24px;
+        }
+      }
+      .head {
+        background-color: #EAF7FA;
+      }
+    }
+  }
+}

+ 30 - 4
src/containers/AssistCheck.js

@@ -3,12 +3,12 @@ import {
     connect
 } from 'react-redux';
 import AssistCheck from '@components/AssistCheck';
-import { assistLable,delAssistLabel,changeAssistVal,changeDate } from '@store/actions/assistCheck';
-import { getSearchList,getInstroduce } from '@store/async-actions/assistCheck';
+import { assistLable,delAssistLabel,changeAssistVal,changeDate,allCheckImports,selectOneChecks,showInIcsss } from '@store/actions/assistCheck';
+import { getSearchList,getInstroduce ,getImportLists,getSonDetailList} from '@store/async-actions/assistCheck';
 import {ISREAD} from '@store/types/homePage.js';
 import {billing, getConceptDetail} from '@store/async-actions/pushMessage';
 
-function mapStateToProps(state) {
+function mapStateToProps(state) {//console.log(state.assistCheck)
     return {
         list:state.assistCheck.list,
         assistLabel:state.assistCheck.assistLabel,
@@ -16,12 +16,38 @@ function mapStateToProps(state) {
         winWidth:state.homePage.windowWidth,
         assistList:state.homePage.assistList,
         assistVal:state.assistCheck.assistVal,
-        windowHeight:state.homePage.windowHeight
+        windowHeight:state.homePage.windowHeight,
+        hospitalMsg: state.patInfo.hospitalMsg,
+
+        message: state.patInfo.message,
+        hospitalMsg: state.patInfo.hospitalMsg,
+        hospitalPac: state.assistCheck.hospitalPac,
+        hospitalSonInspect: state.assistCheck.hospitalPacObj,
+        checkedList: state.assistCheck.checkedList,
+        selectGroupList: state.assistCheck.selectGroupList,
+        allCheck: state.assistCheck.allCheck,
+        msgObj: state.assistCheck.msgObj,
     }
 }
 
 function mapDispatchToProps(dispatch, store) {
     return {
+        showInIcss(){
+          dispatch(showInIcsss())
+        },
+        selectOneCheck(name,checkItem,item){
+          dispatch(selectOneChecks(name,checkItem,item))
+        },
+        allCheckImport() {
+          dispatch(allCheckImports())
+        },
+        handleSearchs(data) {
+          dispatch(getImportLists(data))
+        },
+        handleGetSonList(name,time) {
+          dispatch(getSonDetailList(name,time))
+        },
+
         getInfomation(item){
             dispatch(getConceptDetail(item))
         },

+ 33 - 5
src/containers/Inspect.js

@@ -5,7 +5,9 @@ import {
 import Inspect from '@components/Inspect';
 import {
   getSearchList,
-  getSublableList
+  getSublableList,
+  getImportList,
+  getSonDetailList
 } from '@store/async-actions/inspect';
 import {
   setLabel,
@@ -14,14 +16,18 @@ import {
   checkValueIsChange,
   delExcelLis,
   clearLabel,
-  delPartItem
+  delPartItem,
+  allCheckImport,
+  selectOneCheck,
+  selectWaring,
+  showInIcss
 } from '@store/actions/inspect';
 import {
   billing,
   getConceptDetail
 } from '@store/async-actions/pushMessage';
 
-function mapStateToProps(state) { //console.log(state)
+function mapStateToProps(state) {//console.log(state.inspect)
   return {
     list: state.inspect.list,
     labelList: state.inspect.labelList,
@@ -30,14 +36,36 @@ function mapStateToProps(state) { //console.log(state)
     labelListActive: state.inspect.labelListActive,
     inspectList: state.homePage.inspectList,
     windowHeight: state.homePage.windowHeight,
-    inspectVal: state.inspect.inspectVal
+    inspectVal: state.inspect.inspectVal,
+    message: state.patInfo.message,
+    hospitalMsg: state.patInfo.hospitalMsg,
+    hospitalInspect: state.inspect.hospitalInspect,
+    hospitalSonInspect: state.inspect.hospitalInspectObj,
+    allCheck: state.inspect.allCheck,
+    selectGroupList: state.inspect.selectGroupList,
+    checkedList: state.inspect.checkedList,
   }
 }
 
 function mapDispatchToProps(dispatch, store) {
   return {
+    showInIcss(){
+      dispatch(showInIcss())
+    },
+    selectWaring(){
+      dispatch(selectWaring())
+    },
+    selectOneCheck(name,groupName,item){
+      dispatch(selectOneCheck(name,groupName,item))
+    },
+    allCheckImport(data) {
+      dispatch(allCheckImport(data))
+    },
     handleSearch(data) {
-      console.log(data)
+      dispatch(getImportList(data))
+    },
+    handleGetSonList(name) {
+      dispatch(getSonDetailList(name))
     },
     handleChangeValue(val) {
       dispatch(getSearchList(val))

+ 22 - 1
src/store/actions/assistCheck.js

@@ -1,5 +1,26 @@
-import {GET_ASSIST_SEARCH_LIST,GET_ASSIST_LABEL,DEL_ASSIST_LABEL,CHANGE_ASSIST_VAL,CHANGE_DATE,CLEAR_ASSIST_DATA,ADD_ASSIST_LABEL} from '../types/assistCheck';
+import {SET_ALLCHECKS,SHOW_IN_ICSSS,SELECT_ONE_CHECKS,GET_ASSIST_SEARCH_LIST,SEARCH_HOSPITAL_PAC_SON,SEARCH_HOSPITAL_PAC,GET_ASSIST_LABEL,DEL_ASSIST_LABEL,CHANGE_ASSIST_VAL,CHANGE_DATE,CLEAR_ASSIST_DATA,ADD_ASSIST_LABEL} from '../types/assistCheck';
 
+export const showInIcsss = () => ({         //确认选择显示到页面
+  type:SHOW_IN_ICSSS
+})
+export const selectOneChecks = (name,checkItem,item) => ({         //选一个
+  type:SELECT_ONE_CHECKS,
+  name,
+  checkItem,
+  item
+})
+export const allCheckImports = () => ({         //全选反选
+  type:SET_ALLCHECKS
+})
+export const getHospitalPacDetailList = (list,name) => ({         //检索医院辅检项
+  type:SEARCH_HOSPITAL_PAC_SON,
+  list,
+  name
+})
+export const getHospitalPacList = (list,msg) => ({         //检索医院辅检项
+  type:SEARCH_HOSPITAL_PAC,
+  list,msg
+})
 export const searchList = (list,val) => ({         //获取搜索数据
     type:GET_ASSIST_SEARCH_LIST,
     list,

+ 25 - 1
src/store/actions/inspect.js

@@ -1,10 +1,34 @@
-import {ADD_LABEL,SEARCH_LIST,SET_LABEL,FILL_ACTIVE,FILL_ACTIVE_DETAIL,GET_EXCEL,CHECK_VALUE_IS_CHANGE,CLEAR_LABEL,RESET_LABEL,CLEAR_ALL_LABEL,DEL_PART_ITEM,DEL_EXCEL_LIST} from '../types/inspect';
+import {ADD_LABEL,SHOW_IN_ICSS,SET_ALLCHECK,SELECT_ONE_CHECK,SELECT_WARING,SEARCH_HOSPITAL_INSPECT_SON,SEARCH_HOSPITAL_INSPECT,SEARCH_LIST,SET_LABEL,FILL_ACTIVE,FILL_ACTIVE_DETAIL,GET_EXCEL,CHECK_VALUE_IS_CHANGE,CLEAR_LABEL,RESET_LABEL,CLEAR_ALL_LABEL,DEL_PART_ITEM,DEL_EXCEL_LIST} from '../types/inspect';
 
+export const showInIcss = () => ({         //确认选择显示到页面
+    type:SHOW_IN_ICSS
+})
+export const selectWaring = () => ({         //选择异常值
+    type:SELECT_WARING
+})
+export const selectOneCheck = (name,groupName,item) => ({         //选一个
+    type:SELECT_ONE_CHECK,
+    name,
+    groupName,
+    item
+})
+export const allCheckImport = () => ({         //全选反选
+    type:SET_ALLCHECK
+})
 export const searchList = (list,val) => ({         //初始化数据
     type:SEARCH_LIST,
     list,
     val
 })
+export const getHospitalInspectList = (list) => ({         //检索医院化验项
+    type:SEARCH_HOSPITAL_INSPECT,
+    list
+})
+export const getHospitalInspectDetailList = (list,name) => ({         //检索医院化验项
+    type:SEARCH_HOSPITAL_INSPECT_SON,
+    list,
+    name
+})
 
 export const setLabel = (idx,sign) => ({          //搜索后点击选中的结果
     type:SET_LABEL,

+ 5 - 0
src/store/actions/patInfo.js

@@ -30,4 +30,9 @@ export const updatePatientMessage=(state,action)=>{
         res.message = {};
     }*/
     return res;
+};
+export const updateHospitalMessage=(state,action)=>{
+    const res=Object.assign({},state);
+    res.hospitalMsg = action.data || {};
+    return res;
 };

+ 32 - 1
src/store/async-actions/assistCheck.js

@@ -1,6 +1,6 @@
 import axios from '@utils/ajax';
 import store from '@store';
-import { searchList } from '../actions/assistCheck';
+import { searchList,getHospitalPacList,getHospitalPacDetailList } from '../actions/assistCheck';
 import { SET_TIPS } from '../types/pushMessage';
 import { Notify} from '@commonComp';
 
@@ -24,3 +24,34 @@ export const getSearchList = (val) => {
         })
     }
 };
+export const getImportLists = (data) => {
+  const state = store.getState();
+  const patientInfo = state.patInfo.message;
+    let param = {
+      "endTime": data.endTime,
+      "startTime": data.startTime,
+      "hospitalCode": patientInfo.hospitalCode,
+      "inquiryCode": patientInfo.recordId,
+      "patientId": patientInfo.patientId,
+    }
+    return (dispatch) => {
+        axios.json('/dockingImport/pacsDockingImport',param)
+        .then((res)=>{
+            const data = res.data.data;
+            let tmpObj = {}
+            tmpObj.name = data.name
+            tmpObj.patientNum = data.patientNum
+            dispatch(getHospitalPacList(data.pacsRetrieveData,tmpObj))
+        })
+    }
+};
+export const getSonDetailList = (name,time) => {
+  return (dispatch) => {
+      axios.json('/dockingImport/getByCheckItemPacsData',{checkItem:name})
+      .then((res)=>{
+          const data = res.data.data;
+          data.Rtime = time
+          dispatch(getHospitalPacDetailList(data,name))
+      })
+  }
+};

+ 2 - 8
src/store/async-actions/fetchModules.js

@@ -397,7 +397,7 @@ export function getFilterHis(obj){
       if(obj.flag==-1){
         newParam = Object.assign(params,{current:1})
       }else{
-        newParam = Object.assign({},params,{isHasSecond:flag})
+        newParam = Object.assign({},params,{isHasSecond:obj.flag})
       }
     }
 
@@ -422,7 +422,7 @@ export function downloadData (ids){
   }
   return expJson(api.downloadURL,param);
 }
-
+// 添加二次诊断
 export function addSecondDiag(item){
   const state = store.getState();
   const {message} = state.patInfo;
@@ -432,11 +432,5 @@ export function addSecondDiag(item){
     "inquiryId": item.id
   }
   return json(api.addSecondDia,param)
-  /*.then((res)=>{
-    const result = res.data;
-    if(result.code==0){
-      Notify.info("添加成功");
-    }
-  })*/
 }
 

+ 28 - 1
src/store/async-actions/inspect.js

@@ -1,7 +1,7 @@
 import axios from '@utils/ajax';
 import store from '@store';
 
-import { searchList,resetLabel } from '../actions/inspect';
+import { searchList,resetLabel,getHospitalInspectList,getHospitalInspectDetailList } from '../actions/inspect';
 import { SET_TIPS } from '../types/pushMessage';
 import { Notify} from '@commonComp';
 
@@ -50,3 +50,30 @@ export const getSublableList = (id,idx) => {
         })
     }
 };
+export const getImportList = (data) => {
+  const state = store.getState();
+  const patientInfo = state.patInfo.message;
+    let param = {
+      "endTime": data.endTime,
+      "startTime": data.startTime,
+      "hospitalCode": patientInfo.hospitalCode,
+      "inquiryCode": patientInfo.recordId,
+      "patientId": patientInfo.patientId,
+    }
+    return (dispatch) => {
+        axios.json('/dockingImport/lisDockingImports',param)
+        .then((res)=>{
+            const data = res.data.data;
+            dispatch(getHospitalInspectList(data.lisRetrieveData))
+        })
+    }
+};
+export const getSonDetailList = (name) => {
+    return (dispatch) => {
+        axios.json('/dockingImport/getByGroupNameLisData',{groupName:name})
+        .then((res)=>{
+            const data = res.data.data;
+            dispatch(getHospitalInspectDetailList(data,name))
+        })
+    }
+};

+ 23 - 2
src/store/async-actions/patInfo.js

@@ -1,5 +1,5 @@
 import {get, post, json} from "../../utils/ajax";
-import {GET_PATIENT_MESSAGE} from "../types/patInfo";
+import {GET_PATIENT_MESSAGE,GET_HOSPITAL_MESSAGE} from "../types/patInfo";
 import {CONFIRM_TYPE} from "../types/typeConfig";
 import {getInfos} from '@store/actions/getInfoByUuid';
 import {getUrlArgObject,pushAllDataList} from '@utils/tools';
@@ -10,9 +10,29 @@ import { initItemList } from '@store/async-actions/tabTemplate';
 
 const api = {
     getPatInfo: '/patientInfo/getTopPatientInfo',
-    getPatBaseInfo: '/patientInfo/getPatientInfo'
+    getPatBaseInfo: '/patientInfo/getPatientInfo',
+    getHospitalInfo:'/hospitalInfo/getHospitalInfo'
 };
 
+//获取医院id
+export const initHospitalInfo = (dispatch, getState) => {
+    let baseList = getState();
+    let state = baseList.patInfo.message;
+    json(api.getHospitalInfo, {
+        "code": getUrlArgObject('hospitalId'),
+        "id":state.hospitalId
+    }).then((res) => {
+        const data = res.data;
+        if (data.code == 0) {
+            dispatch({
+              type: GET_HOSPITAL_MESSAGE,
+              data:data.data[0]
+            });
+        } else {
+            console.log(res)
+        }
+    })
+}
 //参数转换
 export const initPersonInfo = (dispatch, getState) => {
     json('/tranFieldInfo/getInfoByUuid', {
@@ -104,6 +124,7 @@ export async function getPatientMessage(dispatch, getState){
   dispatch(getCommonList(5));     //获取常用化验标签列表
   dispatch(getCommonList(6));     //获取常用辅检标签列表if(allModules.length == 0){//模板为空才回读
   dispatch(initHistoryDetails());      //历史病历回读
+  initHospitalInfo(dispatch, getState)
 }
 
 /*

+ 294 - 120
src/store/reducers/assistCheck.js

@@ -1,137 +1,311 @@
 import {
-    GET_ASSIST_SEARCH_LIST,
-    GET_ASSIST_LABEL,
-    DEL_ASSIST_LABEL,
-    CHANGE_ASSIST_VAL,
-    CHANGE_DATE,
-    CLEAR_ASSIST_DATA,
-    ADD_ASSIST_LABEL
+  GET_ASSIST_SEARCH_LIST,
+  GET_ASSIST_LABEL,
+  DEL_ASSIST_LABEL,
+  CHANGE_ASSIST_VAL,
+  CHANGE_DATE,
+  CLEAR_ASSIST_DATA,
+  ADD_ASSIST_LABEL,
+  SEARCH_HOSPITAL_PAC,
+  SEARCH_HOSPITAL_PAC_SON,
+  SET_ALLCHECKS,
+  SELECT_ONE_CHECKS,
+  SHOW_IN_ICSSS
 } from '../types/assistCheck';
 import store from '@store';
 const initSearchList = {
-    list: [], //点击的结果
-    assistLabel: [], //搜索的结果
-    dataString:'',      //结果拼接
-    assistVal:''
+  list: [], //点击的结果
+  assistLabel: [], //搜索的结果
+  dataString: '', //结果拼接
+  assistVal: '',
+
+  hospitalPac: [], //医院检索到的
+  hospitalPacObj: {}, //组对应的明细(单选多选全选)
+  selectGroupList: [], //选的组的明细可能有多个组
+  allCheck: false, //全选反选
+  checkedList: [], //选中的小项
+  msgObj:{
+    name:'',
+    patientNum:''
+  }
 }
+
 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;
+  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 == ADD_ASSIST_LABEL) {
-        const newState = Object.assign({}, state);
-        let tempArr = newState.assistLabel,tmpString='';
-        for(let i = 0;i <action.lis.length;i++){
-          tempArr.push(action.lis[i]);
-        }
-        
-        for (let i = 0; i < tempArr.length; i++) {
-          if (i == action.idx) {
-            tempArr[i].time = action.date
-            newState.assistLabel = [...tempArr]
-          }
-          let tmpVal = tempArr[i].value?tempArr[i].value.trim():tempArr[i].value;
-          tmpString += (tempArr[i].name+(tmpVal?(':'+tmpVal)+', ':': ')+(tempArr[i].time?'报告日期:'+tempArr[i].time:'')+';')
-        }
-        newState.assistLabel=[...tempArr]
-        newState.dataString = tmpString
-        return newState;
-    }
-    if (action.type == GET_ASSIST_SEARCH_LIST) {    //右侧推送添加到左侧
-        const newState = Object.assign({}, state);
-        newState.list = action.list
-        newState.assistVal = action.val
-        return newState;
-    }
-    if (action.type == GET_ASSIST_LABEL) {             //默认
-        const newState = Object.assign({}, state);
-        const tempArrs = newState.assistLabel;
-        let tempArr = [];
-        let tmpString = '';
-        let tmpCommonLis = store.getState().homePage.assistList;
-        if(action.sign == 'common'){
-          let tmpAssistList = JSON.parse(JSON.stringify(tmpCommonLis))
-          tempArr = tmpAssistList;
-        }else{
-          tempArr = newState.list
+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 ='';
+    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.name = tmpGroup[i].pacsResultDTO[k].checkItem
+        tmpObj.value = tmpGroup[i].pacsResultDTO[k].imagingResults
+        tmpObj.imagingDiagnose = tmpGroup[i].pacsResultDTO[k].imagingDiagnose
+        tempArrs.push(tmpObj)
+      }
+    }
+    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 : '') + ';')
+    }
+    newState.assistLabel = [...tempArrs]
+    newState.dataString = tmpString
+
+    newState.hospitalPac = [] //医院检索到的
+    newState.hospitalPacObj = {} //组对应的明细(单选多选全选)
+    newState.selectGroupList = [] //选的组的明细可能有多个组
+    newState.allCheck = false //全选反选
+    newState.checkedList = [] //选中的小项
+    newState.msgObj={name:'',patientNum:''}
+
+    return newState;
+  }
+  if (action.type == SELECT_ONE_CHECKS) {
+    const newState = Object.assign({}, state);
+    let listWrap = JSON.parse(JSON.stringify(newState.hospitalPacObj))
+    let tmpGroup = JSON.parse(JSON.stringify(newState.selectGroupList))
+    let tmpLen = listWrap.pacsResultDTO.length;
+    let tmpCheckedLis = JSON.parse(JSON.stringify(newState.checkedList))
+    let numS = 0;
+    if (tmpCheckedLis.indexOf(action.name) == -1) { //添加选中
+      let tempArr = newState.checkedList;
+      tempArr.push(action.name);
+      newState.checkedList = [...tempArr]
+
+      for (let m = 0; m < tmpGroup.length; m++) {
+        if (tmpGroup[m].checkItem == action.checkItem) { //右侧有选中相同组的明细
+          tmpGroup[m].pacsResultDTO.push(action.item)
+        } else {
+          ++numS
         }
-        for (let i = 0; i < tempArr.length; i++) {
-            if (tempArr[i].questionId == action.id && i == action.idx) {
-                tempArr[i].time = getCurrentDate();
-                tempArrs.push(tempArr[i]);
-                newState.assistLabel = [...tempArrs];
+      }
+      if (numS == tmpGroup.length) { //直接添加到右侧
+        listWrap.pacsResultDTO = []
+        listWrap.pacsResultDTO.push(action.item)
+        tmpGroup.push(listWrap)
+      }
+
+      newState.selectGroupList = [...tmpGroup] //右侧已选中的项目
+      if (tempArr.length == tmpLen) {
+        newState.allCheck = true;
+      } else {
+        newState.allCheck = false;
+      }
+    } else { //去除选中
+      let tempArr = newState.checkedList;
+      tempArr.splice(tempArr.findIndex(item => item === action.name), 1)
+      newState.checkedList = [...tempArr]
+      for (let i = 0; i < tmpGroup.length; i++) {
+        if (tmpGroup[i].checkItem == action.checkItem) { //右侧肯定有相同组的
+          let tmpArr = []
+          for (let k = 0; k < tmpGroup[i].pacsResultDTO.length; k++) {
+            if (action.name != tmpGroup[i].pacsResultDTO[k].checkItem) {
+              tmpArr.push(tmpGroup[i].pacsResultDTO[k])
             }
-        }
-        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:'')+';')
-        }
-        newState.dataString = tmpString
-        return newState;
-    }
-    if (action.type == DEL_ASSIST_LABEL) {        //删除
-        const newState = Object.assign({}, state);
-        let tempArr = newState.assistLabel,tempArrs=[];
-        let tmpString = '';
-        // tempArr.splice(action.idx, 1)
-        // let tempArrs = tempArr.slice()
-        for(let k = 0;k < tempArr.length;k++){
-          if(k != action.idx){
-            tempArrs.push(tempArr[k])
+          }
+          if(tmpArr.length == 0){
+            tmpGroup.splice(i,1)
+          }else{
+            tmpGroup[i].pacsResultDTO = [...tmpArr]
           }
         }
-        if(tempArrs == []){
-          tmpString == ''
-          return
-        }
-        for (let i = 0; i < tempArrs.length; i++) {
-          let tmpVal = tempArrs[i].value?tempArrs[i].value.trim():tempArrs[i].value;
-          tmpString += (tempArrs[i].name+(tmpVal?(':'+tmpVal)+', ':': ')+(tempArrs[i].time?'报告日期:'+tempArrs[i].time:'')+';')
+      }
+      newState.selectGroupList = tmpGroup //右侧已选中的项目
+      if (tempArr.length == listWrap.pacsResultDTO.length) {
+
+        newState.allCheck = true;
+      } else {
+        newState.allCheck = false;
+      }
+    }
+    return newState;
+  }
+  if (action.type == SET_ALLCHECKS) {
+    const newState = Object.assign({}, state);
+    let flg = newState.allCheck
+    let listWrap = newState.hospitalPacObj
+    let tmpGroup = newState.selectGroupList
+    let tmpCheckedLis = []
+    newState.allCheck = !flg
+    if (!flg) { //全选
+      let numFst = 0
+      for (let i = 0; i < tmpGroup.length; i++) {
+        if (listWrap.checkItem == tmpGroup[i].checkItem) {
+          ++numFst
+          tmpGroup[i].pacsResultDTO = listWrap.pacsResultDTO
         }
-        newState.assistLabel = [...tempArrs]
-        newState.dataString = tmpString
-        return newState;
-    }
-    if (action.type == CHANGE_ASSIST_VAL) {           //改变输入值
-        const newState = Object.assign({}, state);
-        const tempArr = newState.assistLabel;
-        let tmpString = '';
-        for (let i = 0; i < tempArr.length; i++) {
-            if (i == action.idx) {
-                tempArr[i].value = action.val
-                newState.assistLabel = [...tempArr]
-            }
-            let tmpVal = tempArr[i].value?tempArr[i].value.trim():tempArr[i].value;
-            tmpString += (tempArr[i].name+(tmpVal?(':'+tmpVal)+', ':': ')+(tempArr[i].time?'报告日期:'+tempArr[i].time:'')+';')
+      }
+      for (let m = 0; m < listWrap.pacsResultDTO.length; m++) {
+        tmpCheckedLis.push(listWrap.pacsResultDTO[m].checkItem)
+      }
+      if (numFst == 0) {
+        tmpGroup.push(listWrap)
+      }
+      newState.checkedList = [...tmpCheckedLis]
+      newState.selectGroupList = [...tmpGroup]
+    } else { //反选
+      for (let j = 0; j < tmpGroup.length; j++) {
+        if (listWrap.checkItem == tmpGroup[j].checkItem) {
+          tmpGroup.splice(j, 1)
         }
-        newState.dataString = tmpString
-        return newState;
-    }
-    if (action.type == CHANGE_DATE) {             //新增
-        const newState = Object.assign({}, state);
-        const tempArr = newState.assistLabel;
-        let tmpString = '';
-        for (let i = 0; i < tempArr.length; i++) {
-            if (i == action.idx) {
-                tempArr[i].time = action.date
-                newState.assistLabel = [...tempArr]
-            }
-            let tmpVal = tempArr[i].value?tempArr[i].value.trim():tempArr[i].value;
-            tmpString += (tempArr[i].name+(tmpVal?(':'+tmpVal)+', ':': ')+(tempArr[i].time?'报告日期:'+tempArr[i].time:'')+';')
+      }
+      newState.checkedList = []
+      newState.selectGroupList = [...tmpGroup]
+    }
+    return newState;
+  }
+  if (action.type == SEARCH_HOSPITAL_PAC_SON) {
+    const newState = Object.assign({}, state);
+    let tmpArr = action.list
+    let tmpSelect = newState.selectGroupList
+    let tmpSelectSon = []
+    for (let i = 0; i < tmpSelect.length; i++) {
+      if (tmpSelect[i].checkItem == action.name) {
+        for (let k = 0; k < tmpSelect[i].pacsResultDTO.length; k++) {
+          tmpSelectSon.push(tmpSelect[i].pacsResultDTO[k].checkItem)
         }
-        newState.dataString = tmpString
-        return newState;
+      }
+    }
+    newState.checkedList = [...tmpSelectSon]
+    if (tmpSelectSon.length == tmpArr.pacsResultDTO.length) {
+      newState.allCheck = true;
+    } else {
+      newState.allCheck = false;
+    }
+    newState.hospitalPacObj = tmpArr
+    return newState;
+  }
+  if (action.type == SEARCH_HOSPITAL_PAC) {
+    const newState = Object.assign({}, state);
+    newState.hospitalPac = action.list
+    newState.msgObj = action.msg
+    newState.allCheck = false
+    newState.hospitalPacObj = {}
+    return newState;
+  }
+
+
+  if (action.type == ADD_ASSIST_LABEL) {
+    const newState = Object.assign({}, state);
+    let tempArr = newState.assistLabel,
+      tmpString = '';
+    for (let i = 0; i < action.lis.length; i++) {
+      tempArr.push(action.lis[i]);
+    }
+
+    for (let i = 0; i < tempArr.length; i++) {
+      if (i == action.idx) {
+        tempArr[i].time = action.date
+        newState.assistLabel = [...tempArr]
+      }
+      let tmpVal = tempArr[i].value ? tempArr[i].value.trim() : tempArr[i].value;
+      tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + ';')
+    }
+    newState.assistLabel = [...tempArr]
+    newState.dataString = tmpString
+    return newState;
+  }
+  if (action.type == GET_ASSIST_SEARCH_LIST) { //右侧推送添加到左侧
+    const newState = Object.assign({}, state);
+    newState.list = action.list
+    newState.assistVal = action.val
+    return newState;
+  }
+  if (action.type == GET_ASSIST_LABEL) { //默认
+    const newState = Object.assign({}, state);
+    const tempArrs = newState.assistLabel;
+    let tempArr = [];
+    let tmpString = '';
+    let tmpCommonLis = store.getState().homePage.assistList;
+    if (action.sign == 'common') {
+      let tmpAssistList = JSON.parse(JSON.stringify(tmpCommonLis))
+      tempArr = tmpAssistList;
+    } else {
+      tempArr = newState.list
+    }
+    for (let i = 0; i < tempArr.length; i++) {
+      if (tempArr[i].questionId == action.id && i == action.idx) {
+        tempArr[i].time = getCurrentDate();
+        tempArrs.push(tempArr[i]);
+        newState.assistLabel = [...tempArrs];
+      }
+    }
+    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 : '') + ';')
+    }
+    newState.dataString = tmpString
+    return newState;
+  }
+  if (action.type == DEL_ASSIST_LABEL) { //删除
+    const newState = Object.assign({}, state);
+    let tempArr = newState.assistLabel,
+      tempArrs = [];
+    let tmpString = '';
+    // tempArr.splice(action.idx, 1)
+    // let tempArrs = tempArr.slice()
+    for (let k = 0; k < tempArr.length; k++) {
+      if (k != action.idx) {
+        tempArrs.push(tempArr[k])
+      }
+    }
+    if (tempArrs == []) {
+      tmpString == ''
+      return
+    }
+    for (let i = 0; i < tempArrs.length; i++) {
+      let tmpVal = tempArrs[i].value ? tempArrs[i].value.trim() : tempArrs[i].value;
+      tmpString += (tempArrs[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArrs[i].time ? '报告日期:' + tempArrs[i].time : '') + ';')
+    }
+    newState.assistLabel = [...tempArrs]
+    newState.dataString = tmpString
+    return newState;
+  }
+  if (action.type == CHANGE_ASSIST_VAL) { //改变输入值
+    const newState = Object.assign({}, state);
+    const tempArr = newState.assistLabel;
+    let tmpString = '';
+    for (let i = 0; i < tempArr.length; i++) {
+      if (i == action.idx) {
+        tempArr[i].value = action.val
+        newState.assistLabel = [...tempArr]
+      }
+      let tmpVal = tempArr[i].value ? tempArr[i].value.trim() : tempArr[i].value;
+      tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + ';')
     }
-    if (action.type == CLEAR_ASSIST_DATA) {
-        const newState = Object.assign({}, state);
-        newState.assistLabel = [...action.data];
-        newState.dataString = action.saveText;
-        return newState;
+    newState.dataString = tmpString
+    return newState;
+  }
+  if (action.type == CHANGE_DATE) { //新增
+    const newState = Object.assign({}, state);
+    const tempArr = newState.assistLabel;
+    let tmpString = '';
+    for (let i = 0; i < tempArr.length; i++) {
+      if (i == action.idx) {
+        tempArr[i].time = action.date
+        newState.assistLabel = [...tempArr]
+      }
+      let tmpVal = tempArr[i].value ? tempArr[i].value.trim() : tempArr[i].value;
+      tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + ';')
     }
-    return state;
+    newState.dataString = tmpString
+    return newState;
+  }
+  if (action.type == CLEAR_ASSIST_DATA) {
+    const newState = Object.assign({}, state);
+    newState.assistLabel = [...action.data];
+    newState.dataString = action.saveText;
+    return newState;
+  }
+  return state;
 }

+ 211 - 23
src/store/reducers/inspect.js

@@ -9,7 +9,13 @@ import {
     CLEAR_ALL_LABEL,
     DEL_PART_ITEM,
     DEL_EXCEL_LIST,
-    ADD_LABEL
+    ADD_LABEL,
+    SEARCH_HOSPITAL_INSPECT,
+    SEARCH_HOSPITAL_INSPECT_SON,
+    SET_ALLCHECK,
+    SELECT_ONE_CHECK,
+    SELECT_WARING,
+    SHOW_IN_ICSS
 } from '../types/inspect';
 import store from '@store';
 import {dateParser} from '@utils/tools.js';
@@ -26,10 +32,207 @@ const initSearchList = {
     getExcelDataList: [], //导入的数据
     pushItem:[],    //推送的数据
     pushItems:[],    //右侧模板预览的数据
-    inspectVal:''
+    inspectVal:'',
+
+    hospitalInspect:[],//医院检索到的
+    hospitalInspectObj:{},//组对应的明细(单选多选全选)
+    selectGroupList:[],//选的组的明细可能有多个组
+    allCheck:false,//全选反选
+    checkedList:[],//选中的小项
 }
 
 export default (state = initSearchList, action) => {
+    if (action.type == SHOW_IN_ICSS) {
+        const newState = Object.assign({}, state);
+        let tmpGroup = JSON.parse(JSON.stringify(newState.selectGroupList))
+        let tmpArr = newState.getExcelDataList;
+        let tmpArr2 = newState.labelList;
+        let excelDataLis = {
+          lisExcelRes:[],
+          messages:[]
+        }
+
+        for(let i = 0;i < tmpGroup.length;i++){
+          let tmpObj = {//excelDataLis.lisExcelRes[0]
+            menus:'',
+            lisExcelItem:[]
+          }
+          tmpObj.menus = tmpGroup[i].groupName
+          tmpObj.lisExcelItem = tmpGroup[i].lisExcelWrapper
+          excelDataLis.lisExcelRes.push(tmpObj)
+        }
+        newState.getExcelData = excelDataLis
+        tmpArr.push(excelDataLis)
+        newState.getExcelDataList = [...tmpArr]
+        newState.pushItem = getPushList(tmpArr,tmpArr2);
+        newState.pushItems = getPushLists(tmpArr,tmpArr2);
+        newState.inspectStrPlus = getStringPlus(newState.pushItems)
+
+        newState.hospitalInspect = [] //医院检索到的
+        newState.hospitalInspectObj = {} //组对应的明细(单选多选全选)
+        newState.selectGroupList = [] //选的组的明细可能有多个组
+        newState.allCheck = false //全选反选
+        newState.checkedList = [] //选中的小项
+
+        return newState;
+    }
+    if (action.type == SELECT_WARING) {
+        const newState = Object.assign({}, state);
+        let listWrap = JSON.parse(JSON.stringify(newState.hospitalInspectObj))
+        let tmpGroup = JSON.parse(JSON.stringify(newState.selectGroupList))
+        let tmpCheckedLis = JSON.parse(JSON.stringify(newState.checkedList))
+        let warArr = [],checked = [],numS=0
+        for(let m =0;m < listWrap.lisExcelWrapper.length;m++){
+          for(let n = 0;n < tmpCheckedLis.length;n++){
+            if(listWrap.lisExcelWrapper[m].type == 0 && listWrap.lisExcelWrapper[m].itemName == tmpCheckedLis[n]){
+              warArr.push(listWrap.lisExcelWrapper[m])
+              checked.push(listWrap.lisExcelWrapper[m].itemName)
+            }
+          }
+          if(listWrap.lisExcelWrapper[m].type != 0){
+            warArr.push(listWrap.lisExcelWrapper[m])
+            checked.push(listWrap.lisExcelWrapper[m].itemName)
+          }
+        }
+        for(let i = 0;i < tmpGroup.length;i++){
+          if(tmpGroup[i].groupName == listWrap.groupName){//右侧有选中相同组的明细
+            tmpGroup[i].lisExcelWrapper = warArr
+          }else{//右侧没有选中相同组的明细
+            ++numS
+          }
+        }
+        if(numS == tmpGroup.length){//直接添加到右侧
+          listWrap.lisExcelWrapper = warArr
+          tmpGroup.push(listWrap)
+        }
+        if(checked.length == listWrap.lisExcelWrapper.length){
+          newState.allCheck = true;            
+        }else{
+          newState.allCheck = false;
+        }
+        newState.selectGroupList = [...tmpGroup]//右侧已选中的项目
+        newState.checkedList = [...checked]
+        return newState;
+    }
+    if (action.type == SELECT_ONE_CHECK) {
+        const newState = Object.assign({}, state);
+        let listWrap = JSON.parse(JSON.stringify(newState.hospitalInspectObj))
+        let tmpLen = listWrap.lisExcelWrapper.length;
+        let tmpGroup = JSON.parse(JSON.stringify(newState.selectGroupList))
+        let tmpCheckedLis = JSON.parse(JSON.stringify(newState.checkedList))
+        let numS = 0;
+        if (tmpCheckedLis.indexOf(action.name) == -1) {//添加选中
+          let tempArr = newState.checkedList;
+          tempArr.push(action.name);
+          newState.checkedList = [...tempArr]
+          for(let m = 0;m < tmpGroup.length;m++){
+            if(tmpGroup[m].groupName == action.groupName){//右侧有选中相同组的明细
+              tmpGroup[m].lisExcelWrapper.push(action.item)
+            }else{
+              ++numS
+            }
+          }
+          if(numS == tmpGroup.length){//直接添加到右侧
+            listWrap.lisExcelWrapper = []
+            listWrap.lisExcelWrapper.push(action.item)
+            tmpGroup.push(listWrap)
+          }
+          newState.selectGroupList = [...tmpGroup]//右侧已选中的项目
+          if(tempArr.length == tmpLen){
+            newState.allCheck = true;            
+          }else{
+            newState.allCheck = false;
+          }
+        } else {//去除选中
+          let tempArr = newState.checkedList;
+          tempArr.splice(tempArr.findIndex(item => item === action.name), 1)
+          newState.checkedList = [...tempArr]
+          for(let i = 0;i < tmpGroup.length;i++){
+            if(tmpGroup[i].groupName == action.groupName){//右侧肯定有相同组的
+              let tmpArr = []
+              for(let k = 0;k < tmpGroup[i].lisExcelWrapper.length;k++){
+                if(action.name != tmpGroup[i].lisExcelWrapper[k].itemName){
+                  tmpArr.push(tmpGroup[i].lisExcelWrapper[k])
+                }
+              }
+              if(tmpArr.length == 0){
+                tmpGroup.splice(i,1)
+              }else{
+                tmpGroup[i].lisExcelWrapper = [...tmpArr]
+              }
+            }
+          }
+          newState.selectGroupList = tmpGroup//右侧已选中的项目
+          if(tempArr.length == listWrap.lisExcelWrapper.length){
+            newState.allCheck = true;            
+          }else{
+            newState.allCheck = false;
+          }
+        }
+        return newState;
+    }
+    if (action.type == SET_ALLCHECK) {
+        const newState = Object.assign({}, state);
+        let flg = newState.allCheck
+        let listWrap = newState.hospitalInspectObj
+        let tmpGroup = newState.selectGroupList
+        let tmpCheckedLis = []
+        newState.allCheck = !flg
+        if(!flg){//全选
+          let numFst=0
+          for(let i = 0;i < tmpGroup.length;i++){
+            if(listWrap.groupName == tmpGroup[i].groupName){
+              ++numFst
+              tmpGroup[i].lisExcelWrapper = listWrap.lisExcelWrapper
+            }
+          }
+          for(let m =0;m < listWrap.lisExcelWrapper.length;m++){
+            tmpCheckedLis.push(listWrap.lisExcelWrapper[m].itemName)
+          }
+          if(numFst==0){
+            tmpGroup.push(listWrap)
+          }
+          newState.checkedList=[...tmpCheckedLis]
+          newState.selectGroupList = [...tmpGroup]
+        }else{//反选
+          for(let j = 0;j < tmpGroup.length;j++){
+            if(listWrap.groupName == tmpGroup[j].groupName){
+              tmpGroup.splice(j,1)
+            }
+          }
+          newState.checkedList=[]
+          newState.selectGroupList = [...tmpGroup]
+        }
+        return newState;
+    }
+    if (action.type == SEARCH_HOSPITAL_INSPECT) {
+        const newState = Object.assign({}, state);
+        newState.hospitalInspect = action.list
+        newState.allCheck = false
+        newState.hospitalInspectObj={}
+        return newState;
+    }
+    if (action.type == SEARCH_HOSPITAL_INSPECT_SON) {
+        const newState = Object.assign({}, state);
+        let tmpArr = action.list
+        let tmpSelect = newState.selectGroupList
+        let tmpSelectSon = []
+        for(let i = 0;i < tmpSelect.length;i++){
+          if(tmpSelect[i].groupName == action.name){
+            for(let k = 0;k < tmpSelect[i].lisExcelWrapper.length;k++){
+              tmpSelectSon.push(tmpSelect[i].lisExcelWrapper[k].itemName)
+            }
+          }
+        }
+        newState.checkedList = [...tmpSelectSon]
+        if(tmpSelectSon.length == tmpArr.lisExcelWrapper.length){
+          newState.allCheck = true;            
+        }else{
+          newState.allCheck = false;
+        }
+        newState.hospitalInspectObj = tmpArr
+        return newState;
+    }
     if (action.type == SEARCH_LIST) {
         const newState = Object.assign({}, state);
         newState.list = action.list
@@ -109,30 +312,15 @@ export default (state = initSearchList, action) => {
         const newState = Object.assign({}, state);
         let tmpArr = newState.getExcelDataList;
         let tmpArr2 = newState.labelList;
-        let temPush = newState.pushItem;
-        // if(action.data && action.data.lisExcelRes){     //前面五条数据显示,超出折叠
-        //   for(let i = 0;i < action.data.lisExcelRes.length;i++){
-        //     let tmpEx = action.data.lisExcelRes[i]
-        //     if(tmpEx && tmpEx.lisExcelItem){
-        //       if(tmpEx.lisExcelItem.length > 4){ //数据超过四条的,显示展开true,点击展开后改变值为false,用于判断页面展开还是收起
-        //         tmpEx.slideDir = true
-        //       }
-        //       for(let k = 0;k < tmpEx.lisExcelItem.length;k++){
-        //         let tmpLisItm = tmpEx.lisExcelItem[k]
-        //         if(k > 3){
-        //           tmpLisItm.isShow = false
-
-        //         }else{
-        //           tmpLisItm.isShow = true
-        //         }
-        //       }
-        //     }
-        //   }
-        // }
         newState.getExcelData = action.data
+
+        console.log(action.data)
         tmpArr.push(action.data)
         newState.getExcelDataList = [...tmpArr]
-        getExcelString(action,newState,tmpArr,tmpArr2)
+        newState.pushItem = getPushList(tmpArr,tmpArr2);
+        newState.pushItems = getPushLists(tmpArr,tmpArr2);
+        newState.inspectStrPlus = getStringPlus(newState.pushItems)
+        // getExcelString(action,newState,tmpArr,tmpArr2)
         return newState;
     }
     if(action.type == DEL_EXCEL_LIST){       //删除excel列表的某个数据

+ 6 - 3
src/store/reducers/patInfo.js

@@ -1,13 +1,16 @@
-import {GET_PATIENT_MESSAGE} from '../types/patInfo';
-import {updatePatientMessage} from '../actions/patInfo';
+import {GET_PATIENT_MESSAGE,GET_HOSPITAL_MESSAGE} from '../types/patInfo';
+import {updatePatientMessage,updateHospitalMessage} from '../actions/patInfo';
 
 const initState = {
-    message: {}
+    message: {},
+    hospitalMsg:{}
 };
 export default function(state = initState,action){
   switch(action.type){
     case GET_PATIENT_MESSAGE:
       return updatePatientMessage(state,action);
+    case GET_HOSPITAL_MESSAGE:
+      return updateHospitalMessage(state,action);
     default:
       return state;
   }

+ 5 - 0
src/store/types/assistCheck.js

@@ -5,3 +5,8 @@ export const CHANGE_ASSIST_VAL = 'CHANGE_ASSIST_VAL';
 export const CHANGE_DATE = 'CHANGE_DATE';
 export const CLEAR_ASSIST_DATA = 'CLEAR_ASSIST_DATA';
 export const ADD_ASSIST_LABEL = 'ADD_ASSIST_LABEL';
+export const SEARCH_HOSPITAL_PAC = 'SEARCH_HOSPITAL_PAC';
+export const SEARCH_HOSPITAL_PAC_SON = 'SEARCH_HOSPITAL_PAC_SON';
+export const SET_ALLCHECKS= 'SET_ALLCHECKS';
+export const SELECT_ONE_CHECKS= 'SELECT_ONE_CHECKS';
+export const SHOW_IN_ICSSS= 'SHOW_IN_ICSSS';

+ 6 - 2
src/store/types/inspect.js

@@ -11,5 +11,9 @@ export const CLEAR_ALL_LABEL = 'CLEAR_ALL_LABEL';
 export const DEL_PART_ITEM = 'DEL_PART_ITEM';
 export const DEL_EXCEL_LIST = 'DEL_EXCEL_LIST';
 export const ADD_LABEL = 'ADD_LABEL';
-export const GET_IMPORT_LIST = 'GET_IMPORT_LIST';
-export const GET_IMPORT_LIST_SON = 'GET_IMPORT_LIST_SON';
+export const SEARCH_HOSPITAL_INSPECT = 'SEARCH_HOSPITAL_INSPECT';
+export const SEARCH_HOSPITAL_INSPECT_SON = 'SEARCH_HOSPITAL_INSPECT_SON';
+export const SET_ALLCHECK = 'SET_ALLCHECK';
+export const SELECT_ONE_CHECK = 'SELECT_ONE_CHECK';
+export const SELECT_WARING = 'SELECT_WARING';
+export const SHOW_IN_ICSS = 'SHOW_IN_ICSS';

+ 2 - 1
src/store/types/patInfo.js

@@ -1 +1,2 @@
-export const GET_PATIENT_MESSAGE = 'GET_PATIENT_MESSAGE'
+export const GET_PATIENT_MESSAGE = 'GET_PATIENT_MESSAGE'
+export const GET_HOSPITAL_MESSAGE = 'GET_HOSPITAL_MESSAGE'

+ 1 - 0
src/utils/drag.js

@@ -63,6 +63,7 @@ function handleMove(event) {
     wrap.css({
       left: dragX + 'px',
       marginLeft: 0 + 'px',
+      marginTop: 0 + 'px',
       top: dragY + 'px'
     })
   }

+ 24 - 1
src/utils/tools.js

@@ -12,6 +12,8 @@ import {CLEAR_FIRST_MAIN_DIAG, CLEAR_ALL_TREAT} from "../store/types/treat";
 import {tabChange} from '@store/actions/tabTemplate';
 import config from '@config/index.js';
 import $ from 'jquery';
+import up from '@images/up.png';
+import down from '@images/down.png';
 
 /***
  * 工具函数
@@ -1157,6 +1159,26 @@ function downloadExportedData(data, fileName) {
     window.URL.revokeObjectURL(href);
 }
 
+function getStatusImg(type,val,status){
+  if(type == 0){
+    return <span>{val} </span>
+  }else if(type == 1){
+    return <span className={'red'}>{val} </span>
+  }
+  if(status == 1){
+    if(type == 2){
+      return <span style={{color:'#FF5D5D'}}>{val}<img src={up} alt=""/> </span>
+    }else if(type == 3){
+      return <span style={{color:"#D949FF"}}>{val}<img src={down} alt=""/> </span>
+    }
+  }else{
+    if(type == 2){
+      return <span>{val}<img src={up} alt=""/> </span>
+    }else if(type == 3){
+      return <span>{val}<img src={down} alt=""/> </span>
+    }
+  }
+}
 module.exports = {
     checkType: Type.checkType,
     getIds,
@@ -1202,5 +1224,6 @@ module.exports = {
     readyKeepHistory,
     parseChartData,
     getCalendarDate,
-	downloadExportedData
+    downloadExportedData,
+    getStatusImg
 };