zhou zhou
14 小时以前 50e95b985a72fcec4a93a2470e9efdfb2620148a
rsf-design/src/views/basic-info/task-path-template/taskPathTemplateTable.columns.js
@@ -1,6 +1,7 @@
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 {
  getTaskPathTemplateCurrentMeta,
  getTaskPathTemplateStatusMeta
@@ -14,18 +15,18 @@
  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 (handleFlow) {
    operations.push({ key: 'flow', label: '流程图', icon: 'ri:route-line' })
    operations.push({ key: 'flow', label: $t('pages.basicInfo.taskPathTemplate.actions.flow'), icon: 'ri:route-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 [
@@ -36,55 +37,55 @@
    },
    {
      type: 'globalIndex',
      label: '序号',
      label: $t('table.index'),
      width: 72,
      align: 'center'
    },
    {
      prop: 'templateCode',
      label: '模板编码',
      label: $t('pages.basicInfo.taskPathTemplate.table.templateCode'),
      minWidth: 160,
      showOverflowTooltip: true,
      formatter: (row) => row.templateCode || '--'
    },
    {
      prop: 'templateName',
      label: '模板名称',
      label: $t('pages.basicInfo.taskPathTemplate.table.templateName'),
      minWidth: 180,
      showOverflowTooltip: true,
      formatter: (row) => row.templateName || '--'
    },
    {
      prop: 'sourceType',
      label: '起点类型',
      label: $t('pages.basicInfo.taskPathTemplate.table.sourceType'),
      minWidth: 140,
      showOverflowTooltip: true,
      formatter: (row) => row.sourceType || '--'
    },
    {
      prop: 'targetType',
      label: '终点类型',
      label: $t('pages.basicInfo.taskPathTemplate.table.targetType'),
      minWidth: 140,
      showOverflowTooltip: true,
      formatter: (row) => row.targetType || '--'
    },
    {
      prop: 'conditionDesc',
      label: '条件描述',
      label: $t('pages.basicInfo.taskPathTemplate.table.conditionDesc'),
      minWidth: 180,
      showOverflowTooltip: true,
      formatter: (row) => row.conditionDesc || '--'
    },
    {
      prop: 'version',
      label: '版本号',
      label: $t('pages.basicInfo.taskPathTemplate.table.version'),
      width: 100,
      align: 'center',
      formatter: (row) => row.version ?? '--'
    },
    {
      prop: 'isCurrent',
      label: '当前版本',
      label: $t('pages.basicInfo.taskPathTemplate.table.isCurrent'),
      width: 110,
      align: 'center',
      formatter: (row) => {
@@ -94,56 +95,56 @@
    },
    {
      prop: 'effectiveTimeText',
      label: '生效时间',
      label: $t('pages.basicInfo.taskPathTemplate.table.effectiveTime'),
      minWidth: 170,
      showOverflowTooltip: true,
      formatter: (row) => row.effectiveTimeText || row.effectiveTime$ || '--'
    },
    {
      prop: 'expireTimeText',
      label: '失效时间',
      label: $t('pages.basicInfo.taskPathTemplate.table.expireTime'),
      minWidth: 170,
      showOverflowTooltip: true,
      formatter: (row) => row.expireTimeText || row.expireTime$ || '--'
    },
    {
      prop: 'priority',
      label: '优先级',
      label: $t('pages.basicInfo.taskPathTemplate.table.priority'),
      width: 90,
      align: 'center',
      formatter: (row) => row.priority ?? '--'
    },
    {
      prop: 'timeoutMinutes',
      label: '超时(分)',
      label: $t('pages.basicInfo.taskPathTemplate.table.timeoutMinutes'),
      width: 110,
      align: 'center',
      formatter: (row) => row.timeoutMinutes ?? '--'
    },
    {
      prop: 'stepSize',
      label: '步序长度',
      label: $t('pages.basicInfo.taskPathTemplate.table.stepSize'),
      width: 110,
      align: 'center',
      formatter: (row) => row.stepSize ?? '--'
    },
    {
      prop: 'maxRetryTimes',
      label: '最大重试',
      label: $t('pages.basicInfo.taskPathTemplate.table.maxRetryTimes'),
      width: 100,
      align: 'center',
      formatter: (row) => row.maxRetryTimes ?? '--'
    },
    {
      prop: 'retryIntervalSeconds',
      label: '重试间隔(秒)',
      label: $t('pages.basicInfo.taskPathTemplate.table.retryIntervalSeconds'),
      width: 120,
      align: 'center',
      formatter: (row) => row.retryIntervalSeconds ?? '--'
    },
    {
      prop: 'status',
      label: '状态',
      label: $t('table.status'),
      width: 96,
      align: 'center',
      formatter: (row) => {
@@ -153,44 +154,44 @@
    },
    {
      prop: 'remark',
      label: '备注',
      label: $t('table.remark'),
      minWidth: 180,
      showOverflowTooltip: true,
      formatter: (row) => row.remark || '--'
    },
    {
      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: 'createByText',
      label: '创建人',
      label: $t('table.createBy'),
      minWidth: 120,
      showOverflowTooltip: true,
      formatter: (row) => row.createByText || row.createBy$ || '--'
    },
    {
      prop: 'createTimeText',
      label: '创建时间',
      label: $t('table.createTime'),
      minWidth: 170,
      showOverflowTooltip: true,
      formatter: (row) => row.createTimeText || row.createTime$ || '--'
    },
    {
      prop: 'operation',
      label: '操作',
      width: 190,
      align: 'right',
      label: $t('table.operation'),
      width: 120,
      align: 'center',
      fixed: 'right',
      formatter: (row) =>
        h(ArtButtonMore, {