|
@@ -1,5 +1,5 @@
|
|
import config from '@config/index.js';
|
|
import config from '@config/index.js';
|
|
-import {formatContinueDots,getLabelIndex,fullfillText} from '@utils/tools.js';
|
|
|
|
|
|
+import {formatContinueDots,getLabelIndex,fullfillText,checkFullfillText} from '@utils/tools.js';
|
|
|
|
|
|
export function preSetCheckbody(state,action) {
|
|
export function preSetCheckbody(state,action) {
|
|
let res = Object.assign({},state);
|
|
let res = Object.assign({},state);
|
|
@@ -11,7 +11,7 @@ export function preSetCheckbody(state,action) {
|
|
export function set(state,action){
|
|
export function set(state,action){
|
|
let res = Object.assign({},state);
|
|
let res = Object.assign({},state);
|
|
const {data} = action;
|
|
const {data} = action;
|
|
- const obj = fullfillText(data,false,false,false);
|
|
|
|
|
|
+ const obj = checkFullfillText(data);
|
|
res.data = obj.newArr;
|
|
res.data = obj.newArr;
|
|
res.saveText = obj.saveText;//存逗号
|
|
res.saveText = obj.saveText;//存逗号
|
|
res.showAll = obj.checkHiddenDefault;
|
|
res.showAll = obj.checkHiddenDefault;
|
|
@@ -67,7 +67,7 @@ export const confirm = (state,action) =>{
|
|
arr.splice(ikey,0,...exists,...withs);
|
|
arr.splice(ikey,0,...exists,...withs);
|
|
//arr[ikey-1].value = text;
|
|
//arr[ikey-1].value = text;
|
|
//res.saveText[ikey+items.length] = text;
|
|
//res.saveText[ikey+items.length] = text;
|
|
- res.saveText = fullfillText(arr).saveText;
|
|
|
|
|
|
+ res.saveText = checkFullfillText(arr).saveText;
|
|
res.update=Math.random(); //用于触发组件更新(data变化了因在对象中无法被组件检测到)
|
|
res.update=Math.random(); //用于触发组件更新(data变化了因在对象中无法被组件检测到)
|
|
return res;
|
|
return res;
|
|
};
|
|
};
|
|
@@ -251,7 +251,7 @@ export function setCheckBoxValue(state,action) {
|
|
}
|
|
}
|
|
res.data[labelInx].value = showText;
|
|
res.data[labelInx].value = showText;
|
|
res.selecteds[labelInx] = action.data;
|
|
res.selecteds[labelInx] = action.data;
|
|
- res.saveText = fullfillText(res.data).saveText;
|
|
|
|
|
|
+ res.saveText = checkFullfillText(res.data).saveText;
|
|
res.update = Math.random();
|
|
res.update = Math.random();
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
@@ -271,7 +271,7 @@ 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];
|
|
- let tempLabels = data.tagType==4?fullfillText(data.questionMapping).newArr:[data];
|
|
|
|
|
|
+ let tempLabels = data.tagType==4?checkFullfillText(data.questionMapping).newArr:[data];
|
|
tempLabels = formatContinueDots(tempLabels);
|
|
tempLabels = formatContinueDots(tempLabels);
|
|
//查体中,默认显示区域搜索出来的标签要默认显示,隐藏区域搜索出的默认隐藏
|
|
//查体中,默认显示区域搜索出来的标签要默认显示,隐藏区域搜索出的默认隐藏
|
|
let hideAreaIndex = [...res.data].reverse().findIndex((it)=>it.showInCheck);
|
|
let hideAreaIndex = [...res.data].reverse().findIndex((it)=>it.showInCheck);
|
|
@@ -287,12 +287,12 @@ export function insertLabelData(state,action){
|
|
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.data.splice(index,1,pText,...spreadLabels,text);
|
|
- res.saveText = fullfillText(res.data).saveText;
|
|
|
|
|
|
+ res.saveText = checkFullfillText(res.data).saveText;
|
|
//res.saveText.splice(index,1,newText,'','');
|
|
//res.saveText.splice(index,1,newText,'','');
|
|
res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
|
|
res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
|
|
}else{
|
|
}else{
|
|
res.data.splice(index,1,text,...spreadLabels,pText);
|
|
res.data.splice(index,1,text,...spreadLabels,pText);
|
|
- res.saveText = fullfillText(res.data).saveText;
|
|
|
|
|
|
+ res.saveText = checkFullfillText(res.data).saveText;
|
|
//res.saveText.splice(index,1,'','',newText);
|
|
//res.saveText.splice(index,1,'','',newText);
|
|
res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
|
|
res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
|
|
}
|
|
}
|
|
@@ -365,7 +365,7 @@ export const changeLabelVal = (state,action)=>{//双击标签输入改变值
|
|
const num = nextIsDot?2:1;
|
|
const num = nextIsDot?2:1;
|
|
res.data.splice(index,num);
|
|
res.data.splice(index,num);
|
|
res.selecteds.splice(index,num);//杂音类样式选中状态对应
|
|
res.selecteds.splice(index,num);//杂音类样式选中状态对应
|
|
- res.saveText = fullfillText(res.data).saveText;
|
|
|
|
|
|
+ res.saveText = checkFullfillText(res.data).saveText;
|
|
}
|
|
}
|
|
res.update = Math.random();
|
|
res.update = Math.random();
|
|
return res;
|
|
return res;
|
|
@@ -397,7 +397,7 @@ export const changeNumLabelVal = (state,action)=>{
|
|
const num = nextIsDot?2:1;
|
|
const num = nextIsDot?2:1;
|
|
res.data.splice(index,num);
|
|
res.data.splice(index,num);
|
|
res.selecteds.splice(index,num); //杂音类样式选中状态对应
|
|
res.selecteds.splice(index,num); //杂音类样式选中状态对应
|
|
- res.saveText = fullfillText(res.data).saveText;
|
|
|
|
|
|
+ res.saveText = checkFullfillText(res.data).saveText;
|
|
}
|
|
}
|
|
|
|
|
|
res.update = Math.random();
|
|
res.update = Math.random();
|