Browse Source

第三种模式输入,其他史获取历史等

zhouna 5 years ago
parent
commit
59aae0ec30

+ 10 - 49
src/common/components/BlockInp/index.jsx

@@ -4,7 +4,7 @@ import Notify from '../Notify';
 import config from '@config/index';
 import {isIE,moveEnd} from '@utils/tools.js';
 import {getFeature} from '@store/async-actions/fetchModules';
-import {getAllDataList,getAllDataStringList,ifOtherClear} from "@utils/tools.js";
+import {getAllDataList,getAllDataStringList,ifOtherClear,setFontColorSize} from "@utils/tools.js";
 import store from '@store';
 import $ from "jquery";
 import {SET_CURRENT_MODULE} from '@types/homePage';
@@ -16,7 +16,6 @@ class BlockInp extends Component {
     this.state = {
       timer:null,
       inpText:'',
-      overFlag:false,
     };
     this.$dom = React.createRef();
     this.handleInput = this.handleInput.bind(this);
@@ -26,7 +25,7 @@ class BlockInp extends Component {
     this.handleBlur = this.handleBlur.bind(this);
   }
   handleFocus(e){            //初始显示props中的值,focus已经显示输入的值,避免值更新闪烁
-    const {handleFocus,fuzhen,handleInput,isChronic,hasMain,boxMark,title} = this.props;
+    const {handleFocus,boxMark,title} = this.props;
     const state = store.getState()
     const moduleName = state.homePage.moduleName
     //黏贴时去掉html格式
@@ -39,13 +38,8 @@ class BlockInp extends Component {
         moveEnd($(that.$dom.current)[0]);     //光标落到最后去
       });
     });
-    //const {inpText} = this.state;console.log(inpText,boxMark,hasMain)
-    handleFocus&&handleFocus();         //其他史、查体获取数据的方法
-    /*if(fuzhen&& !isChronic&&!(this.$dom.current.innerText?this.$dom.current.innerText:this.$dom.current.innerHTML)){
-      const text = config.currentText.replace("(**)",fuzhen.replace(";",''));
-      this.$dom.current.innerText?(this.$dom.current.innerText = text):(this.$dom.current.innerHTML = text);
-      handleInput&&handleInput({text});
-    }*/
+    handleFocus&&handleFocus();         //其他史获取上一次记录
+
     if(moduleName != title) {
       store.dispatch({
         type: SET_CURRENT_MODULE,
@@ -57,36 +51,15 @@ class BlockInp extends Component {
 
   }
   handleInput(e){
-    const {handleInput,boxMark,handlePush,value} = this.props;
-    const {inpText,overFlag} = this.state;
+    const {handleInput,handlePush,boxMark} = this.props;
     const text = e.target.innerText || e.target.innerHTML.replace(/&nbsp;+/g,' ').replace(/<br>$/,'');
     const stimer = this.state.timer;//console.log(e.target,text)
-    if(boxMark=='1'&&text.length>config.limited){           //主诉字符数限制
-      e.target.innerText?(e.target.innerText = text.substr(0,config.limited)):(e.target.innerHTML = text.substr(0,config.limited));
-      e.target.blur();
-      Notify.error(config.limitText);
-      if(overFlag){
-        e.target.innerText?(e.target.innerText = inpText):(e.target.innerHTML = inpText);
-        return
-      }
-      this.setState({
-        inpText:text.substr(0,config.limited),
-        overFlag:true
-      });
-      handleInput&&handleInput({text:text.substr(0,config.limited).replace('<br>','')});
-      return;
-    }
-    /*if(boxMark=='3'&&!hasMain){
-      e.target.innerText = '';
-      return;
-    }*/
     this.setState({
       inpText:text,
-      overFlag:false
     })
 
     //存值到store  FF26 会有一个<br>
-    handleInput&&handleInput({text:text.replace('<br>','')});
+    handleInput&&handleInput({text:text.replace('<br>',''),boxMark});
     //右侧推送--延时推送
     clearTimeout(stimer);
     let timer = setTimeout(function(){
@@ -97,29 +70,17 @@ class BlockInp extends Component {
       timer
     });
   }
-  //除主诉外 其他是否为空
-  ifClear(){
-    let baseList = store.getState();
-    let jsonData = getAllDataList(baseList);
-    let jsonStr = getAllDataStringList(baseList);
-    let flg = ifOtherClear(jsonData,jsonStr,baseList);
-    return flg;
-  }
   handleBlur(e){
     //解除绑定事件
     $(this.$dom.current).off("paste");
   }
   handleKeydown(e){
-    const {boxMark} = this.props;
     const ev = e||window.event;
-    if(+boxMark===1){
-      //禁止回车事件
-      if(ev.keyCode==13){return false;}
-    }
+    if(ev.keyCode==13){return false;}
   }
   componentWillReceiveProps(next){
     const isRead = this.props.isRead;
-    if(next.isRead != isRead||(next.value!=this.props.value&&next.value&&next.value.indexOf("复诊")!=-1)){    //value对比解决复诊不显示bug,复诊对比解决关标跳到前面bug
+    if(next.isRead != isRead){    //value对比解决复诊不显示bug,复诊对比解决关标跳到前面bug
       this.$dom.current.innerHTML = next.value||'';   //ff26下不支持innerText,但ref会自动加上innerText属性,所以上面的判断不为空
       this.setState({
         inpText:''
@@ -142,8 +103,8 @@ class BlockInp extends Component {
     const { title,boxMark } = this.props;
     return (
       <div className={style["box"]}>
-        <div className={style["title"]}>{title}</div>
-        <div className={style["content"]}
+        <div className={`${style["title"]} ${setFontColorSize(2,4)}`}>{title}</div>
+        <div className={`${style["content"]} ${setFontColorSize(2,5)}`}
              onFocus={this.handleFocus}
              ref={this.$dom}
              contentEditable={true}

+ 31 - 0
src/components/BlockEmrCont/CheckBody.jsx

@@ -0,0 +1,31 @@
+import React,{Component} from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import {connect} from "react-redux";
+
+class CheckBody extends Component{
+  constructor(props){
+    super(props)
+  }
+  render(){
+    const {value,isRead}=this.props;
+   return  <BlockInp title='查体' boxMark='4' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state){
+  const {checkBody} = state;
+  return {
+    value:checkBody.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch,store){
+  return {
+  }
+}
+
+const CheckBodyCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(CheckBody);
+
+export default CheckBodyCont;

+ 31 - 0
src/components/BlockEmrCont/CurrentIll.jsx

@@ -0,0 +1,31 @@
+import React,{Component} from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import {connect} from "react-redux";
+
+class CurrentIll extends Component{
+  constructor(props){
+    super(props)
+  }
+  render(){
+    const {value,isRead}=this.props;
+   return  <BlockInp title='现病史' boxMark='2' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state){
+  const {currentIll} = state;
+  return {
+    value:currentIll.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch,store){
+  return {
+  }
+}
+
+const CurrentIllCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(CurrentIll);
+
+export default CurrentIllCont;

+ 31 - 0
src/components/BlockEmrCont/MainSuit.jsx

@@ -0,0 +1,31 @@
+import React,{Component} from 'react';
+import {connect} from 'react-redux';
+import BlockInp from '@containers/BlockInpContainer';
+
+class MainSuit extends Component{
+  constructor(props){
+    super(props)
+  }
+  render(){
+    const {value,isRead}=this.props;
+   return  <BlockInp title='主诉' boxMark='1' value={value} isRead={isRead}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state){
+  const {mainSuit} = state;
+  return {
+    value:mainSuit.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch,store){
+  return {
+  }
+}
+
+const MainSuitCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(MainSuit);
+
+export default MainSuitCont;

+ 42 - 0
src/components/BlockEmrCont/OtherHistory.jsx

@@ -0,0 +1,42 @@
+import React,{Component} from 'react';
+import BlockInp from '@containers/BlockInpContainer';
+import {connect} from "react-redux";
+import {setOtherHisModule} from '@store/async-actions/fetchModules';
+
+class OtherHistory extends Component{
+  constructor(props){
+    super(props);
+    this.getRecord = this.getRecord.bind(this);
+  }
+  getRecord(){
+    //空白聚焦其他史时,获取上次记录
+    const {setInitData} = this.props;
+    setInitData();
+  }
+  render(){
+    const {value,isRead}=this.props;
+   return  <BlockInp title='其他史' boxMark='3' value={value} isRead={isRead} handleFocus={this.getRecord}></BlockInp>;
+  }
+}
+
+function mapStateToProps(state){
+  const {otherHistory} = state;
+  return {
+    value:otherHistory.saveText[0],
+  }
+}
+function mapDispatchToProps(dispatch,store){
+  return {
+    setInitData(){
+      //先获取最近记录,没有的话显示模板
+      dispatch(setOtherHisModule());
+    },
+  }
+}
+
+const OtherHistoryCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(OtherHistory);
+
+export default OtherHistoryCont;

+ 10 - 7
src/components/BlockEmrCont/index.jsx

@@ -7,7 +7,10 @@ import style from './index.less';
 import AdviceContainer from '../../containers/AdviceContainer';
 import InfoTitle from '@components/InfoTitle'
 import ScrollArea from 'react-scrollbar';
-import BlockInp from '@common/components/BlockInp';
+import MainSuit from './MainSuit';
+import CurrentIll from './CurrentIll';
+import OtherHistory from './OtherHistory';
+import CheckBody from './CheckBody';
 import {getWindowInnerHeight,getWindowInnerWidth,windowEventHandler} from '@utils/tools';
 
 class BlockEMRCont extends Component {
@@ -48,7 +51,7 @@ class BlockEMRCont extends Component {
       background:'#f1f1f1'};
     const barStyle={background:'#777',width:'100%',marginLeft:'0'};
     return <div className={style['EMR-container']}
-                ref={this.$cont} id="addScrollEvent">
+                ref={this.$cont} id="addBlockScrollEvent">
       <InfoTitle hideHistory={true}></InfoTitle>
       <ScrollArea speed={1}
                   horizontal={false}
@@ -56,11 +59,11 @@ class BlockEMRCont extends Component {
                   verticalContainerStyle={contStyle}
                   verticalScrollbarStyle={barStyle}
                   contentClassName="content">
-        <div className={style['inner']} id="EmrContainer" ref={this.$div}>
-          <BlockInp title='主诉' boxMark='1'></BlockInp>
-          <BlockInp title='现病史' boxMark='2'></BlockInp>
-          <BlockInp title='其他史' boxMark='3'></BlockInp>
-          <BlockInp title='查体' boxMark='4'></BlockInp>
+        <div className={style['inner']} id="EmrBlockContainer" ref={this.$div}>
+          <MainSuit></MainSuit>
+          <CurrentIll></CurrentIll>
+          <OtherHistory></OtherHistory>
+          <CheckBody></CheckBody>
           <Inspect setHighter={this.setHighter}></Inspect>
           <AssistCheck setHighter={this.setHighter}></AssistCheck>
           <Diagnosis setHighter={this.setHighter} hideChronic={true}></Diagnosis>

+ 5 - 3
src/components/Inspect/index.jsx

@@ -83,7 +83,7 @@ class Inspect extends React.Component {
       })
     }
     $('iframe').bind('load', function () { })
-    const { fetchPushInfos } = this.props;
+    const { fetchPushInfos,typeConfig } = this.props;
     // FileAPI.debug = true
     $.support.cors = true;
     const that = this;
@@ -106,6 +106,7 @@ class Inspect extends React.Component {
             const securityCode = getUrlArgObject("code");
             const appKeyId = getUrlArgObject("appI");
             const appKeySecret = getUrlArgObject("appS");
+            const productId = getUrlArgObject("productId");
             FileAPI.upload({
               // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
               url: api.upload,
@@ -114,7 +115,8 @@ class Inspect extends React.Component {
               headers: {
                 appKeyId: appKeyId,
                 appKeySecret: appKeySecret,
-                securityCode: securityCode
+                securityCode: securityCode,
+                productId: productId
               },
               complete: function (err, xhr) {
                 if (!err) {
@@ -133,7 +135,7 @@ class Inspect extends React.Component {
                     }
                     store.dispatch(getExcelList(res.data));
                     store.dispatch(getMRAnalyse());
-                    fetchPushInfos && fetchPushInfos();
+                    fetchPushInfos && fetchPushInfos({mode:typeConfig.typeConfig[0]});
                     if (message && message.length != 0) {
                       that.setState({
                         visible: true,

+ 1 - 1
src/config/index.js

@@ -1,6 +1,6 @@
 export default {
     defaultValue:{      //默认配置
-      0:0,     //0为半结构化模式,1为纯文本模式(主诉现病史其他史只自由文本输入)
+      0:2,     //0为智能模式,1为非智能模式(主诉现病史其他史只自由文本输入),2为自由模式(主诉到查体都是自由文本,右侧为嵌入页面推送)
       1:0,    //一般情况默认值,1开启,0关闭
       2:0,    //其他史默认值,1开启,0关闭
       3:0,    //字体大小:1增大,0标准

+ 45 - 0
src/containers/BlockInpContainer.js

@@ -0,0 +1,45 @@
+import React from 'react';
+import {connect} from 'react-redux';
+import {SETTEXTMODEVALUE} from '@store/types/mainSuit';
+import {SETCURRENTTEXTMODEVALUE} from '@store/types/currentIll';
+import {SETOTHERTEXTMODEVALUE} from '@store/types/otherHistory';
+import {SETCHECKTEXTMODEVALUE} from '@store/types/checkBody';
+import BlockInp from '@common/components/BlockInp';
+import {didPushParamChange,isAllPartClear} from '@utils/tools';
+import {embedPush} from '@store/async-actions/pushMessage';
+
+function mapStateToProps(state){
+  const {homePage} = state;
+  return {
+    isRead:homePage.isRead,
+  }
+}
+
+const actionsType={
+  '1':SETTEXTMODEVALUE,
+  '2':SETCURRENTTEXTMODEVALUE,
+  '3':SETOTHERTEXTMODEVALUE,
+  '4':SETCHECKTEXTMODEVALUE,
+};
+function mapDispatchToProps(dispatch,store){
+  return {
+    handleInput(obj){   //自由模式值保存
+      dispatch({
+        type:actionsType[obj.boxMark],
+        text:obj.text
+      })
+    },
+    handlePush(){
+      if(didPushParamChange()) {
+        dispatch(embedPush());
+      }
+    }
+  }
+}
+
+const BlockInpCont = connect(
+  mapStateToProps,
+  mapDispatchToProps
+)(BlockInp);
+
+export default BlockInpCont;

+ 2 - 2
src/containers/CurrentIll.js

@@ -1,7 +1,7 @@
 import React from 'react';
 import { connect } from 'react-redux';
 import CurrentIll from '@components/CurrentIll';
-import {INSERT_PROCESS,SET_CURRENT_DATA,SETTEXTMODEVALUE,SET_LABEL_MODULE,SELECT_SEARCHDATA,CLEAR_CURRENT_EDIT,SAVE_CURR_FREE} from '@store/types/currentIll';
+import {INSERT_PROCESS,SET_CURRENT_DATA,SETCURRENTTEXTMODEVALUE,SET_LABEL_MODULE,SELECT_SEARCHDATA,CLEAR_CURRENT_EDIT,SAVE_CURR_FREE} from '@store/types/currentIll';
 import {pushMessage} from '../store/async-actions/pushContainer';
 import {getModules} from '../store/async-actions/fetchModules.js';
 import {HIDE,RESET,CLICKCOUNT,ISREAD,SETDROPSHOW,HIDEDROP,SET_CURRENT_MODULE} from '@store/types/homePage';
@@ -107,7 +107,7 @@ function mapDispatchToProps(dispatch) {
         },
       handleInput(obj){    //文本模式值保存
         dispatch({
-          type:SETTEXTMODEVALUE,
+          type:SETCURRENTTEXTMODEVALUE,
           text:obj.text
         })
       },

+ 9 - 3
src/containers/Inspect.js

@@ -20,6 +20,7 @@ import {
 } from '@store/actions/inspect';
 import {
   billing,
+  embedPush,
   getConceptDetail,
   getMRAnalyse
 } from '@store/async-actions/pushMessage';
@@ -42,7 +43,7 @@ function mapStateToProps(state) {//console.log(state)
   }
 }
 
-function mapDispatchToProps(dispatch, store) {
+function mapDispatchToProps(dispatch) {
   return {
     setContext(obj){
       dispatch(setContext(obj))
@@ -85,9 +86,14 @@ function mapDispatchToProps(dispatch, store) {
       dispatch(setTip(idx,value))
     },
     //右侧推送
-    fetchPushInfos() {
+    fetchPushInfos(obj) {
+      const mode = obj.mode;
       //调右侧推送
-      dispatch(billing());
+      if(mode===2){
+        dispatch(embedPush());
+      }else{
+        dispatch(billing());
+      }
     },
     hideAllDrop(){
       dispatch({

+ 2 - 2
src/containers/OtherHistory.js

@@ -1,7 +1,7 @@
 import React from 'react';
 import {connect} from 'react-redux';
 import OtherHistory from "../components/OtherHistory";
-import {SETSELECTED,CLEARSELECTED,CONFIRMSELECTED,SELECTOTHERSEARCHDATA,SETDATA,SETTEXTMODEVALUE,OTHEREDICLEAR} from '@types/otherHistory';
+import {SETSELECTED,CLEARSELECTED,CONFIRMSELECTED,SELECTOTHERSEARCHDATA,SETDATA,SETOTHERTEXTMODEVALUE,OTHEREDICLEAR} from '@types/otherHistory';
 import {HIDE,RESET,ISREAD,HIDEDROP} from '@store/types/homePage';
 import {getModule,setOtherHisModule} from '@store/async-actions/fetchModules';
 import {billing} from '@store/async-actions/pushMessage';
@@ -69,7 +69,7 @@ function mapDispatchToProps(dispatch,store){
     },
     handleInput(obj){    //文本模式值保存
       dispatch({
-        type:SETTEXTMODEVALUE,
+        type:SETOTHERTEXTMODEVALUE,
         text:obj.text
       })
     },

+ 3 - 2
src/store/async-actions/fetchModules.js

@@ -207,14 +207,15 @@ export function setOtherHisModule(){
     const otherModel = initData.otherHisModel;
     const block = Object.assign(JSON.parse(config.textLabel),{full:true});
     const readMode = state.typeConfig.readMode;     //数据实际模式
-    const mode = readMode!==-1&&readMode!==null?readMode:state.typeConfig.mode;
+    const configMode=state.typeConfig.mode;
+    const mode = configMode!==2&&readMode!==-1&&readMode!==null?readMode:configMode;
     const model = otherModel&&otherModel.length>0?deepClone(otherModel):[block];     //其他史模板,没有模板数据则显示一个空文本标签
     const arr = deepClone(initData.otherHis);        //最近其他史数据
     const arrSave = deepClone(initData.otherHisSave);    //最近其他史saveText
     const isHis = initData.otherIsHis;     //是否是历史数据
     const onlyOneText = arr && arr.length == 1 && arr[0].tagType == 8 && !arr[0].value;    //是否只有一个空的自由文本标签
     //是历史数据且不为空则显示历史数据,否则显示模板
-    const listObj = isHis && (mode == 1 || (!onlyOneText && mode == 0)) ? {
+    const listObj = isHis && (mode === 1 ||mode === 2 || (!onlyOneText && mode === 0)) ? {
       newArr: arr,
       saveText: arrSave || []
     } : fullfillText(model,false,false,'3');

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

@@ -10,7 +10,8 @@ import { initItemList } from '@store/async-actions/tabTemplate';
 import config from '@config/index';
 import {Notify} from '@commonComp';
 import {SHOW_LOADING} from '@store/types/copyRight.js';
-import {getMRAnalyse} from '@store/async-actions/pushMessage';
+import {getMRAnalyse,embedPush} from '@store/async-actions/pushMessage';
+import {getOtherHisRecord} from '@store/async-actions/fetchModules';
 
 
 
@@ -240,6 +241,9 @@ export async function getPatientMessage(dispatch, getState){
   if(docMode!==2){
     dispatch(getInitModules);     //确保病人信息获取以后再获取模板等数据,否则参数为空
     dispatch(initHistoryDetails());      //历史病历回读
+  }else{
+    dispatch(embedPush({mode:1}));      //默认空白情况,刷新右侧
+    dispatch(getOtherHisRecord());          //获取其他史最近记录
   }
   //dispatch(getInitModules);     //确保病人信息获取以后再获取模板等数据,否则参数为空
   dispatch(getCommonList(5));     //获取常用化验标签列表

+ 5 - 80
src/store/async-actions/pushMessage.js

@@ -10,6 +10,8 @@ import dataLis from '@components/EmergencyProcedure/emergency';
 import  Notify from '@commonComp/Notify';
 import {pregetCheckbodyData} from '@store/async-actions/fetchModules';
 import {tabChange} from '@store/actions/tabTemplate';
+import store from '@store';
+import {SET_MR_INFO} from "../types/print";
 
 const api={
   getTableList:'/scale/getList', //获取量表列表
@@ -17,91 +19,14 @@ const api={
   getConceptDetail:'/conceptDetail/getConceptDetail', //获取静态提示信息
   getMRAnalyse: '/mrqc/analyse', //病历质控
   setMrInfo:'/api/data/mrv2/createMr',      //存页面信息,供页面推送模式调取
-}
-import store from '@store';
-import {SET_MR_INFO} from "../types/print";
-
+};
 
-export const embedPush = () => {      //内嵌页面推送时推送
+export const embedPush = (obj) => {      //内嵌页面推送时推送
   return (dispatch, getState) =>{
     //const state = getState();
     //console.log(state)
     const param = getEMRParams();
-    /*const param={
-      "hosCode": hospitalCode,
-      "age": patientAge,
-      "sex": sex,
-      "disType": 0,
-      "chief": mainData,
-      "allergy": "",
-      "diag": [
-        {
-          "dateValue": "",
-          "name": "",
-          "uniqueName": ""
-        }
-      ],
-      "diagOrder": [],
-      "diagString": "",
-      "diseaseName": {
-        "dateValue": "",
-        "name": "",
-        "uniqueName": ""
-      },
-      "drug": [
-        {
-          "dateValue": "",
-          "name": "",
-          "uniqueName": ""
-        }
-      ],
-      "drugOrder": [],
-      "drugString": "",
-      "family": "",
-      "infectious": "",
-      "lis": [
-        {
-          "dateValue": "",
-          "detailName": "",
-          "maxValue": 0,
-          "minValue": 0,
-          "name": "",
-          "otherValue": "",
-          "result": "",
-          "source": 0,
-          "uniqueName": "",
-          "units": "",
-          "value": 0
-        }
-      ],
-      "lisOrder": [],
-      "lisString": "",
-      "marital": "",
-      "marriage": "",
-      "menstrual": "",
-      "operation": "",
-      "operationOrder": [],
-      "other": "",
-      "otherOrder": [],
-      "pacs": [
-        {
-          "dateValue": "",
-          "desc": "",
-          "name": "",
-          "result": "",
-          "uniqueName": ""
-        }
-      ],
-      "pacsOrder": [],
-      "pacsString": "",
-      "pasts": "",
-      "personal": "",
-      "scaleName": "",
-      "symptom": "",
-      "unknown": "",
-      "vaccination": "",
-      "vital": ""
-    };*/
+    param.mode=obj?obj.mode:-1;
     json(api.setMrInfo,param,true).then((res)=>{
       const data = res.data;
       if(data.code==='0'){

+ 2 - 2
src/store/reducers/currentIll.js

@@ -1,6 +1,6 @@
 // 现病史
 import {RECOVER_TAG_CURRENT,SET_CURRENT,CURRENT_CONFIRM,INSERT_PROCESS,SET_CURRENT_DATA,SET_LABEL_MODULE,SETMAINCHECKBOX,
-  CURRENT_RADIO,CURRENT_NUMBER,CURRENT_TEXT_LABEL,CLEAR_CURRENT_ILL,SETTEXTMODEVALUE,CURRENT_GET_BIGDATAPUSH,CURRENT_CLEAR,
+  CURRENT_RADIO,CURRENT_NUMBER,CURRENT_TEXT_LABEL,CLEAR_CURRENT_ILL,SETCURRENTTEXTMODEVALUE,CURRENT_GET_BIGDATAPUSH,CURRENT_CLEAR,
   SET_CURRENT_SEARCH,SETCURRENTTEXT,CURRENT_FOCUS_INDEX,SELECT_SEARCHDATA,CLEAR_CURRENT_EDIT,CURRENTADDLABELITEM,
   SETCURRENTINPUT,DEL_CURRENT,REMOVE_CURR_ID,CURRENT_MUL,DEL_CURRENT_LABLE,SET_RADIO_INPUT_VALUE,CURRENT_CHRONIC,
   SAVE_CURR_FREE,SHOW_COMMON_ON_CURRENT,DELETE_CURRENT_SELECTED_TAGS} from '../types/currentIll';
@@ -37,7 +37,7 @@ export default function(state=initState,action){
       return insertProcess(state,action);
 	case CLEAR_CURRENT_ILL://清除现病史数据
       return clearCurrentIll(state,action);
-    case SETTEXTMODEVALUE:
+    case SETCURRENTTEXTMODEVALUE:
       return setTextModeValue(state,action);
     case SETMAINCHECKBOX://普通多选确定
       return setCheckBox(state,action);

+ 2 - 2
src/store/reducers/otherHistory.js

@@ -1,5 +1,5 @@
 import {RECOVER_TAG_OTHER,SETDATA,CONFIRMSELECTED,SETRADIO,SETNUMBER,SETOTHERCHECKBOX,SETOTHERTEXT,SETOTHERSEARCHDATA,
-  SELECTOTHERSEARCHDATA,CLEAROTHERHISTORY,CHANGEOTHERTEXTLABEL,SETOTHERINPUT,SETTEXTMODEVALUE,OTHER_FOCUS_INDEX,OTHERHIS_CLEAR,
+  SELECTOTHERSEARCHDATA,CLEAROTHERHISTORY,CHANGEOTHERTEXTLABEL,SETOTHERINPUT,SETOTHERTEXTMODEVALUE,OTHER_FOCUS_INDEX,OTHERHIS_CLEAR,
   OTHERADDLABELITEM,OTHEREDICLEAR,DEL_OTHERHIS,OTHERHIS_MUL,REMOVE_OTHER_ID,DEL_OTHERHIS_LABLE,SET_OT_RADIO_INPUT_VAL,DELETE_OTHER_SELECTED_TAGS} from '../types/otherHistory';
 import {confirm,setCheckBoxValue,setSearchData,insertLabelData,clearOtherHistory,
   changeTextLabel,setNumberValue,setTextModeValue,otherEditClear,backspaceText,multipleComfirn,
@@ -51,7 +51,7 @@ export default function(state=initState,action){//console.log(state)
       return changeTextLabel(state,action);
     case SETOTHERINPUT:
       return setInputLabel(state,action);
-    case SETTEXTMODEVALUE:
+    case SETOTHERTEXTMODEVALUE:
       return setTextModeValue(state,action);
     case OTHERADDLABELITEM:
       return addLabelItem(state,action);

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

@@ -22,3 +22,4 @@ export const PRESET = 'PRESET_CHECKBODY_DATA';
 export const RECOVER_TAG_CHECK = 'RECOVER_TAG_CHECK';     //恢复已删除标签
 export const DELETE_CHECK_SELECTED_TAGS='DELETE_CHECK_SELECTED_TAGS';
 export const REPUSH_CHECK_LABELS = 'REPUSH_CHECK_LABELS';   //重新获取查体
+export const SETCHECKTEXTMODEVALUE = 'SET_CHECK_TEXT_MODE_VALUE';  //文本模式下输入值

+ 1 - 1
src/store/types/currentIll.js

@@ -5,7 +5,7 @@ export const CURRENT_CONFIRM = 'CURRENT_CONFIRM' ;//多选展开确定事件
 export const INSERT_PROCESS = 'INSERT_PROCESS' ;//点击病程变化
 export const CLEAR_CURRENT_ILL = 'CLEAR_CURRENT_ILL' ;//清空
 export const SET_CURRENT_DATA = 'SET_CURRENT_DATA' ;//设置使用模板数据
-export const SETTEXTMODEVALUE = 'SET_CURRENT_TEXT_MODE_VALUE';  //文本模式下输入值
+export const SETCURRENTTEXTMODEVALUE = 'SET_CURRENT_TEXT_MODE_VALUE';  //文本模式下输入值
 export const SET_LABEL_MODULE = 'SET_LABEL_MODULE' ;//设置标签模板数据
 export const SETMAINCHECKBOX = 'SETMAINCHECKBOX' ;//普通多选确定事件
 export const CURRENT_NUMBER = 'CURRENT_NUMBER' ;//数字确定事件

+ 1 - 1
src/store/types/otherHistory.js

@@ -11,7 +11,7 @@ export const SELECTOTHERSEARCHDATA = 'select_other_search_data';
 export const CHANGEOTHERTEXTLABEL = 'edit_other_label_text';
 export const CLEAROTHERHISTORY = 'clear_other_history';
 export const SETOTHERINPUT = 'set_other_input_label_value';
-export const SETTEXTMODEVALUE = 'SET_OTHER_TEXT_MODE_VALUE';  //文本模式下输入值
+export const SETOTHERTEXTMODEVALUE = 'SET_OTHER_TEXT_MODE_VALUE';  //文本模式下输入值
 export const OTHER_FOCUS_INDEX = 'other_focus_text_index';
 export const OTHERHIS_CLEAR = 'OTHERHIS_CLEAR';  //清空搜索值
 export const OTHERADDLABELITEM = 'other_add_label_item';    //带加号的标签复制

+ 6 - 3
src/utils/tools.js

@@ -691,7 +691,7 @@ function getEMRParams(){
   const state = store.getState();
   const {message} = state.patInfo;
   const {mainSuit,currentIll,otherHistory,checkBody,inspect,assistCheck,diagnosticList} = state;
-  const diag = []
+  const diag = [];
   for(let i = 0; i < diagnosticList.diagnosticList.length; i++) {
     diag.push({"dateValue": "","name": "","uniqueName": diagnosticList.diagnosticList[i].name})
   }
@@ -699,6 +699,7 @@ function getEMRParams(){
     "hosCode": message.hospitalCode,
     "age": message.patientAge,
     "sex": message.sex,
+    "deptName":message.hospitalDeptName,
     "chief": filterDataArr(mainSuit.saveText)||'',
     "symptom": filterDataArr(currentIll.saveText)||'',
     "vital": filterDataArr(checkBody.saveText)||'',
@@ -1514,11 +1515,13 @@ function shiftLocalDelTag(){
 }
 //弹窗显示问题
 function setPosition (e,dom,setHighter){
+  const isBlock = store.getState().typeConfig.typeConfig[0]===2;    //自由模式
   setTimeout(()=>{
     const contHt =$(dom).height();
-    const wrapHt = $("#EmrContainer").height();//滚动区域高度
+    const $dom = isBlock?$("#EmrBlockContainer"):$("#EmrContainer");
+    const wrapHt = $dom.height();//滚动区域高度
     const clickHt = getPageCoordinate(e).boxTop;//点击高度
-    const scrollHt = Math.abs(parseFloat($("#EmrContainer").parent('.scrollarea-content').css('margin-top'))) //滚动区滚动的距离
+    const scrollHt = Math.abs(parseFloat($dom.parent('.scrollarea-content').css('margin-top'))) //滚动区滚动的距离
     let btmHt = wrapHt-(clickHt-111)-scrollHt;//点击位置距离底部的距离
     // console.log(wrapHt,clickHt,scrollHt,btmHt,contHt)
     if(btmHt<contHt){