Commit 7a77a537 authored by akari's avatar akari
parents 050ace38 6523c986
......@@ -15,7 +15,9 @@ class CabinRepository {
Future<ResponseModel<CabinDetailResponse>> getCabinDetail(
String carbinSn,
) {
if (Constants.useMockData) {
return _mockCabinDetail();
}
return DioRequest.instance.get<CabinDetailResponse>(
'/icu/detail',
queryParameters: {'carbinSn': carbinSn},
......
......@@ -14,12 +14,12 @@ class CabinMockData {
deviceId: 1001,
deviceName: 'TSAAS ICU 设备',
cabinId: 1,
cabinName: '1号舱',
cabinName: '888',
cabinType: 'ICU',
carbinSn: 'VE10085871QOXG',
cameraSn: 'VE10085871QOXG',
carbinSn: 'CNA07212L',
cameraSn: 'VE10085871Q0XG',
wifiPwd: '143548',
wifiName: 'TSAAS-ICU-WiFi',
wifiName: '设备',
petInfo: PetInfoResponse(
petId: 1,
name: '妮蔻',
......@@ -37,7 +37,7 @@ class CabinMockData {
cameraInfo: CameraInfoResponse(
cameraId: 1,
cameraName: '主摄像头',
sn: 'VE10085871QOXG',
sn: 'VE10085871Q0XG',
cameraPwd: '143548',
status: 'online',
streamUrl: '',
......
......@@ -39,8 +39,9 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
_buildHeader(),
SizedBox(height: 30.h),
_buildContent(context),
SizedBox(height: 40.h),
_buildBottomButtons(context),
_buildDesc(),
SizedBox(height: 60.h),
_buildBottomButtons(context),
],
),
);
......@@ -64,7 +65,7 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
'告警详情',
style: TextStyle(
color: const Color(0xFF00D4FF),
fontSize: 36.sp,
fontSize: 28.sp,
fontWeight: FontWeight.bold,
),
),
......@@ -74,9 +75,9 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
}
Widget _buildContent(BuildContext context) {
return Expanded(
return Container(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 40.w),
padding: EdgeInsets.only(left: 60.w, right: 60.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
......@@ -114,15 +115,15 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
Text(
alert.title,
style: TextStyle(
color: const Color(0xFFFFC14A),
fontSize: 34.sp,
color: const Color(0xFFFFB700),
fontSize: 48.sp,
fontWeight: FontWeight.bold,
),
),
Text(
alert.time,
style: TextStyle(
color: Colors.white,
color: Color(0xFFB1F0FF),
fontSize: 24.sp,
),
),
......@@ -130,22 +131,33 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
),
SizedBox(height: 20.h),
_buildInfoRow('处理状态', isPending ? '待处理' : '已处理', isPending),
_buildInfoRow('处理状态', isPending ? '待处理' : '已处理', isPending),
_buildInfoRow('处理时间', '', false),
SizedBox(height: 30.h),
Expanded(
child: SingleChildScrollView(
child: Text(
alert.description,
style: TextStyle(
color: Colors.white,
fontSize: 24.sp,
height: 1.5,
),
),
],
);
}
Widget _buildDesc() {
return Container(
width: double.infinity,
padding: EdgeInsets.only(left: 60.w,right: 60.w),
decoration: BoxDecoration(
border: Border.all(
color: Colors.red,
width: 1.w,
),
),
child: SingleChildScrollView(
child: Text(
// alert.description,
"2023年2月,华为云集中发布了三款软件开发工具:需求管理服务 CodeArts Req、测试管理服务 CodeArts TestPlan、代码检查服务 CodeArts Check。随着 CodeArts 不断的丰富与发展,华为云在 DevSecOps 领域的布局又迈出了稳健的一步。 [22]2023年2月14日,华为云发布分布式编译构建系统 CodeArts Build,旨在支撑企业实现高效的软件开发,缩短产品上市周期,帮助企业的软件产品快速形成关键竞争力。",
style: TextStyle(
color: Color(0xFFB1F0FF),
fontSize: 24.sp,
height: 1.5,
),
),
],
),
);
}
......@@ -159,8 +171,8 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
child: Text(
label,
style: TextStyle(
color: Colors.white.withValues(alpha: 153),
fontSize: 26.sp,
color: Colors.white,
fontSize: 30.sp,
),
),
),
......@@ -168,8 +180,8 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
Text(
value,
style: TextStyle(
color: isHighlight ? const Color(0xFFFFC14A) : Colors.white,
fontSize: 26.sp,
color: isHighlight ? const Color(0xFFFFB700) : Colors.white,
fontSize: 30.sp,
fontWeight: isHighlight ? FontWeight.bold : FontWeight.normal,
),
),
......@@ -203,7 +215,7 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
_buildButton(
'已处理',
const Color(0xFF00D4FF),
Colors.black,
Color(0xFFB1F0FF),
const Color(0xFF00D4FF),
() => _handleMarkAsProcessed(context),
isActive: true,
......@@ -224,14 +236,17 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
return GestureDetector(
onTap: onPressed,
child: Container(
width: 220.w,
height: 72.h,
width: 261.w,
height: 84.h,
decoration: BoxDecoration(
color: backgroundColor,
border: Border.all(
color: borderColor,
width: 2.w,
image: const DecorationImage(
image: AssetImage('lib/assets/monitoring/button_alert.png'),
fit: BoxFit.fill,
),
// border: Border.all(
// color: borderColor,
// width: 2.w,
// ),
borderRadius: BorderRadius.circular(8.r),
boxShadow: isActive
? [
......@@ -248,7 +263,7 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
text,
style: TextStyle(
color: textColor,
fontSize: 28.sp,
fontSize: 32.sp,
fontWeight: FontWeight.bold,
),
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment