diff --git a/admin-web/src/models/admin/roleList.js b/admin-web/src/models/admin/roleList.js index 1b8b97e8f..0933e493e 100644 --- a/admin-web/src/models/admin/roleList.js +++ b/admin-web/src/models/admin/roleList.js @@ -65,12 +65,12 @@ export default { *query({ payload }, { call, put }) { const response = yield call(queryRole, payload); message.info('查询成功!'); - const { count, roles } = response.data; + const { total, list } = response.data; yield put({ type: 'querySuccess', payload: { - list: roles, - count, + list: list, + count: total, }, }); }, diff --git a/admin-web/src/pages/Admin/AdminList.js b/admin-web/src/pages/Admin/AdminList.js index 91206b454..8e4e77ca5 100644 --- a/admin-web/src/pages/Admin/AdminList.js +++ b/admin-web/src/pages/Admin/AdminList.js @@ -65,13 +65,29 @@ function List ({ dataSource, loading, pagination, searchParams, dispatch, const columns = [ { - title: '用户名', + title: '账号', dataIndex: 'username' }, { - title: '昵称', + title: '员工姓名', dataIndex: 'nickname', }, + { + title: '角色', + dataIndex: 'roles', + render(roles) { + let text = ''; + if (roles) { + for (let i in roles) { + if (i > 0) { + text += ' '; + } + text += roles[i].name; + } + } + return ({text}); + } + }, { title: '状态', dataIndex: 'status', @@ -174,7 +190,7 @@ const SearchForm = Form.create()(props => {