luolei 5 éve
szülő
commit
c3fc617eea

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

@@ -1,5 +1,6 @@
 import React,{Component} from 'react';
 import style from './index.less';
+import store from '@store';
 import {isIE,handleEnter,setFontColorSize} from '@utils/tools.js';
 import $ from 'jquery';
 /***
@@ -38,7 +39,6 @@ class ItemBox extends Component {
       handleChange&&handleChange(e)
     }
   }
-
   componentDidMount(){
     const {setRef} = this.props;
     this.$div.current.innerHTML='';     //bug2276,FF26初始光标位置问题
@@ -49,6 +49,7 @@ class ItemBox extends Component {
       },this);
     }
   }
+  
 componentWillReceiveProps(nextP){
     if(nextP.children.length>1){
       const that = this;

+ 0 - 20
src/components/Advice/index.jsx

@@ -20,12 +20,6 @@ class Advice extends Component{
     this.handleAdviceInput = this.handleAdviceInput.bind(this);
   }
 
-  shouldComponentUpdate(next){
-    if(JSON.stringify(next) == JSON.stringify(this.props)){
-      return false;
-    }
-    return true;
-  }
   componentWillReceiveProps(next){
     const isRead = this.props.isRead;
     // if(next.isRead != isRead||next.value!=this.props.value){      //value对比解决复诊不显示bug
@@ -82,20 +76,6 @@ class Advice extends Component{
         })}
       </p>
     })
-    // let scheme = advice.scheme && advice.scheme.map((item, index) => {
-    //   return <p>{item.treatment.map((it,ii) =>{
-    //     return(it.treatmentStr && it.treatmentStr.length > 0 ? 
-    //       <div>
-    //         { it.treatmentStr }
-    //         {/* <input className={style['treat-input']} ref={this.treatInput} onInput={(e)=>{this.handleTreatInput(e, index, ii)}} type='text' value={ it.treatmentStr }/>  */}
-    //       </div>: '') 
-
-    //     // return <div>{it.drugs.length > 0 ? it.name : ''}: {it.drugs.map((drug, drugIndex) =>{
-    //     //   return(<span>{drug.selected ? (drugIndex === 0 ? drug.name : '  ' + drug.name) : ''}</span>)
-    //     // })}</div>
-    //   })}</p>
-    // })
-
     return  <div id="adviceBox" className={`${'mainsuit-box'} ${style['main-suit']}`}>
       <ItemBox title='医嘱' editable={false} border={true} marginTop="10px">
         <div className={`${style['billing']} ${setFontColorSize(2)}`}>

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

@@ -18,7 +18,6 @@ class Diagnosis extends Component {
     this.hideSearch = this.hideSearch.bind(this);
     this.handleshowSearch = this.handleshowSearch.bind(this);
     this.refreshScroller = this.refreshScroller.bind(this);
-
   }
   componentWillReceiveProps() {
     this.setState({

+ 2 - 1
src/containers/AdviceContainer.js

@@ -11,7 +11,8 @@ function mapStateToProps(state) {
         isFirstMainDiag:  state.treat.isFirstMainDiag,
         followUp: state.pushMessage.advice.followUp,
         hasFollowUp: state.pushMessage.advice.hasFollowUp,
-        typeConfig: state.typeConfig.mode
+        typeConfig: state.typeConfig.mode,
+        typeConfig: state.typeConfig
     })
 }
 

+ 1 - 0
src/containers/AssistCheck.js

@@ -28,6 +28,7 @@ function mapStateToProps(state) {//console.log(state)
         allCheck: state.assistCheck.allCheck,
         msgObj: state.assistCheck.msgObj,
         checkedListImport: state.assistCheck.checkedListImport,
+        typeConfig: state.typeConfig
     }
 }
 

+ 1 - 0
src/containers/CheckBody.js

@@ -23,6 +23,7 @@ function mapStateToProps(state){
     span:checkBody.span,
     searchInEnd:checkBody.searchInEnd,      //是否在搜索末尾插入结果
     importLabel:checkBody.importLabel,    //需高亮的标签id
+    typeConfig: state.typeConfig
   }
 }
 

+ 1 - 0
src/containers/ChronicInfo.js

@@ -29,6 +29,7 @@ function mapStateToProps(state){
     wholeScaleItems:assessResult.wholeScaleItems,     //全部量表中已加入病例的量表
     addedScaleIds:assessResult.addedScaleIds,      //已加入的量表id
     slideUp:pushMessage.slideUp,    //是否收起指标推送模块
+    typeConfig: state.typeConfig
   }
 }
 

+ 1 - 0
src/containers/CurrentIll.js

@@ -40,6 +40,7 @@ function mapStateToProps(state) {
         isChronic:mainSuit.chronicDesease?mainSuit.chronicDesease:diagnosticList.chronicMagItem,
         readMode:typeConfig.readMode,       //回读回来的模式(与当前模式并存)
         hasMain,      //是否有主诉
+        typeConfig: state.typeConfig
     }
 }
 

+ 2 - 1
src/containers/Diagnosis.js

@@ -6,7 +6,8 @@ import { SHOW_SEARCH,  HIDE_SEARCH } from '@store/types/diagnosticSearch';
 function mapStateToProps(state) {
     return {
         show: state.diagnosticSearch.show,
-        windowHeight:state.homePage.windowHeight
+        windowHeight:state.homePage.windowHeight,
+        typeConfig: state.typeConfig
     }
 }
 

+ 1 - 0
src/containers/Inspect.js

@@ -35,6 +35,7 @@ function mapStateToProps(state) {//console.log(state)
     inspectVal: state.inspect.inspectVal,
     message: state.patInfo.message,
     hospitalMsg: state.homePage.sysConfig || {},
+    typeConfig: state.typeConfig
   }
 }
 

+ 1 - 0
src/containers/MainSuit.js

@@ -40,6 +40,7 @@ function mapStateToProps(state) {
     items:state.historyTemplates.items,
     showHisBox:mainSuit.showHisBox,
     readMode:typeConfig.readMode,       //回读回来的模式(与当前模式并存)
+    typeConfig: state.typeConfig
   }
 }
 

+ 1 - 0
src/containers/OtherHistory.js

@@ -27,6 +27,7 @@ function mapStateToProps(state){
     editClear:otherHistory.editClear,       //编辑状态
     isRead:state.homePage.isRead,
     readMode:typeConfig.readMode,       //回读回来的模式(与当前模式并存)
+    typeConfig: state.typeConfig
   }
 }
 

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

@@ -2,7 +2,7 @@ import {json,expJson} from '@utils/ajax';
 import {SET,PRESET} from '@types/checkBody';
 import {SETDATA} from '@store/types/otherHistory';
 import store from '@store';
-import {getEMRParams,didPushParamChange,inspectAndAssist,fullfillText,checkFullfillText,deepClone,filterDataArr} from '@utils/tools';
+import {getEMRParams,didPushParamChange,inspectAndAssist,fullfillText,checkFullfillText,deepClone,filterDataArr,pushAllDataList} from '@utils/tools';
 import  Notify from '@commonComp/Notify';
 import {billing} from '@store/async-actions/pushMessage';
 import {SETOTHERHISTORY,ISREAD} from "../types/homePage";

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

@@ -2,7 +2,7 @@ import {get, post, json} from "../../utils/ajax";
 import {GET_PATIENT_MESSAGE,GET_HOSPITAL_MESSAGE} from "../types/patInfo";
 import {CONFIRM_TYPE} from "../types/typeConfig";
 import {getInfos} from '@store/actions/getInfoByUuid';
-import {getUrlArgObject,pushAllDataList,storageLocal} from '@utils/tools';
+import {getUrlArgObject,pushAllDataList,getAllDataList,storageLocal} from '@utils/tools';
 import {getInitModules,getCommonList} from '@store/async-actions/homePage.js';
 import store from '@store'
 import {ISREAD,MODI_LOADING,SETPRE,SETPREDATA} from "../types/homePage";

+ 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.121:5050';//后端接口访问地址
-// const host='http://192.168.2.236:5050';//后端接口访问地址
-const host='http://192.168.2.241:5050';//后端接口访问地址
+const host='http://192.168.2.236: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'; //周铁刚

+ 64 - 58
src/utils/tools.js

@@ -1337,69 +1337,75 @@ function setPosition (e,dom,setHighter){
  *      2体征颜色单独处理不需要设置
  */
 const setFontColorSize = (flg,pacs) => {
-  const classNameSelect = ['largeFontSize','middleFontSize','simpleFontSize','simpleLightColor','simpleColor','selectColor']
-  const state = store.getState();
-  let readConfig = state.typeConfig.readConfig
-  let mainType = readConfig==-1?state.typeConfig.typeConfig:readConfig;
-  let font = mainType[3],colour = mainType[4],classStr = '';
-  if(font == 1&&colour == 1){//字体加大颜色加深
-    if(flg == 2){
-      if(pacs == 1){
-        classStr = `largeFontSize pdright`
-      }else if(pacs == 2){
-        classStr = `largeFontSize widthChangeed`
-      }else if(pacs == 3){
-        classStr = `largeFontSize middleImg`
-      }else if(pacs == 4){
-        classStr = `largeFontSize titleWidth`
-      }else if(pacs == 5){
-        classStr = `largeFontSize specialSize`
+  // setTimeout(() => {
+    const classNameSelect = ['largeFontSize','middleFontSize','simpleFontSize','simpleLightColor','simpleColor','selectColor']
+    const state = store.getState();
+    let readConfig = state.typeConfig.readConfig
+    let mainType = readConfig==-1?state.typeConfig.typeConfig:readConfig;
+    setInterval(()=>{ 
+      readConfig = state.typeConfig.readConfig
+      mainType = readConfig==-1?state.typeConfig.typeConfig:readConfig;
+    },300)
+    let font = mainType[3],colour = mainType[4],classStr = '';
+    if(font == 1&&colour == 1){//字体加大颜色加深
+      if(flg == 2){
+        if(pacs == 1){
+          classStr = `largeFontSize pdright`
+        }else if(pacs == 2){
+          classStr = `largeFontSize widthChangeed`
+        }else if(pacs == 3){
+          classStr = `largeFontSize middleImg`
+        }else if(pacs == 4){
+          classStr = `largeFontSize titleWidth`
+        }else if(pacs == 5){
+          classStr = `largeFontSize specialSize`
+        }else{
+          classStr = `largeFontSize`
+        }
+      }else if(flg == 1){
+        classStr = `selectColor largeFontSize`
       }else{
-        classStr = `largeFontSize`
+        classStr = `selectColor largeFontSize`
       }
-    }else if(flg == 1){
-      classStr = `selectColor largeFontSize`
-    }else{
-      classStr = `selectColor largeFontSize`
-    }
-  }else if(font == 0&&colour == 1){//标准字体颜色加黑
-    if(flg == 2){
-      classStr = `simpleFontSize`
-    }else if(flg == 1){
-      classStr = `selectColor simpleFontSize`
-    }else{
-      classStr = `selectColor simpleFontSize`
-    }
-  }else if(font == 1&&colour == 0){//大字体标准颜色
-    if(flg == 2){
-      if(pacs == 1){
-        classStr = `largeFontSize pdright`
-      }else if(pacs == 2){
-        classStr = `largeFontSize widthChangeed`
-      }else if(pacs == 3){
-        classStr = `largeFontSize middleImg`
-      }else if(pacs == 4){
-        classStr = `largeFontSize titleWidth`
-      }else if(pacs == 5){
-        classStr = `largeFontSize specialSize`
+    }else if(font == 0&&colour == 1){//标准字体颜色加黑
+      if(flg == 2){
+        classStr = `simpleFontSize`
+      }else if(flg == 1){
+        classStr = `selectColor simpleFontSize`
       }else{
-        classStr = `largeFontSize`
+        classStr = `selectColor simpleFontSize`
+      }
+    }else if(font == 1&&colour == 0){//大字体标准颜色
+      if(flg == 2){
+        if(pacs == 1){
+          classStr = `largeFontSize pdright`
+        }else if(pacs == 2){
+          classStr = `largeFontSize widthChangeed`
+        }else if(pacs == 3){
+          classStr = `largeFontSize middleImg`
+        }else if(pacs == 4){
+          classStr = `largeFontSize titleWidth`
+        }else if(pacs == 5){
+          classStr = `largeFontSize specialSize`
+        }else{
+          classStr = `largeFontSize`
+        }
+      }else if(flg == 1){
+        classStr = `simpleLightColor largeFontSize`
+      }else{
+        classStr = `simpleColor largeFontSize`
+      }
+    }else{//都是标准的
+      if(flg == 2){
+        classStr = `simpleFontSize`
+      }else if(flg == 1){
+        classStr = `simpleLightColor simpleFontSize`
+      }else{
+        classStr = `simpleColor simpleFontSize`
       }
-    }else if(flg == 1){
-      classStr = `simpleLightColor largeFontSize`
-    }else{
-      classStr = `simpleColor largeFontSize`
-    }
-  }else{//都是标准的
-    if(flg == 2){
-      classStr = `simpleFontSize`
-    }else if(flg == 1){
-      classStr = `simpleLightColor simpleFontSize`
-    }else{
-      classStr = `simpleColor simpleFontSize`
     }
-  }
-  return classStr;
+    return classStr;
+  // }, 0);
 }
 module.exports = {
     getIds,