|
@@ -433,7 +433,7 @@ export function setNumberValue(state,action){
|
|
const param = action.params;
|
|
const param = action.params;
|
|
const index = param.ikey;
|
|
const index = param.ikey;
|
|
let labelInx = getLabelIndex(index);
|
|
let labelInx = getLabelIndex(index);
|
|
- const subInx = index.substr(index.length-1);
|
|
|
|
|
|
+ const subInx = index.split("-")[2];//index.substr(index.length-1);
|
|
let item = res.data[labelInx];
|
|
let item = res.data[labelInx];
|
|
// if(param.text.trim()){
|
|
// if(param.text.trim()){
|
|
if(+item.tagType===1){
|
|
if(+item.tagType===1){
|
|
@@ -465,7 +465,7 @@ export function setRadioValue(state,action){
|
|
let res = Object.assign({},state);
|
|
let res = Object.assign({},state);
|
|
const {ikey,id,text} = action;
|
|
const {ikey,id,text} = action;
|
|
let labelInx = getLabelIndex(ikey);
|
|
let labelInx = getLabelIndex(ikey);
|
|
- const subInx = ikey.substr(ikey.length-1);
|
|
|
|
|
|
+ const subInx = ikey.split("-")[2]//ikey.substr(ikey.length-1);
|
|
let item = res.data[labelInx];
|
|
let item = res.data[labelInx];
|
|
if(typeof text != 'string'){ //需要展开项--有无治疗类型
|
|
if(typeof text != 'string'){ //需要展开项--有无治疗类型
|
|
const len = +item.copyType === 0?1:0;
|
|
const len = +item.copyType === 0?1:0;
|
|
@@ -513,7 +513,7 @@ export const setRadioInputValue = (state,action)=>{
|
|
const res = Object.assign({},state);
|
|
const res = Object.assign({},state);
|
|
const {ikey,values,id} = action.data;
|
|
const {ikey,values,id} = action.data;
|
|
let index = getLabelIndex(ikey);
|
|
let index = getLabelIndex(ikey);
|
|
- let innerInx = ikey.substr(ikey.length-1);
|
|
|
|
|
|
+ let innerInx = ikey.split("-")[2];//ikey.substr(ikey.length-1);
|
|
let item = res.data[index];
|
|
let item = res.data[index];
|
|
if(item.tagType!=1){ //在组合项中
|
|
if(item.tagType!=1){ //在组合项中
|
|
item = res.data[index].questionMapping[innerInx];
|
|
item = res.data[index].questionMapping[innerInx];
|
|
@@ -568,7 +568,7 @@ export const setRadioInputValue = (state,action)=>{
|
|
});
|
|
});
|
|
res.saveText[index] = sub.join('');
|
|
res.saveText[index] = sub.join('');
|
|
}else {
|
|
}else {
|
|
- res.saveText[ikey] = str;
|
|
|
|
|
|
+ res.saveText[index] = str;
|
|
}
|
|
}
|
|
res.update = Math.random();
|
|
res.update = Math.random();
|
|
return res;
|
|
return res;
|