|
|
@@ -92,12 +92,11 @@
|
|
|
>
|
|
|
<template v-slot:result="{ row }">
|
|
|
<el-tag
|
|
|
+ v-if="getResultLabel(row)"
|
|
|
size="medium"
|
|
|
- :type="
|
|
|
- getTimelineItemType(getDictValue('流程实例的结果', row.result))
|
|
|
- "
|
|
|
+ :type="getTimelineItemType(getResultLabel(row))"
|
|
|
>
|
|
|
- {{ getDictValue('流程实例的结果', row.result) }}
|
|
|
+ {{ getResultLabel(row) }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
<template v-slot:durationInMillis="{ row }">
|
|
|
@@ -316,6 +315,16 @@
|
|
|
|
|
|
return '';
|
|
|
},
|
|
|
+ // 缓存 row.result → 流程实例结果字典标签;同一行只翻译一次,
|
|
|
+ // 避免模板里 v-if / :type / body 三处重复调用 getDictValue
|
|
|
+ getResultLabel(row) {
|
|
|
+ if (!row) return '';
|
|
|
+ if (row.__resultLabel !== undefined) return row.__resultLabel;
|
|
|
+ const label = this.getDictValue('流程实例的结果', row.result) || '';
|
|
|
+ // 用 Vue.set 兼容 Vue 2,避免给原始 row 增加未声明属性导致响应式告警
|
|
|
+ this.$set(row, '__resultLabel', label);
|
|
|
+ return label;
|
|
|
+ },
|
|
|
getDateTime(ms) {
|
|
|
return getDate(ms);
|
|
|
}
|