From 776205953742aa128789f2db36b8a39185120024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E5=A4=9C?= <278898052@qq.com> Date: Sat, 24 May 2025 16:43:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20=E4=BC=98=E5=8C=96=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=91=98=E8=A6=81=E5=AD=97=E6=AE=B5=E7=9A=84?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/bpm/task/todo/data.ts | 25 ++++++++++++++++++- .../src/views/bpm/task/todo/index.vue | 24 +----------------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/apps/web-antd/src/views/bpm/task/todo/data.ts b/apps/web-antd/src/views/bpm/task/todo/data.ts index bb9e2e47..14d688a8 100644 --- a/apps/web-antd/src/views/bpm/task/todo/data.ts +++ b/apps/web-antd/src/views/bpm/task/todo/data.ts @@ -2,6 +2,8 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; import type { BpmTaskApi } from '#/api/bpm/task'; +import { h } from 'vue'; + import { useAccess } from '@vben/access'; import { getCategorySimpleList } from '#/api/bpm/category'; @@ -82,7 +84,28 @@ export function useGridColumns( title: '摘要', minWidth: 200, slots: { - default: 'slot-summary', + default: ({ row }) => { + const summary = row?.processInstance?.summary; + + if (!summary || summary.length === 0) { + return '-'; + } + return summary.map((item: any) => { + return h( + 'div', + { + key: item.key, + }, + h( + 'span', + { + class: 'text-gray-500', + }, + `${item.key} : ${item.value}`, + ), + ); + }); + }, }, }, { diff --git a/apps/web-antd/src/views/bpm/task/todo/index.vue b/apps/web-antd/src/views/bpm/task/todo/index.vue index 2b2beb48..ef77932f 100644 --- a/apps/web-antd/src/views/bpm/task/todo/index.vue +++ b/apps/web-antd/src/views/bpm/task/todo/index.vue @@ -90,28 +90,6 @@ function onRefresh() { /> - - - - - +