chore: 流程详情

This commit is contained in:
dap 2024-12-18 09:38:57 +08:00
parent 3de8104e44
commit 129059b7a5
3 changed files with 19 additions and 19 deletions

View File

@ -6,13 +6,12 @@ import type { ID, IDS, PageQuery, PageResult } from '#/api/common';
import { requestClient } from '#/api/request';
/**
* TODO: 这接口后端还没有
* @param businessId
* @returns
* @param businessId ID
* @returns TaskInfo
*/
export function getTaskByBusinessId(businessId: string) {
return requestClient.get<TaskInfo>(
`/workflow/instance/infoByBusinessId/${businessId}`,
`/workflow/instance/getInfo/${businessId}`,
);
}

View File

@ -19,6 +19,7 @@ const taskInfo = ref<TaskInfo>();
const [BasicModal, modalApi] = useVbenModal({
title: '流程信息',
class: 'w-[1000px]',
footer: false,
onOpenChange: async (isOpen) => {
if (!isOpen) {
return null;

View File

@ -174,6 +174,21 @@ const [ApplyModal, applyModalApi] = useVbenModal({
>
{{ $t('pages.common.edit') }}
</ghost-button>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认撤销?"
@confirm="handleRevoke(row)"
>
<ghost-button
v-if="['waiting'].includes(row.status)"
v-access:code="['workflow:leave:edit']"
@click.stop=""
>
撤销
</ghost-button>
</Popconfirm>
<ghost-button @click="handleInfo(row)">详情</ghost-button>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
@ -189,21 +204,6 @@ const [ApplyModal, applyModalApi] = useVbenModal({
{{ $t('pages.common.delete') }}
</ghost-button>
</Popconfirm>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认撤销?"
@confirm="handleRevoke(row)"
>
<ghost-button
v-if="['waiting'].includes(row.status)"
v-access:code="['workflow:leave:edit']"
@click.stop=""
>
撤销
</ghost-button>
</Popconfirm>
<ghost-button @click="handleInfo(row)"> 详情 </ghost-button>
</Space>
</template>
</BasicTable>