feat(web): AI 工作台文件预览/附件关联任务与草稿分支
- 新增 WorkbenchAiFilePreviewDialog 附件预览对话框及 useWorkbenchAiFilePreview,附件支持点击预览 - 新增 attachmentAssociationJobs/linkedReimbursementDraftJobs 前端服务与对应 composable,接入后台任务轮询与状态展示 - 新增 travelReimbursementDraftBranchModel 草稿分支模型,报销关联门控支持跳过/选择草稿 - PersonalWorkbenchAiMode 及各 composable(expense/document/steward/application-preview/attachment-association)重构适配,WorkbenchAiComposer/FileStrip 样式与交互完善 - DocumentsCenter/ReceiptFolder/TravelReimbursementCreate 等视图及 scripts 重构,风险/差旅规划/审批等工具适配 - 新增/更新前端测试:application-result-card、reimbursement-list-preview-fetch、guided-flow、composer-components 等
This commit is contained in:
21
web/src/services/attachmentAssociationJobs.js
Normal file
21
web/src/services/attachmentAssociationJobs.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import { apiRequest } from './api.js'
|
||||
|
||||
function normalizeJobId(jobId) {
|
||||
return String(jobId || '').trim()
|
||||
}
|
||||
|
||||
export function createAttachmentAssociationJob(payload = {}) {
|
||||
return apiRequest('/reimbursements/attachment-association-jobs', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(payload || {})
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchAttachmentAssociationJob(jobId) {
|
||||
const normalizedJobId = normalizeJobId(jobId)
|
||||
if (!normalizedJobId) {
|
||||
throw new Error('附件关联任务不存在或已失效。')
|
||||
}
|
||||
return apiRequest(`/reimbursements/attachment-association-jobs/${encodeURIComponent(normalizedJobId)}`)
|
||||
}
|
||||
|
||||
13
web/src/services/linkedReimbursementDraftJobs.js
Normal file
13
web/src/services/linkedReimbursementDraftJobs.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { apiRequest } from './api.js'
|
||||
|
||||
export function createLinkedReimbursementDraftJob(payload = {}) {
|
||||
return apiRequest('/reimbursements/linked-reimbursement-draft-jobs', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(payload)
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchLinkedReimbursementDraftJob(jobId) {
|
||||
const normalizedJobId = encodeURIComponent(String(jobId || '').trim())
|
||||
return apiRequest(`/reimbursements/linked-reimbursement-draft-jobs/${normalizedJobId}`)
|
||||
}
|
||||
Reference in New Issue
Block a user