mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-06-17 16:20:25 +08:00
finish filelist/file
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { defHttp } from '/@/utils/http/axios'
|
||||
import { getFileListModel, FilePercent, DelFile, AnalyzeFile } from './model/fileListModel'
|
||||
import { DownloadFile } from './model/fileModel'
|
||||
import { DownloadFile, FileStatus } from './model/fileModel'
|
||||
|
||||
enum Api {
|
||||
GetFileList = '/getFileList',
|
||||
@@ -8,6 +8,7 @@ enum Api {
|
||||
DelFile = '/delFile',
|
||||
AnalyzeFile = '/analyzeFile',
|
||||
DlFile = '/dlFile',
|
||||
GetFileStatus = '/getFileStatus',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,3 +45,10 @@ export const analyzeFile = (id: number) => {
|
||||
export const downloadFile = (id: number) => {
|
||||
return defHttp.get<DownloadFile>({ url: Api.DlFile, params: { id: id } })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: Get file status
|
||||
*/
|
||||
export const getFileStatus = (id: number) => {
|
||||
return defHttp.get<FileStatus>({ url: Api.GetFileStatus, params: { id: id } })
|
||||
}
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
export interface DownloadFile {
|
||||
url: string
|
||||
}
|
||||
|
||||
export interface Question {
|
||||
count: number
|
||||
point: number
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface Duplication {
|
||||
percent: number
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface FileStatus {
|
||||
name: string
|
||||
size: number
|
||||
questions: Question[]
|
||||
duplications: Duplication[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user