Vendored
+141
@@ -0,0 +1,141 @@
|
||||
/**
|
||||
* 公共类型
|
||||
*/
|
||||
|
||||
export declare interface IObj {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export declare interface PageParams {
|
||||
page: !number;
|
||||
count: !number;
|
||||
[keys: string]: any; //任意属性
|
||||
}
|
||||
|
||||
export declare interface PageData {
|
||||
list: T;
|
||||
total: number;
|
||||
[keys: string]: any; //任意属性
|
||||
}
|
||||
interface RelayConf {
|
||||
ziyuankuHost: string; //资源库
|
||||
zhuanxiangHost: string; //专项
|
||||
|
||||
}
|
||||
|
||||
/* 系统配置 */
|
||||
export interface BaseConf {
|
||||
baseHost: string;
|
||||
ssoHost: string;
|
||||
serviceHost: string;
|
||||
relayConf: RelayConf;
|
||||
isMock: Boolean;
|
||||
isDebug?: Boolean;
|
||||
[keys: string]: any; //任意属性
|
||||
}
|
||||
|
||||
/* PC端角色 */
|
||||
export interface PcDebugUser {
|
||||
DebugUser: string;
|
||||
AppType: string;
|
||||
// yschapirequest: number;
|
||||
}
|
||||
|
||||
/* webapp端角色 */
|
||||
export declare interface WappDebugUser {
|
||||
ticket: string;
|
||||
schoolId: Number;
|
||||
userId: Number;
|
||||
roleId: Number;
|
||||
}
|
||||
|
||||
export declare interface CurrentRole {
|
||||
childId: number | null;
|
||||
roleId: number;
|
||||
schId: number;
|
||||
userId: number;
|
||||
}
|
||||
|
||||
export interface layoutData {
|
||||
appName: String;
|
||||
appList: string[];
|
||||
modList: Array<string>;
|
||||
userInfo: Object;
|
||||
ssoHost: String;
|
||||
baseHost: String;
|
||||
isAlone: Boolean; //是否只有一个选项卡
|
||||
}
|
||||
|
||||
export interface BaseDict {
|
||||
k: any;
|
||||
v: string | null;
|
||||
[keys: string]: any; //任意属性
|
||||
}
|
||||
|
||||
/* 计算表格高度的参数类型 */
|
||||
export interface UseTableSetting {
|
||||
/** 是否有查询面板 */
|
||||
isSearch: boolean = true;
|
||||
/** 是否有分页 */
|
||||
isPage: boolean = true;
|
||||
/** 是否是tabs布局 */
|
||||
isTabs: boolean = false;
|
||||
/** 是否有按钮操作 */
|
||||
isOperat: boolean = true;
|
||||
/** 额外的高度 */
|
||||
otherH: number = 0;
|
||||
}
|
||||
|
||||
/* 布局组件类型 */
|
||||
export interface LayoutData {
|
||||
appName: string | null;
|
||||
appList: Array<any>;
|
||||
modList: Array<any>;
|
||||
userInfo: any;
|
||||
ssoHost: string | null;
|
||||
baseHost: string | null;
|
||||
isAlone: boolean;
|
||||
}
|
||||
|
||||
/* 自定义弹出对话框 */
|
||||
export interface MyConfirm {
|
||||
title?: string;
|
||||
msg: string;
|
||||
info?: string;
|
||||
isLoading?: boolean;
|
||||
confirmText?: string;
|
||||
closeText?: string;
|
||||
onOk?: Function;
|
||||
onCancel?: Function;
|
||||
}
|
||||
|
||||
export declare enum NODE_ENV {
|
||||
/**
|
||||
*开发环境
|
||||
*/
|
||||
development = "development",
|
||||
/**
|
||||
*生产环境
|
||||
*/
|
||||
production = "production",
|
||||
}
|
||||
|
||||
export const _: any;
|
||||
export const $: any;
|
||||
|
||||
declare global {
|
||||
const $: any;
|
||||
const _: any;
|
||||
}
|
||||
|
||||
import Utils from "@/utils/index";
|
||||
import mittBus from '@/utils/mitt'
|
||||
import MyConfirm from "@/components/MyConfirm";
|
||||
|
||||
export interface VueGlobal {
|
||||
$conf: BaseConf;
|
||||
$bus: typeof mittBus;
|
||||
$utils: typeof Utils;
|
||||
$echarts: echarts;
|
||||
[key:string]:any;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/** 节点类型 */
|
||||
export enum NodeEnum {
|
||||
Root = 1,
|
||||
Group,
|
||||
Item,
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
import { BaseDict } from "./Basics";
|
||||
|
||||
export enum OperatorEnum {
|
||||
add,
|
||||
del,
|
||||
edit,
|
||||
sel,
|
||||
}
|
||||
|
||||
export enum UserRoleEnum {
|
||||
SuperAdmin = 1,
|
||||
School,
|
||||
}
|
||||
|
||||
//学段
|
||||
export enum SchoolStage {
|
||||
PRIMARY = 2,
|
||||
MIDDLE,
|
||||
HIGH,
|
||||
}
|
||||
|
||||
export const SchoolStageDict: BaseDict[] = [
|
||||
{
|
||||
k: SchoolStage.PRIMARY,
|
||||
v: "小学",
|
||||
},
|
||||
{
|
||||
k: SchoolStage.MIDDLE,
|
||||
v: "初中",
|
||||
},
|
||||
{
|
||||
k: SchoolStage.HIGH,
|
||||
v: "高中",
|
||||
},
|
||||
];
|
||||
|
||||
export enum RootNode {
|
||||
/** 资源 */
|
||||
ZIYUANKU = 1,
|
||||
/** 辅导 */
|
||||
TUTORING = 2,
|
||||
/** 题库 */
|
||||
QUESTION = 3,
|
||||
/** 试卷 */
|
||||
SHIJUAN = 4,
|
||||
/** 专项 */
|
||||
ZHUANXIANG = 5,
|
||||
}
|
||||
|
||||
export const RootNodeDict: BaseDict[] = [
|
||||
{
|
||||
k: RootNode.ZIYUANKU,
|
||||
v: "资源",
|
||||
path: "ziyuan",
|
||||
},
|
||||
{
|
||||
k: RootNode.TUTORING,
|
||||
v: "辅导",
|
||||
path: "fudao",
|
||||
},
|
||||
{
|
||||
k: RootNode.QUESTION,
|
||||
v: "题库",
|
||||
path: "tiku",
|
||||
},
|
||||
{
|
||||
k: RootNode.SHIJUAN,
|
||||
v: "试卷",
|
||||
path: "shijuan",
|
||||
},
|
||||
{
|
||||
k: RootNode.ZHUANXIANG,
|
||||
v: "专项",
|
||||
path: "zhuanxiang",
|
||||
},
|
||||
];
|
||||
|
||||
export enum BooxType {
|
||||
/** 教材 */
|
||||
TextBook = 1,
|
||||
/** 教辅 */
|
||||
TeachingTutoring,
|
||||
}
|
||||
|
||||
export const BooxTypeDict: BaseDict[] = [
|
||||
{
|
||||
k: BooxType.TextBook,
|
||||
v: "教材",
|
||||
},
|
||||
{
|
||||
k: BooxType.TeachingTutoring,
|
||||
v: "教辅",
|
||||
},
|
||||
];
|
||||
|
||||
//学校学段学制
|
||||
export interface SchLenLevel {
|
||||
stage: SchoolStage;
|
||||
name: string;
|
||||
grades: LenGrade[];
|
||||
}
|
||||
|
||||
export interface LenGrade {
|
||||
gradeId: number;
|
||||
gradeName: string;
|
||||
stage: number;
|
||||
}
|
||||
|
||||
export interface AcademicYear {
|
||||
year: number;
|
||||
semester: number | null;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface Subject {
|
||||
id: number;
|
||||
tenantId: number;
|
||||
baseId: null;
|
||||
creatorId: number;
|
||||
createDate: string;
|
||||
name: string;
|
||||
code: string;
|
||||
orderNum: number;
|
||||
alias: string;
|
||||
stage: number;
|
||||
enable: boolean;
|
||||
disabled: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1 积分详情
|
||||
* 2 分数详情
|
||||
*/
|
||||
export type ScoreModalType = 1 | 2;
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @description 扩展ruoter-meta的类型 此处必须要export {} 不然找不到类型
|
||||
*/
|
||||
declare module "vue-router" {
|
||||
interface RouteMeta {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
modId?: number;
|
||||
parentId?: number;
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
import Vue, { VNode } from "vue";
|
||||
|
||||
declare global {
|
||||
namespace JSX {
|
||||
// tslint:disable no-empty-interface
|
||||
interface Element extends VNode {}
|
||||
// tslint:disable no-empty-interface
|
||||
interface ElementClass extends Vue {}
|
||||
interface IntrinsicElements {
|
||||
[elem: string]: any;
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
declare module "*.vue" {
|
||||
import { DefineComponent } from "vue";
|
||||
const component: DefineComponent<{}, {}, any>;
|
||||
export default component;
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
/**
|
||||
* 课程表模块类型契约(与后端 com.yunhai.acasyllabu.model.syllabus / model.bsch 对齐,Jackson 驼峰)。
|
||||
*
|
||||
* 业务要点:
|
||||
* - 电子课程表:每班每学年学期一份,节次(默认 10 节,可增删)× 周一~周日学科 + 起止时间;
|
||||
* 时段(上午 <12:30 / 下午 12:30–18:30 / 晚自习 ≥18:30)由前端按开始时间实时判定,不落库。
|
||||
* - 课表读写都定位到当前学年学期(班级服务),历史学年学期数据保留但查询不再返回。
|
||||
* - 照片课程表:每班一张图片(up_file 附件,topicType=timetable)。
|
||||
*/
|
||||
|
||||
// ==================== 班级树 / 学科(班级服务派生) ====================
|
||||
|
||||
/** 年级→班级树节点(叶子=班级,附学生数) */
|
||||
export interface ClassTreeNode {
|
||||
id: number;
|
||||
name: string;
|
||||
isParent: boolean;
|
||||
studentCount?: number;
|
||||
children?: ClassTreeNode[];
|
||||
}
|
||||
|
||||
/** 学校学科 */
|
||||
export interface SubjectVo {
|
||||
id: number;
|
||||
code: string | null;
|
||||
name: string;
|
||||
}
|
||||
|
||||
/** 当前学年学期(/api/timetable/NowYearTerm,日期为 yyyy-MM-dd 字符串) */
|
||||
export interface NowYearTermVo {
|
||||
year: number;
|
||||
term: number;
|
||||
id: number;
|
||||
yearStartDate: string | null;
|
||||
yearEndDate: string | null;
|
||||
firstTermStartDate: string | null;
|
||||
firstTermEndDate: string | null;
|
||||
secondTermStartDate: string | null;
|
||||
secondTermEndDate: string | null;
|
||||
upgradeDate: string | null;
|
||||
termStartDate: string | null;
|
||||
termEndDate: string | null;
|
||||
nowYear: boolean;
|
||||
}
|
||||
|
||||
// ==================== 课程表 ====================
|
||||
|
||||
/** 节次(subjects 固定 7 位,下标 0~6 对应周一~周日,空串=未排) */
|
||||
export interface TimetableSlotVo {
|
||||
slotNo: number;
|
||||
start: string;
|
||||
end: string;
|
||||
subjects: string[];
|
||||
}
|
||||
|
||||
/** 课程表(电子版节次 + 照片版附件信息;year/term 为当前学年学期) */
|
||||
export interface TimetableVo {
|
||||
classId: number;
|
||||
year: number;
|
||||
term: number;
|
||||
className: string | null;
|
||||
gradeName: string | null;
|
||||
teacherId: number | null;
|
||||
photoFileId: number | null;
|
||||
photoName: string | null;
|
||||
photoSize: number | null;
|
||||
slots: TimetableSlotVo[];
|
||||
}
|
||||
|
||||
/** 电子课程表整表保存请求 */
|
||||
export interface TimetableSaveRequest {
|
||||
classId: number;
|
||||
slots: TimetableSlotVo[];
|
||||
}
|
||||
|
||||
// ==================== 我的课表(按角色过滤的只读视图) ====================
|
||||
|
||||
/**
|
||||
* 「我的课表」可查看班级。
|
||||
* 管理员/校领导=全校班级全部科目;班主任=所带班级全部科目;任教老师=任教班级任教科目。
|
||||
*/
|
||||
export interface MyClassVo {
|
||||
classId: number;
|
||||
className: string | null;
|
||||
gradeName: string | null;
|
||||
/** 是否班主任(正/副班主任) */
|
||||
headTeacher: boolean;
|
||||
/** 是否展示全部科目 */
|
||||
viewAllSubjects: boolean;
|
||||
/** 本人在该班任教科目(viewAllSubjects=false 时非空) */
|
||||
subjects: string[];
|
||||
}
|
||||
|
||||
/** 「我的课表」班级课表(任教老师非任教科目格已被后端清空) */
|
||||
export interface MyTimetableVo extends TimetableVo {
|
||||
viewAllSubjects: boolean;
|
||||
mySubjects: string[];
|
||||
}
|
||||
|
||||
// ==================== 应用设置(时段判定 + 节次模板) ====================
|
||||
|
||||
/**
|
||||
* 时段判定时间设置(边界 HH:mm,依次递增;时段按节次开始时间判定)。
|
||||
* 启用时段与节次/课间时长自 2026-10-12 起绑定到节次模板(模板内维护),
|
||||
* ForGrade 返回的 time 会把生效模板的这三个值带出来(课表编排页按模板判定时段)。
|
||||
*/
|
||||
export interface TimeSettingVo {
|
||||
/** 早自习截止(开始时间早于此 → 早自习) */
|
||||
morningSelfEnd: string;
|
||||
/** 上午截止(同时为中午开始) */
|
||||
forenoonEnd: string;
|
||||
/** 下午开始(同时为中午结束) */
|
||||
afternoonStart: string;
|
||||
/** 晚自习开始(开始时间晚于此 → 晚自习) */
|
||||
eveningStart: string;
|
||||
/** 启用时段 5 位 0/1 串,顺序固定:早自习 上午 中午 下午 晚自习 */
|
||||
enabledBands: string;
|
||||
/** 节次时长(分钟),默认 45 */
|
||||
periodMinutes: number;
|
||||
/** 课间时长(分钟),默认 10 */
|
||||
breakMinutes: number;
|
||||
}
|
||||
|
||||
/** 节次模板行。rowType:period=教学节次(name 可自定义,空按顺序显示第X节);break=空白行(课间/午休,可命名、可备注、可设时间、不占节次序号、不排课程) */
|
||||
export interface TemplateRowVo {
|
||||
rowType: "period" | "break";
|
||||
/** 所属时段 es/am/noon/pm/ev(随行保存,时段不按开始时间判定);节次与空白行都落在时段里 */
|
||||
band?: string | null;
|
||||
/** 行名称:period 行可自定义(空显示第X节);break 行自定义(如 课间/午休) */
|
||||
name: string | null;
|
||||
/** 备注(仅空白行可填写) */
|
||||
remark?: string | null;
|
||||
start: string;
|
||||
end: string;
|
||||
}
|
||||
|
||||
/** 节次模板(绑定学期×多年级;同学期年级有交集的同时只启用一套;teachDays 为 7 位 0/1 串,周一~周日) */
|
||||
export interface PeriodTemplateVo {
|
||||
id: number;
|
||||
name: string;
|
||||
/** 绑定学期:1=上学期 2=下学期 */
|
||||
term: number;
|
||||
/** 适用年级(可多选) */
|
||||
gradeNames: string[];
|
||||
enabled: boolean;
|
||||
teachDays: string;
|
||||
/** 启用时段 5 位 0/1 串,顺序固定:早自习 上午 中午 下午 晚自习(随模板保存) */
|
||||
enabledBands: string;
|
||||
/** 节次时长(分钟),模板加节次的默认用时 */
|
||||
periodMinutes: number;
|
||||
/** 课间时长(分钟),模板加空白行的默认用时 */
|
||||
breakMinutes: number;
|
||||
rows: TemplateRowVo[];
|
||||
}
|
||||
|
||||
/** 应用设置聚合(时间设置 + 全部模板含行) */
|
||||
export interface SettingGetVo {
|
||||
time: TimeSettingVo;
|
||||
templates: PeriodTemplateVo[];
|
||||
}
|
||||
|
||||
/** 节次模板整存请求(id 空=新建;全量替换行) */
|
||||
export interface TemplateSaveRequest {
|
||||
id?: number;
|
||||
name: string;
|
||||
/** 绑定学期:1=上学期 2=下学期 */
|
||||
term: number;
|
||||
/** 适用年级(可多选) */
|
||||
gradeNames: string[];
|
||||
enabled: boolean;
|
||||
teachDays: string;
|
||||
/** 启用时段 5 位 0/1 串(早自习 上午 中午 下午 晚自习),随模板保存 */
|
||||
enabledBands: string;
|
||||
/** 节次时长(分钟) */
|
||||
periodMinutes: number;
|
||||
/** 课间时长(分钟) */
|
||||
breakMinutes: number;
|
||||
rows: TemplateRowVo[];
|
||||
}
|
||||
|
||||
/** 课表编辑页生效设置:时间边界 + 指定年级启用模板的行(无启用模板则 rows 空) */
|
||||
export interface EffectiveSettingVo {
|
||||
time: TimeSettingVo;
|
||||
rows: TemplateRowVo[];
|
||||
/** 生效模板教学日 7 位 0/1 串(周一~周日);无启用模板时 7 天全开 */
|
||||
teachDays: string;
|
||||
/** 生效模板名称(如 春),无启用模板时为空 */
|
||||
templateName: string | null;
|
||||
}
|
||||
|
||||
// ==================== 通用 ====================
|
||||
|
||||
/** 附件上传返回(/api/file/Upload) */
|
||||
export interface UpFileResultVo {
|
||||
fileid: number;
|
||||
host: string;
|
||||
fileurl: string;
|
||||
name: string;
|
||||
type: string;
|
||||
size: number;
|
||||
}
|
||||
|
||||
/** 用户信息(/api/base/GetUserInfo) */
|
||||
export interface UserInfoVo {
|
||||
id: number;
|
||||
name: string;
|
||||
role: "teacher" | "parent";
|
||||
profilePicture: string;
|
||||
school: { id: number; name: string };
|
||||
currentRole?: { childId: number; roleId: number; schId: number; userId: number };
|
||||
}
|
||||
|
||||
/** 模块菜单节点(/api/base/GetUserMod) */
|
||||
export interface ModNode {
|
||||
id: number;
|
||||
name: string;
|
||||
modId: number;
|
||||
page: string;
|
||||
children?: ModNode[];
|
||||
}
|
||||
Reference in New Issue
Block a user