瀏覽代碼

清空后其他史杂音类选中状态bug修改

zhouna 6 年之前
父節點
當前提交
9b8aba56d7

+ 2 - 0
src/containers/OtherHistory.js

@@ -40,11 +40,13 @@ function mapDispatchToProps(dispatch,store){
         const model = JSON.parse(JSON.stringify(initData.otherHisModel));
         const arr = JSON.parse(JSON.stringify(initData.otherHis||null));
         const arrSave = JSON.parse(JSON.stringify(initData.otherHisSave||null));
+        const selects = JSON.parse(JSON.stringify(initData.otherSelecteds||null));
         const isHis = initData.otherIsHis;
         const listObj = isHis?{newArr:arr,saveText:arrSave||[]}:fullfillText(model);
         dispatch({
           type:SETDATA,
           data:listObj.newArr,
+          selecteds:selects,
           save:listObj.saveText,
           isEmpty:false
         });

+ 1 - 0
src/store/async-actions/fetchModules.js

@@ -78,6 +78,7 @@ export const getOtherHisRecord = ()=>{
           dispatch({
             type:SETOTHERHISTORY,
             data:arr,
+            selecteds:obj.otherHistorySelecteds,
             save:objStr
           });
         }

+ 1 - 0
src/store/reducers/homePage.js

@@ -44,6 +44,7 @@ export default function (state=initState,action) {
     case SETOTHERHISTORY:
       res.initData.otherHis = action.data;
       res.initData.otherHisSave = action.save;
+      res.initData.otherSelecteds = action.selecteds;
       res.initData.otherIsHis = action.otherIsHis!=undefined?action.otherIsHis:true;
       return res;
     /*case SETTEXTFOCUS:

+ 1 - 0
src/store/reducers/otherHistory.js

@@ -17,6 +17,7 @@ export default function(state=initState,action){//console.log(state)
   switch (action.type){
     case SETDATA:
       res.data = action.data;
+      res.selecteds = action.selecteds;
       res.saveText = action.save||[];
       res.isEmpty = action.isEmpty;
       return res;