|
|
@@ -18,17 +18,17 @@ const EmployeeDetail = props => {
|
|
|
const initData = async id => {
|
|
|
setState({ ...state, loading: true })
|
|
|
const {
|
|
|
- data: { staff = {} },
|
|
|
+ data: { staff = {}, log = [] },
|
|
|
code = -1
|
|
|
} = await apiStaffDetail(id)
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
|
if (shouldUpdate) {
|
|
|
dispatch({
|
|
|
type: 'refresh/commitAction',
|
|
|
- payload: 'contact'
|
|
|
+ payload: 'stafflist'
|
|
|
})
|
|
|
}
|
|
|
- setState({ ...state, staff, loading: false })
|
|
|
+ setState({ ...state, staff, log, loading: false })
|
|
|
// console.log(staff)
|
|
|
}
|
|
|
}
|
|
|
@@ -58,5 +58,5 @@ const EmployeeDetail = props => {
|
|
|
// export default EmployeeDetail
|
|
|
export default connect(({ refresh, single }) => ({
|
|
|
visible: single.drawer.visible,
|
|
|
- shouldUpdate: refresh.contact
|
|
|
+ shouldUpdate: refresh.stafflist
|
|
|
}))(EmployeeDetail)
|