Browse Source

Merge remote-tracking branch 'origin/dev5.3.2' into dev5.3.2

# Conflicts:
#	src/utils/config.js
zhouna 5 years ago
parent
commit
0635f3bc83

+ 2 - 1
src/common/components/EditableSpan/index.jsx

@@ -98,7 +98,8 @@ class EditableSpan extends Component{
       clearTimeout(that.state.timer);
       temp = newText.replace(searchPre,'');
       isEnd = !(newText.indexOf(searchPre)>0);
-      search = temp.replace(/[(^\s*)|(\s*$)|(^\,*)|(\,*$)]/g,'');
+      // search = temp.replace(/[(^\s*)|(\s*$)|(^\,*)|(\,*$)]/g,'');
+      search = temp.replace(config.regPreAndAft,'');
       // if(!search&&searchPre){
       if(!temp&&searchPre&&newText){
         search = searchPre;

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

@@ -190,7 +190,7 @@ class AddAssistCheck extends React.Component {
                   <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
                     <span className={styles.tagSpan}>
                       {item.name}:
-                      <span className={styles.imgInfo} onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
+                      <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
                     </span>
                   </span>
                   <div className={styles.textareaWrap}>
@@ -233,7 +233,7 @@ class AddAssistCheck extends React.Component {
               <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
                 <span className={styles.tagSpan}>
                   {item.name}:
-                  <span className={styles.imgInfo} onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
+                  <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
                 </span>
               </span>
               <div className={styles.textareaWrap}>

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

@@ -38,7 +38,7 @@ class SlideExcel extends Component {
         <span className={styles.excelDataTitle}>
           <span className={styles.tagSpan}>
             {item.menus}
-            <span className={styles.imgInfo} onClick={() => getInfomation({ name: item.lisExcelItem[0].uniquemealName || '', type: 12, position: 1 })}></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}>
@@ -47,7 +47,7 @@ class SlideExcel extends Component {
               <td style={{ width: '30%' }}>
                 <span className={styles.tagSpan}>
                   {value.itemName}
-                  <span className={styles.imgInfo1} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                  <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
                 </span>
               </td>
               <td style={{ width: '20%' }}>
@@ -66,7 +66,7 @@ class SlideExcel extends Component {
                 <td style={{ width: '30%' }}>
                   <span className={styles.tagSpan}>
                     {value.itemName}
-                    <span className={styles.imgInfo1} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                    <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
                   </span>
                 </td>
                 <td style={{ width: '20%' }}>

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

@@ -128,13 +128,13 @@ class SlideSelect extends Component {
             <p className={styles.staticTagActive}>
                 <span className={styles.tagSpan} data-flg="current" style={{color:"#000"}} onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
-                  <span className={styles.imgInfo1} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+                  <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </span>
             </p>:
             <p >
                 <i className={styles.tagSpan} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
-                  <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+                  <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </i>
             </p>
         }
@@ -156,7 +156,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo1} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
+                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
                                       </span>
                                     </td>
                                     {showDetails(val)}
@@ -174,7 +174,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo1} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
+                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
                                       </span>
                                     </td>
                                     {showDetails(val)}

+ 1 - 0
src/components/ChronicInfo/index.jsx

@@ -384,6 +384,7 @@ class ChronicInfo extends React.Component{
                                 >
                                   {v.name}
                                   {this.getCritical(v)?'':<img className={style['info-img']}
+                                    title='点击i图标可查看详细说明'
                                     style ={currentIndex === i  ? {display: "inline-block"} : {display: "none"}}
                                     src={currentIndex === i ?(hasEnterImg ? infoMove : infoShow ): infoShow}
                                     onMouseEnter={this.handleMouseEnterImg.bind(this)}

+ 1 - 0
src/components/DiagnosticItem/index.jsx

@@ -110,6 +110,7 @@ class DiagnosticItem extends Component{
                           >
                         {item.name} {item.retrievalName ? '('+ item.retrievalName+')': ''}
                         {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)}

+ 44 - 5
src/components/DiagnosticList/index.jsx

@@ -5,6 +5,8 @@ import del_on from './img/delete-on.png'
 import diagUp from './img/diagUp.png'
 import diagDown from './img/diagDown.png'
 import manageIcon from '@common/images/manage.png';
+import infoShow from '@common/images/info-show.png';
+import infoMove from '@common/images/info-move.png';
 import {ConfirmModal, Message,ComplexModal,Footer,Loading} from '@commonComp';
 import Notify from '@commonComp/Notify';
 import Treat from '@containers/Treat'
@@ -35,7 +37,9 @@ class DiagnosticList extends Component {
             isAssessConfirm:false,
             hasOndel: false,
             hasOnIndex: -1,
-            activeItem:{}
+            activeItem:{},
+            hasEnterItem: -1,
+            hasEnterImg: false
         }
         this.deleteItem = this.deleteItem.bind(this);
         this.cancel = this.cancel.bind(this);
@@ -103,10 +107,10 @@ class DiagnosticList extends Component {
             treatTitle: item.name
         })
     } 
-    handleClickDiag(item) {
+    handleClickDiag(item,noTips,noDetails,noNotify) {
         const { getTips } = this.props;
         // getTips && getTips(item);
-        getTips && getTips({id:item.conceptId, type:7, name: item.name, position: 1});
+        getTips && getTips({id:item.conceptId, type:7, name: item.name, position: 1},noTips,noDetails,noNotify);
     }
     referRecord() {
         const { hideReferRecord, showHistoryCaseModal ,chronicMagItem,hisTemplates,autoFillModules,typeConfig} = this.props;
@@ -249,9 +253,29 @@ class DiagnosticList extends Component {
         hasOndel: false
       })
     }
+    handleMouseEnterDrug(index) {
+      this.setState({
+          hasEnterItem: index, 
+      })
+    }
+    handleMouseLeaveDrug() {
+      this.setState({
+          hasEnterItem: -1, 
+      })
+    }
+    handleMouseEnterImg() {
+      this.setState({
+        hasEnterImg: true
+      })
+    }
+    handleMouseLeaveImg() {
+      this.setState({
+        hasEnterImg: false
+      })
+    }
     render(){
         const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller} = this.props;
-        const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex} = this.state;
+        const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex,hasEnterItem,hasEnterImg} = this.state;
         const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
         let isChronic = false;      //是否要显示管理评估
         const footer = <Footer print={true}
@@ -268,7 +292,22 @@ class DiagnosticList extends Component {
                                     {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>}
                                     <span className={style['diag-number']} style={{fontWeight:index === 0 ?'bold':'normal'}}>{index === 0 ? '1' : index+1}</span>
-                                    <span className={style['diag-name']} onClick={()=>{this.handleClickDiag(item)}}>{item.name}<span></span></span> 
+                                    <span className={style['diag-name']} 
+                                       onMouseEnter={this.handleMouseEnterDrug.bind(this,index)}
+                                       onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
+                                    >
+                                      <span  onClick={this.handleClickDiag.bind(this,item,false,true,false)}>
+                                        {item.name}
+                                      </span>
+                                      <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>}
                                     <span className={style['treat']}
                                           // style ={hasTreat ? '' : { color: 'gray', cursor: 'text'}}

+ 9 - 0
src/components/DiagnosticList/index.less

@@ -167,4 +167,13 @@
             margin-right: 5px;
         }
     }
+}
+.info-img {
+    position: absolute;
+    width: 15px;
+    top: -14px;
+    left: 50%;
+    margin-left: -7px;
+    cursor: pointer;
+    z-index: 2;
 }

+ 4 - 3
src/components/MedicalInfo/index.jsx

@@ -8,7 +8,7 @@ class MedicalInfo extends Component {
         super(props);
         this.$inp = React.createRef();
         this.$cont = React.createRef();
-      this.$ul = React.createRef();
+        this.$ul = React.createRef();
         this.state={
           val:'',
           hasSearch: false,
@@ -62,6 +62,7 @@ class MedicalInfo extends Component {
         hasSearch: false,
         msg: '',
       });
+      
       clearResult && clearResult();
     }
   }
@@ -78,6 +79,7 @@ class MedicalInfo extends Component {
         hasSearch: false,
         msg:''
       });
+      this.$inp.current.focus();
       clearResult&&clearResult();
   }
   componentDidMount(){
@@ -105,9 +107,8 @@ class MedicalInfo extends Component {
         return (
             <div className={style['search-cont']} ref={this.$cont}>
               <div className={style['search-box']}>
-                <p className={style['title']}>医学知识搜索</p>
                 <p className={style['cont']}>
-                  <input type="text" className={style['input']} ref={this.$inp} onInput={this.handleChange} onKeyUp={this.handleEnter}/>
+                  <input placeholder="医学知识搜索" type="text" className={style['input']} ref={this.$inp} onInput={this.handleChange} onKeyUp={this.handleEnter}/>
                   {val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
                   <button onClick={this.search}>搜索</button>
                 </p>

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

@@ -56,7 +56,7 @@
         border: none;
     }
     .result{
-        margin-top:78px;
+        margin-top:46px;
         padding: 0 5px 0 0;
         height: 100%;
         box-sizing: border-box;

+ 0 - 52
src/components/Operation/index.jsx

@@ -160,8 +160,6 @@ class Operation extends Component {
     // console.log(tmpLis,'接口返回的')
     for(let i = 0;i <tmpLis.length;i++){
       let dataStr = tmpLis[i].preview;
-      // let dataJson = tmpLis[i].dataJson;
-      // console.log(jsonStr.diag , JSON.parse(dataStr).diag)
       if(
         filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
         filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
@@ -175,56 +173,6 @@ class Operation extends Component {
         Notify.info('该模板已保存');
         return false;
       }
-      // if(whichSign == 0){
-      //   // console.log(filterDataArr(JSON.parse(jsonStr.present)) , filterDataArr(JSON.parse(JSON.parse(dataStr).present)))
-      //   if(
-      //     filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
-      //     filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
-      //     filterDataArr(JSON.parse(jsonStr.other)) == filterDataArr(eval('('+JSON.parse(dataStr).other+')')) && 
-      //     filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('('+JSON.parse(dataStr).vital+')')) &&
-      //     jsonStr.lis == JSON.parse(dataStr).lis &&
-      //     jsonStr.pacs == JSON.parse(dataStr).pacs &&
-      //     jsonStr.diag == JSON.parse(dataStr).diag &&
-      //     jsonStr.advice == JSON.parse(dataStr).advice
-      //     // JSON.stringify(jsonData.chief) == JSON.stringify(JSON.parse(dataJson).chief) &&    
-      //     // JSON.stringify(jsonData.checkedListImport) == JSON.stringify(JSON.parse(dataJson).checkedListImport) &&    
-      //     // JSON.stringify(jsonData.present) == JSON.stringify(JSON.parse(dataJson).present)  &&     
-      //     // JSON.stringify(jsonData.other) == JSON.stringify(JSON.parse(dataJson).other) &&
-      //     // JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 
-      //     // JSON.stringify(jsonData.lis) == JSON.stringify(JSON.parse(dataJson).lis) &&  
-      //     // JSON.stringify(jsonData.pacs) == JSON.stringify(JSON.parse(dataJson).pacs) &&     
-      //     // JSON.stringify(jsonData.diag) == JSON.stringify(JSON.parse(dataJson).diag) &&    
-      //     // JSON.stringify(jsonData.advice) == JSON.stringify(JSON.parse(dataJson).advice) &&    
-      //     // JSON.stringify(jsonData.mainSuitSelecteds) == JSON.stringify(JSON.parse(dataJson).mainSuitSelecteds) &&      
-      //     // JSON.stringify(jsonData.currentIllSelecteds) == JSON.stringify(JSON.parse(dataJson).currentIllSelecteds) &&     
-      //     // JSON.stringify(jsonData.otherHistorySelecteds) == JSON.stringify(JSON.parse(dataJson).otherHistorySelecteds) && 
-      //     // JSON.stringify(jsonData.checkBodySelecteds) == JSON.stringify(JSON.parse(dataJson).checkBodySelecteds) &&     
-      //     // JSON.stringify(jsonData.addItems) == JSON.stringify(JSON.parse(dataJson).addItems)
-      //   ){
-      //     Notify.info('该模板已保存');
-      //     return false;
-      //   }
-      // }else if(whichSign == 1){
-      //   if(
-      //     jsonStr.chief == JSON.stringify(eval('('+JSON.parse(dataStr).chief+')')) && 
-      //     jsonStr.present == JSON.stringify(eval('('+JSON.parse(dataStr).present+')')) && 
-      //     jsonStr.other == JSON.stringify(eval('('+JSON.parse(dataStr).other+')')) && 
-      //     jsonStr.vital == JSON.stringify(eval('('+JSON.parse(dataStr).vital+')')) &&
-      //     jsonStr.lis == JSON.parse(dataStr).lis &&
-      //     jsonStr.pacs == JSON.parse(dataStr).pacs &&
-      //     jsonStr.diag == JSON.parse(dataStr).diag &&
-      //     jsonStr.advice == JSON.parse(dataStr).advice
-      //     // JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 
-      //     // JSON.stringify(jsonData.lis) == JSON.stringify(JSON.parse(dataJson).lis) &&  
-      //     // JSON.stringify(jsonData.pacs) == JSON.stringify(JSON.parse(dataJson).pacs) &&     
-      //     // JSON.stringify(jsonData.diag) == JSON.stringify(JSON.parse(dataJson).diag) &&    
-      //     // JSON.stringify(jsonData.advice) == JSON.stringify(JSON.parse(dataJson).advice) &&        
-      //     // JSON.stringify(jsonData.addItems) == JSON.stringify(JSON.parse(dataJson).addItems)
-      //   ){
-      //     Notify.info('该模板已保存');
-      //     return false;
-      //   }
-      // }
     }
     return true;
   }

+ 2 - 2
src/components/PushItems/TipsMsg/index.jsx

@@ -38,8 +38,8 @@ class TipsMsg extends Component {
               </div>
               {tips.details &&
                 tips.details.map((item, index) => {
-                  return (
-                      <div>
+                 return (
+                  item.position&&item.position.indexOf('1') > -1&&<div>
                         <div
                           dangerouslySetInnerHTML={{
                             __html: item.title

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

@@ -127,7 +127,7 @@ class PushItems extends Component {
   }
 
   showTips() {
-    const { getTipsDetails, showTipsDetailsModal, clickDiag } = this.props;console.log(this.props)
+    const { getTipsDetails, showTipsDetailsModal, clickDiag } = this.props;
     getTipsDetails && getTipsDetails({name: clickDiag.name, type: clickDiag.type,position:0});
     //showTipsDetailsModal && showTipsDetailsModal()
   }
@@ -137,12 +137,12 @@ class PushItems extends Component {
   }
 
   componentDidMount() {
-    const height = getWindowInnerHeight() - 200;
+    const height = getWindowInnerHeight() - 170;
     this.$cont.current.style.height = height + "px";
 
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight() - 200;
+        const height = getWindowInnerHeight() - 170;
         this.$cont.current.style.height = height + "px";
       }
     });
@@ -277,8 +277,8 @@ class PushItems extends Component {
               tipsDiscalimer = {tipsDiscalimer}
             ></TipsMsg>
           </div>
+         {tipsDiscalimer.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data &&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2')&&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2').description}}></div>}
         </div>
-        {tipsDiscalimer.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data &&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2')&&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2').description}}></div>}
         {showTipsDetails && <DetailsModal  
             showTipsDetails = {showTipsDetails}
             hideTips = {this.hideTips}

+ 6 - 2
src/components/PushItems/index.less

@@ -1,10 +1,11 @@
 @import "~@less/variables.less";
 .push-content-wrapper{
   // padding-top: 50px;
-  padding: 0px 15px;
+  padding: 0px 15px ;
   line-height: 20px; 
   width: @push-width;
   overflow: hidden;
+  position: relative;
   .push-content {
     width: 436px;
     overflow-y: auto;
@@ -109,9 +110,12 @@
   
 }
 .disTips {
-  padding: 10px 20px 0;
+  padding: 10px 20px 0px 10px;
+  background: #fff;
   font-size: 10px;
   color: #979797;
   text-align: center;
+  position: absolute;
+  bottom: 0;
 }
 

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

@@ -93,6 +93,7 @@ class ScaleSearch extends Component {
       hasSearch: false,
       msg:''
     });
+    this.$inp.current.focus();
     clearResult&&clearResult();
   }
   componentDidMount(){
@@ -120,9 +121,8 @@ class ScaleSearch extends Component {
     return (
         <div className={style['search-cont']} ref={this.$cont}>
           <div className={style['search-box']}>
-            <p className={style['title']}>量表搜索</p>
             <p className={style['cont']}>
-              <input type="text" className={style['input']} ref={this.$inp} onInput={this.handleChange} onKeyUp={this.handleEnter}/>
+              <input type="text" placeholder="量表搜索" className={style['input']} ref={this.$inp} onInput={this.handleChange} onKeyUp={this.handleEnter}/>
               {val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
               <button onClick={this.search}>搜索</button>
             </p>

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

@@ -52,7 +52,7 @@
     border: none;
   }
   .result{
-    margin-top:78px;
+    margin-top:46px;
     padding: 0 5px 0 0;
     height: 100%;
     overflow: auto;

+ 1 - 1
src/components/TemplateItems/TemplateItem/index.less

@@ -33,7 +33,7 @@
     position: relative;
     height: 45px;
     line-height: 45px;
-    padding: 0 20px;
+    padding: 0 15px;
     cursor: pointer;
     img {
         display: inline-block;

+ 55 - 13
src/components/TemplateItems/index.jsx

@@ -3,6 +3,7 @@ import React from "react"
 import style from "./index.less"
 import TemplateItem from './TemplateItem'
 import check_circle from './TemplateItem/img/check-circle.png';
+import delIcon from '@common/images/del_nor.png';
 import check_right from './TemplateItem/img/check-right.png';
 import Empty from '@components/Empty';
 import {windowEventHandler,getWindowInnerHeight} from '@utils/tools'
@@ -11,17 +12,24 @@ import {windowEventHandler,getWindowInnerHeight} from '@utils/tools'
 class TemplateItems extends React.Component {
     constructor(props) {
         super(props);
+        this.state = {
+            msg:'还没有保存模板',
+            val:''
+        }
         this.$cont = React.createRef();
         this.$search = React.createRef();
         this.genItems = this.genItems.bind(this);
         this.templateSearch = this.templateSearch.bind(this);
+        this.handleEnter = this.handleEnter.bind(this);
+        this.handleChange = this.handleChange.bind(this);
+        this.clear = this.clear.bind(this);
     }  
     componentDidMount(){
-        const height = getWindowInnerHeight()-226;
+        const height = getWindowInnerHeight()-216;
         this.$cont.current.style.height = height+"px";
         windowEventHandler('resize', ()=>{
             if(this.$cont.current){
-                const height = getWindowInnerHeight()-226;
+                const height = getWindowInnerHeight()-216;
                 this.$cont.current.style.height = height+"px";
             }
         });
@@ -54,7 +62,48 @@ class TemplateItems extends React.Component {
     templateSearch(){
         const {templateSearch} = this.props
         templateSearch(this.$search.current.value)
+        if(this.$search.current.value.trim()){
+            this.setState({
+                msg:'暂无模板信息'
+            })
+        }else{
+            this.setState({
+                msg:'还没有保存模板'
+            })
+        }
+    }
+    
+    handleEnter(e){
+        if(e.keyCode==13){
+            this.templateSearch();
+        }
     }
+    
+    handleChange(){
+        const value = (this.$search.current.value).substring(0,30);
+        // this.$search.current.value = value
+        setTimeout(() => {
+            
+            this.setState({
+                val: value
+            });
+        }, 30);
+        // if (value === '') {
+        //     this.setState({
+        //         val: ''
+        //     });
+        // }
+    }
+
+    clear(){
+        this.$search.current.value = '';
+        this.setState({
+            val:''
+        })
+        
+        this.$search.current.focus();
+    }
+
     render() {
         const { allCheckShow, handleMangerTemplate,handleClickGetMore, handleDelList, handleAllCheckbox, items,checkItems,current,hasMore } = this.props;
         // console.log(allCheckShow,7877877)
@@ -75,25 +124,18 @@ class TemplateItems extends React.Component {
                         </div> :
                         <div className={style.wrapperTop}>
                             <div className={style.templateSearch}>
-                                <input ref={this.$search} type="text" />
-                                <div className={style.search} onClick={this.templateSearch}>检索</div>
+                                <input placeholder="模板搜索" maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
+                                {this.state.val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
+                                <div className={style.search} onClick={this.templateSearch}>搜索</div>
                             </div>
                             {
                                 items.length > 0&&<span className={`${style['fr-element']} ${style['manger']}`} onClick={handleMangerTemplate}>管理</span>
                             }
                     </div>) : <div style={{height:'36px'}}></div>
-                    // <div className={style.emptyWrap}>
-                    //     <div className={`${style.templateSearch}`}>
-                    //         <input ref={this.$search} type="text" />
-                    //         <div className={style.search} onClick={this.templateSearch}>检索</div>
-                            
-                    //     </div>
-                    //     <span className={`${style['fr-element']} ${style['manger']}`} onClick={handleMangerTemplate}>管理</span>
-                    // </div>
                 }
                 <div className={style.tempLists} ref={this.$cont}>
                     {
-                        this.genItems().length > 0?this.genItems(): <Empty message={'还没有保存模板'}></Empty>
+                        this.genItems().length > 0?this.genItems(): <Empty message={this.state.msg}></Empty>
                     }
                     {/* {//注释掉的暂时没有分也功能
                       hasMore?<p onClick={()=>handleClickGetMore(current)} className={style.loadMore}>点击查看更多</p>:null

+ 23 - 11
src/components/TemplateItems/index.less

@@ -9,7 +9,7 @@
     .tempLists {
         overflow-y: auto;
         background-color: #fff;
-        margin-top: 15px;
+        // margin-top: 15px;
     }
     .emptyWrap {
         padding: 0 20px;
@@ -23,9 +23,9 @@
         }
     }
     .wrapperTop {
-        height: 36px;
-        padding: 0 20px;
-        margin-top: 15px;
+        height: 46px;
+        padding: 0 15px;
+        margin-top: 10px;
         // background-color: #EAEDF1;
         cursor: pointer;
         .check-box {
@@ -33,21 +33,19 @@
             // width: 18px;
             margin-top: 10px;
             padding-right: 10px;
-            
             box-sizing: content-box;
             float: left;
         }
         .check-wrap{
             height: 36px;
             padding-right: 10px;
-            display: inline-block;
             float: left;
         }
         span {
-            display: inline-block;
             height: 36px;
             line-height: 36px;
             float: left;
+            // margin-top: 20px;
         }
         .fr-element {
             float: right;
@@ -75,13 +73,20 @@
     }
     .templateSearch {
         display: inline-block;
+        p {
+            font-size: 12px;
+            color: #979797;
+            margin-bottom: 10px;
+        }
         input {
-            height: 35px;
-            line-height: 35px;
-            border: 1px solid #CECECE;
             box-sizing: border-box;
             width: 270px;
-            padding: 0 10px;
+            display: inline-block;
+            line-height: 34px;
+            height: 34px;
+            padding: 5px 25px 5px 5px;
+            border: 1px #CECECE solid;
+            vertical-align: top;
         }
         .search {
             display: inline-block;
@@ -92,6 +97,13 @@
             height: 35px;
             line-height: 35px;
         }
+        img {
+            position: absolute;
+            width: 15px;
+            left: 264px;
+            top: 10px;
+            cursor: pointer;
+        }
     }
 }
 

+ 1 - 0
src/components/Treat/AdverseReactions/index.jsx

@@ -64,6 +64,7 @@ class AdverseReactions extends Component {
                         >
                             <span className={style['last-treat-big-name']} >{item.name}:
                                 {<img className={style['info-img']}  
+                                    title='点击i图标可查看详细说明'
                                     style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
                                     src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
                                     onMouseEnter={this.handleMouseEnterImg.bind(this)}

+ 1 - 0
src/components/Treat/DrugHistory/LastDrug/index.jsx

@@ -59,6 +59,7 @@ class LastDrug extends Component {
                             > 
                             {item.medicitionName} 
                             {<img className={style['info-img']}  
+                                title='点击i图标可查看详细说明'
                                 style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
                                 src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
                                 onMouseEnter={this.handleMouseEnterImg.bind(this)}

+ 1 - 0
src/components/Treat/DrugTreat/index.jsx

@@ -105,6 +105,7 @@ class DrugTreat extends Component {
                                                 {it.medicitionName}
                                             </span>
                                             {<img className={style['info-img']}  
+                                              title='点击i图标可查看详细说明'
                                               style ={currentIndex === index ? (ii === currentImg ? {display: "inline-block"} : {display: "none"}) : {display: "none"}}
                                               src={currentIndex === index ? (ii === currentImg ? (hasEnterImg ? info3 : info2) : info2): info2} 
                                               onMouseEnter={this.handleMouseEnterImg.bind(this, ii, index)}

+ 2 - 0
src/components/TreatDesc/index.jsx

@@ -93,6 +93,7 @@ class TreatDesc extends Component {
                                     {item.medicitionName}
                                 </span>
                                 {<img className={style['info-img']}  
+                                    title='点击i图标可查看详细说明'
                                     style ={currentIndex === index ? {display: "inline-block"} : {display: "none"}}
                                     src={currentIndex === index ?  (hasEnterImg ? info3 : info2) : info2} 
                                     onMouseEnter={this.handleMouseEnterImg.bind(this, index)}
@@ -102,6 +103,7 @@ class TreatDesc extends Component {
                             </span>              
                             
                             {/* {<img className={style['info-img']}    
+                                title='点击i图标可查看详细说明'
                                 src={currentIndex === index ? info1 : info} 
                                 onMouseEnter={this.handleMouseEnterImg.bind(this, index)}
                                 onMouseLeave = {this.handleMouseLeaveImg}

+ 1 - 0
src/config/index.js

@@ -35,4 +35,5 @@ export default {
     textReg:new RegExp("([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9])"), //包含中英文或数字
     slideTime:400,      //右侧指标推送展开/收起动画时间
     recoverTagNum:3,    //可回退标签的个数
+    regPreAndAft:/[^\u4e00-\u9fa5|0-9|a-z|A-Z|Ⅰ|Ⅱ|Ⅲ|Ⅳ|Ⅴ|Ⅵ|Ⅶ|Ⅷ|Ⅸ|Ⅹ]+$|^[^\u4e00-\u9fa5|0-9|a-z|A-Z|Ⅰ|Ⅱ|Ⅲ|Ⅳ|Ⅴ|Ⅵ|Ⅶ|Ⅷ|Ⅸ|Ⅹ]+/g  //搜索去掉前后的标点
 };

+ 2 - 0
src/containers/DiagnosticItem.js

@@ -28,7 +28,9 @@ function mapDispatchToProps(dispatch) {
                 type: GET_DIAGNOSTIC_STR
             });
             dispatch(isAddMainSuit())
+            console.log('item', item)
             // dispatch(addDiagnostic(item))
+            dispatch(getConceptDetail({type:7,name: item.name, position: 1},false,true,true))
         },
         showSearch:()=>{
             dispatch({

+ 2 - 2
src/containers/DiagnosticList.js

@@ -91,8 +91,8 @@ function mapDispatchToProps(dispatch) {
             // dispatch({type:SHOW_LOADING,flag:true});
             dispatch(getTreatResult(item));
         },
-        getTips: (item) => {
-            dispatch(getConceptDetail(item))
+        getTips: (item,noTips,noDetails,noNotify) => {
+            dispatch(getConceptDetail(item,noTips,noDetails,noNotify))
         },
         getBilling: () => {
             dispatch(billing())

+ 8 - 4
src/containers/EditableSpan.js

@@ -19,7 +19,8 @@ function mapStateToProps(state){//console.log(state)
 
 function mainSuitSearch(obj){
   return (dispatch)=>{
-    const text = obj.text.replace(/\,/,'');
+    // const text = obj.text.replace(/\,/,'');
+    const text = obj.text;
     getSearch({boxMark:1,inpStr:text,mainIds:obj.mainIds,itemType:0}).then((res)=>{
       if(res.data.code=='0'){
         dispatch({
@@ -35,7 +36,8 @@ function mainSuitSearch(obj){
 
 function currentSearch(obj){
   return (dispatch)=>{
-    const text = obj.text.replace(/\,/,'');
+    // const text = obj.text.replace(/\,/,'');
+    const text = obj.text;
     getSearch({boxMark:1,inpStr:text,mainIds:obj.mainIds}).then((res)=>{
       if(res.data.code=='0'){
         dispatch({
@@ -51,7 +53,8 @@ function currentSearch(obj){
 
 function checkBodySearch(obj){
   return (dispatch)=>{
-    const text = obj.text.replace(/\,/,'');
+    // const text = obj.text.replace(/\,/,'');
+    const text = obj.text;
     getSearch({boxMark:4,inpStr:text}).then((res)=>{
       if(res.data.code=='0'){
         dispatch({
@@ -67,7 +70,8 @@ function checkBodySearch(obj){
 
 function otherHisSearch(obj) {
   return (dispatch)=>{
-    const text = obj.text.replace(/\,/,'');
+    // const text = obj.text.replace(/\,/,'');
+    const text = obj.text;
     getSearch({boxMark:3,inpStr:text}).then((res)=>{
       if(res.data.code=='0'){
         dispatch({

+ 17 - 1
src/store/async-actions/pushMessage.js

@@ -137,7 +137,7 @@ export const billing = (mdata,boxMark) => {
 };
 
 //获取提示信息(静态信息)
-export const getConceptDetail = (item) => {
+export const getConceptDetail = (item,noTips,noDetails,noNotify) => {
     return(dispatch, getState) => {
 
         const params ={
@@ -145,6 +145,9 @@ export const getConceptDetail = (item) => {
             position: item.position,
             type: item.type
         }
+        if(item.position == '1') { //点击i要展示详情和提示信息
+          params.position = 0
+        }
 
         json(api.getConceptDetail, params).then((res) => {
             if(res.data.code == '0'&& res.data.data.details && res.data.data.details.length > 0) {
@@ -171,6 +174,17 @@ export const getConceptDetail = (item) => {
                         });
                     }
                     document.getElementById("tipsMsg").scrollIntoView(true)
+                    //点击i同时打开详情弹窗 点击诊断名称不打开弹窗
+                    if(!noDetails) {
+                      dispatch({
+                        type: SET_TIPS_DETAILS,
+                        tipsDetails: res.data.data
+                      })
+                      dispatch({
+                        type: SHOW_TIPS_DETAILS
+                      })
+                    }
+                    
                 } else if(item.position == '5' || item.position == '6'){    //药品或不良反应说明
                     dispatch({
                         type: SET_DRUG_INFO,
@@ -183,7 +197,9 @@ export const getConceptDetail = (item) => {
                     })
                 }
             } else {
+              if(!noNotify) {
                 Notify.info('提示信息未维护')
+              }
             }
             
         })

+ 2 - 2
src/utils/config.js

@@ -1,8 +1,8 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
-// const host='http://192.168.2.236:5050';//后端接口访问地址
-// const host='http://192.168.2.121:5050';//后端接口访问地址
 const host='http://192.168.2.236:5050';//后端接口访问地址
+// const host='http://192.168.2.121:5050';//后端接口访问地址
+// const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚