| | |
| | | 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 { |
| | | getTaskPathTemplateNodeBooleanMeta, |
| | | getTaskPathTemplateNodeTypeMeta |
| | |
| | | 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: 'templateId', |
| | | label: '模板ID', |
| | | label: $t('pages.basicInfo.taskPathTemplateNode.table.templateId'), |
| | | width: 110, |
| | | align: 'center', |
| | | formatter: (row) => row.templateId ?? '--' |
| | | }, |
| | | { |
| | | prop: 'templateCode', |
| | | label: '模板编码', |
| | | label: $t('pages.basicInfo.taskPathTemplateNode.table.templateCode'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.templateCode || '--' |
| | | }, |
| | | { |
| | | prop: 'nodeOrder', |
| | | label: '节点顺序', |
| | | label: $t('pages.basicInfo.taskPathTemplateNode.table.nodeOrder'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => row.nodeOrder ?? '--' |
| | | }, |
| | | { |
| | | prop: 'nodeCode', |
| | | label: '节点编码', |
| | | label: $t('pages.basicInfo.taskPathTemplateNode.table.nodeCode'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.nodeCode || '--' |
| | | }, |
| | | { |
| | | prop: 'nodeName', |
| | | label: '节点名称', |
| | | label: $t('pages.basicInfo.taskPathTemplateNode.table.nodeName'), |
| | | minWidth: 160, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.nodeName || '--' |
| | | }, |
| | | { |
| | | prop: 'nodeTypeText', |
| | | label: '节点类型', |
| | | label: $t('pages.basicInfo.taskPathTemplateNode.table.nodeType'), |
| | | width: 120, |
| | | align: 'center', |
| | | formatter: (row) => { |
| | |
| | | }, |
| | | { |
| | | prop: 'systemCode', |
| | | label: '系统编码', |
| | | label: $t('pages.basicInfo.taskPathTemplateNode.table.systemCode'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.systemCode || '--' |
| | | }, |
| | | { |
| | | prop: 'systemName', |
| | | label: '系统名称', |
| | | label: $t('pages.basicInfo.taskPathTemplateNode.table.systemName'), |
| | | minWidth: 150, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.systemName || '--' |
| | | }, |
| | | { |
| | | prop: 'mandatoryText', |
| | | label: '必须节点', |
| | | label: $t('pages.basicInfo.taskPathTemplateNode.table.mandatory'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => { |
| | |
| | | }, |
| | | { |
| | | prop: 'parallelExecutableText', |
| | | label: '可并行', |
| | | label: $t('pages.basicInfo.taskPathTemplateNode.table.parallelExecutable'), |
| | | width: 100, |
| | | align: 'center', |
| | | formatter: (row) => { |
| | |
| | | }, |
| | | { |
| | | prop: 'timeoutMinutes', |
| | | label: '超时(分)', |
| | | label: $t('pages.basicInfo.taskPathTemplateNode.table.timeoutMinutes'), |
| | | width: 110, |
| | | align: 'center', |
| | | formatter: (row) => row.timeoutMinutes ?? '--' |
| | | }, |
| | | { |
| | | 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, |