zhou zhou
昨天 0d93ec4c10d146ffe287e7f4430ee66ad5832a17
rsf-design/src/views/basic-info/bas-station/basStationTable.columns.js
@@ -2,6 +2,7 @@
import { ElTag } from 'element-plus'
import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue'
import { $t } from '@/locales'
import BasStationTagCell from './modules/bas-station-tag-cell.vue'
import {
  getBasStationUseStatusMeta,
  getBasStationStatusMeta,
@@ -10,6 +11,7 @@
export function createBasStationTableColumns({
  handleView,
  handleCopy,
  handleEdit,
  handleDelete,
  canEdit = true,
@@ -17,12 +19,21 @@
} = {}) {
  const operations = [{ key: 'view', label: $t('common.actions.detail'), icon: 'ri:eye-line' }]
  if (handleCopy) {
    operations.push({ key: 'copy', label: '复制初始化', icon: 'ri:file-copy-line' })
  }
  if (canEdit && handleEdit) {
    operations.push({ key: 'edit', label: $t('common.actions.edit'), icon: 'ri:pencil-line' })
  }
  if (canDelete && handleDelete) {
    operations.push({ key: 'delete', label: $t('common.actions.delete'), 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 [
@@ -70,18 +81,24 @@
      formatter: (row) => row.areaText || row.area$ || '--'
    },
    {
      prop: 'crossZoneAreaText',
      prop: 'crossZoneAreaItems',
      label: $t('pages.basicInfo.basStation.table.crossZoneArea'),
      minWidth: 220,
      showOverflowTooltip: true,
      formatter: (row) => row.crossZoneAreaText || '--'
      formatter: (row) =>
        h(BasStationTagCell, {
          items: row.crossZoneAreaItems || [],
          title: '可跨区库区'
        })
    },
    {
      prop: 'containerTypesText',
      prop: 'containerTypeItems',
      label: $t('pages.basicInfo.basStation.table.containerTypes'),
      minWidth: 200,
      showOverflowTooltip: true,
      formatter: (row) => row.containerTypesText || '--'
      formatter: (row) =>
        h(BasStationTagCell, {
          items: row.containerTypeItems || [],
          title: '可入容器类型'
        })
    },
    {
      prop: 'barcode',
@@ -150,6 +167,20 @@
      formatter: (row) => row.updateTimeText || row.updateTime$ || '--'
    },
    {
      prop: 'createByText',
      label: $t('table.createBy'),
      minWidth: 120,
      showOverflowTooltip: true,
      formatter: (row) => row.createByText || row.createBy$ || '--'
    },
    {
      prop: 'createTimeText',
      label: $t('table.createTime'),
      minWidth: 170,
      showOverflowTooltip: true,
      formatter: (row) => row.createTimeText || row.createTime$ || '--'
    },
    {
      prop: 'memo',
      label: $t('table.remark'),
      minWidth: 180,
@@ -167,6 +198,7 @@
          list: operations,
          onClick: (item) => {
            if (item.key === 'view') handleView?.(row)
            if (item.key === 'copy') handleCopy?.(row)
            if (item.key === 'edit') handleEdit?.(row)
            if (item.key === 'delete') handleDelete?.(row)
          }