后端webadmin调整显示布局
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
import type { ColumnsType } from 'antd/es/table';
|
||||
import { useSearchParams } from 'react-router-dom';
|
||||
import { request } from '../lib/api';
|
||||
import { AdminCellLine } from '../components/AdminCellLine';
|
||||
import { fmtTime } from '../lib/constants';
|
||||
import { HQ_OPERATION_ACTION_OPTIONS, resolveHqOperationLabel } from '../lib/hq-log';
|
||||
import { useAdminList } from '../lib/useAdminList';
|
||||
@@ -55,14 +56,13 @@ export default function HqLogsPage() {
|
||||
{ title: '时间', dataIndex: 'createdAt', width: 160, render: fmtTime },
|
||||
{
|
||||
title: '操作人',
|
||||
width: 160,
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
render: (_, r) => (
|
||||
<div>
|
||||
<div>{r.hqName || '—'}</div>
|
||||
<div style={{ color: '#999', fontSize: 12 }}>
|
||||
{r.hqPhone || ''} {r.hqAccountId ? `(#${r.hqAccountId})` : ''}
|
||||
</div>
|
||||
</div>
|
||||
<AdminCellLine
|
||||
primary={r.hqName}
|
||||
secondary={[r.hqPhone, r.hqAccountId ? `#${r.hqAccountId}` : ''].filter(Boolean).join(' ') || null}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
@@ -170,7 +170,10 @@ export default function HqLogsPage() {
|
||||
<Descriptions.Item label="日志 ID">{detail.id}</Descriptions.Item>
|
||||
<Descriptions.Item label="时间">{fmtTime(detail.createdAt)}</Descriptions.Item>
|
||||
<Descriptions.Item label="操作人">
|
||||
{detail.hqName} / {detail.hqPhone} (ID: {detail.hqAccountId})
|
||||
<AdminCellLine
|
||||
primary={detail.hqName}
|
||||
secondary={[detail.hqPhone, detail.hqAccountId ? `ID:${detail.hqAccountId}` : ''].filter(Boolean).join(' ') || null}
|
||||
/>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="角色">{detail.hqRole || '—'}</Descriptions.Item>
|
||||
<Descriptions.Item label="行为">
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
type PartnerLogCategory,
|
||||
} from '../lib/partner-log';
|
||||
import { request } from '../lib/api';
|
||||
import { AdminCellLine } from '../components/AdminCellLine';
|
||||
import { fmtTime } from '../lib/constants';
|
||||
import { useAdminList } from '../lib/useAdminList';
|
||||
|
||||
@@ -71,21 +72,20 @@ export default function PartnerLogsPage() {
|
||||
{
|
||||
title: '合伙人',
|
||||
width: 180,
|
||||
ellipsis: true,
|
||||
render: (_, r) => (
|
||||
<div>
|
||||
<div>{r.companyName || '—'}</div>
|
||||
<div style={{ color: '#999', fontSize: 12 }}>{r.partnerId}</div>
|
||||
</div>
|
||||
<AdminCellLine primary={r.companyName} secondary={r.partnerId} />
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '账号',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
render: (_, r) => (
|
||||
<div>
|
||||
<div>{r.accountName || '—'}</div>
|
||||
<div style={{ color: '#999', fontSize: 12 }}>{r.accountPhone || r.partnerAccountId || '—'}</div>
|
||||
</div>
|
||||
<AdminCellLine
|
||||
primary={r.accountName}
|
||||
secondary={r.accountPhone || r.partnerAccountId}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
type StoreLogCategory,
|
||||
} from '../lib/store-log';
|
||||
import { request } from '../lib/api';
|
||||
import { AdminCellLine } from '../components/AdminCellLine';
|
||||
import { fmtTime } from '../lib/constants';
|
||||
import { useAdminList } from '../lib/useAdminList';
|
||||
|
||||
@@ -82,21 +83,16 @@ export default function StoreLogsPage() {
|
||||
const columns: ColumnsType<Row> = [
|
||||
{ title: '时间', dataIndex: 'createdAt', width: 160, render: fmtTime },
|
||||
{
|
||||
title: '门店', width: 180,
|
||||
render: (_, r) => (
|
||||
<div>
|
||||
<div>{r.storeName || '—'}</div>
|
||||
<div style={{ color: '#999', fontSize: 12 }}>{r.storeId}</div>
|
||||
</div>
|
||||
),
|
||||
title: '门店', width: 180, ellipsis: true,
|
||||
render: (_, r) => <AdminCellLine primary={r.storeName} secondary={r.storeId} />,
|
||||
},
|
||||
{
|
||||
title: '账号', width: 150,
|
||||
title: '账号', width: 150, ellipsis: true,
|
||||
render: (_, r) => (
|
||||
<div>
|
||||
<div>{r.accountName || '—'}</div>
|
||||
<div style={{ color: '#999', fontSize: 12 }}>{r.accountPhone || r.storeAccountId || '系统/HQ'}</div>
|
||||
</div>
|
||||
<AdminCellLine
|
||||
primary={r.accountName}
|
||||
secondary={r.accountPhone || r.storeAccountId || '系统/HQ'}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ import type { ColumnsType } from 'antd/es/table';
|
||||
import { USER_LOG_CATEGORY_OPTIONS, resolveUserLogCategory, USER_LOG_CATEGORY_LABELS, type UserLogCategory } from '../lib/user-log';
|
||||
import { useSearchParams } from 'react-router-dom';
|
||||
import { request } from '../lib/api';
|
||||
import { AdminCellLine } from '../components/AdminCellLine';
|
||||
import { fmtTime } from '../lib/constants';
|
||||
import { useAdminList } from '../lib/useAdminList';
|
||||
|
||||
@@ -63,12 +64,12 @@ export default function UserLogsPage() {
|
||||
const columns: ColumnsType<Row> = [
|
||||
{ title: '时间', dataIndex: 'createdAt', width: 160, render: fmtTime },
|
||||
{
|
||||
title: '用户', width: 160,
|
||||
title: '用户', width: 180, ellipsis: true,
|
||||
render: (_, r) => (
|
||||
<div>
|
||||
<div>{r.nickname || r.userNo || '—'}</div>
|
||||
<div style={{ color: '#999', fontSize: 12 }}>{r.phone || r.userId || '—'}</div>
|
||||
</div>
|
||||
<AdminCellLine
|
||||
primary={r.nickname || r.userNo}
|
||||
secondary={r.phone || r.userId}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user