|
@@ -532,8 +532,8 @@ export function insertLabelData(state,action){
|
|
|
res.saveText.splice(focusIndex+1,0,searchData);
|
|
|
res.data[focusIndex].value = value;
|
|
|
resData = JSON.parse(JSON.stringify(res.data));
|
|
|
- // +3是因为插入一个文本标签加一个符号标签
|
|
|
- resData.splice(focusIndex+3,0,...(data.questionMapping.filter((item)=>{
|
|
|
+ // +2是因为插入一个文本标签
|
|
|
+ resData.splice(focusIndex+2,0,...(data.questionMapping.filter((item)=>{
|
|
|
return item.symptomType==0||item.symptomType==2;
|
|
|
})));
|
|
|
}
|
|
@@ -597,11 +597,13 @@ export function backspaceText(state,action){
|
|
|
// data[delIndex].value = text;
|
|
|
}else if(data[delIndex-1].tagType==8){
|
|
|
data.splice(delIndex,1);
|
|
|
+ res.saveText.splice(delIndex,1);
|
|
|
}
|
|
|
else{
|
|
|
data.splice(delIndex-1,2);
|
|
|
+ res.saveText.splice(delIndex-1,2);
|
|
|
}
|
|
|
- res.saveText = fullfillText(data).saveText;
|
|
|
+ // res.saveText = fullfillText(data).saveText;
|
|
|
res.update = Math.random();
|
|
|
return res;
|
|
|
}
|
|
@@ -618,12 +620,13 @@ export function removeId(state,action){
|
|
|
}
|
|
|
if(!data[index].value && data[index-1].tagType==8){
|
|
|
data.splice(index,1);
|
|
|
+ res.saveText.splice(index,1);
|
|
|
}else{
|
|
|
data[index].id = "";
|
|
|
data[index].name = text;
|
|
|
data[index].value = text;
|
|
|
}
|
|
|
-
|
|
|
+ //console.log(345,action,res);
|
|
|
res.update = Math.random();
|
|
|
return res;
|
|
|
}
|