| | |
| | | import { h } from 'vue' |
| | | import { ElTag } from 'element-plus' |
| | | import { $t } from '@/locales' |
| | | import ArtButtonTable from '@/components/core/forms/art-button-table/index.vue' |
| | | |
| | | export function createWaveRuleTableColumns({ handleView, handleEdit, handleDelete }) { |
| | | return [ |
| | | { |
| | | prop: 'code', |
| | | label: '编号', |
| | | label: $t('table.code'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'typeText', |
| | | label: '类型', |
| | | label: $t('pages.manager.waveRule.table.type'), |
| | | minWidth: 140, |
| | | formatter: (row) => row.typeText || '-' |
| | | }, |
| | | { |
| | | prop: 'name', |
| | | label: '名称', |
| | | label: $t('table.name'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'status', |
| | | label: '状态', |
| | | label: $t('table.status'), |
| | | width: 100, |
| | | formatter: (row) => h(ElTag, { type: row.statusType, effect: 'light' }, () => row.statusText || '-') |
| | | }, |
| | | { |
| | | prop: 'updateByLabel', |
| | | label: '更新人', |
| | | label: $t('table.updateBy'), |
| | | width: 120, |
| | | formatter: (row) => row.updateByLabel || '-' |
| | | }, |
| | | { |
| | | prop: 'updateTimeText', |
| | | label: '更新时间', |
| | | label: $t('table.updateTime'), |
| | | minWidth: 180, |
| | | formatter: (row) => row.updateTimeText || '-' |
| | | }, |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | label: $t('table.operation'), |
| | | width: handleDelete ? 160 : 120, |
| | | align: 'right', |
| | | formatter: (row) => { |