Browse Source

主诉单选可输入bug修改

zhouna 6 năm trước cách đây
mục cha
commit
ff59125e64
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 4 4
      src/store/actions/mainSuit.js

+ 4 - 4
src/store/actions/mainSuit.js

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