|
@@ -73,9 +73,10 @@ export const setData = (state,action) =>{
|
|
|
objToArr.push(mainLabelModule[m]);
|
|
|
}
|
|
|
// 过滤掉没有mapping的数据
|
|
|
- let mainLabelModuleArr = objToArr.filter((item)=>{
|
|
|
+ let mainLabelModuleArr = objToArr;
|
|
|
+ /*let mainLabelModuleArr = objToArr.filter((item)=>{
|
|
|
return item.questionMapping.length>0;
|
|
|
- })
|
|
|
+ })*/
|
|
|
|
|
|
if (useEmpty) {
|
|
|
res.data = res.emptyData;
|
|
@@ -128,10 +129,9 @@ export const setData = (state,action) =>{
|
|
|
mainLabelModuleArr.map((v,i)=>{
|
|
|
if(mainCopy[k].id==v.id){
|
|
|
ind++;
|
|
|
- // newMainCopy.splice(k+1,0,...v.questionMapping);
|
|
|
let items = v.questionMapping.filter((item)=>{
|
|
|
return item.symptomType==0||item.symptomType==1;
|
|
|
- })
|
|
|
+ })
|
|
|
lengArr[k] = items.length; //每一个主诉尾巴长度
|
|
|
/*if(ind==1){
|
|
|
preLength = items.length;
|
|
@@ -150,7 +150,8 @@ export const setData = (state,action) =>{
|
|
|
if(withs.length>0){
|
|
|
let withInd = 0;
|
|
|
let withInsertInd = 0;
|
|
|
- let withPreLength = 0;
|
|
|
+ // let withPreLength = 0;
|
|
|
+ let withLengArr=[];
|
|
|
for(let d=0; d <withs.length;d++){
|
|
|
mainLabelModuleArr.map((v,i)=>{
|
|
|
if(withs[d].id==v.id){
|
|
@@ -158,10 +159,14 @@ export const setData = (state,action) =>{
|
|
|
let items = v.questionMapping.filter((item)=>{
|
|
|
return item.symptomType==0||item.symptomType==2;
|
|
|
})
|
|
|
- if(withInd==1){
|
|
|
+ /*if(withInd==1){
|
|
|
withPreLength = items.length;
|
|
|
}else{
|
|
|
withInsertInd += withPreLength;
|
|
|
+ }*/
|
|
|
+ withLengArr[d] = items.length;
|
|
|
+ if(withInd>1){
|
|
|
+ withInsertInd += withLengArr[d-1];
|
|
|
}
|
|
|
newWiths.splice(d+withInsertInd+1,0,...items);
|
|
|
}
|
|
@@ -308,6 +313,11 @@ export function setRadioValue(state,action){
|
|
|
});
|
|
|
}else{
|
|
|
item.questionMapping[subInx].value = text;
|
|
|
+ /*if(item.questionMapping[subInx].controlType==1){//例如:有无治疗-未经治疗
|
|
|
+ item.value = text;
|
|
|
+ }else{
|
|
|
+ item.questionMapping[subInx].value = text;
|
|
|
+ }*/
|
|
|
let hasValue = false;
|
|
|
const sub = item.questionMapping.map((it)=>{
|
|
|
//添加选中状态
|
|
@@ -376,9 +386,10 @@ export const bigDataSymptom = (state,action) => {
|
|
|
const index = action.info.ikey;
|
|
|
let labelInx = getLabelIndex(index);
|
|
|
// 添加症状 暂时剔除没有id、questionMapping字段的数据
|
|
|
- let pushDataList = action.data.filter(function(item){
|
|
|
+ let pushDataList = action.data;
|
|
|
+ /*let pushDataList = action.data.filter(function(item){
|
|
|
return item.id
|
|
|
- });
|
|
|
+ });*/
|
|
|
let dataList = inlineDatas[labelInx].questionMapping;
|
|
|
for(let k=0; k<dataList.length; k++){
|
|
|
if(dataList[k].controlType == 99){
|