Browse Source

Merge remote-tracking branch 'origin/dev/zhangxc1' into dev/new1

zhouna 6 years ago
parent
commit
b8b4174d5b

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

@@ -81,7 +81,7 @@ class CopyRight extends Component {
       <div className={style["container"]}>
         <div className={style["copy"]}>
           版本信息:{" "}
-          <a href="javascript:;" onClick={showCopyModal}>
+          <a lassName={style["copy-number"]} href="javascript:;" onClick={showCopyModal}>
             {number}
           </a>{" "}
           {hasNewVersion && <span>new</span>} &copy;<b>朗通医疗</b>

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

@@ -22,6 +22,7 @@
       a{
         text-decoration: none;
         font-size: 12px;
+        color: #3B9ED0;
       }
       b{
         font-size: 12px;
@@ -31,7 +32,7 @@
     
     .disclaimer{
       font-size: 12px;
-      color: #00e;
+      color: #3B9ED0;
       float: right;
       cursor: pointer;
     }

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

@@ -104,7 +104,7 @@ class DiagResultSearch extends Component {
                 <div className={style['search-result']}>
                     {
                         searchResult && searchResult.map((item) => {
-                            return(<div  key={item.id} className={style['search-result-item']}><DiagnosticItem item={item} clearInput={this.clearInput}/></div>)
+                            return(<div  key={item.id} className={style['search-result-item']}><DiagnosticItem title={true} item={item} clearInput={this.clearInput}/></div>)
                         })
                     }
                 </div>

+ 6 - 2
src/components/DiagnosticItem/index.jsx

@@ -55,9 +55,13 @@ class DiagnosticItem extends Component{
 
     render(){
         const { visible } = this.state
-        const { item } = this.props
+        const { item, title } = this.props
         return (<span className={style['diag-item']} >
-                    <span className={style['diag-name']} onClick={() =>{this.chooseDiagodal(item)}}>{item.name} </span>
+                    <span className={style['diag-name']} 
+                          title = {title && item.name + (item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': '')}
+                          onClick={() =>{this.chooseDiagodal(item)}}>
+                        {item.name} {item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': ''}
+                    </span>
                     <ConfirmModal visible={visible} okText='初诊' cancelText='复诊' confirm={this.confirm}  cancel={this.cancel} close={this.close}>
                         <div className={style['confirm-info']}>确定选择“{item.name}”为</div> 
                     </ConfirmModal>

+ 4 - 0
src/components/DiagnosticItem/index.less

@@ -12,4 +12,8 @@
 .diag-name {
     display: inline-block;
     width: 100%;
+    height: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
 }

+ 9 - 5
src/components/PushItems/index.jsx

@@ -46,11 +46,15 @@ class PushItems extends Component {
     const checkedAssay = assay.filter(item => item.checked);
     const checkedCheck = check.filter(item => item.checked);
     this.props.billing(checkedAssay, checkedCheck);
-    const Height = $(".src-components-BodyContainer-2SgEx").height();
-    const adviceHeight = $(".src-common-components-ItemBox-1Bpz3").height();
-    const winHeight = window.innerHeight;
-    const scrollTop = Height;
-    document.documentElement.scrollTop = 10000;
+    if(checkedAssay.length > 0 || checkedCheck.length > 0) {
+      console.log('checkedCheck',checkedAssay, checkedCheck)
+      const Height = $(".src-components-BodyContainer-2SgEx").height();
+      const adviceHeight = $(".src-common-components-ItemBox-1Bpz3").height();
+      const winHeight = window.innerHeight;
+      const scrollTop = Height;
+      document.documentElement.scrollTop = 10000;
+    }
+    
   }
 
   changeAssay(item) {

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

@@ -108,15 +108,16 @@
       div{
         float: right;
         width: 50px;
-        height: 26px;
         border: 1px solid #3B9ED0;
         text-align: center;
-        line-height: 26px;
         padding:0px;
         border-radius: 4px;
         margin-top: -3px;
         cursor: pointer;
         font-weight: normal;
+        height: 28px;
+        line-height: 28px;
+        font-size: 12px;
       }
     }
     div{
@@ -339,6 +340,7 @@
 }
 .billing {
   color: #3B9ED0;
+  
 }
 .disTips {
   padding: 10px 20px 0;

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

@@ -10,7 +10,7 @@ class DrugTreat extends Component {
     constructor(props) {
         super(props);
         this.state = {
-            currentImg: -1
+            currentImg: -1,
         }
         this.handleSelect = this.handleSelect.bind(this);
         this.setOtherRecommend = this.setOtherRecommend.bind(this);
@@ -43,6 +43,19 @@ class DrugTreat extends Component {
         const { setDrugInfo } = this.props;
         setDrugInfo && setDrugInfo(item);
     }
+    //搜索药品说明书(查看数据用)
+    handleInputDrug(e) {
+        this.setState({
+            drugId: e.target.value
+         })
+    }
+    //搜索药品说明书(查看数据用)
+    searchDrug() {
+        const { showDrugInfo } = this.props
+        this.setDrugInfo({id: this.state.drugId})
+        showDrugInfo && showDrugInfo();
+
+    }
     showTreatDesc() {
         $('#treatDescBox').css({'display': 'block'});
         $('#treatWrapper').animate({'margin-left': '-470px'}, 300);
@@ -58,6 +71,8 @@ class DrugTreat extends Component {
         return(
             treatment && treatment.length > 0 && <div className={style['drug-box']}>
                 <h3 className={style['drug-title']}><img className={style['drug-icon']} src={drugIcon}/> 常用药物治疗</h3>
+                {/* 查看药物说明书 */}
+                <div> <input onInput={this.handleInputDrug.bind(this)} style={{border:'1px solid #000'}} type="text"/><button onClick = {this.searchDrug.bind(this)}>搜索药品说明</button></div>
                 {treatment.map((item, index) => {
                     return(<div className={style['drug-content']}>
                         <div  className={style['drug-name-box']}>

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

@@ -59,7 +59,7 @@ class TreatDesc extends Component {
                         {index === 0 ? '' : ', '}     
                         <span className={style['drug-name-box']}>
                             <span className={style['drug-name']} 
-                                onDoubleClick={() =>{setDrugInfo(item);showDrugInfo();}} 
+                                // onDoubleClick={() =>{setDrugInfo(item);showDrugInfo();}} 
                                 onClick={()=>{item.forbidden === '2' ? '' : this.handleSelect(otherDrugIndex,index)}} 
                                 style={item.selected ? {color: '#3B9ED0'}:''}>
                                 {item.medicitionName}

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

@@ -23,6 +23,8 @@ export const getSearchResult= (state, action) => {
         let searchResultItem = {}
         searchResultItem.id = item.questionId
         searchResultItem.name = item.name
+        searchResultItem.showType = item.showType
+        searchResultItem.retrievalName = item.retrievalName
         searchResult.push(searchResultItem)
     }) 
     res.searchResult = searchResult;

+ 10 - 4
src/store/async-actions/diagnosticSearch.js

@@ -43,11 +43,17 @@ export const getSearchResult = (value) =>{
                             searchResult.push(searchRes[i])
                         }
                     }
+                    dispatch({
+                        type: GET_SEARCH_RESULT,
+                        searchResult: searchResult
+                    })
+                } else {
+                    dispatch({
+                        type: GET_SEARCH_RESULT,
+                        searchResult: []
+                    })
                 }
-                dispatch({
-                    type: GET_SEARCH_RESULT,
-                    searchResult: searchResult
-                })
+               
             }).catch((e)=>{
                 console.log(e)
             })