提交代码
This commit is contained in:
1 parent
d9f760fe1c
commit
01588bf87d
484 files changed
+7228
-104711
No files matched your search
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
// 全局类型声明
|
||||
declare const uni: any
|
||||
|
||||
// uni-app API 类型声明
|
||||
declare namespace UniApp {
|
||||
interface RequestOptions {
|
||||
url: string
|
||||
method?: 'GET' | 'POST' | 'PUT' | 'DELETE'
|
||||
data?: any
|
||||
header?: Record<string, string>
|
||||
success?: (res: any) => void
|
||||
fail?: (err: any) => void
|
||||
complete?: () => void
|
||||
}
|
||||
|
||||
interface RequestResponse {
|
||||
statusCode: number
|
||||
data: any
|
||||
header: Record<string, string>
|
||||
}
|
||||
|
||||
interface ShowToastOptions {
|
||||
title: string
|
||||
icon?: 'success' | 'loading' | 'none'
|
||||
duration?: number
|
||||
mask?: boolean
|
||||
}
|
||||
|
||||
interface GetStorageSyncOptions {
|
||||
key: string
|
||||
}
|
||||
}
|
||||
|
||||
// 扩展全局对象
|
||||
declare global {
|
||||
const uni: {
|
||||
request(options: UniApp.RequestOptions): Promise<UniApp.RequestResponse>
|
||||
showToast(options: UniApp.ShowToastOptions): void
|
||||
getStorageSync(key: string): any
|
||||
setStorageSync(key: string, data: any): void
|
||||
removeStorageSync(key: string): void
|
||||
navigateTo(options: { url: string }): void
|
||||
redirectTo(options: { url: string }): void
|
||||
navigateBack(options?: { delta?: number }): void
|
||||
showModal(options: { title: string; content: string; success?: (res: any) => void }): void
|
||||
chooseFile(options: { count?: number; type?: string; success?: (res: any) => void }): void
|
||||
uploadFile(options: { url: string; filePath: string; name: string; formData?: any; success?: (res: any) => void }): void
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
// 请假表单数据类型
|
||||
export interface LeaveForm {
|
||||
id?: string | number
|
||||
studentId: string
|
||||
studentName: string
|
||||
studentNo: string
|
||||
classId: string
|
||||
className: string
|
||||
majorId: string
|
||||
majorName: string
|
||||
collegeId: string
|
||||
collegeName: string
|
||||
leaveTypeCode: string
|
||||
leaveTypeName: string
|
||||
startTime: string
|
||||
endTime: string
|
||||
leaveDuration: string
|
||||
isLeaveSchool: string
|
||||
needCancel: string
|
||||
emergencyContact: string
|
||||
emergencyPhone: string
|
||||
leaveReason: string
|
||||
leaveLocation: string
|
||||
attachmentOssIds: string
|
||||
approvalStatus: string
|
||||
approvalOpinion: string
|
||||
approvalTime: string
|
||||
approvalBy: string
|
||||
approvalByName: string
|
||||
cancelStatus: string
|
||||
cancelTime: string
|
||||
cancelLocation: string
|
||||
status: string
|
||||
}
|
||||
|
||||
// 请假类型配置
|
||||
export interface LeaveTypeConfig {
|
||||
id: string | number
|
||||
leaveTypeCode: string
|
||||
leaveTypeName: string
|
||||
isEnabled: string
|
||||
needCancelForNonLeave: string
|
||||
canApplyInAdvance: string
|
||||
maxApplyDuration: number
|
||||
createBy: number
|
||||
createTime: string
|
||||
updateBy: number
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
// 学生信息
|
||||
export interface StudentInfo {
|
||||
id: string | number
|
||||
name: string
|
||||
studentNo: string
|
||||
classId: string
|
||||
className: string
|
||||
majorId: string
|
||||
majorName: string
|
||||
collegeId: string
|
||||
collegeName: string
|
||||
}
|
||||
|
||||
// 附件信息
|
||||
export interface AttachmentInfo {
|
||||
uid: string
|
||||
name: string
|
||||
url?: string
|
||||
ossId?: string
|
||||
status: 'ready' | 'uploading' | 'success' | 'error'
|
||||
size?: number
|
||||
path?: string
|
||||
}
|
||||
|
||||
// 审批记录
|
||||
export interface ApprovalRecord {
|
||||
id: string | number
|
||||
businessId: string | number
|
||||
taskId: string
|
||||
approverId: string | number
|
||||
approverName: string
|
||||
roleName: string
|
||||
opinion: string
|
||||
rejectReason?: string
|
||||
result: 'approve' | 'reject' | 'pending'
|
||||
approvalTime: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
// 工作流任务
|
||||
export interface WorkflowTask {
|
||||
taskId: string
|
||||
businessId: string | number
|
||||
flowCode: string
|
||||
taskName: string
|
||||
assignee: string
|
||||
createTime: string
|
||||
dueDate?: string
|
||||
}
|
||||
|
||||
// 页面参数
|
||||
export interface PageParams {
|
||||
type?: string
|
||||
id?: string | number
|
||||
taskId?: string
|
||||
}
|
||||
|
||||
// API响应类型 - 从 request.d.ts 导入
|
||||
export type { ApiResponse } from '@/common/request'
|
||||
Reference in new issue
Block a user