소스 검색

Merge remote-tracking branch 'origin/ChronicMag' into ChronicMag

zhouna 6 년 전
부모
커밋
c854616202

+ 1 - 0
src/common/components/ConfirmModal/index.less

@@ -27,6 +27,7 @@
     right: 0px;
     width: 40px;
     height: 40px;
+    cursor: pointer;
 }
 
 .modal-content {

+ 18 - 0
src/common/less/variables.less

@@ -194,3 +194,21 @@
   -ms-user-select: none;
   user-select: none;
 }
+// 加入病历
+.add-record{
+  float: right;
+  cursor: pointer;
+  display: inline-block;
+  width: 99px;
+  height: 26px;
+  line-height: 26px;
+  text-align: center;
+  border: 1px solid #EAEDF1;
+  border-radius: 4px;
+  font-size: 12px;
+  img{
+    vertical-align: middle;
+    width: 12px;
+    margin:-3px 3px 0 0;
+  }
+}

+ 9 - 6
src/components/ChronicInfo/index.jsx

@@ -485,15 +485,18 @@ class ChronicInfo extends React.Component{
               <div className={style["content"]}> 
                   {this.getDetail()}
               </div>
-              <ConfirmModal visible={showHide&&showHide.showList} noFooter='true' title='全部量表' close={this.close} titleBg="#DFEAFE" icon={allTableIcon} height={400} width={400}>
+              <ConfirmModal visible={showHide&&showHide.showList} noFooter='true' title='全部量表' close={this.close} titleBg="#DFEAFE" icon={allTableIcon} height={450} width={450}>
                       <ul className={style['toast-cont']}>
                         {tableList&&tableList.map((v,i)=>{
                           return <li>
-                          <span>
-                            <i onClick={this.handleListClick.bind(this,v)}>{'【'+v.name+'】'}</i>
-                            {/*{formulaResult&&formulaResult[v.id]?<i>{'结果:'+formulaResult[v.id].text}</i>:''}*/}
-                            {formulaResult&&formulaResult[v.id]?<i className={style['res']}>{'结果:'}{formulaResult[v.id].calcalculate&&formulaResult[v.id].calcalculate.result.value+' '+ (formulaResult[v.id].calcalculate.result.text?formulaResult[v.id].calcalculate.result.text:'')}</i>:''}
-                          </span>
+                            <span className={style["scaleName"]}>
+                              <i onClick={this.handleListClick.bind(this,v)}>{'【'+v.name+'】'}</i>
+                              {formulaResult&&formulaResult[v.id]?<i className={style['res']}>{'结果:'}{formulaResult[v.id].calcalculate&&formulaResult[v.id].calcalculate.result.value+' '+ (formulaResult[v.id].calcalculate.result.text?formulaResult[v.id].calcalculate.result.text:'')}</i>:''}
+                            </span>
+                            <span className={style["listResult"]} onClick={()=>this.handleAddAssessItem(v,i,j)}>
+                              <img src={add} />
+                              加入病历记录
+                            </span>
                           </li>
                         })}
                       </ul>

+ 15 - 22
src/components/ChronicInfo/index.less

@@ -1,3 +1,4 @@
+@import "~@less/variables.less";
 .tips{
   border:1px solid #EAEDF1;
   .tips-title,h1{
@@ -72,23 +73,9 @@
           display: inline-block;
           width: 73%;
         }
-        .listResult,.addResult{
-          float: right;
-          cursor: pointer;
-          display: inline-block;
-          width: 99px;
-          height: 26px;
-          line-height: 26px;
-          text-align: center;
-          border: 1px solid #EAEDF1;
-          border-radius: 4px;
-          font-size: 12px;
-          img{
-            vertical-align: middle;
-            width: 12px;
-            margin:-3px 3px 0 0;
-          }
-        }
+         .listResult,.addResult{
+          .add-record;
+        } 
         .addResult{
           color: #3B9ED0;
           text-align: left;
@@ -137,7 +124,7 @@
         color:#3B9ED0;
         cursor: pointer;
       }
-      .mainList{
+      /* .mainList{
         .listBtn{
           display: inline-block;
           width: 96px;
@@ -174,7 +161,7 @@
             }
           }
         }
-      }
+      } */
       .infoOption{
         padding: 20px 0;
       }
@@ -209,10 +196,9 @@
     .toast-cont{
       line-height: 24px;
       font-size: 14px;
-      // margin-top: 15px;
-      height: 325px;
+      height: 370px;
       overflow-y: auto;
-      padding: 10px 0 0 10px;
+      padding: 10px;
       li{
         margin-top: 10px;
         cursor: pointer;
@@ -221,6 +207,13 @@
         color:#3B9ED0;
         margin-left: 10px;
       }
+      .scaleName{
+        display: inline-block;
+        max-width: 290px;
+      }
+      .listResult{
+        .add-record;
+      }
     }
     .footer{
       .print{

+ 9 - 12
src/components/Treat/AdverseReactions/index.jsx

@@ -19,9 +19,6 @@ class AdverseReactions extends Component {
         this.props.changeReact(it, index);
     }
     handleMouseEnterDrug(index, item) {
-        const drugNameWidth = parseInt($('#'+item.id)[0].offsetWidth)
-        const imgLeft = drugNameWidth/2-8
-        $('#'+item.id).find('img').css('left', imgLeft)
         this.setState({
             currentIndex: index,
         })
@@ -61,19 +58,19 @@ class AdverseReactions extends Component {
                     <span className={style['last-treat-name-box']}
                         
                     >   
-                        <span   id={item.id} 
+                        <span   
                                 className={style['last-treat-big-name-box']} 
                                 onMouseEnter={this.handleMouseEnterDrug.bind(this, index, item)}
                                 onMouseLeave = {this.handleMouseLeaveDrug}
                         >
-                            {item.tagName}:
-                            {<img className={style['info-img']}  
-                                style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
-                                src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
-                                onMouseEnter={this.handleMouseEnterImg.bind(this)}
-                                onMouseLeave = {this.handleMouseLeaveImg}
-                                onClick={() =>{this.setDrugInfo(item);showDrugInfo();}}/>}
-                        
+                            <span className={style['last-treat-big-name']} >{item.tagName}:
+                                {<img className={style['info-img']}  
+                                    style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
+                                    src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
+                                    onMouseEnter={this.handleMouseEnterImg.bind(this)}
+                                    onMouseLeave = {this.handleMouseLeaveImg}
+                                    onClick={() =>{this.setDrugInfo(item);showDrugInfo();}}/>}
+                            </span>
                         </span>
                         
                     </span>

+ 6 - 2
src/components/Treat/AdverseReactions/index.less

@@ -35,11 +35,15 @@
 .info-img {
     position: absolute;
     width: 15px;
-    position: absolute;
-    top: -8px;
+    top: -15px;
+    left: 50%;
+    margin-left: -8px;
 }
 .last-treat-big-name-box {
     display: inline-block;
     
 }
+.last-treat-big-name {
+    position: relative;
+}
 

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

@@ -28,9 +28,6 @@ class DrugTreat extends Component {
         selectDrug && selectDrug(index,ii);
     }
     handleMouseEnterDrug(ii, index, it) {
-        const drugNameWidth = parseInt($('#'+it.medicitionName)[0].offsetWidth)
-        const imgLeft = drugNameWidth/2-10
-        $('#'+it.medicitionName).find('img').css('left', imgLeft)
         this.setState({
             currentIndex: index,
             currentImg: ii
@@ -99,7 +96,6 @@ class DrugTreat extends Component {
                                         {ii === 0 ? '' : ', '}
                                         <span onMouseEnter={this.handleMouseEnterDrug.bind(this, ii , index, it)}
                                               onMouseLeave = {this.handleMouseLeaveDrug}
-                                              id={it.medicitionName}
                                               className={style['drug-name-wrapper']} 
                                         >
                                             <span className={style['drug-name']}  

+ 2 - 0
src/components/Treat/DrugTreat/index.less

@@ -35,6 +35,8 @@
     width: 15px;
     position: absolute;
     top: -15px;
+    left: 50%;
+    margin-left: -7px;
 }
 .info-flag {
     display: inline-block;

BIN
src/components/TreatDesc/img/packUp.png


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

@@ -6,7 +6,7 @@ import info from './img/info.png';
 import info1 from './img/info1.png';
 import info2 from './img/info2.png';
 import info3 from './img/info3.png';
-
+import packUp from './img/packUp.png';
 
 class TreatDesc extends Component {
     constructor(props){
@@ -78,7 +78,7 @@ class TreatDesc extends Component {
                     
                 </div> } */}
                 { otherDrugIndex > -1 && <div  className={style['similar-drug']}>
-                    <h3 className={style['drug-desc-title']}><span className={style['drug-desc-class-title']} title={'同类药物(' + treatment[otherDrugIndex].drugsName + ')'}>同类药物({treatment[otherDrugIndex].bigdrugsName})</span>  <img src={close} onClick={this.hideTreatDesc} className={style['close-drug-desc']} /></h3>
+                    <h3 className={style['drug-desc-title']}><span className={style['drug-desc-class-title']} title={'同类药物(' + treatment[otherDrugIndex].drugsName + ')'}>同类药物({treatment[otherDrugIndex].bigdrugsName})</span>  <img src={packUp} onClick={this.hideTreatDesc} className={style['close-drug-desc']} /></h3>
                     {treatment[otherDrugIndex].medicitionsList.map((item, index) =>{
                         return (<span >
                         {index === 0 ? '' : ', '}     

+ 24 - 25
src/containers/CurrentIll.js

@@ -13,36 +13,35 @@ import {didPushParamChange} from '@utils/tools.js';
 
 
 function mapStateToProps(state) { //console.log(111,state);
-  const {homePage} = state;
+  const {homePage,currentIll,mainSuit,diagnosticList} = state;
     return {
-        data:state.currentIll.data,//主诉模板
-        emptyData:state.currentIll.emptyData,//空模板
-        searchData:state.currentIll.searchDatas,//搜索结果
-        focusIndex:state.currentIll.focusIndex,
-        processModule:state.currentIll.processModule,//病程变化模板
+        data:currentIll.data,//主诉模板
+        emptyData:currentIll.emptyData,//空模板
+        searchData:currentIll.searchDatas,//搜索结果
+        focusIndex:currentIll.focusIndex,
+        processModule:currentIll.processModule,//病程变化模板
         showArr:homePage.showDrop,
-        span:state.currentIll.span,
-        update:state.currentIll.update,//用于更新
-        mainText:state.mainSuit.saveText,//主诉选中的数据
-        mainData:state.mainSuit.data,//主诉使用的模板
-        symptomFeature:state.mainSuit.symptomFeature,//主诉分词数据
-        moduleNum:state.mainSuit.moduleNum,//主诉使用的模板
+        span:currentIll.span,
+        update:currentIll.update,//用于更新
+        mainText:mainSuit.saveText,//主诉选中的数据
+        mainData:mainSuit.data,//主诉使用的模板
+        symptomFeature:mainSuit.symptomFeature,//主诉分词数据
+        moduleNum:mainSuit.moduleNum,//主诉使用的模板
         type: state.typeConfig.typeConfig,
-        mainIds:state.mainSuit.mainIds,//主诉症状选中的id(去重用)
-        fillInfo: state.fillInfo,
+        mainIds:mainSuit.mainIds,//主诉症状选中的id(去重用)
         showArr:homePage.showDrop,
         totalHide: homePage.totalHide,
-        saveText:state.currentIll.saveText,
-        selecteds:state.currentIll.selecteds,       //普通多选选中状态
-        editClear:state.currentIll.editClear,
-        symptomIds:state.currentIll.symptomIds,//症状id,去重用
-        isRead:state.homePage.isRead,
-        fuzhen:state.diagnosticList.mainSuitStr,//诊断第一个复诊值
-        boxTop:state.homePage.boxTop,
-        boxLeft:state.homePage.boxLeft,
-        allModules:state.homePage.allModules,
-        // isChronic:!!state.diagnosticList.chronicMagItem,
-        isChronic:state.mainSuit.chronicDesease,
+        saveText:currentIll.saveText,
+        selecteds:currentIll.selecteds,       //普通多选选中状态
+        editClear:currentIll.editClear,
+        symptomIds:currentIll.symptomIds,//症状id,去重用
+        isRead:homePage.isRead,
+        fuzhen:diagnosticList.mainSuitStr,//诊断第一个复诊值
+        boxTop:homePage.boxTop,
+        boxLeft:homePage.boxLeft,
+        allModules:homePage.allModules,
+        // isChronic:!!diagnosticList.chronicMagItem,
+        isChronic:mainSuit.chronicDesease&&mainSuit.chronicDesease.name?mainSuit.chronicDesease:diagnosticList.chronicMagItem,
 
     }
 }

+ 8 - 6
src/containers/DiagnosticList.js

@@ -13,15 +13,17 @@ import { initItemList } from '@store/async-actions/historyTemplates';
 import {MODI_LOADING} from '@store/types/homePage.js';
 
 function mapStateToProps(state) {
+    const {diagnosticList} = state;
+    let diagnC = diagnosticList.chronicMagItem;
     return {
-        list: state.diagnosticList.diagnosticList,
+        list: diagnosticList.diagnosticList,
         treatment: state.treat.show,
-        isFirst: state.diagnosticList.isFirst,
-        diagnosticStr: state.diagnosticList.diagnosticStr,
-        showReferRecord: state.diagnosticList.showReferRecord,
-        showHistoryCase: state.diagnosticList.showHistoryCase,
+        isFirst: diagnosticList.isFirst,
+        diagnosticStr: diagnosticList.diagnosticStr,
+        showReferRecord: diagnosticList.showReferRecord,
+        showHistoryCase: diagnosticList.showHistoryCase,
         items:state.historyTemplates.items,
-        chronicMagItem: state.diagnosticList.chronicMagItem,
+        chronicMagItem: diagnC&&diagnC.name?diagnC:state.mainSuit.chronicDesease,
         typeConfig: state.typeConfig.typeConfig,
     }
 }

+ 23 - 23
src/containers/MainSuit.js

@@ -17,33 +17,33 @@ import {SET} from '@types/checkBody';
 import {SHOW_REFER_RECORD} from '@store/types/diagnosticList';
 
 function mapStateToProps(state) {//console.log(11,state);
+  const {mainSuit,homePage,diagnosticList} = state;
   return {
-    showDrop:state.mainSuit.showDrop,//用于更新
-    update:state.mainSuit.update,
-    CommonSymptoms:state.mainSuit.CommonSymptoms,//常见症状
-    datas:state.mainSuit.data,//数据源
-    selecteds:state.mainSuit.selecteds,//数据源
-    saveText:state.mainSuit.saveText,
-	  searchData:state.mainSuit.searchDatas,//搜索结果
+    showDrop:mainSuit.showDrop,//用于更新
+    update:mainSuit.update,
+    CommonSymptoms:mainSuit.CommonSymptoms,//常见症状
+    datas:mainSuit.data,//数据源
+    selecteds:mainSuit.selecteds,//数据源
+    saveText:mainSuit.saveText,
+	  searchData:mainSuit.searchDatas,//搜索结果
     type: state.typeConfig.typeConfig,
-    fillInfo: state.fillInfo,
-    showArr:state.homePage.showDrop,
-    totalHide:state.homePage.totalHide,
-    focusIndex:state.mainSuit.focusIndex,
-    fuzhen:state.diagnosticList.mainSuitStr,//诊断第一个复诊值
-    span:state.mainSuit.span,
-    editClear:state.mainSuit.editClear,
-    clearAction:state.mainSuit.clearAction,//清除
-    mainIds:state.mainSuit.mainIds,//选中症状的id,搜索去重用
-    isRead:state.homePage.isRead,
-    commSymHide:state.homePage.commSymHide,
-    boxTop:state.homePage.boxTop,
-    boxLeft:state.homePage.boxLeft,
+    showArr:homePage.showDrop,
+    totalHide:homePage.totalHide,
+    focusIndex:mainSuit.focusIndex,
+    fuzhen:diagnosticList.mainSuitStr,//诊断第一个复诊值
+    span:mainSuit.span,
+    editClear:mainSuit.editClear,
+    clearAction:mainSuit.clearAction,//清除
+    mainIds:mainSuit.mainIds,//选中症状的id,搜索去重用
+    isRead:homePage.isRead,
+    commSymHide:homePage.commSymHide,
+    boxTop:homePage.boxTop,
+    boxLeft:homePage.boxLeft,
     currentData:state.currentIll.data,
-    allModules:state.homePage.allModules,
-    chronicDesease:state.mainSuit.chronicDesease,
+    allModules:homePage.allModules,
+    chronicDesease:mainSuit.chronicDesease&&mainSuit.chronicDesease.name?mainSuit.chronicDesease:diagnosticList.chronicMagItem,
     items:state.historyTemplates.items,
-    showHisBox:state.mainSuit.showHisBox,
+    showHisBox:mainSuit.showHisBox,
   }
 }
 

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

@@ -11,7 +11,21 @@ export const hideTreat = (state, action) => {
     return res
 }
 
+//关闭弹窗时清除部分治疗方案
 export const clearTreat = (state, action) => {
+    const res = Object.assign({}, state);
+    res.generalTreat = '';
+    res.surgeryTreat = '';
+    res.drugHistory = {};
+    res.treatment = [];
+    res.adversReactionList=[];
+    res.hasFollowUp = false;
+    res.followUp = '';
+    return res
+}
+
+//清除全部治疗方案
+export const clearAllTreat = (state, action) => {
     const res = Object.assign({}, state);
     res.generalTreat = '';
     res.surgeryTreat = '';
@@ -21,9 +35,12 @@ export const clearTreat = (state, action) => {
     res.hasFollowUp = false;
     res.followUp = '';
     res.followUpList = [];
+    res.adversReactionList = [];
+    res.allAdversReactionList = [];
     return res
 }
 
+
 export const setTreatment = (state, action) => {
     const res = Object.assign({}, state);
     res.treatment = action.treatment;

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

@@ -62,7 +62,7 @@ export const initHistoryDetails = (dispatch) => {
                 dispatch({type:MODI_LOADING,flag:false});
             } else {
                 dispatch({type:MODI_LOADING,flag:false});
-                console.log(res)
+                // console.log(res)
             }
         })
     }

+ 0 - 1
src/store/async-actions/treat.js

@@ -390,7 +390,6 @@ export const commonTreatAddToAdvice = () => {
                 type: SET_COMMONTREATMENT,
                 commontreatment: state.treat.treatItem.treat.commonTreatment.text
             })
-            console.log('state.treat.followUp', state.treat.followUp)
             dispatch({
                 type: SAVE_FOLLOW_UP,
                 followUp: state.treat.followUp

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

@@ -1,5 +1,12 @@
-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 ,SET_ADVERSE_REACTIONS, SET_ALL_ADVERSE_REACTIONS,CHANGE_REACT, DEL_REACT, SET_FOLLOW_UP, DEL_FOLLOW_UP, SET_ALL_FOLLOW_UP } from '../types/treat'
-import { selectDrug, setTreatInfo, setOtherDrug, setDrugInfo, clearDrugInfo, showTreat, hideTreat, clearTreat, showDrugInfo, hideDrugInfo, setTreatment, setGeneralTreat, setSurgeryTreat, setRecommendBasic, setDrugInfoList, isFirstMainDiag, clearFirstMainDiag, setAdverseReactions, setALLAdverseReactions, changeReact ,delReact, setFollwUp, delFollowUp, setAllFollowUp } 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 ,
+        SET_ADVERSE_REACTIONS, SET_ALL_ADVERSE_REACTIONS,CHANGE_REACT, DEL_REACT, SET_FOLLOW_UP, 
+        DEL_FOLLOW_UP, SET_ALL_FOLLOW_UP, CLEAR_ALL_TREAT } from '../types/treat'
+import { selectDrug, setTreatInfo, setOtherDrug, setDrugInfo, clearDrugInfo, showTreat, hideTreat, 
+        clearTreat, showDrugInfo, hideDrugInfo, setTreatment, setGeneralTreat, setSurgeryTreat, 
+        setRecommendBasic, setDrugInfoList, isFirstMainDiag, clearFirstMainDiag, setAdverseReactions, 
+        setALLAdverseReactions, changeReact ,delReact, setFollwUp, delFollowUp, setAllFollowUp, clearAllTreat } from '../actions/treat'
 const initState = {
     show: false, //治疗方案显示隐藏
     showDrugInfo: false, //药品信息显示隐藏
@@ -319,6 +326,8 @@ export default function(state=initState, action){
             return delFollowUp(state, action);
         case SET_ALL_FOLLOW_UP: 
             return setAllFollowUp(state, action);
+        case CLEAR_ALL_TREAT: 
+            return clearAllTreat(state, action);
         default:
             return state
     }

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

@@ -4,7 +4,8 @@ export const SET_DRUG_INFO = 'SET_DRUG_INFO'; //设置药品说明
 export const CLEAR_DRUG_INFO = 'CLEAR_DRUG_INFO'; //清除药品说明
 export const SHOW_TREAT = 'SHOW_TREAT';
 export const HIDE_TREAT = 'HIDE_TREAT';
-export const CLEAR_TREAT = 'CLEAR_TREAT'; //清除治疗方案内容
+export const CLEAR_TREAT = 'CLEAR_TREAT'; //关闭时清除推送过来治疗方案内容
+export const CLEAR_ALL_TREAT = 'CLEAR_ALL_TREAT'; //关闭时清除推送过来治疗方案内容
 export const SHOW_DRUG_INFO = 'SHOW_DRUG_INFO';
 export const HIDE_DRUG_INFO = 'HIDE_DRUG_INFO';
 export const SET_GENERAL_TREAT = 'SET_GENERAL_TREAT'; //设置一般治疗

+ 4 - 1
src/utils/tools.js

@@ -8,7 +8,7 @@ import {clearAllLabel,addLabel} 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 {CLEAR_FIRST_MAIN_DIAG, CLEAR_ALL_TREAT} from "../store/types/treat";
 import {tabChange} from '@store/actions/tabTemplate';
 import config from '@config/index.js';
 
@@ -269,6 +269,9 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
           type:CLEAR_FIRST_MAIN_DIAG,
           flag:true
         });
+        store.dispatch({
+          type: CLEAR_ALL_TREAT,
+        })
         storageLocal.remove('emrParam');
        // Notify.success('页面已清空')
     }else{