| | |
| | | import { ElTag } from 'element-plus' |
| | | import ArtButtonTable from '@/components/core/forms/art-button-table/index.vue' |
| | | |
| | | export function createAiObserveTableColumns({ handleView }) { |
| | | export function createAiObserveTableColumns({ handleView, t }) { |
| | | return [ |
| | | { type: 'selection', width: 52, fixed: 'left' }, |
| | | { |
| | | prop: 'requestId', |
| | | label: '请求ID', |
| | | label: t('pages.system.aiObserve.table.requestId'), |
| | | minWidth: 210, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.requestId || '-' |
| | |
| | | }, |
| | | { |
| | | prop: 'model', |
| | | label: '模型', |
| | | label: t('pages.system.aiObserve.table.model'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.model || '-' |
| | | }, |
| | | { |
| | | prop: 'userLabel', |
| | | label: '用户', |
| | | label: t('pages.system.aiObserve.table.user'), |
| | | width: 110, |
| | | formatter: (row) => row.userLabel || '-' |
| | | }, |
| | | { |
| | | prop: 'status', |
| | | label: '状态', |
| | | label: t('pages.system.aiObserve.table.status'), |
| | | width: 100, |
| | | formatter: (row) => h(ElTag, { type: row.statusType, effect: 'light' }, () => row.statusText) |
| | | }, |
| | | { |
| | | prop: 'elapsedText', |
| | | label: '总耗时', |
| | | label: t('pages.system.aiObserve.table.elapsed'), |
| | | width: 110, |
| | | formatter: (row) => row.elapsedText || '--' |
| | | }, |
| | | { |
| | | prop: 'totalTokens', |
| | | label: '总 Tokens', |
| | | label: t('pages.system.aiObserve.table.totalTokens'), |
| | | width: 110, |
| | | formatter: (row) => row.totalTokens ?? '--' |
| | | }, |
| | | { |
| | | prop: 'createTime$', |
| | | label: '创建时间', |
| | | label: t('pages.system.aiObserve.table.createTime'), |
| | | minWidth: 170, |
| | | formatter: (row) => row['createTime$'] || '-' |
| | | }, |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | label: t('table.operation'), |
| | | width: 70, |
| | | align: 'right', |
| | | fixed: 'right', |