|
@@ -210,10 +210,21 @@ export function setCheckText(state,action) {
|
|
|
|
|
|
//文本输入标签
|
|
|
export function setOtherInput(state,action){
|
|
|
- let res = Object.assign({},state);
|
|
|
- const {i,text,prefix,suffix} = action;
|
|
|
- if(res.data[i]){
|
|
|
- res.data[i].value=text;
|
|
|
+ let res = Object.assign({}, state);//console.log(state,action)
|
|
|
+ const {i, text, prefix, suffix, subIndex} = action;
|
|
|
+ const item = res.data[i];
|
|
|
+ if (+item.tagType === 3 || +item.tagType === 4) { //multSpred标签
|
|
|
+ item.questionMapping[subIndex].value = text;
|
|
|
+ let texts = item.questionMapping.map((it) => {
|
|
|
+ return (it.labelPrefix || '') + (it.value || '') + (it.labelSuffix || '');
|
|
|
+ });
|
|
|
+ res.saveText[i] = texts.join('');
|
|
|
+ res.update = Math.random();
|
|
|
+ return res;
|
|
|
+ } else {
|
|
|
+ if (item) {
|
|
|
+ item.value = text;
|
|
|
+ }
|
|
|
}
|
|
|
if(text){
|
|
|
res.saveText[i] = prefix+text+suffix;
|