浏览代码

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

zhouna 6 年之前
父节点
当前提交
9f8241f4a2

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

@@ -240,7 +240,7 @@ class PreviewBody extends Component {
                     return <table style={{ margin: '8px 0', width: '100%' }}>
                       {
                         item.show?<tr style={{ fontSize: '14px', lineHeight: '1.5' }}><td><span style={{ borderBottom: '1px solid #666666' }}> {item.name} </span></td></tr>:
-                        <tr style={{ fontSize: '14px', lineHeight: '1.5' }}><td><span style={{ color: '#767676',position:'relative',left:'-10px' }}>「{item.name}」</span></td></tr>
+                        <tr style={{ fontSize: '14px', lineHeight: '1.5' }}><td><span style={{ position:'relative',left:'-10px' }}>「{item.name}」</span></td></tr>
                       }
                       {
                         item.details.map((val) => {

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

@@ -59,7 +59,8 @@ class Treat extends Component {
                 <div className={style['treat-mask']} onClick={this.hideTreat}>
                 </div>
                 <div id="treatWrapper" className={style['treat-box']}  onselectstart="return false" style={{zIndex:zIndex}}>
-                    <div onMouseDown={this.setTreatBox} id="dragTreatTitle" className={style['treat-title']}>治疗方案 ({treatItem.name})<img onClick={this.hideTreat} src={close}/></div>
+                    <img className={style.close} onClick={this.hideTreat} src={close}/>
+                    <div onMouseDown={this.setTreatBox} id="dragTreatTitle" className={style['treat-title']}>治疗方案 ({treatItem.name})</div>
 
                     <div className={style['treat-inner-box']}>
                         <GeneralTreat icon={generalIcon} title='一般治疗'   generalTreat={generalTreat}></GeneralTreat>

+ 6 - 0
src/components/Treat/index.less

@@ -14,6 +14,12 @@
     // z-index: 301;
     z-index: 300;
 }
+.close {
+  position: absolute;
+  z-index:9999;
+  top: 0;
+  right: 0;
+}
 .treat-mask {
     position: fixed;
     width: 100%;

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

@@ -57,7 +57,8 @@ class DrugInfo extends Component {
         const { drugInfo, hideDrugInfo, drugInfoList,hideDrugInfoMore } = this.props
         const { currentIndex,zIndex } = this.state
         return (<div className={style['drug-info-wrapper']} id="drugWrapper" style={{zIndex:zIndex}}>
-                <h3 onMouseDown={this.setDragBox} id="drugTitle" className={style['drug-title']}>{drugInfo.title}说明书  <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/> </h3>
+                <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/>
+                <h3 onMouseDown={this.setDragBox} id="drugTitle" className={style['drug-title']}>{drugInfo.title}说明书  </h3>
                 { drugInfo && drugInfo.drugDesc.length > 0 && <div className={style['drug-desc-wrapper']} id='drugDesc' onScroll={this.handleScrollModal.bind(this,  drugInfo.drugDesc)}>
                     <div className={style['drug-title1']} >{drugInfo.title}说明书</div>
                     {drugInfo.drugDesc.map((item, index) =>{

+ 2 - 0
src/components/TreatDesc/DrugInfo/index.less

@@ -36,6 +36,8 @@
 .close-drug-desc {
     position: absolute;
     right: 0;
+    top: 0;
+    z-index: 9999;
     width: 40px;
 }
 .drug-desc-item {

+ 6 - 0
src/store/actions/treat.js

@@ -105,3 +105,9 @@ export const isFirstMainDiag = (state, action) => {
     res.isFirstMainDiag = false;
     return res;
 }
+//回读清除是否第一次主诊断
+export const clearFirstMainDiag = (state, action) => {
+    const res = Object.assign({}, state);
+    res.isFirstMainDiag = action.flag;
+    return res;
+}

+ 4 - 2
src/store/reducers/treat.js

@@ -1,5 +1,5 @@
-import { SELECT_DRUG, SET_TREAT_INFO, SET_OTHER_DRUG, SET_DRUG_INFO, CLEAR_DRUG_INFO,SHOW_TREAT, HIDE_TREAT, CLEAR_TREAT, SHOW_DRUG_INFO, HIDE_DRUG_INFO, SET_GENERAL_TREAT, SET_TREATMENT, SET_SURGERY_TREAT, SET_RECOMMEND_BASIC, SET_DRUG_INFO_LIST,IS_FIRST_MAIN_DIAG } from '../types/treat'
-import { selectDrug, setTreatInfo, setOtherDrug, setDrugInfo, clearDrugInfo, showTreat, hideTreat, clearTreat, showDrugInfo, hideDrugInfo, setTreatment, setGeneralTreat, setSurgeryTreat, setRecommendBasic, setDrugInfoList, isFirstMainDiag } from '../actions/treat'
+import { SELECT_DRUG, SET_TREAT_INFO, SET_OTHER_DRUG, SET_DRUG_INFO, CLEAR_DRUG_INFO,SHOW_TREAT, HIDE_TREAT, CLEAR_TREAT, SHOW_DRUG_INFO, HIDE_DRUG_INFO, SET_GENERAL_TREAT, SET_TREATMENT, SET_SURGERY_TREAT, SET_RECOMMEND_BASIC, SET_DRUG_INFO_LIST,IS_FIRST_MAIN_DIAG,CLEAR_FIRST_MAIN_DIAG } from '../types/treat'
+import { selectDrug, setTreatInfo, setOtherDrug, setDrugInfo, clearDrugInfo, showTreat, hideTreat, clearTreat, showDrugInfo, hideDrugInfo, setTreatment, setGeneralTreat, setSurgeryTreat, setRecommendBasic, setDrugInfoList, isFirstMainDiag,clearFirstMainDiag } from '../actions/treat'
 const initState = {
     show: false, //治疗方案显示隐藏
     showDrugInfo: false, //药品信息显示隐藏
@@ -200,6 +200,8 @@ export default function(state=initState, action){
             return setDrugInfoList(state, action);
         case IS_FIRST_MAIN_DIAG: 
             return isFirstMainDiag(state, action)
+        case CLEAR_FIRST_MAIN_DIAG: 
+            return clearFirstMainDiag(state, action)
         default:
             return state
     }

+ 1 - 0
src/store/types/treat.js

@@ -14,4 +14,5 @@ export const SET_RECOMMEND_BASIC = 'SET_RECOMMEND_BASIC'//设置其他推荐推
 export const SET_TREAT_INFO = 'SET_TREAT_INFO' //设置治疗方案信息(name,id等)
 export const SET_DRUG_INFO_LIST = 'SET_DRUG_INFO_LIST' //查询多个药品说明书(添加数据时查看药品说明用)
 export const IS_FIRST_MAIN_DIAG = 'IS_FIRST_MAIN_DIAG' //是否为主诊断第一次开单
+export const CLEAR_FIRST_MAIN_DIAG = 'CLEAR_FIRST_MAIN_DIAG' //回读清空是否为主诊断第一次开单
 

+ 23 - 1
src/utils/tools.js

@@ -8,6 +8,7 @@ import {clearAllLabel} from '@store/actions/inspect';
 import {CLEAR_ALL_DIAG} from '@store/types/diagnosticList';
 import {CLEAR_ALL_PUSH_MESSAGE, SET_TIPS} from '@store/types/pushMessage';
 import {ISREAD, SETREADDITEMS} from "../store/types/homePage";
+import {CLEAR_FIRST_MAIN_DIAG} from "../store/types/treat";
 import {tabChange} from '@store/actions/tabTemplate';
 import config from '@config/index.js';
 
@@ -187,7 +188,8 @@ const getAllDataList =(baseList) =>{           //获取所有模块结构化的
     jsonData.addItems = baseList.homePage.addItems||{};
     jsonData.mainsuitIds = baseList.mainSuit.mainIds;      //主诉去重
     jsonData.currentIds = baseList.currentIll.symptomIds;      //现病史去重
-    //console.log(jsonData,'结构化数据获取')
+    jsonData.isFirstMainDiag = baseList.treat.isFirstMainDiag;      //治疗方案
+    // console.log(jsonData,'结构化数据获取')
     return jsonData;
 }
 const getAllDataStringList =(baseList) =>{           //获取所有模块文本的数据
@@ -260,6 +262,10 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
             data:{},
             saveText:'',
         });
+        store.dispatch({
+          type:CLEAR_FIRST_MAIN_DIAG,
+          flag:true
+        });
         storageLocal.remove('emrParam');
        // Notify.success('页面已清空')
     }else{
@@ -325,6 +331,10 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                   type:SETREADDITEMS,
                   data:dataJson.addItems
                 });
+                store.dispatch({
+                  type:CLEAR_FIRST_MAIN_DIAG,
+                  flag:dataJson.isFirstMainDiag
+                });
               //tab跳回辅助信息
               store.dispatch(tabChange('0'));
             }else{    //结构化历史病历回读
@@ -389,6 +399,10 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                 type:SETREADDITEMS,
                 data:dataJson.addItems
               });
+              store.dispatch({
+                type:CLEAR_FIRST_MAIN_DIAG,
+                flag:dataJson.isFirstMainDiag
+              });
             }
         } else {
             if(type == 'template'){     //纯文本模板回读
@@ -438,6 +452,10 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                 type:SETREADDITEMS,
                 data:dataJson.addItems
               });
+              store.dispatch({
+                type:CLEAR_FIRST_MAIN_DIAG,
+                flag:dataJson.isFirstMainDiag
+              });
               //tab跳回辅助信息
               store.dispatch(tabChange('0'));
             }else{  //纯文本历史病历回读
@@ -493,6 +511,10 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                 type:SETREADDITEMS,
                 data:dataJson.addItems
               });
+              store.dispatch({
+                type:CLEAR_FIRST_MAIN_DIAG,
+                flag:dataJson.isFirstMainDiag
+              });
             }
         }
     }