|
@@ -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];
|
|
|
}
|