Преглед изворни кода

Merge branch 'newVersion6.0' of http://192.168.2.236:10080/zhouna/newICSS into newVersion6.0

zhangxc пре 4 година
родитељ
комит
0a1096e8bd
38 измењених фајлова са 657 додато и 179 уклоњено
  1. 2 2
      index.html
  2. 2 2
      src/common/components/SearchOption/index.jsx
  3. BIN
      src/common/images/selectSex.png
  4. 5 4
      src/components/AddAssistCheck/index.jsx
  5. 2 1
      src/components/AddInspect/index.jsx
  6. 1 1
      src/components/AddNewInspect/index.jsx
  7. 2 2
      src/components/Banner/index.less
  8. 28 2
      src/components/BlockEmrCont/MenstruationHistory.jsx
  9. 24 16
      src/components/BlockEmrCont/index.jsx
  10. 5 3
      src/components/BlockEmrCont/index.less
  11. 2 2
      src/components/BodyContainer/index.jsx
  12. 7 5
      src/components/DiagResultSearch/index.jsx
  13. 8 0
      src/components/DiagResultSearch/index.less
  14. 61 32
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  15. 1 1
      src/components/HistoryCaseContainer/HistoryList/index.less
  16. 4 3
      src/components/InfoTitle/index.less
  17. 1 1
      src/components/Information/index.jsx
  18. 1 1
      src/components/NewAdvice/index.jsx
  19. 1 1
      src/components/NewAdvice/index.less
  20. 118 38
      src/components/Operation/index.jsx
  21. 27 9
      src/components/Operation/index.less
  22. 116 0
      src/components/PatInfo/Select/index.jsx
  23. 49 19
      src/components/PatInfo/index.jsx
  24. 104 0
      src/components/PatInfo/index.less
  25. 12 11
      src/components/PreviewBody/Inspect/index.jsx
  26. 2 2
      src/components/PreviewBody/index.jsx
  27. 2 1
      src/components/SearchDrop/index.jsx
  28. 19 7
      src/containers/DiagResultSearch.js
  29. 1 0
      src/containers/OperationContainer.js
  30. 8 0
      src/store/actions/diagnosticSearch.js
  31. 1 1
      src/store/actions/patInfo.js
  32. 7 1
      src/store/async-actions/diagnosticSearch.js
  33. 2 0
      src/store/async-actions/historyTemplates.js
  34. 4 1
      src/store/async-actions/print.js
  35. 9 6
      src/store/reducers/diagnosticSearch.js
  36. 1 1
      src/store/reducers/patInfo.js
  37. 2 1
      src/store/types/diagnosticSearch.js
  38. 16 2
      src/utils/tools.js

+ 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: 1000px;margin:0 auto;"></div>
 </body>
 </html>

+ 2 - 2
src/common/components/SearchOption/index.jsx

@@ -31,7 +31,6 @@ class SearchOption extends React.Component {
     }
     componentDidMount(){
       this.props.handleChangeValue('');
-      this.textInput.current.focus();
       const {windowHeight,pageTop,height,refreshScroller,searchType} = this.props;
       if(searchType==1){
           this.setState({txt:'细项'})
@@ -43,6 +42,7 @@ class SearchOption extends React.Component {
         //$("#searchOption")[0].scrollIntoView(false);
         refreshScroller()&&refreshScroller().scrollBottom();
       }
+      this.textInput.current.focus();
     }
     setShowInsp(){
         this.setState({
@@ -57,7 +57,7 @@ class SearchOption extends React.Component {
             val:'',
             show:false
         });
-        handleChangeValue('');
+        handleChangeValue('','clear');
     }
     detailClick(val,txt){
         const { detailClick,handleChangeValue } = this.props;

BIN
src/common/images/selectSex.png


+ 5 - 4
src/components/AddAssistCheck/index.jsx

@@ -33,23 +33,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({
@@ -149,7 +150,7 @@ class AddAssistCheck extends React.Component {
             className={styles.searchLi}
             title={item.name}
             onClick={() => {
-              this.props.setHighter(48)
+              this.props.setHighter(96)
               this.handleSign(item,'search');
               this.setState({ show: false })
             }}

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

@@ -126,6 +126,7 @@ class Inspect extends React.Component {
   }
   changeShowFill() {
     this.setState({ showFill: false })
+    console.log(123123);
     this.props.setHighter(48)
   }
   handleChangeDate(info) {
@@ -377,7 +378,7 @@ class Inspect extends React.Component {
         <div style={{ position: "relative", clear: "both", top: "5px" }}>
           <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 30px', color: '#bfbfbf' }}>暂无筛选项</p>)}
+            {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>

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

@@ -380,7 +380,7 @@ class AddNewInspect extends React.Component {
         <div style={{ position: "relative", clear: "both", top: "5px" }}>
           <Add showText="添加医嘱" handleClick={(e) => this.handleSearchAdvice(e)} id="searchWrapAdvice" />
           {this.state.show ? <SearchOption searchType="2" detailClick={detailClick} windowHeight={windowHeight} height={280} refreshScroller={refreshScroller} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
-            {list && list.length > 0 ? this.getSearchList(list) : (inspectVal == '' ? '' : <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>暂无筛选项</p>)}
+            {list && list.length > 0 ? 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>

+ 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: 1000px;
     top: 0;
     // z-index: 202;
     img{

+ 28 - 2
src/components/BlockEmrCont/MenstruationHistory.jsx

@@ -1,21 +1,47 @@
 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 <BlockInp title='月经史' boxMark='17' value={value} isRead={isRead}></BlockInp>;
+    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) {

+ 24 - 16
src/components/BlockEmrCont/index.jsx

@@ -32,22 +32,22 @@ class BlockEMRCont extends Component {
     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";
-      }
-    });
+    // 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) {
-    if (nextProps.patInfoData.patInfoData[3].value === 1){
+    if (nextProps.patInfoData && nextProps.patInfoData.patInfoData[3].value === 1){
       this.setState({
         isShowSexInput : false
       })
@@ -59,10 +59,18 @@ class BlockEMRCont extends Component {
   }
 
   setHighter(ht){
-    // console.log(this.$div.current.scrollHeight,ht,'-=-=-=-------');
-    if(this.$div.current){
+    // 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
@@ -98,7 +106,7 @@ class BlockEMRCont extends Component {
           {isShowSexInput && <MenstruationHistory></MenstruationHistory>}
           
           {/* <OtherHistory></OtherHistory> */}
-          <CheckBody></CheckBody>
+          <CheckBody setHighter={this.setHighter}></CheckBody>
           {/* 检验 */}
           <Inspect setHighter={this.setHighter}></Inspect>
           {/* 检查 */}

+ 5 - 3
src/components/BlockEmrCont/index.less

@@ -1,7 +1,7 @@
 @import "~@less/variables.less";
 .area{
   height: 100%;
-  min-width: 500px;
+  // min-width: 500px;
 }
 .EMR-container{
   background: #fff;
@@ -10,11 +10,13 @@
   /*padding: 0px 0 10px 0 ;*/
   box-sizing: border-box;
   position: absolute;
+  left: 0;
   // min-width: 700px;
-  min-width: 548px;
-  float: left;
+  // min-width: 548px;
   overflow-y:auto;
   overflow-x: hidden;
+  width: 1000px;
+  padding-bottom: 100px;
 }
 .inner{
   padding-top:20px;

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

@@ -1,6 +1,6 @@
 import EMRContainer from "../EMRContainer";
-// import BlockEMRCont from "../BlockEmrCont/index.jsx";
-import BlockEMRCont from "../../containers/BlockEMRContanier";
+import BlockEMRCont from "../BlockEmrCont/index.jsx";
+// import BlockEMRCont from "../../containers/BlockEMRContanier";
 import PushContainer from '../PushContainer';
 
 import style from './index.less';

+ 7 - 5
src/components/DiagResultSearch/index.jsx

@@ -41,10 +41,13 @@ class DiagResultSearch extends Component {
     });
   }
 
-  getSearchList(searchResult) {
+  getSearchList(searchResult, isShowNoDataInfo) {
+    if (isShowNoDataInfo === true && searchResult.length === 0 ){
+      return <div className={style['search-result-noItem']}>暂无筛选项</div>
+    }
     return <div className={style['search-result']}>
       {
-        searchResult && searchResult.map((item,idx) => {
+        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 +57,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',
@@ -75,7 +77,7 @@ class DiagResultSearch extends Component {
                       verticalContainerStyle={contStyle}
                       verticalScrollbarStyle={barStyle}
                       contentClassName="content">
-          {this.getSearchList(searchResult)}
+            {this.getSearchList(searchResult, isShowNoDataInfo)}
           </ScrollArea>
         </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;
 }

+ 61 - 32
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";
@@ -21,7 +22,7 @@ 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);
@@ -35,13 +36,13 @@ class HistoryCaseContainer extends React.Component {
           editVisible: false,
           templateName: '', // 病历名称
           historyCase: [],
-          currentIndex:-1,
+          currentIndex:-1,  // 显示编辑/删除图标
           delId: '', //删除病历id
           editId: '', //编辑病历id
-          activeIndex: 0,
+          activeIndex: -1,  //字体显示蓝色高亮index
           showEditIcon: false,
           showDelIcon: false,
-          desc: false // 正序/逆序
+          desc: true // 正序/逆序
         }
         this.handleCaseClick=this.handleCaseClick.bind(this)
         this.handleQuoteClick=this.handleQuoteClick.bind(this)
@@ -55,6 +56,8 @@ class HistoryCaseContainer extends React.Component {
         this.makeSureEdit = this.makeSureEdit.bind(this);
         this.handleChange = this.handleChange.bind(this);
       this.handleSortClick = this.handleSortClick.bind(this);
+
+      this.$scrollRef = React.createRef();
     }
     componentDidMount(){
       const {items} = this.props
@@ -67,8 +70,6 @@ class HistoryCaseContainer extends React.Component {
       })
     }
 
-    componentWillReceiveProps(nextProps){
-    }
 
     // 操作后获取获取列表数据
     getTemplatePageAlls(val) {
@@ -86,7 +87,6 @@ class HistoryCaseContainer extends React.Component {
 
     // 点击当前的历史病历
     handleCaseClick(idx,val) {
-  
       const { items } = this.props;
       let tmpItems = []
       $("#hislistLeft li").eq(idx).css({
@@ -102,8 +102,6 @@ class HistoryCaseContainer extends React.Component {
       this.setState({
         activeId: idx,
         activeHis: tmpItems,
-        // dataStr: tmpItems.preview || {},
-        // dataJson:JSON.parse(tmpItems.dataJson)||{},
         dataStr: JSON.parse(tmpItems.preview)||[],
         activeIndex: idx
       })
@@ -141,6 +139,11 @@ class HistoryCaseContainer extends React.Component {
                 return
               }
               this.handleCaseClick(0, items[0])
+              // this.$scrollRef.scrollArea.refresh();
+              // this.context.scrollArea.scrollYTo(40);
+              console.log(this.$scrollRef,'this.$scrollRef');
+              console.log(this.context,'this.context');
+              this.forceUpdate()
             }
           })
         }
@@ -168,6 +171,10 @@ class HistoryCaseContainer extends React.Component {
     // 确认编辑病历
     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('病历修改成功');
@@ -191,11 +198,12 @@ class HistoryCaseContainer extends React.Component {
     }
     // 显示编辑确认框
     handleEditQuoteClick(e, val, idx) {
+      // console.log(val,'显示编辑确认框');
       e.stopPropagation()
       this.setState({
         editVisible: true,
         editId: val.id,
-        templateName: ''
+        templateName: val.name
       })
     }
 
@@ -234,7 +242,9 @@ class HistoryCaseContainer extends React.Component {
     // 处理鼠标移除
     handleMouseLeaveLi(idx){
       // console.log('处理鼠标移除li');
-
+      this.setState({
+        currentIndex : -1
+      })
     }
 
       // 处理鼠标移入编辑按钮
@@ -288,16 +298,14 @@ class HistoryCaseContainer extends React.Component {
           }
         })
     })
+  }
 
-     
-      // const { items } = this.props;
-      // let length = items &&  items.length
-      // let index = length - this.state.currentIndex -1
-      // this.props.handleSortClick()
-      // this.setState({
-      //   currentIndex: index
-      // })
-    }
+  componentDidUpdate() {  // 刷新组件
+    // console.log(this.$scrollRef.current.scrollTop);
+    // console.log(this.$scrollRef);
+    // this.$scrollRef.current.scrollTop = this.$scrollRef.current.scrollHeight;
+
+  }
 
     render(){
         const { items,handleSortClick,showHistoryBox,preInfo } = this.props;
@@ -319,6 +327,15 @@ class HistoryCaseContainer extends React.Component {
             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>
@@ -329,30 +346,39 @@ class HistoryCaseContainer extends React.Component {
                         <span className={styles.sort} onClick={this.handleSortClick}>排序 <img src={sort} alt="排序"/></span>
                     </div>
                     <div className={styles.lists}>
-                        <ul id="hislistLeft">
+                <ScrollArea speed={0.8}
+                  key= {items.length}
+                  // ref={this.$scrollRef}
+                  horizontal={false}
+                  // stopScrollPropagation={items.length > 6 ? true : false}
+                  style={{ maxHeight: '722px' }}
+                  onScroll={(value) => {}}
+                  className={styles["area"]}
+                  verticalContainerStyle={contStyle}
+                  verticalScrollbarStyle={barStyle}
+                  contentClassName="content">
+                        <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, 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} />
+                                           <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={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>
+                                          <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 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>
@@ -360,6 +386,9 @@ class HistoryCaseContainer extends React.Component {
                                 }):<Empty message={'无历史病历'}></Empty>
                             }
                         </ul>
+
+                  </ScrollArea>
+
                     </div>
                 </div>
                 <div className={styles.mainHistoryRight}>

+ 1 - 1
src/components/HistoryCaseContainer/HistoryList/index.less

@@ -50,7 +50,7 @@
         }
         .lists {
             box-sizing: border-box;
-            overflow-y: auto;
+            // overflow-y: auto;
             height: 100%;
            
             li {

+ 4 - 3
src/components/InfoTitle/index.less

@@ -1,16 +1,17 @@
 @import "~@less/variables.less";
 .title-wrapper{
   .contentZIndex2;
-  overflow: hidden;
+  // overflow: hidden;
   /*padding: 12px 20px 8px 20px;*/
   margin-bottom: 40px;
   background-color: #fff;
   border-bottom: 1px solid #BBBFC1;
   position: fixed;
-  left: 10px;
+  left: 50%;
   top: 50px;
   right: 10px;
-  min-width: 548px;
+  margin-left: -500px;
+  width: 1000px;
   /*padding-right: 122px;*/
   .activeWrap {
     position: absolute;

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

@@ -30,7 +30,7 @@ class Information extends Component {
             <td>医生:{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</td>
           </tr>
           <tr>
-            <td>性别:{baseObj.sex === 0 ? '女' : '男'}</td>
+            <td>性别:{baseObj.sex === 2 ? '女' : '男'}</td>
             <td>科室:{baseObj ? baseObj.deptName : (noData ? '' : preInfo.hospitalDeptName)}</td>
           </tr>
           <tr>

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

@@ -296,7 +296,7 @@ class NewAdvice extends React.Component {
           // style={{marginRight:'0'}}
           marginTop={'0px'}
         >
-          <div style={{ padding: '0 10px 10px 10px', boxSizing: 'border-box',color:'#000' }} >
+          <div style={{ padding: '0px 10px 10px 10px', boxSizing: 'border-box',color:'#000' }} >
             <AddNewInspect
               checkOnOff={checkOnOff}
               handleDelConfirm={handleDelConfirm}

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

@@ -16,7 +16,7 @@
         line-height: 30px;
         text-align: center;
         position: relative;
-        z-index: 10;
+        z-index: 9;
     }
     .newAdviceTitle {
       border: 0 none;

+ 118 - 38
src/components/Operation/index.jsx

@@ -43,6 +43,8 @@ class Operation extends Component {
       folderId:'',//选中文件夹名称
       folderListShow:false, //文件夹列表展示
       medicalName: '', //保存病历名称
+      showValit: false, // 显示校验的文字
+      saveVisible: false //保存病历模态框
     }
     this.showPrint = this.showPrint.bind(this);
     this.closePrint = this.closePrint.bind(this);
@@ -63,9 +65,44 @@ class Operation extends Component {
     this.spellFst = this.spellFst.bind(this);
     this.hideFolderList = this.hideFolderList.bind(this)
     this.handleMedicalChange = this.handleMedicalChange.bind(this)
+
+
+    this.makeSureSave = this.makeSureSave.bind(this);
+    this.closeSave = this.closeSave.bind(this);
     this.$inp = React.createRef()
   }
 
+  // 保存病历  _lcq
+  makeSureSave(){
+    if (this.state.medicalName.trim() === '') {
+      // Notify.info('请输入病历名称')
+      this.setState({
+        showValit: true
+      })
+      return
+    }
+    // // 清除store中 medicalName的值
+    // const { clearmedicalName } = this.props
+    // clearmedicalName && clearmedicalName()
+    // diagShowTmp(false)
+    // this.setState({ title: '' })
+    this.setState({
+      medicalName: '',
+      saveVisible: false,
+    })
+    this.props.save();
+  }
+
+  // 取消编辑病历
+  closeSave() {
+    this.setState({
+      saveVisible: false,
+      showValit:false,
+      medicalName: ''
+      // templateName: ''
+    })
+  }
+
   showPrint() {
     this.setState({
       zIndex:240
@@ -112,39 +149,42 @@ class Operation extends Component {
       return;
     }   
     if (keepState == 4) {
-      Notify.info('性别不能为空');
+      Notify.info('卡号不能为空');
       return;
     }   
-    // }else if(keepState == 2){
-    //     Notify.info('诊断不能为空');
-    //     return;
-    // }else{
-    //   this.setState({
-    //     type: type,
-    //     okText: '保存',
-    //     borderColor: '#3B9ED0',
-    //     okColor: '#fff',
-    //     oKBg: '#3B9ED0',
-    //     msg: <p className={style['msg']}>是否保存该病历?</p>
-    //   })
-    //   this.props.diagShowTmp(true)
-    // }
-    // 清除store中 medicalName的值
-    const { clearmedicalName} = this.props
-    clearmedicalName && clearmedicalName()
-    this.setState({            
-      type: type,
-      okText: '保存',
-      borderColor: '#3B9ED0',
-      okColor: '#fff',
-      oKBg: '#3B9ED0',
-      // msg: <p className={style['msg']}>是否保存该病历?</p>
-      msg: <div className={style.outBox}><span>病历名称:</span><input type="text" placeholder="请输入病历名称" value={this.state.medicalName} onChange={this.handleMedicalChange} autocomplete="off" /></div>
+    if (keepState == 5) {
+      Notify.info('科室不能为空');
+      return;
+    }   
+    if (keepState == 6) {
+      Notify.info('医生不能为空');
+      return;
+    }   
+    if (keepState == 7) {
+      Notify.info('门诊号不能为空');
+      return;
+    }   
+
+    // this.setState({            
+    //   type: type,
+    //   okText: '保存',
+    //   borderColor: '#3B9ED0',
+    //   okColor: '#fff',
+    //   oKBg: '#3B9ED0',
+    //   msg: <div className={style.outBox}><div><span>病历名称:</span><input type="text" placeholder="请输入病历名称" value={this.state.medicalName} onChange={this.handleMedicalChange} autocomplete="off" /> </div></div>
+    // })
+    // this.props.diagShowTmp(true)
+    this.setState({
+      saveVisible: true
     })
-    this.props.diagShowTmp(true)
   }
 
   handleMedicalChange(e){
+    if (e.target.value.length > 0) {
+      this.setState({
+        showValit: false
+      })
+    }
     const { setmedicalName} = this.props
     this.setState({
       medicalName: e.target.value
@@ -341,15 +381,27 @@ class Operation extends Component {
     const { save, clear, saveDataAll,saveDataAlls,diagShowTmp ,chronicMagItem,chronicDesease,admin,floderListAdmin} = this.props;
     const { type,deptId,sex,title,fstName,folderId,folderNameVal } = this.state;
     // console.log(type,'======type');
-    if (type == 1) {
-      diagShowTmp(false)
-      this.setState({ title: '' })
-      if (type == 1) {
-        this.setState({
-          medicalName: ''
-        })
-      }
-      save();
+    if (type == 1) {     
+      // if (this.state.medicalName === '') {
+      //   Notify.info('请输入病历名称')
+      //   this.setState({
+      //     showValit: true
+      //   },()=>{
+      //       // console.log(this.state.showValit,'-=-=-=-');
+      //   })
+      //   return 
+      // }
+      // // 清除store中 medicalName的值
+      // const { clearmedicalName } = this.props
+      // clearmedicalName && clearmedicalName()
+      // diagShowTmp(false)
+      // this.setState({ title: '' })
+      // if (type == 1) {
+      //   this.setState({
+      //     medicalName: ''
+      //   })
+      // }
+      // save();
     } else if (type == 2) {
       // type === 2 清除数据
       diagShowTmp(false);
@@ -491,15 +543,38 @@ class Operation extends Component {
     const {winWidth,cancelDelTag,departLis,handleChangeValue,admin,floderListAdmin,folderModalShow,
       floderModal,folderOrderShow,folderOrder,adminItems,patInfo,saveOrderFolder,hideLabel} = this.props;
     const {zIndex,type,le,value,folder,folderListShow} = this.state;
+    // console.log(this.state.showValit,this.state.msg,'====================');
     return <div className={style['container']} style={{left:le}}>
       {/*<span className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</span>*/}
       {/* <span className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</span> */}
       {/* {hideLabel?"":<span className={style['preButton']} onClick={() => { this.saveHis(3) }}><img src={saveHistory} /> 保存病历模板</span>} */}
       {/* {hideLabel?"":<span className={style['preButton']} onClick={cancelDelTag}><img src={cancelTag} /> 还原标签</span>} */}
-      <span className={winWidth<=1082?`${style['saveButton']} ${style['minstyle']}`: style['saveButton']} onClick={() => { this.saveAll(1) }}>保存</span>
       <span className={winWidth<=1082?`${style['clearButton']} ${style['saveButton']} ${style['minstyle']}`:`${style['clearButton']} ${style['saveButton']}`} onClick={() => { this.clearAll(2) }}>清除</span>
+      <span className={winWidth<=1082?`${style['saveButton']} ${style['minstyle']}`: style['saveButton']} onClick={() => { this.saveAll(1) }}>保存</span>
       {visible?<PrintPreviewContainer visible={visible} onClose={closePrint} />:null}
       {preVisible?<PreviewContainer visible={preVisible} onClose={closePreview} />:null}
+      
+      {<ConfirmModal
+        visible={this.state.saveVisible}
+        confirm={this.makeSureSave}
+        close={this.closeSave}
+        cancel={this.closeSave}
+        okText={"保存"}
+        okBorderColor={'#3B9ED0'}
+        okColor={'#fff'}
+        oKBg={'#3B9ED0'}
+        title={'保存病历'}
+        height={200}
+      >
+        <div className={style.outBox}>
+          <div className={style.innerInp}>
+            <span>病历名称:</span>
+            <input type="text" placeholder="请输入病历名称" value={this.state.medicalName} onChange={this.handleMedicalChange} autocomplete="off" /> 
+          </div>
+          {this.state.showValit ? (<div className={style.valit}>请输入病历名称</div>) : null}
+        </div>
+      </ConfirmModal>}
+
       {<ConfirmModal
         visible={diagShow}        //改为全局控制
         confirm={() => { this.makeSure() }}
@@ -565,7 +640,12 @@ class Operation extends Component {
           </div>
           </div>:null
         }
-      </ConfirmModal>}
+      </ConfirmModal>
+      }
+      {/* 保存病历 */}
+
+
+
       <FolderName 
         folderModalShow={folderModalShow}
         floderModal={floderModal}

+ 27 - 9
src/components/Operation/index.less

@@ -1,18 +1,20 @@
 @import "~@less/variables.less";
 .container {
     .contentZIndex2;
-    padding-left: 20px;
     padding-top: 10px;
     position: fixed;
     bottom: 0;
-    left: 10px;
-    right: 10px;
+    left: 50%;
+    margin-left: -500px;
+    width: 1000px;
     // min-width: 720px;
-    min-width: 547px;
+    // min-width: 547px;
     background-color: #fff;
     // z-index: 240;
     padding-bottom: 10px;
     border-bottom: 10px solid #e4e6e7;
+    border-top: 1px solid #BBBFC1;
+    text-align: center;
     .button {
         width: 111px;
         height: 34px;
@@ -57,7 +59,8 @@
         margin-left:20px;
         background: #3B9ED0;
         color: #fff;
-        float: right;
+        float: none;
+        display: inline-block;
         margin-right: 20px;
     }
     .minstyle{
@@ -338,10 +341,25 @@
     cursor: pointer;
   }
 
-  .outBox{
+.outBox{
     padding-left: 18px;
-    height: 100px;
+    height: 60px;
     width: 100%;
-    display: flex;
-    align-items: center;
+    position: relative;
+    top: 41px;
+    // display: flex;
+    // flex-direction: column;
+    // justify-content: center;
+    margin-bottom: 40px;
+    .innerInp{
+    }
+    .valit{
+        float: left;
+        margin-top: 8px;
+        color: #D9001B;
+        position: relative;
+        top: 0;
+        left: 70px;
+        height: 20px;
+    }
 }

+ 116 - 0
src/components/PatInfo/Select/index.jsx

@@ -0,0 +1,116 @@
+import React, { Component } from "react";
+// import cx from "classnames";
+import style from "./../index.less";
+import selectSex from '../../../common/images/selectSex.png'
+import { CLEARMENSTRUATIONTEXTDATA, } from '@store/types/menstruationHistory';
+import store from '@store';
+export default class Select extends Component {
+  constructor(props) {
+    super(props);
+    this.state = { 
+      isOpen: false, 
+      value: "",
+      options: [
+        {
+          label: 'patientSex',
+          id: 'patientSex',
+          value: 1,
+          title: '性别',
+          maxlength: 11
+        },
+        {
+          label: 'patientSex',
+          id: 'patientSex',
+          value: 2,
+          title: '性别',
+          maxlength: 11
+        },
+      ]
+    };
+    this.toggleContainer = React.createRef();
+    this.onClickHandler = this.onClickHandler.bind(this)
+    this.onClickOutsideHandler = this.onClickOutsideHandler.bind(this)
+    this.onChange = this.onChange.bind(this)
+  }
+  componentDidMount() {
+    window.addEventListener("click", this.onClickOutsideHandler);
+    this.setState({
+      value: this.props.default,
+    });
+  }
+
+  componentWillUnmount() {
+    window.removeEventListener("click", this.onClickOutsideHandler);
+  }
+
+  componentWillReceiveProps(nextProps){
+    if (nextProps.default.value !== this.state.value.value) {
+      this.setState({
+        value: nextProps.default
+      })
+    }
+  }
+
+  onClickHandler() {
+    this.setState(currentState => ({
+      isOpen: !currentState.isOpen
+    }));
+  };
+
+  onClickOutsideHandler(event) {
+    if (
+      this.state.isOpen &&
+      !this.toggleContainer.current.contains(event.target)
+    ) {
+      this.setState({ isOpen: false });
+    }
+  };
+
+  onChange(e,val) {
+    e.stopPropagation()
+    this.setState({
+      value: val,
+      isOpen: false
+    });
+    this.props.onChange(val);
+    store.dispatch({
+      type: CLEARMENSTRUATIONTEXTDATA,
+    });
+  };
+  render() {
+    const { isOpen, value, options} = this.state;
+    const { label,  placeholder } = this.props;
+    return (
+      <div className={style.selectBox}>
+        {label && <label className={style.label}>{label}:</label>}
+
+        <div className={style.select} ref={this.toggleContainer}>
+          <input
+            className={[style.selfInput, isOpen ? style.selfInput : ''].join('')}
+            readonly=""
+            value={value.value=== 2? '女' : '男'}
+            onClick={this.onClickHandler}
+            placeholder={placeholder}
+          />
+          <div className={style.down} onClick={this.onClickHandler}>
+            <img src={selectSex} alt=""/>
+          </div>
+          <div  className={[isOpen ? '' : style.optionsHidden, isOpen ? style.options :''].join('')}>
+            {options &&
+              options.map((item) => {
+                return (
+                  <div
+                    key={item.id}
+                    className={style.item}
+                    onClick={(e)=>this.onChange( e, item)}
+                  >
+                    {item.value === 2 ? '女' : '男'}
+                  </div>
+                );
+              })}
+          </div>
+        </div>
+      </div>
+    );
+  }
+}

+ 49 - 19
src/components/PatInfo/index.jsx

@@ -1,5 +1,6 @@
 import React, { Component } from "react";
 import style from "./index.less";
+import Select from './Select/index'
 import {
   timesYMDTime
 } from '@utils/tools';
@@ -13,54 +14,63 @@ class PatInfo extends Component {
           label: 'patientIdNo',
           id: 'patientIdNo',
           value: '330127198912311234',
-          title: '卡号'
+          title: '卡号',
+          maxlength: 50
         },
         {
           label: 'patientName',
           id: 'patientName',
           value: '王明明',
-          title: '姓名'
+          title: '姓名',
+          maxlength: 50
         },
         {
           label: 'patientAge',
           id: 'patientAge',
           value: '50',
-          title: '年龄'
+          title: '年龄',
+          maxlength: 11
         },
         {
           label: 'patientSex',
           id: 'patientSex',
-          value: 0,
-          title: '性别'
+          value: 2,
+          title: '性别',
+          maxlength: 11
         },
         {
           label: 'systemTime',
           id: 'systemTime',
           value: timesYMDTime(new Date().getTime()),
-          title: '就诊时间'
+          title: '就诊时间',
+          maxlength: 100
         },
         {
           label: 'hospitalDeptName',
           id: 'hospitalDeptName',
           value: '全科',
-          title: '科室'
+          title: '科室',
+          maxlength: 50
         },
         {
           label: 'doctorName',
           id: 'doctorName',
           value: '付医生',
-          title: '医生'
+          title: '医生',
+          maxlength: 50
         },
         {
           label: 'recordId',
           id: 'recordId',
           value: '4332',
-          title: '门诊号'
+          title: '门诊号',
+          maxlength: 50
         }
 
       ]
     }
     this.handleChange = this.handleChange.bind(this)
+    this.handleSexChange = this.handleSexChange.bind(this)
   }
   componentWillMount() {
     const { getMessage, initPatInfoData } = this.props;
@@ -89,20 +99,31 @@ class PatInfo extends Component {
     if (patientItem.id === 'patientSex'){     
       if (e.target.value === '1') {
         patientItem.value = 1
-      } else if (e.target.value === '0'){
-        patientItem.value = 0
+      } else if (e.target.value === '2'){
+        patientItem.value = 2
       } else {
-        patientItem.value = 0  // 默认为女
+        patientItem.value = 2 // 默认为女
       }
-    }else{
+    } else if (patientItem.id === 'patientAge'){
+      patientItem.value = e.target.value.replace(/[^\d]+/, '')
+    } else {
       patientItem.value = e.target.value;
     }
     this.setState({
       patientInfo: newInfo
-    },()=>{
-        initPatInfoData && initPatInfoData(this.state.patientInfo)
     })
-    
+    initPatInfoData && initPatInfoData(newInfo)
+  }
+
+  handleSexChange (item){
+    const { initPatInfoData } = this.props;   
+    let { patientInfo } = this.state;
+    let newInfo = Object.assign([], patientInfo);
+    newInfo[3] = item
+    this.setState({
+      patientInfo: newInfo
+    })
+    initPatInfoData && initPatInfoData(newInfo)
   }
 
   render(){
@@ -114,15 +135,24 @@ class PatInfo extends Component {
               return (
                 <div className={style["infoItem"]} key={item.id}>
                   <label for={item.label}>{item.title}:</label>
-                  {item.id === 'patientSex' && (
+                  {/* {item.id === 'patientSex' && (
                     <select id={item.id} value={item.value} onChange={this.handleChange}>
                       <option value='1'>男</option>
-                      <option value='0'>女</option>
+                      <option value='2'>女</option>
                     </select>
+                  )} */}
+                  {item.id === 'patientSex' && (
+                    <Select
+                      default={this.state.patientInfo[3]}
+                      label=""
+                      placeholder="请选择"
+                      onChange={(item) => this.handleSexChange(item)}
+                    ></Select>
                   )}
+                  {item.id === 'patientAge' && (<input id={item.id} type="text" autocomplete="off" maxlength={11}  value={item.value} onChange={this.handleChange} />)}
                   {/* {item.id === 'patientSex' && (<input id={item.id} type="text" autocomplete="off" value={item.value == 1 ? '男' : '女'} onChange={this.handleChange} />)} */}
                   {item.id === 'systemTime' && (<input id={item.id} type="text" autocomplete="off"  disabled value={item.value } onChange={this.handleChange} />)}
-                  {item.id !== 'patientSex' && item.id !== 'systemTime' &&  (<input id={item.id} type="text" autocomplete="off" value={item.value} onChange={this.handleChange} />) }                  
+                  {item.id !== 'patientAge' && item.id !== 'patientSex' && item.id !== 'systemTime' && (<input id={item.id} type="text" maxlength={item.maxlength} autocomplete="off" value={item.value} onChange={this.handleChange} />) }                  
                 </div>
               )
             })

+ 104 - 0
src/components/PatInfo/index.less

@@ -9,6 +9,7 @@
   .infoItem{
     width: 25%;
     min-width: 25%;
+    padding: 0px 10px;
     // min-width: 230px;
     float: left;
     flex: 1;
@@ -26,6 +27,10 @@
       white-space: nowrap;
       text-overflow: ellipsis;
       overflow: hidden;
+      color: #000
+    }
+    .selectBox{
+      flex:1;    
     }
     select {
       // appearance:none;
@@ -87,3 +92,102 @@
     max-width: 110px;
   }
 }
+
+
+.selectBox {
+  display: flex;
+  align-items: center;
+  .label {
+    // display: inline-block;
+    // padding-right: 8px;
+    // color: #333333;
+  }
+  .select {
+    flex : 1;
+    position: relative;
+    .selfInput {
+      width:100%;
+      box-sizing: border-box;
+      margin: 0;
+      padding: 0;
+      list-style: none;
+      display: inline-block;
+      height: 32px;
+      padding: 4px 11px;
+      color: rgba(0, 0, 0, 0.65);
+      font-size: 14px;
+      line-height: 1.5;
+      background-color: #fff;
+      background-image: none;
+      border-radius: 4px;
+      transition: all 0.3s;
+      overflow: visible;
+      cursor: pointer;
+      position: relative;
+      top: 0px;
+      background-color: transparent;
+    }
+    .inputHover {
+        box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
+        border: 1px solid rgba(24, 144, 255, 1);
+    }
+    .down{
+      width: 20px;
+      height: 13px;
+      position: absolute;
+      margin-top: -6px;
+      top: 50%;
+      left: 38px;
+      cursor: pointer;
+      img{
+        width: 100%;
+        height: 100%;
+      }
+    }
+    .options {
+      z-index: 666;
+      width: 120px;
+      box-sizing: border-box;
+      position: absolute;
+      top: 25px;
+      left: -4px;
+      color: rgba(0, 0, 0, 0.65);
+      font-size: 14px;
+      background-color: #fff;
+      background-image: none;
+      border: 1px solid #d9d9d9;
+      border-radius: 4px;
+      cursor: pointer;
+      transition: 0.35s;
+      opacity: 1;
+      box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.3);
+      .item {
+        position: relative;
+        line-height: 20px;
+        padding: 8px;
+        &:hover {
+          background: rgba(226,241,248,1);
+        }
+      }
+    }
+    .optionsHidden {
+      // opacity: 0;
+      display: none;
+    }
+    // 修改输入框默认样式
+    input:-moz-placeholder,
+    textarea:-moz-placeholder {
+      color: #999999;
+    }
+ 
+    input:-ms-input-placeholder,
+    textarea:-ms-input-placeholder {
+      color: #999999;
+    }
+ 
+    input::-webkit-input-placeholder,
+    textarea::-webkit-input-placeholder {
+      color: #999999;
+    }
+  }
+}

+ 12 - 11
src/components/PreviewBody/Inspect/index.jsx

@@ -7,28 +7,29 @@ const PreviewInspect = (props) => {
       <td className={style['patInfoSec']}>检验:</td>
       <td className={style['patInfoSec']}>
         <table style={style.assistTable}>
-        <tr style={{lineHeight: '36px'}}>化验结果数据</tr>
+        {
+          (dataJson.labelListSmall.length !== 0 || dataJson.labelListBig.length !== 0) && ( <tr style={{ lineHeight: '36px' }}>检验结果数据</tr>)
+        }
         {
           dataJson && dataJson.labelListSmall && dataJson.labelListSmall.map((item) => {
             // console.log(item, item,'=====');
-              return (
-                
+              return (               
                   <tr className={style.assistTableTrSec}>
                     <td className={style.assistTableTdFst}>{item.uniqueName}</td>
                     <td className={style.assistTableTdSec}>
                       {/* {getStatusImg(value.type, value.value, 1)}
                       {value.unit} */}
-                      {/* {getStatusImg(2, item.value, 1)}
-                      {item.units} */}
-                      {getStatusImg(2, 9.8, 1)}
-                      {'mmol/L'}
+                      {getStatusImg(0, item.value, 1)}
+                      {item.units}
+                      {/* {getStatusImg(2, 9.8, 1)}
+                      {'mmol/L'} */}
                     </td>
                     {/* {showDetails(item)} */}
                     <td className={style.assistTableTdTrd}>
-                      {/* {normalVal(item.minValue, item.maxValue)} */}
-                      {normalVal(3.9, 6.1)}
+                      {normalVal(item.minValue, item.maxValue)}
+                      {/* {normalVal(3.9, 6.1)} */}
                     </td>
-                    <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '验时间:' + toTime(item.time)
+                    <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '验时间:' + toTime(item.time)
                     }</td>
                   </tr>
                 // </table>
@@ -44,7 +45,7 @@ const PreviewInspect = (props) => {
                   <td className={style.assistTableTdFst}>{item.uniqueName}</td>  
                   <td className={style.assistTableTdSec}></td>
                   <td className={style.assistTableTdTrd}></td>                                             
-                  <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '验时间:' + toTime(item.time)
+                  <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '验时间:' + toTime(item.time)
                   }</td>
                 </tr>
               // </table>

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

@@ -82,7 +82,7 @@ class PreviewBody extends Component {
   render() {
     const { show, preInfo, dataJson, dataStr, baseObj, flg ,come,showAssessBtn,showHistoryCases} = this.props;
     let other_data={},lis_data={},pas_data={},other_yjs='',access='',adviceData={};
-    let isShowSex = baseObj.sex ? false : true
+    let isShowSex = baseObj.sex !== 2 ? false : true
     // if(!come){
     //   other_data = JSON.parse(baseObj.detailList[2].contentJson)
     //   lis_data = JSON.parse(baseObj.detailList[4].contentJson)
@@ -111,7 +111,7 @@ class PreviewBody extends Component {
           <ItemPart dataStr={dataStr.vital} title={'查体:'} type={1}></ItemPart>
           {/* <PreviewInspect dataJson={come?dataJson.lis:lis_data} toTime={this.toTime} dateTime={this.state.dateTime} showDetails={this.showDetails}></PreviewInspect> */}
           <PreviewInspect dataJson={dataStr.lis} toTime={this.toTime} dateTime={this.state.dateTime} showDetails={this.showDetailsCopy}></PreviewInspect>
-          <ItemPart dataStr={dataStr.pacs} title={'检:'} type={2}></ItemPart>
+          <ItemPart dataStr={dataStr.pacs} title={'检:'} type={2}></ItemPart>
           <ItemPart dataStr={dataStr.diag} title={'诊断:'} type={2} lastDot={true}></ItemPart>
           <MedicalAdvice advice={dataStr.advice}></MedicalAdvice>
           {/* <tr className={style['patInfoFst']}>

+ 2 - 1
src/components/SearchDrop/index.jsx

@@ -90,10 +90,11 @@ class SearchDrop extends Component{
         <ScrollArea speed={0.8}
                     horizontal={false}
                     stopScrollPropagation={data.length>6?true:false}
-                    style={{maxHeight:'180px'}}
+                    style={{height:'180px'}}
                     className={style["area"]}
                     verticalContainerStyle={contStyle}
                     verticalScrollbarStyle={barStyle}
+                    smoothScrolling= {true}
                     contentClassName="content">
           <ul>
             {data&&data.map((it)=>{

+ 19 - 7
src/containers/DiagResultSearch.js

@@ -1,15 +1,21 @@
 import React from 'react';
 import { connect } from 'react-redux';
-import { SHOW_SEARCH,  HIDE_SEARCH, GET_SEARCH_RESULT } from '@store/types/diagnosticSearch';
+import {
+  SHOW_SEARCH,
+  HIDE_SEARCH,
+  GET_SEARCH_RESULT,
+  SHOWNODATATEXT,
+} from '@store/types/diagnosticSearch';
 import { getSearchResult, getSearchList } from '@store/async-actions/diagnosticSearch';
 import DiagResultSearch from '@components/DiagResultSearch';
 
 function mapStateToProps(state) {
-    return{
-        show: state.diagnosticSearch.show,
-        searchValue: state.diagnosticSearch.searchValue,
-        searchResult: state.diagnosticSearch.searchResult,
-    }
+    return {
+      show: state.diagnosticSearch.show,
+      searchValue: state.diagnosticSearch.searchValue,
+      searchResult: state.diagnosticSearch.searchResult,
+      isShowNoDataInfo: state.diagnosticSearch.isShowNoDataInfo,
+    };
 }
 
 function mapDispatchToProps(dispatch) {
@@ -30,7 +36,13 @@ function mapDispatchToProps(dispatch) {
                 searchResult: []
             })
         },
-        handleChangeValue: (val)=>{
+        handleChangeValue: (val, isClear)=>{
+            if(isClear === 'clear') {
+              dispatch({
+                type: SHOWNODATATEXT,
+                isShowNoDataInfo: false
+              });  
+            }
             dispatch(getSearchList(val))
         }
     }

+ 1 - 0
src/containers/OperationContainer.js

@@ -98,6 +98,7 @@ function mapDispatchToProps(dispatch) {
     save: () => {
       // 埋点事件,点击保存时调用
       // dispatch(saveClickNum);
+
       dispatch(() => saveMessage())
     },
     clear: (flag) => {

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

@@ -28,3 +28,11 @@ export const getSearchResult= (state, action) => {
     res.searchResult = searchResult;
     return res;
 }
+
+
+export const showText = (state, action) => {
+  const res = Object.assign({}, state);
+//   console.log(action,'action===============');
+  res.isShowNoDataInfo = action.isShowNoDataInfo;
+  return res;
+};

+ 1 - 1
src/store/actions/patInfo.js

@@ -68,7 +68,7 @@ export const setMedicalName = (state, action) => {
 // clearMedicalName
 export const clearMedicalName = (state, action) => {
   const res = Object.assign({}, state);
-  // res.medicalName = ''
+  res.medicalName = ''
   return res
 }
 

+ 7 - 1
src/store/async-actions/diagnosticSearch.js

@@ -1,5 +1,5 @@
 import { json } from "@utils/ajax";
-import { GET_SEARCH_RESULT } from '@store/types/diagnosticSearch';
+import { GET_SEARCH_RESULT, SHOWNODATATEXT } from '@store/types/diagnosticSearch';
 import { GET_SEARCH } from '@store/types/emergencyHis';
 import {  Notify } from '@commonComp';
 import { formatFormParmas } from '@utils/tools';
@@ -39,6 +39,7 @@ export const getSearchList = (val,flag) => {
         .then((res)=>{
             if(res.data.code==0){
                 const data = res.data.data;let curDate=[];
+
                 let arr = data.diseaseNames;
                     for (var key in arr) {
                         let obj = {}
@@ -56,6 +57,11 @@ export const getSearchList = (val,flag) => {
                         type: GET_SEARCH_RESULT,
                         searchResult: curDate
                     })
+                    // 是否进行过搜索
+                    dispatch({
+                        type: SHOWNODATATEXT,
+                        isShowNoDataInfo: true
+                    });
                 }
             }else{
                 Notify.error(res.data.msg)

+ 2 - 0
src/store/async-actions/historyTemplates.js

@@ -17,10 +17,12 @@ export const initItemList = (item) => {
       name: '',
       current: 1,
       size: 9999,
+      desc : ['gmt_create']
     }; 
     if (item === 'up') {
       params.desc = ['gmt_create'];
     }else if(item === 'down'){
+      delete params.desc;
       params.asc = ['gmt_create'];
     }
     return axios.json('/demo/templateInfo/getTemplatePageAlls', params);

+ 4 - 1
src/store/async-actions/print.js

@@ -3,6 +3,7 @@ import {
 } from "../../utils/ajax";
 import store from '@store';
 import {MODI_LOADING} from '@store/types/homePage.js';
+import { CLEARMEDICALNAME } from '@store/types/patInfo.js';
 import Notify from '@commonComp/Notify';
 import {tellPred} from '@store/async-actions/preIcss.js';
 import {
@@ -48,6 +49,7 @@ export const getConceptDetails = (bool) => {
 }
 export const saveMessage=(bool)=>{
     store.dispatch({type:MODI_LOADING,flag:true});
+    // store.dispatch({ type: CLEARMEDICALNAME});
     // getConceptDetails(bool)  //保存病历 老版本
     saveMedicalData()
 }
@@ -160,7 +162,8 @@ export const saveMedicalData = () =>{
     }
     json('/demo/templateInfo/saveTemplateInfo', params).then(res=>{
         let data = res.data
-        if (data.code == 0) {            
+        if (data.code == 0) {       
+            store.dispatch({ type: CLEARMEDICALNAME });     // 清除病历名称 
             Notify.success('病历保存成功');
         } else {
             Notify.info(data.msg);

+ 9 - 6
src/store/reducers/diagnosticSearch.js

@@ -1,11 +1,12 @@
-import { SHOW_SEARCH,  HIDE_SEARCH, SET_SEARCH_VALUE, GET_SEARCH_RESULT } from '../types/diagnosticSearch'; 
-import { showSearch,  hideSearch, setSearchValue, getSearchResult } from '../actions/diagnosticSearch'; 
+import { SHOW_SEARCH,  HIDE_SEARCH, SET_SEARCH_VALUE, GET_SEARCH_RESULT,SHOWNODATATEXT } from '../types/diagnosticSearch'; 
+import { showSearch,  hideSearch, setSearchValue, getSearchResult,showText } from '../actions/diagnosticSearch'; 
 
 const initState = {
-    show: false,
-    searchValue: '',
-    searchResult: []
-}
+  show: false,
+  searchValue: '',
+  searchResult: [],
+  isShowNoDataInfo: false
+};
 
 export default function (state=initState, action) {
     switch(action.type) {
@@ -17,6 +18,8 @@ export default function (state=initState, action) {
             return setSearchValue(state, action);
         case GET_SEARCH_RESULT: 
             return getSearchResult(state, action);
+        case SHOWNODATATEXT: 
+            return showText(state, action);
         default: 
             return state;
     }

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

@@ -61,7 +61,7 @@ export default function(state = initState,action){
         {
           label: 'patientSex',
           id: 'patientSex',
-          value: 0,
+          value: 2,
           title: '性别',
         },
         {

+ 2 - 1
src/store/types/diagnosticSearch.js

@@ -1,4 +1,5 @@
 export const SHOW_SEARCH = 'SHOW_SEARCH';
 export const HIDE_SEARCH = 'HIDE_SEARCH';
 export const SET_SEARCH_VALUE = 'SET_SEARCH_VALUE';
-export const GET_SEARCH_RESULT = 'GET_SEARCH_RESULT';
+export const GET_SEARCH_RESULT = 'GET_SEARCH_RESULT';
+export const SHOWNODATATEXT = 'SHOWNODATATEXT';

+ 16 - 2
src/utils/tools.js

@@ -1195,7 +1195,11 @@ function readyKeepHistory(){
   let jsonStr = getAllDataStringList(baseList);
   let patientName = formatFormParmas('patientName', patInfoData);  // 姓名
   let patientAge = formatFormParmas('patientAge', patInfoData);  // 年龄
-  let patientSex = formatFormParmas('patientSex', patInfoData);  // 性别
+  let patientIdNo = formatFormParmas('patientIdNo', patInfoData);  // 卡号
+  let hospitalDeptName = formatFormParmas('hospitalDeptName', patInfoData);  // 科室
+  let doctorName = formatFormParmas('doctorName', patInfoData);  // 医生
+  let recordId = formatFormParmas('recordId', patInfoData);  // 门诊号
+
   if(filterDataArr(JSON.parse(jsonStr.chief)) == ''){
       return 1;//主诉不能为空
   }
@@ -1205,9 +1209,19 @@ function readyKeepHistory(){
   if (patientAge === '') {
     return 3;
   }
-  if (patientSex === '') {
+  if (patientIdNo === '') {
     return 4;
   }
+  if (hospitalDeptName === '') {
+    return 5;
+  }
+  if (doctorName === '') {
+    return 6;
+  }
+  if (recordId === '') {
+    return 7;
+  }
+
 
   // }else if(!jsonStr.diag || jsonStr.diag.trim().length < 1){
   //     return 2;//诊断不能为空