luolei 4 rokov pred
rodič
commit
eea534607b
30 zmenil súbory, kde vykonal 2523 pridanie a 110 odobranie
  1. 32 25
      src/common/components/SearchOption/index.jsx
  2. 41 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. 127 0
      src/components/AddInspect/SlidePic/index.jsx
  8. 234 0
      src/components/AddInspect/SlidePic/index.less
  9. 0 19
      src/components/AddInspect/SlideSelect/index.jsx
  10. 14 40
      src/components/AddInspect/index.jsx
  11. 8 0
      src/components/AddInspect/index.less
  12. 75 0
      src/components/AddInspectCopy/InspectName/index.jsx
  13. 256 0
      src/components/AddInspectCopy/InspectName/index.less
  14. 99 0
      src/components/AddInspectCopy/SlideExcel/index.jsx
  15. 199 0
      src/components/AddInspectCopy/SlideExcel/index.less
  16. 275 0
      src/components/AddInspectCopy/SlideSelect/index.jsx
  17. 234 0
      src/components/AddInspectCopy/SlideSelect/index.less
  18. BIN
      src/components/AddInspectCopy/img/close.png
  19. BIN
      src/components/AddInspectCopy/img/date1.png
  20. BIN
      src/components/AddInspectCopy/img/date2.png
  21. BIN
      src/components/AddInspectCopy/img/info2.png
  22. BIN
      src/components/AddInspectCopy/img/info3.png
  23. 439 0
      src/components/AddInspectCopy/index.jsx
  24. 252 0
      src/components/AddInspectCopy/index.less
  25. 3 1
      src/components/Inspect/index.jsx
  26. 13 5
      src/containers/Inspect.js
  27. 5 1
      src/store/actions/inspect.js
  28. 24 8
      src/store/async-actions/inspect.js
  29. 14 6
      src/store/reducers/inspect.js
  30. 1 0
      src/store/types/inspect.js

+ 32 - 25
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,35 @@ 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:'细项'})
+      }
       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 +57,11 @@ class SearchOption extends React.Component {
         });
         handleChangeValue('');
     }
+    detailClick(val,txt){
+        const { detailClick } = this.props;
+        detailClick(val)
+        this.setState({txt:txt})
+    }
     handleInput(e){
       const { handleChangeValue } = this.props;
         clearTimeout(this.state.timer);
@@ -80,6 +84,7 @@ class SearchOption extends React.Component {
         });
     }
     handleFocus(){
+      this.setState({showInsp:false})
       if(this.state.val.trim() != ''){
         return;
       }else{
@@ -91,17 +96,18 @@ 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`}>
+            <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>
+                <div className={styles.selectLis} onClick={this.setShowInsp}>
+                    <span id="shTxt">{txt}</span>
+                    <ul className={styles.lisul} style={{'display':showInsp?'block':'none'}}>
+                        <li onClick={()=>{this.detailClick(2,'细项')}}>细项</li>
+                        <li onClick={()=>{this.detailClick(1,'套餐')}}>套餐</li>
                     </ul>
                 </div>
                 <input
@@ -111,7 +117,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 +125,7 @@ class SearchOption extends React.Component {
                     }}
                     placeholder="搜索"
                 />
+                <div style={{'clear':'both'}}></div>
                 <div className={styles.autoList}>
                     {children}
                 </div>

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

@@ -2,7 +2,7 @@
 
 .search {
     .contentZIndex1;
-    width: 316px;
+    width: 375px;
     padding: 8px;
     box-sizing: border-box;
     position: absolute;
@@ -22,6 +22,8 @@
         padding: 0 32px;
         box-sizing: border-box;
         border: 1px solid #979797;
+        float: right;
+        border-radius: 4px;
     }
     .border {
         border: 1px solid @blue;
@@ -40,13 +42,47 @@
         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;
+        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;
+}

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

@@ -0,0 +1,127 @@
+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:'',
+      canEdit:true
+    };
+    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);
+  }
+  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
+    })
+  }
+  setEdit(){
+    this.setState({
+      canEdit:false
+    },()=>{
+      $("#canEdit").focus()
+      $("#canEdit").blur(()=>{
+        this.setState({canEdit:true})
+      })
+    })
+  }
+  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 {item,idx} = this.props;
+    const {canEdit} = this.state;
+    return (
+      item.flg == 1?<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}> 
+          {item.uniqueName}
+      </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} placeholder='(填写)'/><i></i>{item.units}
+          </span>
+          <span className={styles.maxmin}>正常值:({item.minValue}~{item.maxValue})</span>
+          <span className={styles.pass}>化验时间:{item.time}</span>
+      </li>
+    );
+  }
+}
+export default SlideSelect;

+ 234 - 0
src/components/AddInspect/SlidePic/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;
+}

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

@@ -132,25 +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)=>{

+ 14 - 40
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';
@@ -271,24 +271,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 +317,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 +329,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 {setHighter,refreshScroller, getInfomation,setTipValue, handleChangeValue,inspectList, inspectVal, list, labelListBig, windowHeight, windowWidth,detailClick, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
     const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
-
     const contStyle={
       opacity:'0.4',
       right:'0',
@@ -374,46 +372,22 @@ class Inspect extends React.Component {
             })
           }
           <ul className={styles.labelWrap} >
+            {console.log(labelListBig)}
             {
-              labelList && labelList.map((item, idx) => {
-                return <SlideSelect
+              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}
-                  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>
+                ></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 +403,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;
+  }
+}

+ 3 - 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, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList,detailClick } = 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,14 @@ class Inspect extends React.Component {
         >
           <div style={{ padding: '10px', boxSizing: 'border-box',color:'#000' }} >
             <AddInspect
+              labelListBig={labelListBig}
               handleSign={handleSign}
               setHighter={setHighter}
               refreshScroller={this.refreshScroller}
               handleChangeValue={handleChangeValue}
               list={list}
               handlePush={fetchPushInfos}
+              detailClick={detailClick}
               labelList={labelList}
               handleLabelSub={handleLabelSub}
               fillActive={fillActive}

+ 13 - 5
src/containers/Inspect.js

@@ -16,7 +16,9 @@ import {
   clearLabel,
   delPartItem,
   setContext,
-  setTip
+  setTip,
+  searchType,
+  resetLabel,
 } from '@store/actions/inspect';
 import {
   billing,
@@ -31,6 +33,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 +41,7 @@ function mapStateToProps(state) {//console.log(state)
     windowWidth: state.homePage.windowWidth,
     inspectVal: state.inspect.inspectVal,
     message: state.patInfo.message,
+    labelListBig: state.inspect.labelListBig,
     hospitalMsg: state.homePage.sysConfig || {},
     typeConfig: state.typeConfig
   }
@@ -45,6 +49,9 @@ function mapStateToProps(state) {//console.log(state)
 
 function mapDispatchToProps(dispatch) {
   return {
+    detailClick(val){
+      dispatch(searchType(val))
+    },
     setContext(obj){
       dispatch(setContext(obj))
     },
@@ -54,10 +61,11 @@ function mapDispatchToProps(dispatch) {
     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))

+ 5 - 1
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,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,
@@ -68,3 +68,7 @@ export const setTip = (idx,value) => ({
     idx,
     value
 })
+export const searchType = (value) => ({
+    type:SEARCH_TYPE,
+    value
+})

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

@@ -9,21 +9,37 @@ 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": "string",
+            "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{
+                console.log(data,data.lisNames)
+                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) => {

+ 14 - 6
src/store/reducers/inspect.js

@@ -11,7 +11,8 @@ import {
     DEL_EXCEL_LIST,
     ADD_LABEL,
     SET_CONTEXT,
-    SET_TIP
+    SET_TIP,
+    SEARCH_TYPE,
 } from '../types/inspect';
 import store from '@store';
 import { getStringPlus,  getPushLists,  getPushList} from '@utils/tools.js';
@@ -29,10 +30,18 @@ const initSearchList = {
     pushItem:[],    //推送的数据
     pushItems:[],    //右侧模板预览的数据
     inspectVal:'',
-    context:{}
+    context:{},
+    shType:2,
+    labelListBig:[],//大项
+    labelListSmall:[],//大项
 }
 
 export default (state = initSearchList, action) => {
+    if (action.type == SEARCH_TYPE) {
+        const newState = Object.assign({}, state);
+        newState.shType = action.value
+        return newState;
+    }
     if (action.type == SEARCH_LIST) {
         const newState = Object.assign({}, state);
         newState.list = action.list
@@ -64,10 +73,9 @@ export default (state = initSearchList, action) => {
     }
     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 = '';
+        const tempArr = newState.labelListBig;
+        tempArr.push(action.list)
+        newState.labelListBig = [...tempArr]
         return newState;
     } 
     if (action.type == ADD_LABEL) {             //右侧推送的化验辅检项,点击开单放到左侧化验辅检的位置上

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

@@ -13,3 +13,4 @@ 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';