|
@@ -32,6 +32,7 @@ export const confirm = (state,action) =>{
|
|
if(items.length==0&&nones){
|
|
if(items.length==0&&nones){
|
|
arr[ikey-1].value = newPreText;
|
|
arr[ikey-1].value = newPreText;
|
|
res.saveText[ikey-1] = newPreText;
|
|
res.saveText[ikey-1] = newPreText;
|
|
|
|
+ res.selecteds[ikey] = null; //无殊选中状态遗留bug修改
|
|
res.update=Math.random();
|
|
res.update=Math.random();
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
@@ -182,18 +183,19 @@ export function insertLabelData(state,action){
|
|
const searchStr = res.searchStr;
|
|
const searchStr = res.searchStr;
|
|
const {index,data,isReplace,span,searchInEnd}=action;
|
|
const {index,data,isReplace,span,searchInEnd}=action;
|
|
const showText = res.saveText[index];
|
|
const showText = res.saveText[index];
|
|
- const spreadLabels = data;
|
|
|
|
|
|
+ const spreadLabels = data.tagType==4?fullfillText(data.questionMapping).newArr:[data];
|
|
let reg = searchInEnd?new RegExp(searchStr+"$"):new RegExp("^"+searchStr);
|
|
let reg = searchInEnd?new RegExp(searchStr+"$"):new RegExp("^"+searchStr);
|
|
const newText=showText.replace(reg,'')||' ';
|
|
const newText=showText.replace(reg,'')||' ';
|
|
if(!isReplace){
|
|
if(!isReplace){
|
|
span.current.innerText = newText;
|
|
span.current.innerText = newText;
|
|
const pText = Object.assign({},text,{value:newText});
|
|
const pText = Object.assign({},text,{value:newText});
|
|
if(searchInEnd){
|
|
if(searchInEnd){
|
|
- res.data.splice(index,1,pText,spreadLabels,text);
|
|
|
|
- res.saveText.splice(index,1,newText,'','');
|
|
|
|
|
|
+ res.data.splice(index,1,pText,...spreadLabels,text);
|
|
|
|
+ res.saveText = fullfillText(res.data).saveText;
|
|
|
|
+ //res.saveText.splice(index,1,newText,'','');
|
|
}else{
|
|
}else{
|
|
- res.data.splice(index,1,spreadLabels,pText,text);
|
|
|
|
- res.saveText.splice(index,1,'',newText,'');
|
|
|
|
|
|
+ res.data.splice(index,1,...spreadLabels,pText,text);
|
|
|
|
+ res.saveText = fullfillText(res.data).saveText;//.splice(index,1,'',newText,'');
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
span.current.innerText = ' ';
|
|
span.current.innerText = ' ';
|