فهرست منبع

医嘱时间修改bug

luolei 4 سال پیش
والد
کامیت
b84459b221

+ 0 - 1
src/components/AddAssistCheck/Textarea/index.jsx

@@ -96,7 +96,6 @@ class Textarea extends Component {
   }
   handleFocus(){     //ie8下提示语挡住输入框,导致输入框无法聚焦
     this.textInput.current.previousSibling.focus();
-    console.log(111111111111, this.textInput.current);
     store.dispatch(embedPush({
       action: "pacs",
       mode: 1

+ 2 - 2
src/components/AddNewInspect/SlideIpt/index.jsx

@@ -20,9 +20,9 @@ class SlideIpt extends Component {
     const {item} = this.props
     this.setState({value:item.time})
   }
-  handleInput(e,item,sign){
+  handleInput(e,item,sign,idx){
     const {setTipValue,handlePush} = this.props;
-    setTipValue(item,e.target.value,sign)
+    setTipValue(item,e.target.value,sign,idx)
     //右侧推送--延时推送
     const stimer = this.state.timer;
     clearTimeout(stimer);

+ 2 - 2
src/components/AddNewInspect/SlidePic/index.jsx

@@ -59,10 +59,10 @@ class SlidePic extends Component {
       activeName:''
     })
   }
-  handleInput(e,item,sign){
+  handleInput(e,item,sign,tip){
     e.stopPropagation();
     const {setTipValue,handlePush} = this.props
-    setTipValue(item,e.target.value,sign)
+    setTipValue(item,e.target.value,sign,tip)
     //右侧推送--延时推送
     const stimer = this.state.timer;
     clearTimeout(stimer);

+ 10 - 13
src/store/reducers/newAdvice.js

@@ -124,26 +124,23 @@ export default (state = initSearchList, action) => {
     }
 
     if (action.type == SET_TIP_ADVICE) {   
-        console.log(action,'action'); 
+        // console.log(action,'action'); 
         const newState = Object.assign({}, state);
         let tempArr = newState.labelListBig;
         let tempArrs = newState.labelListSmall;
         let tmpArr = newState.labelListBlood;
         let tmpLis = action.item
-        console.log(tmpLis,1111111)
         if(tmpLis.flg == 5){//药品
             for(let i= 0;i < tempArr.length;i++){
                 // 2020/9/9 解决医嘱时间修改 历史病历显示错误的bug,
-                // if(action.tip == i){
-                //     if(action.sign == 1){//时间
-                //         tempArr[i].time = action.value
-                //         tempArr[i].dateValue = action.value
-                //     }else{
-                //         tempArr[i].value = action.value
-                //     }
-                // }
-                tempArr[i].time = action.value
-                tempArr[i].dateValue = action.value
+                if(action.tip == i){
+                    if(action.sign == 1){//时间
+                        tempArr[i].time = action.value
+                        tempArr[i].dateValue = action.value
+                    }else{
+                        tempArr[i].value = action.value
+                    }
+                }
             }
             newState.labelListBig = [...tempArr]
         }else if(tmpLis.flg == 6){//手术
@@ -171,7 +168,7 @@ export default (state = initSearchList, action) => {
             }
             newState.labelListBlood = [...tmpArr]
         }
-        console.log(newState,'newState');
+        // console.log(newState,'newState');
         return newState;
     }
     if (action.type == SEARCH_TYPE_NEW) {