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

其他史高血压数据展开

zhouna пре 6 година
родитељ
комит
5b61311cda
2 измењених фајлова са 14 додато и 3 уклоњено
  1. 13 2
      src/containers/SpreadDrop.js
  2. 1 1
      src/store/actions/otherHistory.js

+ 13 - 2
src/containers/SpreadDrop.js

@@ -131,15 +131,26 @@ function otherHisConfirm(dispatch,store,params){
     if(+res.data.code===0){
       const list = res.data.data;
       existsId.map((i)=>{
-        has.push(list[i]);
+        if(+list[i].tagType===4){
+          has.push(...list[i].questionMapping);
+        }else{
+          has.push(list[i]);
+        }
       });
       withsId.map((i)=>{
-        wes.push(list[i]);
+        if(+list[i].tagType===4){
+          wes.push(...list[i].questionMapping);
+        }else{
+          wes.push(list[i]);
+        }
       });
       dispatch({
         type: CONFIRMSELECTED,
         data: {exists:fullfillText(has,true,false).newArr,withs:fullfillText(wes,true,false).newArr,nones:nones,ikey}
       });
+      dispatch({
+        type:ISREAD
+      });
     }
   });
 }

+ 1 - 1
src/store/actions/otherHistory.js

@@ -30,7 +30,7 @@ export const confirm = (state,action) =>{
     withDatas[0].value=withs.length>0?"伴":'';
   }*/
   //const text = Object.assign({},JSON.parse(config.textLabel),{value:"伴"}):undefined;
-  arr.splice(ikey-1,0,...exists,...withs);
+  arr.splice(ikey,0,...exists,...withs);
   res.update=Math.random();         //用于触发组件更新(data变化了因在对象中无法被组件检测到)
   return res;
 };