| | |
| | | import { h } from 'vue' |
| | | import { $t } from '@/locales' |
| | | import { ElTag } from 'element-plus' |
| | | import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue' |
| | | import { getDeviceBindFlagMeta } from './deviceBindPage.helpers' |
| | |
| | | canEdit = true, |
| | | canDelete = true |
| | | } = {}) { |
| | | const operations = [{ key: 'view', label: '详情', icon: 'ri:eye-line' }] |
| | | const operations = [{ key: 'view', label: $t('common.actions.detail'), icon: 'ri:eye-line' }] |
| | | |
| | | if (canEdit && handleEdit) { |
| | | operations.push({ key: 'edit', label: '编辑', icon: 'ri:pencil-line' }) |
| | | operations.push({ key: 'edit', label: $t('common.actions.edit'), icon: 'ri:pencil-line' }) |
| | | } |
| | | |
| | | if (canDelete && handleDelete) { |
| | | operations.push({ key: 'delete', label: '删除', icon: 'ri:delete-bin-5-line', color: 'var(--art-error)' }) |
| | | operations.push({ key: 'delete', label: $t('common.actions.delete'), icon: 'ri:delete-bin-5-line', color: 'var(--art-error)' }) |
| | | } |
| | | |
| | | return [ |
| | | { type: 'selection', width: 48, align: 'center' }, |
| | | { type: 'globalIndex', label: '序号', width: 72, align: 'center' }, |
| | | { type: 'globalIndex', label: $t('table.index'), width: 72, align: 'center' }, |
| | | { |
| | | prop: 'currentRow', |
| | | label: '当前排号', |
| | | label: $t('pages.basicInfo.deviceBind.table.currentRow'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => row.currentRow ?? '--' |
| | | }, |
| | | { |
| | | prop: 'startRow', |
| | | label: '起始排号', |
| | | label: $t('pages.basicInfo.deviceBind.table.startRow'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => row.startRow ?? '--' |
| | | }, |
| | | { |
| | | prop: 'endRow', |
| | | label: '终止排号', |
| | | label: $t('pages.basicInfo.deviceBind.table.endRow'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => row.endRow ?? '--' |
| | | }, |
| | | { |
| | | prop: 'deviceQty', |
| | | label: '设备数量', |
| | | label: $t('pages.basicInfo.deviceBind.table.deviceQty'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => row.deviceQty ?? '--' |
| | | }, |
| | | { |
| | | prop: 'startDeviceNo', |
| | | label: '起始设备号', |
| | | label: $t('pages.basicInfo.deviceBind.table.startDeviceNo'), |
| | | width: 110, |
| | | align: 'center', |
| | | formatter: (row) => row.startDeviceNo ?? '--' |
| | | }, |
| | | { |
| | | prop: 'endDeviceNo', |
| | | label: '终止设备号', |
| | | label: $t('pages.basicInfo.deviceBind.table.endDeviceNo'), |
| | | width: 110, |
| | | align: 'center', |
| | | formatter: (row) => row.endDeviceNo ?? '--' |
| | | }, |
| | | { |
| | | prop: 'staList', |
| | | label: '站点列表', |
| | | label: $t('pages.basicInfo.deviceBind.table.staList'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.staList || '--' |
| | | }, |
| | | { |
| | | prop: 'typeIdText', |
| | | label: '库区类型', |
| | | label: $t('pages.basicInfo.deviceBind.table.typeId'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => |
| | |
| | | }, |
| | | { |
| | | prop: 'beSimilar', |
| | | label: '物料相似', |
| | | label: $t('pages.basicInfo.deviceBind.table.beSimilar'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => { |
| | |
| | | }, |
| | | { |
| | | prop: 'emptySimilar', |
| | | label: '空板靠近', |
| | | label: $t('pages.basicInfo.deviceBind.table.emptySimilar'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => { |
| | |
| | | }, |
| | | { |
| | | prop: 'memo', |
| | | label: '备注', |
| | | label: $t('table.memo'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.memo || '--' |
| | | }, |
| | | { |
| | | prop: 'updateTimeText', |
| | | label: '更新时间', |
| | | label: $t('table.updateTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.updateTimeText || '--' |
| | | }, |
| | | { |
| | | prop: 'createTimeText', |
| | | label: '创建时间', |
| | | label: $t('table.createTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.createTimeText || '--' |
| | | }, |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | width: 160, |
| | | align: 'right', |
| | | label: $t('table.operation'), |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | | formatter: (row) => |
| | | h(ArtButtonMore, { |
| | | list: operations, |