浏览代码

Merge branch 'lcq'

morphone1995 4 年之前
父节点
当前提交
99b7373f55
共有 100 个文件被更改,包括 6331 次插入502 次删除
  1. 0 1
      .gitignore
  2. 2 1
      build/dev-server.js
  3. 2 2
      build/webpack.prod.conf.js
  4. 2 2
      index.html
  5. 1 1
      src/common/components/Add/index.jsx
  6. 120 0
      src/common/components/BlockInp/index.jsx
  7. 33 0
      src/common/components/BlockInp/index.less
  8. 1 1
      src/common/components/DelToast/index.jsx
  9. 1 1
      src/common/components/ItemBox/index.jsx
  10. 1 1
      src/common/components/ItemBox/index.less
  11. 79 21
      src/common/components/SearchOption/index.jsx
  12. 48 1
      src/common/components/SearchOption/index.less
  13. 二进制
      src/common/components/SearchOptionSelect/imgs/clear.png
  14. 二进制
      src/common/components/SearchOptionSelect/imgs/search.png
  15. 129 0
      src/common/components/SearchOptionSelect/index.jsx
  16. 49 0
      src/common/components/SearchOptionSelect/index.less
  17. 3 1
      src/common/components/index.js
  18. 二进制
      src/common/images/arrowIcon.png
  19. 二进制
      src/common/images/icon_del_default@2x.png
  20. 二进制
      src/common/images/icon_del_hover@2x.png
  21. 二进制
      src/common/images/icon_edit_default@2x.png
  22. 二进制
      src/common/images/icon_edit_hover@2x.png
  23. 二进制
      src/common/images/pushEmpty.png
  24. 二进制
      src/common/images/selectSex.png
  25. 11 2
      src/components/AddAssistCheck/AssistName/index.jsx
  26. 1 1
      src/components/AddAssistCheck/Textarea/index.jsx
  27. 31 69
      src/components/AddAssistCheck/index.jsx
  28. 11 3
      src/components/AddAssistCheck/index.less
  29. 2 2
      src/components/AddInspect/SlideExcel/index.jsx
  30. 217 0
      src/components/AddInspect/SlidePic/index.jsx
  31. 261 0
      src/components/AddInspect/SlidePic/index.less
  32. 4 24
      src/components/AddInspect/SlideSelect/index.jsx
  33. 51 93
      src/components/AddInspect/index.jsx
  34. 8 0
      src/components/AddInspect/index.less
  35. 75 0
      src/components/AddInspectCopy/InspectName/index.jsx
  36. 256 0
      src/components/AddInspectCopy/InspectName/index.less
  37. 99 0
      src/components/AddInspectCopy/SlideExcel/index.jsx
  38. 199 0
      src/components/AddInspectCopy/SlideExcel/index.less
  39. 275 0
      src/components/AddInspectCopy/SlideSelect/index.jsx
  40. 234 0
      src/components/AddInspectCopy/SlideSelect/index.less
  41. 二进制
      src/components/AddInspectCopy/img/close.png
  42. 二进制
      src/components/AddInspectCopy/img/date1.png
  43. 二进制
      src/components/AddInspectCopy/img/date2.png
  44. 二进制
      src/components/AddInspectCopy/img/info2.png
  45. 二进制
      src/components/AddInspectCopy/img/info3.png
  46. 439 0
      src/components/AddInspectCopy/index.jsx
  47. 252 0
      src/components/AddInspectCopy/index.less
  48. 75 0
      src/components/AddNewInspect/InspectName/index.jsx
  49. 256 0
      src/components/AddNewInspect/InspectName/index.less
  50. 99 0
      src/components/AddNewInspect/SlideExcel/index.jsx
  51. 199 0
      src/components/AddNewInspect/SlideExcel/index.less
  52. 221 0
      src/components/AddNewInspect/SlidePic/index.jsx
  53. 269 0
      src/components/AddNewInspect/SlidePic/index.less
  54. 255 0
      src/components/AddNewInspect/SlideSelect/index.jsx
  55. 234 0
      src/components/AddNewInspect/SlideSelect/index.less
  56. 二进制
      src/components/AddNewInspect/img/close.png
  57. 二进制
      src/components/AddNewInspect/img/date1.png
  58. 二进制
      src/components/AddNewInspect/img/date2.png
  59. 二进制
      src/components/AddNewInspect/img/info2.png
  60. 二进制
      src/components/AddNewInspect/img/info3.png
  61. 400 0
      src/components/AddNewInspect/index.jsx
  62. 260 0
      src/components/AddNewInspect/index.less
  63. 2 1
      src/components/Advice/Textarea/index.jsx
  64. 19 18
      src/components/AssistCheck/index.jsx
  65. 14 6
      src/components/Banner/ModeChange/index.jsx
  66. 8 8
      src/components/Banner/index.jsx
  67. 2 2
      src/components/Banner/index.less
  68. 31 0
      src/components/BlockEmrCont/CheckBody.jsx
  69. 31 0
      src/components/BlockEmrCont/CurrentIll.jsx
  70. 31 0
      src/components/BlockEmrCont/FamilyHistory.jsx
  71. 32 0
      src/components/BlockEmrCont/MainSuit.jsx
  72. 57 0
      src/components/BlockEmrCont/MenstruationHistory.jsx
  73. 44 0
      src/components/BlockEmrCont/OtherHistory.jsx
  74. 31 0
      src/components/BlockEmrCont/PastHistory.jsx
  75. 31 0
      src/components/BlockEmrCont/PersonalHistory.jsx
  76. 125 0
      src/components/BlockEmrCont/index.jsx
  77. 47 0
      src/components/BlockEmrCont/index.less
  78. 32 0
      src/components/BlockEmrCont/marriageHistory.jsx
  79. 8 5
      src/components/BodyContainer/index.jsx
  80. 1 1
      src/components/CopyRight/index.jsx
  81. 3 2
      src/components/CopyRight/index.less
  82. 11 16
      src/components/DiagResultSearch/index.jsx
  83. 8 0
      src/components/DiagResultSearch/index.less
  84. 7 2
      src/components/Diagnosis/index.jsx
  85. 15 13
      src/components/DiagnosticItem/index.jsx
  86. 32 19
      src/components/DiagnosticList/index.jsx
  87. 1 1
      src/components/DiagnosticList/index.less
  88. 18 18
      src/components/EMRContainer/index.jsx
  89. 2 2
      src/components/Emergency/index.jsx
  90. 1 1
      src/components/EmergencyProcedure/EmergencyPart/PartTrd/index.jsx
  91. 1 1
      src/components/EmergencyProcedure/emergency.js
  92. 13 6
      src/components/EmergencyProcedure/index.jsx
  93. 350 58
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  94. 92 21
      src/components/HistoryCaseContainer/HistoryList/index.less
  95. 28 12
      src/components/InfoTitle/index.jsx
  96. 8 8
      src/components/InfoTitle/index.less
  97. 8 8
      src/components/Information/index.jsx
  98. 4 1
      src/components/Information/index.less
  99. 18 45
      src/components/Inspect/index.jsx
  100. 0 0
      src/components/Inspect/index.less

+ 0 - 1
.gitignore

@@ -11,7 +11,6 @@ yarn.lock
 
 # Dependency directories
 node_modules/
-package-lock.json
 # Optional eslint cache
 .eslintcache
 /.DS_Store

+ 2 - 1
build/dev-server.js

@@ -2,6 +2,7 @@
 const config = require('../config');
 if (!process.env.NODE_ENV) {
     process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV);
+    process.noDeprecation = true
 }
 const opn = require('opn');
 const path = require('path');
@@ -57,7 +58,7 @@ devMiddleware.waitUntilValid(() => {
         }
         process.env.PORT = port;
         // var uri = 'http://localhost:' + port;
-        const uri=`http://localhost:${port}?patientNo=1600&doctorNo=YS001&deptId=D01&recordId=44&hospitalId=A001`;
+        const uri=`http://localhost:${port}?hospitalId=-1`;
         console.log('> Listening at ' + uri + '\n');
         // when env is testing, don't need open it
         if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {

+ 2 - 2
build/webpack.prod.conf.js

@@ -130,11 +130,11 @@ const webpackConfig = merge(baseWebpackConfig, {
         new ExtractTextPlugin({
             filename: utils.assetsPath('css/[name].[contenthash].css')
         }),
-        new OptimizeCSSPlugin({
+        /*new OptimizeCSSPlugin({
             cssProcessorOptions: {
                 safe: true
             }
-        }),
+        }),*/
         // new es3ifyPlugin(),
         new webpack.HashedModuleIdsPlugin(),
         new webpack.optimize.CommonsChunkPlugin({

+ 2 - 2
index.html

@@ -5,9 +5,9 @@
     <!--[if lt IE 9]>
     <script src="/static/polyfill/html5shiv.min.js"></script>
     <![endif]-->
-    <title>ICSS</title>
+    <title>CDSS</title>
 </head>
 <body>
-<div id="root" style="min-width: 1024px;overflow-y: hidden;"></div>
+<div id="root" style="width: 1200px;margin:0 auto;"></div>
 </body>
 </html>

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

@@ -4,7 +4,7 @@ import classNames from 'classnames';
 import more from '@common/images/addItem1.png';
 
 /**
-添加组件,如添加验项
+添加组件,如添加验项
 
 **/
 

+ 120 - 0
src/common/components/BlockInp/index.jsx

@@ -0,0 +1,120 @@
+import React, { PureComponent } from "react";
+import style from "./index.less";
+import Notify from '../Notify';
+import config from '@config/index';
+import {isIE,moveEnd} from '@utils/tools.js';
+import {getFeature} from '@store/async-actions/fetchModules';
+import {getAllDataList,getAllDataStringList,ifOtherClear,setFontColorSize} from "@utils/tools.js";
+import store from '@store';
+import $ from "jquery";
+import {SET_CURRENT_MODULE} from '@types/homePage';
+import {getMRAnalyse} from '@store/async-actions/pushMessage';
+
+class BlockInp extends PureComponent {
+  constructor(props) {
+    super(props);
+    this.state = {
+      timer:null,
+      inpText:'',
+    };
+    this.$dom = React.createRef();
+    this.handleInput = this.handleInput.bind(this);
+    this.handleFocus = this.handleFocus.bind(this);
+    //this.handleBlur = this.handleBlur.bind(this);
+    this.handleKeydown = this.handleKeydown.bind(this);
+    this.handleBlur = this.handleBlur.bind(this);
+  }
+  handleFocus(e){            //初始显示props中的值,focus已经显示输入的值,避免值更新闪烁
+    const {boxMark,title,handlePush} = this.props;
+    const state = store.getState()
+    const moduleName = state.homePage.moduleName
+    //黏贴时去掉html格式
+    const that = this;
+    let txt = '';
+    $(this.$dom.current).on("paste",function(e){
+      setTimeout(function(){
+        txt = that.$dom.current.innerText||that.$dom.current.innerHTML;
+        that.$dom.current.innerHTML = txt;
+        moveEnd($(that.$dom.current)[0]);     //光标落到最后去
+      });
+    });
+    handlePush&&handlePush({boxMark,isFocus:true,state});    //主诉、现病史空白聚焦推送
+    if(moduleName != title) {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:title
+      })
+      store.dispatch(getMRAnalyse())
+    }
+
+
+  }
+  handleInput(e){
+    const {handleInput,handlePush,boxMark} = this.props;
+    const text = e.target.innerText || e.target.innerHTML.replace(/&nbsp;+/g,' ').replace(/<br>$/,'');
+    const stimer = this.state.timer;//console.log(e.target,text)
+    this.setState({
+      inpText:text,
+    })
+
+    //存值到store  FF26 会有一个<br>
+    handleInput&&handleInput({text:text.replace('<br>',''),boxMark});
+    //右侧推送--延时推送
+    clearTimeout(stimer);
+    let timer = setTimeout(function(){
+      handlePush&&handlePush({boxMark});
+      clearTimeout(stimer);
+    },config.delayPushTime);
+    this.setState({
+      timer
+    });
+  }
+  handleBlur(e){
+    //解除绑定事件
+    $(this.$dom.current).off("paste");
+  }
+  handleKeydown(e){
+    const ev = e||window.event;
+    if(ev.keyCode==13){return false;}
+  }
+  componentWillReceiveProps(next){
+    const isRead = this.props.isRead;
+    if(next.isRead != isRead){    //value对比解决复诊不显示bug,复诊对比解决关标跳到前面bug
+      this.$dom.current.innerHTML = next.value||'';   //ff26下不支持innerText,但ref会自动加上innerText属性,所以上面的判断不为空
+      this.setState({
+        inpText: next.value
+      });
+    }
+  }
+  componentDidMount(){
+    const {value} = this.props;
+    if(value){
+      //this.$dom.current.innerText?(this.$dom.current.innerText = value||''):(this.$dom.current.innerText=value||'');
+      this.$dom.current.innerText=value||'';
+    }
+    if(isIE()){
+      $(this.$dom.current).onIe8Input(function(e){
+        this.handleInput(e)
+      },this);
+    }
+  }
+  render() {
+    const { title,boxMark } = this.props;
+    // console.log(this.props,'=============');
+    return (
+      <div className={style["box"]}>
+        <div className={`${style["title"]} ${setFontColorSize(2,4)}`}>{title}</div>
+        <div className={`${style["content"]} ${setFontColorSize(2,5)}`}
+             onFocus={this.handleFocus}
+             ref={this.$dom}
+             contentEditable={true}
+             onInput={this.handleInput}
+             onkeydown={this.handleKeydown}
+             onBlur={+boxMark===1?this.handleBlur:null}>
+        </div>
+      </div>
+    );
+  }
+}
+
+export default BlockInp;

+ 33 - 0
src/common/components/BlockInp/index.less

@@ -0,0 +1,33 @@
+@import "~@less/variables.less";
+
+.box{
+  margin: 2px 20px;
+  .title{
+    width: 65px;
+    float: left;
+    text-align: right;
+    padding-right: 5px;
+    margin-top: 10px;
+    font-size: 14px;
+    font-weight: bold;
+  }
+  .title:after{
+    content: ":";
+  }
+  .content{
+    // height:120px;
+    min-height: 38px;
+    line-height: 24px;
+    margin-left: 60px;
+    position: relative;
+    padding:5px;
+    outline: none;
+    border-bottom:1px @part-border-color dashed;
+    // margin-right: 470px;
+    word-break: break-all;
+    // font-weight: bold;
+    textarea{
+      width: 100%;
+    }
+  }
+}

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

@@ -1,7 +1,7 @@
 import React from 'react';
 import style from './index.less';
 /**
-* 化验辅检删除弹窗 @Liucf 2019-5-22
+* 检验检查删除弹窗 @Liucf 2019-5-22
 * 接收参数:
 * show:展示组件
 * name:删除项的名称

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

@@ -43,7 +43,7 @@ class ItemBox extends Component {
     const checkBodyIsNull = state.checkBody.saveText.length === 0
     handleClick && handleClick(e);//为了获取鼠标位置,显示搜索结果框;
     hideAllDrop&&hideAllDrop();
-    if((title=='化验'|| title=='辅检'|| title=='诊断' || title=='医嘱'||title == '现病史' &&  currentIllIsNull || title == '查体' &&  checkBodyIsNull)&& moduleName != title) {
+    if((title=='检验'|| title=='检查'|| title=='诊断' || title=='医嘱'||title == '现病史' &&  currentIllIsNull || title == '查体' &&  checkBodyIsNull)&& moduleName != title) {
       store.dispatch({
         type: SET_CURRENT_MODULE,
         moduleName:title

+ 1 - 1
src/common/components/ItemBox/index.less

@@ -18,7 +18,7 @@
   .content{
     // height:120px;
     min-height: 38px;
-    margin:0 470px 0 60px;
+    margin:0 0 0 60px;
     position: relative;
     padding:5px 12px 5px 5px;
     outline: none;

+ 79 - 21
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,36 +18,36 @@ class SearchOption extends React.Component {
             val:'',
             border:'',
             show:false,
-            timer:null
+            timer:null,
+            showInsp:false,
+            txt:''
         }
         this.textInput = React.createRef();
         this.handleClearVal = this.handleClearVal.bind(this);
         this.handleFocus = this.handleFocus.bind(this);
         this.handleBlur = this.handleBlur.bind(this);
+        this.setShowInsp = this.setShowInsp.bind(this);
+        this.detailClick = this.detailClick.bind(this);
     }
-    
-    /*componentWillReceiveProps(nextProps){
-        if(nextProps.visible != this.props.visible) {
-            if(!nextProps.visible) {
-                this.props.handleChangeValue('');
-                this.textInput.current.value = '';
-                this.setState({show:false})
-            }
-            setTimeout(() => {
-                this.textInput.current.focus();
-            }, 0);
-        }
-    }*/
     componentDidMount(){
       this.props.handleChangeValue('');
-      this.textInput.current.focus();
-      const {windowHeight,pageTop,height,refreshScroller} = this.props;
-
+      const {windowHeight,pageTop,height,refreshScroller,searchType} = this.props;
+      if(searchType==1){
+          this.setState({txt:'细项'})
+      }else if(searchType==2){
+        this.setState({txt:'药品'})
+      }
       refreshScroller()&&refreshScroller().refresh();    //点开搜索弹窗更新滚动条,
       if(windowHeight - pageTop < height){
         //$("#searchOption")[0].scrollIntoView(false);
         refreshScroller()&&refreshScroller().scrollBottom();
       }
+      this.textInput.current.focus();
+    }
+    setShowInsp(){
+        this.setState({
+            showInsp:!this.state.showInsp
+        })
     }
     handleClearVal(){
         const { handleChangeValue } = this.props;
@@ -56,7 +57,24 @@ class SearchOption extends React.Component {
             val:'',
             show:false
         });
-        handleChangeValue('');
+        handleChangeValue('','clear');
+    }
+    detailClick(val,txt){
+        const { detailClick,handleChangeValue } = this.props;
+        detailClick(val)
+        this.setState({txt:txt})
+        let value = this.textInput.current.value||''
+
+        if(value.trim() == ''){
+            this.setState({
+                show:false
+            })
+            return  handleChangeValue('');
+        }
+        this.setState({
+            show:true
+        })
+        handleChangeValue(value)
     }
     handleInput(e){
       const { handleChangeValue } = this.props;
@@ -80,6 +98,8 @@ class SearchOption extends React.Component {
         });
     }
     handleFocus(){
+        console.log(1223);
+      this.setState({showInsp:false})
       if(this.state.val.trim() != ''){
         return;
       }else{
@@ -90,10 +110,48 @@ class SearchOption extends React.Component {
       this.setState({border:false,val:''})
     }
     render() {
-        const { children,visible } = this.props;
-        const { show } = this.state;
+        const { children,visible,searchType } = this.props;
+        const { show,showInsp,txt } = this.state;
         return (
-            <div id="searchOption" className={visible?`${styles.search} ${styles.show} searchOption`:`${styles.search} ${styles.hide} searchOption`}>
+            searchType == 1||searchType == 2?
+            <div id="searchOption" className={visible?`${styles.search} ${styles.searchSpecial} ${styles.show} searchOption`:`${styles.search} ${styles.searchSpecial} ${styles.hide} searchOption`}>
+                <img className={`${styles.searchVal} ${styles.seleImg}`} src={slide} alt="选择" onClick={this.setShowInsp} />
+                <img className={`${styles.searchVal} ${styles.searchInsp}`} src={search} alt="搜索" />
+                <img style={{display:show?'block':'none'}} className={styles.clearVal} src={clear} onClick={this.handleClearVal} alt="清空" />
+                <div className={styles.selectLis} onClick={this.setShowInsp}>
+                    <span id="shTxt">{txt}</span>
+                    {
+                        searchType == 1?
+                        <ul className={styles.lisul} style={{'display':showInsp?'block':'none'}}>
+                            <li onClick={()=>{this.detailClick(2,'细项')}}>细项</li>
+                            <li onClick={()=>{this.detailClick(1,'套餐')}}>套餐</li>
+                        </ul>:
+                        <ul className={styles.lisul} style={{'display':showInsp?'block':'none'}}>
+                            <li onClick={()=>{this.detailClick(5,'药品')}}>药品</li>
+                            <li onClick={()=>{this.detailClick(6,'手术/操作')}}>手术/操作</li>
+                        </ul>
+                    }
+                </div>
+                <input
+                    className={this.state.border ?`${styles.border}`:`${styles.borderNone}`}
+                    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 style={{'clear':'both'}}></div>
+                <div className={styles.autoList}>
+                    {children}
+                </div>
+            </div>:<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

+ 48 - 1
src/common/components/SearchOption/index.less

@@ -2,7 +2,8 @@
 
 .search {
     .contentZIndex1;
-    width: 316px;
+    width: 430px;
+    min-height: 160px;
     padding: 8px;
     box-sizing: border-box;
     position: absolute;
@@ -22,6 +23,8 @@
         padding: 0 32px;
         box-sizing: border-box;
         border: 1px solid #979797;
+        float: right;
+        border-radius: 4px;
     }
     .border {
         border: 1px solid @blue;
@@ -41,6 +44,50 @@
         right: 18px;
     }
 }
+
+.searchSpecial {
+    min-height: 160px;
+    .seleImg {
+        left: 86px;
+        cursor: pointer;
+    }
+    .searchInsp {
+        left: 124px;
+    }
+    input {
+        width: 302px;
+    }
+    .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: 8px;
+        top: 42px;
+        display: none;
+        z-index: 100;
+        li {
+            padding: 0 10px;
+            color: #1E1E1E;
+        }
+        li:hover {
+            background-color: #E2F1F8;
+        }
+    }
+}
 .show {
     display:block;
 }

二进制
src/common/components/SearchOptionSelect/imgs/clear.png


二进制
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;
+}

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

@@ -25,6 +25,7 @@ import TailInlineTag from "./TailInlineTag";
 import Footer from "./Footer";
 import WrapModalContainer from "./WrapModalContainer";
 import SearchBox from "./SearchBox";
+import BlockInp from "./BlockInp"
 
 module.exports = {
     Banner,
@@ -54,5 +55,6 @@ module.exports = {
     TailInlineTag,
     Footer,
     WrapModalContainer,
-    SearchBox
+    SearchBox,
+    BlockInp
 };

二进制
src/common/images/arrowIcon.png


二进制
src/common/images/icon_del_default@2x.png


二进制
src/common/images/icon_del_hover@2x.png


二进制
src/common/images/icon_edit_default@2x.png


二进制
src/common/images/icon_edit_hover@2x.png


二进制
src/common/images/pushEmpty.png


二进制
src/common/images/selectSex.png


+ 11 - 2
src/components/AddAssistCheck/AssistName/index.jsx

@@ -2,6 +2,8 @@ import React, { Component } from "react";
 import styles from "../index.less";
 import $ from 'jquery';
 import { windowEventHandler,setFontColorSize } from '@utils/tools';
+import checkOff from '@common/images/check_off.png';
+import checkOn from '@common/images/check_on.png';
 
 class AssistName extends Component {
 	constructor(props) {
@@ -11,6 +13,7 @@ class AssistName extends Component {
 		};
 		this.$assistName = React.createRef();
 		this.splitName = this.splitName.bind(this);
+    this.checkOnOff = this.checkOnOff.bind(this);
 	}
 	splitName(name){
 		let wid = this.props.winWidth;
@@ -21,13 +24,19 @@ class AssistName extends Component {
 			return name
 		}
 	}
+  checkOnOff(item){
+    const {checkOnOff,handlePush} = this.props
+    checkOnOff(item)
+    handlePush && handlePush({mode:8});       //右侧推送
+  }
 	render() {
-		const { winWidth, name, getInfomation,normal } = this.props;
+		const { winWidth, name, getInfomation,normal,item } = this.props;
 		return (
 				<span className={`${styles.assistName} ${setFontColorSize(2)}`} style={{ width: winWidth < 1150 ? '120px' : 'auto',fontWeight:normal?'normal':'bold' }} ref={this.$assistName}>
+          <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item)} alt=""/>
 					<span className={styles.tagSpan} title={name}>
 						{name&&this.splitName(name)}:
-            <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: name, position: 1, type: 6 })}></span>
+            {/* <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: name, position: 1, type: 6 })}></span> */}
 					</span>
 				</span>
 		);

+ 1 - 1
src/components/AddAssistCheck/Textarea/index.jsx

@@ -28,7 +28,7 @@ class Textarea extends Component {
     //右侧推送--延时推送
     clearTimeout(stimer);
     let timer = setTimeout(function(){
-      handlePush&&handlePush();
+      handlePush&&handlePush({mode:9});
       clearTimeout(stimer);
     },config.delayPushTime);
     if(text.trim() != '' && text != '<br>'){

+ 31 - 69
src/components/AddAssistCheck/index.jsx

@@ -6,6 +6,7 @@ import Textarea from './Textarea';
 import AssistName from './AssistName';
 import { getPageCoordinate,getCurrentDate,setPosition, setFontColorSize } from '@utils/tools';
 import ScrollArea from 'react-scrollbar';
+import { autoFillModules } from '../../store/async-actions/fetchModules';
 
 class AddAssistCheck extends React.Component {
   constructor(props) {
@@ -33,23 +34,24 @@ class AddAssistCheck extends React.Component {
     $(document).click((event) => {
       let _con = $('#searchWrapAssist');   // 设置目标区域
       let _cons = $('#datePick');   // 设置目标区域
-      // let _conClick = $('#assistCheck');   // 点击的按钮
+      let _conClick = $('#assistCheck');   // 点击的按钮
       let _del = document.getElementById("delBox");   // 删除弹窗
       let _close = document.getElementById("assiClose");   // 删除icon
       let _closeTil = $('#delTit')[0];   // 弹窗标题
       if(!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭)
-          if (_con && _con != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
+          if ($(event.target).attr('id')=='searchWrapAssist'||_con && _con != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
             if (this.state.show) {
               this.props.setHighter(48)
             }
             this.setState({show: false});
           }
-          if (!_cons.is(event.target) && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
+          if (!_cons.is(event.target)&&!_conClick && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
             this.setState({date: false});
           }
           if($(event.target).attr("contenteditable")||event.target.textContent == '报告描述或意见'){
             this.setState({date: false});
           }
+          
         if(_del){
           if($(event.target).attr('id') != 'assiClose' &&!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
             this.setState({
@@ -86,7 +88,7 @@ class AddAssistCheck extends React.Component {
     const { id,activeName } = this.state;
     $(".TextareaRsize").css({marginTop:0});
     handleDelAssist && handleDelAssist(id,activeName,type);
-    handlePush && handlePush();           //右侧推送
+    handlePush && handlePush({mode:9});           //右侧推送
     this.setState({
       visible: false,
       id: null,
@@ -119,9 +121,13 @@ class AddAssistCheck extends React.Component {
       active: idx
     })
   }
+  handleSign(item,idx){
+    const { handleSign,handlePush } = this.props;
+    handleSign(item,idx)
+    handlePush && handlePush({mode:8});       //右侧推送
+  }
 
   getSearchList(list) {      //搜索列表
-    const { handleSign } = this.props;
     const contStyle={
       opacity:'0.4',
       right:'0',
@@ -130,31 +136,23 @@ class AddAssistCheck extends React.Component {
       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}>
+    return <ul className={`${styles.searchLiUl} ${styles.assistListUl}`} style={{height:'205px',width:'412px',overflow:'auto'}}>
       {
         list && list.map((item, idx) => {
           return <li key={item.id}
             className={styles.searchLi}
-            title={(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
+            title={item.name}
             onClick={() => {
-              this.props.setHighter(48)
-              handleSign(item.conceptId,idx,'search');
+              this.props.setHighter(96)
+              this.handleSign(item,'search');
               this.setState({ show: false })
             }}
           >
-            {item.name}{(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
+            {item.name}
           </li>
         })
       }
-      </ul></ScrollArea>;
+      </ul>;
   }
   getCommonList() {      //常用列表
     const { handleSign,assistList } = this.props;
@@ -166,7 +164,7 @@ class AddAssistCheck extends React.Component {
             title={item.name}
             onClick={() => {
               this.props.setHighter(48)
-              handleSign(item.conceptId, idx,'common');
+              this.handleSign(item.conceptId, idx,'common');
               this.setState({ show: false })
             }}
           >
@@ -183,7 +181,7 @@ class AddAssistCheck extends React.Component {
   }
 
   getAssistLabel() {
-    const { assistLabel,checkedListImport, handleChangeAssistValue, handleChangeDate, isRead, handlePush, winWidth,getInfomation,assistList } = this.props;
+    const { assistLabel,checkedListImport, handleChangeAssistValue,checkOnOff, handleChangeDate, isRead, handlePush, winWidth,getInfomation,assistList } = this.props;
     const { visible,activeName,id,date } = this.state;
     //出现滚动条时阻止滚动冒泡,未出现时不阻止,否则外部滚动条滚不动
     const showedBar = $("#datePick .scrollbar-container").length===1;
@@ -196,42 +194,6 @@ class AddAssistCheck extends React.Component {
       background:'#f1f1f1'};
     const barStyle={background:'#777',width:'100%'};
     return <React.Fragment>
-      {
-        checkedListImport.map((part,index)=>{
-          return <ul className={`${styles.labelWrap} ${styles.labelWrapSpec} ${styles.labelWrapSpecs}`}>
-            {
-              part.map((item, idx) => {
-                return (<li className={`${styles.assistLists} ${styles.clearfix}`}>
-                  <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation} normal={true}></AssistName>
-                  <div className={`${styles.textareaWrap} ${setFontColorSize(2,1)}`}>
-                    <ScrollArea speed={0.8}
-                                horizontal={false}
-                                stopScrollPropagation={showedBar?true:false}
-                                style={{maxHeight:'100px'}}
-                                className={styles["area"]}
-                                verticalContainerStyle={contStyle}
-                                verticalScrollbarStyle={barStyle}
-                                contentClassName="content">
-                      <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
-                    </ScrollArea>
-                  </div>
-                  <div className={`${styles.pointerFinger} ${setFontColorSize(2,2)}`}>
-                    <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
-                  </div>
-                </li>)
-              })
-            }
-            <DelToast show={index==id&&part.name==activeName?visible:false}
-                      name="该导入项"
-                      right={'-34px'}
-                      top={'22px'}
-                      cancel={this.handleCancel}
-                      confirm={()=>this.delConfirm(0)}/>
-            <span className={`${styles.closeIcon} ${styles.closeIcons}`} id="assiClose" onClick={()=>{ this.handleDelClick(index,part)}}></span>
-          </ul>
-        })
-      }
-
       <ul className={styles.labelWrap} id="datePick">
         {
           assistLabel.map((item, idx) => {
@@ -256,7 +218,7 @@ class AddAssistCheck extends React.Component {
                   <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
                 </span>
               </span> */}
-              <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
+              <AssistName item={item} checkOnOff={checkOnOff} name={item.name} winWidth={winWidth} handlePush={handlePush} getInfomation={getInfomation}></AssistName>
               <div className={`${styles.textareaWrap} ${setFontColorSize(2,1)}`}>
                 <ScrollArea speed={0.8}
                             horizontal={false}
@@ -270,18 +232,18 @@ class AddAssistCheck extends React.Component {
                 </ScrollArea>
               </div>
               <div className={`${styles.pointerFinger} ${setFontColorSize(2,2)}`}>
-                <p onClick={() => this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
-                <i onClick={() => this.handleShowDate(idx)}></i>
+                <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
+                {/* <i onClick={() => this.handleShowDate(idx)}></i> */}
                 {/*<a href="javascript:void(0);" onClick={() => { this.handleDelClick(idx,item) }}><img src={close} alt="" /></a>*/}
                 <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span>
-                {
+                {/* {
                   this.state.date && idx == this.state.active ?<Calendar timeLis={staticTime} isShow={true} timeSure={(date)=>this.timeSure(date,idx)} needTime={true} sure={true} handleChange={(info) => { this.handleChangeDate(info, idx) }} top={30}></Calendar>:null
-                }
+                } */}
               </div>
               <DelToast show={idx==id&&item.name==activeName?visible:false}
                   name={activeName}
-                  right={'-34px'}
-                  top={'40px'}
+                  right={'-40px'}
+                  top={'50px'}
                   cancel={this.handleCancel}
                   confirm={()=>this.delConfirm(1)}/>
               {/* {
@@ -311,12 +273,12 @@ class AddAssistCheck extends React.Component {
       <div className={styles.wrapper}>
         {this.getAssistLabel()}
         <div id="searchWrapAssist" style={{ position: "relative", clear: 'both' }}>
-          <Add showText="添加检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck" />
+          <Add showText="添加检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck" />
           {this.state.show ? <SearchOption windowHeight={windowHeight} refreshScroller={refreshScroller }  pageTop={pageTop} height={280} handleChangeValue={handleChangeValue} visible={true}>
-            {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
-            {
+            {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'42px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
+            {/* {
               (list && list.length>0) || (assistVal != '') || (assistList&&assistList.length==0)?'':<div>
-                <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用检项</p>
+                <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用检项</p>
                 {assistList.length>6?<ScrollArea speed={0.8}
                             horizontal={false}
                             stopScrollPropagation={true}
@@ -330,7 +292,7 @@ class AddAssistCheck extends React.Component {
                 }
                 </ScrollArea>:this.getCommonList()}
               </div>
-            }
+            } */}
           </SearchOption> : ''}
         </div>
       </div>

+ 11 - 3
src/components/AddAssistCheck/index.less

@@ -8,9 +8,15 @@
   position: relative;
 }
 
-.pointerFinger {
+.imgCheck {
+  position: relative;
+  top: 2px;
+  margin: 0 3px 0 0px;
   cursor: pointer;
 }
+.pointerFinger {
+  cursor: default;
+}
 
 .searchLi {
   height: 36px;
@@ -31,7 +37,9 @@
   max-height: 225px;*/
   // min-height: 80px;
 }
-
+.assistListUl {
+  width: 356px;
+}
 .searchLi:hover {
   border: 1px solid @blue;
   box-sizing: border-box;
@@ -133,7 +141,7 @@
   cursor: pointer;
   position: absolute;
   right: -7px;
-  top: 2px;
+  top: -6px;
   background: @closeIcon;
   background-color: #fff;
   background-size: 100% 100%;

+ 2 - 2
src/components/AddInspect/SlideExcel/index.jsx

@@ -58,7 +58,7 @@ class SlideExcel extends Component {
               <td style={{ width: '25%' }}>
                 {normalVal(value.min, value.max)}
               </td>
-              <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '验时间: ' + this.toTime(value.time)}</td>
+              <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '验时间: ' + this.toTime(value.time)}</td>
             </tr>
           })) : (item.lisExcelItem && item.lisExcelItem.map((value, idx) => {
             if (idx < 4) {
@@ -77,7 +77,7 @@ class SlideExcel extends Component {
                 <td style={{ width: '25%' }}>
                   {normalVal(value.min, value.max)}
                 </td>
-                <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '验时间: ' + this.toTime(value.time)}</td>
+                <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '验时间: ' + this.toTime(value.time)}</td>
               </tr>
             }
           }))

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

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

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

@@ -0,0 +1,261 @@
+@import "~@less/variables.less";
+.slideLi {
+    // cursor: pointer;
+    // color: #767676;
+    position: relative;
+    padding: 10px 0px 10px 0;
+    border-bottom:1px dashed #989DA3;
+    margin-top: 5px;
+    span {
+        display: inline-block;
+        padding: 0 5px;
+        box-sizing: border-box;
+    }
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        // &:before {
+        //     content: '\300C';
+        // }
+        // &:after {
+        //     content: '\300D';
+        // }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 15px;
+        height: 15px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: -4px;
+        top: 0px;
+        background: @closeIcon;
+        background-color: #fff;
+        background-size: 100% 100%;
+    }
+    .bigname {
+        width: 20%;
+        font-weight: bold;
+    }
+    .smallname {
+        width: 25%;
+    }
+    .edit {
+        width: 15%;
+        input {
+            width: 40px;
+        }
+    }
+    .maxmin {
+        width: 15%;
+    }
+    .imgCheck {
+        position: relative;
+        top: 2px;
+        margin: 0 3px 0 5px;
+        cursor: pointer;
+    }
+}
+.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;
+}

+ 4 - 24
src/components/AddInspect/SlideSelect/index.jsx

@@ -90,7 +90,7 @@ class SlideSelect extends Component {
     handleFillShow(e,idx);
     //弹窗高度超出屏幕,增加页面高度
     setPosition(e,"#inspectFill",setHighter);
-    /*setTimeout(function(){//如果验下面有很多数据,则会跳过头
+    /*setTimeout(function(){//如果验下面有很多数据,则会跳过头
       refreshScroller()&&refreshScroller().scrollYTo(290);
     })*/
   }
@@ -132,26 +132,6 @@ class SlideSelect extends Component {
           setHighter={setHighter} 
           setTipValue={setTipValue}
           handleFillShow={handleFillShow}></InspectName>
-        {/* {
-            // 标签,血常规。。
-            item.show ?
-            <p className={styles.staticTagActive}>
-                <span className={`${styles.tagSpan} ${styles.selectTagSpan} ${setFontColorSize(2,6)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
-                  {item.name}
-                  <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
-                </span>
-                {
-                  item.inpValue?<input className={styles.iptValue} type="text"/>:<span className={styles.iptValueBtn}>点击备注</span>
-                }
-            </p>:
-            <p >
-                <i className={`${styles.tagSpan} ${styles.tagSpanS} ${setFontColorSize(2)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
-                  {item.name}
-                  <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
-                </i>
-            </p>
-        } */}
-
         {
           item.details && item.details.map((val)=>{
             if(val.value && val.value != ''){
@@ -176,7 +156,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'25%'}}>
                                       {val.questionDetailList.length > 0?'':normalVal(val.minValue,val.maxValue)}
                                     </td>
-                                    <td style={{width:'25%'}}>{'验时间:'+item.time}</td>
+                                    <td style={{width:'25%'}}>{'验时间:'+item.time}</td>
                                 </tr>
                             }
                         })):(item.details.map((val)=>{
@@ -194,7 +174,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'25%'}}>
                                         {val.questionDetailList.length > 0?'':normalVal(val.minValue,val.maxValue)}
                                     </td>
-                                    <td style={{width:'25%'}}>{'验时间:'+item.time}</td>
+                                    <td style={{width:'25%'}}>{'验时间:'+item.time}</td>
                                 </tr>
                               }
                           }
@@ -226,7 +206,7 @@ class SlideSelect extends Component {
                                 handleConfirm(e,idx,dateTime,currentData);
                             }
                             changeShowFill()
-                            handlePush&&handlePush();     //右侧推送
+                            handlePush&&handlePush({mode:8});     //右侧推送
                         }}
                     >
                     

+ 51 - 93
src/components/AddInspect/index.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { SearchOption, InspectCommon, Calendar, Notify, ConfirmModal, Add, DelToast } from '@commonComp';
 import SlideExcel from './SlideExcel';
-import SlideSelect from './SlideSelect';
+import SlidePic from './SlidePic';
 import { deepClone, getPageCoordinate, getStatusImg,getDomUpDown ,getCurrentDate,setPosition,getCalendarDate} from '@utils/tools';
 import styles from './index.less';
 import ScrollArea from 'react-scrollbar';
@@ -20,7 +20,7 @@ class Inspect extends React.Component {
       numPlus: 0,     //判断是否所有的填写单都是空
       num: 0,            //暂存数据,获取一次,不能每次都是新的数据
       type: null,
-      id: null,
+      time: null,
       pageTop: '',
       // tmpIds: [],      //内层外层
       impId: null
@@ -33,14 +33,14 @@ class Inspect extends React.Component {
     this.getCommonList = this.getCommonList.bind(this)
     this.changeActivePart = this.changeActivePart.bind(this)
     this.showDetails = this.showDetails.bind(this)
-    this.delConfirm = this.delConfirm.bind(this)
+    this.handleDelConfirm = this.handleDelConfirm.bind(this)
     this.handleCancel = this.handleCancel.bind(this)
     this.handleSearchShow = this.handleSearchShow.bind(this)
     this.changeShowFill = this.changeShowFill.bind(this)
     this.handleFillShow = this.handleFillShow.bind(this)
     this.handleDelClick = this.handleDelClick.bind(this)
   }
-  delConfirm() {//弹窗确定
+  handleDelConfirm() {//弹窗确定
     const { delPartItem, handleCloseExcel, handlePush } = this.props;
     const { type, id, impId } = this.state;
     if (type == 1) {
@@ -48,15 +48,10 @@ class Inspect extends React.Component {
     } else if (type == 2) {
       handleCloseExcel(impId)
     }
-    this.setState({
-      type: null,
-      id: null,
-      impId: null
-    })
     Notify.success("删除成功");
-    handlePush && handlePush();       //右侧推送
+    handlePush && handlePush({mode:8});       //右侧推送
   }
-  handleDelClick(type, idx) {
+  handleDelClick(type, time) {
     if (type == 2) {
       this.setState({
         impId: idx,
@@ -66,7 +61,7 @@ class Inspect extends React.Component {
     } else {
       this.setState({
         type: type,
-        id: idx,
+        time: time,
         impId: null
       })
     }
@@ -115,8 +110,7 @@ class Inspect extends React.Component {
       }
     });
     const that = this;
-    document.addEventListener('mousedown',function(e){
-      //onMousedown的目标为滚动条时,标签填写单不关闭
+    document.addEventListener('mousedown',function(e){//onMousedown的目标为滚动条时,标签填写单不关闭
       if(e.target.className=='scrollbar'){
         that.isBar = true;
       }else{
@@ -132,6 +126,7 @@ class Inspect extends React.Component {
   }
   changeShowFill() {
     this.setState({ showFill: false })
+    console.log(123123);
     this.props.setHighter(48)
   }
   handleChangeDate(info) {
@@ -145,6 +140,7 @@ class Inspect extends React.Component {
     if(tmpShow){
       this.props.setHighter(48)
     }else{
+      this.props.detailClick(2)
       setPosition(e,"#searchOption",this.props.setHighter)
     }
   }
@@ -258,8 +254,12 @@ class Inspect extends React.Component {
       }
     </ul>
   }
+  handleSign(item,idx){
+    const { handleSign,handlePush } = this.props;
+    handleSign(item,idx)
+    handlePush && handlePush({mode:8});       //右侧推送
+  }
   getSearchList(list) {//搜索列表
-    const { handleSign } = this.props;
     const contStyle={
       opacity:'0.4',
       right:'0',
@@ -268,31 +268,24 @@ class Inspect extends React.Component {
       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}>
+    return <ul className={`${styles.searchLiUl} ${styles.searchIsp}`} style={{height:'205px',width:'356px',overflow:'auto'}}>
       {
         list && list.map((item, idx) => {
+          let renderText = item.name ? item.name + `(${item.uniqueName})` : item.uniqueName   // 有大项需要显示大项
           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');
+              this.handleSign(item, idx, 'search');
               this.setState({ show: false })
             }}
           >
-            {item.name}{(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
+            {renderText}
           </li>
         })
       }
-      </ul></ScrollArea>;
+      </ul>;
   }
   getCommonList() {//常用列表
     const { handleSign, inspectList } = this.props;
@@ -304,7 +297,7 @@ class Inspect extends React.Component {
             title={item.name}
             onClick={() => {
               this.props.setHighter(48)
-              handleSign(item.questionId, idx, 'common');
+              this.handleSign(item.questionId, idx, 'common');
               this.setState({ show: false })
             }}
           >
@@ -317,7 +310,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 +322,8 @@ class Inspect extends React.Component {
     }
   }
   render() {
-    const {setHighter,refreshScroller, getInfomation,setTipValue, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, windowWidth,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
-    const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
-
+    const {setHighter,refreshScroller,checkOnOff, getInfomation,setTipValue, handleChangeValue,labelListSmall,inspectList, inspectVal, list, labelListBig, windowHeight, windowWidth,detailClick, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush,handleDelConfirm } = this.props;
+    const { tmpId, tmpIdx, time, pageTop, impId } = this.state;
     const contStyle={
       opacity:'0.4',
       right:'0',
@@ -344,78 +335,45 @@ class Inspect extends React.Component {
     return (
       <div className={styles.wrapper}>
         <div className={styles.check}>
-          {
-            getExcelDataList.length > 0 && getExcelDataList.map((items, ind) => {
-              return <div style={{ marginTop: '10px' }}>
-                {
-                  items && items.lisExcelRes.length > 0 ? <ul className={styles.excelDataLists}>
-                    {/*<img className={styles.close} src={close} alt="关闭导入excel数据" onClick={() => { this.handleDelClick(2, id) }} />*/}
-                    <span className={styles.close} id="impClose" onClick={() => { this.handleDelClick(2, ind) }}></span>
-                    <DelToast show={impId == ind ? true : false}
-                      top={'22px'}
-                      right={'-34px'}
-                      name="该导入项"
-                      cancel={this.handleCancel}
-                      confirm={this.delConfirm} />
-                    {
-                      items.lisExcelRes.map((item, idx) => {
-                        return <SlideExcel
-                          items={items}
-                          item={item}
-                          idx={idx}
-                          dateTime={this.state.dateTime}
-                          getInfomation={getInfomation}
-                        ></SlideExcel>
-                      })
-                    }
-                  </ul> : null
-                }
-              </div>
-            })
-          }
+          
           <ul className={styles.labelWrap} >
             {
-              labelList && labelList.map((item, idx) => {
-                return <SlideSelect
+              labelListSmall && labelListSmall.map((item, idx) => {
+                return <SlidePic
+                  item={item}
+                  checkOnOff={checkOnOff}
+                  idx={idx}
+                  time={time}
+                  handlePush={handlePush}
+                  handleDelClick={this.handleDelClick}
+                  setTipValue={setTipValue}
+                  handleDelConfirm={handleDelConfirm}
+                ></SlidePic>
+              })
+            }
+            {
+              labelListBig && labelListBig.map((item, idx) => {
+                return <SlidePic
                   item={item}
+                  checkOnOff={checkOnOff}
                   idx={idx}
-                  listDom={this.$ul}
-                  windowWidth={windowWidth}
-                  refreshScroller={refreshScroller}
-                  showToast={idx == id ? true : false}
-                  showFill={this.state.showFill}
+                  time={time}
                   handlePush={handlePush}
-                  fillActive={fillActive}
-                  handleLabelSub={handleLabelSub}
-                  date={this.state.date}
-                  dateTime={this.state.dateTime}
-                  currentIdx={this.state.currentIdx}
-                  currentData={this.state.currentData}
-                  showDetails={this.showDetails}
-                  handleShowDate={this.handleShowDate}
-                  handleChangeDate={this.handleChangeDate}
-                  changeShowFill={this.changeShowFill}
-                  handleFillShow={this.handleFillShow}
-                  getItemList={this.getItemList}
-                  changeActivePart={this.changeActivePart}
                   handleDelClick={this.handleDelClick}
-                  handleDelConfirm={this.delConfirm}
-                  handleConfirm={handleConfirm}
-                  getInfomation={getInfomation}
-                  setHighter={setHighter}
                   setTipValue={setTipValue}
-                ></SlideSelect>
+                  handleDelConfirm={handleDelConfirm}
+                ></SlidePic>
               })
             }
           </ul>
         </div>
         <div style={{ position: "relative", clear: "both", top: "5px" }}>
-          <Add showText="添加验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
-          {this.state.show ? <SearchOption 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>)}
-            {
+          <Add showText="添加检验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
+          {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 136px', color: '#bfbfbf' }}>暂无筛选项</p>)}
+            {/* {
               (list && list.length > 0) || (inspectVal != '') || (inspectList&&inspectList.length==0) ? '' : <div>
-                <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>常用验项</p>
+                <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>常用验项</p>
                 <ScrollArea speed={0.8}
                             horizontal={false}
                             stopScrollPropagation={true}
@@ -429,7 +387,7 @@ class Inspect extends React.Component {
                 }
                 </ScrollArea>
               </div>
-            }
+            } */}
           </SearchOption> : ''}
         </div>
       </div>

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

@@ -94,6 +94,13 @@
   max-height: 225px;*/
   // min-height: 80px;
 }
+.searchIsp {
+    display: block !important;
+    left: 107px !important;
+    width: 302px !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;
+}

二进制
src/components/AddInspectCopy/img/close.png


二进制
src/components/AddInspectCopy/img/date1.png


二进制
src/components/AddInspectCopy/img/date2.png


二进制
src/components/AddInspectCopy/img/info2.png


二进制
src/components/AddInspectCopy/img/info3.png


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

二进制
src/components/AddNewInspect/img/close.png


二进制
src/components/AddNewInspect/img/date1.png


二进制
src/components/AddNewInspect/img/date2.png


二进制
src/components/AddNewInspect/img/info2.png


二进制
src/components/AddNewInspect/img/info3.png


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

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

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

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

+ 2 - 1
src/components/Advice/Textarea/index.jsx

@@ -15,10 +15,11 @@ class Textarea extends Component {
     this.$dom = React.createRef();
     this.$domW = React.createRef();
     this.handleInput = this.handleInput.bind(this);
+    this.handleFocus = this.handleFocus.bind(this);
   }
   handleInput(e){
     e.stopPropagation();
-    const {handleChangeAssistValue,idx,handlePush} = this.props;
+    const {handleChangeAssistValue} = this.props;
     const text =  e.target.textContent.trim() ? e.target.innerHTML : ''
     handleChangeAssistValue&&handleChangeAssistValue(text);
    

+ 19 - 18
src/components/AssistCheck/index.jsx

@@ -38,10 +38,10 @@ class AssistCheck extends React.Component {
       this.inputRef.click();
       const storeState = store.getState()
       const {moduleName} = storeState.homePage
-      if(moduleName != '检') {
+      if(moduleName != '检') {
         store.dispatch({
           type: SET_CURRENT_MODULE,
-          moduleName:'检'
+          moduleName:'检'
         });
         store.dispatch(getMRAnalyse());
       }
@@ -53,10 +53,10 @@ class AssistCheck extends React.Component {
       })
       const storeState = store.getState()
       const {moduleName} = storeState.homePage
-      if(moduleName != '检') {
+      if(moduleName != '检') {
         store.dispatch({
           type: SET_CURRENT_MODULE,
-          moduleName:'检'
+          moduleName:'检'
         });
         store.dispatch(getMRAnalyse());
       }
@@ -74,10 +74,10 @@ class AssistCheck extends React.Component {
       })
       const storeState = store.getState()
       const {moduleName} = storeState.homePage
-      if(moduleName != '检') {
+      if(moduleName != '检') {
         store.dispatch({
           type: SET_CURRENT_MODULE,
-          moduleName:'检'
+          moduleName:'检'
         });
         store.dispatch(getMRAnalyse());
       }
@@ -94,7 +94,7 @@ class AssistCheck extends React.Component {
 
   }
     render(){
-        const {setHighter,checkedListImport,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,
+        const {setHighter,checkOnOff,checkedListImport,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,
           handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,
           isRead,winWidth,assistList,hideAllDrop} = this.props;
         const {showSlideImport,checkSystemIpt,onClose,closeInIcss} = this;
@@ -106,18 +106,18 @@ class AssistCheck extends React.Component {
         return (
             <div className={styles.wrapper}>
                 <div className={styles.top}>
-                    <span id="assistResultData" className={`${setFontColorSize(2,5)}`}>检结果数据</span>
+                    <span id="assistResultData" className={`${setFontColorSize(2,5)}`}>检结果数据</span>
                     {/* <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
-                        <p id="importPacBtn" className={styles.importInspectBtn}>导入检结果</p>
+                        <p id="importPacBtn" className={styles.importInspectBtn}>导入检结果</p>
                     </div> */}
-                    {
+                    {/* {
                       hospitalMsg.import_way_pacs == 1 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
-                        <p className={styles.importInspectBtn}>导入检结果</p>
+                        <p className={styles.importInspectBtn}>导入检结果</p>
                         <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
                       </div> : hospitalMsg.import_way_pacs == 2 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
-                        <p className={styles.importInspectBtn}>导入检结果</p>
+                        <p className={styles.importInspectBtn}>导入检结果</p>
                       </div> : hospitalMsg.import_way_pacs == 3 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
-                        <p id="importExcelBtns" className={styles.importInspectBtn}>导入检结果</p>
+                        <p id="importExcelBtns" className={styles.importInspectBtn}>导入检结果</p>
                         {
                           importLis?<ul className={styles.importSelect} id="importExcelLists">
                             <li className={styles.excelIpt}>
@@ -128,26 +128,27 @@ class AssistCheck extends React.Component {
                           </ul>:null
                         }
                           </div> : null
-                      }
-                    {
-                      hide ? <WrapModalContainer hide={hide} title={'导入检数据'} width={1000} height={580} onClose={onClose}>
+                      } */}
+                    {/* {
+                      hide ? <WrapModalContainer hide={hide} title={'导入检数据'} width={1000} height={580} onClose={onClose}>
                         <WrapModalBodyPac
                           closeInIcss={closeInIcss}
                           height={580}
                         ></WrapModalBodyPac>
                       </WrapModalContainer> : null
-                    }
+                    } */}
                 </div>
                 <ItemBox 
                     className={styles.title}
                     hideAllDrop={hideAllDrop}
-                    title={'检'}
+                    title={'检'}
                     editable={false}
                     border={true}
                     marginTop={'20px'}
                 >
                     <div style={{padding:'10px',boxSizing:'border-box',color:'#000'}} >
                         <AddAssistCheck
+                            checkOnOff={checkOnOff}
                             handleChangeValue={handleChangeValue}
                             refreshScroller={this.refreshScroller}
                             list={list}

+ 14 - 6
src/components/Banner/ModeChange/index.jsx

@@ -16,7 +16,7 @@ class ModeChange extends Component {
     }
     getStyle(flag){
         const {hideBtn,config0} = this.props;
-        if(flag===1&&config0===1){
+        if(flag===1&&config0!==0){
           return style['fade'];
         }
         return hideBtn?'':style['fade'];
@@ -24,7 +24,7 @@ class ModeChange extends Component {
     render(){
         const {closeConfigModal, changeType, confirmType, config0,config1,config2,config3,config4,hideBtn} = this.props;
         const domNode = document.getElementById('root');
-        const isOpen = +config0!==1;
+        const isOpen = config0===0;
         const general = +config1!==1;
         const ohis = +config2!==1;
         const fontsize = +config3!==1;
@@ -37,10 +37,18 @@ class ModeChange extends Component {
                 <div className="scroller">
                   <div className={style["oper"]}>
                     <p className={this.getStyle()}>
-                      <span>开启模板智能推送:</span>
-                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config0',isOpen?1:0):null}>
-                        <img src={isOpen?sopen:sclose} alt=""/>
-                        {isOpen?'开':'关'}
+                      <span>选择模式:</span>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config0',0):null}>
+                        <img src={config0===0?radio_on:radio_off} alt=""/>
+                        智能模板推送
+                      </a>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config0',1):null}>
+                        <img src={config0===1?radio_on:radio_off} alt=""/>
+                        非智能模板推送
+                      </a>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config0',2):null}>
+                        <img src={config0===2?radio_on:radio_off} alt=""/>
+                        自由文本输入
                       </a>
                     </p>
                     <p className={this.getStyle(1)}>

+ 8 - 8
src/components/Banner/index.jsx

@@ -43,9 +43,9 @@ class Banner extends Component {
   }
 
   changeType(type,typeConfig){
-    if(type==='config0'&&typeConfig===1){     //智能模式关闭,一般情况和其他史默认值也关闭
+    if(type==='config0'&&typeConfig!==0){     //智能模式关闭,一般情况和其他史默认值也关闭
       this.setState({
-        config0: 1,
+        config0: typeConfig,
         config1: 0,
         config2: 0,
       });
@@ -121,23 +121,23 @@ class Banner extends Component {
                       <img className={`${style["st"]} ${style["his"]}`} src={emergIcon} />
                       <i>本科室近期全部病历</i>
                     </div>:''}
-          {pre == 1?<div className={style.prec} onClick={()=>preShow(show)}>
+          {/* {pre == 1?<div className={style.prec} onClick={()=>preShow(show)}>
             <img className={style["st"]} src={prec} alt="预问诊"/>
             <i> 预问诊信息</i>
-          </div>:null}
-          <div className={style["buon1"]} onClick={showConfigModal}>
+          </div>:null} */}
+          {/*<div className={style["buon1"]} onClick={showConfigModal}>
             <img className={style["st"]} src={setup} />
             <i> 设置</i>
-          </div>
+          </div>*/}
         </div>
-        {visible&& <ModeChange
+        {/*{visible&& <ModeChange
           {...this.state}
           hideBtn={disabled}
           closeConfigModal = {closeConfigModal}
           changeType = {changeType}
           confirmType = {confirmType}
         >
-          </ModeChange>}
+          </ModeChange>}*/}
         {emergencyBox? ReactDom.createPortal(<React.Fragment> 
             <div className={style['modal']}>
               <div className={style['shade']} onClick={this.handleHisClose}></div>

+ 2 - 2
src/components/Banner/index.less

@@ -7,8 +7,8 @@
     height: 50px;
 
     border-bottom: 10px solid #e4e6e7;
-    position: absolute;          //页面布局调整
-    width: 100%;
+    position: fixed;          //页面布局调整
+    width: 1200px;
     top: 0;
     // z-index: 202;
     img{

+ 31 - 0
src/components/BlockEmrCont/CheckBody.jsx

@@ -0,0 +1,31 @@
+import React,{Component} from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import {connect} from "react-redux";
+
+class CheckBody extends Component{
+  constructor(props){
+    super(props)
+  }
+  render(){
+    const {value,isRead}=this.props;
+   return  <BlockInp title='查体' boxMark='4' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state){
+  const {checkBody} = state;
+  return {
+    value:checkBody.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch,store){
+  return {
+  }
+}
+
+const CheckBodyCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(CheckBody);
+
+export default CheckBodyCont;

+ 31 - 0
src/components/BlockEmrCont/CurrentIll.jsx

@@ -0,0 +1,31 @@
+import React,{Component} from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import {connect} from "react-redux";
+
+class CurrentIll extends Component{
+  constructor(props){
+    super(props)
+  }
+  render(){
+    const {value,isRead}=this.props;
+   return  <BlockInp title='现病史' boxMark='2' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state){
+  const {currentIll} = state;
+  return {
+    value:currentIll.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch,store){
+  return {
+  }
+}
+
+const CurrentIllCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(CurrentIll);
+
+export default CurrentIllCont;

+ 31 - 0
src/components/BlockEmrCont/FamilyHistory.jsx

@@ -0,0 +1,31 @@
+import React, { Component } from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import { connect } from "react-redux";
+
+class FamilyHistory extends Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { value, isRead } = this.props;
+    return <BlockInp title='家族史' boxMark='15' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state) {
+  const { familyHistory } = state;
+  return {
+    value: familyHistory && familyHistory.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch, store) {
+  return {
+  }
+}
+
+const FamilyHistoryCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(FamilyHistory);
+
+export default FamilyHistoryCont;

+ 32 - 0
src/components/BlockEmrCont/MainSuit.jsx

@@ -0,0 +1,32 @@
+import React,{Component} from 'react';
+import {connect} from 'react-redux';
+import BlockInp from '@containers/BlockInpContainer';
+
+
+class MainSuit extends Component{
+  constructor(props){
+    super(props)
+  }
+  render(){
+    const {value,isRead}=this.props;
+   return  <BlockInp title='主诉' boxMark='1' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state){
+  const {mainSuit} = state;
+  return {
+    value:mainSuit.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch,store){
+  return {
+  }
+}
+
+const MainSuitCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(MainSuit);
+
+export default MainSuitCont;

+ 57 - 0
src/components/BlockEmrCont/MenstruationHistory.jsx

@@ -0,0 +1,57 @@
+import React, { Component } from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import { connect } from "react-redux";
+import {  CLEARMENSTRUATIONTEXTDATA, } from '@store/types/menstruationHistory';
+import store from '@store';
+class MenstruationHistory extends Component {
+  constructor(props) {
+    super(props)
+    this.state = {
+      isShowSexInput: true
+    }
+  }
+
+
+  componentWillReceiveProps(nextProps) {
+    // console.log(nextProps.patInfoData.patInfoData[3].value);
+    if (nextProps.patInfoData.patInfoData[3].value === 1) {
+      this.setState({
+        isShowSexInput: false
+      })     
+    } else {
+      this.setState({
+        isShowSexInput: true
+      })
+    }
+    // store.dispatch({
+    //   type: CLEARMENSTRUATIONTEXTDATA,
+    // });
+  }
+
+  render() {
+    const { value, isRead } = this.props;
+    return(
+      this.state.isShowSexInput?(<BlockInp title='月经史' boxMark='17' value={value} isRead={isRead}></BlockInp>) : null
+    );
+  }
+}
+
+function mapStateToProps(state) {
+  const { menstruationHistory } = state;
+
+  return {
+    value: menstruationHistory && menstruationHistory.saveText[0],
+    patInfoData: state.patInfo
+  }
+}
+function mapDispatchToProps(dispatch, store) {
+  return {
+  }
+}
+
+const MenstruationHistoryCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(MenstruationHistory);
+
+export default MenstruationHistoryCont;

+ 44 - 0
src/components/BlockEmrCont/OtherHistory.jsx

@@ -0,0 +1,44 @@
+import React,{Component} from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import {connect} from "react-redux";
+import {setOtherHisModule} from '@store/async-actions/fetchModules';
+
+class OtherHistory extends Component{
+  constructor(props){
+    super(props);
+    //this.getRecord = this.getRecord.bind(this);
+  }
+  /*getRecord(){
+    //空白聚焦其他史时,获取上次记录
+    const {setInitData,value} = this.props;
+    if(!value){
+      setInitData();
+    }
+  }*/
+  render(){
+    const {value,isRead}=this.props;
+   return  <BlockInp title='其他史' boxMark='3' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state){
+  const {otherHistory} = state;
+  return {
+    value:otherHistory.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch,store){
+  return {
+    setInitData(){
+      //先获取最近记录,没有的话显示模板
+      dispatch(setOtherHisModule());
+    },
+  }
+}
+
+const OtherHistoryCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(OtherHistory);
+
+export default OtherHistoryCont;

+ 31 - 0
src/components/BlockEmrCont/PastHistory.jsx

@@ -0,0 +1,31 @@
+import React, { Component } from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import { connect } from "react-redux";
+
+class PastHistory extends Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { value, isRead } = this.props;
+    return <BlockInp title='既往史' boxMark='13' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state) {
+  const { pastHistory } = state;
+  return {
+    value: pastHistory && pastHistory.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch, store) {
+  return {
+  }
+}
+
+const PastHistoryCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(PastHistory);
+
+export default PastHistoryCont;

+ 31 - 0
src/components/BlockEmrCont/PersonalHistory.jsx

@@ -0,0 +1,31 @@
+import React, { Component } from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import { connect } from "react-redux";
+
+class PersonalHistory extends Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { value, isRead } = this.props;
+    return <BlockInp title='个人史' boxMark='14' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state) {
+  const { personalHistory } = state;
+  return {
+    value: personalHistory && personalHistory.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch, store) {
+  return {
+  }
+}
+
+const PersonalHistoryCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(PersonalHistory);
+
+export default PersonalHistoryCont;

+ 125 - 0
src/components/BlockEmrCont/index.jsx

@@ -0,0 +1,125 @@
+import React, { Component } from 'react';
+import Diagnosis from '@containers/Diagnosis';
+import Inspect from '@containers/Inspect';
+import AssistCheck from '@containers/AssistCheck';
+import OperationContainer from '../../containers/OperationContainer'
+import style from './index.less';
+import AdviceContainer from '../../containers/AdviceContainer';
+import InfoTitle from '@components/InfoTitle'
+import ScrollArea from 'react-scrollbar';
+import MainSuit from './MainSuit';
+import CurrentIll from './CurrentIll';
+import PastHistory from './PastHistory'
+import PersonalHistory from './PersonalHistory'
+import FamilyHistory from './FamilyHistory'
+import MarriageHistory from './marriageHistory'
+import NewAdvice from '@containers/NewAdvice';
+import PushDataContainer from '@containers/PushDataContainer'
+import MenstruationHistory from './MenstruationHistory'
+// import OtherHistory from './OtherHistory';
+import CheckBody from './CheckBody';
+import {getWindowInnerHeight,getWindowInnerWidth,windowEventHandler} from '@utils/tools';
+import store from '@store';
+
+class BlockEMRCont extends Component {
+  constructor(props){
+    super(props);
+    this.state = {
+      isShowSexInput : true,
+      historyId : -1
+    }
+    this.$cont = React.createRef();
+    this.$div = React.createRef();
+    this.setHighter = this.setHighter.bind(this);
+  }
+  componentDidMount(){
+    // const height = getWindowInnerHeight() - 175;
+    // const width = getWindowInnerWidth() - 20;
+    // this.$cont.current.style.height = height+"px";
+    // this.$cont.current.style.minWidth = width + "px";
+    // windowEventHandler('resize', ()=>{
+    //   const height = getWindowInnerHeight() - 175;
+    //   const width = getWindowInnerWidth() - 20;
+    //   if(this.$cont.current){
+    //     this.$cont.current.style.height = height + "px";
+    //     this.$cont.current.style.minWidth = width + "px";
+    //   }
+    // });
+  }
+
+  // componentWillReceiveProps(nextProps) {
+  //   console.log(nextProps,'nextProps');
+  //   if (nextProps.historyId !== this.state.historyId){
+  //     this.setState({
+  //       historyId : nextProps.historyId
+  //     })
+  //   }
+  // }
+
+  setHighter(ht){
+    // console.log(ht, '-=-=-ht=-------');
+    // console.log(this.$div.current.scrollHeight,'-=-this.$div.current.scrollHeight=-=-------');
+    if (this.$div.current) {
+      this.$div.current.style.paddingBottom = ht + 'px';
+    }
+    //  低分辨率屏幕 处理 高度,暂时定为检验 + 48px   检查 +96px,可解决bug但是需要后期优化 2020/08/21
+
+    // if (this.$div.current && ht === 48){
+    //   this.$div.current.style.paddingBottom = ht+'px';
+    // }
+    // if (this.$div.current && ht === 96) {
+    //   this.$div.current.style.paddingBottom = ht + 'px';
+    // }
+  }
+  render() {
+    const { isShowSexInput} = this.state
+    const contStyle={
+      opacity:'0.4',
+      top:'1px',
+      right:'0px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%',marginLeft:'0'};
+    return <div className={style['EMR-container']}
+                ref={this.$cont} id="addBlockScrollEvent">
+      <InfoTitle hideHistory={true}></InfoTitle>
+      {/* <ScrollArea speed={1}
+                  horizontal={false}
+                  className={style["area"]}
+                  verticalContainerStyle={contStyle}
+                  verticalScrollbarStyle={barStyle}
+                  contentClassName="content"> */}
+        <div className={style['inner']} id="EmrBlockContainer" ref={this.$div}>
+          <MainSuit></MainSuit>
+          <CurrentIll></CurrentIll>
+          {/* 既往史 */}
+          <PastHistory></PastHistory>
+          {/* 个人史 */}
+          <PersonalHistory></PersonalHistory>
+          {/* 家族史 */}
+          <FamilyHistory></FamilyHistory>
+          {/* 婚育史 */}
+          <MarriageHistory></MarriageHistory>
+          {/* 月经史 */}
+          {isShowSexInput && <MenstruationHistory></MenstruationHistory>}
+          
+          {/* <OtherHistory></OtherHistory> */}
+          <CheckBody setHighter={this.setHighter}></CheckBody>
+          {/* 检验 */}
+          <Inspect setHighter={this.setHighter}></Inspect>
+          {/* 检查 */}
+          <AssistCheck setHighter={this.setHighter}></AssistCheck>
+          {/* 诊断 */}
+          <Diagnosis setHighter={this.setHighter} hideChronic={true}></Diagnosis>
+          {/* 医嘱 */}
+          <NewAdvice setHighter={this.setHighter}></NewAdvice>
+          {/* <AdviceContainer></AdviceContainer> */}
+        </div>
+      {/* </ScrollArea> */}
+      <PushDataContainer></PushDataContainer>
+      <OperationContainer hideLabel={true}></OperationContainer>
+    </div>
+  }
+}
+export default BlockEMRCont;

+ 47 - 0
src/components/BlockEmrCont/index.less

@@ -0,0 +1,47 @@
+@import "~@less/variables.less";
+.area{
+  height: 100%;
+  // min-width: 500px;
+}
+.EMR-container{
+  background: #fff;
+  margin:60px 20px 0 0;
+  // margin-right:@push-width + 10px;
+  /*padding: 0px 0 10px 0 ;*/
+  box-sizing: border-box;
+  position: absolute;
+  left: 0;
+  // min-width: 700px;
+  // min-width: 548px;
+  width: 1200px;
+  padding-bottom: 80px;
+}
+.inner{
+  padding-top:20px;
+  padding-bottom: 80px;
+}
+.keep {
+  position: absolute;
+  right: 0;
+  top: 0;
+}
+.box {
+  padding-top: 10px;
+  box-sizing: border-box;
+  height: 80px;
+}
+.ipt {
+  font-size: 16px;
+  width: 112px;
+  height: 20px;
+  line-height: 18px;
+  display: block;
+  margin: 0 auto;
+  text-align: left;
+}
+.line {
+  width: 182px;
+  height: 1px;
+  margin: 8px auto 0 auto;
+  background: #D8D8D8;
+}

+ 32 - 0
src/components/BlockEmrCont/marriageHistory.jsx

@@ -0,0 +1,32 @@
+
+import React, { Component } from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import { connect } from "react-redux";
+
+class MarriageHistory extends Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { value, isRead } = this.props;
+    return <BlockInp title='婚育史' boxMark='16' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state) {
+  const { marriageHistory } = state;
+  return {
+    value: marriageHistory && marriageHistory.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch, store) {
+  return {
+  }
+}
+
+const MarriageHistoryCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(MarriageHistory);
+
+export default MarriageHistoryCont;

+ 8 - 5
src/components/BodyContainer/index.jsx

@@ -1,13 +1,16 @@
-import EMRContainer from "@components/EMRContainer";
-import PushContainer from '@components/PushContainer';
+import EMRContainer from "../EMRContainer";
+import BlockEMRCont from "../BlockEmrCont/index.jsx";
+// import BlockEMRCont from "../../containers/BlockEMRContanier";
+import PushContainer from '../PushContainer';
 
 import style from './index.less';
 
 const BodyContainer = (props) =>{
-  const { saveDateAll } = props;
+  console.log(props,'===');
+  const { saveDateAll,mode } = props;
   return <div className={style['container'] + ' clearfix'}>
-      <EMRContainer saveDateAll={saveDateAll}></EMRContainer>
-      <PushContainer></PushContainer>
+      <BlockEMRCont />
+      {/* <PushContainer></PushContainer> */}
   </div>;
 }
 

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

@@ -80,7 +80,7 @@ class CopyRight extends Component {
           <a lassName={style["copy-number"]} href="javascript:;" onClick={showCopyModal}>
             {number}
           </a>{" "}
-          {hasNewVersion && <span>new</span>} &copy;<b>朗通医疗</b>
+          {hasNewVersion && <span>new</span>}<b> &copy;朗通医疗</b>
           <div className={style['disclaimer']} onClick={showDisclatmerModal}>免责声明</div>
         </div>
         {/* {copyVisible && <div

+ 3 - 2
src/components/CopyRight/index.less

@@ -22,7 +22,8 @@
       a{
         text-decoration: none;
         font-size: 12px;
-        color: #3B9ED0;
+        color: #1E1E1E;
+        margin-right: 8px;
       }
       b{
         font-size: 12px;
@@ -32,7 +33,7 @@
     
     .disclaimer{
       font-size: 12px;
-      color: #3B9ED0;
+      color: #1E1E1E;
       float: right;
       cursor: pointer;
     }

+ 11 - 16
src/components/DiagResultSearch/index.jsx

@@ -41,11 +41,16 @@ class DiagResultSearch extends Component {
     });
   }
 
-  getSearchList(searchResult) {
-    return <div className={style['search-result']}>
+  getSearchList(searchResult, isShowNoDataInfo) {
+    // console.log(searchResult,'searchResult');
+    // console.log(isShowNoDataInfo,'isShowNoDataInfo');
+    if (isShowNoDataInfo === true && searchResult.length === 0 ){
+      return <div className={style['search-result-noItem']}>暂无筛选项</div>
+    }
+    return <div className={style['search-result']} style={{'min-height':'120px',width:'412px',overflow:'auto'}}>
       {
-        searchResult && searchResult.map((item) => {
-          return (<div key={item.id} className={style['search-result-item']}>
+        searchResult.length !== 0  && searchResult.map((item,idx) => {
+          return (<div key={idx} className={style['search-result-item']}>
             <DiagnosticItem setHighter={this.props.setHighter} title={true} item={item} clearInput={this.clearInput} type='search'/>
           </div>)
         })
@@ -54,8 +59,7 @@ class DiagResultSearch extends Component {
   }
 
   render() {
-    const { show, searchResult, refreshScroller, handleChangeValue,pageTop,windowHeight } = this.props;
-
+    const { show, searchResult, refreshScroller, handleChangeValue, pageTop, windowHeight, isShowNoDataInfo } = this.props;
     const contStyle={
       opacity:'0.4',
       right:'0',
@@ -67,16 +71,7 @@ class DiagResultSearch extends Component {
     return (
       show && <div id='diagSearch' className={style['search-box']}>
         <SearchOption handleChangeValue={handleChangeValue} refreshScroller={refreshScroller} pageTop={pageTop} windowHeight={windowHeight} height={180} visible={true}>
-          <ScrollArea speed={0.8}
-                      horizontal={false}
-                      stopScrollPropagation={searchResult.length>6?true:false}
-                      style={{height:'257px'}}
-                      className={style["area"]}
-                      verticalContainerStyle={contStyle}
-                      verticalScrollbarStyle={barStyle}
-                      contentClassName="content">
-          {this.getSearchList(searchResult)}
-          </ScrollArea>
+            {this.getSearchList(searchResult, isShowNoDataInfo)}
         </SearchOption>
       </div>
     )

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

@@ -55,4 +55,12 @@
 
 .search-result-item:hover {
     border: 1px solid @blue;
+}
+
+.search-result-noItem{
+    position: relative;
+    color: #bfbfbf;
+    top: 8px;
+    left: 27px;
+    height: 50px;
 }

+ 7 - 2
src/components/Diagnosis/index.jsx

@@ -53,11 +53,16 @@ class Diagnosis extends Component {
   render() {
     return (<div id="diagnosisResult">
       <ItemBox id="diagnosis" title='诊断' boxHeight='auto' hideAllDrop={this.props.hideAllDrop} titleTop='22px' marginTop='9px' backgroundColor='#EAF7FD'>
-        <DiagnosticList refreshScroller={this.refreshScroller}></DiagnosticList>
+        <DiagnosticList refreshScroller={this.refreshScroller} hideChronic={this.props.hideChronic}></DiagnosticList>
         <div style={{ marginLeft: '10px', position: 'relative',color:'#000' }}>
           <Add showText="添加诊断结果" handleClick={this.handleshowSearch} id="addDiag" height="50px" />
           <DiagResultSearch
-            refreshScroller={this.refreshScroller} setHighter={this.props.setHighter} windowHeight={this.props.windowHeight} pageTop={this.state.pageTop} height={150}></DiagResultSearch>
+            refreshScroller={this.refreshScroller} 
+            setHighter={this.props.setHighter} 
+            windowHeight={this.props.windowHeight}
+            pageTop={this.state.pageTop} 
+            height={150}>
+          </DiagResultSearch>
         </div>
 
 

+ 15 - 13
src/components/DiagnosticItem/index.jsx

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

+ 32 - 19
src/components/DiagnosticList/index.jsx

@@ -18,6 +18,7 @@ import iconRadioDefault from '@common/images/icon-radio-default.png'
 import iconRadioActive from '@common/images/icon-radio-active.png'
 import AssessResult from '@containers/AssessResult';
 import {getAssessData} from '@store/async-actions/fetchModules';
+import DetailsModal from '@components/PushItems/DetailsModal';
 import tableIcon from '@common/images/table.png';
 import { CONFIRM_TYPE } from "@store/types/typeConfig";
 import $ from "jquery";
@@ -54,6 +55,7 @@ class DiagnosticList extends Component {
         this.referCase = this.referCase.bind(this);
         this.handleSaveAssess = this.handleSaveAssess.bind(this);       //评估弹窗确定
         this.onPrint = this.onPrint.bind(this);
+        this.hideTips=this.hideTips.bind(this);
     }
     onPrint() {
       let dom = $("#AssistResult");
@@ -108,10 +110,14 @@ class DiagnosticList extends Component {
             treatTitle: item.name
         })
     } 
-    handleClickDiag(item,noTips,noDetails,noNotify) {
+    handleClickDiag(item) {
         const { getTips } = this.props;
         // getTips && getTips(item);
-        getTips && getTips({id:item.conceptId, type:7, name: item.name, position: 1},noTips,noDetails,noNotify);
+        getTips && getTips({id:item.conceptId, type:7, name: item.name, position: 0});
+    }
+    hideTips() {
+      const { hideTipsDetailsModal } = this.props;
+      hideTipsDetailsModal && hideTipsDetailsModal()
     }
     referRecord() {
         const { hideReferRecord, showHistoryCaseModal ,chronicMagItem,hisTemplates,autoFillModules,typeConfig} = this.props;
@@ -159,7 +165,7 @@ class DiagnosticList extends Component {
         // let baseObj = items[this.state.activeHistory];
         // pushAllDataList(baseObj.sign,'push',baseObj,'history')       //引用
         store.dispatch(getHistempDetail(activeItem));
-        this.props.getBilling();
+        this.props.getBilling({mode:10});
         this.setState({
             activeHistory: -1,
             sign:-1,
@@ -241,7 +247,7 @@ class DiagnosticList extends Component {
     }
     componentWillReceiveProps(nextprops) {
       if (this.props.diagnosticStr != nextprops.diagnosticStr) {
-        this.props.getBilling();
+        this.props.getBilling({mode:10});
       }
     }
    
@@ -278,10 +284,11 @@ class DiagnosticList extends Component {
       })
     }
     render(){
-        const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller,windowWidth} = this.props;
+        const { list, treatment,pushMessage, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller,windowWidth,hideChronic} = this.props;
+      const {showTipsDetails,tipsDetails,showAllName}=pushMessage;
         const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex,hasEnterItem,hasEnterImg} = this.state;
         const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
-        let isChronic = false;      //是否要显示管理评估
+        //let isChronic = false;      //是否要显示管理评估
         const footer = <Footer print={true}
                                footText="确定"
                                handlePrint={this.onPrint}
@@ -289,9 +296,9 @@ class DiagnosticList extends Component {
         return(
                 <div className={style['diaglist-wrap']}>
                     {list && (list.length > 0) && list.map((item, index) => {
-                        const hasTreat = item.treat && ((item.treat.commonTreatment&&item.treat.commonTreatment.content) || (item.treat.surgeryTreatment&&item.treat.surgeryTreatment.content) || item.treat.treatment.length>0 ||(item.adverseReactions&&item.adverseReactions.length > 0)
+                        /*const hasTreat = item.treat && ((item.treat.commonTreatment&&item.treat.commonTreatment.content) || (item.treat.surgeryTreatment&&item.treat.surgeryTreatment.content) || item.treat.treatment.length>0 ||(item.adverseReactions&&item.adverseReactions.length > 0)
                            || (item.drugHistory && item.drugHistory['慢病用药内容'] &&  item.drugHistory['慢病用药内容'].length > 0) || (item.drugHistory &&item.drugHistory['普通病用药内容'] &&  item.drugHistory['普通病用药内容'].length > 0) ||item.follow)
-                        isChronic = chronicMagItem&&item.type==2&&chronicList&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;
+                        isChronic = !hideChronic&&chronicMagItem&&item.type==2&&chronicList&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;*/
                         return (<div draggable={true} className={`${style['diag-box']} ${setFontColorSize(2,3)} clearfix`} id="diagListBox" key={item.conceptId} >
                                     {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></span>}
                                     {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
@@ -300,45 +307,51 @@ class DiagnosticList extends Component {
                                        onMouseEnter={this.handleMouseEnterDrug.bind(this,index)}
                                        onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                                     >
-                                      <span   className={style['diag-name-box']} style={{maxWidth: windowWidth > 1024 ?windowWidth-900 +'px':'130px'}} onClick={this.handleClickDiag.bind(this,item,false,true,false)}>
+                                      <span title={item.name} className={style['diag-name-box']} style={{maxWidth: windowWidth > 1024 ?windowWidth-600 +'px':'130px'}}>
                                         {item.name}
                                       </span>
-                                      <img className={`${style['info-img']}`}
+                                      {/* <img className={`${style['info-img']}`}
                                           title='点击i图标可查看详细说明'
                                           style ={hasEnterItem===index  ? {display: "inline-block"} : {display: "none"}}
                                           src={hasEnterImg ? infoMove : infoShow} 
                                           onMouseEnter={this.handleMouseEnterImg.bind(this)}
                                           onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
                                           onClick={this.handleClickDiag.bind(this,item,false,false,false)}
-                                      />
+                                      /> */}
                                     </span> 
-                                    {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
+                                    {/* {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
                                     <span className={style['treat']}
                                           // style ={hasTreat ? '' : { color: 'gray', cursor: 'text'}}
                                           onClick={() =>{this.showTreat(item, index)}}>
                                           治疗方案
-                                    </span>
-                                    {isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
+                                    </span> */}
+                                    {/*{isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
                                           onClick={this.showAssessFn.bind(this,item)}>
                                         管理评估
-                                    </span>:''}
+                                    </span>:''}*/}
                                     <img className={style['diag-del']} src={hasOnIndex == index ? hasOndel ? del_on : del_icon : del_icon} onMouseEnter={this.handleEnterDel.bind(this,index)} onMouseLeave={this.handleLeaveDel.bind(this)} onClick={()=>{this.handleDeleteItem(item)}}/>
                         </div>)
                     })}
                      {treatment&&<Treat title={treatTitle} refreshScroller={refreshScroller}></Treat>}
-                     {showAssess?<ComplexModal onclose={this.showAssessFn.bind(this)} footer={footer}
+                     {/*{showAssess?<ComplexModal onclose={this.showAssessFn.bind(this)} footer={footer}
                                                title='管理和评估'
                                                icon={manageIcon}
                                                top={'3%'}
                                                bottom={'3%'}
                                                width={820}>
+
                        <AssessResult closeAssess={this.showAssessFn.bind(this)}
                                      disId={assessId}
                                      disName={disName}
                                      chronicMagItemName={list[0].name}
                                      isAssessConfirm={isAssessConfirm}
                                      ></AssessResult>
-                      </ComplexModal>:''}
+                      </ComplexModal>:''}*/}
+                    {showTipsDetails &&<DetailsModal
+                        showTipsDetails = {showTipsDetails}
+                        hideTips = {this.hideTips}
+                        showAllName = {showAllName}
+                        tipsDetails = {tipsDetails}/>}
                     <ConfirmModal visible={visible} 
                                   okText='删除' 
                                   cancelText='取消' 
@@ -348,13 +361,13 @@ class DiagnosticList extends Component {
                                   >
                                   <div className={style['del-msg']}>是否删除该诊断?</div> 
                     </ConfirmModal>
-                    <ConfirmModal visible={showReferRecord} okText='是' cancelText='否' confirm={this.referRecord}  cancel={this.noReferRecord} close={this.noReferRecord}>
+                    {/*<ConfirmModal visible={showReferRecord} okText='是' cancelText='否' confirm={this.referRecord}  cancel={this.noReferRecord} close={this.noReferRecord}>
                         <div className={style['confirm-info']}>是否引用往期病历</div> 
                     </ConfirmModal>
                     <ConfirmModal visible={showHistoryCase} noFooter='true' title='请选择历史病历' close={this.closeHistoryCaseModal} titleBg="#DFEAFE" icon={tableIcon} height={300}>
                         {this.getHistoryCase()}
                         <div className={style['confirm-history']}><span className={style['confirm-history-btn']} onClick={this.referCase}>确定</span></div>
-                    </ConfirmModal>
+                    </ConfirmModal>*/}
                     <Loading show={loading}/>
                 </div>
                

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

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

+ 18 - 18
src/components/EMRContainer/index.jsx

@@ -56,25 +56,25 @@ class EMRContainer extends Component {
         return <div className={style['EMR-container']}
                     ref={this.$cont} id="addScrollEvent">
             <InfoTitle></InfoTitle>
-          <ScrollArea speed={1}
-                      horizontal={false}
-                      className={style["area"]}
-                      verticalContainerStyle={contStyle}
-                      verticalScrollbarStyle={barStyle}
-                      contentClassName="content">
-            <div className={style['inner']} id="EmrContainer" ref={this.$div}>
-                <MainSuit></MainSuit>
-                <CurrentIll></CurrentIll>
-                <OtherHistory></OtherHistory>
-                <div>
-                  <CheckBody setHighter={this.setHighter}></CheckBody>
+            <ScrollArea speed={1}
+                        horizontal={false}
+                        className={style["area"]}
+                        verticalContainerStyle={contStyle}
+                        verticalScrollbarStyle={barStyle}
+                        contentClassName="content">
+                <div className={style['inner']} id="EmrContainer" ref={this.$div}>
+                    <MainSuit></MainSuit>
+                    <CurrentIll></CurrentIll>
+                    <OtherHistory></OtherHistory>
+                    <div>
+                      <CheckBody setHighter={this.setHighter}></CheckBody>
+                    </div>
+                    <Inspect setHighter={this.setHighter}></Inspect>
+                    <AssistCheck setHighter={this.setHighter}></AssistCheck>
+                    <Diagnosis setHighter={this.setHighter}></Diagnosis>
+                    <AdviceContainer></AdviceContainer>
                 </div>
-                <Inspect setHighter={this.setHighter}></Inspect>
-                <AssistCheck setHighter={this.setHighter}></AssistCheck>
-                <Diagnosis setHighter={this.setHighter}></Diagnosis>
-                <AdviceContainer></AdviceContainer>
-            </div>
-    </ScrollArea>
+          </ScrollArea>
             <OperationContainer></OperationContainer>
         </div>
     }

+ 2 - 2
src/components/Emergency/index.jsx

@@ -152,8 +152,8 @@ class EmergencyHis extends Component{
         jsonDataString.present = dataStr[1].content || '';     //现病史
         jsonDataString.other = dataStr[2].content || '';      //其他史
         jsonDataString.vital = dataStr[3].content || '';    //查体
-        jsonDataString.lis = dataStr[4].content || '';      //验导入填写
-        jsonDataString.pacs = dataStr[5].content || '';     //
+        jsonDataString.lis = dataStr[4].content || '';      //验导入填写
+        jsonDataString.pacs = dataStr[5].content || '';     //检
         jsonDataString.diag = dataStr[6].content || '';      //诊断
         jsonDataString.advice = dataStr[7].content || '';       //医嘱
         return jsonDataString;

+ 1 - 1
src/components/EmergencyProcedure/EmergencyPart/PartTrd/index.jsx

@@ -33,7 +33,7 @@ class PartTrd extends React.Component {
         { name: '告病重,立即送抢救室,停止活动,绝对卧床' },
         { name: '监测生命体征,持续心电监护,建立静脉通道(左侧肢体,1-2路)' },
         { name: '必要时给氧,保持血氧饱和度95%以上' },
-        { name: '取血验', list: ['血常规', '急诊生化', '心肌酶谱', 'Troponinl', '凝血功能', '术前免疫'] },
+        { name: '取血验', list: ['血常规', '急诊生化', '心肌酶谱', 'Troponinl', '凝血功能', '术前免疫'] },
         { name: '床边心超检查' },
         { name: '询问相关病史和体格检查' }
       ],

+ 1 - 1
src/components/EmergencyProcedure/emergency.js

@@ -343,7 +343,7 @@ let data = [
                   {name:'告病重,立即送抢救室,停止活动,绝对卧床'},
                   {name:'监测生命体征,持续心电监护,建立静脉通道(左侧肢体,1-2路)'},
                   {name:'必要时给氧,保持血氧饱和度95%以上'},
-                  {name:'取血验',list:['血常规','急诊生化','心肌酶谱','Troponinl','凝血功能','术前免疫']},
+                  {name:'取血验',list:['血常规','急诊生化','心肌酶谱','Troponinl','凝血功能','术前免疫']},
                   {name:'床边心超检查'},
                   {name:'询问相关病史和体格检查'}
                 ],

+ 13 - 6
src/components/EmergencyProcedure/index.jsx

@@ -29,24 +29,31 @@ class EmergencyProcedure extends React.Component {
     }
   }
   handleShow(type){
+    const newinConf = {
+      width: '600',   //窗口的文档显示区的宽度。以像素计。
+      height: '826',  //窗口文档显示区的高度。以像素计。
+      left: '0',  //窗口的 x 坐标。以像素计。
+      top: '0',    //窗口的 y 坐标。以像素计。
+      openMode: "_blank"  //每次都是新窗口打开为_blank,打开同一窗口填写任意字符串
+    }
+    
+    const newWindowLocation = `width=${newinConf.width}, height=${newinConf.height}, left=${newinConf.left}, top=${newinConf.top} scrollbars=yes`
+    window.open('http://localhost:8082/emergency.html?disName='+'气胸', newinConf.openMode, newWindowLocation)
     this.setState({
       show:type
     })
     !type&&this.slideToggle(0)
   }
   render(){
-    const {data,setDataIdx,idx,windowHeight,hideAllDrop} = this.props;
+    const {emergencyname} = this.props;
     const domNode = document.getElementById('root');
-    return ReactDom.createPortal(<div className={styles.emergencyProdureWrap} onClick={hideAllDrop}>
+    return ReactDom.createPortal(<div className={styles.emergencyProdureWrap}>
       <div id="emergencyWrap" className={styles.emergencyWrap}>
         <span id="emergencys" onClick={()=>this.slideToggle(1)} className={styles.emergency}>急</span>
         <span id="emergency" className={`${styles.emergency}`} onClick={()=>this.slideToggle(0)}>急</span>
-        <div id="emergencyName" className={styles.emergencyName} onClick={()=>this.handleShow(true)}>{data.emergencyname}</div>
+        <div id="emergencyName" className={styles.emergencyName} onClick={()=>this.handleShow(true)}>{emergencyname}救治流程</div>
         <i onClick={()=>this.slideToggle(0)} id="emergencyPic"><img src={right} alt=""/></i>
       </div>
-      {
-        <EmergencyModal windowHeight={windowHeight} idx={idx} handleShow={()=>this.handleShow()} setDataIdx={setDataIdx} show={this.state.show} data={data}></EmergencyModal>
-      }
     </div>,domNode)
   }
 }

+ 350 - 58
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -1,4 +1,5 @@
 import React from 'react';
+import PropTypes from 'prop-types';
 import store from '@store';
 import styles from './index.less';
 import ReactDom from "react-dom";
@@ -6,16 +7,23 @@ import sort from "./img/sort.png"
 import close from "./img/close.png";
 import PreviewBody from '@components/PreviewBody';
 import Empty from '@components/Empty'
+
 import { pushAllDataList,didPushParamChange } from '@utils/tools';
-import { dragBox } from '@utils/drag';
+// import { dragBox } from '@utils/drag';
+import { initItemList, setInitHistory } from '@store/async-actions/historyTemplates';
+import HistoryCases from '@containers/HistoryCases';
 import $ from 'jquery';
 import { ConfirmModal } from '@commonComp';
 import {showHistory} from "@store/actions/historyTemplates";
 import { SET_READ_MODE } from "@store/types/typeConfig";
 import {billing} from '@store/async-actions/pushMessage';
-import {getHistempDetail} from '@store/async-actions/historyTemplates';
-
-
+import { getHistempDetail, asyncUpdateByIdUsNames, asyncCancelTemplateInfos} from '@store/async-actions/historyTemplates';
+import edit from '../../../common/images/icon_edit_default@2x.png';
+import editHover from '../../../common/images/icon_edit_hover@2x.png';
+import del from '../../../common/images/icon_del_default@2x.png';
+import delHover from '../../../common/images/icon_del_hover@2x.png';
+import Notify from '@commonComp/Notify';
+import ScrollArea from 'react-scrollbar';
 class HistoryCaseContainer extends React.Component {
     constructor(props){
         super(props);
@@ -24,112 +32,364 @@ class HistoryCaseContainer extends React.Component {
           activeId:'0',
           dataStr:[],
           dataJson:{},
-          visible:false
+          visible:false,
+          delVisible: false,
+          editVisible: false,
+          templateName: '', // 病历名称
+          historyCase: [],
+          currentIndex:-1,  // 显示编辑/删除图标
+          delId: '', //删除病历id
+          editId: '', //编辑病历id
+          activeIndex: -1,  //字体显示蓝色高亮index
+          showEditIcon: false,
+          showDelIcon: false,
+          desc: true, // 正序/逆序
+          overHeight: 0
         }
         this.handleCaseClick=this.handleCaseClick.bind(this)
         this.handleQuoteClick=this.handleQuoteClick.bind(this)
+        this.handleDelQuoteClick = this.handleDelQuoteClick.bind(this)
+        this.handleEditQuoteClick = this.handleEditQuoteClick.bind(this)
         this.close = this.close.bind(this);
+        this.closeDel = this.closeDel.bind(this);
+        this.closeEdit = this.closeEdit.bind(this);
         this.makeSure = this.makeSure.bind(this);
+        this.makeSureDel = this.makeSureDel.bind(this);
+        this.makeSureEdit = this.makeSureEdit.bind(this);
+        this.handleChange = this.handleChange.bind(this);
+      this.handleSortClick = this.handleSortClick.bind(this);
+
+      this.$scrollRef = React.createRef();
     }
     componentDidMount(){
-      dragBox('hisWrapMove','closeHis','add')
-      this.handleCaseClick(0)
+      const {items} = this.props
+      // dragBox('hisWrapMove','closeHis','add')
+      setTimeout(() => {
+        this.handleCaseClick(0, items[0])
+      }, 50);      
       this.setState({
-        visible:false
+        visible:false,
       })
     }
-    handleCaseClick(idx){
-      const {items} = this.props;
+
+
+    // 操作后获取获取列表数据
+    getTemplatePageAlls(val) {
+      return new Promise((resolve,reject)=>{
+        initItemList(val).then(res => {
+          const result = res.data
+          if (result.code == 0 && result.data) {
+            store.dispatch(setInitHistory(result.data));
+            resolve('ok')
+          }
+        })       
+      })
+    }
+
+
+    // 点击当前的历史病历
+    handleCaseClick(idx,val) {
+      const { items } = this.props;
       let tmpItems = []
       $("#hislistLeft li").eq(idx).css({
-        background:'#fff'
+        background: '#fff'
       }).siblings().css({
-        background:'#d2d1d1'
+        background: '#d2d1d1'
       })
-      if(items.length == 0){
+      if (items.length == 0) {
         return
-      }else{
-        tmpItems=items[idx]
+      } else {
+        tmpItems = items[idx]
       }
       this.setState({
-        activeId:idx,
-        activeHis:tmpItems,
-        dataStr:tmpItems.detailList||[],
-        // dataJson:JSON.parse(tmpItems.dataJson)||{},
-      })
+        activeId: idx,
+        activeHis: tmpItems,
+        dataStr: JSON.parse(tmpItems.preview)||[],
+        activeIndex: idx,
+        // overHeight: this.$scrollRef.current.scrollTop
+      },
+        // ()=> {
+        // setTimeout(() => {
+        //   this.$scrollRef.current.scrollTop = this.state.overHeight
+        // }, 0)}
+      )
+
+     
     }
+    // 确认引用选中病历
     makeSure(){
         const {activeHis} = this.state;
         this.setState({visible:false});
         store.dispatch(showHistory(false));
-        //store.dispatch({type: CONFIRM_TYPE, confirmType: activeHis.sign});
-        //store.dispatch({type: SET_READ_MODE, readMode: activeHis.sign});
-        store.dispatch(getHistempDetail(activeHis));
+        store.dispatch(getHistempDetail(activeHis));  // 获取引用数据
         const {handleQuoteClick} = this.props;
-        handleQuoteClick&&handleQuoteClick();
-        dragBox('hisWrapMove','closeHis','del');
+        handleQuoteClick && handleQuoteClick(activeHis);
+    }
+    //确认删除病历
+    makeSureDel(){
+      const { delId } = this.state
+      store.dispatch(asyncCancelTemplateInfos(delId)).then(res => {
+        if (res.data.code === '0') {
+          Notify.success('病历删除成功');
+          this.setState({
+            delVisible: false
+          })
+          // 重新渲染列表
+          this.getTemplatePageAlls().then(res=>{
+            if(res === 'ok'){
+              const { items } = this.props;
+              if(items.length ===0) {
+                this.setState({
+                  activeHis: {}
+                })
+                store.dispatch(showHistory(false));
+                return
+              }
+              this.handleCaseClick(0, items[0])
+            }
+          })
+        }
+      }).catch(err => {
+        Notify.info(err.msg);
+      })
+
+    }
+
+    // 取消删除病历
+    closeDel(){
+      this.setState({
+        delVisible: false
+      })
+    }
+    // 显示删除确认框
+    handleDelQuoteClick(e, val, idx) {
+      e.stopPropagation()
+      this.setState({
+        delVisible: true,
+        delId: val.id
+      })
+    }
+
+    // 确认编辑病历
+    makeSureEdit(){
+      const { editId, templateName} = this.state
+      if (templateName === '') {
+        Notify.info('请输入病历名称')
+        return
+      }
+      store.dispatch(asyncUpdateByIdUsNames(editId, templateName)).then(res=>{
+        if (res.data.code === '0'){
+          Notify.success('病历修改成功');
+          this.setState({
+            editVisible : false
+          })
+          // 重新渲染列表
+          this.getTemplatePageAlls()
+        }
+      }).catch(err =>{
+        Notify.info(err.msg);
+      })
+    }
+
+    // 取消编辑病历
+    closeEdit() {
+      this.setState({
+        editVisible: false,
+        templateName: ''
+      })
+    }
+    // 显示编辑确认框
+    handleEditQuoteClick(e, val, idx) {
+      // console.log(val,'显示编辑确认框');
+      e.stopPropagation()
+      this.setState({
+        editVisible: true,
+        editId: val.id,
+        templateName: val.name
+      })
     }
+
     close(){
       this.setState({
         visible:false
       })
     }
+
+    // 引用,右侧文本数据同步渲染
     handleQuoteClick(e,val,idx){
       this.setState({
         visible:true,
         activeId:idx,
         activeHis:val,
-        dataStr:val.detailList||[],
-        // dataJson:JSON.parse(val.dataJson)||{},
+        dataStr: JSON.parse(val.preview) || [],
+      })
+      document.body.scrollTop = document.documentElement.scrollTop = 0
+    }
+    // 修改模板名称 input的值
+    handleChange(e){
+      this.setState({
+        templateName: e.target.value
+      })
+    }
+
+    // 处理鼠标移入
+    handleMouseEnterLi(idx){
+      // console.log('处理鼠标移入li');
+      this.setState({
+        currentIndex: idx
       })
     }
+
+    // 处理鼠标移除
+    handleMouseLeaveLi(idx){
+      // console.log('处理鼠标移除li');
+      this.setState({
+        currentIndex : -1
+      })
+    }
+
+      // 处理鼠标移入编辑按钮
+    handleMouseEnterEdit(idx) {
+        this.setState({
+          showEditIcon: true
+        })
+      }
+
+      // 处理鼠标移出编辑按钮
+    handleMouseLeaveEdit(idx) {
+      this.setState({
+        showEditIcon: false
+      })
+    }
+
+  // 处理鼠标移入删除按钮
+  handleMouseEnterDel(idx) {
+    this.setState({
+      showDelIcon: true
+    })
+  }
+
+  // 处理鼠标移出删除按钮
+  handleMouseLeaveDel(idx) {
+    this.setState({
+      showDelIcon: false
+    })
+  }
+
+    // 排序
+  handleSortClick(){
+    this.setState({
+      desc: !this.state.desc
+    },()=>{         
+        let desc = this.state.desc ? 'up' : 'down'
+        this.getTemplatePageAlls(desc).then(res => {
+          if (res === 'ok') {
+            const { items } = this.props;
+            if (items.length === 0) {
+              this.setState({
+                activeHis: {}
+              })
+              store.dispatch(showHistory(false));
+              return
+            }
+            this.handleCaseClick(0, items[0])
+          }
+        })
+    })
+  }
+
+
+
     render(){
         const { items,handleSortClick,showHistoryBox,preInfo } = this.props;
-        const { activeHis,visible,dataJson,dataStr } = this.state;
-        
-        const getAllDataStringList = () =>{           //获取所有模块文本的数据
+        const { activeHis, visible, dataJson, dataStr, delVisible, editVisible, historyCase, currentIndex, activeIndex } = this.state;     
+        const getAllDataStringList = (dataStr) =>{           //获取所有模块文本的数据
             let jsonDataString = {};
             jsonDataString.lis = {};
-            jsonDataString.chief = dataStr[0].content || '';      //主诉
-            jsonDataString.present = dataStr[1].content || '';     //现病史
-            jsonDataString.other = dataStr[2].content || '';      //其他史
-            jsonDataString.vital = dataStr[3].content || '';    //查体
-            jsonDataString.lis = dataStr[4].content || '';      //化验导入填写
-            jsonDataString.pacs = dataStr[5].content || '';     //辅检
-            jsonDataString.diag = dataStr[6].content || '';      //诊断
-            jsonDataString.advice = dataStr[7].content || '';       //医嘱
+            jsonDataString.chief = dataStr[0] && dataStr[0].content || '';      //主诉
+            jsonDataString.present = dataStr[1] &&dataStr[1].content || '';     //现病史
+            jsonDataString.pastHistory = dataStr[2] &&dataStr[2].content || '';     
+            jsonDataString.personalHistory = dataStr[3] &&dataStr[3].content || '';    
+            jsonDataString.familyHistory = dataStr[4] &&dataStr[4].content || '';  
+            jsonDataString.marriageHistory = dataStr[5] &&dataStr[5].content || '';   
+            jsonDataString.menstruationHistory = dataStr[6] && dataStr[6].content || '';      
+            jsonDataString.vital = dataStr[7] && dataStr[7].content || '';    //查体
+            jsonDataString.lis = dataStr[8] && dataStr[8].content || '';      //检验导入填写
+            jsonDataString.pacs = dataStr[9] && dataStr[9].content || '';     //检查
+            jsonDataString.diag = dataStr[10] &&dataStr[10].content || '';      //诊断
+            jsonDataString.advice = dataStr[11] && dataStr[11].content || '';       //医嘱
             return jsonDataString;
         }
+      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.mainHistory} id="hisWrapMove">
-                <div className={`${styles.closeHis} drag-title`} id="closeHis"></div>
-                <img className={styles.close} src={close} alt="关闭历史病历" onClick={showHistoryBox}/>
+                <div className={styles.mainTop}>
+                  <div className={`${styles.closeHis} drag-title`} id="closeHis"></div>
+                  <img className={styles.close} src={close} alt="关闭历史病历" onClick={showHistoryBox} />
+                </div>
                 <div className={styles.mainHistoryLeft}>
                     <div className={styles.title}>
                         <span className={styles.his}>历史病历</span>
-                        <span className={styles.sort} onClick={handleSortClick}>排序 <img src={sort} alt="排序"/></span>
+                        <span className={styles.sort} onClick={this.handleSortClick}>排序 <img src={sort} alt="排序"/></span>
                     </div>
                     <div className={styles.lists}>
-                        <ul id="hislistLeft">
-                            {
-                                (items && items.length > 0)? items.map((val,idx)=>{
-                                    // return <li key={val.id} className={val.id == activeHistory.id?styles.bgc:''} onClick={(e)=>{this.handleCaseClick(e,idx)}}>
-                                    return <li key={val.id} onClick={()=>{this.handleCaseClick(idx)}}>
-                                        <span title={val.diagnose}>{val.diagnose}</span>
-                                        {/* <span className={val.id == activeHistory.id?`${styles.time} ${styles.quoteHide}`:styles.time}>{val.inquiryDate}</span>
-                                        <button 
-                                            className={val.id == activeHistory.id?`${styles.quote} ${styles.quoteShow}`:styles.quote} 
-                                            onClick={(e)=>{handleQuoteClick(e,val)}}
-                                        >引 用</button> */}
-                                        <button 
-                                            className={styles.quote} 
-                                            onClick={(e)=>{this.handleQuoteClick(e,val,idx)}}
-                                        >引 用</button>
-                                        <span className={styles.time}>{val.inquiryDate}</span>
+                      {/* <List
+                        items = {items}
+                        handleCaseClick = {this.handleCaseClick}
+                        currentIndex ={ currentIndex}
+                        showEditIcon = {this.state.showEditIcon}
+                        activeIndex={activeIndex}
+                        showDelIcon={this.state.showDelIcon}
+                      ></List> */}
+
+                      <ScrollArea speed={0.8}
+                        key={items.length}
+                        // ref={this.$scrollRef}
+                        horizontal={false}
+                        // stopScrollPropagation={items.length > 6 ? true : false}
+                        style={{ height: '100%' }}
+                        onScroll={(value) => { }}
+                        className={styles["area"]}
+                        verticalContainerStyle={contStyle}
+                        verticalScrollbarStyle={barStyle}
+                        contentClassName="content">
+                        <ul id="hislistLeft" style={{ overflow:'auto' }}  ref={this.$scrollRef}>
+                            {(items && items.length > 0) ? items.map((val,idx)=>{                                    
+                              return <li key={val.id} onClick={() => { this.handleCaseClick(idx, val) }} onMouseEnter={() => this.handleMouseEnterLi(idx)} onMouseLeave={() => this.handleMouseLeaveLi(idx)}>
+                                         <div className={styles.itemLeft}>
+                                           <div className={styles.historyTop}>
+                                           <span title={val.name} className={activeIndex === idx ? styles.itemNameActive :styles.itemName}>{val.name}</span>
+                                           {currentIndex === idx && (
+                                              <div className={styles.edit} onClick={(e) => { this.handleEditQuoteClick(e, val, idx) }} onMouseEnter={() => this.handleMouseEnterEdit(idx)} onMouseLeave={() => this.handleMouseLeaveEdit(idx)}>
+                                               <img src={ this.state.showEditIcon ? editHover :edit} />
+                                              </div>)}
+                                         </div>
+                                         <div className={activeIndex === idx ? styles.timeActive : styles.time}>{val.inquiryDate}</div>
+                                          
+                                         </div>
+                                         <div className={styles.itemRight}>
+                                                                                   
+                                          <button className={styles.quote} onClick={(e) => { this.handleQuoteClick(e, val, idx) }}>引 用</button>
+
+                                          {currentIndex === idx && (
+                                            <div className={styles.del} onClick={(e) => { this.handleDelQuoteClick(e, val, idx) }} onMouseEnter={() => this.handleMouseEnterDel(idx)} onMouseLeave={() => this.handleMouseLeaveDel(idx)}>
+                                              <img src={this.state.showDelIcon?delHover :del} />
+                                            </div>
+                                          )} 
+                                        </div>
                                     </li>
                                 }):<Empty message={'无历史病历'}></Empty>
                             }
                         </ul>
+                      </ScrollArea>
                     </div>
                 </div>
                 <div className={styles.mainHistoryRight}>
@@ -140,7 +400,7 @@ class HistoryCaseContainer extends React.Component {
                             showHistoryCases={this.props.showHistoryCases}
                             dataJson={dataJson}
                             baseObj={activeHis}
-                            dataStr={dataStr.length > 0?getAllDataStringList(dataStr):[]}
+                            dataStr={dataStr.length > 0 ? getAllDataStringList(dataStr) : []}
                             show={false}
                             flg={true}
                             showAssessBtn={true}
@@ -160,6 +420,38 @@ class HistoryCaseContainer extends React.Component {
                 >
                     <p className={styles['center']}>确认引用该病历?</p>
                 </ConfirmModal>
+
+                <ConfirmModal
+                  visible={delVisible}
+                  confirm={this.makeSureDel}
+                  close={this.closeDel}
+                  cancel={this.closeDel}
+                  okText={"删除"}
+                  okBorderColor={'#3B9ED0'}
+                  okColor={'#fff'}
+                  oKBg={'#3B9ED0'}
+                    
+                >
+                    <p className={styles['center']}>确定删除病历?</p>
+                </ConfirmModal>
+
+                <ConfirmModal
+                  visible={editVisible}
+                  confirm={this.makeSureEdit}
+                  close={this.closeEdit}
+                  cancel={this.closeEdit}
+                  okText={"保存"}
+                  okBorderColor={'#3B9ED0'}
+                  okColor={'#fff'}
+                  oKBg={'#3B9ED0'}
+                  title={'编辑病历名称'}
+                  height={200}
+                >                  
+                    <div className={styles.outBox}>
+                      <span>病历名称:</span>
+                      <input type="text" placeholder="请输入病历名称" value={this.state.templateName} onChange={this.handleChange} autocomplete="off"/>
+                    </div>
+                </ConfirmModal>
             </div>
         )
     }

+ 92 - 21
src/components/HistoryCaseContainer/HistoryList/index.less

@@ -11,7 +11,6 @@
     height: 86%;
     background-color: #fff;
     overflow: hidden;
-    // padding-bottom:20px;
     .close {
         position: absolute;
         top: 0;
@@ -31,7 +30,7 @@
             line-height: 80px;
             padding: 0 20px;
             position: absolute;
-            top: 0;
+            top: 0px;
             left: 0;
             width: 100%;
             background: #d2d1d1;
@@ -50,14 +49,9 @@
         }
         .lists {
             box-sizing: border-box;
-            overflow-y: auto;
             height: 100%;
-            span {
-                display: inline-block;
-                max-width: 120px;
-                overflow: hidden;
-                text-overflow: ellipsis;
-                white-space: nowrap;
+            ul{
+                height : 100%;
             }
             li {
                 height: 54px;
@@ -66,31 +60,99 @@
                 font-size: 14px;
                 cursor: pointer;
                 border: 1px solid transparent;
+                display: flex;
+                align-items: center;
+                .activeColor {
+                      color: '#3B9ED0';
+                    }
+                .itemLeft{
+                    flex: 1;
+                    display: flex;
+                    justify-content: start;
+                    flex-direction: column;
+                    .historyTop{
+                        display: flex;
+                        height:34px;
+                        .itemName {
+                            max-width: 120px;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                            white-space: nowrap;    
+                            font-size: 14px;  
+                            line-height: 34px;   
+                            color: #1E1E1E;                      
+                        }  
+                        .itemNameActive {
+                            max-width: 120px;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                            white-space: nowrap;    
+                            font-size: 14px;  
+                            line-height: 34px;   
+                            color: #3B9ED0;                      
+                        }                   
+                        .edit{
+                            width: 30px;
+                            height: 30px;
+                            img{
+                                width: 14px;
+                                height: 14px;
+                                position: relative;
+                                top: -8px;
+                                left: 8px;
+                            }     
+                        }
+                    }
+                    .time {
+                        font-size:10px;
+                        height:20px;
+                        line-height: 20px;
+                        color: #777;
+                        margin-top: -8px;
+                    }    
+                    .timeActive {
+                        font-size: 10px;
+                        height:20px;
+                        line-height: 20px;
+                        color: #3B9ED0;
+                        margin-top: -8px;
+                    }                
+                }
+                .itemRight{
+                    width: 98px;
+                    display: flex;
+                    align-items: center;
+                    .del {
+                        width: 30px;
+                        height:30px;
+                        img{
+                            width: 20px;
+                            height: 20px;
+                            position: relative;
+                            top: -7px;
+                            left: 13px;
+                        }            
+                    }
+                }              
             }
             li:hover {
                 border: 1px solid #66afe9;
                 border: 1px solid #66afe9\0;
-            }
-            .time {
-                float: right;
-            }
+            }           
             .bgc {
                 background-color: #fff;
             }
             .quote {
-                width: 50px;
-                height: 22px;
-                line-height: 22px;
+                width: 60px;
+                height: 26px;
+                line-height: 26px;
                 border-radius: 15px;
                 border: 0 none;
                 color: #fff;
                 background-color: @template-color;
                 float: right;
-                margin-top: 16px;
                 font-size: 12px;
-                // display: none;
                 outline: none;
-                margin-left: 10px;
             }
             .quoteShow {
                 display: block;
@@ -103,12 +165,11 @@
     .mainHistoryRight {
         // margin-left: 300px;
         // position: absolute;
+        // top: 42px;
         overflow: auto;
         height: 100%;
         padding-top: 40px;
         padding-bottom:20px;
-        // top: 42px;
-
         float: left;
     }
     .closeHis {
@@ -126,3 +187,13 @@
   padding-top: 10px;
   padding-bottom: 50px;
 }
+
+.outBox{
+    padding-left: 18px;
+    height: 100px;
+    width: 100%;
+    display: flex;
+    align-items: center;
+}
+
+

+ 28 - 12
src/components/InfoTitle/index.jsx

@@ -6,7 +6,7 @@ import historyCase from '@common/images/history.png';
 import health from '@common/images/health.png'
 import store from '@store';
 import { showHistory } from '@store/actions/historyTemplates';
-import { initItemList,setInitHistory } from '@store/async-actions/historyTemplates';
+import { initItemList, setInitHistory, getHospitalInfo } from '@store/async-actions/historyTemplates';
 import HistoryCases from '@containers/HistoryCases';
 import $ from 'jquery';
 import {Notify,Loading} from '@commonComp';
@@ -21,13 +21,29 @@ class InfoTitle extends Component {
         this.showHistoryBox = this.showHistoryBox.bind(this)
     }
     showHistoryBox(){
+
+        console.log('关闭');
         const {showLoading,hideLoading}=this.props;
         showLoading();
+        // 底部页面禁止滚动
+        document.body.style.overflow = 'hidden';
+
         // store.dispatch(initItemList());
         // store.dispatch(showHistory(true))
-        initItemList().then((res)=>{
-            const result = res.data;
-            if(result.code==0 && result.data){
+        // initItemList().then((res)=>{
+        //     const result = res.data;
+        //     if(result.code==0 && result.data){
+        //         hideLoading();
+        //         store.dispatch(setInitHistory(result.data));
+        //         store.dispatch(showHistory(true));
+        //     }else{
+        //         hideLoading();
+        //         Notify.info("暂无历史病历");
+        //     }
+        // })
+        initItemList().then(res=>{           
+            const result = res.data
+            if (result.code === '0' && result.data.records.length !== 0) {
                 hideLoading();
                 store.dispatch(setInitHistory(result.data));
                 store.dispatch(showHistory(true));
@@ -36,6 +52,7 @@ class InfoTitle extends Component {
                 Notify.info("暂无历史病历");
             }
         })
+        // store.dispatch(getHospitalInfo())
     }
     componentWillReceiveProps(next){
         const that = this;
@@ -52,16 +69,15 @@ class InfoTitle extends Component {
     render() {
         const {loading,loadingText,loadingType} = this.props;
         const {le} = this.state;
-        return <div className={style['title-wrapper']}  style={{left:le}}>
+        return <div className={style['title-wrapper']}  style={{paddingRight:'122px'}}>
             <PatInfoContainer />
-            <div className={style['activeWrap']}>
-                <div className={style["operations"]} onClick={this.showHistoryBox}>
-                    <span><img src={historyCase} />&nbsp;历史病历</span>
-                </div>
-                <div className={style["health"]} >
-                    <span><img src={health} />&nbsp;健康档案</span>
+             {
+                <div className={style['activeWrap']}>
+                    <div className={style["operations"]} onClick={this.showHistoryBox}>
+                        <span><img src={historyCase} />&nbsp;历史病历</span>
+                    </div>
                 </div>
-            </div>
+             }
             <HistoryCases></HistoryCases>
             <Loading show={loading} text={loadingText} type={loadingType}/>
         </div>;

+ 8 - 8
src/components/InfoTitle/index.less

@@ -1,17 +1,17 @@
 @import "~@less/variables.less";
 .title-wrapper{
   .contentZIndex2;
-  overflow: hidden;
+  // overflow: hidden;
   /*padding: 12px 20px 8px 20px;*/
-  margin-bottom: 40px;
+  // margin-bottom: 40px;
   background-color: #fff;
   border-bottom: 1px solid #BBBFC1;
   position: fixed;
-  left: 10px;
+  left: 50%;
   top: 50px;
-  right: 468px;
-  min-width: 548px;
-  padding-right: 122px;
+  margin-left: -600px;
+  max-width: 1200px;
+  /*padding-right: 122px;*/
   .activeWrap {
     position: absolute;
     right: 0;
@@ -32,8 +32,8 @@
   span{
     cursor: pointer;
     display: inline-block;
-    height: 20px;
-    line-height: 20px;
+    height: 60px;
+    line-height: 60px;
   }
   img {
     width: 20px;

+ 8 - 8
src/components/Information/index.jsx

@@ -14,27 +14,27 @@ class Information extends Component {
     $(this.$content.current)[0].scrollIntoView(true);
   }
   render() {
-    const { baseObj } = this.props;
+    const { baseObj} = this.props;
     let baseData = store.getState()
-    let preInfo = baseData.patInfo.message;
+    let preInfo = baseData.historyTemplates.HospitalInfo.name
     const noData = JSON.stringify(preInfo) == '{}';
     return <div className={style['information']}>
-        <div ref={this.$content} className={style['title']}>{preInfo.hospitalName}</div>
+        <div ref={this.$content} className={style['title']}>{preInfo}</div>
         <table className={style['patInfo']}>
           <tr>
-            <td>姓名:{baseObj ? baseObj.patientName : noData ? '' : preInfo.patientName}</td>
+            <td>姓名:{baseObj ? baseObj.patName : noData ? '' : preInfo.patientName}</td>
             <td>门诊号:{baseObj ? baseObj.inquiryCode : (noData ? '' : preInfo.recordId)}</td>
           </tr>
           <tr>
-            <td>年龄:{baseObj ? baseObj.patientAge : noData ? '' : preInfo.patientAge}</td>
+            <td>年龄:{baseObj ? baseObj.age : noData ? '' : preInfo.patientAge}</td>
             <td>医生:{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</td>
           </tr>
           <tr>
-            <td>性别:{baseObj ? baseObj.patientSex : noData ? '' : preInfo.patientSex}</td>
-            <td>科室:{baseObj ? baseObj.hospitalDeptName : (noData ? '' : preInfo.hospitalDeptName)}</td>
+            <td>性别:{baseObj.sex === 2 ? '女' : '男'}</td>
+            <td>科室:{baseObj ? baseObj.deptName : (noData ? '' : preInfo.hospitalDeptName)}</td>
           </tr>
           <tr>
-            <td>卡号:{baseObj ? baseObj.patientIdNo : noData ? '' : preInfo.patientIdNo}</td>
+            <td>卡号:{baseObj ? baseObj.cardNo : noData ? '' : preInfo.patientIdNo}</td>
             <td>就诊时间:{baseObj ? baseObj.inquiryDate : (noData ? '' : preInfo.systemTime.split(' ')[0])}</td>
           </tr>
         </table>

+ 4 - 1
src/components/Information/index.less

@@ -9,13 +9,16 @@
   margin: 0px 0px 15px 0px;
   td {
     border: 1px solid #aaa;
-    padding: 4px 8px;
+    padding: 14px 8px;
     font-size: 14px;
   }
   tr td{
     width: 50%;
   }
 }
+// .information{
+//   margin-top: 40px;
+// }
 @media print{
   .title {
     clear: both;

+ 18 - 45
src/components/Inspect/index.jsx

@@ -106,6 +106,7 @@ class Inspect extends React.Component {
             const securityCode = getUrlArgObject("code");
             const appKeyId = getUrlArgObject("appI");
             const appKeySecret = getUrlArgObject("appS");
+            const productId = getUrlArgObject("productId");
             FileAPI.upload({
               // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
               url: api.upload,
@@ -114,7 +115,8 @@ class Inspect extends React.Component {
               headers: {
                 appKeyId: appKeyId,
                 appKeySecret: appKeySecret,
-                securityCode: securityCode
+                securityCode: securityCode,
+                productId: productId
               },
               complete: function (err, xhr) {
                 if (!err) {
@@ -133,7 +135,7 @@ class Inspect extends React.Component {
                     }
                     store.dispatch(getExcelList(res.data));
                     store.dispatch(getMRAnalyse());
-                    fetchPushInfos && fetchPushInfos();
+                    fetchPushInfos && fetchPushInfos({mode:8});
                     if (message && message.length != 0) {
                       that.setState({
                         visible: true,
@@ -160,10 +162,10 @@ class Inspect extends React.Component {
     this.inputRef.click();
     const storeState = store.getState()
     const {moduleName} = storeState.homePage
-    if(moduleName != '验') {
+    if(moduleName != '验') {
       store.dispatch({
         type: SET_CURRENT_MODULE,
-        moduleName:'验'
+        moduleName:'验'
       });
       store.dispatch(getMRAnalyse());
     }
@@ -196,10 +198,10 @@ class Inspect extends React.Component {
     })
     const storeState = store.getState()
     const {moduleName} = storeState.homePage
-    if(moduleName != '验') {
+    if(moduleName != '验') {
       store.dispatch({
         type: SET_CURRENT_MODULE,
-        moduleName:'验'
+        moduleName:'验'
       });
       store.dispatch(getMRAnalyse());
     }
@@ -222,10 +224,10 @@ class Inspect extends React.Component {
     })
     const storeState = store.getState()
     const {moduleName} = storeState.homePage
-    if(moduleName != '验') {
+    if(moduleName != '验') {
       store.dispatch({
         type: SET_CURRENT_MODULE,
-        moduleName:'验'
+        moduleName:'验'
       });
       store.dispatch(getMRAnalyse());
     }
@@ -238,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,checkOnOff, fetchPushInfos,getInfomation,labelListSmall, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList,detailClick,handleDelConfirm } = this.props;
     const { ieVersion, isIE, hide,importLis } = this.state;
     const { checkSystemIpt, onClose,handleBindFileApi,closeInIcss,showSlideImport } = this;
     if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -249,46 +251,12 @@ class Inspect extends React.Component {
       <div className={styles.wrapper}>
         {/* 导入功能插件,ie8/9权限问题暂未解决,先隐藏 */}
         <div className={styles.top}>
-          <span id="inspectResultData" className={setFontColorSize(2,5)}>化验结果数据</span>
-          {/* <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}> */}
-          <div className={this.getStyle()} style={{ display: hospitalMsg.import_way_lis == 0||hospitalMsg.import_way_lis ==undefined ? 'none' : 'block' }}>
-            {/* <button disabled={ieVersion&&ieVersion>9?true:false}onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>导入化验结果</button>
-            <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
-            {/* {0没有,1本地,2医院,3本地和医院} */}
-            {
-              hospitalMsg.import_way_lis == 1 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
-                <p className={styles.importInspectBtn}>导入化验结果</p>
-                <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
-              </div> : hospitalMsg.import_way_lis == 2 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
-                <p className={styles.importInspectBtn}>导入化验结果</p>
-              </div> : hospitalMsg.import_way_lis == 3 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
-                <p id="importInspectBtn" className={styles.importInspectBtn}>导入化验结果</p>
-                {
-                  <ul className={styles.importSelect} style={{display:importLis?'block':'none'}} id="importList">
-                    <li className={styles.excelIpt}>
-                      <div onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>本地导入</div>
-                      <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
-                    </li>
-                    <li className={`${styles.excelIpt} ${styles.systemIpt}`} onClick={checkSystemIpt}>从设备导入</li>
-                  </ul>
-                }
-              </div> : null
-            }
-
-            {
-              hide ? <WrapModalContainer title={'导入化验数据'} width={1000} height={570} onClose={onClose}>
-                <WrapModalBody
-                  height={570}
-                  closeInIcss={closeInIcss}
-                ></WrapModalBody>
-              </WrapModalContainer> : null
-            }
-          </div>
+          <span id="inspectResultData" className={setFontColorSize(2,5)}>检验结果数据</span>
         </div>
         <ItemBox
           hideAllDrop={hideAllDrop}
           className={styles.title}
-          title={'验'}
+          title={'检验'}
           editable={false}
           border={true}
           style={{marginRight:'0'}}
@@ -296,12 +264,17 @@ class Inspect extends React.Component {
         >
           <div style={{ padding: '10px', boxSizing: 'border-box',color:'#000' }} >
             <AddInspect
+              checkOnOff={checkOnOff}
+              handleDelConfirm={handleDelConfirm}
+              labelListBig={labelListBig}
+              labelListSmall={labelListSmall}
               handleSign={handleSign}
               setHighter={setHighter}
               refreshScroller={this.refreshScroller}
               handleChangeValue={handleChangeValue}
               list={list}
               handlePush={fetchPushInfos}
+              detailClick={detailClick}
               labelList={labelList}
               handleLabelSub={handleLabelSub}
               fillActive={fillActive}

+ 0 - 0
src/components/Inspect/index.less


部分文件因为文件数量过多而无法显示