Browse Source

Merge branch 'byll6.0' into newVersion6.0

luolei 5 years ago
parent
commit
213ef254ff
80 changed files with 25136 additions and 286 deletions
  1. 55 27
      src/common/components/SearchOption/index.jsx
  2. 43 5
      src/common/components/SearchOption/index.less
  3. BIN
      src/common/components/SearchOptionSelect/imgs/clear.png
  4. BIN
      src/common/components/SearchOptionSelect/imgs/search.png
  5. 129 0
      src/common/components/SearchOptionSelect/index.jsx
  6. 49 0
      src/common/components/SearchOptionSelect/index.less
  7. 12 12
      src/components/AddAssistCheck/index.jsx
  8. 4 2
      src/components/AddAssistCheck/index.less
  9. 185 0
      src/components/AddInspect/SlidePic/index.jsx
  10. 258 0
      src/components/AddInspect/SlidePic/index.less
  11. 0 20
      src/components/AddInspect/SlideSelect/index.jsx
  12. 37 79
      src/components/AddInspect/index.jsx
  13. 8 0
      src/components/AddInspect/index.less
  14. 75 0
      src/components/AddInspectCopy/InspectName/index.jsx
  15. 256 0
      src/components/AddInspectCopy/InspectName/index.less
  16. 99 0
      src/components/AddInspectCopy/SlideExcel/index.jsx
  17. 199 0
      src/components/AddInspectCopy/SlideExcel/index.less
  18. 275 0
      src/components/AddInspectCopy/SlideSelect/index.jsx
  19. 234 0
      src/components/AddInspectCopy/SlideSelect/index.less
  20. BIN
      src/components/AddInspectCopy/img/close.png
  21. BIN
      src/components/AddInspectCopy/img/date1.png
  22. BIN
      src/components/AddInspectCopy/img/date2.png
  23. BIN
      src/components/AddInspectCopy/img/info2.png
  24. BIN
      src/components/AddInspectCopy/img/info3.png
  25. 439 0
      src/components/AddInspectCopy/index.jsx
  26. 252 0
      src/components/AddInspectCopy/index.less
  27. 75 0
      src/components/AddNewInspect/InspectName/index.jsx
  28. 256 0
      src/components/AddNewInspect/InspectName/index.less
  29. 99 0
      src/components/AddNewInspect/SlideExcel/index.jsx
  30. 199 0
      src/components/AddNewInspect/SlideExcel/index.less
  31. 185 0
      src/components/AddNewInspect/SlidePic/index.jsx
  32. 258 0
      src/components/AddNewInspect/SlidePic/index.less
  33. 255 0
      src/components/AddNewInspect/SlideSelect/index.jsx
  34. 234 0
      src/components/AddNewInspect/SlideSelect/index.less
  35. BIN
      src/components/AddNewInspect/img/close.png
  36. BIN
      src/components/AddNewInspect/img/date1.png
  37. BIN
      src/components/AddNewInspect/img/date2.png
  38. BIN
      src/components/AddNewInspect/img/info2.png
  39. BIN
      src/components/AddNewInspect/img/info3.png
  40. 397 0
      src/components/AddNewInspect/index.jsx
  41. 260 0
      src/components/AddNewInspect/index.less
  42. 3 1
      src/components/BlockEmrCont/index.jsx
  43. 1 1
      src/components/BlockEmrCont/index.less
  44. 3 3
      src/components/DiagResultSearch/index.jsx
  45. 12 10
      src/components/DiagnosticItem/index.jsx
  46. 4 4
      src/components/DiagnosticList/index.jsx
  47. 1 1
      src/components/DiagnosticList/index.less
  48. 5 1
      src/components/Inspect/index.jsx
  49. BIN
      src/components/NewAdvice/dists/FileAPI.flash.camera.swf
  50. BIN
      src/components/NewAdvice/dists/FileAPI.flash.image.swf
  51. BIN
      src/components/NewAdvice/dists/FileAPI.flash.swf
  52. 3608 0
      src/components/NewAdvice/dists/FileAPI.html5.js
  53. 2 0
      src/components/NewAdvice/dists/FileAPI.html5.min.js
  54. 4418 0
      src/components/NewAdvice/dists/FileAPI.js
  55. 2 0
      src/components/NewAdvice/dists/FileAPI.min.js
  56. 11008 0
      src/components/NewAdvice/dists/jQuery.js
  57. 4 0
      src/components/NewAdvice/dists/jq.js
  58. 2 0
      src/components/NewAdvice/dists/jquery.fileapi.min.js
  59. 357 0
      src/components/NewAdvice/index.jsx
  60. 112 0
      src/components/NewAdvice/index.less
  61. 2 2
      src/containers/AssistCheck.js
  62. 20 7
      src/containers/Inspect.js
  63. 116 0
      src/containers/NewAdvice.js
  64. 3 4
      src/store/actions/assistCheck.js
  65. 0 3
      src/store/actions/diagnosticSearch.js
  66. 12 3
      src/store/actions/inspect.js
  67. 79 0
      src/store/actions/newAdvice.js
  68. 14 6
      src/store/async-actions/assistCheck.js
  69. 19 13
      src/store/async-actions/diagnosticSearch.js
  70. 23 8
      src/store/async-actions/inspect.js
  71. 64 0
      src/store/async-actions/newAdvice.js
  72. 2 0
      src/store/index.js
  73. 10 21
      src/store/reducers/assistCheck.js
  74. 1 25
      src/store/reducers/diagnosticList.js
  75. 57 25
      src/store/reducers/inspect.js
  76. 288 0
      src/store/reducers/newAdvice.js
  77. 0 1
      src/store/reducers/tabTemplate.js
  78. 2 0
      src/store/types/inspect.js
  79. 17 0
      src/store/types/newAdvice.js
  80. 38 2
      src/utils/tools.js

+ 55 - 27
src/common/components/SearchOption/index.jsx

@@ -2,6 +2,7 @@ import React from 'react';
 import styles from './index.less';
 import clear from './imgs/clear.png';
 import search from './imgs/search.png';
+import slide from '../../images/show.png';
 import PropTypes from "prop-types";
 import config from '@config/index';
 import $ from 'jquery';
@@ -17,37 +18,37 @@ class SearchOption extends React.Component {
             val:'',
             border:'',
             show:false,
-            timer:null
+            timer:null,
+            showInsp:false,
+            txt:''
         }
         this.textInput = React.createRef();
         this.handleClearVal = this.handleClearVal.bind(this);
         this.handleFocus = this.handleFocus.bind(this);
         this.handleBlur = this.handleBlur.bind(this);
+        this.setShowInsp = this.setShowInsp.bind(this);
+        this.detailClick = this.detailClick.bind(this);
     }
-    
-    /*componentWillReceiveProps(nextProps){
-        if(nextProps.visible != this.props.visible) {
-            if(!nextProps.visible) {
-                this.props.handleChangeValue('');
-                this.textInput.current.value = '';
-                this.setState({show:false})
-            }
-            setTimeout(() => {
-                this.textInput.current.focus();
-            }, 0);
-        }
-    }*/
     componentDidMount(){
       this.props.handleChangeValue('');
       this.textInput.current.focus();
-      const {windowHeight,pageTop,height,refreshScroller} = this.props;
-
+      const {windowHeight,pageTop,height,refreshScroller,searchType} = this.props;
+      if(searchType==1){
+          this.setState({txt:'细项'})
+      }else if(searchType==2){
+        this.setState({txt:'药物'})
+      }
       refreshScroller()&&refreshScroller().refresh();    //点开搜索弹窗更新滚动条,
       if(windowHeight - pageTop < height){
         //$("#searchOption")[0].scrollIntoView(false);
         refreshScroller()&&refreshScroller().scrollBottom();
       }
     }
+    setShowInsp(){
+        this.setState({
+            showInsp:!this.state.showInsp
+        })
+    }
     handleClearVal(){
         const { handleChangeValue } = this.props;
         this.textInput.current.value = '';
@@ -58,6 +59,23 @@ class SearchOption extends React.Component {
         });
         handleChangeValue('');
     }
+    detailClick(val,txt){
+        const { detailClick,handleChangeValue } = this.props;
+        detailClick(val)
+        this.setState({txt:txt})
+        let value = this.textInput.current.value||''
+
+        if(value.trim() == ''){
+            this.setState({
+                show:false
+            })
+            return  handleChangeValue('');
+        }
+        this.setState({
+            show:true
+        })
+        handleChangeValue(value)
+    }
     handleInput(e){
       const { handleChangeValue } = this.props;
         clearTimeout(this.state.timer);
@@ -80,6 +98,7 @@ class SearchOption extends React.Component {
         });
     }
     handleFocus(){
+      this.setState({showInsp:false})
       if(this.state.val.trim() != ''){
         return;
       }else{
@@ -91,18 +110,26 @@ class SearchOption extends React.Component {
     }
     render() {
         const { children,visible,searchType } = this.props;
-        const { show } = this.state;
-        console.log(searchType)
+        const { show,showInsp,txt } = this.state;
         return (
-            searchType == 1?
-            <div id="searchOption" className={visible?`${styles.search} ${styles.show} searchOption`:`${styles.search} ${styles.hide} searchOption`}>
+            searchType == 1||searchType == 2?
+            <div id="searchOption" className={visible?`${styles.search} ${styles.searchSpecial} ${styles.show} searchOption`:`${styles.search} ${styles.searchSpecial} ${styles.hide} searchOption`}>
+                <img className={`${styles.searchVal} ${styles.seleImg}`} src={slide} alt="选择" onClick={this.setShowInsp} />
+                <img className={`${styles.searchVal} ${styles.searchInsp}`} src={search} alt="搜索" />
                 <img style={{display:show?'block':'none'}} className={styles.clearVal} src={clear} onClick={this.handleClearVal} alt="清空" />
-                <div className={styles.selectLis}>
-                    <span>细项</span>
-                    <ul>
-                        <li>细项</li>
-                        <li>套餐</li>
-                    </ul>
+                <div className={styles.selectLis} onClick={this.setShowInsp}>
+                    <span id="shTxt">{txt}</span>
+                    {
+                        searchType == 1?
+                        <ul className={styles.lisul} style={{'display':showInsp?'block':'none'}}>
+                            <li onClick={()=>{this.detailClick(2,'细项')}}>细项</li>
+                            <li onClick={()=>{this.detailClick(1,'套餐')}}>套餐</li>
+                        </ul>:
+                        <ul className={styles.lisul} style={{'display':showInsp?'block':'none'}}>
+                            <li onClick={()=>{this.detailClick(5,'药物')}}>药物</li>
+                            <li onClick={()=>{this.detailClick(6,'手术及操作')}}>手术及操作</li>
+                        </ul>
+                    }
                 </div>
                 <input
                     className={this.state.border ?`${styles.border}`:`${styles.borderNone}`}
@@ -111,7 +138,7 @@ class SearchOption extends React.Component {
                     ref={this.textInput}
                     onFocus={this.handleFocus}
                     onBlur={this.handleBlur}
-                    onInput={(e) => { 
+                    onInput={(e) => {
                         this.handleInput(e)
                     }}
                     onPropertyChange={(e) => {  // 兼容ie
@@ -119,6 +146,7 @@ class SearchOption extends React.Component {
                     }}
                     placeholder="搜索"
                 />
+                <div style={{'clear':'both'}}></div>
                 <div className={styles.autoList}>
                     {children}
                 </div>

+ 43 - 5
src/common/components/SearchOption/index.less

@@ -2,7 +2,8 @@
 
 .search {
     .contentZIndex1;
-    width: 316px;
+    width: 375px;
+    min-height: 160px;
     padding: 8px;
     box-sizing: border-box;
     position: absolute;
@@ -22,6 +23,8 @@
         padding: 0 32px;
         box-sizing: border-box;
         border: 1px solid #979797;
+        float: right;
+        border-radius: 4px;
     }
     .border {
         border: 1px solid @blue;
@@ -40,13 +43,48 @@
         cursor: pointer;
         right: 18px;
     }
+}
 
+.searchSpecial {
+    min-height: 160px;
+    .seleImg {
+        left: 82px;
+        cursor: pointer;
+    }
+    .searchInsp {
+        left: 124px;
+    }
+    input {
+        width: 250px;
+    }
     .selectLis {
+        line-height: 34px;
+        width: 100px;
+        float: left;
+        background-color: #E2F1F8;
+        cursor: pointer;
+        padding :0 15px 0 10px;
+        border-radius: 4px;
+        span {
+            color: #3B9ED0;
+        }
+    }
+    .lisul {
+        border: 1px solid #B1D8EC;
+        border-radius: 4px;
+        background-color: #fff;
+        width: 100px;
         position: absolute;
-        left: 0;
-        top:0;
-        ul {
-            display: none;
+        left: 8px;
+        top: 42px;
+        display: none;
+        z-index: 100;
+        li {
+            padding: 0 10px;
+            color: #1E1E1E;
+        }
+        li:hover {
+            background-color: #E2F1F8;
         }
     }
 }

BIN
src/common/components/SearchOptionSelect/imgs/clear.png


BIN
src/common/components/SearchOptionSelect/imgs/search.png


+ 129 - 0
src/common/components/SearchOptionSelect/index.jsx

@@ -0,0 +1,129 @@
+import React from 'react';
+import styles from './index.less';
+import clear from './imgs/clear.png';
+import search from './imgs/search.png';
+import PropTypes from "prop-types";
+import config from '@config/index';
+import $ from 'jquery';
+/**
+ * 前提条件父元素有定位
+ * visible  搜索显示隐藏
+ * handleChangeValue  函数参数为输入框的value值
+ */
+class SearchOption extends React.Component {
+    constructor(props) {
+        super(props);
+        this.state = {
+            val:'',
+            border:'',
+            show:false,
+            timer:null
+        }
+        this.textInput = React.createRef();
+        this.handleClearVal = this.handleClearVal.bind(this);
+        this.handleFocus = this.handleFocus.bind(this);
+        this.handleBlur = this.handleBlur.bind(this);
+    }
+    
+    /*componentWillReceiveProps(nextProps){
+        if(nextProps.visible != this.props.visible) {
+            if(!nextProps.visible) {
+                this.props.handleChangeValue('');
+                this.textInput.current.value = '';
+                this.setState({show:false})
+            }
+            setTimeout(() => {
+                this.textInput.current.focus();
+            }, 0);
+        }
+    }*/
+    componentDidMount(){
+      this.props.handleChangeValue('');
+      this.textInput.current.focus();
+      const {windowHeight,pageTop,height,refreshScroller} = this.props;
+
+      refreshScroller()&&refreshScroller().refresh();    //点开搜索弹窗更新滚动条,
+      if(windowHeight - pageTop < height){
+        //$("#searchOption")[0].scrollIntoView(false);
+        refreshScroller()&&refreshScroller().scrollBottom();
+      }
+    }
+    handleClearVal(){
+        const { handleChangeValue } = this.props;
+        this.textInput.current.value = '';
+        this.textInput.current.focus();
+        this.setState({
+            val:'',
+            show:false
+        });
+        handleChangeValue('');
+    }
+    handleInput(e){
+      const { handleChangeValue } = this.props;
+        clearTimeout(this.state.timer);
+        let timer = setTimeout(()=>{
+            clearTimeout(this.state.timer);
+            if(e.target.value.trim() == ''){
+                this.setState({
+                    show:false
+                })
+                return  handleChangeValue('');
+            }
+            this.setState({
+                val:e.target.value,
+                show:true
+            })
+            handleChangeValue(e.target.value);
+        },config.delayTime);
+        this.setState({
+            timer
+        });
+    }
+    handleFocus(){
+      if(this.state.val.trim() != ''){
+        return;
+      }else{
+          this.setState({border:true})
+      }
+    }
+    handleBlur(){
+      this.setState({border:false,val:''})
+    }
+    render() {
+        const { children,visible } = this.props;
+        const { show } = this.state;
+        return (
+            <div id="searchOption" className={visible?`${styles.search} ${styles.show} searchOption`:`${styles.search} ${styles.hide} searchOption`}>
+                <img className={styles.searchVal} src={search} alt="搜索" />
+                <img style={{display:show?'block':'none'}} className={styles.clearVal} src={clear} onClick={this.handleClearVal} alt="清空" />
+                <input
+                    className={this.state.border ?`${styles.border}`:`${styles.borderNone}`}
+                    type="text"
+                    maxLength="30"
+                    ref={this.textInput}
+                    onFocus={this.handleFocus}
+                    onBlur={this.handleBlur}
+                    onInput={(e) => { 
+                        this.handleInput(e)
+                    }}
+                    onPropertyChange={(e) => {  // 兼容ie
+                        this.handleInput(e)
+                    }}
+                    placeholder="搜索"
+                />
+                <div className={styles.autoList}>
+                    {children}
+                </div>
+            </div>
+        )
+    }
+}
+SearchOption.defaultProps = {
+    visible: false
+};
+
+SearchOption.propTypes = {
+    visible:PropTypes.bool,
+    handleChangeValue: PropTypes.func
+};
+export default SearchOption;

+ 49 - 0
src/common/components/SearchOptionSelect/index.less

@@ -0,0 +1,49 @@
+@import "~@less/variables.less";
+
+.search {
+    .contentZIndex1;
+    width: 316px;
+    padding: 8px;
+    box-sizing: border-box;
+    position: absolute;
+    top: 30px;
+    background-color: #fff;
+    // margin-bottom: 80px;
+    .llStyle;
+    .autoList {
+        // max-height: 225px;
+        // min-height: 80px;
+        // overflow-y: auto;
+    }
+    input {
+        width: 100%;
+        height: 34px;
+        line-height: 34px;
+        padding: 0 32px;
+        box-sizing: border-box;
+        border: 1px solid #979797;
+    }
+    .border {
+        border: 1px solid @blue;
+    }
+    .borderNone {
+        border: 1px solid #979797;
+    }
+    img {
+        position: absolute;
+        top: 15px;
+    }
+    .searchVal {
+        left: 18px;
+    }
+    .clearVal{
+        cursor: pointer;
+        right: 18px;
+    }
+}
+.show {
+    display:block;
+}
+.hide {
+    display: none;
+}

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

@@ -133,24 +133,24 @@ class AddAssistCheck extends React.Component {
     return <ScrollArea speed={0.8}
                        horizontal={false}
                        stopScrollPropagation={list.length>6?true:false}
-                       style={{height:'225px'}}
+                       style={{height:'225px',width:'356px'}}
                        className={styles["area"]}
                        verticalContainerStyle={contStyle}
                        verticalScrollbarStyle={barStyle}
                        contentClassName="content">
-      <ul className={styles.searchLiUl}>
+      <ul className={`${styles.searchLiUl} ${styles.assistListUl}`}>
       {
         list && list.map((item, idx) => {
           return <li key={item.id}
             className={styles.searchLi}
-            title={(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
+            title={item.name}
             onClick={() => {
               this.props.setHighter(48)
-              handleSign(item.conceptId,idx,'search');
+              handleSign(item,'search');
               this.setState({ show: false })
             }}
           >
-            {item.name}{(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
+            {item.name}
           </li>
         })
       }
@@ -270,13 +270,13 @@ class AddAssistCheck extends React.Component {
                 </ScrollArea>
               </div>
               <div className={`${styles.pointerFinger} ${setFontColorSize(2,2)}`}>
-                <p onClick={() => this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
-                <i onClick={() => this.handleShowDate(idx)}></i>
+                <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
+                {/* <i onClick={() => this.handleShowDate(idx)}></i> */}
                 {/*<a href="javascript:void(0);" onClick={() => { this.handleDelClick(idx,item) }}><img src={close} alt="" /></a>*/}
                 <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span>
-                {
+                {/* {
                   this.state.date && idx == this.state.active ?<Calendar timeLis={staticTime} isShow={true} timeSure={(date)=>this.timeSure(date,idx)} needTime={true} sure={true} handleChange={(info) => { this.handleChangeDate(info, idx) }} top={30}></Calendar>:null
-                }
+                } */}
               </div>
               <DelToast show={idx==id&&item.name==activeName?visible:false}
                   name={activeName}
@@ -313,8 +313,8 @@ class AddAssistCheck extends React.Component {
         <div id="searchWrapAssist" style={{ position: "relative", clear: 'both' }}>
           <Add showText="添加辅检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck" />
           {this.state.show ? <SearchOption windowHeight={windowHeight} refreshScroller={refreshScroller }  pageTop={pageTop} height={280} handleChangeValue={handleChangeValue} visible={true}>
-            {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
-            {
+            {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'42px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
+            {/* {
               (list && list.length>0) || (assistVal != '') || (assistList&&assistList.length==0)?'':<div>
                 <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用辅检项</p>
                 {assistList.length>6?<ScrollArea speed={0.8}
@@ -330,7 +330,7 @@ class AddAssistCheck extends React.Component {
                 }
                 </ScrollArea>:this.getCommonList()}
               </div>
-            }
+            } */}
           </SearchOption> : ''}
         </div>
       </div>

+ 4 - 2
src/components/AddAssistCheck/index.less

@@ -9,7 +9,7 @@
 }
 
 .pointerFinger {
-  cursor: pointer;
+  cursor: default;
 }
 
 .searchLi {
@@ -31,7 +31,9 @@
   max-height: 225px;*/
   // min-height: 80px;
 }
-
+.assistListUl {
+  width: 356px;
+}
 .searchLi:hover {
   border: 1px solid @blue;
   box-sizing: border-box;

+ 185 - 0
src/components/AddInspect/SlidePic/index.jsx

@@ -0,0 +1,185 @@
+import React, { Component } from "react";
+import styles from "./index.less";
+import { normalVal,getArrow,timestampToTime,getDomUpDown,getPageCoordinate,setPosition,setFontColorSize } from '@utils/tools';
+import { InspectCommon, Notify,DelToast} from '@commonComp';
+import slideUp from "@common/images/slide-up.png";
+import slideDown from "@common/images/slide-down.png";
+import $ from 'jquery';
+import date1 from '../img/date1.png';
+import ScrollArea from 'react-scrollbar';
+import InspectName from '../InspectName';
+
+import up from '@images/up.png';
+import down from '@images/down.png';
+
+class SlideSelect extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show:false,
+      activeInd:false,
+      activeName:'',
+      canEdit:true,
+      style:'',
+    };
+    this.toTime = this.toTime.bind(this);
+    this.handleSlide = this.handleSlide.bind(this);
+    this.handleDel = this.handleDel.bind(this);
+    this.handleCancel = this.handleCancel.bind(this);
+    this.delConfirm = this.delConfirm.bind(this);
+    this.timeSure = this.timeSure.bind(this);
+    this.setEdit = this.setEdit.bind(this);
+    this.handleLabelSub = this.handleLabelSub.bind(this);
+    this.handleBlur = this.handleBlur.bind(this);
+  }
+  handleChangeDate(date) {
+    // console.log(date,'外')
+  }
+  
+  componentDidMount() {
+    const {item} = this.props;
+    $(document).click((event) => {
+      if($(event.target).attr("id")!='addClose'&&$(event.target).attr("id")!='delTit'){
+        this.setState({
+          activeInd:false
+        })
+      }
+    });
+    let type = getArrow(item.minValue,item.maxValue,item.value||null)
+    this.setState({style:type,value:item.value,time:item.time})
+    const that = this;
+    document.addEventListener('mousedown',function(e){
+      //onMousedown的目标为滚动条时,标签填写单不关闭
+      if(e.target.className=='scrollbar'){
+        that.isBar = true;
+      }else{
+        that.isBar = false;
+      }
+    });
+    // this.setState({ dateTime: getCurrentDate(1) })
+  }
+  toTime(time){
+    let tmpTim = time.split(',').join('')-0
+    if(time && tmpTim.toString() != 'NaN'){
+      let date = new Date('1900-01-01');
+      let dateTim = date.getTime();
+      let times = (tmpTim-2)*24*60*60*1000;
+      let result = timestampToTime(dateTim+times).split(' ')[0]
+      return result;
+    }else{
+      return time;
+    }
+  }
+  handleSlide(){
+    let tmpShow = this.state.show
+    this.setState({
+      show:!tmpShow
+    })
+  }
+  setEdit(){
+    this.setState({
+      canEdit:false
+    },()=>{
+      $("#canEdit").focus()
+      $("#canEdit").blur(()=>{
+        this.setState({canEdit:true})
+      })
+    })
+  }
+  handleDel(time){
+    const {handleDelClick,item} = this.props;
+    this.setState({
+      activeInd:true,
+      activeName:item.uniqueName,
+    })
+    handleDelClick&&handleDelClick(1,time);
+  }
+  handleCancel(){
+    this.setState({
+      activeInd:false,
+      activeName:''
+    })
+  }
+  delConfirm(item){
+    const {handleDelConfirm,handlePush} = this.props;
+    handleDelConfirm&&handleDelConfirm(item);
+    Notify.success("删除成功");
+    handlePush && handlePush({mode:8});       //右侧推送
+    this.setState({
+      activeInd:false,
+      activeName:''
+    })
+  }
+  timeSure(date){
+    const {handleChangeDate} = this.props;
+    handleChangeDate&&handleChangeDate(date)
+  }
+  handleLabelSub(e,questionId,idx){
+    const {handleLabelSub,handleFillShow,setHighter,refreshScroller} = this.props;
+    handleLabelSub(e,questionId,idx);
+    handleFillShow(e,idx);
+    //弹窗高度超出屏幕,增加页面高度
+    setPosition(e,"#inspectFill",setHighter);
+    /*setTimeout(function(){//如果化验下面有很多数据,则会跳过头
+      refreshScroller()&&refreshScroller().scrollYTo(290);
+    })*/
+  }
+  handleInput(e,item){
+    const {setTipValue} = this.props
+    setTipValue(item,e.target.value)
+    let type = getArrow(item.minValue,item.maxValue,e.target.value||null)
+    this.setState({
+      value:e.target.value,
+      style:type
+    })
+  }
+  handleBlur(){
+    const {handlePush} = this.props;
+    handlePush && handlePush({mode:8});       //右侧推送
+  }
+  render() {
+    const {item,idx,time} = this.props;
+    const {canEdit,activeInd,activeName,value,style} = this.state;
+    return (
+      item.flg == 1?<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}> 
+          <span className={styles.bigname}>{item.uniqueName}</span>
+          <span className={styles.smallname}></span>
+          <span className={styles.edit}></span>
+          <span className={styles.maxmin}></span>
+          <span className={styles.pass}>化验时间:{item.time}</span>
+          <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item.time)}}></span>
+          <DelToast show={time==item.time&&activeInd?true:false}
+                    name={activeName} 
+                    right={'-34px'}
+                    top={'30px'}
+                    cancel={this.handleCancel}
+                    confirm={()=>{this.delConfirm(item)}}/>
+      </li>:<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}> 
+          <span className={styles.bigname}>{item.name}</span>
+          <span className={styles.smallname}>{item.uniqueName}</span>
+          <span className={styles.edit}>
+            <input disabled={canEdit} type="text" 
+              id="canEdit" 
+              onDoubleClick={this.setEdit}
+              style={{color:style==2||style==4?'red':style==1?'#D949FF':'#333'}}
+              placeholder='(填写)'
+              autoComplete="off"
+              value={value}
+              onInput={(e)=>{this.handleInput(e,item)}}
+              onBlur={()=>{this.handleBlur()}}
+              /><img style={{display:style==1||style==2?'inline-block':'none'}} src={style==1?down:style==2?up:''} />{item.units}
+          </span>
+          <span className={styles.maxmin}>{normalVal(item.minValue,item.maxValue)}</span>
+          <span className={styles.pass}>化验时间:{item.time}</span>
+          <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item.time)}}></span>
+          <DelToast show={time==item.time&&activeInd?true:false}
+                    name={activeName}
+                    right={'-34px'}
+                    top={'30px'}
+                    cancel={this.handleCancel}
+                    confirm={()=>{this.delConfirm(item)}}/>
+      </li>
+    );
+  }
+}
+export default SlideSelect;

+ 258 - 0
src/components/AddInspect/SlidePic/index.less

@@ -0,0 +1,258 @@
+@import "~@less/variables.less";
+.slideLi {
+    // cursor: pointer;
+    // color: #767676;
+    position: relative;
+    padding: 10px 0px 10px 0;
+    border-bottom:1px dashed #989DA3;
+    margin-top: 5px;
+    span {
+        display: inline-block;
+        padding: 0 5px;
+        box-sizing: border-box;
+    }
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        // &:before {
+        //     content: '\300C';
+        // }
+        // &:after {
+        //     content: '\300D';
+        // }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 15px;
+        height: 15px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: -4px;
+        top: 0px;
+        background: @closeIcon;
+        background-color: #fff;
+        background-size: 100% 100%;
+    }
+    .bigname {
+        width: 20%;
+        font-weight: bold;
+    }
+    .smallname {
+        width: 25%;
+    }
+    .edit {
+        width: 15%;
+        input {
+            width: 40px;
+        }
+        i {
+            
+        }
+    }
+    .maxmin {
+        width: 15%;
+    }
+}
+.slideLi:hover{
+    background:#F2F2F2;
+    border-radius: 4px;
+       .partDel{
+        background: @closeHor;
+        background-color: #fff;
+        background-size: 100% 100%;
+      } 
+}
+.staticTagActive {
+    cursor: pointer;
+    color: #333;
+    // display: inline-block;
+    position: relative;
+    vertical-align: top;
+    padding: 2px 10px 10px 10px;
+    box-sizing: border-box;
+    width: 100%;
+    float: left;
+    span {
+        border-bottom: 1px solid #666666 ;
+    }
+}
+
+.staticTag {
+    cursor: pointer;
+    // color: #767676;
+    color: @blue;
+    padding-top: 10px;
+    display: inline-block;
+    position: relative;
+    /* &:before {
+        content: '\300C';
+    }
+    &:after {
+        content: '\300D';
+    } */
+}
+.table {
+    color: #000;
+    width: 100%;
+    tr {
+        line-height: 18px;
+        height: 18px;
+        width: 100%;
+        font-size: unset;
+        td {
+          cursor: default;
+          padding-top: 3px;
+          font-size: unset;
+          span {
+              font-size: unset;
+          }
+        }
+    }
+    tr > td {
+        padding: 0 10px;
+        box-sizing: border-box;
+    }
+}
+
+.searchResult {
+    .searchResultT {
+        img {
+            float: right;
+        }
+    }
+}
+
+.excelDataLists {
+    position: relative;
+    background-color: #f1f1f1;
+    border: 1px solid #ccc;
+    .close {
+        width: 13px;
+        height: 13px;
+        position: absolute;
+        top: -5px;
+        right: -5px;
+        z-index: 30;
+        background-color: #fff;
+        border-radius: 50%;
+    }
+    .excelDataLis {
+        padding: 2px 0px;
+        border-bottom: 1px dashed #989DA3;
+        .excelDataTitle {
+            display: inline-block;
+            width: 20%;
+            vertical-align: top;
+            padding-left: 10px;
+            float: left;
+        }
+        table {
+            width: 80%;
+            tr {
+                height: 16px;
+                line-height: 16px;
+                width: 100%;
+            }
+            td {
+                text-align: left;
+                padding-top: 6px;
+                cursor: default;
+            }
+            .excelUnit {
+                width: auto;
+                margin-left: 5px;
+            }
+        }
+    }
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #EDEDED;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
+  .num {
+    color: @blue;
+  }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo, .imgInfo1 {
+  width: 15px;
+  height: 17px;
+  border-bottom: 0 none !important;
+  background: url('../img/info2.png') no-repeat center center;
+  background-size: 100% auto; 
+  position: absolute;
+  top: -10px;
+  left: 50%;
+  margin-left: -8px;
+  display: none;
+  cursor: pointer;
+}
+.imgInfo1 {
+    top: -13px;
+  }
+  .imgInfo:hover, .imgInfo1:hover {
+    background: url('../img/info3.png') no-repeat center center;
+    background-size: 100% auto; 
+  }
+.tagSpan {
+  display: inline-block;
+  position: relative;
+}
+.tagSpanS {
+    font-weight: bold;
+    color: #000;
+}
+.selectTagSpan {
+  color: #000;
+  font-weight: bold;
+}
+.tagSpan:hover {
+    .imgInfo, .imgInfo1 {
+        display: block;
+      }
+}
+.iptValue {
+    width: 60px;
+    color: #3B9ED0;
+    font-size: 12px;
+}
+.iptValueBtn {
+    color: #3B9ED0;
+    width: 60px;
+    height: 22px;
+    line-height: 22px;
+    background-color: #EDF8FF;
+    text-align: center;
+    display: inline-block;
+    font-size: 12px;
+    border-radius: 4px;
+    border-bottom: 0 !important;
+    margin-left: 10px;
+}

+ 0 - 20
src/components/AddInspect/SlideSelect/index.jsx

@@ -132,26 +132,6 @@ class SlideSelect extends Component {
           setHighter={setHighter} 
           setTipValue={setTipValue}
           handleFillShow={handleFillShow}></InspectName>
-        {/* {
-            // 标签,血常规。。
-            item.show ?
-            <p className={styles.staticTagActive}>
-                <span className={`${styles.tagSpan} ${styles.selectTagSpan} ${setFontColorSize(2,6)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
-                  {item.name}
-                  <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
-                </span>
-                {
-                  item.inpValue?<input className={styles.iptValue} type="text"/>:<span className={styles.iptValueBtn}>点击备注</span>
-                }
-            </p>:
-            <p >
-                <i className={`${styles.tagSpan} ${styles.tagSpanS} ${setFontColorSize(2)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
-                  {item.name}
-                  <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
-                </i>
-            </p>
-        } */}
-
         {
           item.details && item.details.map((val)=>{
             if(val.value && val.value != ''){

+ 37 - 79
src/components/AddInspect/index.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { SearchOption, InspectCommon, Calendar, Notify, ConfirmModal, Add, DelToast } from '@commonComp';
 import SlideExcel from './SlideExcel';
-import SlideSelect from './SlideSelect';
+import SlidePic from './SlidePic';
 import { deepClone, getPageCoordinate, getStatusImg,getDomUpDown ,getCurrentDate,setPosition,getCalendarDate} from '@utils/tools';
 import styles from './index.less';
 import ScrollArea from 'react-scrollbar';
@@ -20,7 +20,7 @@ class Inspect extends React.Component {
       numPlus: 0,     //判断是否所有的填写单都是空
       num: 0,            //暂存数据,获取一次,不能每次都是新的数据
       type: null,
-      id: null,
+      time: null,
       pageTop: '',
       // tmpIds: [],      //内层外层
       impId: null
@@ -33,14 +33,14 @@ class Inspect extends React.Component {
     this.getCommonList = this.getCommonList.bind(this)
     this.changeActivePart = this.changeActivePart.bind(this)
     this.showDetails = this.showDetails.bind(this)
-    this.delConfirm = this.delConfirm.bind(this)
+    this.handleDelConfirm = this.handleDelConfirm.bind(this)
     this.handleCancel = this.handleCancel.bind(this)
     this.handleSearchShow = this.handleSearchShow.bind(this)
     this.changeShowFill = this.changeShowFill.bind(this)
     this.handleFillShow = this.handleFillShow.bind(this)
     this.handleDelClick = this.handleDelClick.bind(this)
   }
-  delConfirm() {//弹窗确定
+  handleDelConfirm() {//弹窗确定
     const { delPartItem, handleCloseExcel, handlePush } = this.props;
     const { type, id, impId } = this.state;
     if (type == 1) {
@@ -48,15 +48,10 @@ class Inspect extends React.Component {
     } else if (type == 2) {
       handleCloseExcel(impId)
     }
-    this.setState({
-      type: null,
-      id: null,
-      impId: null
-    })
     Notify.success("删除成功");
     handlePush && handlePush({mode:8});       //右侧推送
   }
-  handleDelClick(type, idx) {
+  handleDelClick(type, time) {
     if (type == 2) {
       this.setState({
         impId: idx,
@@ -66,7 +61,7 @@ class Inspect extends React.Component {
     } else {
       this.setState({
         type: type,
-        id: idx,
+        time: time,
         impId: null
       })
     }
@@ -115,8 +110,7 @@ class Inspect extends React.Component {
       }
     });
     const that = this;
-    document.addEventListener('mousedown',function(e){
-      //onMousedown的目标为滚动条时,标签填写单不关闭
+    document.addEventListener('mousedown',function(e){//onMousedown的目标为滚动条时,标签填写单不关闭
       if(e.target.className=='scrollbar'){
         that.isBar = true;
       }else{
@@ -145,6 +139,7 @@ class Inspect extends React.Component {
     if(tmpShow){
       this.props.setHighter(48)
     }else{
+      this.props.detailClick(2)
       setPosition(e,"#searchOption",this.props.setHighter)
     }
   }
@@ -271,24 +266,24 @@ class Inspect extends React.Component {
     return <ScrollArea speed={0.8}
                        horizontal={false}
                        stopScrollPropagation={list.length>6?true:false}
-                       style={{height:'225px'}}
+                       style={{'max-height':'225px'}}
                        className={styles["area"]}
                        verticalContainerStyle={contStyle}
                        verticalScrollbarStyle={barStyle}
                        contentClassName="content">
-      <ul className={styles.searchLiUl}>
+      <ul className={`${styles.searchLiUl} ${styles.searchIsp}`}>
       {
         list && list.map((item, idx) => {
           return <li key={idx}
             className={styles.searchLi}
-            title={(item.name == item.retrievalName || !item.retrievalName) ? item.name : item.name + '(' + item.retrievalName + ')'}
+            title={item.uniqueName}
             onClick={() => {
               this.props.setHighter(48)
-              handleSign(item.questionId, idx, 'search');
+              handleSign(item, idx, 'search');
               this.setState({ show: false })
             }}
           >
-            {item.name}{(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
+            {item.uniqueName}
           </li>
         })
       }
@@ -317,7 +312,6 @@ class Inspect extends React.Component {
   showDetails(val) {
     let min = val.minValue, max = val.maxValue, value = val.value, dom = '';
     dom = getDomUpDown(min,max,value)
-    
     if (val.questionDetailList.length > 0) {
       return val.questionDetailList.map((item) => {
         if (val.value == item.name) {
@@ -330,9 +324,8 @@ class Inspect extends React.Component {
     }
   }
   render() {
-    const {setHighter,refreshScroller, getInfomation,setTipValue, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, windowWidth,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
-    const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
-
+    const {setHighter,refreshScroller, getInfomation,setTipValue, handleChangeValue,labelListSmall,inspectList, inspectVal, list, labelListBig, windowHeight, windowWidth,detailClick, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush,handleDelConfirm } = this.props;
+    const { tmpId, tmpIdx, time, pageTop, impId } = this.state;
     const contStyle={
       opacity:'0.4',
       right:'0',
@@ -344,76 +337,41 @@ class Inspect extends React.Component {
     return (
       <div className={styles.wrapper}>
         <div className={styles.check}>
-          {
-            getExcelDataList.length > 0 && getExcelDataList.map((items, ind) => {
-              return <div style={{ marginTop: '10px' }}>
-                {
-                  items && items.lisExcelRes.length > 0 ? <ul className={styles.excelDataLists}>
-                    {/*<img className={styles.close} src={close} alt="关闭导入excel数据" onClick={() => { this.handleDelClick(2, id) }} />*/}
-                    <span className={styles.close} id="impClose" onClick={() => { this.handleDelClick(2, ind) }}></span>
-                    <DelToast show={impId == ind ? true : false}
-                      top={'22px'}
-                      right={'-34px'}
-                      name="该导入项"
-                      cancel={this.handleCancel}
-                      confirm={this.delConfirm} />
-                    {
-                      items.lisExcelRes.map((item, idx) => {
-                        return <SlideExcel
-                          items={items}
-                          item={item}
-                          idx={idx}
-                          dateTime={this.state.dateTime}
-                          getInfomation={getInfomation}
-                        ></SlideExcel>
-                      })
-                    }
-                  </ul> : null
-                }
-              </div>
-            })
-          }
+          
           <ul className={styles.labelWrap} >
             {
-              labelList && labelList.map((item, idx) => {
-                return <SlideSelect
+              labelListSmall && labelListSmall.map((item, idx) => {
+                return <SlidePic
+                  item={item}
+                  idx={idx}
+                  time={time}
+                  handlePush={handlePush}
+                  handleDelClick={this.handleDelClick}
+                  setTipValue={setTipValue}
+                  handleDelConfirm={handleDelConfirm}
+                ></SlidePic>
+              })
+            }
+            {
+              labelListBig && labelListBig.map((item, idx) => {
+                return <SlidePic
                   item={item}
                   idx={idx}
-                  listDom={this.$ul}
-                  windowWidth={windowWidth}
-                  refreshScroller={refreshScroller}
-                  showToast={idx == id ? true : false}
-                  showFill={this.state.showFill}
+                  time={time}
                   handlePush={handlePush}
-                  fillActive={fillActive}
-                  handleLabelSub={handleLabelSub}
-                  date={this.state.date}
-                  dateTime={this.state.dateTime}
-                  currentIdx={this.state.currentIdx}
-                  currentData={this.state.currentData}
-                  showDetails={this.showDetails}
-                  handleShowDate={this.handleShowDate}
-                  handleChangeDate={this.handleChangeDate}
-                  changeShowFill={this.changeShowFill}
-                  handleFillShow={this.handleFillShow}
-                  getItemList={this.getItemList}
-                  changeActivePart={this.changeActivePart}
                   handleDelClick={this.handleDelClick}
-                  handleDelConfirm={this.delConfirm}
-                  handleConfirm={handleConfirm}
-                  getInfomation={getInfomation}
-                  setHighter={setHighter}
                   setTipValue={setTipValue}
-                ></SlideSelect>
+                  handleDelConfirm={handleDelConfirm}
+                ></SlidePic>
               })
             }
           </ul>
         </div>
         <div style={{ position: "relative", clear: "both", top: "5px" }}>
           <Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
-          {this.state.show ? <SearchOption searchType="1" windowHeight={windowHeight} height={280} refreshScroller={refreshScroller} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
+          {this.state.show ? <SearchOption searchType="1" detailClick={detailClick} windowHeight={windowHeight} height={280} refreshScroller={refreshScroller} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
             {list && list.length > 0 ? this.getSearchList(list) : (inspectVal == '' ? '' : <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>暂无筛选项</p>)}
-            {
+            {/* {
               (list && list.length > 0) || (inspectVal != '') || (inspectList&&inspectList.length==0) ? '' : <div>
                 <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>常用化验项</p>
                 <ScrollArea speed={0.8}
@@ -429,7 +387,7 @@ class Inspect extends React.Component {
                 }
                 </ScrollArea>
               </div>
-            }
+            } */}
           </SearchOption> : ''}
         </div>
       </div>

+ 8 - 0
src/components/AddInspect/index.less

@@ -94,6 +94,13 @@
   max-height: 225px;*/
   // min-height: 80px;
 }
+.searchIsp {
+    display: block !important;
+    left: 107px !important;
+    width: 250px !important;
+    top: 0 !important;
+    float: right;
+}
 .searchLi {
     height: 36px;
     line-height: 36px;
@@ -105,6 +112,7 @@
     white-space: nowrap;
     border: 1px solid transparent;
     cursor: pointer;
+    background-color: #f5f5f5;
 }
 
 .searchLi:hover {

+ 75 - 0
src/components/AddInspectCopy/InspectName/index.jsx

@@ -0,0 +1,75 @@
+import React, { Component } from "react";
+import styles from "./index.less";
+import edit1 from "@common/images/edit1.png";
+import edit2 from "@common/images/edit2.png";
+import { normalVal, timestampToTime, getStatusImg,setFontColorSize } from '@utils/tools';
+class InspectName extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      isEdit: false,
+      value:''
+    };
+    this.handleInput = this.handleInput.bind(this)
+    this.handleBlur = this.handleBlur.bind(this)
+    this.handleEdit = this.handleEdit.bind(this)
+  }
+  componentDidMount(){
+    const {item} = this.props
+    this.setState({
+      value:item.inpValue,
+      isEdit:item.inpValue?true:false
+    });
+    if(this.refs.iptTip){
+      this.refs.iptTip.getDOMNode().value = item.inpValue
+    }
+  }
+  handleEdit(){
+    this.setState({
+      isEdit:true
+    },()=>{
+      this.refs.iptTip.getDOMNode().focus()
+    })
+  }
+  handleBlur(){
+    let val = this.state.value
+    if (val) return
+    this.setState({
+      isEdit:false
+    })
+  }
+  handleInput(e){
+    const {setTipValue,idx} = this.props
+    this.setState({
+      value:e.target.value
+    })
+    this.props.setTipValue(idx,e.target.value)
+  }
+  render(){
+    const {item,getInfomation,idx,handleLabelSub} = this.props
+    return item.show ? <p className={styles.staticTagActive}>
+        <span className={`${styles.tagSpan} ${styles.selectTagSpan} ${setFontColorSize(2,6)}`} data-flg="current" onClick={(e)=>handleLabelSub(e,item.questionId,idx)}>
+          {item.name}
+          <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+        </span>
+        {
+          item.inpValue||this.state.isEdit?<div title={this.state.value} className={styles.iptTipWrap} onClick={this.handleEdit}>
+            <input 
+            ref="iptTip"
+            onBlur={this.handleBlur}
+            onInput={this.handleInput}
+            className={styles.iptValue}
+            type="text"/>
+            <span></span>
+          </div>:<span className={styles.iptValueBtn} onClick={this.handleEdit}>点击备注</span>
+        }
+    </p>:
+    <p >
+        <i className={`${styles.tagSpan} ${styles.tagSpanS} ${setFontColorSize(2)}`} data-flg="current" onClick={(e)=>handleLabelSub(e,item.questionId,idx)}>
+          {item.name}
+          <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+        </i>
+    </p>
+  }
+}
+export default InspectName;

+ 256 - 0
src/components/AddInspectCopy/InspectName/index.less

@@ -0,0 +1,256 @@
+@import "~@less/variables.less";
+.slideLi {
+    // cursor: pointer;
+    // color: #767676;
+    position: relative;
+    padding: 10px 0px 10px 0;
+    border-bottom:1px dashed #989DA3;
+    margin-top: 5px;
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        &:before {
+            content: '\300C';
+        }
+        &:after {
+            content: '\300D';
+        }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 15px;
+        height: 15px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: -4px;
+        top: 0px;
+        background: @closeIcon;
+        background-color: #fff;
+        background-size: 100% 100%;
+    }
+}
+.slideLi:hover{
+    background:#F2F2F2;
+    border-radius: 4px;
+       .partDel{
+        background: @closeHor;
+        background-color: #fff;
+        background-size: 100% 100%;
+      } 
+}
+.staticTagActive {
+    cursor: pointer;
+    color: #333;
+    // display: inline-block;
+    position: relative;
+    vertical-align: top;
+    padding: 2px 10px 10px 10px;
+    box-sizing: border-box;
+    width: 100%;
+    float: left;
+    span {
+        border-bottom: 1px solid #666666 ;
+    }
+}
+
+.staticTag {
+    cursor: pointer;
+    // color: #767676;
+    color: @blue;
+    padding-top: 10px;
+    display: inline-block;
+    position: relative;
+    /* &:before {
+        content: '\300C';
+    }
+    &:after {
+        content: '\300D';
+    } */
+}
+.table {
+    color: #000;
+    width: 100%;
+    tr {
+        line-height: 18px;
+        height: 18px;
+        width: 100%;
+        font-size: unset;
+        td {
+          cursor: default;
+          padding-top: 3px;
+          font-size: unset;
+          span {
+              font-size: unset;
+          }
+        }
+    }
+    tr > td {
+        padding: 0 10px;
+        box-sizing: border-box;
+    }
+}
+
+.searchResult {
+    .searchResultT {
+        img {
+            float: right;
+        }
+    }
+}
+
+.excelDataLists {
+    position: relative;
+    background-color: #f1f1f1;
+    border: 1px solid #ccc;
+    .close {
+        width: 13px;
+        height: 13px;
+        position: absolute;
+        top: -5px;
+        right: -5px;
+        z-index: 30;
+        background-color: #fff;
+        border-radius: 50%;
+    }
+    .excelDataLis {
+        padding: 2px 0px;
+        border-bottom: 1px dashed #989DA3;
+        .excelDataTitle {
+            display: inline-block;
+            width: 20%;
+            vertical-align: top;
+            padding-left: 10px;
+            float: left;
+        }
+        table {
+            width: 80%;
+            tr {
+                height: 16px;
+                line-height: 16px;
+                width: 100%;
+            }
+            td {
+                text-align: left;
+                padding-top: 6px;
+                cursor: default;
+            }
+            .excelUnit {
+                width: auto;
+                margin-left: 5px;
+            }
+        }
+    }
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #EDEDED;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
+  .num {
+    color: @blue;
+  }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo, .imgInfo1 {
+  width: 15px;
+  height: 17px;
+  border-bottom: 0 none !important;
+  background: url('../img/info2.png') no-repeat center center;
+  background-size: 100% auto; 
+  position: absolute;
+  top: -10px;
+  left: 50%;
+  margin-left: -8px;
+  display: none;
+  cursor: pointer;
+}
+.imgInfo1 {
+    top: -13px;
+  }
+  .imgInfo:hover, .imgInfo1:hover {
+    background: url('../img/info3.png') no-repeat center center;
+    background-size: 100% auto; 
+  }
+.tagSpan {
+  display: inline-block;
+  position: relative;
+}
+.tagSpanS {
+    font-weight: bold;
+    color: #000;
+}
+.selectTagSpan {
+  color: #000;
+  font-weight: bold;
+}
+.tagSpan:hover {
+    .imgInfo, .imgInfo1 {
+        display: block;
+      }
+}
+.iptValue {
+    width: 100px;
+    color: #3B9ED0;
+    font-size: 12px;
+    margin-left: 10px;
+    background-color: #EDF8FF;
+    padding: 0 16px 0 3px;
+}
+.iptValueBtn {
+    color: #3B9ED0;
+    width: 60px;
+    height: 22px;
+    line-height: 22px;
+    background-color: #EDF8FF;
+    text-align: center;
+    display: inline-block;
+    font-size: 12px;
+    border-radius: 4px;
+    border-bottom: 0 !important;
+    margin-left: 10px;
+}
+.iptTipWrap {
+    display: inline-block;
+    position: relative;
+    span {
+        display: inline-block;
+        width: 10px;
+        height: 11px;
+        background: url('../../../common/images/edit1.png') no-repeat;
+        position: absolute;
+        right: 3px;
+        top: 5px;
+        border-bottom: 0;
+    }
+}
+.iptTipWrap:hover {
+    span {
+        background: url('../../../common/images/edit2.png') no-repeat;
+    }
+}

+ 99 - 0
src/components/AddInspectCopy/SlideExcel/index.jsx

@@ -0,0 +1,99 @@
+import React, { Component } from "react";
+import styles from "./index.less";
+import { normalVal, timestampToTime, getStatusImg,setFontColorSize } from '@utils/tools';
+import slideUp from "@common/images/slide-up.png";
+import slideDown from "@common/images/slide-down.png";
+class SlideExcel extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show: false
+    };
+    this.toTime = this.toTime.bind(this)
+    this.handleSlide = this.handleSlide.bind(this)
+  }
+  toTime(time) {
+    let tmpTim = time.split(',').join('') - 0
+    if (time && tmpTim.toString() != 'NaN') {
+      let date = new Date('1900-01-01');
+      let dateTim = date.getTime();
+      let times = (tmpTim - 2) * 24 * 60 * 60 * 1000;
+      let result = timestampToTime(dateTim + times).split(' ')[0]
+      return result;
+    } else {
+      return time;
+    }
+  }
+  handleSlide() {
+    let tmpShow = this.state.show
+    this.setState({
+      show: !tmpShow
+    })
+  }
+  render() {
+    const { items, item, idx, getInfomation, dateTime } = this.props;
+    const { show } = this.state;
+    return (
+      <li className={`${styles.excelDataLis} clearfix`} style={{ border: items.lisExcelRes.length - 1 == idx ? 0 : '' }}>
+        <span className={styles.excelDataTitle}>
+          <span className={`${styles.tagSpan} ${styles.selectTagSpan}`}>
+            <span className={`${styles.menus} ${setFontColorSize(2)}`}>{item.menus}</span>
+            <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: item.lisExcelItem[0].uniquemealName || '', type: 12, position: 1 })}></span>
+          </span>
+        </span>
+        <table className={`${styles.table} ${setFontColorSize(2)}`}>
+          {show ? (item.lisExcelItem && item.lisExcelItem.map((value, idx) => {
+            return <tr>
+              <td style={{ width: '30%' }}>
+                <span className={styles.tagSpan}>
+                  {value.itemName}
+                  <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                </span>
+              </td>
+              <td style={{ width: '20%' }}>
+                {
+                  getStatusImg(value.type, value.value, 1)
+                }
+                {value.unit}</td>
+              <td style={{ width: '25%' }}>
+                {normalVal(value.min, value.max)}
+              </td>
+              <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '化验时间: ' + this.toTime(value.time)}</td>
+            </tr>
+          })) : (item.lisExcelItem && item.lisExcelItem.map((value, idx) => {
+            if (idx < 4) {
+              return <tr>
+                <td style={{ width: '30%' }}>
+                  <span className={styles.tagSpan}>
+                    {value.itemName}
+                    <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                  </span>
+                </td>
+                <td style={{ width: '20%' }}>
+                  {
+                    getStatusImg(value.type, value.value, 1)
+                  }
+                  {value.unit}</td>
+                <td style={{ width: '25%' }}>
+                  {normalVal(value.min, value.max)}
+                </td>
+                <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '化验时间: ' + this.toTime(value.time)}</td>
+              </tr>
+            }
+          }))
+          }
+        </table>
+        {
+          item.lisExcelItem && item.lisExcelItem.length > 5 ?
+            <div className={`${styles.slides} ${setFontColorSize(2)}`} onClick={this.handleSlide}>
+              {
+                show ? <span>收起</span> : <span>剩余<span className={styles.num}>{item.lisExcelItem.length - 4}</span>项</span>
+              }
+              <img src={show ? slideUp : slideDown} alt="" />
+            </div> : null
+        }
+      </li>
+    );
+  }
+}
+export default SlideExcel;

+ 199 - 0
src/components/AddInspectCopy/SlideExcel/index.less

@@ -0,0 +1,199 @@
+@import "~@less/variables.less";
+.excelDataLis {
+    // cursor: pointer;
+    color: #767676;
+    position: relative;
+    padding-top: 10px;
+    padding-bottom: 10px;
+    border-bottom:1px dashed #989DA3;
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        &:before {
+            content: '\300C';
+        }
+        &:after {
+            content: '\300D';
+        }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 13px;
+        height: 13px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: 0;
+        top: 12px;
+        background-color: #fff;
+    }
+}
+
+
+.table {
+  color: #000;
+  width: 100%;
+  // display: inline-block;
+  tr {
+    line-height: 18px;
+    height: 18px;
+    width: 100%;
+    font-size: unset;
+    td {
+      padding-top: 3px;
+      font-size: unset;
+      span {
+        font-size: unset;
+      }
+    }
+  }
+}
+
+
+.itemPart {
+    height: 28px;
+    // line-height: 28px;
+    overflow: hidden;
+    padding-top: 0 !important;
+    width: 290px;
+    float: left;
+    padding: 0 15px;
+    box-sizing: border-box;
+    span {
+        display: inline-block;
+    }
+    .itemPartL {
+        max-width: 180px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        float: left;
+    }
+    .itemPartR {
+        width: 62px;
+        outline: none;
+        float: right;
+    }
+    .itemPartT {
+        float: right;
+        input {
+            width: 40px;
+            text-align: center;
+        }
+        .unit {
+            display: inline-block;
+        }
+    }
+}
+.itemPartOne {
+    width: 100% !important;
+}
+
+.excelDataLis {
+    padding: 2px 0px;
+    border-bottom: 1px dashed #989DA3;
+    .excelDataTitle {
+        width: 100%;
+        vertical-align: top;
+        padding-left: 10px;
+        float: left;
+        color: #000;
+    }
+    table {
+        width: 100%;
+        tr {
+            height: 16px;
+            line-height: 16px;
+            width: 100%;
+        }
+        td {
+            text-align: left;
+            padding-top: 6px;
+            padding-left: 10px;
+            cursor: default;
+        }
+        .excelUnit {
+            width: auto;
+            margin-left: 5px;
+        }
+    }
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #EDEDED;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+    font-size: unset;
+  }
+  img{
+    vertical-align: middle;
+  }
+  .num {
+    color: @blue;
+  }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo , .imgInfo1{
+  width: 15px;
+  height: 17px;
+  border-bottom: 0 none !important;
+  background: url('../img/info2.png') no-repeat center center;
+  background-size: 100% auto; 
+  position: absolute;
+  top: -10px;
+  left: 50%;
+  margin-left: -8px;
+  display: none;
+  cursor: pointer;
+}
+.imgInfo1 {
+  top: -13px;
+}
+.imgInfo:hover, .imgInfo1:hover {
+  background: url('../img/info3.png') no-repeat center center;
+  background-size: 100% auto; 
+}
+.excelDataTitle {
+  .tagSpan {
+    display: inline-block;
+    line-height: 28px;
+  }
+}
+.tagSpan {
+  display: inline-block;
+  position: relative;
+}
+.selectTagSpan {
+  // color: #000;
+  // font-weight: bold;
+  // .menus {
+  //   border-bottom: 1px solid #666666;
+  // }
+}
+.tagSpan:hover {
+  .imgInfo, .imgInfo1 {
+    display: block;
+  }
+ 
+}

+ 275 - 0
src/components/AddInspectCopy/SlideSelect/index.jsx

@@ -0,0 +1,275 @@
+import React, { Component } from "react";
+import styles from "./index.less";
+import { normalVal,timestampToTime,getPageCoordinate,setPosition,setFontColorSize } from '@utils/tools';
+import { InspectCommon, Calendar,DelToast} from '@commonComp';
+import slideUp from "@common/images/slide-up.png";
+import slideDown from "@common/images/slide-down.png";
+import $ from 'jquery';
+import date1 from '../img/date1.png';
+import ScrollArea from 'react-scrollbar';
+import InspectName from '../InspectName';
+
+class SlideSelect extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show:false,
+      activeInd:false,
+      activeName:'',
+    };
+    this.toTime = this.toTime.bind(this);
+    this.handleSlide = this.handleSlide.bind(this);
+    this.handleDel = this.handleDel.bind(this);
+    this.handleCancel = this.handleCancel.bind(this);
+    this.delConfirm = this.delConfirm.bind(this);
+    this.timeSure = this.timeSure.bind(this);
+    this.handleLabelSub = this.handleLabelSub.bind(this);
+  }
+  handleChangeDate(date) {
+    // console.log(date,'外')
+  }
+  componentDidMount() {
+    $(document).click((event) => {
+      let inspectToggleDate = document.getElementById("inspectToggleDate")
+      let timeIcon = document.getElementById("timeIcon")
+      let calendarDate = document.getElementById("calendarDate")
+      if (calendarDate) {
+        if (inspectToggleDate != event.target && timeIcon != event.target && !calendarDate.contains(event.target)) {
+          this.props.handleShowDate();
+        }
+      }
+    });
+  }
+  toTime(time){
+    let tmpTim = time.split(',').join('')-0
+    if(time && tmpTim.toString() != 'NaN'){
+      let date = new Date('1900-01-01');
+      let dateTim = date.getTime();
+      let times = (tmpTim-2)*24*60*60*1000;
+      let result = timestampToTime(dateTim+times).split(' ')[0]
+      return result;
+    }else{
+      return time;
+    }
+  }
+  handleSlide(){
+    let tmpShow = this.state.show
+    this.setState({
+      show:!tmpShow
+    })
+  }
+  handleDel(){
+    const {handleDelClick,idx,item} = this.props;
+    this.setState({
+      activeInd:true,
+      activeName:item.name
+    })
+    handleDelClick&&handleDelClick(1,idx);
+  }
+  handleCancel(){
+    this.setState({
+      activeInd:false,
+      activeName:''
+    })
+  }
+  delConfirm(){
+    const {handleDelConfirm} = this.props;
+    handleDelConfirm&&handleDelConfirm();
+    this.setState({
+      activeInd:false,
+      activeName:''
+    })
+  }
+  timeSure(date){
+    const {handleChangeDate} = this.props;
+    handleChangeDate&&handleChangeDate(date)
+  }
+  handleLabelSub(e,questionId,idx){
+    const {handleLabelSub,handleFillShow,setHighter,refreshScroller} = this.props;
+    handleLabelSub(e,questionId,idx);
+    handleFillShow(e,idx);
+    //弹窗高度超出屏幕,增加页面高度
+    setPosition(e,"#inspectFill",setHighter);
+    /*setTimeout(function(){//如果化验下面有很多数据,则会跳过头
+      refreshScroller()&&refreshScroller().scrollYTo(290);
+    })*/
+  }
+  render() {
+    const {windowWidth,handleFillShow,setTipValue,setHighter,refreshScroller,getInfomation,handleConfirm,changeActivePart,getItemList,date,item,idx,showDetails,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,showToast} = this.props;
+    const {show,activeInd,activeName} = this.state;
+    let numPlus = 0,numPlus1 = 0;
+    let staticTime = {}
+    if(dateTime){
+      let tmp1 = dateTime.split(' ')[0].split('-')
+      let tmp2 = (dateTime).split(' ').length>1&&(dateTime).split(' ')[1].split(':')
+      staticTime = {
+        year: tmp1[0]-0,
+        month: tmp1[1]-0,
+        day: tmp1[2]-0,
+        hour: tmp2[0],
+        minute: tmp2[1],
+        second: tmp2[2]
+      }
+    }
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'6px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
+    const listLen = currentData.details&&currentData.details.length;
+    const stopScroll =(windowWidth<1300&&listLen>12)||(windowWidth>1299&&listLen>24);
+    return (
+      <li key={item.questionId} className={`${styles.slideLi} clearfix`}> 
+        <InspectName 
+          item={item} 
+          handleLabelSub={this.handleLabelSub} 
+          idx={idx} 
+          getInfomation={getInfomation} 
+          refreshScroller={refreshScroller} 
+          setHighter={setHighter} 
+          setTipValue={setTipValue}
+          handleFillShow={handleFillShow}></InspectName>
+        {/* {
+            // 标签,血常规。。
+            item.show ?
+            <p className={styles.staticTagActive}>
+                <span className={`${styles.tagSpan} ${styles.selectTagSpan} ${setFontColorSize(2,6)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
+                  {item.name}
+                  <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+                </span>
+                {
+                  item.inpValue?<input className={styles.iptValue} type="text"/>:<span className={styles.iptValueBtn}>点击备注</span>
+                }
+            </p>:
+            <p >
+                <i className={`${styles.tagSpan} ${styles.tagSpanS} ${setFontColorSize(2)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
+                  {item.name}
+                  <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+                </i>
+            </p>
+        } */}
+
+        {
+          item.details && item.details.map((val)=>{
+            if(val.value && val.value != ''){
+              numPlus = ++numPlus
+            }
+          })
+        }
+        {
+            item.show ?
+                <table className={`${styles.table} ${setFontColorSize(2)}`}>
+                    {
+                        show?(item.details.map((val)=>{
+                            if(val.value && val.value != ''){
+                                return <tr>
+                                    <td style={{width:'30%'}}>
+                                      <span className={styles.tagSpan}>
+                                        {val.name}
+                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12,showName:item.name+'('+val.name+')'})}></span>                                        
+                                      </span>
+                                    </td>
+                                    {showDetails(val)}
+                                    <td style={{width:'25%'}}>
+                                      {val.questionDetailList.length > 0?'':normalVal(val.minValue,val.maxValue)}
+                                    </td>
+                                    <td style={{width:'25%'}}>{'化验时间:'+item.time}</td>
+                                </tr>
+                            }
+                        })):(item.details.map((val)=>{
+                          if(val.value && val.value != '' ){
+                              ++numPlus1;
+                              if(numPlus1 < 5){
+                                return <tr>
+                                    <td style={{width:'30%'}}>
+                                      <span className={styles.tagSpan}>
+                                        {val.name}
+                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12,showName:item.name+'('+val.name+')'})}></span>
+                                      </span>
+                                    </td>
+                                    {showDetails(val)}
+                                    <td style={{width:'25%'}}>
+                                        {val.questionDetailList.length > 0?'':normalVal(val.minValue,val.maxValue)}
+                                    </td>
+                                    <td style={{width:'25%'}}>{'化验时间:'+item.time}</td>
+                                </tr>
+                              }
+                          }
+                      }))
+                    }
+                </table>:null
+        }
+        {
+          numPlus > 4 ?  
+          <div className={styles.slides} onClick={this.handleSlide}>
+              {
+                show ? <span>收起</span> :<span>剩余<span className={styles.num}>{numPlus-4}</span>项</span>
+              }
+              <img src={show ?slideUp:slideDown} alt=""/>
+          </div>:null
+        }
+        <div className={styles.searchResult}>
+            {
+                showFill && fillActive.id == item.id && idx == currentIdx ?
+                    <InspectCommon
+                        showFill={showFill}
+                        handleClear={(e)=>{
+                            changeActivePart('','',true)
+                        }}
+                        handleConfirm={(e)=>{
+                            if(JSON.stringify(currentData) == '{}'){
+                                handleConfirm(e,idx,dateTime,fillActive);
+                            }else{
+                                handleConfirm(e,idx,dateTime,currentData);
+                            }
+                            changeShowFill()
+                            handlePush&&handlePush({mode:8});     //右侧推送
+                        }}
+                    >
+                    
+                        <div className={styles.searchResultT}>
+                            <img style={{"position":"absolute","top":"8px","right":"8px",cursor:"pointer"}} onClick={handleShowDate} src={date1} alt="" id="inspectToggleDate"/>
+                            <p style={{position:"absolute",right:"25px",top:"4px",lineHeight:"28px",cursor:"pointer",paddingRight:"10px"}} onClick={handleShowDate} id="timeIcon">
+                                {
+                                  dateTime
+                                }
+                            </p>
+                            <div style={{display:date?"block":"none",position:"relative"}}>
+                                {/* 日期组件 */}
+                                {
+                                  date?<Calendar timeLis={staticTime} isShow={true} timeSure={this.timeSure} needTime={true} sure={true} handleChange={this.handleChangeDate}></Calendar>:null
+                                }
+                                {/* <Calendar timeLis={staticTime} isShow={true} timeSure={this.timeSure} needTime={true} sure={true} handleChange={handleChangeDate}></Calendar> */}
+                            </div>
+                        </div>
+                            {/* 填写单内容显示 */}
+                      {stopScroll?<ScrollArea speed={0.8}
+                                  horizontal={false}
+                                  stopScrollPropagation={true}
+                                  style={{maxHeight:'358px'}}
+                                  className={styles["area"]}
+                                  verticalContainerStyle={contStyle}
+                                  verticalScrollbarStyle={barStyle}
+                                  contentClassName="content">
+                            { getItemList() }
+                      </ScrollArea>:getItemList()}
+                    </InspectCommon>
+                : null
+            }
+        </div>
+        {/*<img className={styles.partDel} src={close} alt="删除项" onClick={()=>{handleDelClick(1,idx)}}/>*/}
+        <span id="addClose" className={styles.partDel} onClick={this.handleDel}></span>
+        <DelToast show={showToast&&activeInd?true:false}
+                    name={activeName} 
+                    right={'-34px'}
+                    top={'30px'}
+                    cancel={this.handleCancel}
+                    confirm={this.delConfirm}/>
+    </li>
+    );
+  }
+}
+export default SlideSelect;

+ 234 - 0
src/components/AddInspectCopy/SlideSelect/index.less

@@ -0,0 +1,234 @@
+@import "~@less/variables.less";
+.slideLi {
+    // cursor: pointer;
+    // color: #767676;
+    position: relative;
+    padding: 10px 0px 10px 0;
+    border-bottom:1px dashed #989DA3;
+    margin-top: 5px;
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        &:before {
+            content: '\300C';
+        }
+        &:after {
+            content: '\300D';
+        }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 15px;
+        height: 15px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: -4px;
+        top: 0px;
+        background: @closeIcon;
+        background-color: #fff;
+        background-size: 100% 100%;
+    }
+}
+.slideLi:hover{
+    background:#F2F2F2;
+    border-radius: 4px;
+       .partDel{
+        background: @closeHor;
+        background-color: #fff;
+        background-size: 100% 100%;
+      } 
+}
+.staticTagActive {
+    cursor: pointer;
+    color: #333;
+    // display: inline-block;
+    position: relative;
+    vertical-align: top;
+    padding: 2px 10px 10px 10px;
+    box-sizing: border-box;
+    width: 100%;
+    float: left;
+    span {
+        border-bottom: 1px solid #666666 ;
+    }
+}
+
+.staticTag {
+    cursor: pointer;
+    // color: #767676;
+    color: @blue;
+    padding-top: 10px;
+    display: inline-block;
+    position: relative;
+    /* &:before {
+        content: '\300C';
+    }
+    &:after {
+        content: '\300D';
+    } */
+}
+.table {
+    color: #000;
+    width: 100%;
+    tr {
+        line-height: 18px;
+        height: 18px;
+        width: 100%;
+        font-size: unset;
+        td {
+          cursor: default;
+          padding-top: 3px;
+          font-size: unset;
+          span {
+              font-size: unset;
+          }
+        }
+    }
+    tr > td {
+        padding: 0 10px;
+        box-sizing: border-box;
+    }
+}
+
+.searchResult {
+    .searchResultT {
+        img {
+            float: right;
+        }
+    }
+}
+
+.excelDataLists {
+    position: relative;
+    background-color: #f1f1f1;
+    border: 1px solid #ccc;
+    .close {
+        width: 13px;
+        height: 13px;
+        position: absolute;
+        top: -5px;
+        right: -5px;
+        z-index: 30;
+        background-color: #fff;
+        border-radius: 50%;
+    }
+    .excelDataLis {
+        padding: 2px 0px;
+        border-bottom: 1px dashed #989DA3;
+        .excelDataTitle {
+            display: inline-block;
+            width: 20%;
+            vertical-align: top;
+            padding-left: 10px;
+            float: left;
+        }
+        table {
+            width: 80%;
+            tr {
+                height: 16px;
+                line-height: 16px;
+                width: 100%;
+            }
+            td {
+                text-align: left;
+                padding-top: 6px;
+                cursor: default;
+            }
+            .excelUnit {
+                width: auto;
+                margin-left: 5px;
+            }
+        }
+    }
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #EDEDED;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
+  .num {
+    color: @blue;
+  }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo, .imgInfo1 {
+  width: 15px;
+  height: 17px;
+  border-bottom: 0 none !important;
+  background: url('../img/info2.png') no-repeat center center;
+  background-size: 100% auto; 
+  position: absolute;
+  top: -10px;
+  left: 50%;
+  margin-left: -8px;
+  display: none;
+  cursor: pointer;
+}
+.imgInfo1 {
+    top: -13px;
+  }
+  .imgInfo:hover, .imgInfo1:hover {
+    background: url('../img/info3.png') no-repeat center center;
+    background-size: 100% auto; 
+  }
+.tagSpan {
+  display: inline-block;
+  position: relative;
+}
+.tagSpanS {
+    font-weight: bold;
+    color: #000;
+}
+.selectTagSpan {
+  color: #000;
+  font-weight: bold;
+}
+.tagSpan:hover {
+    .imgInfo, .imgInfo1 {
+        display: block;
+      }
+}
+.iptValue {
+    width: 60px;
+    color: #3B9ED0;
+    font-size: 12px;
+}
+.iptValueBtn {
+    color: #3B9ED0;
+    width: 60px;
+    height: 22px;
+    line-height: 22px;
+    background-color: #EDF8FF;
+    text-align: center;
+    display: inline-block;
+    font-size: 12px;
+    border-radius: 4px;
+    border-bottom: 0 !important;
+    margin-left: 10px;
+}

BIN
src/components/AddInspectCopy/img/close.png


BIN
src/components/AddInspectCopy/img/date1.png


BIN
src/components/AddInspectCopy/img/date2.png


BIN
src/components/AddInspectCopy/img/info2.png


BIN
src/components/AddInspectCopy/img/info3.png


+ 439 - 0
src/components/AddInspectCopy/index.jsx

@@ -0,0 +1,439 @@
+import React from 'react';
+import { SearchOption, InspectCommon, Calendar, Notify, ConfirmModal, Add, DelToast } from '@commonComp';
+import SlideExcel from './SlideExcel';
+import SlideSelect from './SlideSelect';
+import { deepClone, getPageCoordinate, getStatusImg,getDomUpDown ,getCurrentDate,setPosition,getCalendarDate} from '@utils/tools';
+import styles from './index.less';
+import ScrollArea from 'react-scrollbar';
+import store from '@store';
+import $ from 'jquery';
+class Inspect extends React.Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show: false,
+      showFill: false,
+      date: false,
+      currentIdx: '',
+      dateTime: "",
+      currentData: {},
+      numPlus: 0,     //判断是否所有的填写单都是空
+      num: 0,            //暂存数据,获取一次,不能每次都是新的数据
+      type: null,
+      id: null,
+      pageTop: '',
+      // tmpIds: [],      //内层外层
+      impId: null
+    }
+    this.$ul = React.createRef();
+    this.handleChangeDate = this.handleChangeDate.bind(this)
+    this.handleShowDate = this.handleShowDate.bind(this)
+    this.getItemList = this.getItemList.bind(this)
+    this.getSearchList = this.getSearchList.bind(this)
+    this.getCommonList = this.getCommonList.bind(this)
+    this.changeActivePart = this.changeActivePart.bind(this)
+    this.showDetails = this.showDetails.bind(this)
+    this.delConfirm = this.delConfirm.bind(this)
+    this.handleCancel = this.handleCancel.bind(this)
+    this.handleSearchShow = this.handleSearchShow.bind(this)
+    this.changeShowFill = this.changeShowFill.bind(this)
+    this.handleFillShow = this.handleFillShow.bind(this)
+    this.handleDelClick = this.handleDelClick.bind(this)
+  }
+  delConfirm() {//弹窗确定
+    const { delPartItem, handleCloseExcel, handlePush } = this.props;
+    const { type, id, impId } = this.state;
+    if (type == 1) {
+      delPartItem(id)
+    } else if (type == 2) {
+      handleCloseExcel(impId)
+    }
+    this.setState({
+      type: null,
+      id: null,
+      impId: null
+    })
+    Notify.success("删除成功");
+    handlePush && handlePush({mode:8});       //右侧推送
+  }
+  handleDelClick(type, idx) {
+    if (type == 2) {
+      this.setState({
+        impId: idx,
+        type: type,
+        id: null
+      })
+    } else {
+      this.setState({
+        type: type,
+        id: idx,
+        impId: null
+      })
+    }
+  }
+  handleCancel() {
+    this.setState({
+      type: null,
+      id: null,
+      impId: null
+    })
+  }
+  componentDidMount() {
+    $(document).click((event) => {
+      let searchWrap = document.getElementById("searchWrap");   // 搜索按钮
+      let searchOption = document.getElementById("searchOption");   // 搜索列表
+      let inspectFill = document.getElementById("inspectFill");         // 公共填写单
+
+      let _del = $('#delBox')[0];       // 删除弹窗  
+      let _impClose = $('#impClose')[0];         // 导入删除按钮
+      let _addClose = $('#addClose')[0];         // 添加删除按钮
+      let _closeTil = $('#delTit')[0];   // 弹窗标题
+      if (searchOption&&!this.isBar) {//onMousedown的目标为滚动条时,添加弹窗不关闭
+        if (searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
+          if(this.state.show){
+            this.props.setHighter(48)
+          }
+          this.setState({ show: false });
+        }
+      }
+      if (inspectFill&&!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭
+        if ($(event.target).attr('id') != "getSureTime"&&event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
+          if(this.state.showFill){
+            this.props.setHighter(48)
+          }
+          this.setState({ showFill: false, date: false });
+        }
+      }
+
+      if (_del&&!this.isBar) {//onMousedown的目标为滚动条时,删除弹窗不关闭
+        if (!event.target.isEqualNode(_impClose) && !event.target.isEqualNode(_addClose) && !event.target.isEqualNode(_del) && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)) {
+          this.setState({
+            id: null,
+            impId: null
+          })
+        }
+      }
+    });
+    const that = this;
+    document.addEventListener('mousedown',function(e){
+      //onMousedown的目标为滚动条时,标签填写单不关闭
+      if(e.target.className=='scrollbar'){
+        that.isBar = true;
+      }else{
+        that.isBar = false;
+      }
+    });
+    // this.setState({ dateTime: getCurrentDate(1) })
+  }
+  componentWillReceiveProps(nextProps) {
+    if (nextProps.fillActive.name != this.props.fillActive.name) {
+      this.setState({ num: 0 })
+    }
+  }
+  changeShowFill() {
+    this.setState({ showFill: false })
+    this.props.setHighter(48)
+  }
+  handleChangeDate(info) {
+    let date = getCalendarDate(info);
+    this.setState({ dateTime: date, date: false })
+  }
+  handleSearchShow(e) {
+    let tmpShow = this.state.show;
+    this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
+    // e.stopPropagation();
+    if(tmpShow){
+      this.props.setHighter(48)
+    }else{
+      setPosition(e,"#searchOption",this.props.setHighter)
+    }
+  }
+  handleFillShow(e, idx) {
+    let tmpShow = this.state.showFill;
+    let baseList = store.getState().inspect.fillActive;
+    this.setState({
+      showFill: !tmpShow,
+      currentIdx: idx,
+      currentData: baseList,
+      dateTime: baseList.time ? baseList.time : getCurrentDate(1)
+    })
+    // e.stopPropagation();
+  }
+  handleShowDate() {
+    this.setState({
+      date: !this.state.date
+    })
+  }
+  changeActivePart(idx, val, clear) {
+    let nums = this.state.num;
+    let fillActive;
+    if (nums == 0) {
+      fillActive = this.props.fillActive;
+    } else {
+      fillActive = this.state.currentData;
+    }
+    ++nums;
+    this.setState({ num: nums });
+    let tempArr = deepClone(fillActive);
+
+    if (clear) {    //点击清空按钮,至清初输入的数字
+      for (let i = 0; i < tempArr.details.length; i++) {
+        tempArr.details[i].value = ''
+        tempArr.show = false;
+      }
+      tempArr.time = getCurrentDate(1);
+      this.setState({ currentData: tempArr })
+      return;
+    } else {
+      let tempNumPlus = 0;
+      for (let i = 0; i < tempArr.details.length; i++) {
+        if (i == idx) {
+          tempArr.details[i].value = val
+        }
+        if (tempArr.details[i].value != undefined && tempArr.details[i].value != '') {
+          tempArr.show = true;
+        } else {
+          ++tempNumPlus;
+          if (tempNumPlus == tempArr.details.length) {
+            tempArr.show = false;
+          }
+        }
+      }
+      tempArr.time = this.state.dateTime;
+      this.setState({ currentData: tempArr })
+    }
+  }
+  getItemList() {        //填写单展示
+    let number = this.state.num;
+    let fillActive;
+    if (number == 0) {
+      fillActive = this.props.fillActive;
+    } else {
+      fillActive = this.state.currentData;
+    }
+    return <ul className={styles.searchLis} ref={this.$ul}>
+      {
+        fillActive && fillActive.details && fillActive.details.map((item, idx) => {
+          if (item.controlType == 1) {
+            return (
+              <li className={`${styles.itemPart} ${fillActive.details.length > 1 ? '' : styles.itemPartOne}`}>
+                <span className={styles.itemPartL}>{item.name}</span>
+                <span className={styles.itemPartT}>
+                  <select className={styles.itemPartR} onChange={(e) => {
+                    if (e.target.value == '请选择') {
+                      this.changeActivePart(idx, '')
+                      return;
+                    }
+                    this.changeActivePart(idx, e.target.value);
+                  }}
+                  >
+                    <option value="请选择">请选择</option>
+                    {
+                      (item.questionDetailList).map((val) => {
+                        return <option value={val.name}
+                          selected={val.name == item.value ? true : false}
+                        >{val.name}</option>
+                      })
+                    }
+                  </select>
+                </span>
+              </li>
+            )
+          } else if (item.controlType == 6) {
+            return (
+              <li className={`${styles.itemPart} ${fillActive.details.length > 1 ? '' : styles.itemPartOne}`}>
+                <span className={styles.itemPartL} title={item.name}>{item.name}</span>
+                <span className={styles.itemPartT}>
+                  <input type="text"
+                    placeholder="(填写)"
+                    value={item.value}
+                    onKeyUp={(e) => { this.changeActivePart(idx, e.target.value.trim()) }}
+                  />
+                  <p className={styles.unit} title={item.labelSuffix}>{item.labelSuffix}</p>
+                </span>
+              </li>
+            )
+          }
+        })
+      }
+    </ul>
+  }
+  getSearchList(list) {//搜索列表
+    const { handleSign } = this.props;
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
+    return <ScrollArea speed={0.8}
+                       horizontal={false}
+                       stopScrollPropagation={list.length>6?true:false}
+                       style={{height:'225px'}}
+                       className={styles["area"]}
+                       verticalContainerStyle={contStyle}
+                       verticalScrollbarStyle={barStyle}
+                       contentClassName="content">
+      <ul className={styles.searchLiUl}>
+      {
+        list && list.map((item, idx) => {
+          return <li key={idx}
+            className={styles.searchLi}
+            title={(item.name == item.retrievalName || !item.retrievalName) ? item.name : item.name + '(' + item.retrievalName + ')'}
+            onClick={() => {
+              this.props.setHighter(48)
+              handleSign(item.questionId, idx, 'search');
+              this.setState({ show: false })
+            }}
+          >
+            {item.name}{(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
+          </li>
+        })
+      }
+      </ul></ScrollArea>;
+  }
+  getCommonList() {//常用列表
+    const { handleSign, inspectList } = this.props;
+    return <ul className={styles.searchLiUl}>
+      {
+        inspectList && inspectList.map((item, idx) => {
+          return <li key={idx}
+            className={styles.searchLi}
+            title={item.name}
+            onClick={() => {
+              this.props.setHighter(48)
+              handleSign(item.questionId, idx, 'common');
+              this.setState({ show: false })
+            }}
+          >
+            {item.name}
+          </li>
+        })
+      }
+    </ul>
+  }
+  showDetails(val) {
+    let min = val.minValue, max = val.maxValue, value = val.value, dom = '';
+    dom = getDomUpDown(min,max,value)
+    
+    if (val.questionDetailList.length > 0) {
+      return val.questionDetailList.map((item) => {
+        if (val.value == item.name) {
+          return <td style={{ width: '20%' }} className={item.abnormal != '0' ? "red" : ''}>{val.value}</td>
+        }
+      })
+    } else {
+      // return <td style={{ width: '20%' }}><span className={(val.value - 0).toString() == 'NaN' ? "red" : (val.maxValue || val.minValue) ? (val.value > val.maxValue || val.value < val.minValue ? "red" : '') : ''}>{val.value}</span> {val.labelSuffix}</td>
+      return <td style={{ width: '20%' }}>{dom} {val.labelSuffix}</td>
+    }
+  }
+  render() {
+    const {setHighter,refreshScroller, getInfomation,setTipValue, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, windowWidth,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
+    const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
+    return (
+      <div className={styles.wrapper}>
+        <div className={styles.check}>
+          {
+            getExcelDataList.length > 0 && getExcelDataList.map((items, ind) => {
+              return <div style={{ marginTop: '10px' }}>
+                {
+                  items && items.lisExcelRes.length > 0 ? <ul className={styles.excelDataLists}>
+                    {/*<img className={styles.close} src={close} alt="关闭导入excel数据" onClick={() => { this.handleDelClick(2, id) }} />*/}
+                    <span className={styles.close} id="impClose" onClick={() => { this.handleDelClick(2, ind) }}></span>
+                    <DelToast show={impId == ind ? true : false}
+                      top={'22px'}
+                      right={'-34px'}
+                      name="该导入项"
+                      cancel={this.handleCancel}
+                      confirm={this.delConfirm} />
+                    {
+                      items.lisExcelRes.map((item, idx) => {
+                        return <SlideExcel
+                          items={items}
+                          item={item}
+                          idx={idx}
+                          dateTime={this.state.dateTime}
+                          getInfomation={getInfomation}
+                        ></SlideExcel>
+                      })
+                    }
+                  </ul> : null
+                }
+              </div>
+            })
+          }
+          <ul className={styles.labelWrap} >
+            {
+              labelList && labelList.map((item, idx) => {
+                return <SlideSelect
+                  item={item}
+                  idx={idx}
+                  listDom={this.$ul}
+                  windowWidth={windowWidth}
+                  refreshScroller={refreshScroller}
+                  showToast={idx == id ? true : false}
+                  showFill={this.state.showFill}
+                  handlePush={handlePush}
+                  fillActive={fillActive}
+                  handleLabelSub={handleLabelSub}
+                  date={this.state.date}
+                  dateTime={this.state.dateTime}
+                  currentIdx={this.state.currentIdx}
+                  currentData={this.state.currentData}
+                  showDetails={this.showDetails}
+                  handleShowDate={this.handleShowDate}
+                  handleChangeDate={this.handleChangeDate}
+                  changeShowFill={this.changeShowFill}
+                  handleFillShow={this.handleFillShow}
+                  getItemList={this.getItemList}
+                  changeActivePart={this.changeActivePart}
+                  handleDelClick={this.handleDelClick}
+                  handleDelConfirm={this.delConfirm}
+                  handleConfirm={handleConfirm}
+                  getInfomation={getInfomation}
+                  setHighter={setHighter}
+                  setTipValue={setTipValue}
+                ></SlideSelect>
+              })
+            }
+          </ul>
+        </div>
+        <div style={{ position: "relative", clear: "both", top: "5px" }}>
+          <Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
+          {this.state.show ? <SearchOption searchType="1" windowHeight={windowHeight} height={280} refreshScroller={refreshScroller} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
+            {list && list.length > 0 ? this.getSearchList(list) : (inspectVal == '' ? '' : <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>暂无筛选项</p>)}
+            {
+              (list && list.length > 0) || (inspectVal != '') || (inspectList&&inspectList.length==0) ? '' : <div>
+                <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>常用化验项</p>
+                <ScrollArea speed={0.8}
+                            horizontal={false}
+                            stopScrollPropagation={true}
+                            style={{height:'225px'}}
+                            className={styles["area"]}
+                            verticalContainerStyle={contStyle}
+                            verticalScrollbarStyle={barStyle}
+                            contentClassName="content">
+                {
+                  this.getCommonList()
+                }
+                </ScrollArea>
+              </div>
+            }
+          </SearchOption> : ''}
+        </div>
+      </div>
+    )
+  }
+}
+
+export default Inspect;

+ 252 - 0
src/components/AddInspectCopy/index.less

@@ -0,0 +1,252 @@
+
+@import "~@less/variables.less";
+.labelWrap>li {
+    // cursor: pointer;
+    // color: #767676;
+    position: relative;
+    padding-top: 10px;
+    padding-bottom: 10px;
+    border-bottom:1px dashed #989DA3;
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        &:before {
+            content: '\300C';
+        }
+        &:after {
+            content: '\300D';
+        }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 13px;
+        height: 13px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: 0;
+        top: 12px;
+        background-color: #fff;
+    }
+}
+.staticTagActive {
+    cursor: pointer;
+    color: #333;
+    display: inline-block;
+    position: relative;
+    vertical-align: top;
+    padding: 2px 10px;
+    box-sizing: border-box;
+    width: 20%;
+    float: left;
+    span {
+        border-bottom: 1px solid #666666 ;
+    }
+}
+
+.staticTag {
+    cursor: pointer;
+    // color: #767676;
+    color: @blue;
+    padding-top: 10px;
+    display: inline-block;
+    position: relative;
+    /* &:before {
+        content: '\300C';
+    }
+    &:after {
+        content: '\300D';
+    } */
+}
+.labelWrap {
+    .table {
+        color: #000;
+        width: 80%;
+        tr {
+            line-height: 18px;
+            height: 18px;
+            width: 100%;
+            td {
+                padding-top: 3px;
+            }
+        }
+    }
+
+}
+
+.wrapper {
+    position: relative;
+}
+.fillWrap {
+    display: none;
+}
+.searchLiUl {
+  /*overflow-y: auto;
+  max-height: 225px;*/
+  // min-height: 80px;
+}
+.searchLi {
+    height: 36px;
+    line-height: 36px;
+    padding: 0 30px;
+    padding-top: 0;
+    box-sizing: border-box;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    border: 1px solid transparent;
+    cursor: pointer;
+}
+
+.searchLi:hover {
+    border: 1px solid @blue;
+}
+
+.searchResult {
+    .searchResultT {
+        img {
+            float: right;
+        }
+    }
+}
+.searchLis {
+    padding-top: 10px;
+    margin-top: 5px;
+    margin-bottom: 5px;
+    border-top: 1px solid #EAEDF1;
+    overflow: hidden;
+    box-sizing: border-box;
+}
+.itemPart {
+    height: 28px;
+    line-height: 28px;
+    overflow: hidden;
+    padding-top: 0 !important;
+    width: 330px;
+    float: left;
+    padding: 0 15px;
+    box-sizing: border-box;
+    span {
+        display: inline-block;
+    }
+    .itemPartL {
+        max-width: 180px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        float: left;
+    }
+    .itemPartR {
+        width: 62px;
+        outline: none;
+        float: left;
+        margin-top: 5px;
+    }
+    .itemPartT {
+        float: right;
+        width: 120px;
+        input {
+            width: 40px;
+            text-align: center;
+            float: left;
+            margin-right: 10px;
+            height: 28px;
+            line-height: 28px;
+        }
+        .unit {
+            display: inline-block;
+            width: 70px;
+            height: 28px;
+            line-height: 28px;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+        }
+    }
+}
+.itemPartOne {
+    width: 100% !important;
+}
+.excelDataLists {
+    position: relative;
+    background-color: rgba(237,237,237,0.4);
+    border: 1px solid #ccc;
+    .close {
+        display: inline-block;
+        width: 15px;
+        height: 15px;
+        position: absolute;
+        top: -5px;
+        right: -5px;
+        z-index: 1;
+        border-radius: 50%;
+        background: @closeIcon;
+        // background: url('/img/close.png') no-repeat center center;
+        background-size: 100% 100%;
+        background-color: #fff;
+    }
+    .excelDataLis {
+        padding: 2px 0px;
+        border-bottom: 1px dashed #989DA3;
+        .excelDataTitle {
+            display: inline-block;
+            width: 20%;
+            vertical-align: top;
+            padding-left: 10px;
+            float: left;
+        }
+        table {
+            width: 80%;
+            tr {
+                height: 16px;
+                line-height: 16px;
+                width: 100%;
+            }
+            td {
+                text-align: left;
+                padding-top: 6px;
+            }
+            .excelUnit {
+                width: auto;
+                margin-left: 5px;
+            }
+        }
+    }
+}
+.excelDataLists:hover{
+    .close{
+        background: @closeHor;
+        background-size: 100% 100%;
+        background-color: #fff;
+        cursor: pointer;
+    }   
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #ccc;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
+}

+ 75 - 0
src/components/AddNewInspect/InspectName/index.jsx

@@ -0,0 +1,75 @@
+import React, { Component } from "react";
+import styles from "./index.less";
+import edit1 from "@common/images/edit1.png";
+import edit2 from "@common/images/edit2.png";
+import { normalVal, timestampToTime, getStatusImg,setFontColorSize } from '@utils/tools';
+class InspectName extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      isEdit: false,
+      value:''
+    };
+    this.handleInput = this.handleInput.bind(this)
+    this.handleBlur = this.handleBlur.bind(this)
+    this.handleEdit = this.handleEdit.bind(this)
+  }
+  componentDidMount(){
+    const {item} = this.props
+    this.setState({
+      value:item.inpValue,
+      isEdit:item.inpValue?true:false
+    });
+    if(this.refs.iptTip){
+      this.refs.iptTip.getDOMNode().value = item.inpValue
+    }
+  }
+  handleEdit(){
+    this.setState({
+      isEdit:true
+    },()=>{
+      this.refs.iptTip.getDOMNode().focus()
+    })
+  }
+  handleBlur(){
+    let val = this.state.value
+    if (val) return
+    this.setState({
+      isEdit:false
+    })
+  }
+  handleInput(e){
+    const {setTipValue,idx} = this.props
+    this.setState({
+      value:e.target.value
+    })
+    this.props.setTipValue(idx,e.target.value)
+  }
+  render(){
+    const {item,getInfomation,idx,handleLabelSub} = this.props
+    return item.show ? <p className={styles.staticTagActive}>
+        <span className={`${styles.tagSpan} ${styles.selectTagSpan} ${setFontColorSize(2,6)}`} data-flg="current" onClick={(e)=>handleLabelSub(e,item.questionId,idx)}>
+          {item.name}
+          <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+        </span>
+        {
+          item.inpValue||this.state.isEdit?<div title={this.state.value} className={styles.iptTipWrap} onClick={this.handleEdit}>
+            <input 
+            ref="iptTip"
+            onBlur={this.handleBlur}
+            onInput={this.handleInput}
+            className={styles.iptValue}
+            type="text"/>
+            <span></span>
+          </div>:<span className={styles.iptValueBtn} onClick={this.handleEdit}>点击备注</span>
+        }
+    </p>:
+    <p >
+        <i className={`${styles.tagSpan} ${styles.tagSpanS} ${setFontColorSize(2)}`} data-flg="current" onClick={(e)=>handleLabelSub(e,item.questionId,idx)}>
+          {item.name}
+          <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+        </i>
+    </p>
+  }
+}
+export default InspectName;

+ 256 - 0
src/components/AddNewInspect/InspectName/index.less

@@ -0,0 +1,256 @@
+@import "~@less/variables.less";
+.slideLi {
+    // cursor: pointer;
+    // color: #767676;
+    position: relative;
+    padding: 10px 0px 10px 0;
+    border-bottom:1px dashed #989DA3;
+    margin-top: 5px;
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        &:before {
+            content: '\300C';
+        }
+        &:after {
+            content: '\300D';
+        }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 15px;
+        height: 15px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: -4px;
+        top: 0px;
+        background: @closeIcon;
+        background-color: #fff;
+        background-size: 100% 100%;
+    }
+}
+.slideLi:hover{
+    background:#F2F2F2;
+    border-radius: 4px;
+       .partDel{
+        background: @closeHor;
+        background-color: #fff;
+        background-size: 100% 100%;
+      } 
+}
+.staticTagActive {
+    cursor: pointer;
+    color: #333;
+    // display: inline-block;
+    position: relative;
+    vertical-align: top;
+    padding: 2px 10px 10px 10px;
+    box-sizing: border-box;
+    width: 100%;
+    float: left;
+    span {
+        border-bottom: 1px solid #666666 ;
+    }
+}
+
+.staticTag {
+    cursor: pointer;
+    // color: #767676;
+    color: @blue;
+    padding-top: 10px;
+    display: inline-block;
+    position: relative;
+    /* &:before {
+        content: '\300C';
+    }
+    &:after {
+        content: '\300D';
+    } */
+}
+.table {
+    color: #000;
+    width: 100%;
+    tr {
+        line-height: 18px;
+        height: 18px;
+        width: 100%;
+        font-size: unset;
+        td {
+          cursor: default;
+          padding-top: 3px;
+          font-size: unset;
+          span {
+              font-size: unset;
+          }
+        }
+    }
+    tr > td {
+        padding: 0 10px;
+        box-sizing: border-box;
+    }
+}
+
+.searchResult {
+    .searchResultT {
+        img {
+            float: right;
+        }
+    }
+}
+
+.excelDataLists {
+    position: relative;
+    background-color: #f1f1f1;
+    border: 1px solid #ccc;
+    .close {
+        width: 13px;
+        height: 13px;
+        position: absolute;
+        top: -5px;
+        right: -5px;
+        z-index: 30;
+        background-color: #fff;
+        border-radius: 50%;
+    }
+    .excelDataLis {
+        padding: 2px 0px;
+        border-bottom: 1px dashed #989DA3;
+        .excelDataTitle {
+            display: inline-block;
+            width: 20%;
+            vertical-align: top;
+            padding-left: 10px;
+            float: left;
+        }
+        table {
+            width: 80%;
+            tr {
+                height: 16px;
+                line-height: 16px;
+                width: 100%;
+            }
+            td {
+                text-align: left;
+                padding-top: 6px;
+                cursor: default;
+            }
+            .excelUnit {
+                width: auto;
+                margin-left: 5px;
+            }
+        }
+    }
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #EDEDED;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
+  .num {
+    color: @blue;
+  }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo, .imgInfo1 {
+  width: 15px;
+  height: 17px;
+  border-bottom: 0 none !important;
+  background: url('../img/info2.png') no-repeat center center;
+  background-size: 100% auto; 
+  position: absolute;
+  top: -10px;
+  left: 50%;
+  margin-left: -8px;
+  display: none;
+  cursor: pointer;
+}
+.imgInfo1 {
+    top: -13px;
+  }
+  .imgInfo:hover, .imgInfo1:hover {
+    background: url('../img/info3.png') no-repeat center center;
+    background-size: 100% auto; 
+  }
+.tagSpan {
+  display: inline-block;
+  position: relative;
+}
+.tagSpanS {
+    font-weight: bold;
+    color: #000;
+}
+.selectTagSpan {
+  color: #000;
+  font-weight: bold;
+}
+.tagSpan:hover {
+    .imgInfo, .imgInfo1 {
+        display: block;
+      }
+}
+.iptValue {
+    width: 100px;
+    color: #3B9ED0;
+    font-size: 12px;
+    margin-left: 10px;
+    background-color: #EDF8FF;
+    padding: 0 16px 0 3px;
+}
+.iptValueBtn {
+    color: #3B9ED0;
+    width: 60px;
+    height: 22px;
+    line-height: 22px;
+    background-color: #EDF8FF;
+    text-align: center;
+    display: inline-block;
+    font-size: 12px;
+    border-radius: 4px;
+    border-bottom: 0 !important;
+    margin-left: 10px;
+}
+.iptTipWrap {
+    display: inline-block;
+    position: relative;
+    span {
+        display: inline-block;
+        width: 10px;
+        height: 11px;
+        background: url('../../../common/images/edit1.png') no-repeat;
+        position: absolute;
+        right: 3px;
+        top: 5px;
+        border-bottom: 0;
+    }
+}
+.iptTipWrap:hover {
+    span {
+        background: url('../../../common/images/edit2.png') no-repeat;
+    }
+}

+ 99 - 0
src/components/AddNewInspect/SlideExcel/index.jsx

@@ -0,0 +1,99 @@
+import React, { Component } from "react";
+import styles from "./index.less";
+import { normalVal, timestampToTime, getStatusImg,setFontColorSize } from '@utils/tools';
+import slideUp from "@common/images/slide-up.png";
+import slideDown from "@common/images/slide-down.png";
+class SlideExcel extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show: false
+    };
+    this.toTime = this.toTime.bind(this)
+    this.handleSlide = this.handleSlide.bind(this)
+  }
+  toTime(time) {
+    let tmpTim = time.split(',').join('') - 0
+    if (time && tmpTim.toString() != 'NaN') {
+      let date = new Date('1900-01-01');
+      let dateTim = date.getTime();
+      let times = (tmpTim - 2) * 24 * 60 * 60 * 1000;
+      let result = timestampToTime(dateTim + times).split(' ')[0]
+      return result;
+    } else {
+      return time;
+    }
+  }
+  handleSlide() {
+    let tmpShow = this.state.show
+    this.setState({
+      show: !tmpShow
+    })
+  }
+  render() {
+    const { items, item, idx, getInfomation, dateTime } = this.props;
+    const { show } = this.state;
+    return (
+      <li className={`${styles.excelDataLis} clearfix`} style={{ border: items.lisExcelRes.length - 1 == idx ? 0 : '' }}>
+        <span className={styles.excelDataTitle}>
+          <span className={`${styles.tagSpan} ${styles.selectTagSpan}`}>
+            <span className={`${styles.menus} ${setFontColorSize(2)}`}>{item.menus}</span>
+            <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: item.lisExcelItem[0].uniquemealName || '', type: 12, position: 1 })}></span>
+          </span>
+        </span>
+        <table className={`${styles.table} ${setFontColorSize(2)}`}>
+          {show ? (item.lisExcelItem && item.lisExcelItem.map((value, idx) => {
+            return <tr>
+              <td style={{ width: '30%' }}>
+                <span className={styles.tagSpan}>
+                  {value.itemName}
+                  <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                </span>
+              </td>
+              <td style={{ width: '20%' }}>
+                {
+                  getStatusImg(value.type, value.value, 1)
+                }
+                {value.unit}</td>
+              <td style={{ width: '25%' }}>
+                {normalVal(value.min, value.max)}
+              </td>
+              <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '化验时间: ' + this.toTime(value.time)}</td>
+            </tr>
+          })) : (item.lisExcelItem && item.lisExcelItem.map((value, idx) => {
+            if (idx < 4) {
+              return <tr>
+                <td style={{ width: '30%' }}>
+                  <span className={styles.tagSpan}>
+                    {value.itemName}
+                    <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                  </span>
+                </td>
+                <td style={{ width: '20%' }}>
+                  {
+                    getStatusImg(value.type, value.value, 1)
+                  }
+                  {value.unit}</td>
+                <td style={{ width: '25%' }}>
+                  {normalVal(value.min, value.max)}
+                </td>
+                <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '化验时间: ' + this.toTime(value.time)}</td>
+              </tr>
+            }
+          }))
+          }
+        </table>
+        {
+          item.lisExcelItem && item.lisExcelItem.length > 5 ?
+            <div className={`${styles.slides} ${setFontColorSize(2)}`} onClick={this.handleSlide}>
+              {
+                show ? <span>收起</span> : <span>剩余<span className={styles.num}>{item.lisExcelItem.length - 4}</span>项</span>
+              }
+              <img src={show ? slideUp : slideDown} alt="" />
+            </div> : null
+        }
+      </li>
+    );
+  }
+}
+export default SlideExcel;

+ 199 - 0
src/components/AddNewInspect/SlideExcel/index.less

@@ -0,0 +1,199 @@
+@import "~@less/variables.less";
+.excelDataLis {
+    // cursor: pointer;
+    color: #767676;
+    position: relative;
+    padding-top: 10px;
+    padding-bottom: 10px;
+    border-bottom:1px dashed #989DA3;
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        &:before {
+            content: '\300C';
+        }
+        &:after {
+            content: '\300D';
+        }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 13px;
+        height: 13px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: 0;
+        top: 12px;
+        background-color: #fff;
+    }
+}
+
+
+.table {
+  color: #000;
+  width: 100%;
+  // display: inline-block;
+  tr {
+    line-height: 18px;
+    height: 18px;
+    width: 100%;
+    font-size: unset;
+    td {
+      padding-top: 3px;
+      font-size: unset;
+      span {
+        font-size: unset;
+      }
+    }
+  }
+}
+
+
+.itemPart {
+    height: 28px;
+    // line-height: 28px;
+    overflow: hidden;
+    padding-top: 0 !important;
+    width: 290px;
+    float: left;
+    padding: 0 15px;
+    box-sizing: border-box;
+    span {
+        display: inline-block;
+    }
+    .itemPartL {
+        max-width: 180px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        float: left;
+    }
+    .itemPartR {
+        width: 62px;
+        outline: none;
+        float: right;
+    }
+    .itemPartT {
+        float: right;
+        input {
+            width: 40px;
+            text-align: center;
+        }
+        .unit {
+            display: inline-block;
+        }
+    }
+}
+.itemPartOne {
+    width: 100% !important;
+}
+
+.excelDataLis {
+    padding: 2px 0px;
+    border-bottom: 1px dashed #989DA3;
+    .excelDataTitle {
+        width: 100%;
+        vertical-align: top;
+        padding-left: 10px;
+        float: left;
+        color: #000;
+    }
+    table {
+        width: 100%;
+        tr {
+            height: 16px;
+            line-height: 16px;
+            width: 100%;
+        }
+        td {
+            text-align: left;
+            padding-top: 6px;
+            padding-left: 10px;
+            cursor: default;
+        }
+        .excelUnit {
+            width: auto;
+            margin-left: 5px;
+        }
+    }
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #EDEDED;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+    font-size: unset;
+  }
+  img{
+    vertical-align: middle;
+  }
+  .num {
+    color: @blue;
+  }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo , .imgInfo1{
+  width: 15px;
+  height: 17px;
+  border-bottom: 0 none !important;
+  background: url('../img/info2.png') no-repeat center center;
+  background-size: 100% auto; 
+  position: absolute;
+  top: -10px;
+  left: 50%;
+  margin-left: -8px;
+  display: none;
+  cursor: pointer;
+}
+.imgInfo1 {
+  top: -13px;
+}
+.imgInfo:hover, .imgInfo1:hover {
+  background: url('../img/info3.png') no-repeat center center;
+  background-size: 100% auto; 
+}
+.excelDataTitle {
+  .tagSpan {
+    display: inline-block;
+    line-height: 28px;
+  }
+}
+.tagSpan {
+  display: inline-block;
+  position: relative;
+}
+.selectTagSpan {
+  // color: #000;
+  // font-weight: bold;
+  // .menus {
+  //   border-bottom: 1px solid #666666;
+  // }
+}
+.tagSpan:hover {
+  .imgInfo, .imgInfo1 {
+    display: block;
+  }
+ 
+}

+ 185 - 0
src/components/AddNewInspect/SlidePic/index.jsx

@@ -0,0 +1,185 @@
+import React, { Component } from "react";
+import styles from "./index.less";
+import { normalVal,getArrow,timestampToTime,getDomUpDown,getPageCoordinate,setPosition,setFontColorSize } from '@utils/tools';
+import { InspectCommon, Notify,DelToast} from '@commonComp';
+import slideUp from "@common/images/slide-up.png";
+import slideDown from "@common/images/slide-down.png";
+import $ from 'jquery';
+import date1 from '../img/date1.png';
+import ScrollArea from 'react-scrollbar';
+import InspectName from '../InspectName';
+
+import up from '@images/up.png';
+import down from '@images/down.png';
+
+class SlidePic extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show:false,
+      activeInd:false,
+      activeName:'',
+      canEdit:true,
+      style:'',
+    };
+    this.toTime = this.toTime.bind(this);
+    this.handleSlide = this.handleSlide.bind(this);
+    this.handleDel = this.handleDel.bind(this);
+    this.handleCancel = this.handleCancel.bind(this);
+    this.delConfirm = this.delConfirm.bind(this);
+    this.timeSure = this.timeSure.bind(this);
+    this.setEdit = this.setEdit.bind(this);
+    this.handleLabelSub = this.handleLabelSub.bind(this);
+    this.handleBlur = this.handleBlur.bind(this);
+  }
+  handleChangeDate(date) {
+    // console.log(date,'外')
+  }
+  
+  componentDidMount() {
+    const {item} = this.props;
+    $(document).click((event) => {
+      if($(event.target).attr("id")!='addClose'&&$(event.target).attr("id")!='delTit'){
+        this.setState({
+          activeInd:false
+        })
+      }
+    });
+    let type = getArrow(item.minValue,item.maxValue,item.value||null)
+    this.setState({style:type,value:item.value,time:item.time})
+    const that = this;
+    document.addEventListener('mousedown',function(e){
+      //onMousedown的目标为滚动条时,标签填写单不关闭
+      if(e.target.className=='scrollbar'){
+        that.isBar = true;
+      }else{
+        that.isBar = false;
+      }
+    });
+    // this.setState({ dateTime: getCurrentDate(1) })
+  }
+  toTime(time){
+    let tmpTim = time.split(',').join('')-0
+    if(time && tmpTim.toString() != 'NaN'){
+      let date = new Date('1900-01-01');
+      let dateTim = date.getTime();
+      let times = (tmpTim-2)*24*60*60*1000;
+      let result = timestampToTime(dateTim+times).split(' ')[0]
+      return result;
+    }else{
+      return time;
+    }
+  }
+  handleSlide(){
+    let tmpShow = this.state.show
+    this.setState({
+      show:!tmpShow
+    })
+  }
+  setEdit(){
+    this.setState({
+      canEdit:false
+    },()=>{
+      $("#canEdit").focus()
+      $("#canEdit").blur(()=>{
+        this.setState({canEdit:true})
+      })
+    })
+  }
+  handleDel(time){
+    const {handleDelClick,item} = this.props;
+    this.setState({
+      activeInd:true,
+      activeName:item.uniqueName,
+    })
+    handleDelClick&&handleDelClick(1,time);
+  }
+  handleCancel(){
+    this.setState({
+      activeInd:false,
+      activeName:''
+    })
+  }
+  delConfirm(item){
+    const {handleDelConfirm,handlePush} = this.props;
+    handleDelConfirm&&handleDelConfirm(item);
+    Notify.success("删除成功");
+    handlePush && handlePush({mode:8});       //右侧推送
+    this.setState({
+      activeInd:false,
+      activeName:''
+    })
+  }
+  timeSure(date){
+    const {handleChangeDate} = this.props;
+    handleChangeDate&&handleChangeDate(date)
+  }
+  handleLabelSub(e,questionId,idx){
+    const {handleLabelSub,handleFillShow,setHighter,refreshScroller} = this.props;
+    handleLabelSub(e,questionId,idx);
+    handleFillShow(e,idx);
+    //弹窗高度超出屏幕,增加页面高度
+    setPosition(e,"#inspectFill",setHighter);
+    /*setTimeout(function(){//如果化验下面有很多数据,则会跳过头
+      refreshScroller()&&refreshScroller().scrollYTo(290);
+    })*/
+  }
+  handleInput(e,item){
+    const {setTipValue} = this.props
+    setTipValue(item,e.target.value)
+    let type = getArrow(item.minValue,item.maxValue,e.target.value||null)
+    this.setState({
+      value:e.target.value,
+      style:type
+    })
+  }
+  handleBlur(){
+    const {handlePush} = this.props;
+    handlePush && handlePush({mode:8});       //右侧推送
+  }
+  render() {
+    const {item,time} = this.props;
+    const {canEdit,activeInd,activeName,value,style} = this.state;
+    return (
+      item.flg == 1?<li key={item.time} className={`${styles.slideLi} clearfix`}> 
+          <span className={styles.bigname}>{item.uniqueName}</span>
+          <span className={styles.smallname}></span>
+          <span className={styles.edit}></span>
+          <span className={styles.maxmin}></span>
+          <span className={styles.pass}>化验时间:{item.time}</span>
+          <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item.time)}}></span>
+          <DelToast show={time==item.time&&activeInd?true:false}
+                    name={activeName} 
+                    right={'-34px'}
+                    top={'30px'}
+                    cancel={this.handleCancel}
+                    confirm={()=>{this.delConfirm(item)}}/>
+      </li>:<li key={item.time} className={`${styles.slideLi} clearfix`}> 
+          <span className={styles.bigname}>{item.name}</span>
+          <span className={styles.smallname}>{item.uniqueName}</span>
+          <span className={styles.edit}>
+            <input disabled={canEdit} type="text" 
+              id="canEdit" 
+              onDoubleClick={this.setEdit}
+              style={{color:style==2||style==4?'red':style==1?'#D949FF':'#333'}}
+              placeholder='(填写)'
+              autoComplete="off"
+              value={value}
+              onInput={(e)=>{this.handleInput(e,item)}}
+              onBlur={()=>{this.handleBlur()}}
+              /><img style={{display:style==1||style==2?'inline-block':'none'}} src={style==1?down:style==2?up:''} />{item.units}
+          </span>
+          <span className={styles.maxmin}>{normalVal(item.minValue,item.maxValue)}</span>
+          <span className={styles.pass}>化验时间:{item.time}</span>
+          <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item.time)}}></span>
+          <DelToast show={time==item.time&&activeInd?true:false}
+                    name={activeName}
+                    right={'-34px'}
+                    top={'30px'}
+                    cancel={this.handleCancel}
+                    confirm={()=>{this.delConfirm(item)}}/>
+      </li>
+    );
+  }
+}
+export default SlidePic;

+ 258 - 0
src/components/AddNewInspect/SlidePic/index.less

@@ -0,0 +1,258 @@
+@import "~@less/variables.less";
+.slideLi {
+    // cursor: pointer;
+    // color: #767676;
+    position: relative;
+    padding: 10px 0px 10px 0;
+    border-bottom:1px dashed #989DA3;
+    margin-top: 5px;
+    span {
+        display: inline-block;
+        padding: 0 5px;
+        box-sizing: border-box;
+    }
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        // &:before {
+        //     content: '\300C';
+        // }
+        // &:after {
+        //     content: '\300D';
+        // }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 15px;
+        height: 15px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: -4px;
+        top: 0px;
+        background: @closeIcon;
+        background-color: #fff;
+        background-size: 100% 100%;
+    }
+    .bigname {
+        width: 20%;
+        font-weight: bold;
+    }
+    .smallname {
+        width: 25%;
+    }
+    .edit {
+        width: 15%;
+        input {
+            width: 40px;
+        }
+        i {
+            
+        }
+    }
+    .maxmin {
+        width: 15%;
+    }
+}
+.slideLi:hover{
+    background:#F2F2F2;
+    border-radius: 4px;
+       .partDel{
+        background: @closeHor;
+        background-color: #fff;
+        background-size: 100% 100%;
+      } 
+}
+.staticTagActive {
+    cursor: pointer;
+    color: #333;
+    // display: inline-block;
+    position: relative;
+    vertical-align: top;
+    padding: 2px 10px 10px 10px;
+    box-sizing: border-box;
+    width: 100%;
+    float: left;
+    span {
+        border-bottom: 1px solid #666666 ;
+    }
+}
+
+.staticTag {
+    cursor: pointer;
+    // color: #767676;
+    color: @blue;
+    padding-top: 10px;
+    display: inline-block;
+    position: relative;
+    /* &:before {
+        content: '\300C';
+    }
+    &:after {
+        content: '\300D';
+    } */
+}
+.table {
+    color: #000;
+    width: 100%;
+    tr {
+        line-height: 18px;
+        height: 18px;
+        width: 100%;
+        font-size: unset;
+        td {
+          cursor: default;
+          padding-top: 3px;
+          font-size: unset;
+          span {
+              font-size: unset;
+          }
+        }
+    }
+    tr > td {
+        padding: 0 10px;
+        box-sizing: border-box;
+    }
+}
+
+.searchResult {
+    .searchResultT {
+        img {
+            float: right;
+        }
+    }
+}
+
+.excelDataLists {
+    position: relative;
+    background-color: #f1f1f1;
+    border: 1px solid #ccc;
+    .close {
+        width: 13px;
+        height: 13px;
+        position: absolute;
+        top: -5px;
+        right: -5px;
+        z-index: 30;
+        background-color: #fff;
+        border-radius: 50%;
+    }
+    .excelDataLis {
+        padding: 2px 0px;
+        border-bottom: 1px dashed #989DA3;
+        .excelDataTitle {
+            display: inline-block;
+            width: 20%;
+            vertical-align: top;
+            padding-left: 10px;
+            float: left;
+        }
+        table {
+            width: 80%;
+            tr {
+                height: 16px;
+                line-height: 16px;
+                width: 100%;
+            }
+            td {
+                text-align: left;
+                padding-top: 6px;
+                cursor: default;
+            }
+            .excelUnit {
+                width: auto;
+                margin-left: 5px;
+            }
+        }
+    }
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #EDEDED;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
+  .num {
+    color: @blue;
+  }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo, .imgInfo1 {
+  width: 15px;
+  height: 17px;
+  border-bottom: 0 none !important;
+  background: url('../img/info2.png') no-repeat center center;
+  background-size: 100% auto; 
+  position: absolute;
+  top: -10px;
+  left: 50%;
+  margin-left: -8px;
+  display: none;
+  cursor: pointer;
+}
+.imgInfo1 {
+    top: -13px;
+  }
+  .imgInfo:hover, .imgInfo1:hover {
+    background: url('../img/info3.png') no-repeat center center;
+    background-size: 100% auto; 
+  }
+.tagSpan {
+  display: inline-block;
+  position: relative;
+}
+.tagSpanS {
+    font-weight: bold;
+    color: #000;
+}
+.selectTagSpan {
+  color: #000;
+  font-weight: bold;
+}
+.tagSpan:hover {
+    .imgInfo, .imgInfo1 {
+        display: block;
+      }
+}
+.iptValue {
+    width: 60px;
+    color: #3B9ED0;
+    font-size: 12px;
+}
+.iptValueBtn {
+    color: #3B9ED0;
+    width: 60px;
+    height: 22px;
+    line-height: 22px;
+    background-color: #EDF8FF;
+    text-align: center;
+    display: inline-block;
+    font-size: 12px;
+    border-radius: 4px;
+    border-bottom: 0 !important;
+    margin-left: 10px;
+}

+ 255 - 0
src/components/AddNewInspect/SlideSelect/index.jsx

@@ -0,0 +1,255 @@
+import React, { Component } from "react";
+import styles from "./index.less";
+import { normalVal,timestampToTime,getPageCoordinate,setPosition,setFontColorSize } from '@utils/tools';
+import { InspectCommon, Calendar,DelToast} from '@commonComp';
+import slideUp from "@common/images/slide-up.png";
+import slideDown from "@common/images/slide-down.png";
+import $ from 'jquery';
+import date1 from '../img/date1.png';
+import ScrollArea from 'react-scrollbar';
+import InspectName from '../InspectName';
+
+class SlideSelect extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show:false,
+      activeInd:false,
+      activeName:'',
+    };
+    this.toTime = this.toTime.bind(this);
+    this.handleSlide = this.handleSlide.bind(this);
+    this.handleDel = this.handleDel.bind(this);
+    this.handleCancel = this.handleCancel.bind(this);
+    this.delConfirm = this.delConfirm.bind(this);
+    this.timeSure = this.timeSure.bind(this);
+    this.handleLabelSub = this.handleLabelSub.bind(this);
+  }
+  handleChangeDate(date) {
+    // console.log(date,'外')
+  }
+  componentDidMount() {
+    $(document).click((event) => {
+      let inspectToggleDate = document.getElementById("inspectToggleDate")
+      let timeIcon = document.getElementById("timeIcon")
+      let calendarDate = document.getElementById("calendarDate")
+      if (calendarDate) {
+        if (inspectToggleDate != event.target && timeIcon != event.target && !calendarDate.contains(event.target)) {
+          this.props.handleShowDate();
+        }
+      }
+    });
+  }
+  toTime(time){
+    let tmpTim = time.split(',').join('')-0
+    if(time && tmpTim.toString() != 'NaN'){
+      let date = new Date('1900-01-01');
+      let dateTim = date.getTime();
+      let times = (tmpTim-2)*24*60*60*1000;
+      let result = timestampToTime(dateTim+times).split(' ')[0]
+      return result;
+    }else{
+      return time;
+    }
+  }
+  handleSlide(){
+    let tmpShow = this.state.show
+    this.setState({
+      show:!tmpShow
+    })
+  }
+  handleDel(){
+    const {handleDelClick,idx,item} = this.props;
+    this.setState({
+      activeInd:true,
+      activeName:item.name
+    })
+    handleDelClick&&handleDelClick(1,idx);
+  }
+  handleCancel(){
+    this.setState({
+      activeInd:false,
+      activeName:''
+    })
+  }
+  delConfirm(){
+    const {handleDelConfirm} = this.props;
+    handleDelConfirm&&handleDelConfirm();
+    this.setState({
+      activeInd:false,
+      activeName:''
+    })
+  }
+  timeSure(date){
+    const {handleChangeDate} = this.props;
+    handleChangeDate&&handleChangeDate(date)
+  }
+  handleLabelSub(e,questionId,idx){
+    const {handleLabelSub,handleFillShow,setHighter,refreshScroller} = this.props;
+    handleLabelSub(e,questionId,idx);
+    handleFillShow(e,idx);
+    //弹窗高度超出屏幕,增加页面高度
+    setPosition(e,"#inspectFill",setHighter);
+    /*setTimeout(function(){//如果化验下面有很多数据,则会跳过头
+      refreshScroller()&&refreshScroller().scrollYTo(290);
+    })*/
+  }
+  render() {
+    const {windowWidth,handleFillShow,setTipValue,setHighter,refreshScroller,getInfomation,handleConfirm,changeActivePart,getItemList,date,item,idx,showDetails,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,showToast} = this.props;
+    const {show,activeInd,activeName} = this.state;
+    let numPlus = 0,numPlus1 = 0;
+    let staticTime = {}
+    if(dateTime){
+      let tmp1 = dateTime.split(' ')[0].split('-')
+      let tmp2 = (dateTime).split(' ').length>1&&(dateTime).split(' ')[1].split(':')
+      staticTime = {
+        year: tmp1[0]-0,
+        month: tmp1[1]-0,
+        day: tmp1[2]-0,
+        hour: tmp2[0],
+        minute: tmp2[1],
+        second: tmp2[2]
+      }
+    }
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'6px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
+    const listLen = currentData.details&&currentData.details.length;
+    const stopScroll =(windowWidth<1300&&listLen>12)||(windowWidth>1299&&listLen>24);
+    return (
+      <li key={item.questionId} className={`${styles.slideLi} clearfix`}> 
+        <InspectName 
+          item={item} 
+          handleLabelSub={this.handleLabelSub} 
+          idx={idx} 
+          getInfomation={getInfomation} 
+          refreshScroller={refreshScroller} 
+          setHighter={setHighter} 
+          setTipValue={setTipValue}
+          handleFillShow={handleFillShow}></InspectName>
+        {
+          item.details && item.details.map((val)=>{
+            if(val.value && val.value != ''){
+              numPlus = ++numPlus
+            }
+          })
+        }
+        {
+            item.show ?
+                <table className={`${styles.table} ${setFontColorSize(2)}`}>
+                    {
+                        show?(item.details.map((val)=>{
+                            if(val.value && val.value != ''){
+                                return <tr>
+                                    <td style={{width:'30%'}}>
+                                      <span className={styles.tagSpan}>
+                                        {val.name}
+                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12,showName:item.name+'('+val.name+')'})}></span>                                        
+                                      </span>
+                                    </td>
+                                    {showDetails(val)}
+                                    <td style={{width:'25%'}}>
+                                      {val.questionDetailList.length > 0?'':normalVal(val.minValue,val.maxValue)}
+                                    </td>
+                                    <td style={{width:'25%'}}>{'化验时间:'+item.time}</td>
+                                </tr>
+                            }
+                        })):(item.details.map((val)=>{
+                          if(val.value && val.value != '' ){
+                              ++numPlus1;
+                              if(numPlus1 < 5){
+                                return <tr>
+                                    <td style={{width:'30%'}}>
+                                      <span className={styles.tagSpan}>
+                                        {val.name}
+                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12,showName:item.name+'('+val.name+')'})}></span>
+                                      </span>
+                                    </td>
+                                    {showDetails(val)}
+                                    <td style={{width:'25%'}}>
+                                        {val.questionDetailList.length > 0?'':normalVal(val.minValue,val.maxValue)}
+                                    </td>
+                                    <td style={{width:'25%'}}>{'化验时间:'+item.time}</td>
+                                </tr>
+                              }
+                          }
+                      }))
+                    }
+                </table>:null
+        }
+        {
+          numPlus > 4 ?  
+          <div className={styles.slides} onClick={this.handleSlide}>
+              {
+                show ? <span>收起</span> :<span>剩余<span className={styles.num}>{numPlus-4}</span>项</span>
+              }
+              <img src={show ?slideUp:slideDown} alt=""/>
+          </div>:null
+        }
+        <div className={styles.searchResult}>
+            {
+                showFill && fillActive.id == item.id && idx == currentIdx ?
+                    <InspectCommon
+                        showFill={showFill}
+                        handleClear={(e)=>{
+                            changeActivePart('','',true)
+                        }}
+                        handleConfirm={(e)=>{
+                            if(JSON.stringify(currentData) == '{}'){
+                                handleConfirm(e,idx,dateTime,fillActive);
+                            }else{
+                                handleConfirm(e,idx,dateTime,currentData);
+                            }
+                            changeShowFill()
+                            handlePush&&handlePush({mode:8});     //右侧推送
+                        }}
+                    >
+                    
+                        <div className={styles.searchResultT}>
+                            <img style={{"position":"absolute","top":"8px","right":"8px",cursor:"pointer"}} onClick={handleShowDate} src={date1} alt="" id="inspectToggleDate"/>
+                            <p style={{position:"absolute",right:"25px",top:"4px",lineHeight:"28px",cursor:"pointer",paddingRight:"10px"}} onClick={handleShowDate} id="timeIcon">
+                                {
+                                  dateTime
+                                }
+                            </p>
+                            <div style={{display:date?"block":"none",position:"relative"}}>
+                                {/* 日期组件 */}
+                                {
+                                  date?<Calendar timeLis={staticTime} isShow={true} timeSure={this.timeSure} needTime={true} sure={true} handleChange={this.handleChangeDate}></Calendar>:null
+                                }
+                                {/* <Calendar timeLis={staticTime} isShow={true} timeSure={this.timeSure} needTime={true} sure={true} handleChange={handleChangeDate}></Calendar> */}
+                            </div>
+                        </div>
+                            {/* 填写单内容显示 */}
+                      {stopScroll?<ScrollArea speed={0.8}
+                                  horizontal={false}
+                                  stopScrollPropagation={true}
+                                  style={{maxHeight:'358px'}}
+                                  className={styles["area"]}
+                                  verticalContainerStyle={contStyle}
+                                  verticalScrollbarStyle={barStyle}
+                                  contentClassName="content">
+                            { getItemList() }
+                      </ScrollArea>:getItemList()}
+                    </InspectCommon>
+                : null
+            }
+        </div>
+        {/*<img className={styles.partDel} src={close} alt="删除项" onClick={()=>{handleDelClick(1,idx)}}/>*/}
+        <span id="addClose" className={styles.partDel} onClick={this.handleDel}></span>
+        <DelToast show={showToast&&activeInd?true:false}
+                    name={activeName} 
+                    right={'-34px'}
+                    top={'30px'}
+                    cancel={this.handleCancel}
+                    confirm={this.delConfirm}/>
+    </li>
+    );
+  }
+}
+export default SlideSelect;

+ 234 - 0
src/components/AddNewInspect/SlideSelect/index.less

@@ -0,0 +1,234 @@
+@import "~@less/variables.less";
+.slideLi {
+    // cursor: pointer;
+    // color: #767676;
+    position: relative;
+    padding: 10px 0px 10px 0;
+    border-bottom:1px dashed #989DA3;
+    margin-top: 5px;
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        &:before {
+            content: '\300C';
+        }
+        &:after {
+            content: '\300D';
+        }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 15px;
+        height: 15px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: -4px;
+        top: 0px;
+        background: @closeIcon;
+        background-color: #fff;
+        background-size: 100% 100%;
+    }
+}
+.slideLi:hover{
+    background:#F2F2F2;
+    border-radius: 4px;
+       .partDel{
+        background: @closeHor;
+        background-color: #fff;
+        background-size: 100% 100%;
+      } 
+}
+.staticTagActive {
+    cursor: pointer;
+    color: #333;
+    // display: inline-block;
+    position: relative;
+    vertical-align: top;
+    padding: 2px 10px 10px 10px;
+    box-sizing: border-box;
+    width: 100%;
+    float: left;
+    span {
+        border-bottom: 1px solid #666666 ;
+    }
+}
+
+.staticTag {
+    cursor: pointer;
+    // color: #767676;
+    color: @blue;
+    padding-top: 10px;
+    display: inline-block;
+    position: relative;
+    /* &:before {
+        content: '\300C';
+    }
+    &:after {
+        content: '\300D';
+    } */
+}
+.table {
+    color: #000;
+    width: 100%;
+    tr {
+        line-height: 18px;
+        height: 18px;
+        width: 100%;
+        font-size: unset;
+        td {
+          cursor: default;
+          padding-top: 3px;
+          font-size: unset;
+          span {
+              font-size: unset;
+          }
+        }
+    }
+    tr > td {
+        padding: 0 10px;
+        box-sizing: border-box;
+    }
+}
+
+.searchResult {
+    .searchResultT {
+        img {
+            float: right;
+        }
+    }
+}
+
+.excelDataLists {
+    position: relative;
+    background-color: #f1f1f1;
+    border: 1px solid #ccc;
+    .close {
+        width: 13px;
+        height: 13px;
+        position: absolute;
+        top: -5px;
+        right: -5px;
+        z-index: 30;
+        background-color: #fff;
+        border-radius: 50%;
+    }
+    .excelDataLis {
+        padding: 2px 0px;
+        border-bottom: 1px dashed #989DA3;
+        .excelDataTitle {
+            display: inline-block;
+            width: 20%;
+            vertical-align: top;
+            padding-left: 10px;
+            float: left;
+        }
+        table {
+            width: 80%;
+            tr {
+                height: 16px;
+                line-height: 16px;
+                width: 100%;
+            }
+            td {
+                text-align: left;
+                padding-top: 6px;
+                cursor: default;
+            }
+            .excelUnit {
+                width: auto;
+                margin-left: 5px;
+            }
+        }
+    }
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #EDEDED;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
+  .num {
+    color: @blue;
+  }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo, .imgInfo1 {
+  width: 15px;
+  height: 17px;
+  border-bottom: 0 none !important;
+  background: url('../img/info2.png') no-repeat center center;
+  background-size: 100% auto; 
+  position: absolute;
+  top: -10px;
+  left: 50%;
+  margin-left: -8px;
+  display: none;
+  cursor: pointer;
+}
+.imgInfo1 {
+    top: -13px;
+  }
+  .imgInfo:hover, .imgInfo1:hover {
+    background: url('../img/info3.png') no-repeat center center;
+    background-size: 100% auto; 
+  }
+.tagSpan {
+  display: inline-block;
+  position: relative;
+}
+.tagSpanS {
+    font-weight: bold;
+    color: #000;
+}
+.selectTagSpan {
+  color: #000;
+  font-weight: bold;
+}
+.tagSpan:hover {
+    .imgInfo, .imgInfo1 {
+        display: block;
+      }
+}
+.iptValue {
+    width: 60px;
+    color: #3B9ED0;
+    font-size: 12px;
+}
+.iptValueBtn {
+    color: #3B9ED0;
+    width: 60px;
+    height: 22px;
+    line-height: 22px;
+    background-color: #EDF8FF;
+    text-align: center;
+    display: inline-block;
+    font-size: 12px;
+    border-radius: 4px;
+    border-bottom: 0 !important;
+    margin-left: 10px;
+}

BIN
src/components/AddNewInspect/img/close.png


BIN
src/components/AddNewInspect/img/date1.png


BIN
src/components/AddNewInspect/img/date2.png


BIN
src/components/AddNewInspect/img/info2.png


BIN
src/components/AddNewInspect/img/info3.png


+ 397 - 0
src/components/AddNewInspect/index.jsx

@@ -0,0 +1,397 @@
+import React from 'react';
+import { SearchOption, InspectCommon, Calendar, Notify, ConfirmModal, Add, DelToast } from '@commonComp';
+import SlideExcel from './SlideExcel';
+import SlidePic from './SlidePic';
+import { deepClone, getPageCoordinate, getStatusImg,getDomUpDown ,getCurrentDate,setPosition,getCalendarDate} from '@utils/tools';
+import styles from './index.less';
+import ScrollArea from 'react-scrollbar';
+import store from '@store';
+import $ from 'jquery';
+class AddNewInspect extends React.Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show: false,
+      showFill: false,
+      date: false,
+      currentIdx: '',
+      dateTime: "",
+      currentData: {},
+      numPlus: 0,     //判断是否所有的填写单都是空
+      num: 0,            //暂存数据,获取一次,不能每次都是新的数据
+      type: null,
+      time: null,
+      pageTop: '',
+      // tmpIds: [],      //内层外层
+      impId: null
+    }
+    this.$ul = React.createRef();
+    this.handleChangeDate = this.handleChangeDate.bind(this)
+    this.handleShowDate = this.handleShowDate.bind(this)
+    this.getItemList = this.getItemList.bind(this)
+    this.getSearchList = this.getSearchList.bind(this)
+    this.getCommonList = this.getCommonList.bind(this)
+    this.changeActivePart = this.changeActivePart.bind(this)
+    this.showDetails = this.showDetails.bind(this)
+    this.handleDelConfirm = this.handleDelConfirm.bind(this)
+    this.handleCancel = this.handleCancel.bind(this)
+    this.handleSearchAdvice = this.handleSearchAdvice.bind(this)
+    this.changeShowFill = this.changeShowFill.bind(this)
+    this.handleFillShow = this.handleFillShow.bind(this)
+    this.handleDelClick = this.handleDelClick.bind(this)
+  }
+  handleDelConfirm() {//弹窗确定
+    const { delPartItem, handleCloseExcel, handlePush } = this.props;
+    const { type, id, impId } = this.state;
+    if (type == 1) {
+      delPartItem(id)
+    } else if (type == 2) {
+      handleCloseExcel(impId)
+    }
+    Notify.success("删除成功");
+    handlePush && handlePush({mode:8});       //右侧推送
+  }
+  handleDelClick(type, time) {
+    if (type == 2) {
+      this.setState({
+        impId: idx,
+        type: type,
+        id: null
+      })
+    } else {
+      this.setState({
+        type: type,
+        time: time,
+        impId: null
+      })
+    }
+  }
+  handleCancel() {
+    this.setState({
+      type: null,
+      id: null,
+      impId: null
+    })
+  }
+  componentDidMount() {
+    $(document).click((event) => {
+      let searchWrap = document.getElementById("searchWrapAdvice");   // 搜索按钮
+      let searchOption = document.getElementById("searchOption");   // 搜索列表
+      let inspectFill = document.getElementById("inspectFill");         // 公共填写单
+
+      let _del = $('#delBox')[0];       // 删除弹窗  
+      let _impClose = $('#impClose')[0];         // 导入删除按钮
+      let _addClose = $('#addClose')[0];         // 添加删除按钮
+      let _closeTil = $('#delTit')[0];   // 弹窗标题
+      if (searchOption&&!this.isBar) {//onMousedown的目标为滚动条时,添加弹窗不关闭
+        if (searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
+          if(this.state.show){
+            this.props.setHighter(48)
+          }
+          this.setState({ show: false });
+        }
+      }
+      if (inspectFill&&!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭
+        if ($(event.target).attr('id') != "getSureTime"&&event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
+          if(this.state.showFill){
+            this.props.setHighter(48)
+          }
+          this.setState({ showFill: false, date: false });
+        }
+      }
+
+      if (_del&&!this.isBar) {//onMousedown的目标为滚动条时,删除弹窗不关闭
+        if (!event.target.isEqualNode(_impClose) && !event.target.isEqualNode(_addClose) && !event.target.isEqualNode(_del) && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)) {
+          this.setState({
+            id: null,
+            impId: null
+          })
+        }
+      }
+    });
+    const that = this;
+    document.addEventListener('mousedown',function(e){
+      //onMousedown的目标为滚动条时,标签填写单不关闭
+      if(e.target.className=='scrollbar'){
+        that.isBar = true;
+      }else{
+        that.isBar = false;
+      }
+    });
+    // this.setState({ dateTime: getCurrentDate(1) })
+  }
+  componentWillReceiveProps(nextProps) {
+    if (nextProps.fillActive.name != this.props.fillActive.name) {
+      this.setState({ num: 0 })
+    }
+  }
+  changeShowFill() {
+    this.setState({ showFill: false })
+    this.props.setHighter(48)
+  }
+  handleChangeDate(info) {
+    let date = getCalendarDate(info);
+    this.setState({ dateTime: date, date: false })
+  }
+  handleSearchAdvice(e) {
+    let tmpShow = this.state.show;
+    this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
+    // e.stopPropagation();
+    if(tmpShow){
+      this.props.setHighter(48)
+    }else{
+      this.props.detailClick(5)
+      setPosition(e,"#searchOption",this.props.setHighter)
+    }
+  }
+  handleFillShow(e, idx) {
+    let tmpShow = this.state.showFill;
+    let baseList = store.getState().inspect.fillActive;
+    this.setState({
+      showFill: !tmpShow,
+      currentIdx: idx,
+      currentData: baseList,
+      dateTime: baseList.time ? baseList.time : getCurrentDate(1)
+    })
+    // e.stopPropagation();
+  }
+  handleShowDate() {
+    this.setState({
+      date: !this.state.date
+    })
+  }
+  changeActivePart(idx, val, clear) {
+    let nums = this.state.num;
+    let fillActive;
+    if (nums == 0) {
+      fillActive = this.props.fillActive;
+    } else {
+      fillActive = this.state.currentData;
+    }
+    ++nums;
+    this.setState({ num: nums });
+    let tempArr = deepClone(fillActive);
+
+    if (clear) {    //点击清空按钮,至清初输入的数字
+      for (let i = 0; i < tempArr.details.length; i++) {
+        tempArr.details[i].value = ''
+        tempArr.show = false;
+      }
+      tempArr.time = getCurrentDate(1);
+      this.setState({ currentData: tempArr })
+      return;
+    } else {
+      let tempNumPlus = 0;
+      for (let i = 0; i < tempArr.details.length; i++) {
+        if (i == idx) {
+          tempArr.details[i].value = val
+        }
+        if (tempArr.details[i].value != undefined && tempArr.details[i].value != '') {
+          tempArr.show = true;
+        } else {
+          ++tempNumPlus;
+          if (tempNumPlus == tempArr.details.length) {
+            tempArr.show = false;
+          }
+        }
+      }
+      tempArr.time = this.state.dateTime;
+      this.setState({ currentData: tempArr })
+    }
+  }
+  getItemList() {        //填写单展示
+    let number = this.state.num;
+    let fillActive;
+    if (number == 0) {
+      fillActive = this.props.fillActive;
+    } else {
+      fillActive = this.state.currentData;
+    }
+    return <ul className={styles.searchLis} ref={this.$ul}>
+      {
+        fillActive && fillActive.details && fillActive.details.map((item, idx) => {
+          if (item.controlType == 1) {
+            return (
+              <li className={`${styles.itemPart} ${fillActive.details.length > 1 ? '' : styles.itemPartOne}`}>
+                <span className={styles.itemPartL}>{item.name}</span>
+                <span className={styles.itemPartT}>
+                  <select className={styles.itemPartR} onChange={(e) => {
+                    if (e.target.value == '请选择') {
+                      this.changeActivePart(idx, '')
+                      return;
+                    }
+                    this.changeActivePart(idx, e.target.value);
+                  }}
+                  >
+                    <option value="请选择">请选择</option>
+                    {
+                      (item.questionDetailList).map((val) => {
+                        return <option value={val.name}
+                          selected={val.name == item.value ? true : false}
+                        >{val.name}</option>
+                      })
+                    }
+                  </select>
+                </span>
+              </li>
+            )
+          } else if (item.controlType == 6) {
+            return (
+              <li className={`${styles.itemPart} ${fillActive.details.length > 1 ? '' : styles.itemPartOne}`}>
+                <span className={styles.itemPartL} title={item.name}>{item.name}</span>
+                <span className={styles.itemPartT}>
+                  <input type="text"
+                    placeholder="(填写)"
+                    value={item.value}
+                    onKeyUp={(e) => { this.changeActivePart(idx, e.target.value.trim()) }}
+                  />
+                  <p className={styles.unit} title={item.labelSuffix}>{item.labelSuffix}</p>
+                </span>
+              </li>
+            )
+          }
+        })
+      }
+    </ul>
+  }
+  getSearchList(list) {//搜索列表
+    const { handleSign } = this.props;
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
+    return <ScrollArea speed={0.8}
+                       horizontal={false}
+                       stopScrollPropagation={list.length>6?true:false}
+                       style={{'max-height':'205px'}}
+                       className={styles["area"]}
+                       verticalContainerStyle={contStyle}
+                       verticalScrollbarStyle={barStyle}
+                       contentClassName="content">
+      <ul className={`${styles.searchLiUl} ${styles.searchIsp}`}>
+      {
+        list && list.map((item, idx) => {
+          return <li key={idx}
+            className={styles.searchLi}
+            title={item.uniqueName}
+            onClick={() => {
+              this.props.setHighter(48)
+              handleSign(item, idx, 'search');
+              this.setState({ show: false })
+            }}
+          >
+            {item.uniqueName}
+          </li>
+        })
+      }
+      </ul></ScrollArea>;
+  }
+  getCommonList() {//常用列表
+    const { handleSign, inspectList } = this.props;
+    return <ul className={styles.searchLiUl}>
+      {
+        inspectList && inspectList.map((item, idx) => {
+          return <li key={idx}
+            className={styles.searchLi}
+            title={item.name}
+            onClick={() => {
+              this.props.setHighter(48)
+              handleSign(item.questionId, idx, 'common');
+              this.setState({ show: false })
+            }}
+          >
+            {item.name}
+          </li>
+        })
+      }
+    </ul>
+  }
+  showDetails(val) {
+    let min = val.minValue, max = val.maxValue, value = val.value, dom = '';
+    dom = getDomUpDown(min,max,value)
+    if (val.questionDetailList.length > 0) {
+      return val.questionDetailList.map((item) => {
+        if (val.value == item.name) {
+          return <td style={{ width: '20%' }} className={item.abnormal != '0' ? "red" : ''}>{val.value}</td>
+        }
+      })
+    } else {
+      // return <td style={{ width: '20%' }}><span className={(val.value - 0).toString() == 'NaN' ? "red" : (val.maxValue || val.minValue) ? (val.value > val.maxValue || val.value < val.minValue ? "red" : '') : ''}>{val.value}</span> {val.labelSuffix}</td>
+      return <td style={{ width: '20%' }}>{dom} {val.labelSuffix}</td>
+    }
+  }
+  render() {
+    const {setHighter,refreshScroller, getInfomation,setTipValue, handleChangeValue,labelListSmall,inspectList, inspectVal, list, labelListBig, windowHeight, windowWidth,detailClick, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush,handleDelConfirm } = this.props;
+    const { tmpId, tmpIdx, time, pageTop, impId } = this.state;
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
+    return (
+      <div className={styles.wrapper}>
+        <div className={styles.check}>
+          
+          <ul className={styles.labelWrap} >
+            {
+              labelListSmall && labelListSmall.map((item, idx) => {
+                return <SlidePic
+                  item={item}
+                  time={time}
+                  handlePush={handlePush}
+                  handleDelClick={this.handleDelClick}
+                  setTipValue={setTipValue}
+                  handleDelConfirm={handleDelConfirm}
+                ></SlidePic>
+              })
+            }
+            {
+              labelListBig && labelListBig.map((item, idx) => {
+                return <SlidePic
+                  item={item}
+                  time={time}
+                  handlePush={handlePush}
+                  handleDelClick={this.handleDelClick}
+                  setTipValue={setTipValue}
+                  handleDelConfirm={handleDelConfirm}
+                ></SlidePic>
+              })
+            }
+          </ul>
+        </div>
+        <div style={{ position: "relative", clear: "both", top: "5px" }}>
+          <Add showText="添加医嘱" handleClick={(e) => this.handleSearchAdvice(e)} id="searchWrapAdvice" />
+          {this.state.show ? <SearchOption searchType="2" detailClick={detailClick} windowHeight={windowHeight} height={280} refreshScroller={refreshScroller} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
+            {list && list.length > 0 ? this.getSearchList(list) : (inspectVal == '' ? '' : <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>暂无筛选项</p>)}
+            {/* {
+              (list && list.length > 0) || (inspectVal != '') || (inspectList&&inspectList.length==0) ? '' : <div>
+                <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>常用化验项</p>
+                <ScrollArea speed={0.8}
+                            horizontal={false}
+                            stopScrollPropagation={true}
+                            style={{height:'225px'}}
+                            className={styles["area"]}
+                            verticalContainerStyle={contStyle}
+                            verticalScrollbarStyle={barStyle}
+                            contentClassName="content">
+                {
+                  this.getCommonList()
+                }
+                </ScrollArea>
+              </div>
+            } */}
+          </SearchOption> : ''}
+        </div>
+      </div>
+    )
+  }
+}
+
+export default AddNewInspect;

+ 260 - 0
src/components/AddNewInspect/index.less

@@ -0,0 +1,260 @@
+
+@import "~@less/variables.less";
+.labelWrap>li {
+    // cursor: pointer;
+    // color: #767676;
+    position: relative;
+    padding-top: 10px;
+    padding-bottom: 10px;
+    border-bottom:1px dashed #989DA3;
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        &:before {
+            content: '\300C';
+        }
+        &:after {
+            content: '\300D';
+        }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 13px;
+        height: 13px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: 0;
+        top: 12px;
+        background-color: #fff;
+    }
+}
+.staticTagActive {
+    cursor: pointer;
+    color: #333;
+    display: inline-block;
+    position: relative;
+    vertical-align: top;
+    padding: 2px 10px;
+    box-sizing: border-box;
+    width: 20%;
+    float: left;
+    span {
+        border-bottom: 1px solid #666666 ;
+    }
+}
+
+.staticTag {
+    cursor: pointer;
+    // color: #767676;
+    color: @blue;
+    padding-top: 10px;
+    display: inline-block;
+    position: relative;
+    /* &:before {
+        content: '\300C';
+    }
+    &:after {
+        content: '\300D';
+    } */
+}
+.labelWrap {
+    .table {
+        color: #000;
+        width: 80%;
+        tr {
+            line-height: 18px;
+            height: 18px;
+            width: 100%;
+            td {
+                padding-top: 3px;
+            }
+        }
+    }
+
+}
+
+.wrapper {
+    position: relative;
+}
+.fillWrap {
+    display: none;
+}
+.searchLiUl {
+  /*overflow-y: auto;
+  max-height: 225px;*/
+  // min-height: 80px;
+}
+.searchIsp {
+    display: block !important;
+    left: 107px !important;
+    width: 250px !important;
+    top: 0 !important;
+    float: right;
+}
+.searchLi {
+    height: 36px;
+    line-height: 36px;
+    padding: 0 30px;
+    padding-top: 0;
+    box-sizing: border-box;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    border: 1px solid transparent;
+    cursor: pointer;
+    background-color: #f5f5f5;
+}
+
+.searchLi:hover {
+    border: 1px solid @blue;
+}
+
+.searchResult {
+    .searchResultT {
+        img {
+            float: right;
+        }
+    }
+}
+.searchLis {
+    padding-top: 10px;
+    margin-top: 5px;
+    margin-bottom: 5px;
+    border-top: 1px solid #EAEDF1;
+    overflow: hidden;
+    box-sizing: border-box;
+}
+.itemPart {
+    height: 28px;
+    line-height: 28px;
+    overflow: hidden;
+    padding-top: 0 !important;
+    width: 330px;
+    float: left;
+    padding: 0 15px;
+    box-sizing: border-box;
+    span {
+        display: inline-block;
+    }
+    .itemPartL {
+        max-width: 180px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        float: left;
+    }
+    .itemPartR {
+        width: 62px;
+        outline: none;
+        float: left;
+        margin-top: 5px;
+    }
+    .itemPartT {
+        float: right;
+        width: 120px;
+        input {
+            width: 40px;
+            text-align: center;
+            float: left;
+            margin-right: 10px;
+            height: 28px;
+            line-height: 28px;
+        }
+        .unit {
+            display: inline-block;
+            width: 70px;
+            height: 28px;
+            line-height: 28px;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+        }
+    }
+}
+.itemPartOne {
+    width: 100% !important;
+}
+.excelDataLists {
+    position: relative;
+    background-color: rgba(237,237,237,0.4);
+    border: 1px solid #ccc;
+    .close {
+        display: inline-block;
+        width: 15px;
+        height: 15px;
+        position: absolute;
+        top: -5px;
+        right: -5px;
+        z-index: 1;
+        border-radius: 50%;
+        background: @closeIcon;
+        // background: url('/img/close.png') no-repeat center center;
+        background-size: 100% 100%;
+        background-color: #fff;
+    }
+    .excelDataLis {
+        padding: 2px 0px;
+        border-bottom: 1px dashed #989DA3;
+        .excelDataTitle {
+            display: inline-block;
+            width: 20%;
+            vertical-align: top;
+            padding-left: 10px;
+            float: left;
+        }
+        table {
+            width: 80%;
+            tr {
+                height: 16px;
+                line-height: 16px;
+                width: 100%;
+            }
+            td {
+                text-align: left;
+                padding-top: 6px;
+            }
+            .excelUnit {
+                width: auto;
+                margin-left: 5px;
+            }
+        }
+    }
+}
+.excelDataLists:hover{
+    .close{
+        background: @closeHor;
+        background-size: 100% 100%;
+        background-color: #fff;
+        cursor: pointer;
+    }   
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #ccc;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
+}

+ 3 - 1
src/components/BlockEmrCont/index.jsx

@@ -13,6 +13,7 @@ import PastHistory from './PastHistory'
 import PersonalHistory from './PersonalHistory'
 import FamilyHistory from './FamilyHistory'
 import MarriageHistory from './MarriageHistory'
+import NewAdvice from '@containers/NewAdvice';
 import MenstruationHistory from './MenstruationHistory'
 // import OtherHistory from './OtherHistory';
 import CheckBody from './CheckBody';
@@ -82,7 +83,8 @@ class BlockEMRCont extends Component {
           <Inspect setHighter={this.setHighter}></Inspect>
           <AssistCheck setHighter={this.setHighter}></AssistCheck>
           <Diagnosis setHighter={this.setHighter} hideChronic={true}></Diagnosis>
-          <AdviceContainer></AdviceContainer>
+          <NewAdvice setHighter={this.setHighter}></NewAdvice>
+          {/* <AdviceContainer></AdviceContainer> */}
         </div>
       </ScrollArea>
       <OperationContainer hideLabel={true}></OperationContainer>

+ 1 - 1
src/components/BlockEmrCont/index.less

@@ -1,7 +1,7 @@
 @import "~@less/variables.less";
 .area{
   height: 100%;
-  min-width: 1006px;
+  min-width: 500px;
 }
 .EMR-container{
   background: #fff;

+ 3 - 3
src/components/DiagResultSearch/index.jsx

@@ -44,8 +44,8 @@ class DiagResultSearch extends Component {
   getSearchList(searchResult) {
     return <div className={style['search-result']}>
       {
-        searchResult && searchResult.map((item) => {
-          return (<div key={item.id} className={style['search-result-item']}>
+        searchResult && searchResult.map((item,idx) => {
+          return (<div key={idx} className={style['search-result-item']}>
             <DiagnosticItem setHighter={this.props.setHighter} title={true} item={item} clearInput={this.clearInput} type='search'/>
           </div>)
         })
@@ -70,7 +70,7 @@ class DiagResultSearch extends Component {
           <ScrollArea speed={0.8}
                       horizontal={false}
                       stopScrollPropagation={searchResult.length>6?true:false}
-                      style={{height:'257px'}}
+                      style={{'max-height':'200px',width:'356px'}}
                       className={style["area"]}
                       verticalContainerStyle={contStyle}
                       verticalScrollbarStyle={barStyle}

+ 12 - 10
src/components/DiagnosticItem/index.jsx

@@ -46,23 +46,26 @@ class DiagnosticItem extends Component{
         })
     }
     chooseDiagodal(item) {
-        const { diagnosticList,getTips, type } = this.props;
+        const { diagnosticList,getTips, type ,addDiagnostic} = this.props;
         // getTips && getTips(item);
         // if (type == 'search') {
         //     getTips && getTips({type:7,name: item.name, position: 1});
         // }
         for (let i = 0; i < diagnosticList.length; i++) {
-            if(diagnosticList[i].id === item.id && diagnosticList[i].name === item.name) {
+            if(diagnosticList[i].name === item.name) {
                 Notify.info('该诊断已存在');
                 return
             }
         }
+        this.props.setHighter&&this.props.setHighter(48)
+        const diagType = 1;
+        this.addDiagodal(diagType)
         this.setState({
             visible: true
         })
        
     }
-    getTips(item, e) {console.log(item)
+    getTips(item, e) {
         e.stopPropagation();
         const {getTips } = this.props;
         getTips && getTips({id:item.id,type:7,name: item.name, position: 1});
@@ -70,7 +73,6 @@ class DiagnosticItem extends Component{
     addDiagodal(diagType){
         const {item, isChronicMag,mode,EMRScrollCont,type,addDiagnostic, clearInput, hideSearch} = this.props;
         item.type = diagType;
-
          /*if(item.type == 2&&mode=='0') {      //文本模式不走慢病。6.0慢病取消
              isChronicMag(item);
          }*/
@@ -114,24 +116,24 @@ class DiagnosticItem extends Component{
         const { item, title, type } = this.props
         return (<span className={style['diag-item']} >
                     <span className={`${style['diag-name']}`} 
-                          title = {title && item.name + (item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': '')}
+                          title = {item.name}
                           onMouseEnter={this.handleMouseEnterDrug.bind(this)}
                           onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                           onClick={() =>{this.chooseDiagodal(item)}}
                           >
-                        <p className={`${style['diag-name-box']} ${type == 'search'?style['diag-name-search']:style['diag-name-disSelect']}`}>{item.name} {item.retrievalName ? '('+ item.retrievalName+')': ''}</p>
-                        {type== 'disSelect' &&<img className={style['info-img']}  
+                        <p className={`${style['diag-name-box']} ${type == 'search'?style['diag-name-search']:style['diag-name-disSelect']}`}>{item.name} </p>
+                        {/* {type== 'disSelect' &&<img className={style['info-img']}  
                                 title='点击i图标可查看详细说明'
                                 style ={hasEnterItem  ? {display: "inline-block"} : {display: "none"}}
                                 src={hasEnterImg ? infoMove : infoShow} 
                                 onMouseEnter={this.handleMouseEnterImg.bind(this)}
                                 onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
                                 onClick={this.getTips.bind(this,item)}
-                        />}
+                        />} */}
                     </span>
-                    <ConfirmModal visible={visible} okText='初诊' cancelText='复诊' confirm={this.confirm}  cancel={this.cancel} close={this.close}>
+                    {/* <ConfirmModal visible={visible} okText='初诊' cancelText='复诊' confirm={this.confirm}  cancel={this.cancel} close={this.close}>
                         <div className={style['confirm-info']}>确定选择“{item.name}”为</div> 
-                    </ConfirmModal>
+                    </ConfirmModal> */}
                    
                 </span>)
     }

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

@@ -310,21 +310,21 @@ class DiagnosticList extends Component {
                                       <span   className={style['diag-name-box']} style={{maxWidth: windowWidth > 1024 ?windowWidth-900 +'px':'130px'}}>
                                         {item.name}
                                       </span>
-                                      <img className={`${style['info-img']}`}
+                                      {/* <img className={`${style['info-img']}`}
                                           title='点击i图标可查看详细说明'
                                           style ={hasEnterItem===index  ? {display: "inline-block"} : {display: "none"}}
                                           src={hasEnterImg ? infoMove : infoShow} 
                                           onMouseEnter={this.handleMouseEnterImg.bind(this)}
                                           onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
                                           onClick={this.handleClickDiag.bind(this,item,false,false,false)}
-                                      />
+                                      /> */}
                                     </span> 
-                                    {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
+                                    {/* {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
                                     <span className={style['treat']}
                                           // style ={hasTreat ? '' : { color: 'gray', cursor: 'text'}}
                                           onClick={() =>{this.showTreat(item, index)}}>
                                           治疗方案
-                                    </span>
+                                    </span> */}
                                     {/*{isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
                                           onClick={this.showAssessFn.bind(this,item)}>
                                         管理评估

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

@@ -59,7 +59,7 @@
     position: relative;
     color:#000;
     font-weight: bold;
-    cursor: pointer;
+    cursor: default;
     line-height: 18px;
 }
 .diag-name-box {

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

@@ -240,7 +240,7 @@ class Inspect extends React.Component {
 
   }
   render() {
-    const {hideAllDrop,setHighter, fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
+    const {hideAllDrop,setHighter,labelListBig, fetchPushInfos,getInfomation,labelListSmall, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList,detailClick,handleDelConfirm } = this.props;
     const { ieVersion, isIE, hide,importLis } = this.state;
     const { checkSystemIpt, onClose,handleBindFileApi,closeInIcss,showSlideImport } = this;
     if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -298,12 +298,16 @@ class Inspect extends React.Component {
         >
           <div style={{ padding: '10px', boxSizing: 'border-box',color:'#000' }} >
             <AddInspect
+              handleDelConfirm={handleDelConfirm}
+              labelListBig={labelListBig}
+              labelListSmall={labelListSmall}
               handleSign={handleSign}
               setHighter={setHighter}
               refreshScroller={this.refreshScroller}
               handleChangeValue={handleChangeValue}
               list={list}
               handlePush={fetchPushInfos}
+              detailClick={detailClick}
               labelList={labelList}
               handleLabelSub={handleLabelSub}
               fillActive={fillActive}

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


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


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


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


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


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


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


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


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


File diff suppressed because it is too large
+ 2 - 0
src/components/NewAdvice/dists/jquery.fileapi.min.js


+ 357 - 0
src/components/NewAdvice/index.jsx

@@ -0,0 +1,357 @@
+import React from 'react';
+import { ItemBox, ConfirmModal, WrapModalContainer } from '@commonComp';
+import AddNewInspect from '../AddNewInspect';
+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,getCurrentDate,setFontColorSize } from '@utils/tools.js';
+import { dragBox } from '@utils/drag';
+import WrapModalBody from '@containers/WrapModalBody';
+import {getMRAnalyse} from '@store/async-actions/pushMessage';
+import {SET_CURRENT_MODULE} from '@types/homePage';
+
+
+(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 NewAdvice extends React.Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      val: '',
+      visible: false,
+      dom: [],
+      isIE: isIE(),
+      ieVersion: null,
+      height: '-1',
+      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.closeInIcss = this.closeInIcss.bind(this);
+    this.showSlideImport = this.showSlideImport.bind(this);
+    this.refreshScroller = this.refreshScroller.bind(this);
+  }  
+  componentDidMount() {
+    $(document).click((event) => {
+      let searchWrap = $('#importInspectBtn')[0];   // 导入按钮按钮
+      let searchOption = $('#importList')[0];   // 下拉列表
+      if (searchOption&&$('#importList').css("display")=="block") {
+        if(searchWrap != event.target){
+          this.setState({ importLis: false });
+        }
+      }
+    });
+    this.props.setContext(this.context)
+  }
+  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");
+            const productId = getUrlArgObject("productId");
+            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,
+                productId: productId
+              },
+              complete: function (err, xhr) {
+                if (!err) {
+                  let res = JSON.parse(xhr.response);
+                  if(res.code == 0){
+                    let message = res.data.messages;
+                    if(res.data.lisExcelRes){
+                      for(let i = 0;i < res.data.lisExcelRes.length;i++){
+                        let tmpLisExcelItem = res.data.lisExcelRes[i]
+                        if(tmpLisExcelItem.lisExcelItem){
+                          for(let j = 0;j < tmpLisExcelItem.lisExcelItem.length;j++){
+                            tmpLisExcelItem.lisExcelItem[j].time = tmpLisExcelItem.lisExcelItem[j].time||getCurrentDate(1)
+                          }
+                        }
+                      }
+                    }
+                    store.dispatch(getExcelList(res.data));
+                    store.dispatch(getMRAnalyse());
+                    fetchPushInfos && fetchPushInfos({mode:8});
+                    if (message && message.length != 0) {
+                      that.setState({
+                        visible: true,
+                        dom: message,
+                        height: message.length
+                      })
+                    }
+                  }else{
+                    Notify.error(res.msg)
+                  }
+                  $("#choose").val("");
+                } else {
+                  let res = JSON.parse(xhr.response);
+                  Notify.error(res.msg)
+                  $("#choose").val("");
+                }
+              }
+            });
+          }
+        });
+    });
+  }
+  handleImportExcel() {
+    this.inputRef.click();
+    const storeState = store.getState()
+    const {moduleName} = storeState.homePage
+    if(moduleName != '化验') {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:'化验'
+      });
+      store.dispatch(getMRAnalyse());
+    }
+  }
+  cancel() {
+    this.setState({ visible: false })
+  }
+  getStyle() {
+    const { ieVersion } = this.state;
+    if (ieVersion && ieVersion <= 9) {
+      return styles.disabledBtn;
+    } else {
+      return styles.button;
+    }
+  }
+  getWarings(lis) {
+    <ul>
+      {
+        lis.length > 0 && lis.map((val) => {
+          return <li>
+            {val}
+          </li>
+        })
+      }
+    </ul>
+  }
+  checkSystemIpt() {
+    this.setState({
+      hide: true
+    })
+    const storeState = store.getState()
+    const {moduleName} = storeState.homePage
+    if(moduleName != '化验') {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:'化验'
+      });
+      store.dispatch(getMRAnalyse());
+    }
+  }
+  onClose() {
+    this.setState({
+      hide: false
+    })
+    dragBox('previewWrapper', 'previewStatic', 'del')
+  }
+  closeInIcss(){
+    this.setState({
+      hide: false
+    })
+  }
+  showSlideImport(){
+    let flg = this.state.importLis
+    this.setState({
+      importLis:!flg
+    })
+    const storeState = store.getState()
+    const {moduleName} = storeState.homePage
+    if(moduleName != '化验') {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:'化验'
+      });
+      store.dispatch(getMRAnalyse());
+    }
+  }
+  refreshScroller(){
+    //滚动条对象
+    return this.context.scrollArea;
+    /*this.context.scrollArea.refresh();
+    this.context.scrollArea.scrollBottom();*/
+
+  }
+  render() {
+    const {hideAllDrop,setHighter,labelListBig, fetchPushInfos,getInfomation,labelListSmall, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList,detailClick,handleDelConfirm } = this.props;
+    const { ieVersion, isIE, hide,importLis } = this.state;
+    const { checkSystemIpt, onClose,handleBindFileApi,closeInIcss,showSlideImport } = this;
+    if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
+      ++numFlg
+      numFlg == 1?handleBindFileApi():null
+    }
+    return (
+      <div className={styles.wrapper}>
+        {/* 导入功能插件,ie8/9权限问题暂未解决,先隐藏 */}
+        <div className={styles.top}>
+          <span id="inspectResultData" className={styles.newAdviceTitle}> </span>
+          {/* <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}> */}
+          {/* <div className={this.getStyle()} style={{ display: hospitalMsg.import_way_lis == 0||hospitalMsg.import_way_lis ==undefined ? 'none' : 'block' }}> */}
+            {/* <button disabled={ieVersion&&ieVersion>9?true:false}onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>导入化验结果</button>
+            <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
+            {/* {0没有,1本地,2医院,3本地和医院} */}
+            {/* {
+              hospitalMsg.import_way_lis == 1 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
+                <p className={styles.importInspectBtn}>导入化验结果</p>
+                <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
+              </div> : hospitalMsg.import_way_lis == 2 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
+                <p className={styles.importInspectBtn}>导入化验结果</p>
+              </div> : hospitalMsg.import_way_lis == 3 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
+                <p id="importInspectBtn" className={styles.importInspectBtn}>导入化验结果</p>
+                {
+                  <ul className={styles.importSelect} style={{display:importLis?'block':'none'}} id="importList">
+                    <li className={styles.excelIpt}>
+                      <div onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>本地导入</div>
+                      <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" 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
+            } */}
+
+            {/* {
+              hide ? <WrapModalContainer title={'导入化验数据'} width={1000} height={570} onClose={onClose}>
+                <WrapModalBody
+                  height={570}
+                  closeInIcss={closeInIcss}
+                ></WrapModalBody>
+              </WrapModalContainer> : null
+            } */}
+          {/* </div> */}
+        </div>
+        <ItemBox
+          hideAllDrop={hideAllDrop}
+          className={styles.title}
+          title={'医嘱'}
+          editable={false}
+          border={true}
+          // style={{marginRight:'0'}}
+          marginTop={'0px'}
+        >
+          <div style={{ padding: '10px', boxSizing: 'border-box',color:'#000' }} >
+            <AddNewInspect
+              handleDelConfirm={handleDelConfirm}
+              labelListBig={labelListBig}
+              labelListSmall={labelListSmall}
+              handleSign={handleSign}
+              setHighter={setHighter}
+              refreshScroller={this.refreshScroller}
+              handleChangeValue={handleChangeValue}
+              list={list}
+              handlePush={fetchPushInfos}
+              detailClick={detailClick}
+              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}
+              windowWidth={windowWidth}
+              setTipValue={setTipValue}
+            >
+            </AddNewInspect>
+          </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>
+    )
+  }
+}
+
+NewAdvice.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
+export default NewAdvice;

+ 112 - 0
src/components/NewAdvice/index.less

@@ -0,0 +1,112 @@
+@import "~@less/mixin.less";
+
+.wrapper{
+  // margin-right: 470px;
+}
+.top {
+    position: relative;
+    margin: 20px 20px -21px 20px;
+    span {
+        margin-left: 60px;
+        border: 1px dashed @part-border-color;
+        border-bottom: 1px solid #fff;
+        display: inline-block;
+        width: 118px;
+        height: 30px;
+        line-height: 30px;
+        text-align: center;
+        position: relative;
+        z-index: 10;
+    }
+    .newAdviceTitle {
+      border: 0 none;
+    }
+    .button {
+        float: right;
+        border-radius: 5px;
+        border: 1px solid @template-color;
+        // overflow: hidden;
+        margin-top: -3px;
+        position: relative;
+        z-index: 10;
+    }
+    .disabledBtn{
+        float: right;
+        border-radius: 5px;
+        border: 1px solid @placeholder-color;
+        overflow: hidden;
+        button{
+            color:@placeholder-color;
+        }
+    }
+    .pushButton {
+        font-size: 12px;
+        padding: 0 8px;
+        background-color: #fff;
+        height: 28px;
+        line-height: 28px;
+        border-radius: 5px;
+        color: @template-color;
+        cursor: pointer;
+        // &:hover {
+        //   .importSelect {
+        //     display: block !important;
+        //   }
+        // }
+    }
+}
+.title {
+    margin-top: 12px !important;
+}
+.excelList {
+    padding-bottom: 20px;
+    max-height: 240px;
+    overflow-y: auto;
+}
+.excelListWaring {
+    height: 30px;
+    line-height: 30px;
+    text-align: center;
+}
+.confirmBtn {
+    .btnCom;
+    width: 100px;
+    height: 34px;
+    line-height: 34px;
+    margin: 10px auto;
+    background-color: #78bddd;
+    // border-radius: 5px;
+    // text-align: center;
+    color: #fff;
+    // cursor: pointer;
+}
+.importInspect{
+  padding: 0 !important;
+}
+.importInspectBtn {
+  padding: 0 8px;
+  font-size: 12px;
+}
+.importSelect {
+  position: absolute;
+  width: 120%;
+  top: 29px;
+  left: 0;
+  z-index: 10;
+  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;
+  }
+}
+

+ 2 - 2
src/containers/AssistCheck.js

@@ -56,8 +56,8 @@ function mapDispatchToProps(dispatch, store) {
         handleChangeValue(val) {
             dispatch(getSearchList(val))
         },
-        handleSign(id,idx,type){
-            dispatch(assistLable(id,idx,type))
+        handleSign(item,type){
+            dispatch(assistLable(item,type))
             dispatch(getMRAnalyse())
         },
         handleDelAssist(idx,name,type){

+ 20 - 7
src/containers/Inspect.js

@@ -16,7 +16,10 @@ import {
   clearLabel,
   delPartItem,
   setContext,
-  setTip
+  setTip,
+  searchType,
+  resetLabel,
+  delOnePic,
 } from '@store/actions/inspect';
 import {
   billing,
@@ -31,6 +34,7 @@ function mapStateToProps(state) {//console.log(state)
     list: state.inspect.list,
     labelList: state.inspect.labelList,
     fillActive: state.inspect.fillActive,
+    shType: state.inspect.shType,
     getExcelDataList: state.inspect.getExcelDataList,
     labelListActive: state.inspect.labelListActive,
     inspectList: state.homePage.inspectList,
@@ -38,6 +42,8 @@ function mapStateToProps(state) {//console.log(state)
     windowWidth: state.homePage.windowWidth,
     inspectVal: state.inspect.inspectVal,
     message: state.patInfo.message,
+    labelListBig: state.inspect.labelListBig,
+    labelListSmall: state.inspect.labelListSmall,
     hospitalMsg: state.homePage.sysConfig || {},
     typeConfig: state.typeConfig
   }
@@ -45,19 +51,26 @@ function mapStateToProps(state) {//console.log(state)
 
 function mapDispatchToProps(dispatch) {
   return {
+    detailClick(val){
+      dispatch(searchType(val))
+    },
     setContext(obj){
       dispatch(setContext(obj))
     },
+    handleDelConfirm(obj){
+      dispatch(delOnePic(obj))
+    },
     handleChangeValue(val) {
       dispatch(getSearchList(val))
     },
     getInfomation(item) {
       dispatch(getConceptDetail(item))
     },
-    handleSign(id, idx, type) {
-      dispatch(setLabel(idx, type))
-      dispatch(getSublableList(id))
-      dispatch(getMRAnalyse())
+    handleSign(arr,id, idx, type) {
+      dispatch(resetLabel(arr))
+      // dispatch(setLabel(idx, type))
+      // dispatch(getSublableList(id))
+      // dispatch(getMRAnalyse())
     },
     handleLabelSub(e, id, idx) {
       dispatch(fillActived(id, idx))
@@ -82,8 +95,8 @@ function mapDispatchToProps(dispatch) {
       dispatch(delPartItem(idx))
       dispatch(getMRAnalyse())
     },
-    setTipValue(idx,value) {
-      dispatch(setTip(idx,value))
+    setTipValue(item,value) {
+      dispatch(setTip(item,value))
     },
     //右侧推送
     fetchPushInfos(obj) {

+ 116 - 0
src/containers/NewAdvice.js

@@ -0,0 +1,116 @@
+import React from 'react';
+import {
+  connect
+} from 'react-redux';
+import newAdvice from '@components/NewAdvice';
+import {
+  getSearchList,
+  getSublableList,
+} from '@store/async-actions/newAdvice';
+import {
+  setLabel,
+  fillActived,
+  fillActiveDetail,
+  checkValueIsChange,
+  delExcelLis,
+  clearLabel,
+  delPartItem,
+  setContext,
+  setTip,
+  searchTypeNew,
+  resetLabel,
+  delOnePic,
+} from '@store/actions/newAdvice';
+import {
+  billing,
+  embedPush,
+  getConceptDetail,
+  getMRAnalyse
+} from '@store/async-actions/pushMessage';
+import {HIDEDROP} from '@types/homePage';
+
+function mapStateToProps(state) {//console.log(state)
+  return {
+    list: state.newAdvice.list,
+    labelList: state.newAdvice.labelList,
+    fillActive: state.newAdvice.fillActive,
+    shType: state.newAdvice.shType,
+    getExcelDataList: state.newAdvice.getExcelDataList,
+    labelListActive: state.newAdvice.labelListActive,
+    inspectList: state.homePage.inspectList,
+    windowHeight: state.homePage.windowHeight,
+    windowWidth: state.homePage.windowWidth,
+    inspectVal: state.newAdvice.inspectVal,
+    message: state.patInfo.message,
+    labelListBig: state.newAdvice.labelListBig,
+    labelListSmall: state.newAdvice.labelListSmall,
+    hospitalMsg: state.homePage.sysConfig || {},
+    typeConfig: state.typeConfig
+  }
+}
+
+function mapDispatchToProps(dispatch) {
+  return {
+    detailClick(val){
+      dispatch(searchTypeNew(val))
+    },
+    setContext(obj){
+      dispatch(setContext(obj))
+    },
+    handleDelConfirm(obj){
+      dispatch(delOnePic(obj))
+    },
+    handleChangeValue(val) {
+      dispatch(getSearchList(val))
+    },
+    getInfomation(item) {
+      dispatch(getConceptDetail(item))
+    },
+    handleSign(arr,id, idx, type) {
+      dispatch(resetLabel(arr))
+      // dispatch(setLabel(idx, type))
+      // dispatch(getSublableList(id))
+      // dispatch(getMRAnalyse())
+    },
+    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));
+      dispatch(getMRAnalyse())
+    },
+    delPartItem(idx) {
+      dispatch(delPartItem(idx))
+      dispatch(getMRAnalyse())
+    },
+    setTipValue(item,value) {
+      dispatch(setTip(item,value))
+    },
+    //右侧推送
+    fetchPushInfos(obj) {
+      //调右侧推送
+      dispatch(embedPush(obj));
+    },
+    hideAllDrop(){
+      dispatch({
+        type:HIDEDROP
+      });
+    },
+  }
+}
+
+const NewInspectAction = connect(mapStateToProps, mapDispatchToProps)(newAdvice);
+
+export default NewInspectAction;

+ 3 - 4
src/store/actions/assistCheck.js

@@ -1,14 +1,13 @@
 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';
 
-export const searchList = (list,val) => ({         //右侧到左侧
+export const searchList = (list,val) => ({         //搜索列表渲染
     type:GET_ASSIST_SEARCH_LIST,
     list,
     val
 })
-export const assistLable = (id,idx,sign) => ({         //添加数据
+export const assistLable = (item,sign) => ({         //添加数据
     type:GET_ASSIST_LABEL,
-    id,
-    idx,
+    item,
     sign
 })
 export const addAssistLabel = (lis) => ({         //右侧推送交到左侧

+ 0 - 3
src/store/actions/diagnosticSearch.js

@@ -21,10 +21,7 @@ export const getSearchResult= (state, action) => {
     let searchResult = []
     action.searchResult && action.searchResult.map((item, index) =>{
         let searchResultItem = {}
-        searchResultItem.id = item.questionId
         searchResultItem.name = item.name
-        searchResultItem.showType = item.showType
-        searchResultItem.retrievalName = item.retrievalName
         searchResultItem.conceptId = item.conceptId
         searchResult.push(searchResultItem)
     }) 

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

@@ -1,4 +1,4 @@
-import {SET_CONTEXT,ADD_LABEL,SEARCH_LIST,SET_LABEL,SET_TIP,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 {SET_CONTEXT,DEL_ONE_PIC,ADD_LABEL,SEARCH_LIST,SET_LABEL,SET_TIP,FILL_ACTIVE,FILL_ACTIVE_DETAIL,GET_EXCEL,CHECK_VALUE_IS_CHANGE,CLEAR_LABEL,RESET_LABEL,CLEAR_ALL_LABEL,DEL_PART_ITEM,DEL_EXCEL_LIST,SEARCH_TYPE} from '../types/inspect';
 
 export const setLabel = (idx,sign) => ({          //搜索后点击选中的结果
     type:SET_LABEL,
@@ -63,8 +63,17 @@ export const setContext = (obj) => ({
     type:SET_CONTEXT,
     obj
 })
-export const setTip = (idx,value) => ({
+export const setTip = (item,value) => ({
     type:SET_TIP,
-    idx,
+    item,
+    value
+})
+export const searchType = (value) => ({
+    type:SEARCH_TYPE,
     value
 })
+
+export const delOnePic = (item) => ({
+    type:DEL_ONE_PIC,
+    item
+})

+ 79 - 0
src/store/actions/newAdvice.js

@@ -0,0 +1,79 @@
+import {SET_CONTEXT,DEL_ONE_PIC,ADD_LABEL,SEARCH_LIST,SET_LABEL,SET_TIP,FILL_ACTIVE,FILL_ACTIVE_DETAIL,GET_EXCEL,CHECK_VALUE_IS_CHANGE,CLEAR_LABEL,RESET_LABEL_NEW,CLEAR_ALL_LABEL,DEL_PART_ITEM_NEW,DEL_EXCEL_LIST,SEARCH_TYPE_NEW} from '../types/newAdvice';
+
+export const setLabel = (idx,sign) => ({          //搜索后点击选中的结果
+    type:SET_LABEL,
+    idx,
+    sign
+})
+export const addLabel = (lis) => ({          //右侧开单
+    type:ADD_LABEL,
+    lis
+})
+export const resetLabel = (list,uniqueName) => ({          //搜索后点击选中的结果重组
+    type:RESET_LABEL_NEW,
+    list,
+    uniqueName
+})
+
+export const fillActived = (id,idx) => ({
+    type:FILL_ACTIVE,                          //选中的标签的填写单
+    id,
+    idx
+})
+
+export const fillActiveDetail = (idx,val) => ({
+    type:FILL_ACTIVE_DETAIL,                       //填写数据更新
+    idx,
+    val
+})
+export const getExcelList = (data) => ({                 //获取导入数据
+    type:GET_EXCEL,
+    data
+})
+export const checkValueIsChange = (idx,time,arr) => ({                 //检查值是否变化
+    type:CHECK_VALUE_IS_CHANGE,
+    idx,
+    time,
+    arr
+})
+export const searchList = (list,val) => ({         //检索数据
+  type:SEARCH_LIST,
+  list,
+  val
+})
+export const clearLabel = (idx) => ({                  //清空
+    type:CLEAR_LABEL,
+    idx
+})
+export const delPartItem = (idx) => ({                  //删除部分
+    type:DEL_PART_ITEM_NEW,
+    idx
+})
+export const delExcelLis = (idx) => ({                  //删除导入的数据
+    type:DEL_EXCEL_LIST,
+    idx
+})
+export const clearAllLabel = (data,dataExcel,saveTextData) => ({                  //清空所有
+    type:CLEAR_ALL_LABEL,
+    data,
+    dataExcel,
+    saveTextData
+})
+export const setContext = (obj) => ({
+    type:SET_CONTEXT,
+    obj
+})
+export const setTip = (item,value) => ({
+    type:SET_TIP,
+    item,
+    value
+})
+export const searchTypeNew = (value) => ({
+    type:SEARCH_TYPE_NEW,
+    value
+})
+
+export const delOnePic = (item) => ({
+    type:DEL_ONE_PIC,
+    item
+})

+ 14 - 6
src/store/async-actions/assistCheck.js

@@ -11,14 +11,22 @@ export const getSearchList = (val) => {
     let sex = baseList.patInfo.message.patientSex;
     return (dispatch) => {
         axios.json('/demo/retrieval/index',{
-            type:'1',
-            age:baseList.patInfo.message.patientAge,
-            inputStr:val,
-            sexType: sex == '男'?'1' : sex == '女'?'2':'3'
+            "age": 10,
+            "inputStr": val,
+            "sex": 1,
+            "type": '3'
         })
         .then((res)=>{
-            const data = res.data.data;
-            dispatch(searchList(data,val.trim()));
+            const data = res.data.data;let curDate=[];
+            let arr = data.pacsNames;
+                for (var key in arr) {
+                    let obj = {}
+                    obj['uniqueName'] = arr[key];
+                    obj['detailName'] = arr[key];
+                    obj['name'] = arr[key];
+                    curDate.push(obj)
+                }
+            dispatch(searchList(curDate,val.trim()));
         })
     }
 };

+ 19 - 13
src/store/async-actions/diagnosticSearch.js

@@ -6,13 +6,13 @@ import { GET_SEARCH } from '@store/types/emergencyHis';
 export const getSearchList = (val,flag) => {
     if(val.trim() == ''){
         // const data = [];
-        if(flag){//��ʷ����
+        if(flag){
             return (dispatch) =>  dispatch({
                 type: GET_SEARCH,
                 searchResult: []
             })
         }
-        return (dispatch) =>  dispatch({//���
+        return (dispatch) =>  dispatch({
             type: GET_SEARCH_RESULT,
             searchResult: []
         })
@@ -27,24 +27,30 @@ export const getSearchList = (val,flag) => {
                 noIds.push(diagnosticList[i].conceptId)
             }
         }
-        json('/retrieval/index',{
-            type:'7',
-            age:state.patInfo.message.patientAge,
-            inputStr:val,
-            sexType: state.patInfo.message.sex,
-            inputIds: noIds
+        json('/demo/retrieval/index',{
+            "type":'4',
+            "age": 10,
+            "inputStr": val,
+            "sex": 1
         })
         .then((res)=>{
-            const data = res.data.data;
-            if(flag){ //��ʷ����
+            const data = res.data.data;let curDate=[];
+            let arr = data.diseaseNames;
+                for (var key in arr) {
+                    let obj = {}
+                    obj['name'] = arr[key];
+                    obj['conceptId'] = '';
+                    curDate.push(obj)
+                }
+            if(flag){ 
                 dispatch({
                     type: GET_SEARCH,
-                    searchResult: data
+                    searchResult: curDate
                 })
-            }else{//���
+            }else{
                 dispatch({
                     type: GET_SEARCH_RESULT,
-                    searchResult: data
+                    searchResult: curDate
                 })
             }
         })

+ 23 - 8
src/store/async-actions/inspect.js

@@ -9,21 +9,36 @@ export const getSearchList = (val) => {
         return (dispatch) => dispatch(searchList(data,''));
     }
     let baseList = store.getState();
-    let sex = baseList.patInfo.message.patientSex;
+    // console.log(baseList)
+    let type = baseList.inspect.shType;
     return (dispatch) => {
         axios.json('/demo/retrieval/index',{
-            type:'5',
-            age:baseList.patInfo.message.patientAge,
-            inputStr:val,
-            sexType:sex == '男'?'1' : sex == '女'?'2':'3'
+            "age": 10,
+            "inputStr": val,
+            "sex": 1,
+            "type": type
         })
         .then((res)=>{
-            const data = res.data.data;
-            dispatch(searchList(data,val.trim()));
+            const data = res.data.data;let curDate=[];
+            if(type==2){
+                curDate = data.lisDetailNames
+            }else{
+                let arr = data.lisNames,tmp=[];
+                for (var key in arr) {
+                    let obj = {}
+                    obj['uniqueName'] = arr[key];
+                    obj['detailName'] = arr[key];
+                    obj['name'] = arr[key];
+                    obj['flg'] = 1;
+                    tmp.push(obj)
+                }
+                curDate=tmp
+            }
+            dispatch(searchList(curDate,val.trim()));
         })
     }
 };
-export const getSublableList = (id,idx) => {
+export const getSublableList = (id,idx) => {//getById
     let baseList = store.getState();
     let sex = baseList.patInfo.message.patientSex;
     return (dispatch) => {

+ 64 - 0
src/store/async-actions/newAdvice.js

@@ -0,0 +1,64 @@
+import axios from '@utils/ajax';
+import store from '@store';
+import { searchList,resetLabel } from '../actions/newAdvice';
+
+export const getSearchList = (val) => {
+    if(val.trim() == ''){
+        const data = [];
+        return (dispatch) => dispatch(searchList(data,''));
+    }
+    let baseList = store.getState();
+    let type = baseList.newAdvice.shType;
+    return (dispatch) => {
+        axios.json('/demo/retrieval/index',{
+            "age": 10,
+            "inputStr": val,
+            "sex": 1,
+            "type": type
+        })
+        .then((res)=>{
+            const data = res.data.data;let curDate=[];
+            if(type==2){
+                curDate = data.lisDetailNames
+            }else{
+                let arr = data.lisNames,tmp=[];
+                for (var key in arr) {
+                    let obj = {}
+                    obj['uniqueName'] = arr[key];
+                    obj['detailName'] = arr[key];
+                    obj['name'] = arr[key];
+                    obj['flg'] = 1;
+                    tmp.push(obj)
+                }
+                let obj = {}
+                    obj['flg'] = type==5?2:1;
+                    obj['name'] = '手术';
+                    obj['uniqueName'] = '手术';
+                    tmp.push(obj)
+                curDate=tmp
+            }
+            dispatch(searchList(curDate,val.trim()));
+        })
+    }
+};
+export const getSublableList = (id,idx) => {//getById
+    let baseList = store.getState();
+    let sex = baseList.patInfo.message.patientSex;
+    return (dispatch) => {
+        axios.json('/questionInfo/getById',{
+            age:baseList.patInfo.message.patientAge,
+            sexType:sex == '男'?'1' : sex == '女'?'2':'3',
+            id: id
+        })
+        .then((res)=>{
+            const data = res.data.data;
+            if (data.controlType == 0) {
+                dispatch(resetLabel(data.questionMapping,data.uniqueName||''));
+            }else if(data.controlType == 1||data.controlType == 6){
+                let arr = [];
+                arr[0] = data;
+                dispatch(resetLabel(arr));
+            }
+        })
+    }
+};

+ 2 - 0
src/store/index.js

@@ -13,6 +13,7 @@ import preview from './reducers/preview';
 import otherHistory from './reducers/otherHistory';
 import diagnosticList from './reducers/diagnosticList';
 import inspect from './reducers/inspect';
+import newAdvice from './reducers/newAdvice';
 import assistCheck from './reducers/assistCheck';
 import copyRight from './reducers/copyRight';
 import homePage from './reducers/homePage';
@@ -82,6 +83,7 @@ const rootReducer = combineReducers({
     familyHistory,
     marriageHistory,
     menstruationHistory,
+    newAdvice,
 });
 
 export default createStore(rootReducer, enhancer);

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

@@ -9,8 +9,8 @@ import {
 } from '../types/assistCheck';
 import store from '@store';
 const initSearchList = {
-  list: [], //点击的结果
-  assistLabel: [], //搜索的结果
+  list: [], //搜索的结果
+  assistLabel: [], //点击的结果
   dataString: '', //结果拼接
   dataArr: [], //结果拼接
   assistVal: '',
@@ -48,7 +48,7 @@ export default (state = initSearchList, action) => {
     newState.dataArr = tmpObj.arr
     return newState;
   }
-  if (action.type == GET_ASSIST_SEARCH_LIST) { //右侧推送添加到左侧
+  if (action.type == GET_ASSIST_SEARCH_LIST) { //搜索结果
     const newState = Object.assign({}, state);
     newState.list = action.list
     newState.assistVal = action.val
@@ -57,25 +57,14 @@ export default (state = initSearchList, action) => {
     newState.dataArr = tmpObj.arr
     return newState;
   }
-  if (action.type == GET_ASSIST_LABEL) { //默认
+  if (action.type == GET_ASSIST_LABEL) { //选中搜索结果
     const newState = Object.assign({}, state);
-    const tempArrs = newState.assistLabel;
-    let tempArr = [];
-    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].conceptId == action.id && i == action.idx) {
-        tempArr[i].time = getCurrentDate(1);
-        tempArrs.push(tempArr[i]);
-        newState.assistLabel = [...tempArrs];
-      }
-    }
-    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tempArrs = newState.assistLabel;
+    let tempList = action.item
+    tempList['time'] = getCurrentDate(1)
+    tempArrs.push(tempList)
+    let tmpObj = getAllString([],newState.assistLabel)
+    newState.assistLabel = [...tempArrs]
     newState.dataArr = tmpObj.arr
     newState.dataString = tmpObj.str
     return newState;

+ 1 - 25
src/store/reducers/diagnosticList.js

@@ -7,31 +7,7 @@ import { addDiagnostic,  delDiagnostic, upDiagnostic, downDiagnostic, setTreat,
 const initState = {
     isFirst: true,
     diagnosticList: [
-        // {
-        //     id: 1,
-        //     name: '脑梗塞',
-        //     type: 1
-        // },
-        // {
-        //     id: 2,
-        //     name: '高血压',
-        //     type: 2
-        // },
-        // {
-        //     id: 3,
-        //     name: '慢性支气管炎',
-        //     type: 1
-        // },
-        // {
-        //     id: 4,
-        //     name: '急性支气管炎',
-        //     type: 2
-        // },
-        // {
-        //     id: 5,
-        //     name: '原发性高血压',
-        //     type: 1
-        // }
+    
     ],
     mainSuitStr:'',
     diagnosticStrNoType:'',

+ 57 - 25
src/store/reducers/inspect.js

@@ -11,10 +11,12 @@ import {
     DEL_EXCEL_LIST,
     ADD_LABEL,
     SET_CONTEXT,
-    SET_TIP
+    SET_TIP,
+    SEARCH_TYPE,
+    DEL_ONE_PIC,
 } from '../types/inspect';
 import store from '@store';
-import { getStringPlus,  getPushLists,  getPushList} from '@utils/tools.js';
+import { getStringPlus,  getPushLists,  getPushList,getCurrentDate} from '@utils/tools.js';
 
 const initSearchList = {
     list: [], //搜索的结果
@@ -29,10 +31,62 @@ const initSearchList = {
     pushItem:[],    //推送的数据
     pushItems:[],    //右侧模板预览的数据
     inspectVal:'',
-    context:{}
+    context:{},
+    shType:2,
+    labelListBig:[],//大项
+    labelListSmall:[],//小项
 }
 
 export default (state = initSearchList, action) => {
+    if (action.type == DEL_ONE_PIC) {
+        const newState = Object.assign({}, state);
+        let tempArr = newState.labelListBig;
+        let tempArrs = newState.labelListSmall;
+        let tmpLis = action.item
+        if(tmpLis&&tmpLis.flg == 1){//大项
+            tempArr = tempArr.filter((item)=>item.time != tmpLis.time)
+            newState.labelListBig = [...tempArr]
+        }else{//小项
+            tempArrs = tempArrs.filter((item)=> item.time != tmpLis.time )
+            newState.labelListSmall = [...tempArrs]
+        }
+        return newState;
+    }
+
+    if (action.type == SET_TIP) {    
+        const newState = Object.assign({}, state);
+        let tempArr = newState.labelListBig;
+        let tempArrs = newState.labelListSmall;
+        let tmpLis = action.item
+        tempArrs = tempArrs.filter((item)=>{
+            if(item.time == tmpLis.time){
+                item.value = action.value
+            }
+            return item
+        })
+        newState.labelListSmall = [...tempArrs]
+        return newState;
+    }
+    if (action.type == SEARCH_TYPE) {
+        const newState = Object.assign({}, state);
+        newState.shType = action.value
+        return newState;
+    }
+    if (action.type == RESET_LABEL) {             //选中的结果重组
+        const newState = Object.assign({}, state);
+        const tempArr = newState.labelListBig;
+        const tempArrs = newState.labelListSmall;
+        let tmpLis = action.list
+        tmpLis['time'] = getCurrentDate(1)
+        if(tmpLis.flg == 1){//大项
+            tempArr.push(tmpLis)
+            newState.labelListBig = [...tempArr]
+        }else{//小项
+            tempArrs.push(tmpLis)
+            newState.labelListSmall = [...tempArrs]
+        }
+        return newState;
+    }
     if (action.type == SEARCH_LIST) {
         const newState = Object.assign({}, state);
         newState.list = action.list
@@ -62,14 +116,6 @@ export default (state = initSearchList, action) => {
         newState.inspectStrPlus = getStringPlus(newState.pushItems)
         return newState;
     }
-    if (action.type == RESET_LABEL) {             //选中的结果重组
-        const newState = Object.assign({}, state);
-        const tempArr = newState.labelList;
-        tempArr[tempArr.length-1].details = action.list;
-        tempArr[tempArr.length-1].uniqueName = action.uniqueName;
-        tempArr[tempArr.length-1].inpValue = '';
-        return newState;
-    } 
     if (action.type == ADD_LABEL) {             //右侧推送的化验辅检项,点击开单放到左侧化验辅检的位置上
         const newState = Object.assign({}, state);
         const tempArr = newState.labelList;
@@ -177,20 +223,6 @@ export default (state = initSearchList, action) => {
         newState.context = action.obj
         return newState;
     }
-    if (action.type == SET_TIP) {    
-        const newState = Object.assign({}, state);
-        const tempArr = newState.labelList;
-        for(let i = 0;i < tempArr.length;i++){
-            if(action.idx == i){
-                tempArr[i].inpValue=action.value
-            }
-        }
-        let tmpArr = newState.getExcelDataList;
-        newState.pushItem = getPushList(tmpArr,tempArr);
-        newState.pushItems = getPushLists(tmpArr,tempArr);
-        newState.inspectStrPlus = getStringPlus(newState.pushItems)
-        return newState;
-    }
     return state;
 }
 

+ 288 - 0
src/store/reducers/newAdvice.js

@@ -0,0 +1,288 @@
+import {
+    SEARCH_LIST,
+    SET_LABEL,
+    FILL_ACTIVE,
+    GET_EXCEL,
+    CHECK_VALUE_IS_CHANGE,
+    CLEAR_LABEL,
+    RESET_LABEL_NEW,
+    CLEAR_ALL_LABEL,
+    DEL_PART_ITEM_NEW,
+    DEL_EXCEL_LIST,
+    ADD_LABEL,
+    SET_CONTEXT,
+    SET_TIP,
+    DEL_ONE_PIC,
+    SEARCH_TYPE_NEW,
+} from '../types/newAdvice';
+import store from '@store';
+import { getStringPlus,  getPushLists,  getPushList,getCurrentDate} from '@utils/tools.js';
+
+const initSearchList = {
+    list: [], //搜索的结果
+    labelList: [], //选中的结果,也是需要保存的数据
+    labelListActive: [], //缓存值
+    fillActive: {}, //选中的标签的填写单
+
+    getExcelData: {}, //导入的数据
+    inspectStrPlus:'',
+
+    getExcelDataList: [], //导入的数据
+    pushItem:[],    //推送的数据
+    pushItems:[],    //右侧模板预览的数据
+    inspectVal:'',
+    context:{},
+    shType:5,
+    labelListBig:[],//大项
+    labelListSmall:[],//小项
+}
+
+export default (state = initSearchList, action) => {
+    if (action.type == DEL_ONE_PIC) {
+        const newState = Object.assign({}, state);
+        let tempArr = newState.labelListBig;
+        let tempArrs = newState.labelListSmall;
+        let tmpLis = action.item
+        if(tmpLis&&tmpLis.flg == 1){//大项
+            tempArr = tempArr.filter((item)=>item.time != tmpLis.time)
+            newState.labelListBig = [...tempArr]
+        }else{//小项
+            tempArrs = tempArrs.filter((item)=> item.time != tmpLis.time )
+            newState.labelListSmall = [...tempArrs]
+        }
+        return newState;
+    }
+
+    if (action.type == SET_TIP) {    
+        const newState = Object.assign({}, state);
+        let tempArr = newState.labelListBig;
+        let tempArrs = newState.labelListSmall;
+        let tmpLis = action.item
+        tempArrs = tempArrs.filter((item)=>{
+            if(item.time == tmpLis.time){
+                item.value = action.value
+            }
+            return item
+        })
+        newState.labelListSmall = [...tempArrs]
+        return newState;
+    }
+    if (action.type == SEARCH_TYPE_NEW) {
+        const newState = Object.assign({}, state);
+        newState.shType = action.value
+        return newState;
+    }
+    if (action.type == RESET_LABEL_NEW) {             //选中的结果重组
+        const newState = Object.assign({}, state);
+        const tempArr = newState.labelListBig;
+        const tempArrs = newState.labelListSmall;
+        let tmpLis = action.list
+        tmpLis['time'] = getCurrentDate(1)
+        if(tmpLis.flg == 1){//大项
+            tempArr.push(tmpLis)
+            newState.labelListBig = [...tempArr]
+        }else{//小项
+            tempArrs.push(tmpLis)
+            newState.labelListSmall = [...tempArrs]
+        }
+        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) {             //选中的结果    
+        const newState = Object.assign({}, state);
+        let tempArr = [];
+        if(action.sign == 'common'){
+          let tmpInspectList = store.getState().homePage.inspectList
+          tempArr = tmpInspectList;
+        }else{
+          tempArr = newState.list
+        }
+        const tempArrs = newState.labelList;
+        for (let i = 0; i < tempArr.length; i++) {
+            if (i == action.idx) {
+                tempArrs.push(tempArr[i])
+                newState.labelList = [...tempArrs]
+            }
+        }
+        
+        let tmpArr = newState.getExcelDataList;
+        let tmpArr2 = newState.labelList;
+        newState.pushItems = getPushLists(tmpArr,tmpArr2);
+        newState.inspectStrPlus = getStringPlus(newState.pushItems)
+        return newState;
+    }
+    if (action.type == ADD_LABEL) {             //右侧推送的化验辅检项,点击开单放到左侧化验辅检的位置上
+        const newState = Object.assign({}, state);
+        const tempArr = newState.labelList;
+        for(let i = 0;i <action.lis.length;i++){
+          tempArr.push(action.lis[i]);
+        }
+        newState.labelList = [...tempArr]
+        
+        let tmpArr = newState.getExcelDataList;
+        let tmpArr2 = newState.labelList;
+        newState.pushItems = getPushLists(tmpArr,tmpArr2);
+        newState.inspectStrPlus = getStringPlus(newState.pushItems);
+        return newState;
+    }
+    if (action.type == FILL_ACTIVE) {                        //点击标签放到暂存里
+        const newState = Object.assign({}, state);
+        const tempArr = newState.labelList;
+        for (let i = 0; i < tempArr.length; i++) {
+            if (i == action.idx) {
+                newState.fillActive = tempArr[i]
+            }
+        }
+        return newState;
+    }
+    if (action.type == CLEAR_LABEL) {      //清空数据填写
+        const newState = Object.assign({}, state);
+        const tempArrs = newState.fillActive;
+        const tempArr = newState.fillActive.details;
+        let tmpArr = newState.getExcelDataList;
+        let tmpArr2 = newState.labelList;
+        for (let i = 0; i < tempArr.length; i++) {
+          // tempArr[i].value = ''
+        }
+        tempArrs.show = false;
+        newState.pushItem = getPushList(tmpArr,tmpArr2);
+        newState.pushItems = getPushLists(tmpArr,tmpArr2);
+        newState.inspectStrPlus = getStringPlus(newState.pushItems)
+        return newState;
+    }
+    if (action.type == GET_EXCEL) {              //导入数据
+        const newState = Object.assign({}, state);
+        let tmpArr = newState.getExcelDataList;
+        let tmpArr2 = newState.labelList;
+        newState.getExcelData = action.data
+
+        tmpArr.push(action.data)
+        newState.getExcelDataList = [...tmpArr]
+        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列表的某个数据
+        const newState = Object.assign({}, state);
+        const tempArr2 = newState.labelList;
+        let tmpArr = newState.getExcelDataList;
+        tmpArr.splice(action.idx,1);
+        newState.getExcelDataList = [...tmpArr];
+        let tempArr1 = newState.getExcelDataList;
+        newState.pushItem = getPushList(tempArr1,tempArr2);
+        newState.pushItems = getPushLists(tempArr1,tempArr2);
+        newState.inspectStrPlus = getStringPlus(newState.pushItems)
+        return newState;
+    }
+    if (action.type == CHECK_VALUE_IS_CHANGE) {     //数据添加后显示与否
+        const newState = Object.assign({}, state);
+        // const tempArrAct = newState.fillActive;
+        const tempArr = action.arr;
+        tempArr.time = action.time;
+        let tmpArr = newState.getExcelDataList;
+        const tempArrs = newState.labelList;
+        tempArrs[action.idx] = tempArr;
+        newState.fillActive = tempArr;
+        newState.labelList = tempArrs;
+        // tempArrAct.show = true;
+        newState.pushItem = getPushList(tmpArr,tempArrs);
+        newState.pushItems = getPushLists(tmpArr,tempArrs);
+        newState.inspectStrPlus = getStringPlus(newState.pushItems)
+        return newState;
+    }
+    if (action.type == CLEAR_ALL_LABEL) {     //清空所有数据
+        const newState = Object.assign({}, state);
+        newState.labelList =action.data;
+        newState.getExcelDataList = action.dataExcel;
+        let tmpArr = action.dataExcel;
+        const tempArrs = action.data;
+        newState.pushItem = getPushList(tmpArr,tempArrs);
+        newState.inspectStrPlus = action.saveTextData;
+        return newState;
+    }
+    if (action.type == DEL_PART_ITEM_NEW) {     //清空填寫数据
+        const newState = Object.assign({}, state);
+        const tempArr = newState.labelList;
+        tempArr.splice(action.idx,1);
+        newState.labelList = [...tempArr];
+        let tmpArr = newState.getExcelDataList;
+        newState.pushItem = getPushList(tmpArr,tempArr);
+        newState.pushItems = getPushLists(tmpArr,tempArr);
+        newState.inspectStrPlus = getStringPlus(newState.pushItems)
+        return newState;
+    }
+    if (action.type == SET_CONTEXT) {    
+        const newState = Object.assign({}, state);
+        newState.context = action.obj
+        return newState;
+    }
+    return state;
+}
+
+function getExcelString(action,newState,tmpArr,tmpArr2) {
+  let tmpString = '';
+  if(JSON.stringify(action.data||{}) != '{}' && action.data.lisExcelRes.length > 0){
+    action.data.lisExcelRes.map((item)=>{
+        item.lisExcelItem.map((part)=>{
+            if(part.type == 1){
+                if(part.max != '' && (part.value-0) > (part.max-0) ) {
+                    let rate = (part.value/part.max).toFixed(2);
+                    let tmpStr = part.mealName+','+part.itemName+','+part.value+' '+part.unit+'升高'+rate+';'
+                    tmpString += tmpStr;
+                }else if(part.min != '' && (part.value-0) < (part.min-0) ){
+                    let rate = (part.value/part.min).toFixed(2);
+                    let tmpStr = part.mealName+','+part.itemName+','+part.value+' '+part.unit+'降低'+rate+';'
+                    tmpString += tmpStr;
+                }else{
+                    let tmpStr = part.mealName+','+part.itemName+','+part.value+' '+part.unit+'异常;'
+                    tmpString += tmpStr;
+                }
+            }else{
+                let tmpStr = part.mealName+','+part.itemName+','+part.value+' '+part.unit+'正常;'
+                tmpString += tmpStr;
+            }
+        })
+    })
+    newState.pushItem = getPushList(tmpArr,tmpArr2);
+    newState.pushItems = getPushLists(tmpArr,tmpArr2);
+    newState.inspectStrPlus = getStringPlus(newState.pushItems)
+  }else{
+    newState.inspectStrPlus = '';
+    newState.pushItem = []
+  }
+}
+function getString(lists) {
+    let tmpString = '';
+    lists.map((item)=>{
+        if(item.show == true){
+            item.details.map((part)=>{
+                if(part.value){
+                    if(typeof(part.value) == "number"){
+                        if(part.maxValue != '' && (part.value-0) > (part.maxValue-0) ) {
+                            let rate = (part.value/part.maxValue).toFixed(2);
+                            let tmpStr = item.name+','+part.name+','+part.value+' '+part.labelSuffix+'升高'+rate+';'
+                            tmpString += tmpStr;
+                        }else if(part.minValue != '' && (part.value-0) < (part.minValue-0) ){
+                            let rate = (part.value/part.minValue).toFixed(2);
+                            let tmpStr = item.name+','+part.name+','+part.value+' '+part.labelSuffix+'降低'+rate+';'
+                            tmpString += tmpStr;
+                        }else{
+                            let tmpStr = item.name+','+part.name+','+part.value+' '+part.labelSuffix+';'
+                            tmpString += tmpStr;
+                        }
+                    }else{
+                        tmpString += item.name+','+part.name+','+part.value+' '+part.labelSuffix+';'
+                    }
+                }
+            })
+        }
+    })
+    return tmpString;
+}

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

@@ -141,7 +141,6 @@ export default (state = initDataList, action) => {
   if (action.type === DEL_ITEMS_ADMIN) {//删除管理员模板
     const newState = Object.assign({}, state);
     let tempArr = newState.adminItems,tmpTmpLis = [];
-    console.log(action)
     for(let i = 0;i < tempArr.length;i++){
       let tmpAction = tempArr[i]
       if(tmpAction.id == action.folderId){

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

@@ -13,3 +13,5 @@ export const DEL_EXCEL_LIST = 'DEL_EXCEL_LIST';
 export const ADD_LABEL = 'ADD_LABEL';
 export const SET_CONTEXT = 'SET_CONTEXT';
 export const SET_TIP = 'SET_TIP';
+export const SEARCH_TYPE = 'SEARCH_TYPE';
+export const DEL_ONE_PIC = 'DEL_ONE_PIC';

+ 17 - 0
src/store/types/newAdvice.js

@@ -0,0 +1,17 @@
+export const SEARCH_LIST = 'SEARCH_LIST';
+export const SET_LABEL = 'SET_LABEL';
+export const FILL_ACTIVE = 'FILL_ACTIVE';
+export const FILL_ACTIVE_DETAIL = 'FILL_ACTIVE_DETAIL';
+export const GET_EXCEL = 'GET_EXCEL';
+export const CHANGE_MODAL_SHOW = 'CHANGE_MODAL_SHOW';
+export const CHECK_VALUE_IS_CHANGE = 'CHECK_VALUE_IS_CHANGE';
+export const CLEAR_LABEL = 'CLEAR_LABEL';
+export const RESET_LABEL_NEW = 'RESET_LABEL_NEW';
+export const CLEAR_ALL_LABEL = 'CLEAR_ALL_LABEL';
+export const DEL_PART_ITEM_NEW = 'DEL_PART_ITEM_NEW';
+export const DEL_EXCEL_LIST = 'DEL_EXCEL_LIST';
+export const ADD_LABEL = 'ADD_LABEL';
+export const SET_CONTEXT = 'SET_CONTEXT';
+export const SET_TIP = 'SET_TIP';
+export const SEARCH_TYPE_NEW = 'SEARCH_TYPE_NEW';
+export const DEL_ONE_PIC = 'DEL_ONE_PIC';

+ 38 - 2
src/utils/tools.js

@@ -1357,6 +1357,41 @@ function getDomUpDown(min,max,value){
   }
   return dom;
 }
+function getArrow(min,max,value){//1下降2上升3正常4标红
+  let dom = 3;
+  if(min == null&&max == null||min == undefined&&max == undefined||min == ''&&max == ''||value == null||value == undefined){
+    dom = 3
+  }else if (!isNaN(min) && !isNaN(max) &&min!=null&&max!=null) {//有最大值最小值
+    if (isNaN(value)) {//输入的不是数据
+      dom = 4
+    } else if (value <= min) {//下降
+      dom = 1
+    } else if (value >= max) {//上升
+      dom = 2
+    } else {//正常
+      dom = 3
+    }
+  } else if (min==null && !isNaN(max)&&max!=null) {//有最大值无最小值
+    if (value >= max) {//上升
+      dom = 2
+    } else if(isNaN(value)){
+      dom = 4
+    }else {//正常
+      dom = 3
+    }
+  } else if (!isNaN(min) && max==null&&min!=null) {//有最小值无最大值
+    if (value <= min) {//下降
+      dom = 1
+    } else if(isNaN(value)){
+      dom = 4
+    }else {//正常
+      dom = 3
+    }
+  } else {//无最大最小值(中文))
+    dom = 3
+  }
+  return dom;
+}
 //键值对转换
 function parseNameVal(arr){
   let obj = {};
@@ -1556,7 +1591,7 @@ function setPosition (e,dom,setHighter){
     let btmHt = wrapHt-(clickHt-111)-scrollHt;//点击位置距离底部的距离
     // console.log(wrapHt,clickHt,scrollHt,btmHt,contHt)
     if(btmHt<contHt){
-      setHighter&&setHighter(contHt-btmHt+20);
+      setHighter&&setHighter(contHt-btmHt+100);
     }else{
       setHighter&&setHighter(48);       //标签填写单连续点击弹出,未超出需要恢复
     }
@@ -1833,5 +1868,6 @@ module.exports = {
     removeRepeat,
     handleMouseUp,
     checkDeptContent,
-    formatTextInfo
+    formatTextInfo,
+    getArrow,
 };