|
@@ -401,8 +401,8 @@ export const setCheckBox = (state,action)=>{
|
|
|
showText = showText.substr(0,showText.length-1);
|
|
|
}
|
|
|
res.data[labelInx].value = showText;
|
|
|
+ res.data[labelInx].selecteds = action.data;
|
|
|
res.saveText[labelInx] = showText;
|
|
|
- res.selecteds[labelInx] = action.data;
|
|
|
res.update=Math.random();
|
|
|
return res;
|
|
|
}
|
|
@@ -479,7 +479,6 @@ export const clearCurrentIll = (state,action)=>{
|
|
|
const res = Object.assign({},state);
|
|
|
res.data = action.data;
|
|
|
res.saveText = action.saveText;
|
|
|
- res.selecteds = action.selecteds?action.selecteds:[];
|
|
|
res.symptomIds = action.symptomIds;
|
|
|
res.currReadSonM = action.currReadSonM||[];
|
|
|
if(action.editClear){
|
|
@@ -568,32 +567,26 @@ export function insertLabelData(state,action){
|
|
|
if(strIndex < 1){//前
|
|
|
res.data.splice(index,1,text,...(FilteredDotMapping1),pText);
|
|
|
res.saveText = fullfillText(res.data).saveText;
|
|
|
- res.selecteds.splice(index,1,null,...new Array(FilteredDotMapping1.length).fill(null),null);
|
|
|
}else{
|
|
|
res.data.splice(index,1,pText,text,...(FilteredDotMapping1));
|
|
|
res.saveText = fullfillText(res.data).saveText;
|
|
|
- res.selecteds.splice(index,1,null,null,...new Array(FilteredDotMapping1.length).fill(null));
|
|
|
}
|
|
|
}else{
|
|
|
if(focusIndex > banIdx){//伴后
|
|
|
if(strIndex < 1){//前
|
|
|
res.data.splice(index,1,text,...(FilteredDotMapping2),pText);
|
|
|
res.saveText = fullfillText(res.data).saveText;
|
|
|
- res.selecteds.splice(index,1,null,...new Array(FilteredDotMapping2.length).fill(null),null);
|
|
|
}else{
|
|
|
res.data.splice(index,1,pText,text,...(FilteredDotMapping2));
|
|
|
res.saveText = fullfillText(res.data).saveText;
|
|
|
- res.selecteds.splice(index,1,null,null,...new Array(FilteredDotMapping2.length).fill(null));
|
|
|
}
|
|
|
}else{//伴前
|
|
|
if(strIndex < 1){//前
|
|
|
res.data.splice(index,1,text,...(FilteredDotMapping1),pText);
|
|
|
res.saveText = fullfillText(res.data).saveText;
|
|
|
- res.selecteds.splice(index,1,null,...new Array(FilteredDotMapping1.length).fill(null),null);
|
|
|
}else{
|
|
|
res.data.splice(index,1,pText,text,...(FilteredDotMapping1));
|
|
|
res.saveText = fullfillText(res.data).saveText;
|
|
|
- res.selecteds.splice(index,1,null,null,...new Array(FilteredDotMapping1.length).fill(null));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -608,11 +601,9 @@ export function insertLabelData(state,action){
|
|
|
if(preItem&&preItem.tagType==8){
|
|
|
res.data.splice(index,1,...spreadLabels,pText);
|
|
|
res.saveText = fullfillText(res.data).saveText;
|
|
|
- res.selecteds.splice(index,1,...new Array(spreadLabels.length).fill(null),null);
|
|
|
}else{
|
|
|
res.data.splice(index,1,textEmpty,...spreadLabels,pText);
|
|
|
res.saveText = fullfillText(res.data).saveText;
|
|
|
- res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
|
|
|
}
|
|
|
// res.data.splice(focusIndex,0,data,textEmpty);
|
|
|
|
|
@@ -622,11 +613,9 @@ export function insertLabelData(state,action){
|
|
|
if(afterItem&&afterItem.tagType==8){
|
|
|
res.data.splice(index,1,pText,...spreadLabels);
|
|
|
res.saveText = fullfillText(res.data).saveText;
|
|
|
- res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null));
|
|
|
}else{
|
|
|
res.data.splice(index,1,pText,...spreadLabels,textEmpty);
|
|
|
res.saveText = fullfillText(res.data).saveText;
|
|
|
- res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -654,13 +643,11 @@ export function backspaceText(state,action){
|
|
|
// data[delIndex].value = text;
|
|
|
}else if(data[delIndex-1].tagType==8){
|
|
|
data.splice(delIndex,1);
|
|
|
- res.selecteds.splice(delIndex,1); //杂音类样式选中状态对应
|
|
|
res.saveText.splice(delIndex,1);
|
|
|
}
|
|
|
else{
|
|
|
handleLocalDelTag(2,delIndex-1,data[delIndex-1]);
|
|
|
data.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);
|
|
|
- res.selecteds.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);
|
|
|
res.saveText.splice(delIndex-1,2);
|
|
|
}
|
|
|
}else if(flag == 'del'){
|
|
@@ -668,7 +655,6 @@ export function backspaceText(state,action){
|
|
|
|
|
|
}else if(data[delIndex+1] && data[delIndex+1].tagType==8){
|
|
|
data.splice(delIndex,1);
|
|
|
- res.selecteds.splice(delIndex,1); //杂音类样式选中状态对应
|
|
|
res.saveText.splice(delIndex,1);
|
|
|
}else if(!data[delIndex+1]){//最后一个文本标签不删除
|
|
|
// console.log("删除最后一个啦");
|
|
@@ -676,7 +662,6 @@ export function backspaceText(state,action){
|
|
|
else{
|
|
|
handleLocalDelTag(2,delIndex,data[delIndex+1]);
|
|
|
data.splice(delIndex,2);
|
|
|
- res.selecteds.splice(delIndex,2);
|
|
|
res.saveText.splice(delIndex,2);
|
|
|
}
|
|
|
}
|
|
@@ -732,6 +717,7 @@ export function multipleComfirn(state,action){
|
|
|
let item = data[ikey].questionMapping;
|
|
|
let arr=[];
|
|
|
item[index].value = seleData;
|
|
|
+ item[index].selecteds = {[index]:action.data};
|
|
|
item.map((it)=>{
|
|
|
if(it.value){
|
|
|
arr.push(it.labelPrefix+it.value+it.labelSuffix);
|
|
@@ -739,12 +725,11 @@ export function multipleComfirn(state,action){
|
|
|
});
|
|
|
res.saveText[ikey] = arr.join("");
|
|
|
res.update = Math.random();
|
|
|
- res.selecteds[ikey] = {[index]:action.data};
|
|
|
return res;
|
|
|
}
|
|
|
data[ikey].value = seleData;
|
|
|
+ data[ikey].selecteds = action.data;
|
|
|
res.saveText[ikey] = seleData;
|
|
|
- res.selecteds[ikey] = action.data;
|
|
|
return res;
|
|
|
}
|
|
|
|