Bladeren bron

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

# Conflicts:
#	src/store/async-actions/treat.js
zhouna 6 jaren geleden
bovenliggende
commit
b86268a57a

BIN
src/components/DiagnosticList/img/delete.png


BIN
src/components/DiagnosticList/img/diagDown.png


BIN
src/components/DiagnosticList/img/diagUp.png


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

@@ -82,8 +82,8 @@ class DiagnosticList extends Component {
                     {list && (list.length > 0) && list.map((item, index) => {
                         const hasTreat = item.treat && (item.treat.commonTreatment || item.treat.surgeryTreatment || item.treat.treatment.length>0)
                         return (<div draggable={true} className={style['diag-box'] + ' clearfix'}  key={item.id} >
-                                    {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img src={diagUp}/></span>}
-                                    {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img src={diagDown}/></span>}
+                                    {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 ? '主' : index+1}</span>
                                     <span className={style['diag-name']} onClick={()=>{this.handleClickDiag(item)}}>{item.name}<span></span></span> 
                                     {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}

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

@@ -97,4 +97,8 @@
     font-size: 16px;
     color: #000000;
     line-height: 16px;
+}
+.diag-up, .diag-down, .diag-del {
+    width: 20px;
+    margin-bottom: 4px;
 }

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

@@ -219,7 +219,7 @@ class PushItems extends Component {
             <div className={style["recommend"]}>
               <h1>
                 <img src={recommendImg} />
-                推荐检验检查<div onClick={billing}>开单</div>
+                推荐检验检查<div className={style["billing"]}  onClick={billing}>开单</div>
               </h1>
               <div>
                 {assay.length === 0 && check.length === 0 ? (

+ 3 - 1
src/components/PushItems/index.less

@@ -337,4 +337,6 @@
   display: inline-block;
   padding: 0px 10px 0px 0px;
 }
-
+.billing {
+  color: #3B9ED0;
+}

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

@@ -12,8 +12,9 @@ class DrugInfo extends Component {
         return (<div className={style['drug-info-wrapper']}>
                 <h3 className={style['drug-title']}>{drugInfo.title}说明书  <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/> </h3>
                 { drugInfo && drugInfo.drugDesc.length > 0 && <div className={style['drug-desc-wrapper']}>
+                    <div className={style['drug-title1']}>{drugInfo.title}说明书</div>
                     {drugInfo.drugDesc.map((item, index) =>{
-                        return <div className={style['drug-desc-item']}>{item.title}: <span dangerouslySetInnerHTML ={{__html: item.content}}></span> </div>
+                        return <div className={style['drug-desc-item']}><span className={style['drug-desc-title']}>{item.title}</span> <span className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content}}></span> </div>
                     })}
                 </div> }
 

+ 26 - 1
src/components/TreatDesc/DrugInfo/index.less

@@ -20,9 +20,34 @@
     height: 40px;
     line-height: 40px;
     padding: 0 40px;
+    border-bottom: 1px solid #979797;
 }
 .close-drug-desc {
     position: absolute;
     right: 0;
     width: 30px;
-}
+}
+.drug-desc-item {
+    padding: 5px 0;
+}
+.drug-desc-title {
+    display: inline-block;
+    font-weight: bold;
+    font-size: 14px;
+    height: 100%;
+    float: left;
+}
+.drug-desc-title::before {
+    content: '【'
+}
+.drug-desc-title::after {
+    content: '】'
+}
+.drug-title1 {
+    height: 60px;
+    line-height: 60px;
+    font-size: 32px;
+    color: #000000;
+    text-align: center;
+}
+.drug-desc-content {}

+ 9 - 9
src/containers/DiagnosticItem.js

@@ -3,8 +3,8 @@ import { connect } from 'react-redux';
 import DiagnosticItem from '@components/DiagnosticItem';
 import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR } from '@store/types/diagnosticList'; 
 import {  SHOW_SEARCH,  HIDE_SEARCH, SET_SEARCH_VALUE } from '@store/types/diagnosticSearch';
+import { addDiagnostic } from '@store/async-actions/treat';
 import { getSearchResult } from '@store/async-actions/diagnosticSearch';
-import { isAddMainSuit } from '@store/async-actions/diagnosticList';
 import {billing, getTips} from '../store/async-actions/pushMessage';
 
 
@@ -17,14 +17,14 @@ function mapStateToProps(state) {
 function mapDispatchToProps(dispatch) {
     return{
         addDiagnostic: (item) => {
-            dispatch({
-                type: ADD_DIAGNOSTIC,
-                item: item
-            });
-            dispatch({
-                type: GET_DIAGNOSTIC_STR
-            });
-            dispatch(isAddMainSuit())
+            dispatch(addDiagnostic(item))
+            // dispatch({
+            //     type: ADD_DIAGNOSTIC,
+            //     item: item
+            // });
+            // dispatch({
+            //     type: GET_DIAGNOSTIC_STR
+            // });
         },
         showSearch:()=>{
             dispatch({

+ 3 - 0
src/containers/SpreadDrop.js

@@ -154,6 +154,9 @@ function otherHisConfirm(dispatch,store,params){
       dispatch({
         type:ISREAD
       });
+      dispatch({
+        type:ISREAD
+      });
     }
   });
 }

+ 12 - 7
src/store/async-actions/treat.js

@@ -1,8 +1,10 @@
 import { json } from "@utils/ajax";
 import { SET_TREAT } from '@store/types/diagnosticList';
-import { ADD_DIAGNOSTIC} from '@store/types/diagnosticList'; 
+import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR} from '@store/types/diagnosticList';
 import { SET_DRUG_INFO, SET_TREATMENT, SET_RECOMMEND_BASIC } from '@store/types/treat';
-import {getEMRParams} from  '@utils/tools';
+import {storageLocal,getEMRParams} from '@utils/tools';
+import { isAddMainSuit } from '@store/async-actions/diagnosticList';
+
 const api={
     push:'/api/icss/push/pushInner',
     textPush:'/api/icss/push/pushText'
@@ -25,7 +27,7 @@ export const addDiagnostic = (item) => {
                     } else {
                         diag = diag + ',' + diagnosticList[i].name;
                     }
-                    
+
                 }
             }
             if (item.type === 1) {
@@ -45,22 +47,25 @@ export const addDiagnostic = (item) => {
                 "symptom": emrData.current + emrData.main,
                 "vital": emrData.vital
             };
-            
+
             json(url, params).then((data) =>{
-                console.log('data', data)
                 if (data.data.data) {
                     item.treat = data.data.data.treat
-                    return dispatch({
+                    dispatch({
                         type: ADD_DIAGNOSTIC,
                         item: item
                     })
                 } else {
                     item.treat = null
-                    return dispatch({
+                    dispatch({
                         type: ADD_DIAGNOSTIC,
                         item: item
                     })
                 }
+                dispatch({
+                    type: GET_DIAGNOSTIC_STR
+                });
+                dispatch(isAddMainSuit())
 
             }).catch((e) =>{
                 console.log(e)