第一次提交

This commit is contained in:
gxwebsoft
2023-08-04 13:32:43 +08:00
commit c02e8be49b
1151 changed files with 200453 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import request from '@/utils/request';
import type { ApiResult } from '@/api';
import type { Classes, ClassesParam } from './model';
/**
* 获取全部的班级数据
*/
export async function getAllClasses(params?: ClassesParam) {
const res = await request.get<ApiResult<Classes[]>>(
'https://cdn.eleadmin.com/20200610/classes.json',
{ params }
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,21 @@
/**
* 班级
*/
export interface Classes {
// 班级id
classesId?: number;
// 班级名称
classesName?: string;
// 学院名称
college?: string;
// 专业名称
major?: string;
}
/**
* 班级查询参数
*/
export interface ClassesParam {
classesId?: number;
classesName?: string;
}

View File

@@ -0,0 +1,31 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { Piece, PieceParam, Archive, ArchiveParam } from './model';
/**
* 获取案卷列表
*/
export async function getPieceList(params: PieceParam) {
const res = await request.get<ApiResult<PageResult<Piece>>>(
'https://cdn.eleadmin.com/20200610/document.json',
{ params }
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 获取卷内文件列表
*/
export async function getArchiveList(params: ArchiveParam) {
const res = await request.get<ApiResult<Archive[]>>(
'https://cdn.eleadmin.com/20200610/archive.json',
{ params }
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,71 @@
import { PageParam } from '@/api';
/**
* 案卷
*/
export interface Piece {
// 案卷id
id?: number;
// 案卷题名
title?: string;
// 案卷档号
piece_no?: string;
// 密级
secret?: string;
// 存放位置
location?: string;
// 案卷类型
type?: string;
// 保管期限
retention?: string;
// 载体类型
carrier?: string;
// 归档年度
year?: string;
// 件数
amount?: number;
}
/**
* 案卷查询参数
*/
export interface PieceParam extends PageParam {
title?: string;
piece_no?: string;
}
/**
* 文档
*/
export interface Archive {
// 文件题名
title?: string;
// 案卷档号
piece_no?: string;
// 文件档号
archive_no?: string;
// 密级
secret?: string;
// 存放位置
location?: string;
// 文件类型
type?: string;
// 保管期限
retention?: string;
// 载体类型
carrier?: string;
// 归档年度
year?: string;
// 排序号
sort_number?: number;
}
/**
* 文档查询参数
*/
export interface ArchiveParam {
title?: string;
piece_no?: string;
archive_no?: string;
piece_no_in?: (string | undefined)[];
}

View File

@@ -0,0 +1,28 @@
import type { UserItem } from './model';
/**
* 获取数据
*/
export async function queryList() {
const data: UserItem[] = [
{
key: '1',
number: '00001',
name: 'John Brown',
department: '研发部'
},
{
key: '2',
number: '00002',
name: 'Jim Green',
department: '产品部'
},
{
key: '3',
number: '00003',
name: 'Joe Black',
department: '产品部'
}
];
return data;
}

View File

@@ -0,0 +1,7 @@
export interface UserItem {
key: string;
isEdit?: boolean;
number?: string;
name?: string;
department?: string;
}

View File

@@ -0,0 +1,13 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { UserScore } from './model';
export async function pageUserScores() {
const res = await request.get<ApiResult<PageResult<UserScore>>>(
'https://cdn.eleadmin.com/20200610/example-table-merge.json'
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}

View File

@@ -0,0 +1,7 @@
export interface UserScore {
id: number;
userName: string;
courseName: string;
score: number;
userNameRowSpan: number;
}