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

Merge remote-tracking branch 'origin/dev5.3.1' into dev/new1

zhouna 5 лет назад
Родитель
Сommit
b1ed55a1a2

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

@@ -201,6 +201,7 @@ class SpreadDrop extends Component{
     e.stopPropagation();
     const {handleConfirm,ikey,type,tagType,order,mainSaveText,copyType,value,mainData} = this.props;
     const params = Object.assign({},this.state,{ikey,type,tagType,order,mainSaveText,copyType,value,mainData});
+    delete params.tmpDom;       //避免上面deepClone selecteds报错
     handleConfirm&&handleConfirm(params);
 	this.btnClickFlag = true;
     //点确定后隐藏弹窗

+ 31 - 6
src/store/actions/checkBody.js

@@ -77,7 +77,8 @@ export function setNumberValue(state,action){
   const param = action.params;
   const ikey = param.ikey;
   let labelInx = getLabelIndex(ikey);
-  const subInx = ikey.substr(ikey.length-1);
+  // const subInx = ikey.substr(ikey.length-1);
+  const subInx = ikey.split("-")[2];
   let item = res.data[labelInx];
   if(+item.tagType===1){
     item.value = param.text;
@@ -89,7 +90,12 @@ export function setNumberValue(state,action){
       if(it.value){     //至少有一个子值才黑显
         hasValue = true;
       }
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      if(it.tagType===8){
+        return it.name;
+      }else{
+        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      }
+      
     });
     res.saveText[labelInx] = hasValue?sub.join(''):'';
   }
@@ -140,7 +146,12 @@ export function setRadioValue(state,action){
       if(it.value){     //至少有一个子值才黑显
         hasValue = true;
       }
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      if(it.tagType===8){
+        return it.name;
+      }else {
+        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      }
+      
     });
     res.saveText[labelInx] = hasValue?sub.join(''):'';
   }
@@ -172,7 +183,11 @@ export const setRadioInputValue = (state,action)=>{
         if(it.value){     //至少有一个子值才黑显
           hasValue = true;
         }
-        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+        if(it.tagType===8){
+          return it.name;
+        }else {
+          return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+        }
       });
       res.saveText[index] = hasValue?sub.join(''):'';
     }else{
@@ -204,7 +219,12 @@ export const setRadioInputValue = (state,action)=>{
   if(res.data[index].tagType!=1){
     let hasValue = false;
     const sub = res.data[index].questionMapping.map((it)=>{
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      if(it.tagType===8){
+        return it.name;
+      }else {
+        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      }
+      
     });
     res.saveText[index] = sub.join('');
   }else {
@@ -434,7 +454,12 @@ export function setInputLabel(state,action){
   if(+item.tagType===3){      //multSpred标签
     item.questionMapping[subIndex].value = text;
     let texts = item.questionMapping.map((it)=>{
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      if(it.tagType===8){
+        return it.name;
+      }else{
+        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      }
+      
     });
     res.saveText[i] = texts.join('');
     res.update = Math.random();

+ 2 - 2
src/store/async-actions/treat.js

@@ -406,7 +406,7 @@ export const commonTreatAddToAdvice = () => {
             })
             dispatch({
                 type: SET_COMMONTREATMENT,
-                commontreatment: state.treat.generalTreat.content
+                commontreatment: state.treat.generalTreat&&state.treat.generalTreat.content
             })
             if(followUp) {
                 dispatch({
@@ -415,7 +415,7 @@ export const commonTreatAddToAdvice = () => {
                     hasFollowUp: true
                 })
             }
-            if(state.treat.generalTreat.content || followUp) { //如果一般治疗和回访时间存在,定位到医嘱
+            if(state.treat.generalTreat&&state.treat.generalTreat.content || followUp) { //如果一般治疗和回访时间存在,定位到医嘱
                 document.getElementById("adviceBox").scrollIntoView(true)
             }
             

+ 1 - 1
src/utils/tools.js

@@ -289,7 +289,7 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
        // Notify.success('页面已清空')
     }else{
         //回读/引用设置回读模式值(主诉-其他史使用)
-        store.dispatch({type: SET_READ_MODE, readMode: whichSign});
+        store.dispatch({type: SET_READ_MODE, readMode: whichSign});console.log(999,whichSign)
         if (whichSign == 0) {
           let dataJson = JSON.parse(reData.dataJson);
           //其他史data