Bläddra i källkod

取消主诉未填现病史不能填的限制

zhouna 5 år sedan
förälder
incheckning
f01ac0b258
2 ändrade filer med 5 tillägg och 15 borttagningar
  1. 1 1
      src/common/components/Textarea/index.jsx
  2. 4 14
      src/components/CurrentIll/index.jsx

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

@@ -37,7 +37,7 @@ class Textarea extends Component {
       });
     });
     //const {inpText} = this.state;console.log(inpText,boxMark,hasMain)
-    if(boxMark!='1'&&!hasMain&&!e.target.innerText){
+    if(boxMark!='1'&&boxMark!='2'&&!hasMain&&!e.target.innerText){
       //现病史、其他史无主诉且本身无内容是聚焦提示无法操作
       this.setState({
         editable:false

+ 4 - 14
src/components/CurrentIll/index.jsx

@@ -33,18 +33,18 @@ class CurrentIll extends Component{
   handleFocus(e){
     // 判断主诉是否为空
     const {mainData,mainText,setData,moduleNum,mainIds,mainTailIds,data,changeEditIll,editClear,symptomFeature,isChronic} = this.props;
-    const that = this;
+    //const that = this;
     const ev = e || window.event;
     const text = ev.target.innerText || ev.target.innerHTML;
-    let {setDataTimer} = this.state; 
-    let mainFinallyText = filterDataArr(mainText);
+    let {setDataTimer} = this.state;
+    /*let mainFinallyText = filterDataArr(mainText);
     if(!mainFinallyText && !text){
       //弹窗提醒
       Notify.error("无法操作,请先输入主诉");
       this.setState({
         forbidInput:true
       })
-    }else if(!text || (isIE() && text=='<br>')) {//现病史框里没有内容时才设置模板
+    }else */if(!text || (isIE() && text=='<br>')) {//现病史框里没有内容时才设置模板
       let num = moduleNum.num;//主诉使用了几个模板
       if(data.length==0 && !isChronic){
         clearTimeout(setDataTimer);
@@ -114,16 +114,6 @@ class CurrentIll extends Component{
       }
     } 
   }
-  //componentWillReceiveProps(nextProps){
-    /*const contHeightDiff =  nextProps.data&&this.props.data&&nextProps.data.length!==this.props.data.length;
-    const dataDiff = !!nextProps.data!==!!this.props.data;
-    if(contHeightDiff||dataDiff){*/     //走慢病否,现病史消失滚动才出现bug修改
-   /* if(this.props.data&&this.props.data.length>0){
-      return ;
-    }
-      this.context.scrollArea.refresh();*/
-    //}
-  //}
   render(){
     const {hasMain,readMode,fuzhen,isChronic,type,fetchPushInfos,handleInput,isRead,saveText,searchData,totalHide,editClear,data} = this.props;
     const {forbidInput,boxLeft,boxTop} = this.state;