| | |
| | | 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 { |
| | | getTaskPathTemplateMergeCurrentMeta, |
| | | getTaskPathTemplateMergeStatusMeta |
| | |
| | | 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: 'templateCode', |
| | | label: '模板编码', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.templateCode'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.templateCode || '--' |
| | | }, |
| | | { |
| | | prop: 'templateName', |
| | | label: '模板名称', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.templateName'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.templateName || '--' |
| | | }, |
| | | { |
| | | prop: 'sourceTypeText', |
| | | label: '起点类型', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.sourceType'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => |
| | |
| | | }, |
| | | { |
| | | prop: 'targetTypeText', |
| | | label: '终点类型', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.targetType'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => |
| | |
| | | }, |
| | | { |
| | | prop: 'conditionExpressionText', |
| | | label: '条件表达式', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.conditionExpression'), |
| | | minWidth: 220, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => |
| | |
| | | }, |
| | | { |
| | | prop: 'conditionDesc', |
| | | label: '条件描述', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.conditionDesc'), |
| | | minWidth: 220, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.conditionDesc || '--' |
| | | }, |
| | | { |
| | | prop: 'version', |
| | | label: '版本号', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.version'), |
| | | width: 90, |
| | | align: 'center', |
| | | formatter: (row) => row.version ?? '--' |
| | | }, |
| | | { |
| | | prop: 'isCurrent', |
| | | label: '当前版本', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.isCurrent'), |
| | | width: 110, |
| | | align: 'center', |
| | | formatter: (row) => { |
| | |
| | | }, |
| | | { |
| | | prop: 'effectiveTimeText', |
| | | label: '生效时间', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.effectiveTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.effectiveTimeText || '--' |
| | | }, |
| | | { |
| | | prop: 'expireTimeText', |
| | | label: '失效时间', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.expireTime'), |
| | | minWidth: 170, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.expireTimeText || '--' |
| | | }, |
| | | { |
| | | prop: 'priority', |
| | | label: '优先级', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.priority'), |
| | | width: 90, |
| | | align: 'center', |
| | | formatter: (row) => row.priority ?? '--' |
| | | }, |
| | | { |
| | | prop: 'timeoutMinutes', |
| | | label: '超时(分)', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.timeoutMinutes'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => row.timeoutMinutes ?? '--' |
| | | }, |
| | | { |
| | | prop: 'maxRetryTimes', |
| | | label: '最大重试', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.maxRetryTimes'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => row.maxRetryTimes ?? '--' |
| | | }, |
| | | { |
| | | prop: 'retryIntervalSeconds', |
| | | label: '重试间隔(秒)', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.retryIntervalSeconds'), |
| | | minWidth: 120, |
| | | align: 'center', |
| | | formatter: (row) => row.retryIntervalSeconds ?? '--' |
| | | }, |
| | | { |
| | | prop: 'stepSize', |
| | | label: '步序长度', |
| | | label: $t('pages.basicInfo.taskPathTemplateMerge.table.stepSize'), |
| | | width: 90, |
| | | align: 'center', |
| | | formatter: (row) => row.stepSize ?? '--' |
| | | }, |
| | | { |
| | | prop: 'status', |
| | | label: '状态', |
| | | label: $t('table.status'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => { |
| | |
| | | }, |
| | | { |
| | | 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: '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: 'operation', |
| | | label: '操作', |
| | | label: $t('table.operation'), |
| | | width: 120, |
| | | align: 'center', |
| | | fixed: 'right', |
| | |
| | | } |
| | | ] |
| | | } |
| | | |