feat(oa): switch web-admin OA APIs to initiatorSelectByNode
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
5ac5952c55
commit
624ac87476
2 files changed
+7
-9
No files matched your search
@@ -185,7 +185,7 @@ export function fetchOaTemplateDetail(appId: string) {
|
||||
/** 发起前审批流预览(条件齐后返回最终路径) */
|
||||
export function fetchOaFlowPreview(
|
||||
appId: string,
|
||||
opts?: { formData?: Record<string, any>; initiatorSelectUserIds?: string[] }
|
||||
opts?: { formData?: Record<string, any>; initiatorSelectByNode?: Record<string, string[]> }
|
||||
) {
|
||||
return request.post<{
|
||||
resolved: boolean
|
||||
@@ -195,7 +195,7 @@ export function fetchOaFlowPreview(
|
||||
url: `${BASE}/templates/${appId}/flow-preview`,
|
||||
data: {
|
||||
formData: opts?.formData || {},
|
||||
initiatorSelectUserIds: opts?.initiatorSelectUserIds || undefined
|
||||
initiatorSelectByNode: opts?.initiatorSelectByNode || undefined
|
||||
},
|
||||
showSuccessMessage: false
|
||||
})
|
||||
@@ -217,7 +217,7 @@ export function fetchStartOaInstance(data: {
|
||||
formData?: Record<string, any>
|
||||
title?: string
|
||||
initiatorDeptId?: string
|
||||
initiatorSelectUserIds?: string[]
|
||||
initiatorSelectByNode?: Record<string, string[]>
|
||||
relatedInstanceIds?: string[]
|
||||
}) {
|
||||
return request.post({
|
||||
|
||||
@@ -282,9 +282,8 @@
|
||||
try {
|
||||
const preview = await fetchOaFlowPreview(appId, {
|
||||
formData: { ...formData.value },
|
||||
initiatorSelectUserIds: needInitiatorSelect.value
|
||||
? [...initiatorSelectUserIds.value]
|
||||
: undefined
|
||||
// Task 4: API 已切到按节点 map;完整 UI 见 Task 5–6
|
||||
initiatorSelectByNode: {}
|
||||
})
|
||||
flowResolved.value = preview?.resolved !== false
|
||||
flowPendingMessage.value =
|
||||
@@ -396,9 +395,8 @@
|
||||
const data: any = await fetchStartOaInstance({
|
||||
appId: picked.value.id,
|
||||
formData: { ...formData.value },
|
||||
initiatorSelectUserIds: needInitiatorSelect.value
|
||||
? [...initiatorSelectUserIds.value]
|
||||
: undefined
|
||||
// Task 4: API 已切到按节点 map;完整 UI 见 Task 5–6
|
||||
initiatorSelectByNode: {}
|
||||
})
|
||||
dlgVisible.value = false
|
||||
if (data?.id) {
|
||||
|
||||
Reference in new issue
Block a user