| | |
| | | import { h } from 'vue' |
| | | import { ElTag } from 'element-plus' |
| | | import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue' |
| | | import { $t } from '@/locales' |
| | | import { |
| | | getBasStationUseStatusMeta, |
| | | getBasStationStatusMeta, |
| | |
| | | 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: 'stationName', |
| | | label: '站点编码', |
| | | label: $t('pages.basicInfo.basStation.table.stationCode'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.stationName || '--' |
| | | }, |
| | | { |
| | | prop: 'stationId', |
| | | label: '站点名称', |
| | | label: $t('pages.basicInfo.basStation.table.stationName'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.stationId || '--' |
| | | }, |
| | | { |
| | | prop: 'typeText', |
| | | label: '站点类型', |
| | | label: $t('pages.basicInfo.basStation.table.type'), |
| | | width: 110, |
| | | align: 'center', |
| | | formatter: (row) => { |
| | |
| | | }, |
| | | { |
| | | prop: 'useStatusText', |
| | | label: '使用状态', |
| | | label: $t('pages.basicInfo.basStation.table.useStatus'), |
| | | width: 110, |
| | | align: 'center', |
| | | formatter: (row) => { |
| | |
| | | }, |
| | | { |
| | | prop: 'areaText', |
| | | label: '所属库区', |
| | | label: $t('pages.basicInfo.basStation.table.area'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.areaText || row.area$ || '--' |
| | | }, |
| | | { |
| | | prop: 'crossZoneAreaText', |
| | | label: '可跨区库区', |
| | | label: $t('pages.basicInfo.basStation.table.crossZoneArea'), |
| | | minWidth: 220, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.crossZoneAreaText || '--' |
| | | }, |
| | | { |
| | | prop: 'containerTypesText', |
| | | label: '可入容器类型', |
| | | label: $t('pages.basicInfo.basStation.table.containerTypes'), |
| | | minWidth: 200, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.containerTypesText || '--' |
| | | }, |
| | | { |
| | | prop: 'barcode', |
| | | label: '条码', |
| | | label: $t('pages.basicInfo.basStation.table.barcode'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.barcode || '--' |
| | | }, |
| | | { |
| | | prop: 'inAbleText', |
| | | label: '可入', |
| | | label: $t('pages.basicInfo.basStation.table.inAble'), |
| | | width: 90, |
| | | align: 'center', |
| | | formatter: (row) => row.inAbleText || '--' |
| | | }, |
| | | { |
| | | prop: 'outAbleText', |
| | | label: '可出', |
| | | label: $t('pages.basicInfo.basStation.table.outAble'), |
| | | width: 90, |
| | | align: 'center', |
| | | formatter: (row) => row.outAbleText || '--' |
| | | }, |
| | | { |
| | | prop: 'isCrossZoneText', |
| | | label: '是否跨区', |
| | | label: $t('pages.basicInfo.basStation.table.isCrossZone'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => row.isCrossZoneText || '--' |
| | | }, |
| | | { |
| | | prop: 'isWcsText', |
| | | label: '是否WCS', |
| | | label: $t('pages.basicInfo.basStation.table.isWcs'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => row.isWcsText || '--' |
| | | }, |
| | | { |
| | | prop: 'autoTransferText', |
| | | label: '自动调拨', |
| | | label: $t('pages.basicInfo.basStation.table.autoTransfer'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => row.autoTransferText || '--' |
| | | }, |
| | | { |
| | | prop: 'status', |
| | | label: '状态', |
| | | label: $t('table.status'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => { |
| | |
| | | }, |
| | | { |
| | | prop: 'updateByText', |
| | | label: '更新人', |
| | | label: $t('table.updateBy'), |
| | | minWidth: 120, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.updateByText || row.updateBy$ || '--' |
| | | }, |
| | | { |
| | | prop: 'updateTimeText', |
| | | label: '更新时间', |
| | | label: $t('table.updateTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.updateTimeText || row.updateTime$ || '--' |
| | | }, |
| | | { |
| | | prop: 'memo', |
| | | label: '备注', |
| | | label: $t('table.remark'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.memo || '--' |
| | | }, |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | label: $t('table.operation'), |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |