init: 迁移本地前端代码(Gitea 仓库重建后重新初始化)
This commit is contained in:
@@ -0,0 +1,266 @@
|
||||
/**
|
||||
* 通知公告前端类型契约(P1-7)
|
||||
*
|
||||
* 与后端 VO/DTO 一一对齐:
|
||||
* - NoticeVo → 后端 model/notice/NoticeVo.java(Jackson 默认驼峰序列化)
|
||||
* - NoticeDetailVo → 后端 model/notice/NoticeDetailVo.java(@JsonProperty 保留旧字段名)
|
||||
* - BasePageResult → 后端 model/BasePageResult.java
|
||||
* - NoticePageResult extends BasePageResult → 后端 model/notice/NoticePageResult.java
|
||||
* - UpFileResultVo → 后端 model/notice/UpFileResultVo.java(@JsonProperty)
|
||||
* - UpFileVo → 后端 model/notice/UpFileVo.java
|
||||
* - InitializeRedVo → 后端 model/notice/InitializeRedVo.java(@JsonProperty)
|
||||
* - NoticeStatisticsVo → 后端 model/notice/NoticeStatisticsVo.java
|
||||
* - NoticeRequest → 后端 model/notice/NoticeRequest.java
|
||||
* - NoticeQuery → 后端 model/notice/NoticeQuery.java + BasePageQuery.java
|
||||
*/
|
||||
|
||||
// ============================ 分页外壳 ============================
|
||||
|
||||
/** 统一分页响应外壳(对齐 BasePageResult.java) */
|
||||
export interface BasePageResult<T> {
|
||||
total: number;
|
||||
content: T[];
|
||||
pageIndex: number;
|
||||
pageSize: number;
|
||||
totalPages: number;
|
||||
hasNext: boolean;
|
||||
}
|
||||
|
||||
/** 通知分页结果(对齐 NoticePageResult.java,扩展 unreadCount) */
|
||||
export interface NoticePageResult<T> extends BasePageResult<T> {
|
||||
/** 当前用户未读通知总数 */
|
||||
unreadCount: number;
|
||||
}
|
||||
|
||||
// ============================ 通知列表项 ============================
|
||||
|
||||
/** 通知视图对象(对齐 NoticeVo.java,Jackson 默认驼峰序列化) */
|
||||
export interface NoticeVo {
|
||||
id: number;
|
||||
title: string;
|
||||
content: string;
|
||||
type: number;
|
||||
typeDesc: string;
|
||||
publisherAccount: string;
|
||||
publisherName: string;
|
||||
deptId: string;
|
||||
deptName: string;
|
||||
status: number;
|
||||
statusDesc: string;
|
||||
topmost: number;
|
||||
/** 已读人数 */
|
||||
readCount: number;
|
||||
/** 应读人数 */
|
||||
allowCount: number;
|
||||
/** 当前用户是否已读 */
|
||||
read: boolean;
|
||||
/** 是否撤回:0 否 / 1 是 */
|
||||
isPulled: number;
|
||||
/** 定时发送时间 */
|
||||
timingSendTime: string | null;
|
||||
/** 父通知ID(转发时关联原通知) */
|
||||
parentId: number | null;
|
||||
/** 短信发送标记 */
|
||||
smsFlag: number;
|
||||
/** 接收人列表(JSON) */
|
||||
receiveList: string | null;
|
||||
createBy: string | null;
|
||||
createTime: string | null;
|
||||
updateBy: string | null;
|
||||
updateTime: string | null;
|
||||
}
|
||||
|
||||
// ============================ 通知详情 ============================
|
||||
|
||||
/** 通知详情视图对象(对齐 NoticeDetailVo.java,@JsonProperty 保留旧字段名) */
|
||||
export interface NoticeDetailVo {
|
||||
serid: number;
|
||||
title: string;
|
||||
/** 通知内容(旧字段名 Contents) */
|
||||
Contents: string;
|
||||
/** 发布部门ID(旧字段名 DeptID) */
|
||||
DeptID: string;
|
||||
/** 发布部门名称(旧字段名 DeptName) */
|
||||
DeptName: string;
|
||||
/** 发布人姓名(旧字段名 TeaName) */
|
||||
TeaName: string;
|
||||
/** 发布时间(旧字段名 EditDate,已格式化为字符串) */
|
||||
EditDate: string;
|
||||
/** 应读人数 */
|
||||
numcount: number;
|
||||
/** 已读人数 */
|
||||
readnumcount: number;
|
||||
/** 接收人列表 */
|
||||
ReceiveList: string | null;
|
||||
/** 定时发送时间(旧字段名 DsfsTime,已格式化) */
|
||||
DsfsTime: string | null;
|
||||
/** 是否定时发送 */
|
||||
isDsfs: boolean;
|
||||
/** 附件列表(旧字段名 ChaoSend) */
|
||||
ChaoSend: NoticeDetailFileItem[];
|
||||
/** 接收人列表:"all" 或账号数组 */
|
||||
tlist: string | string[];
|
||||
}
|
||||
|
||||
/** 通知详情附件项(对齐 NoticeDetailVo.FileItem) */
|
||||
export interface NoticeDetailFileItem {
|
||||
id: number;
|
||||
name: string;
|
||||
size: number;
|
||||
fileid: number;
|
||||
filename: string;
|
||||
}
|
||||
|
||||
// ============================ 文件上传 ============================
|
||||
|
||||
/** 文件上传结果(对齐 UpFileResultVo.java,@JsonProperty) */
|
||||
export interface UpFileResultVo {
|
||||
fileid: number;
|
||||
name: string;
|
||||
fileurl: string;
|
||||
host: string;
|
||||
type: string;
|
||||
size: number;
|
||||
}
|
||||
|
||||
/** 附件视图对象(对齐 UpFileVo.java) */
|
||||
export interface UpFileVo {
|
||||
id: number;
|
||||
fileTrueName: string;
|
||||
fileName: string;
|
||||
fileSize: number;
|
||||
fileType: string;
|
||||
topicId: number;
|
||||
topicType: string;
|
||||
}
|
||||
|
||||
// ============================ 一键已读 ============================
|
||||
|
||||
/** 一键已读结果(对齐 InitializeRedVo.java,@JsonProperty) */
|
||||
export interface InitializeRedVo {
|
||||
count: number;
|
||||
}
|
||||
|
||||
// ============================ 上一篇/下一篇 ============================
|
||||
|
||||
/** 上一篇/下一篇通知ID */
|
||||
export interface NextPrevVo {
|
||||
prevId: number;
|
||||
nextId: number;
|
||||
}
|
||||
|
||||
// ============================ 阅读情况 ============================
|
||||
|
||||
/** 阅读情况分组项(后端 Map 返回,字段名固定) */
|
||||
export interface ReadGroup {
|
||||
GroupName: string;
|
||||
teaslist: ReadGroupUser[];
|
||||
}
|
||||
|
||||
/** 阅读情况用户项(后端 Map 返回) */
|
||||
export interface ReadGroupUser {
|
||||
account: string;
|
||||
teaname: string;
|
||||
states: 'read' | 'unread';
|
||||
}
|
||||
|
||||
// ============================ 统计 ============================
|
||||
|
||||
/** 通知统计视图(对齐 NoticeStatisticsVo.java) */
|
||||
export interface NoticeStatisticsVo {
|
||||
total: number;
|
||||
publishedCount: number;
|
||||
totalReadRecords: number;
|
||||
unreadForCurrentUser: number;
|
||||
byPublisher: { publisherName: string; count: number }[];
|
||||
byMonth: { year: number; month: number; count: number }[];
|
||||
}
|
||||
|
||||
// ============================ 请求入参 ============================
|
||||
|
||||
/** 通知发布/编辑入参(对齐 NoticeRequest.java) */
|
||||
export interface NoticeRequest {
|
||||
title: string;
|
||||
content?: string;
|
||||
type?: number;
|
||||
deptId: string;
|
||||
deptName?: string;
|
||||
topmost?: number;
|
||||
receiveList?: string;
|
||||
/** 附件文件ID列表(逗号分隔串) */
|
||||
fileIds?: string;
|
||||
timingSendTime?: string;
|
||||
/** 短信发送标记 */
|
||||
smsFlag?: number;
|
||||
/** 转发源通知ID */
|
||||
sourceId?: number;
|
||||
}
|
||||
|
||||
/** 通知列表查询参数(对齐 NoticeQuery.java + BasePageQuery.java) */
|
||||
export interface NoticeQuery {
|
||||
pageIndex?: number;
|
||||
pageSize?: number;
|
||||
keyword?: string;
|
||||
status?: number;
|
||||
type?: number;
|
||||
/** 列表范围(管理端):"user" 只看自己发布的,不传=全部 */
|
||||
scope?: string;
|
||||
deptId?: string;
|
||||
publisherAccount?: string;
|
||||
/** 开始时间(yyyy-MM-dd 短日期) */
|
||||
startTime?: string;
|
||||
/** 结束时间(yyyy-MM-dd 短日期) */
|
||||
endTime?: string;
|
||||
/** 阅读状态过滤(仅用户端):0 全部 / 1 未读 / 2 已读 */
|
||||
readType?: number;
|
||||
/** 排序:1 时间倒序 / 2 时间正序 */
|
||||
orderByTime?: string;
|
||||
}
|
||||
|
||||
// ============================ 字典/联系组 ============================
|
||||
|
||||
/** 系统字典下拉项 */
|
||||
export interface DictOption {
|
||||
k: number | string;
|
||||
v: string | null;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/** 发文部门管理列表项 */
|
||||
export interface DeptManageItem {
|
||||
SerID: number;
|
||||
CodeID: string;
|
||||
Name: string;
|
||||
Enable: number;
|
||||
}
|
||||
|
||||
/** 联系组列表项 */
|
||||
export interface ContactGroupItem {
|
||||
serid: number;
|
||||
GroupName: string;
|
||||
}
|
||||
|
||||
/** 联系组分页结果 */
|
||||
export interface ContactGroupPage {
|
||||
list: ContactGroupItem[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
/** 联系组用户项 */
|
||||
export interface ContactUser {
|
||||
account: string;
|
||||
name: string;
|
||||
userId?: number;
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/** 联系组用户分页结果 */
|
||||
export interface ContactUserPage {
|
||||
list: ContactUser[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
/** 组织树节点(基础平台返回) */
|
||||
export interface SchoolTreeNode {
|
||||
[key: string]: any;
|
||||
}
|
||||
Reference in New Issue
Block a user