add modbus log

This commit is contained in:
Jay
2017-03-29 15:06:50 +08:00
parent 77bf5f58d2
commit 3e66691b67
15 changed files with 5579 additions and 4735 deletions
+12 -1
View File
@@ -28,7 +28,8 @@ const getDefaultState = () => ({
iogroup: []
},
modbus: {
list: []
list: [],
log: []
},
link: {
list: []
@@ -152,6 +153,7 @@ const listsReducer = (state = getDefaultState(), action) => {
return {
...state,
modbus: {
...state.modbus,
list: state.modbus.list.map(t=> mb_data(t, action))
}
}
@@ -159,9 +161,18 @@ const listsReducer = (state = getDefaultState(), action) => {
return {
...state,
modbus: {
...state.modbus,
list: state.modbus.list.map(t=> mb_data(t, action))
}
}
case 'mb_log':
return {
...state,
modbus: {
...state.modbus,
log: action.list
}
}
case 'clear_modbus':
return {...state, modbus: {...getDefaultState().modbus}};
case 'link_list':