|
@@ -147,8 +147,8 @@ export const setData = (state,action) =>{
|
|
}
|
|
}
|
|
|
|
|
|
if (useEmpty) {
|
|
if (useEmpty) {
|
|
- // res.data = res.emptyData;
|
|
|
|
- res.data = res.emptyData&&res.emptyData.length>0?JSON.parse(JSON.stringify(res.emptyData)):moduleData;
|
|
|
|
|
|
+ const data = res.emptyData?JSON.parse(JSON.stringify(res.emptyData)):[];
|
|
|
|
+ res.data = fullfillText(data).newArr;
|
|
} else {
|
|
} else {
|
|
if(mainData&&mainData.length>0){//主诉使用模板
|
|
if(mainData&&mainData.length>0){//主诉使用模板
|
|
// 目前只需要将第一个主诉病程移植到现病史
|
|
// 目前只需要将第一个主诉病程移植到现病史
|
|
@@ -351,7 +351,7 @@ export const confirm = (state,action) =>{
|
|
let res = Object.assign({},state);
|
|
let res = Object.assign({},state);
|
|
let length1 = res.data.length;
|
|
let length1 = res.data.length;
|
|
let arr = JSON.parse(JSON.stringify(res.data));
|
|
let arr = JSON.parse(JSON.stringify(res.data));
|
|
- const {nones,exists,withs,ikey,exclusion,excluName,ban,noneIds} = action.data;console.log(111,action)
|
|
|
|
|
|
+ const {nones,exists,withs,ikey,exclusion,excluName,ban,noneIds} = action.data;
|
|
let existsId = exists && exists.length>0?getIds(exists):[];
|
|
let existsId = exists && exists.length>0?getIds(exists):[];
|
|
let withsId = withs && withs.length>0?getIds(withs):[];
|
|
let withsId = withs && withs.length>0?getIds(withs):[];
|
|
res.symptomIds = res.symptomIds.concat(existsId,withsId,noneIds);//搜索去重
|
|
res.symptomIds = res.symptomIds.concat(existsId,withsId,noneIds);//搜索去重
|
|
@@ -620,7 +620,8 @@ export const changeLabelVal = (state,action)=>{
|
|
}else{//删除完标签内容则删除该标签
|
|
}else{//删除完标签内容则删除该标签
|
|
const num = nextIsDot?2:1;
|
|
const num = nextIsDot?2:1;
|
|
res.data.splice(index,num);
|
|
res.data.splice(index,num);
|
|
- res.saveText = fullfillText(res.data).saveText;
|
|
|
|
|
|
+ res.saveText.splice(index,num);
|
|
|
|
+ // res.saveText = fullfillText(res.data).saveText;
|
|
}
|
|
}
|
|
res.update = Math.random();
|
|
res.update = Math.random();
|
|
return res;
|
|
return res;
|
|
@@ -651,7 +652,8 @@ export const changeNumLabelVal = (state,action)=>{
|
|
}else{//删除完标签内容则删除该标签
|
|
}else{//删除完标签内容则删除该标签
|
|
const num = nextIsDot?2:1;
|
|
const num = nextIsDot?2:1;
|
|
res.data.splice(index,num);
|
|
res.data.splice(index,num);
|
|
- res.saveText = fullfillText(res.data).saveText;
|
|
|
|
|
|
+ res.saveText.splice(index,num);
|
|
|
|
+ // res.saveText = fullfillText(res.data).saveText;
|
|
}
|
|
}
|
|
res.update = Math.random();
|
|
res.update = Math.random();
|
|
return res;
|
|
return res;
|
|
@@ -746,7 +748,7 @@ export function insertLabelData(state,action){
|
|
let resData = JSON.parse(JSON.stringify(res.data));
|
|
let resData = JSON.parse(JSON.stringify(res.data));
|
|
resData.splice(focusIndex,1,text,...(FilteredDotMapping2));
|
|
resData.splice(focusIndex,1,text,...(FilteredDotMapping2));
|
|
res.data = fullfillText(resData).newArr;
|
|
res.data = fullfillText(resData).newArr;
|
|
- res.saveText[focusIndex] = searchData;
|
|
|
|
|
|
+ res.saveText = fullfillText(res.data).saveText;
|
|
}else{
|
|
}else{
|
|
let resData;
|
|
let resData;
|
|
const searchStr = res.searchStr;
|
|
const searchStr = res.searchStr;
|
|
@@ -915,7 +917,6 @@ export function removeId(state,action){
|
|
data[index].name = text;
|
|
data[index].name = text;
|
|
data[index].value = text;
|
|
data[index].value = text;
|
|
}
|
|
}
|
|
- //console.log(345,action,res);
|
|
|
|
res.update = Math.random();
|
|
res.update = Math.random();
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
@@ -924,7 +925,7 @@ export function removeId(state,action){
|
|
export function multipleComfirn(state,action){
|
|
export function multipleComfirn(state,action){
|
|
let res = Object.assign({},state);
|
|
let res = Object.assign({},state);
|
|
const {ikey,seleData,fullIkey} = action.data;
|
|
const {ikey,seleData,fullIkey} = action.data;
|
|
- let data = res.data;//console.log(action,data[ikey])
|
|
|
|
|
|
+ let data = res.data;
|
|
let index = fullIkey.substr(fullIkey.length-1,1);
|
|
let index = fullIkey.substr(fullIkey.length-1,1);
|
|
if(data[ikey].tagType==3){ //在组合项中
|
|
if(data[ikey].tagType==3){ //在组合项中
|
|
let item = data[ikey].questionMapping;
|
|
let item = data[ikey].questionMapping;
|