告警中心的二级详情页面+信息中心的页面+对接机器人接口

This commit is contained in:
2026-06-02 08:40:50 +08:00
parent 9eab402551
commit d8879dad62
48 changed files with 4376 additions and 0 deletions

View File

@@ -0,0 +1,94 @@
import 'package:equatable/equatable.dart';
/// 消息类型枚举
enum MessageType {
all('全部'),
alarm('告警'),
workorder('工单'),
system('系统'),
manager('负责人'),
daily('日报'),
safety('安全');
const MessageType(this.label);
final String label;
}
/// 消息分类实体
class MessageCategoryEntity extends Equatable {
const MessageCategoryEntity({
required this.type,
required this.icon,
required this.iconColor,
required this.title,
required this.content,
required this.time,
this.unreadCount = 0,
this.targetId,
this.targetRoute,
});
/// 消息类型
final MessageType type;
/// 图标名称
final String icon;
/// 图标颜色
final String iconColor;
/// 标题
final String title;
/// 内容摘要
final String content;
/// 时间
final String time;
/// 未读数量
final int unreadCount;
/// 目标ID(用于跳转)
final String? targetId;
/// 目标路由(用于跳转)
final String? targetRoute;
@override
List<Object?> get props => [
type,
icon,
iconColor,
title,
content,
time,
unreadCount,
targetId,
targetRoute,
];
MessageCategoryEntity copyWith({
MessageType? type,
String? icon,
String? iconColor,
String? title,
String? content,
String? time,
int? unreadCount,
String? targetId,
String? targetRoute,
}) {
return MessageCategoryEntity(
type: type ?? this.type,
icon: icon ?? this.icon,
iconColor: iconColor ?? this.iconColor,
title: title ?? this.title,
content: content ?? this.content,
time: time ?? this.time,
unreadCount: unreadCount ?? this.unreadCount,
targetId: targetId ?? this.targetId,
targetRoute: targetRoute ?? this.targetRoute,
);
}
}