diff --git a/src/service/api/doc.ts b/src/service/api/doc.ts index e396536..43f1f85 100644 --- a/src/service/api/doc.ts +++ b/src/service/api/doc.ts @@ -65,3 +65,20 @@ export function docHistoryListApi(doc_id:number) { method: 'get', }); } + +// 归档目录树 +export function docArchiveTreeListApi(params: {from:string | number | null,to:string | number | null,org_id: number,type: number | string,change_no?:string}) { + return request({ + url: `/api/changes/archived/tree`, + method: 'get', + params, + }); +} + +// 归档详情 +export function docArchiveDetailsApi(id: number) { + return request({ + url: `/api/changes/archived/${id}/attachments`, + method: 'get', + }); +} diff --git a/src/utils/common.ts b/src/utils/common.ts index 212a17b..bc029f6 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -234,6 +234,17 @@ export function getTimeRangeStamp(timeRange: string){ } } +// 下载文件 +export function downloadFileFun(url: string, name: string) { + const a = document.createElement('a'); + a.href = url; + a.target = '_blank'; + a.download = name; + document.body.appendChild(a) + a.click() + document.body.removeChild(a); +} + // 获取 token export const getToken = () => { return localStorage.getItem('token'); diff --git a/src/views/changeLedger/modules/list.vue b/src/views/changeLedger/modules/list.vue index 3568561..9585535 100644 --- a/src/views/changeLedger/modules/list.vue +++ b/src/views/changeLedger/modules/list.vue @@ -285,7 +285,7 @@ const getConfig = async () => { } } -// // 获取组织列表 +// 获取组织列表 const getOrgList = async () => { loading.value = true; const {data,error} = await orgListApi(); diff --git a/src/views/details/approval/index.vue b/src/views/details/approval/index.vue index 998b966..c8f6a8a 100644 --- a/src/views/details/approval/index.vue +++ b/src/views/details/approval/index.vue @@ -432,7 +432,6 @@ onMounted(() => {