Просмотр исходного кода

Merge branch 'dev/new1' of http://192.168.2.236:10080/zhouna/newICSS into dev/new1

luolei 5 лет назад
Родитель
Сommit
1d001a546c

+ 1 - 1
src/common/components/Textarea/index.jsx

@@ -49,7 +49,7 @@ class Textarea extends Component {
 
   }
   handleInput(e){
-    const {handleInput,boxMark,handlePush} = this.props;
+    const {handleInput,boxMark,handlePush,value} = this.props;
     const {inpText,overFlag,editable} = this.state;
     const text = e.target.innerText || e.target.innerHTML;
     const stimer = this.state.timer;

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

@@ -38,7 +38,7 @@ class CurrentIll extends Component{
     const text = ev.target.innerText || ev.target.innerHTML;
     let {setDataTimer} = this.state; 
     let mainFinallyText = filterDataArr(mainText);
-    if(!mainFinallyText){
+    if(!mainFinallyText && !text){
       //弹窗提醒
       Notify.error("无法操作,请先输入主诉");
       this.setState({

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

@@ -128,10 +128,12 @@ class DiagnosticList extends Component {
         })
     }
     noReferRecord() {
-        const { hideReferRecord ,autoFillModules} = this.props;
+        const { hideReferRecord ,autoFillModules,refreshScroller} = this.props;
         hideReferRecord && hideReferRecord();
         autoFillModules&&autoFillModules();
-
+        setTimeout(function(){
+          refreshScroller()&&refreshScroller().scrollTop();
+        },100)
     }
     referCase() {//确定
         const { hideHistoryCaseModal, items ,autoFillModules,typeConfig} = this.props;

+ 8 - 4
src/components/MainSuit/index.jsx

@@ -71,7 +71,10 @@ class MainSuit extends Component{
         }) 
       }
     }else{
-      if(datas.length==0 && !innerText.trim()){
+      window.event.cancelBubble = true;
+      // IE 默认会有一个<br>
+      // if(datas.length==0 && !innerText.trim()){
+      if(datas.length==0 && innerText == '<br>'){
         getCommonSymptoms && getCommonSymptoms();
         this.setState({
           symptom:true
@@ -155,12 +158,13 @@ class MainSuit extends Component{
         ev.target.blur();
         return
       }
-      ev.target.innerText?(ev.target.innerText = data.substr(0,config.limited)):(ev.target.innerHTML = data.substr(0,config.limited));  //输入法内输入多个字再按enter的情况
       ev.target.blur();
-      
+      ev.target.innerText?(ev.target.innerText = data.substr(0,config.limited)):(ev.target.innerHTML = data.substr(0,config.limited));  //输入法内输入多个字再按enter的情况
+      // ev.target.blur();
       this.setState({
         inpText:data.substr(0,config.limited),
-        overFlag:true
+        overFlag:true,
+        symptom:false
       })
       return false;
     }

+ 5 - 0
src/components/PushItems/index.jsx

@@ -58,6 +58,7 @@ class PushItems extends Component {
 
   billing() {
     const { assay, check } = this.props.pushMessage;
+    const {EMRScrollCont} = this.props;
     const checkedAssay = assay.filter(item => item.checked);
     const checkedCheck = check.filter(item => item.checked);
     this.props.billing(checkedAssay, checkedCheck);
@@ -102,6 +103,10 @@ class PushItems extends Component {
       }
       store.dispatch(addAssistLabel(checkArr))
     }
+    //滚动到底部
+    setTimeout(function(){
+      EMRScrollCont&&EMRScrollCont.scrollBottom();
+    },100);
     /*if(checkedAssay.length > 0){
       document.getElementById("inspectResultData").scrollIntoView(true)
     }else{

+ 2 - 1
src/containers/PushItemsContainer.js

@@ -8,7 +8,7 @@ import { isAddMainSuit } from '@store/async-actions/diagnosticList';
 import { HIDEDROP } from '@store/types/homePage.js';
 
 function mapStateToProps(state) {//console.log(state)
-  const {pushMessage,diagnosticList} = state;
+  const {pushMessage,diagnosticList,inspect} = state;
         return {
         pushMessage: pushMessage,
         tipsDiscalimer:  state.copyRight.disContent,
@@ -20,6 +20,7 @@ function mapStateToProps(state) {//console.log(state)
         setPushEmergencyIdx: state.pushMessage.setPushEmergencyIdx || '',
         sysConfig:state.homePage.sysConfig,
         windowHeight:state.homePage.windowHeight,
+        EMRScrollCont:inspect.context.scrollArea,             //滚动条对象
     }
 }
 

+ 0 - 1
src/store/actions/typeConfig.js

@@ -19,6 +19,5 @@ export const confirmType=(state,action)=>{
 export const setReadMode=(state,action)=>{
   const res=Object.assign({},state);
   res.readMode = action.readMode;
-  res.typeConfig = action.typeConfig;
   return res;
 };

+ 7 - 4
src/store/reducers/mainSuit.js

@@ -110,10 +110,13 @@ export default function(state=initState,action){
     case RECOVER_TAG_MAIN:
       return recoveTag(state,action);
     case MAIN_REMOVE_SPAN:
-      res.data = [];
-      res.saveText = [];
-      res.mainIds = [];
-      res.editClear = true;
+      // 只剩最后一个空标签时才移除
+      if(res.data.length == 1){
+        res.data = [];
+        res.saveText = [];
+        res.mainIds = [];
+        res.editClear = true;
+      }
       return res;
     default:
       return state;

+ 2 - 2
src/utils/tools.js

@@ -240,7 +240,7 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
       const block = Object.assign(JSON.parse(config.textLabel),{full:true});//空白时保留一个自由文本标签
       //清除已删除标签记录
       localStorage.removeItem('deletedTags');
-      store.dispatch({type: SET_READ_MODE, readMode: -1,typeConfig:whichSign});      //清除回读模式值
+      store.dispatch({type: SET_READ_MODE, readMode: -1});      //清除回读模式值
       store.dispatch({type: CLEAR_MAIN_SUIT,data:[],saveText:[],selecteds:[],editClear:true,mainIds:[],mainTailIds:[],clearAction:true,symptomFeature:[],chronicDesease:null,mainReadSonM:[]});
         store.dispatch({type: CLEAR_CURRENT_ILL,data:[],saveText:[],selecteds:[],editClear:true,symptomIds:[],currReadSonM:[]});
         store.dispatch({type: CLEAROTHERHISTORY,data:[block],isEmpty:true,saveText:[],selecteds:[],editClear:true,yjs_1:'',yjs_2:'',yjs_3:'',yjs_4:''});
@@ -290,7 +290,7 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
        // Notify.success('页面已清空')
     }else{
         //回读/引用设置回读模式值(主诉-其他史使用)
-        store.dispatch({type: SET_READ_MODE, readMode: whichSign,typeConfig:whichSign});
+        store.dispatch({type: SET_READ_MODE, readMode: whichSign});
         if (whichSign == 0) {
           let dataJson = JSON.parse(reData.dataJson);
           //其他史data