| | |
| | | |
| | | const columns = [ |
| | | { |
| | | title: '账号', |
| | | title: formatMessage('db.sys_user.username', '账号'), |
| | | dataIndex: 'username', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '密码', |
| | | title: formatMessage('db.sys_user.password', '密码'), |
| | | dataIndex: 'password', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '昵称', |
| | | title: formatMessage('db.sys_user.nickname', '昵称'), |
| | | dataIndex: 'nickname', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '头像', |
| | | title: formatMessage('db.sys_user.avatar', '头像'), |
| | | dataIndex: 'avatar', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '工号', |
| | | title: formatMessage('db.sys_user.code', '工号'), |
| | | dataIndex: 'code', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '性别', |
| | | title: formatMessage('db.sys_user.sex', '性别'), |
| | | dataIndex: 'sex$', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '手机号', |
| | | title: formatMessage('db.sys_user.phone', '手机号'), |
| | | dataIndex: 'phone', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '邮箱', |
| | | title: formatMessage('db.sys_user.email', '邮箱'), |
| | | dataIndex: 'email', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '邮箱验证', |
| | | title: formatMessage('db.sys_user.email_verified', '邮箱验证'), |
| | | dataIndex: 'emailVerified$', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '所属部门', |
| | | title: formatMessage('db.sys_user.dept_id', '所属部门'), |
| | | dataIndex: 'deptId$', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '真实姓名', |
| | | title: formatMessage('db.sys_user.real_name', '真实姓名'), |
| | | dataIndex: 'realName', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '身份证号', |
| | | title: formatMessage('db.sys_user.id_card', '身份证号'), |
| | | dataIndex: 'idCard', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '出生日期', |
| | | title: formatMessage('db.sys_user.birthday', '出生日期'), |
| | | dataIndex: 'birthday', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '个人简介', |
| | | title: formatMessage('db.sys_user.introduction', '个人简介'), |
| | | dataIndex: 'introduction', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '状态', |
| | | title: formatMessage('db.sys_user.status', '状态'), |
| | | dataIndex: 'status$', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '添加时间', |
| | | title: formatMessage('db.sys_user.create_time', '添加时间'), |
| | | dataIndex: 'createTime$', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '添加人员', |
| | | title: formatMessage('db.sys_user.create_by', '添加人员'), |
| | | dataIndex: 'createBy$', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '修改时间', |
| | | title: formatMessage('db.sys_user.update_time', '修改时间'), |
| | | dataIndex: 'updateTime$', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '修改人员', |
| | | title: formatMessage('db.sys_user.update_by', '修改人员'), |
| | | dataIndex: 'updateBy$', |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '备注', |
| | | title: formatMessage('db.sys_user.memo', '备注'), |
| | | dataIndex: 'memo', |
| | | width: 140, |
| | | }, |
| | | |
| | | { |
| | | title: '操作', |
| | | title: formatMessage('common.operation', '操作'), |
| | | name: 'oper', |
| | | dataIndex: 'oper', |
| | | key: 'oper', |
| | | width: 140, |
| | | }, |
| | | ]; |
| | | |
| | |
| | | content: formatMessage('page.delete.confirm', '确定删除该项吗?'), |
| | | maskClosable: true, |
| | | onOk: async () => { |
| | | post('/api/user/remove/' + rows.map((row) => row.id).join(','), {}).then(resp => { |
| | | let result = resp.data; |
| | | if (result.code === 200) { |
| | | message.success(result.msg); |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | getPage() |
| | | }) |
| | | const hide = message.loading(formatMessage('common.loading', '请求中')); |
| | | try { |
| | | post('/api/user/remove/' + rows.map((row) => row.id).join(','), {}).then(resp => { |
| | | let result = resp.data; |
| | | if (result.code === 200) { |
| | | message.success(result.msg); |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | getPage() |
| | | hide() |
| | | }) |
| | | } catch (error) { |
| | | message.error(formatMessage('common.fail', '请求失败')); |
| | | } |
| | | }, |
| | | }); |
| | | } |