Bläddra i källkod

Merge branch 'IE_test' into dev/new1

Luolei 6 år sedan
förälder
incheckning
8dd1b64c3f
2 ändrade filer med 18 tillägg och 3 borttagningar
  1. 17 2
      src/store/actions/currentIll.js
  2. 1 1
      src/store/actions/mainSuit.js

+ 17 - 2
src/store/actions/currentIll.js

@@ -168,7 +168,15 @@ export const setData = (state,action) =>{
               let items = v.questionMapping.filter((item)=>{
                               return item.symptomType==0||item.symptomType==1;
                             })          
-              lengArr[k] = items.length;  //每一个主诉尾巴长度        
+              lengArr[k] = items.length;  //每一个主诉尾巴长度 
+              
+              if(items.length==0){//没有尾巴时给症状后加逗号(3.5)
+                for(let j=0; j<newMainCopy.length; j++){
+                  if(newMainCopy[j].id==mainCopy[k].id){
+                    newMainCopy[j].value = newMainCopy[j].name = mainCopy[k].value+',';
+                  }
+                }
+              }       
               /*if(ind==1){
                 preLength = items.length;
               }else{
@@ -186,7 +194,7 @@ export const setData = (state,action) =>{
      /* for(let b=0; b<withs.length; b++){
         withs[b].name = withs[b].name.replace('、',"");
       }*/
-      // let newWiths = JSON.parse(JSON.stringify(withs));console.log(123,withs,newWiths);
+      // let newWiths = JSON.parse(JSON.stringify(withs));
       let newWiths = [];
       if(withs.length>0){
         for(let b=0; b<withs.length; b++){
@@ -210,6 +218,13 @@ export const setData = (state,action) =>{
                 withInsertInd += withPreLength;
               }*/
               withLengArr[d] = items.length;
+              if(items.length==0){//没有尾巴时给症状后加逗号(3.5)
+                for(let j=0; j<newWiths.length; j++){
+                  if(newWiths[j].id==mainCopy[d].id){
+                    newWiths[j].value = newWiths[j].name = withs[d].value+',';
+                  }
+                }
+              }
               if(withInd>1){
                 withInsertInd += withLengArr[d-1];
               }

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

@@ -247,7 +247,7 @@ export const confirm = (state,action) =>{
     
     res.data = arr;
     res.saveText = fullfillText(arr).saveText;
-    res.update=Math.random();console.log(789,res);
+    res.update=Math.random();
     return res;
   };