liu
2026-09-30 71beff1699701e18c2503791c7ba1437c89966aa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import type { PageParam, PageResult } from '@vben/request';
 
import type { SystemStorageApi } from '#/api/system/storage';
 
import { requestClient } from '#/api/request';
 
export namespace ArchiveDocumentApi {
  /** 档案(电子附件 + 实体存放位置) */
  export interface Document {
    id?: number; // 档案编号
    no?: string; // 档案编号(后端生成:DA+yyyyMMdd+6位流水,只读)
    title: string; // 档案标题
    categoryId: number; // 档案分类 ID
    categoryName?: string; // 分类名称(后端冗余)
    secretLevel?: number; // 密级,字典 archive_secret_level
    carrierType?: number; // 载体,字典 archive_carrier_type
    shelfNo?: string; // 实体-书架号
    layerNo?: string; // 实体-层号
    columnNo?: string; // 实体-列号
    boxNo?: string; // 实体-册号/档案盒号
    storePlace?: string; // 实体存放位置描述
    sourceType?: number; // 来源,字典 archive_source_type(后端写,前端只读)
    sourceNo?: string; // 来源单号(立项编号/会员编号/报销单号)
    sourceId?: number; // 来源单据 ID
    sourceTitle?: string; // 来源单据标题
    archiveDate?: string; // 归档日期
    archivistUserId?: number; // 归档人用户 ID
    archivistName?: string; // 归档人姓名
    status?: number; // 档案状态,字典 archive_document_status
    summary?: string; // 摘要
    tags?: string; // 关键词,英文逗号分隔
    remark?: string; // 备注
    createTime?: string; // 创建时间
    attachmentList?: SystemStorageApi.StorageBlob[]; // 附件列表
    hasAttachment?: boolean; // 是否有附件
    blobIds?: number[]; // 提交时的附件 ID 列表(全量)
  }
}
 
/** 查询档案分页 */
export function getDocumentPage(params: PageParam) {
  return requestClient.get<PageResult<ArchiveDocumentApi.Document>>(
    '/archive/document/page',
    { params },
  );
}
 
/** 查询档案详情 */
export function getDocument(id: number) {
  return requestClient.get<ArchiveDocumentApi.Document>(
    `/archive/document/get?id=${id}`,
  );
}
 
/** 新增档案 */
export function createDocument(data: ArchiveDocumentApi.Document) {
  return requestClient.post('/archive/document/create', data);
}
 
/** 修改档案 */
export function updateDocument(data: ArchiveDocumentApi.Document) {
  return requestClient.put('/archive/document/update', data);
}
 
/** 删除档案 */
export function deleteDocument(id: number) {
  return requestClient.delete('/archive/document/delete', {
    params: { id },
  });
}
 
/** 导出档案 Excel */
export function exportDocument(params: ArchiveDocumentApi.Document) {
  return requestClient.download('/archive/document/export-excel', { params });
}