|
@@ -1,9 +1,10 @@
|
|
|
import Header from '@/components/Header'
|
|
|
import Slot from '@/components/Header/slot'
|
|
|
+import SvgIcon from '@/components/SvgIcon'
|
|
|
import { userStore } from '@/store/mobx'
|
|
|
import { iUserInfo } from '@/types/setting'
|
|
|
import consts from '@/utils/consts'
|
|
|
-import { Button, Input, Table } from 'antd'
|
|
|
+import { Button, Input, Table, Tooltip } from 'antd'
|
|
|
import { ColumnsType } from 'antd/lib/table'
|
|
|
import React, { useEffect, useState } from 'react'
|
|
|
import { apiAccountList } from './api'
|
|
@@ -38,7 +39,20 @@ export default function Info() {
|
|
|
const columns: ColumnsType<iUserInfo> = [
|
|
|
{
|
|
|
title: '账号',
|
|
|
- dataIndex: 'account'
|
|
|
+ dataIndex: 'account',
|
|
|
+ // eslint-disable-next-line react/display-name
|
|
|
+ render: (text:any, record: iUserInfo) => {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <span>{text}</span>
|
|
|
+ {
|
|
|
+ record.isAdmin ?
|
|
|
+ <Tooltip title="管理员"><span><SvgIcon iconClass="user-circle" fontSize="13"></SvgIcon></span></Tooltip>
|
|
|
+ : ''
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
@@ -62,6 +76,7 @@ export default function Info() {
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
+ align: 'center',
|
|
|
// eslint-disable-next-line react/display-name
|
|
|
render: (_: any, record: iUserInfo) => {
|
|
|
return (
|
|
@@ -90,6 +105,7 @@ export default function Info() {
|
|
|
dataSource={userList}
|
|
|
columns={columns}
|
|
|
bordered
|
|
|
+ rowClassName={(record: iUserInfo) => record.enable ? 'pi-red' : ''}
|
|
|
rowKey={record => record.id}
|
|
|
></Table>
|
|
|
</div>
|