Przeglądaj źródła

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

zhouna 6 lat temu
rodzic
commit
6de3fad484

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

@@ -12,7 +12,7 @@ class Content extends React.Component {
     }
 
     genItems(){
-        let is_now_month=this.props.selectTime.year===this.props.year && this.props.selectTime.month===this.props.month;
+      let is_now_month=this.props.selectTime.year===this.props.year && this.props.selectTime.month===this.props.month;
         const Items=[];
         const first_day=new Date(this.props.year,this.props.month-1,1).getDay();
         let key=0;

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

@@ -13,6 +13,7 @@ class Time extends React.Component {
         else if(value>=24) {value=23}
         else if(value<0) {value=0}
         this.props.handleChange({
+            day:this.props.day,
             hour:value,
             minute:this.props.minute,
             second:this.props.second,
@@ -24,6 +25,7 @@ class Time extends React.Component {
         else if(value>=60) {value=59}
         else if(value<0) {value=0}
         this.props.handleChange({
+            day:this.props.day,
             hour:this.props.hour,
             minute:value,
             second:this.props.second,
@@ -35,6 +37,7 @@ class Time extends React.Component {
         else if(value>=60) {value=59}
         else if(value<0) {value=0}
         this.props.handleChange({
+            day:this.props.day,
             hour:this.props.hour,
             minute:this.props.minute,
             second:value,

+ 131 - 95
src/common/components/Calendar/index.jsx

@@ -1,7 +1,7 @@
 import React from 'react'
 import style from './index.less'
 import PropTypes from 'prop-types'
-import {YearList, MonthList} from './SelectList'
+import { YearList, MonthList } from './SelectList'
 import Content from './Content'
 import Time from './Time'
 
@@ -12,112 +12,148 @@ import Time from './Time'
  * needTime:是否显示下方时间输入控件  不显示则默认的时分秒为0
  */
 class Calendar extends React.Component {
-    constructor() {
-        super();
-        const date=new Date();
-        this.year=date.getFullYear();
-        this.month=date.getMonth()+1;
-        this.day=date.getDate();
-        this.inputing=false;
-        this.state = {
-            year:  this.year,
-            month:  this.month,
-            select:{
-                year:  this.year,
-                month:  this.month,
-                day: 0,//这里设置初始选中的值
-                hour:0,
-                minute:0,
-                second:0
-            }
-        }
+  constructor(props) {
+    super(props);
+    const date = new Date();
+    this.year = date.getFullYear();
+    this.month = date.getMonth() + 1;
+    this.day = date.getDate();
+    this.inputing = false;
+    this.state = {
+      year: this.year,
+      month: this.month,
+      day: this.day,
+      select: {
+        year: this.year,
+        month: this.month,
+        day:  0,
+        hour:0,
+        minute:0,
+        second:0
+      }
     }
-
-    handleYearSelect(year) {
-        if(year===this.year && this.state.month>this.month){
-            this.setState({
-                year: year,
-                month:this.month
-            });
-        }else{
-            this.setState({
-                year: year
-            });
-        }
+  }
+  componentDidMount(){
+    this.setState({
+      year: this.props.timeLis && this.props.timeLis.year || this.year,
+      month: this.props.timeLis && this.props.timeLis.month || this.month,
+      day: this.props.timeLis && this.props.timeLis.day || this.day,
+      select: {
+        year: this.props.timeLis && this.props.timeLis.year || this.year,
+        month: this.props.timeLis && this.props.timeLis.month || this.month,
+        day: this.props.timeLis && this.props.timeLis.day || this.day,//这里设置初始选中的值
+        hour: this.props.timeLis && this.props.timeLis.hour,
+        minute: this.props.timeLis && this.props.timeLis.minute,
+        second: this.props.timeLis && this.props.timeLis.second
+      }
+    })
+  }
+  handleYearSelect(year) {
+    if (year === this.year && this.state.month > this.month) {
+      this.setState({
+        year: year,
+        month: this.month
+      });
+    } else {
+      this.setState({
+        year: year
+      });
     }
+  }
 
-    handleMonthSelect(month) {
-        this.setState({
-            month: month
-        });
-    }
+  handleMonthSelect(month) {
+    this.setState({
+      month: month
+    });
+  }
 
-    handleChange(info){
-        if(this.inputing){
-            return;
-        }
-        this.inputing=true;
-        info.year=this.state.year;
-        info.month=this.state.month;
-        // info.day = this.day;//没选日就加上默认值
-        if(info.hour==null){
-            info.hour=this.state.select.hour;
-            info.minute=this.state.select.minute;
-            info.second=this.state.select.second;
-        }
-        this.props.handleChange(Object.assign({},info));
-        this.setState({
-            select:info
-        });
+  handleChange(info) {
+    if (this.inputing) {
+      return;
     }
-
-    handleTodayClick(){
-        const info={
-            year:this.year,
-            month:this.month,
-            day:this.day,
-            hour:this.state.select.hour,
-            minute:this.state.select.minute,
-            second:this.state.select.second
-        };
-        this.setState({
-            select:info
-        });
-        this.props.handleChange(info);
+    this.inputing = true;
+    info.year = this.state.year;
+    info.month = this.state.month;
+    // info.day = this.state.day;//没选日就加上默认值
+    if (info.hour == null) {
+      info.hour = this.state.select.hour;
+      info.minute = this.state.select.minute;
+      info.second = this.state.select.second;
     }
-
-    genTimeComponent(){
-        return this.props.needTime?<Time hour={this.state.select.hour} minute={this.state.select.minute} second={this.state.select.second} handleChange={(info)=>{this.handleChange(info)}}/>:null;
+    this.props.handleChange(Object.assign({}, info));
+    this.setState({
+      select: info
+    });
+  }
+  timeSure() {
+    if (this.inputing) {
+      return;
     }
-    render() {
-        return (
-            <div className={style.wrapper}>
-                <div className={style.top}>
-                    <div className={style.year}>
-                        <YearList select={this.state.year} canSelectFuture={this.props.canSelectFuture} handleChange={(info) => this.handleYearSelect(info)}/>
-                    </div>
-                    <div className={style.month}>
-                        <MonthList year={this.state.year} canSelectFuture={this.props.canSelectFuture} select={this.state.month} handleChange={(info) => this.handleMonthSelect(info)}/>
-                    </div>
-                    <div className={style.button}>
-                        <button onClick={()=>this.handleTodayClick()}>{'今天'}</button>
-                    </div>
-                </div>
-                <Content selectTime={this.state.select} year={this.state.year} month={this.state.month} handleClick={(info)=>this.handleChange(info)} canSelectFuture={this.props.canSelectFuture}/>
-                {this.genTimeComponent()}
-            </div>
-        )
+    this.inputing = true;
+    let info = this.state.select
+    info.year = this.state.year;
+    info.month = this.state.month;
+    // info.day = this.state.day;//没选日就加上默认值
+    if (info.hour == null) {
+      info.hour = this.state.select.hour;
+      info.minute = this.state.select.minute;
+      info.second = this.state.select.second;
     }
+    this.props.timeSure(Object.assign({}, info))
+    this.setState({
+      select: info
+    });
+  }
+  handleTodayClick() {
+    const info = {
+      year: this.year,
+      month: this.month,
+      day: this.day,
+      hour: this.state.select.hour,
+      minute: this.state.select.minute,
+      second: this.state.select.second
+    };
+    this.setState({
+      select: info
+    });
+    // this.props.timeSure(Object.assign({}, info))
+    this.props.handleChange(info);
+  }
+  genTimeComponent() {
+    return this.props.needTime ? <Time hour={this.state.select.hour} minute={this.state.select.minute} second={this.state.select.second} day={this.state.select.day} handleChange={(info) => { this.handleChange(info) }} /> : null;
+  }
+  render() {
+    return (
+      <div className={style.wrapper} style={{ top: this.props.top }}>
+        <div className={style.top}>
+          <div className={style.year}>
+            <YearList select={this.state.year} canSelectFuture={this.props.canSelectFuture} handleChange={(info) => this.handleYearSelect(info)} />
+          </div>
+          <div className={style.month}>
+            <MonthList year={this.state.year} canSelectFuture={this.props.canSelectFuture} select={this.state.month} handleChange={(info) => this.handleMonthSelect(info)} />
+          </div>
+          <div className={style.button}>
+            <button onClick={() => this.handleTodayClick()}>{'今天'}</button>
+          </div>
+        </div>
+        <Content selectTime={this.state.select} year={this.state.year} month={this.state.month} day={this.state.day} handleClick={(info) => this.handleChange(info)} canSelectFuture={this.props.canSelectFuture} />
+        {this.genTimeComponent()}
+        {
+          this.props.sure ? <div className={style.timeSure} onClick={() => this.timeSure({})}>确定</div> : ''
+        }
+      </div>
+    )
+  }
 
-    componentDidUpdate(){
-        this.inputing=false;
-    }
+  componentDidUpdate() {
+    this.inputing = false;
+  }
 }
 
 export default Calendar;
 
 Calendar.propTypes = {
-    handleChange: PropTypes.func,
-    needTime:PropTypes.bool,
-    canSelectFuture:PropTypes.bool
+  handleChange: PropTypes.func,
+  needTime: PropTypes.bool,
+  canSelectFuture: PropTypes.bool
 };

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

@@ -9,7 +9,7 @@
   border-radius: 3px;
   position: absolute;
   top: 10px;
-    right: 0;
+  right: 0;
   z-index: 100;
   border: 1px solid #ccc;
   box-sizing: border-box;
@@ -49,4 +49,25 @@
       }
     }
   }
+  
+  .timeSure{
+    width: 46px;
+    height: 26px;
+    line-height: 26px;
+    position: absolute;
+    right: 5px;
+    bottom: 15px;
+    box-sizing: border-box;
+    color:#1F547E;
+    border: 1px solid #b1d2ec;
+    background-color: #deecf8;
+    text-align: center;
+    &:hover{
+      background-color: #ECF4FB;
+    }
+    &:active{
+      box-shadow: @active-box-shadow;
+      border-radius: 2px;
+    }
+  }
 }

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

@@ -25,7 +25,7 @@ class ComplexModal extends Component {
 
   render() {
     const { onclose,title,children,footer,shadeClose,icon,width,top,bottom} = this.props;
-    const marginLeft = width? -parseInt(width)/2 : '';
+    const marginLeft = width? - parseInt(width)/2 : '';
     //const marginTop = height? -parseInt(height)/2: '';
     const domNode = document.getElementById('root');
     return ReactDom.createPortal(<div className={style['container']}>

+ 27 - 0
src/common/components/WrapModalContainer/index.jsx

@@ -0,0 +1,27 @@
+import React from "react";
+import {dragBox} from '@utils/drag';
+import ReactDom from "react-dom";
+import style from "./index.less";
+import close from '@common/images/icon_close.png';
+
+class WrapModalContainer extends React.Component {
+  constructor(props) {
+    super(props)
+  }
+  componentDidMount(){
+    dragBox('previewWrapper','previewStatic','add')
+  }
+  render() {
+    const { onClose, children,title,width } = 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 id="previewStatic" className={`${style['close']} drag-title`}>{title}<img src={close} onClick={onClose} /></div>
+        {children}
+      </div>
+    </div>,domNode)
+  }
+}
+
+export default WrapModalContainer;

+ 46 - 0
src/common/components/WrapModalContainer/index.less

@@ -0,0 +1,46 @@
+.container {
+  position: fixed;
+  z-index: 2000;
+  width: 100%;
+  height: 100%;
+  .shade {
+    position: fixed;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    background-color: #000;
+    opacity: 0.6;
+    filter:alpha(opacity=60);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+  }
+  .modal {
+    width: 820px;
+    background: #fff;
+    position: fixed;
+    left: 50%;
+    margin-left: -410px;
+    top: 7%;  
+    bottom: 7%;
+    height: 86%;
+    overflow: hidden;
+    padding-top: 40px;
+  }
+  .close { 
+    padding:  0 15px;
+    height: 40px;
+    line-height: 40px;
+    border-bottom: 1px solid #EAEDF1;
+    box-sizing: border-box;
+    position: absolute;
+    width: 100%;
+    top: 0;
+    background-color: #fff;
+    z-index: 10;
+    img{
+      float:right;
+      cursor: pointer;
+      margin-top: 10px;
+    }
+  }
+}

+ 3 - 1
src/common/components/index.js

@@ -24,6 +24,7 @@ import MiniToast from "./MiniToast";
 import DelToast from "./DelToast";
 import TailInlineTag from "./TailInlineTag";
 import Footer from "./Footer";
+import WrapModalContainer from "./WrapModalContainer";
 
 module.exports = {
     Banner,
@@ -52,5 +53,6 @@ module.exports = {
     DelToast,
     MiniToast,
     TailInlineTag,
-    Footer
+    Footer,
+    WrapModalContainer
 };

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

@@ -5,6 +5,10 @@
 @blue: #3B9ED0;
 @red:#ff0000;
 @tab-color:#3B9ED0;
+
+@ipt-color:#E9F5FA;
+@ipt-bg-color:#F0F0F0;
+@ipt-wrap-color:#e2e2e2;
 /***按钮hover***/
 @button-hover: #aaa;
 

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

@@ -15,7 +15,7 @@ class AssistCheck extends React.Component {
             <div className={styles.wrapper}>
                 <div className={styles.top}>
                     <span id="assistResultData">辅检结果数据</span>
-                    {/* <button>导入化验结果</button> */}
+                    {/* <button>导入辅检结果</button> */}
                 </div>
                 <ItemBox 
                     className={styles.title}

+ 218 - 186
src/components/Inspect/index.jsx

@@ -1,217 +1,249 @@
 import React from 'react';
-import { ItemBox,ConfirmModal } from '@commonComp';
+import { ItemBox, ConfirmModal, WrapModalContainer } from '@commonComp';
 import AddInspect from '../AddInspect';
 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 { host, prefix } from '@utils/config.js';
+import { isIE, getUrlArgObject } from '@utils/tools.js';
+import {dragBox} from '@utils/drag';
+import WrapModalBody from '../WrapModalBody';
 
 
 (function ($) {
-    var FileAPI = {
-        // @default: "./dist/"
-        staticPath: './dists/',
+  var FileAPI = {
+    // @default: "./dist/"
+    staticPath: './dists/',
 
-        // @default: FileAPI.staticPath + "FileAPI.flash.swf"
-        flashUrl: './dists/FileAPI.flash.swf',
+    // @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
+    // @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 isLocal = window.location.hostname.indexOf('localhost') != -1;
+const qhost = isLocal ? host + prefix : prefix;
 const api = {
-    upload: qhost+'/lisExcelRes/lisExcelAnalysis'
+  upload: qhost + '/lisExcelRes/lisExcelAnalysis'
 };
 
 class Inspect extends React.Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            val: '',
-            visible:false,
-            dom:[],
-            isIE:isIE(),
-            ieVersion:null,
-            height:'-1'
-        }
-        this.handleImportExcel = this.handleImportExcel.bind(this)
-        this.cancel = this.cancel.bind(this)
-        this.getWarings = this.getWarings.bind(this)
+  constructor(props) {
+    super(props);
+    this.state = {
+      val: '',
+      visible: false,
+      dom: [],
+      isIE: isIE(),
+      ieVersion: null,
+      height: '-1',
+      hide: false
     }
-    componentDidMount(){
-        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);
-            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;
-                // }else{
-                //     alert(9)
-                //     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:baseData == '{}'? '' : baseData.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 ){
-                                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)
-                            }
-                        }
-                    });
+    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)
+  }
+  componentDidMount() {
+    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);
+      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;
+        // }else{
+        //     alert(9)
+        //     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: baseData == '{}' ? '' : baseData.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) {
+                  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)
                 }
+              }
             });
+          }
         });
+    });
+  }
+  handleImportExcel() {
+    this.inputRef.click();
+  }
+  cancel() {
+    this.setState({ visible: false })
+  }
+  getStyle() {
+    const { ieVersion } = this.state;
+    if (ieVersion && ieVersion <= 9) {
+      return styles.disabledBtn;
+    } else {
+      return styles.button;
     }
-    handleImportExcel() {
-        this.inputRef.click();
-    }
-    cancel(){
-        this.setState({visible:false})
-    }
-  getStyle(){
-    const {ieVersion} = this.state;
-        if(ieVersion&&ieVersion<=9){
-            return styles.disabledBtn;
-        }else{
-            return styles.button;
-        }
   }
-    getWarings(lis){
-        <ul>
+  getWarings(lis) {
+    <ul>
+      {
+        lis.length > 0 && lis.map((val) => {
+          return <li>
+            {val}
+          </li>
+        })
+      }
+    </ul>
+  }
+  checkSystemIpt() {
+    this.setState({
+      hide: true
+    })
+  }
+  onClose(){
+    this.setState({
+      hide: false
+    })
+    dragBox('previewWrapper','previewStatic','del')
+  }
+  render() {
+    const { fetchPushInfos, getInfomation, inspectVal,handleSearch, windowHeight, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
+    const { ieVersion, isIE, hide } = this.state;
+    const { checkSystemIpt,onClose } = this;
+    return (
+      <div className={styles.wrapper} >
+        {/* 导入功能插件,ie8/9权限问题暂未解决,先隐藏 */}
+        <div className={styles.top}>
+          <span id="inspectResultData">化验结果数据</span>
+          {/* <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}> */}
+          <div className={this.getStyle()}>
+            {/* <button disabled={ieVersion&&ieVersion>9?true:false}>导入化验结果</button>*/}
+            <div className={styles.pushButton}>导入化验结果
+            <ul className={styles.importSelect}>
+              <li className={styles.excelIpt}>
+                <div onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>本地导入</div>
+                <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>
             {
-                lis.length>0 && lis.map((val)=>{
-                    return <li>
-                        {val}
-                    </li>
-                })
+              hide ? <WrapModalContainer title={'导入化验数据'} width={1000} onClose={onClose}>
+                <WrapModalBody handleSearch={handleSearch}></WrapModalBody>
+              </WrapModalContainer> : null
             }
-        </ul>
-    }
-    render() {
-        const {fetchPushInfos,getInfomation,inspectVal,windowHeight, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem,inspectList } = this.props;
-        const {ieVersion,isIE} = this.state;
-        return (
-            <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}>
-                       {/* <button disabled={ieVersion&&ieVersion>9?true:false}>导入化验结果</button>*/}
-                        <div className={styles.pushButton}>导入化验结果</div>
-                        <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
-                    </div>
-                </div>
-                <ItemBox
-                    className={styles.title}
-                    title={'化验'}
-                    editable={false}
-                    border={true}
-                    marginTop={'20px'}
-                >
-                    <div style={{ padding: '10px', boxSizing: 'border-box' }} >
-                        <AddInspect
-                            handleSign={handleSign}
-                            handleChangeValue={handleChangeValue}
-                            list={list}
-                            handlePush={fetchPushInfos}
-                            labelList={labelList}
-                            handleLabelSub={handleLabelSub}
-                            fillActive={fillActive}
-                            handleClear={handleClear}
-                            handleConfirm={handleConfirm}
-                            changeActivePart={changeActivePart}
-                            getExcelDataList={getExcelDataList}
-                            handleCloseExcel={handleCloseExcel}
-                            labelListActive={labelListActive}
-                            delPartItem={delPartItem}
-                            inspectList={inspectList}
-                            getInfomation={getInfomation}
-                            inspectVal={inspectVal}
-                            windowHeight={windowHeight}
-                        >
-                        </AddInspect>
-                    </div>
-                </ItemBox>
-                <ConfirmModal visible={this.state.visible} 
-                    okText='删除' 
-                    cancelText='确定' 
-                    width="450"
-                    height={(this.state.height > 2 && this.state.height < 8)?((this.state.height * 30 + 120)+'px') : this.state.height > 8 ? '350px' : '200px'}
-                    noFooter= {true}
-                    close={this.cancel}>
-                    <ul className={styles.excelList}>
-                        {
-                            this.state.dom.length>0 && this.state.dom.map((val)=>{
-                                return <li className={styles.excelListWaring}>
-                                    {val}
-                                </li>
-                            })
-                        }
-                    </ul>
-                    <div onClick={this.cancel} className={styles.confirmBtn}>确定</div>
-                </ConfirmModal>
-            </div>
-        )
-    }
+            {/* <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
+          </div>
+        </div>
+        <ItemBox
+          className={styles.title}
+          title={'化验'}
+          editable={false}
+          border={true}
+          marginTop={'20px'}
+        >
+          <div style={{ padding: '10px', boxSizing: 'border-box' }} >
+            <AddInspect
+              handleSign={handleSign}
+              handleChangeValue={handleChangeValue}
+              list={list}
+              handlePush={fetchPushInfos}
+              labelList={labelList}
+              handleLabelSub={handleLabelSub}
+              fillActive={fillActive}
+              handleClear={handleClear}
+              handleConfirm={handleConfirm}
+              changeActivePart={changeActivePart}
+              getExcelDataList={getExcelDataList}
+              handleCloseExcel={handleCloseExcel}
+              labelListActive={labelListActive}
+              delPartItem={delPartItem}
+              inspectList={inspectList}
+              getInfomation={getInfomation}
+              inspectVal={inspectVal}
+              windowHeight={windowHeight}
+            >
+            </AddInspect>
+          </div>
+        </ItemBox>
+        <ConfirmModal visible={this.state.visible}
+          okText='删除'
+          cancelText='确定'
+          width="450"
+          height={(this.state.height > 2 && this.state.height < 8) ? ((this.state.height * 30 + 120) + 'px') : this.state.height > 8 ? '350px' : '200px'}
+          noFooter={true}
+          close={this.cancel}>
+          <ul className={styles.excelList}>
+            {
+              this.state.dom.length > 0 && this.state.dom.map((val) => {
+                return <li className={styles.excelListWaring}>
+                  {val}
+                </li>
+              })
+            }
+          </ul>
+          <div onClick={this.cancel} className={styles.confirmBtn}>确定</div>
+        </ConfirmModal>
+      </div>
+    )
+  }
 }
 
 export default Inspect;

+ 30 - 1
src/components/Inspect/index.less

@@ -20,8 +20,10 @@
         float: right;
         border-radius: 5px;
         border: 1px solid @template-color;
-        overflow: hidden;
+        // overflow: hidden;
         margin-top: -3px;
+        position: relative;
+        z-index: 99;
     }
     .disabledBtn{
         float: right;
@@ -41,6 +43,11 @@
         border-radius: 5px;
         color: @template-color;
         cursor: pointer;
+        &:hover {
+          .importSelect {
+            display: block !important;
+          }
+        }
     }
 }
 .title {
@@ -68,4 +75,26 @@
     color: #fff;
     // cursor: pointer;
 }
+.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;
+  }
+}
 

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

@@ -19,7 +19,7 @@ class Preview extends Component {
     const dataJson = getAllDataList(baseList);
     const dataStr = getAllDataStringList(baseList);
 
-    return <div className={style['container']} style={visible? {display: 'block'}: {display: 'none'}}>
+    return <div className={style['container']}>
       <div className={style['shade']} onClick={onClose}></div>
       <div className={style['modal']} id="previewWrapper">
         <div id="previewStatic" className={`${style['close']} drag-title`}>预览<img src={close} onClick={onClose} /></div>

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

@@ -21,7 +21,7 @@ class PrintPreview extends Component {
         const dataJson = getAllDataList(baseList);
         const dataStr = getAllDataStringList(baseList);
 
-        return <div className={style['container']} style={visible ? { display: 'block' } : { display: 'none' }}>
+        return <div className={style['container']}>
             <div className={style['shade']} onClick={onClose}></div>
             <div className={style['modal']} id="previewPrintWrapper">
                 <div id="previewPrintStatic" className={`${style['close']} drag-title`}>打印<img src={close} onClick={onClose} /></div>

+ 192 - 197
src/components/TemplateItems/TemplateItem/index.jsx

@@ -11,210 +11,205 @@ import editing_icon from './img/edit_blue.png';
 import check_circle from './img/check-circle.png';
 import check_right from './img/check-right.png';
 import store from '@store'
-import {checkItems} from '@store/actions/tabTemplate';
+import { checkItems } from '@store/actions/tabTemplate';
 import $ from 'jquery';
 
 class TemplateItem extends React.Component {
-    constructor() {
-        super();
-        this.content = null;
-        this.state = {
-            delHover: false,
-            editHover: false,
-            checkBox:false,
-            bgColor:false,
-        };
-        this.isConfirmClick = false;
-        this.timer = null;
-        this.handleTitleClick = this.handleTitleClick.bind(this)
-    }
-
-    getArrow() {
-        return this.state.isOpen ? arrow_down_icon : arrow_icon;
-    }
-
-    handleContentClick(e,sex) {
-        e.stopPropagation();
-        this.props.handleContentClick(this.props.id,sex);
-    }
-
-    handleCheckboxClick(e,id){          //点击复选框
-        e.stopPropagation();
-        let tempCheck = this.state.checkBox;
-        this.setState({
-            checkBox:!tempCheck
-        })
-        store.dispatch(checkItems(id))
-    }
-
-    getCheckIcon() {
-        let tempCheckItems = this.props.checkItems;
-        if(tempCheckItems.indexOf(this.props.id) != -1){
-            return [check_right,'title-wrapper-bg']
-        }else{
-            return [check_circle,'']
-        }
-    }
-    getBgcColor() {
-        let tempCheckItems = this.props.checkItems;
-        if(tempCheckItems.indexOf(this.props.id) != -1){
-            return 'title-wrapper-bg'
-        }else{
-            return ''
-        }
-    }
-    getDelIcon() {
-        return this.state.delHover ? del_hover_icon : del_icon;
-    }
-
-    handleDelIconMouseEnter() {
-        this.setState({
-            delHover: true
-        });
-    }
-
-    handleDelIconMouseLeave() {
-        this.setState({
-            delHover: false
-        });
-    }
-
-    handleTemplateDel(e) {
-        e.stopPropagation();
-        this.props.handleTemplateDel(this.props.id);
-    }
-
-    getEditIcon() {
-        return this.state.editHover ? editing_icon : edit_icon;
-    }
-
-    handleEditIconMouseEnter() {
-        this.setState({
-            editHover: true
-        });
-    }
-
-    handleEditIconMouseLeave() {
-        this.setState({
-            editHover: false
-        });
-    }
-
-    handleEditIconClick(e,name) {
-        e.stopPropagation();
-        let currId = this.props.id
-        this.props.handleTitleChange(currId,name);
-    }
-
-    handleTitleClick(e) {
-      if(e.target.tagName == 'I'){
-        let tmpDomLis = $(e.target).parent().parent().siblings()
-        $(e.target).parent().next().slideToggle()
-        if($(e.target).parent().next().height() == 0){
-          $(e.target).next().attr('src',arrow_down_icon)
-        }else{
-          $(e.target).next().attr('src',arrow_icon)
-        }
-        for(let i = 0;i < tmpDomLis.length;i++){
-          let tmpDiv = tmpDomLis[i]
-          $(tmpDiv).children().eq(1).slideUp()
-          $(tmpDiv).children().eq(0).children('img').eq(0).attr('src',arrow_icon)
-        }
-      }else if($(e.target).attr('src')){
-        let tmpDomLis = $(e.target).parent().parent().siblings()
-        $(e.target).parent().next().slideToggle()
-        if($(e.target).parent().next().height() == 0){
-          $(e.target).attr('src',arrow_down_icon)
-        }else{
-          $(e.target).attr('src',arrow_icon)
-        }
-        for(let i = 0;i < tmpDomLis.length;i++){
-          let tmpDiv = tmpDomLis[i]
-          $(tmpDiv).children().eq(1).slideUp()
-          $(tmpDiv).children().eq(0).children('img').eq(0).attr('src',arrow_icon)
-        }
-      }else{
-        let tmpDomLis = $(e.target).parent().siblings()
-        $(e.target).next().slideToggle()
-        if($(e.target).next().height() == 0){
-          $(e.target).children('img').eq(0).attr('src',arrow_down_icon)
-        }else{
-          $(e.target).children('img').eq(0).attr('src',arrow_icon)
-        }
-        for(let i = 0;i < tmpDomLis.length;i++){
-          let tmpDiv = tmpDomLis[i]
-          $(tmpDiv).children().eq(1).slideUp()
-          $(tmpDiv).children().eq(0).children('img').eq(0).attr('src',arrow_icon)
-        }
+  constructor() {
+    super();
+    this.content = null;
+    this.state = {
+      delHover: false,
+      editHover: false,
+      checkBox: false,
+      bgColor: false,
+    };
+    this.isConfirmClick = false;
+    this.handleTitleClick = this.handleTitleClick.bind(this)
+  }
+
+  getArrow() {
+    return this.state.isOpen ? arrow_down_icon : arrow_icon;
+  }
+
+  handleContentClick(e, sex) {
+    e.stopPropagation();
+    this.props.handleContentClick(this.props.id, sex);
+  }
+
+  handleCheckboxClick(e, id) {          //点击复选框
+    e.stopPropagation();
+    let tempCheck = this.state.checkBox;
+    this.setState({
+      checkBox: !tempCheck
+    })
+    store.dispatch(checkItems(id))
+  }
+
+  getCheckIcon() {
+    let tempCheckItems = this.props.checkItems;
+    if (tempCheckItems.indexOf(this.props.id) != -1) {
+      return [check_right, 'title-wrapper-bg']
+    } else {
+      return [check_circle, '']
+    }
+  }
+  getBgcColor() {
+    let tempCheckItems = this.props.checkItems;
+    if (tempCheckItems.indexOf(this.props.id) != -1) {
+      return 'title-wrapper-bg'
+    } else {
+      return ''
+    }
+  }
+  getDelIcon() {
+    return this.state.delHover ? del_hover_icon : del_icon;
+  }
+
+  handleDelIconMouseEnter() {
+    this.setState({
+      delHover: true
+    });
+  }
+
+  handleDelIconMouseLeave() {
+    this.setState({
+      delHover: false
+    });
+  }
+
+  handleTemplateDel(e) {
+    e.stopPropagation();
+    this.props.handleTemplateDel(this.props.id);
+  }
+
+  getEditIcon() {
+    return this.state.editHover ? editing_icon : edit_icon;
+  }
+
+  handleEditIconMouseEnter() {
+    this.setState({
+      editHover: true
+    });
+  }
+
+  handleEditIconMouseLeave() {
+    this.setState({
+      editHover: false
+    });
+  }
+
+  handleEditIconClick(e, name) {
+    e.stopPropagation();
+    let currId = this.props.id
+    this.props.handleTitleChange(currId, name);
+  }
+
+  handleTitleClick(e) {
+    if (e.target.tagName == 'I') {
+      let tmpDomLis = $(e.target).parent().parent().siblings()
+      $(e.target).parent().next().slideToggle()
+      if ($(e.target).parent().next().height() == 0) {
+        $(e.target).next().attr('src', arrow_down_icon)
+      } else {
+        $(e.target).next().attr('src', arrow_icon)
+      }
+      for (let i = 0; i < tmpDomLis.length; i++) {
+        let tmpDiv = tmpDomLis[i]
+        $(tmpDiv).children().eq(1).slideUp()
+        $(tmpDiv).children().eq(0).children('img').eq(0).attr('src', arrow_icon)
+      }
+    } else if ($(e.target).attr('src')) {
+      let tmpDomLis = $(e.target).parent().parent().siblings()
+      $(e.target).parent().next().slideToggle()
+      if ($(e.target).parent().next().height() == 0) {
+        $(e.target).attr('src', arrow_down_icon)
+      } else {
+        $(e.target).attr('src', arrow_icon)
+      }
+      for (let i = 0; i < tmpDomLis.length; i++) {
+        let tmpDiv = tmpDomLis[i]
+        $(tmpDiv).children().eq(1).slideUp()
+        $(tmpDiv).children().eq(0).children('img').eq(0).attr('src', arrow_icon)
+      }
+    } else {
+      let tmpDomLis = $(e.target).parent().siblings()
+      $(e.target).next().slideToggle()
+      if ($(e.target).next().height() == 0) {
+        $(e.target).children('img').eq(0).attr('src', arrow_down_icon)
+      } else {
+        $(e.target).children('img').eq(0).attr('src', arrow_icon)
+      }
+      for (let i = 0; i < tmpDomLis.length; i++) {
+        let tmpDiv = tmpDomLis[i]
+        $(tmpDiv).children().eq(1).slideUp()
+        $(tmpDiv).children().eq(0).children('img').eq(0).attr('src', arrow_icon)
       }
     }
-
-    render() {
-        const { allCheckShow,id,name,preview,sex } = this.props;
-        let previewJson = JSON.parse(preview);
-        let sexStr = sex==2?' (女)':sex==1?' (男)':' (通用)';
-        return (
-            <div className={style.wrapper}>
-                <div className={ 
-                    allCheckShow?
-                    `${style["title-wrapper"]} ${style["clearfix"]} ${style[this.getCheckIcon()[1]]}`:
-                    `${style["title-wrapper"]} ${style["clearfix"]}`}
-                    onClick={this.handleTitleClick}
-                >
-                    {
-                        allCheckShow?<div className={style['check-wrap']} onClick={(e)=>{this.handleCheckboxClick(e,id)}}>
-                            <img className={`${style['fl-element']} ${style['check-box']}`} 
-                            src={this.getCheckIcon()[0]}
-                        /></div>:null
-                    }
-                    <i
-                        className={style['title']}
-                        title={name+sexStr}
-                    >
-                        {name+sexStr}
-                    </i>
-                    <img className={style.arrow} src={arrow_icon} />
-                    <img title={'删除模板'} 
-                        className={style.del}
-                        style={{display:allCheckShow?'none':'block'}}
-                        src={this.getDelIcon()} 
-                        onMouseEnter={() => this.handleDelIconMouseEnter()}
-                        onMouseLeave={() => this.handleDelIconMouseLeave()}
-                        onClick={(e) => this.handleTemplateDel(e)} 
-                    />
-                    <span className={style.quote} onClick={(e) => this.handleContentClick(e,sex)}>引用</span>
-                    <img title={'修改模板标题'}
-                        className={style.edit}
-                        src={this.getEditIcon()}
-                        onMouseEnter={() => this.handleEditIconMouseEnter()}
-                        onMouseLeave={() => this.handleEditIconMouseLeave()}
-                        onClick={(e) => this.handleEditIconClick(e,name)}
-                    />
-                </div>
-                <div
-                    ref={(content) => this.content = content}
-                    className={style.content}
-                    title={this.title}
-                >
-                    {
-                        previewJson?<DesItem preview={previewJson}></DesItem>:<p>暂无数据</p>
-                    }
-                </div>
-            </div>
-        )
-    }
-
-    componentWillUnmount() {
-        clearTimeout(this.timer);
-    }
+  }
+
+  render() {
+    const { allCheckShow, id, name, preview, sex } = this.props;
+    let previewJson = JSON.parse(preview);
+    let sexStr = sex == 2 ? ' (女)' : sex == 1 ? ' (男)' : ' (通用)';
+    return (
+      <div className={style.wrapper}>
+        <div className={
+          allCheckShow ?
+            `${style["title-wrapper"]} ${style["clearfix"]} ${style[this.getCheckIcon()[1]]}` :
+            `${style["title-wrapper"]} ${style["clearfix"]}`}
+          onClick={this.handleTitleClick}
+        >
+          {
+            allCheckShow ? <div className={style['check-wrap']} onClick={(e) => { this.handleCheckboxClick(e, id) }}>
+              <img className={`${style['fl-element']} ${style['check-box']}`}
+                src={this.getCheckIcon()[0]}
+              /></div> : null
+          }
+          <i
+            className={style['title']}
+            title={name + sexStr}
+          >
+            {name + sexStr}
+          </i>
+          <img className={style.arrow} src={arrow_icon} />
+          <img title={'删除模板'}
+            className={style.del}
+            style={{ display: allCheckShow ? 'none' : 'block' }}
+            src={this.getDelIcon()}
+            onMouseEnter={() => this.handleDelIconMouseEnter()}
+            onMouseLeave={() => this.handleDelIconMouseLeave()}
+            onClick={(e) => this.handleTemplateDel(e)}
+          />
+          <span className={style.quote} onClick={(e) => this.handleContentClick(e, sex)}>引用</span>
+          <img title={'修改模板标题'}
+            className={style.edit}
+            src={this.getEditIcon()}
+            onMouseEnter={() => this.handleEditIconMouseEnter()}
+            onMouseLeave={() => this.handleEditIconMouseLeave()}
+            onClick={(e) => this.handleEditIconClick(e, name)}
+          />
+        </div>
+        <div
+          ref={(content) => this.content = content}
+          className={style.content}
+          title={this.title}
+        >
+          {
+            previewJson ? <DesItem preview={previewJson}></DesItem> : <p>暂无数据</p>
+          }
+        </div>
+      </div>
+    )
+  }
 }
 
 export default TemplateItem;
 TemplateItem.propTypes = {
-    id: PropTypes.string,
-    title: PropTypes.string,
-    content: PropTypes.arrayOf(PropTypes.string),
-    handleContentClick: PropTypes.func,
-    handleTemplateDel: PropTypes.func,
-    handleTitleChange: PropTypes.func
+  id: PropTypes.string,
+  title: PropTypes.string,
+  content: PropTypes.arrayOf(PropTypes.string),
+  handleContentClick: PropTypes.func,
+  handleTemplateDel: PropTypes.func,
+  handleTitleChange: PropTypes.func
 };

+ 105 - 0
src/components/TimeInterval/index.jsx

@@ -0,0 +1,105 @@
+import React from "react";
+import style from "./index.less";
+import { Calendar} from '@commonComp';
+import {getCalendarDate,getCurrentDate} from "@utils/tools";
+/**
+ * top  定位距离
+ * sure 是否显示确认按钮
+ * timesure 点击确认事件
+ * needTime 是否需要时分秒
+ * timeLis 已选时间,点开后显示上次选择事件
+ * handleChange 日期改变调用
+ */
+class TimeInterval extends React.Component {
+  constructor(props) {
+    super(props);
+    const date = new Date();
+    this.state={
+      startTime:getCurrentDate(false,'/')+' 00:00:00',
+      endTime:getCurrentDate(false,'/')+' 23:59:59',
+      show:false,
+      flg:0,
+      timeLisStart:{
+        year:  date.getFullYear(),
+        month:  date.getMonth() + 1,
+        day:  date.getDate(),
+        hour:'00',
+        minute:'00',
+        second:'00'
+      },
+      timeLisEnd:{
+        year:  date.getFullYear(),
+        month:  date.getMonth() + 1,
+        day:  date.getDate(),
+        hour:'23',
+        minute:'59',
+        second:'59'
+      }
+    }
+    this.handleShowTime = this.handleShowTime.bind(this)
+    this.timeSure = this.timeSure.bind(this)
+  }
+  handleChangeDate(date){
+    // console.log(date,'外')
+  }
+  timeSure(date){
+    const {getStartTime,getEndTime} = this.props;
+    if(this.state.flg == 1){
+      this.setState({
+        show:false,
+        startTime:getCalendarDate(date,true,'/'),//页面显示的时间
+        timeLisStart:date//事件组件的日期
+      })
+      getStartTime(getCalendarDate(date,true,'/'))
+    }else if(this.state.flg == 2){
+      this.setState({
+        show:false,
+        endTime:getCalendarDate(date,true,'/'),
+        timeLisEnd:date
+      })
+      getEndTime(getCalendarDate(date,true,'/'))
+    }
+  }
+  handleShowTime(flg){
+    if(this.state.show){
+      this.setState({show:false},()=>{
+        this.setState({
+          show:true,
+          flg:flg
+        })
+      })
+    }else{
+      this.setState({
+        show:true,
+        flg:flg
+      })
+    }
+  }
+  render() {
+    const {startTime,endTime,show,timeLisStart,timeLisEnd,flg} = this.state
+    const {handleShowTime,timeSure,handleChangeDate} = this
+    return <div className={style.timeWrap}>
+          <div className={style.timeIpts}>
+            <input 
+              value={startTime} 
+              readOnly 
+              className={style.ipt} 
+              onClick={()=>handleShowTime(1)} 
+              type="text" 
+              placeholder="起始时间"/>~
+            <input 
+              value={endTime}
+              readOnly
+              className={style.ipt}
+               onClick={()=>handleShowTime(2)}
+               type="text"
+               placeholder="终止时间"/>
+          </div>
+          {
+            show?<Calendar timeLis={flg==2?timeLisEnd:timeLisStart} top={40} sure={true} timeSure={timeSure} needTime={true} isShow={true} handleChange={handleChangeDate}></Calendar>:null
+          }
+    </div>
+  }
+}
+
+export default TimeInterval;

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

@@ -0,0 +1,13 @@
+.timeWrap {
+  display: inline-block;
+}
+.timeIpts{
+  height: 26px;
+  line-height: 26px;
+  display: inline-block;
+  background-color: #fff;
+}
+input.ipt {
+  width: 126px;
+  text-align: center;
+}

+ 105 - 0
src/components/WrapModalBody/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} = this.props
+    return <div className={style['items']}>
+      <ul>
+        <li className={`${style.code} ${style.pubLi}`}>
+          <span>门诊号 : </span>
+          <input type="text" value={this.state.code}
+            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}
+            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}
+            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}
+            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;

+ 16 - 0
src/components/WrapModalBody/WrapModalTable/index.jsx

@@ -0,0 +1,16 @@
+import React from "react";
+import style from "../index.less";
+
+class WrapModalTable extends React.Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { list,message } = this.props;
+    return <div className={style['modalTable']}>
+      table
+    </div>
+  }
+}
+
+export default WrapModalTable;

+ 17 - 0
src/components/WrapModalBody/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} = this.props
+    return <div className={style['modalTop']}>
+      <Item handleSearch={handleSearch}></Item>
+    </div>
+  }
+}
+
+export default WrapModalTitle;

+ 24 - 0
src/components/WrapModalBody/index.jsx

@@ -0,0 +1,24 @@
+import React from "react";
+import style from "./index.less";
+import WrapModalTitle from "./WrapModalTitle";
+import WrapModalTable from "./WrapModalTable";
+
+class WrapModalBody extends React.Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { handleSearch } = this.props;
+    return <div className={style['container']}>
+      <div className={`${style.left}`}>
+        <WrapModalTitle handleSearch={handleSearch}></WrapModalTitle>
+        <WrapModalTable></WrapModalTable>
+      </div>
+      <div className={`${style.right}`}>
+        sdsd
+      </div>
+    </div>
+  }
+}
+
+export default WrapModalBody;

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

@@ -0,0 +1,93 @@
+@import "~@less/mixin.less";
+
+.container {
+  height: 100%;
+  background-color: @ipt-wrap-color;
+  position: relative;
+  .left {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 761px;
+    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;
+      }
+    }
+    .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;
+      }
+    }
+  }
+}

+ 72 - 52
src/containers/Inspect.js

@@ -1,61 +1,81 @@
 import React from 'react';
-import {connect} from 'react-redux';
+import {
+  connect
+} from 'react-redux';
 import Inspect from '@components/Inspect';
-import {getSearchList,getSublableList } from '@store/async-actions/inspect';
-import {setLabel,fillActived,fillActiveDetail,checkValueIsChange,delExcelLis,clearLabel,delPartItem} from '@store/actions/inspect';
-import {billing, getConceptDetail} from '@store/async-actions/pushMessage';
-function mapStateToProps(state) {//console.log(state)
-    return {
-        list:state.inspect.list,
-        labelList:state.inspect.labelList,
-        fillActive:state.inspect.fillActive,
-        getExcelDataList:state.inspect.getExcelDataList,
-        labelListActive:state.inspect.labelListActive,
-        inspectList:state.homePage.inspectList,
-        windowHeight:state.homePage.windowHeight,
-        inspectVal:state.inspect.inspectVal
-    }
+import {
+  getSearchList,
+  getSublableList
+} from '@store/async-actions/inspect';
+import {
+  setLabel,
+  fillActived,
+  fillActiveDetail,
+  checkValueIsChange,
+  delExcelLis,
+  clearLabel,
+  delPartItem
+} from '@store/actions/inspect';
+import {
+  billing,
+  getConceptDetail
+} from '@store/async-actions/pushMessage';
+
+function mapStateToProps(state) { //console.log(state)
+  return {
+    list: state.inspect.list,
+    labelList: state.inspect.labelList,
+    fillActive: state.inspect.fillActive,
+    getExcelDataList: state.inspect.getExcelDataList,
+    labelListActive: state.inspect.labelListActive,
+    inspectList: state.homePage.inspectList,
+    windowHeight: state.homePage.windowHeight,
+    inspectVal: state.inspect.inspectVal
+  }
 }
 
 function mapDispatchToProps(dispatch, store) {
-    return {
-        handleChangeValue(val){
-            dispatch(getSearchList(val))
-        },
-        getInfomation(item){
-            dispatch(getConceptDetail(item))
-        },
-        handleSign(id,idx,type){
-            dispatch(setLabel(idx,type))
-            dispatch(getSublableList(id))
-        },
-        handleLabelSub(e,id,idx){
-            dispatch(fillActived(id,idx))
-            // e.stopPropagation()
-        },
-        handleClear(e,idx){
-            e.stopPropagation();
-            dispatch(clearLabel(idx))
-        },
-        handleConfirm(e,idx,time,arr){
-            e.stopPropagation();
-            dispatch(checkValueIsChange(idx,time,arr))
-        },
-        changeActivePart(idx,value){
-            dispatch(fillActiveDetail(idx,value))
-        },
-        handleCloseExcel(idx){
-            dispatch(delExcelLis(idx));
-        },
-        delPartItem(idx){
-            dispatch(delPartItem(idx))
-        },
-        //右侧推送
-        fetchPushInfos(){
-          //调右侧推送
-          dispatch(billing());
-        }
+  return {
+    handleSearch(data) {
+      console.log(data)
+    },
+    handleChangeValue(val) {
+      dispatch(getSearchList(val))
+    },
+    getInfomation(item) {
+      dispatch(getConceptDetail(item))
+    },
+    handleSign(id, idx, type) {
+      dispatch(setLabel(idx, type))
+      dispatch(getSublableList(id))
+    },
+    handleLabelSub(e, id, idx) {
+      dispatch(fillActived(id, idx))
+      // e.stopPropagation()
+    },
+    handleClear(e, idx) {
+      e.stopPropagation();
+      dispatch(clearLabel(idx))
+    },
+    handleConfirm(e, idx, time, arr) {
+      e.stopPropagation();
+      dispatch(checkValueIsChange(idx, time, arr))
+    },
+    changeActivePart(idx, value) {
+      dispatch(fillActiveDetail(idx, value))
+    },
+    handleCloseExcel(idx) {
+      dispatch(delExcelLis(idx));
+    },
+    delPartItem(idx) {
+      dispatch(delPartItem(idx))
+    },
+    //右侧推送
+    fetchPushInfos() {
+      //调右侧推送
+      dispatch(billing());
     }
+  }
 }
 
 const InspectAction = connect(mapStateToProps, mapDispatchToProps)(Inspect);

+ 1 - 1
src/store/reducers/tabTemplate.js

@@ -70,7 +70,6 @@ export default (state = initDataList, action) => {
   if (action.type === CHANGE_TITLE) {
     const newState = Object.assign({}, state);
     let tempArr = newState.items;
-    console.log(action)
     for (let i = 0; i < tempArr.length; i++) {
       if (tempArr[i].id == action.obj.id) {
         tempArr[i].name = action.obj.title
@@ -90,6 +89,7 @@ export default (state = initDataList, action) => {
       tempArr.splice(tempArr.findIndex(item => item === action.id), 1)
       newState.checkItems = [...tempArr]
     }
+    console.log(newState.checkItems)
     return newState;
   }
   if (action.type === KEEP_PUSH_DATA) {

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

@@ -11,3 +11,5 @@ export const CLEAR_ALL_LABEL = 'CLEAR_ALL_LABEL';
 export const DEL_PART_ITEM = 'DEL_PART_ITEM';
 export const DEL_EXCEL_LIST = 'DEL_EXCEL_LIST';
 export const ADD_LABEL = 'ADD_LABEL';
+export const GET_IMPORT_LIST = 'GET_IMPORT_LIST';
+export const GET_IMPORT_LIST_SON = 'GET_IMPORT_LIST_SON';

+ 33 - 3
src/utils/tools.js

@@ -752,13 +752,25 @@ function timestampToTime(timestamp) {     //excel导入2019年5月1日会转换
   return Y+M+D+h+m+s;
 }
 
-
-function getCurrentDate(){
+/**
+ * 
+ * @param {需要年月日传个true,不需要不传或者false} flg 
+ */
+function getCurrentDate(flg,con){
+  let link = con?con:'-'
   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);
+  let date = '';           
+  if(flg){
+    var h = date.getHours();
+    var m = date.getMinutes();
+    var s = date.getSeconds();
+    date = year+link+mon.toString().padStart(2,'0')+link+day.toString().padStart(2,'0')+' '+h.toString().padStart(2,'0')+m.toString().padStart(2,'0')+s.toString().padStart(2,'0');
+  }else{
+    date = year+link+mon.toString().padStart(2,'0')+link+day.toString().padStart(2,'0');
+  }
   return date;
 }
 function inspectAndAssist(){
@@ -1038,6 +1050,23 @@ function getIds(data){
   })
   return ids;
 }
+/**
+ * 
+ * @param {日期相关} info 
+ * @param {时间是否包含时分秒} flg 
+ * @param {连接符} con 
+ */
+function getCalendarDate(info,flg,con) {
+  let date = '';
+  let time = flg?flg:false;
+  let conect = con?con:'-';
+  if(time){
+    date = info.year + conect + (info.month).toString().padStart(2,'0') + conect + (info.day).toString().padStart(2,'0') + ' '+(info.hour).toString().padStart(2,'0')+':'+(info.minute).toString().padStart(2,'0')+':'+(info.second).toString().padStart(2,'0');
+  }else{
+    date = info.year + conect + (info.month < 10 ? '0' + info.month : info.month) + conect + (info.day < 10 ? '0' + info.day : info.day);
+  }
+  return date;
+}
 module.exports = {
     checkType: Type.checkType,
     getIds,
@@ -1081,4 +1110,5 @@ module.exports = {
     ifOtherClear,
     readyKeepHistory,
     parseChartData,
+    getCalendarDate
 };