Преглед изворни кода

Merge branch 'dev5.3.1' of http://192.168.2.236:10080/zhouna/newICSS into dev5.3.1

zhangxc пре 5 година
родитељ
комит
b0c9723ed2
3 измењених фајлова са 33 додато и 7 уклоњено
  1. 1 0
      src/components/SpreadDrop/index.jsx
  2. 31 6
      src/store/actions/checkBody.js
  3. 1 1
      src/utils/tools.js

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

@@ -192,6 +192,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();

+ 1 - 1
src/utils/tools.js

@@ -288,7 +288,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