Browse Source

化验辅检导入完成

Luolei 6 years ago
parent
commit
920eecc06e
49 changed files with 20900 additions and 283 deletions
  1. 2 2
      src/common/components/WrapModalContainer/index.jsx
  2. 4 3
      src/common/components/WrapModalContainer/index.less
  3. BIN
      src/common/images/down.png
  4. BIN
      src/common/images/up.png
  5. 11 3
      src/components/AddInspect/SlideExcel/index.jsx
  6. BIN
      src/components/AssistCheck/dists/FileAPI.flash.camera.swf
  7. BIN
      src/components/AssistCheck/dists/FileAPI.flash.image.swf
  8. BIN
      src/components/AssistCheck/dists/FileAPI.flash.swf
  9. 3608 0
      src/components/AssistCheck/dists/FileAPI.html5.js
  10. 2 0
      src/components/AssistCheck/dists/FileAPI.html5.min.js
  11. 4418 0
      src/components/AssistCheck/dists/FileAPI.js
  12. 2 0
      src/components/AssistCheck/dists/FileAPI.min.js
  13. 11008 0
      src/components/AssistCheck/dists/jQuery.js
  14. 4 0
      src/components/AssistCheck/dists/jq.js
  15. 2 0
      src/components/AssistCheck/dists/jquery.fileapi.min.js
  16. 205 5
      src/components/AssistCheck/index.jsx
  17. 50 12
      src/components/AssistCheck/index.less
  18. 85 39
      src/components/Inspect/index.jsx
  19. 13 6
      src/components/Inspect/index.less
  20. 5 5
      src/components/WrapModalBody/Item/index.jsx
  21. 25 2
      src/components/WrapModalBody/WrapModalRight/index.jsx
  22. 11 12
      src/components/WrapModalBody/WrapModalTable/index.jsx
  23. 75 0
      src/components/WrapModalBody/WrapModalTableSon/index.jsx
  24. 2 2
      src/components/WrapModalBody/WrapModalTitle/index.jsx
  25. BIN
      src/components/WrapModalBody/img/check-circle.png
  26. BIN
      src/components/WrapModalBody/img/check-right.png
  27. 20 4
      src/components/WrapModalBody/index.jsx
  28. 101 25
      src/components/WrapModalBody/index.less
  29. 105 0
      src/components/WrapModalBodyPac/Item/index.jsx
  30. 37 0
      src/components/WrapModalBodyPac/WrapModalRight/index.jsx
  31. 50 0
      src/components/WrapModalBodyPac/WrapModalTable/index.jsx
  32. 66 0
      src/components/WrapModalBodyPac/WrapModalTableSon/index.jsx
  33. 17 0
      src/components/WrapModalBodyPac/WrapModalTitle/index.jsx
  34. BIN
      src/components/WrapModalBodyPac/img/check-circle.png
  35. BIN
      src/components/WrapModalBodyPac/img/check-right.png
  36. 42 0
      src/components/WrapModalBodyPac/index.jsx
  37. 275 0
      src/components/WrapModalBodyPac/index.less
  38. 30 4
      src/containers/AssistCheck.js
  39. 23 4
      src/containers/Inspect.js
  40. 22 1
      src/store/actions/assistCheck.js
  41. 19 3
      src/store/actions/inspect.js
  42. 32 1
      src/store/async-actions/assistCheck.js
  43. 1 3
      src/store/async-actions/inspect.js
  44. 296 120
      src/store/reducers/assistCheck.js
  45. 197 26
      src/store/reducers/inspect.js
  46. 5 0
      src/store/types/assistCheck.js
  47. 4 0
      src/store/types/inspect.js
  48. 1 0
      src/utils/drag.js
  49. 25 1
      src/utils/tools.js

+ 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


+ 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>

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


File diff suppressed because it is too large
+ 3608 - 0
src/components/AssistCheck/dists/FileAPI.html5.js


File diff suppressed because it is too large
+ 2 - 0
src/components/AssistCheck/dists/FileAPI.html5.min.js


File diff suppressed because it is too large
+ 4418 - 0
src/components/AssistCheck/dists/FileAPI.js


File diff suppressed because it is too large
+ 2 - 0
src/components/AssistCheck/dists/FileAPI.min.js


File diff suppressed because it is too large
+ 11008 - 0
src/components/AssistCheck/dists/jQuery.js


File diff suppressed because it is too large
+ 4 - 0
src/components/AssistCheck/dists/jq.js


File diff suppressed because it is too large
+ 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 { getExcelList } from '@store/actions/inspect';
+import Notify from '@commonComp/Notify';
+import store from '@store';
+import $ from 'jquery';
+import { host, prefix } from '@utils/config.js';
+import { isIE, getUrlArgObject } from '@utils/tools.js';
+import { dragBox } from '@utils/drag';
+import WrapModalBodyPac from '../WrapModalBodyPac';
 
-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 = $('#importExcelBtn')[0];   // 导入按钮按钮
+        let searchOption = $('#importExcelList')[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="importExcelBtn" className={styles.importInspectBtn}>导入化验结果</p>
+                        {
+                          importLis?<ul className={styles.importSelect} id="importExcelList">
+                            <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;
+  }
 }

+ 85 - 39
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: true
+      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,48 +166,84 @@ class Inspect extends React.Component {
       hide: true
     })
   }
-  onClose(){
+  onClose() {
+    this.setState({
+      hide: false
+    })
+    dragBox('previewWrapper', 'previewStatic', 'del')
+  }
+  showInIcss(){
+    const {showInIcss} = this.props
     this.setState({
       hide: false
     })
-    dragBox('previewWrapper','previewStatic','del')
+    showInIcss&&showInIcss();
+    dragBox('previewWrapper', 'previewStatic', 'del')
+  }
+  showSlideImport(){
+    let flg = this.state.importLis
+    this.setState({
+      importLis:!flg
+    })
   }
   render() {
-    const { fetchPushInfos, 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 } = 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()} style={{display:hospitalMsg.importWay == 0?'none':'block'}}>
-            {/* <button disabled={ieVersion&&ieVersion>9?true:false}>导入化验结果</button>*/}
+          <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.importWay == 1?<div className={styles.pushButton} disabled={ieVersion&&ieVersion>9?true:false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
-                导入化验结果
+              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} />
-              </div>:hospitalMsg.importWay == 48888?<div className={styles.pushButton} disabled={ieVersion&&ieVersion>9?true:false} onClick={checkSystemIpt}>
-                检查系统导入
-              </div>:hospitalMsg.importWay == 2?<div className={styles.pushButton}>导入化验结果
-                <ul className={styles.importSelect}>
-                  <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>
-              </div>:null
+              </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 hospitalInspect={hospitalInspect} handleGetSonList={handleGetSonList} 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;

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

@@ -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)
             }}

+ 25 - 2
src/components/WrapModalBody/WrapModalRight/index.jsx

@@ -1,15 +1,38 @@
 import React from "react";
 import style from "../index.less";
-
+import {getStatusImg} from "@utils/tools";
 class WrapModalRight extends React.Component {
   constructor(props) {
     super(props)
   }
   render() {
+    const {selectGroupList,height,showInIcss} = this.props;
     return <div className={style['modalRight']}>
       <div className={`${style.modalRightT} clearfix`}>
         <span className={style.tip}>已选化验项</span>
-        <span className={style.btnS}>确认选择</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>
   }

+ 11 - 12
src/components/WrapModalBody/WrapModalTable/index.jsx

@@ -6,10 +6,9 @@ class WrapModalTable extends React.Component {
     super(props)
   }
   render() {
-    const { hospitalInspect,getSonDetailList,handleGetSonList } = this.props;
-    console.log(hospitalInspect)
+    const { hospitalInspect, handleGetSonList } = this.props;
     return <div className={style['modalTable']}>
-      <div className={style.parentTable}>
+      <div className={style.tablePubP}>
         <table>
           <tr className={style.head}>
             <td className={`${style.fst} ellipsOver`}>编号</td>
@@ -18,13 +17,18 @@ class WrapModalTable extends React.Component {
             <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.map((item,idx)=>{
-              return <tr>
-                <td title={idx} className={`${style.fst} ellipsOver`}>{idx}</td>
+            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`} onClick={()=>handleGetSonList(item.groupName)}>{item.groupName}</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>
@@ -33,11 +37,6 @@ class WrapModalTable extends React.Component {
           }
         </table>
       </div>
-      <div className={style.parentTable}>
-          <div className={style.sonTitle}>
-            <span>组名称 : </span><span className={style.btn}>选中异常值数据</span>
-          </div>
-      </div>
     </div>
   }
 }

+ 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;

+ 2 - 2
src/components/WrapModalBody/WrapModalTitle/index.jsx

@@ -7,9 +7,9 @@ class WrapModalTitle extends React.Component {
     super(props)
   }
   render() {
-    const { handleSearch } = this.props
+    const { handleSearch,message } = this.props
     return <div className={style['modalTop']}>
-      <Item handleSearch={handleSearch}></Item>
+      <Item handleSearch={handleSearch} message={message}></Item>
     </div>
   }
 }

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


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


+ 20 - 4
src/components/WrapModalBody/index.jsx

@@ -2,6 +2,7 @@ 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 {
@@ -9,14 +10,29 @@ class WrapModalBody extends React.Component {
     super(props)
   }
   render() {
-    const { handleSearch,hospitalInspect,handleGetSonList } = this.props;
+    const { handleSearch, hospitalInspect,height,selectOneCheck,showInIcss, handleGetSonList,selectWaring,message, hospitalSonInspect,allCheckImport,allCheck,checkedList,selectGroupList } = this.props;
     return <div className={style['container']}>
       <div className={`${style.left}`}>
-        <WrapModalTitle handleSearch={handleSearch}></WrapModalTitle>
-        <WrapModalTable hospitalInspect={hospitalInspect} handleGetSonList={handleGetSonList}></WrapModalTable>
+        <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></WrapModalRight>
+        <WrapModalRight showInIcss={showInIcss} height={height} selectGroupList={selectGroupList}></WrapModalRight>
       </div>
     </div>
   }

+ 101 - 25
src/components/WrapModalBody/index.less

@@ -116,10 +116,110 @@
       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: 330px;
+      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;
@@ -158,30 +258,6 @@
           padding: 0 5px;
           box-sizing: border-box;
         }
-        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: 255px;
-        }
-        td.fif {
-          width: 150px;
-          max-width: 150px;
-        }
-        td.six {
-          width: 150px;
-          max-width: 150px;
-        }
       }
       .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;

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

@@ -0,0 +1,37 @@
+import React from "react";
+import style from "../index.less";
+class WrapModalRight extends React.Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const {selectGroupList,height,showInIcss} = this.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;

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

@@ -0,0 +1,50 @@
+import React from "react";
+import style from "../index.less";
+
+class WrapModalTable extends React.Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { hospitalPac, handleGetSonList,msgObj } = this.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;

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

@@ -0,0 +1,17 @@
+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,message } = this.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


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

@@ -0,0 +1,42 @@
+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,msgObj, hospitalPac,height,selectOneCheck,showInIcss, handleGetSonList,selectWaring,message, hospitalSonInspect,allCheckImport,allCheck,checkedList,selectGroupList } = this.props;
+    return <div className={style['container']}>
+      <div className={`${style.left}`}>
+        <WrapModalTitle handleSearch={handleSearch} message={message}></WrapModalTitle>
+        <WrapModalTable
+          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))
         },

+ 23 - 4
src/containers/Inspect.js

@@ -16,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,
@@ -33,19 +37,34 @@ function mapStateToProps(state) {console.log(state)
     inspectList: state.homePage.inspectList,
     windowHeight: state.homePage.windowHeight,
     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) {
-      console.log(name)
       dispatch(getSonDetailList(name))
     },
     handleChangeValue(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,

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

@@ -1,5 +1,20 @@
-import {ADD_LABEL,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';
+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,
@@ -9,9 +24,10 @@ export const getHospitalInspectList = (list) => ({         //检索医院化验
     type:SEARCH_HOSPITAL_INSPECT,
     list
 })
-export const getHospitalInspectDetailList = (list) => ({         //检索医院化验项
+export const getHospitalInspectDetailList = (list,name) => ({         //检索医院化验项
     type:SEARCH_HOSPITAL_INSPECT_SON,
-    list
+    list,
+    name
 })
 
 export const setLabel = (idx,sign) => ({          //搜索后点击选中的结果

+ 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))
+      })
+  }
+};

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

@@ -64,7 +64,6 @@ export const getImportList = (data) => {
         axios.json('/dockingImport/lisDockingImports',param)
         .then((res)=>{
             const data = res.data.data;
-            console.log(data.lisRetrieveData)
             dispatch(getHospitalInspectList(data.lisRetrieveData))
         })
     }
@@ -74,8 +73,7 @@ export const getSonDetailList = (name) => {
         axios.json('/dockingImport/getByGroupNameLisData',{groupName:name})
         .then((res)=>{
             const data = res.data.data;
-            console.log(data)
-            dispatch(getHospitalInspectDetailList(data))
+            dispatch(getHospitalInspectDetailList(data,name))
         })
     }
 };

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

@@ -1,137 +1,313 @@
 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 = [] //选中的小项
+    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)
+      }
+      console.log(tmpCheckedLis)
+      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
+    console.log(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;
 }

+ 197 - 26
src/store/reducers/inspect.js

@@ -11,7 +11,11 @@ import {
     DEL_EXCEL_LIST,
     ADD_LABEL,
     SEARCH_HOSPITAL_INSPECT,
-    SEARCH_HOSPITAL_INSPECT_SON
+    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';
@@ -34,23 +38,205 @@ const initSearchList = {
     hospitalInspectObj:{},//组对应的明细(单选多选全选)
     selectGroupList:[],//选的组的明细可能有多个组
     allCheck:false,//全选反选
+    checkedList:[],//选中的小项
 }
 
 export default (state = initSearchList, action) => {
-    if (action.type == SEARCH_LIST) {
+    if (action.type == SHOW_IN_ICSS) {
         const newState = Object.assign({}, state);
-        newState.list = action.list
-        newState.inspectVal = action.val
+        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);
-        newState.hospitalInspectObj = action.list
+        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
+        newState.inspectVal = action.val
         return newState;
     }
     if (action.type == SET_LABEL) {             //选中的结果    
@@ -126,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列表的某个数据

+ 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';

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

@@ -13,3 +13,7 @@ export const DEL_EXCEL_LIST = 'DEL_EXCEL_LIST';
 export const ADD_LABEL = 'ADD_LABEL';
 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';

+ 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'
     })
   }

+ 25 - 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';
 
 /***
  * 工具函数
@@ -1066,6 +1068,27 @@ function getCalendarDate(info,flg,con) {
   }
   return date;
 }
+
+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,
@@ -1109,5 +1132,6 @@ module.exports = {
     ifOtherClear,
     readyKeepHistory,
     parseChartData,
-    getCalendarDate
+    getCalendarDate,
+    getStatusImg
 };