Browse Source

血压类文本子标签存值

zhouna 6 years ago
parent
commit
4717362f96

+ 1 - 1
src/containers/OtherHistory.js

@@ -8,7 +8,7 @@ import {billing} from '@store/async-actions/pushMessage';
 import {fullfillText} from '@common/js/func';
 import {didPushParamChange} from '@utils/tools.js';
 
-function mapStateToProps(state){
+function mapStateToProps(state){console.log(state)
   const {otherHistory,homePage,typeConfig,mainSuit} = state;
   const hasMain = mainSuit.saveText.join('');//||mainSuit.data.length;
   return {

+ 1 - 1
src/store/actions/checkBody.js

@@ -240,7 +240,7 @@ export function setInputLabel(state,action){
   if(+item.tagType===3){      //multSpred标签
     item.questionMapping[subIndex].value = text;
     let texts = item.questionMapping.map((it)=>{
-      return it.value?(it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||''):'';
+      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
     });
     res.saveText[i] = texts.join('');
     res.update = Math.random();

+ 1 - 1
src/store/async-actions/homePage.js

@@ -56,7 +56,7 @@ export const getInitModules= (dispatch,getStore)=>{
           emptyData:initData.currentEmpty,//现病史空模板
           saveEmpty:initSaveText.currentEmpty,
         });
-        dispatch(getOtherHisRecord());          //获取其他史最近记录
+        dispatch(getOtherHisRecord());  console.log(111)        //获取其他史最近记录
         initHis(dispatch)
       }else{
         initHis(dispatch)

+ 4 - 4
src/utils/tools.js

@@ -229,9 +229,6 @@ const getAllDataStringList =(baseList) =>{           //获取所有模块文本
  * @param {引用的话是保存时候的文本类型,编辑的时候是当前页面设置的文本类型} whichSign 
  */
 const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清空所有的数据
-      store.dispatch({
-        type:ISREAD
-      });
     if(action == 'clear'){     //清空
         store.dispatch({type: CLEAR_MAIN_SUIT,data:[],saveText:[],selecteds:[],editClear:true,mainIds:[],mainSymptIds:[]});
         store.dispatch({type: CLEAR_CURRENT_ILL,data:[],saveText:[],selecteds:[],editClear:true,symptomIds:[]});
@@ -466,7 +463,10 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
               });
             }
         }
-    }  
+    }
+  store.dispatch({
+    type:ISREAD
+  });
 }
 
 function filterArr(arr){