wms-antdvue/.svn/pristine/29/29d42d9452705e846cf26209f7d77e461dcacaec.svn-base
2024-11-07 16:33:03 +08:00

90 lines
1.4 KiB
Plaintext

import { h } from 'vue';
import { Tag } from 'ant-design-vue';
export const columns = [
{
title: 'ID',
dataIndex: 'id',
fixed: 'left',
width: 50,
},
{
title: '操作用户',
dataIndex: 'username',
width: 100,
},
{
title: '请求ip',
dataIndex: 'ip',
width: 100,
},
{
title: '浏览器',
dataIndex: 'browser',
width: 100,
},
{
title: '操作系统',
dataIndex: 'os',
width: 100,
},
{
title: '操作类型',
dataIndex: 'typeText',
width: 100,
},
{
title: '操作来源',
dataIndex: 'sourceText',
width: 100,
},
{
title: '请求方式',
dataIndex: 'requestMethod',
width: 100,
},
{
title: '请求URL',
dataIndex: 'url',
width: 100,
},
{
title: '请求地区',
dataIndex: 'location',
width: 100,
},
{
title: '请求耗时',
dataIndex: 'consumeTime',
width: 100,
},
{
title: '状态',
dataIndex: 'status',
customRender({ record }) {
return h(
Tag,
{
color: record.status == 0 ? 'success' : 'error',
},
{
default: () => (record.status == 0 ? '正常' : '异常'),
},
);
},
width: 100,
},
{
title: '创建时间',
dataIndex: 'createTime',
width: 180,
},
{
title: '操作',
fixed: 'right',
dataIndex: 'action',
key: 'action',
width: 200,
},
];