Commit 7a77a537 authored by akari's avatar akari
parents 050ace38 6523c986
...@@ -15,7 +15,9 @@ class CabinRepository { ...@@ -15,7 +15,9 @@ class CabinRepository {
Future<ResponseModel<CabinDetailResponse>> getCabinDetail( Future<ResponseModel<CabinDetailResponse>> getCabinDetail(
String carbinSn, String carbinSn,
) { ) {
if (Constants.useMockData) {
return _mockCabinDetail();
}
return DioRequest.instance.get<CabinDetailResponse>( return DioRequest.instance.get<CabinDetailResponse>(
'/icu/detail', '/icu/detail',
queryParameters: {'carbinSn': carbinSn}, queryParameters: {'carbinSn': carbinSn},
......
...@@ -14,12 +14,12 @@ class CabinMockData { ...@@ -14,12 +14,12 @@ class CabinMockData {
deviceId: 1001, deviceId: 1001,
deviceName: 'TSAAS ICU 设备', deviceName: 'TSAAS ICU 设备',
cabinId: 1, cabinId: 1,
cabinName: '1号舱', cabinName: '888',
cabinType: 'ICU', cabinType: 'ICU',
carbinSn: 'VE10085871QOXG', carbinSn: 'CNA07212L',
cameraSn: 'VE10085871QOXG', cameraSn: 'VE10085871Q0XG',
wifiPwd: '143548', wifiPwd: '143548',
wifiName: 'TSAAS-ICU-WiFi', wifiName: '设备',
petInfo: PetInfoResponse( petInfo: PetInfoResponse(
petId: 1, petId: 1,
name: '妮蔻', name: '妮蔻',
...@@ -37,7 +37,7 @@ class CabinMockData { ...@@ -37,7 +37,7 @@ class CabinMockData {
cameraInfo: CameraInfoResponse( cameraInfo: CameraInfoResponse(
cameraId: 1, cameraId: 1,
cameraName: '主摄像头', cameraName: '主摄像头',
sn: 'VE10085871QOXG', sn: 'VE10085871Q0XG',
cameraPwd: '143548', cameraPwd: '143548',
status: 'online', status: 'online',
streamUrl: '', streamUrl: '',
......
...@@ -39,8 +39,9 @@ class MonitoringAlertDetailDialog extends StatelessWidget { ...@@ -39,8 +39,9 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
_buildHeader(), _buildHeader(),
SizedBox(height: 30.h), SizedBox(height: 30.h),
_buildContent(context), _buildContent(context),
SizedBox(height: 40.h), _buildDesc(),
_buildBottomButtons(context), SizedBox(height: 60.h),
_buildBottomButtons(context),
], ],
), ),
); );
...@@ -64,7 +65,7 @@ class MonitoringAlertDetailDialog extends StatelessWidget { ...@@ -64,7 +65,7 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
'告警详情', '告警详情',
style: TextStyle( style: TextStyle(
color: const Color(0xFF00D4FF), color: const Color(0xFF00D4FF),
fontSize: 36.sp, fontSize: 28.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
...@@ -74,9 +75,9 @@ class MonitoringAlertDetailDialog extends StatelessWidget { ...@@ -74,9 +75,9 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
} }
Widget _buildContent(BuildContext context) { Widget _buildContent(BuildContext context) {
return Expanded( return Container(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 40.w), padding: EdgeInsets.only(left: 60.w, right: 60.w),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...@@ -114,15 +115,15 @@ class MonitoringAlertDetailDialog extends StatelessWidget { ...@@ -114,15 +115,15 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
Text( Text(
alert.title, alert.title,
style: TextStyle( style: TextStyle(
color: const Color(0xFFFFC14A), color: const Color(0xFFFFB700),
fontSize: 34.sp, fontSize: 48.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
Text( Text(
alert.time, alert.time,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Color(0xFFB1F0FF),
fontSize: 24.sp, fontSize: 24.sp,
), ),
), ),
...@@ -130,22 +131,33 @@ class MonitoringAlertDetailDialog extends StatelessWidget { ...@@ -130,22 +131,33 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
), ),
SizedBox(height: 20.h), SizedBox(height: 20.h),
_buildInfoRow('处理状态', isPending ? '待处理' : '已处理', isPending), _buildInfoRow('处理状态', isPending ? '待处理' : '已处理', isPending),
_buildInfoRow('处理状态', isPending ? '待处理' : '已处理', isPending),
_buildInfoRow('处理时间', '', false), _buildInfoRow('处理时间', '', false),
SizedBox(height: 30.h), SizedBox(height: 30.h),
Expanded( ],
child: SingleChildScrollView( );
child: Text( }
alert.description,
style: TextStyle( Widget _buildDesc() {
color: Colors.white, return Container(
fontSize: 24.sp, width: double.infinity,
height: 1.5, 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 { ...@@ -159,8 +171,8 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
child: Text( child: Text(
label, label,
style: TextStyle( style: TextStyle(
color: Colors.white.withValues(alpha: 153), color: Colors.white,
fontSize: 26.sp, fontSize: 30.sp,
), ),
), ),
), ),
...@@ -168,8 +180,8 @@ class MonitoringAlertDetailDialog extends StatelessWidget { ...@@ -168,8 +180,8 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
Text( Text(
value, value,
style: TextStyle( style: TextStyle(
color: isHighlight ? const Color(0xFFFFC14A) : Colors.white, color: isHighlight ? const Color(0xFFFFB700) : Colors.white,
fontSize: 26.sp, fontSize: 30.sp,
fontWeight: isHighlight ? FontWeight.bold : FontWeight.normal, fontWeight: isHighlight ? FontWeight.bold : FontWeight.normal,
), ),
), ),
...@@ -203,7 +215,7 @@ class MonitoringAlertDetailDialog extends StatelessWidget { ...@@ -203,7 +215,7 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
_buildButton( _buildButton(
'已处理', '已处理',
const Color(0xFF00D4FF), const Color(0xFF00D4FF),
Colors.black, Color(0xFFB1F0FF),
const Color(0xFF00D4FF), const Color(0xFF00D4FF),
() => _handleMarkAsProcessed(context), () => _handleMarkAsProcessed(context),
isActive: true, isActive: true,
...@@ -224,14 +236,17 @@ class MonitoringAlertDetailDialog extends StatelessWidget { ...@@ -224,14 +236,17 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
return GestureDetector( return GestureDetector(
onTap: onPressed, onTap: onPressed,
child: Container( child: Container(
width: 220.w, width: 261.w,
height: 72.h, height: 84.h,
decoration: BoxDecoration( decoration: BoxDecoration(
color: backgroundColor, image: const DecorationImage(
border: Border.all( image: AssetImage('lib/assets/monitoring/button_alert.png'),
color: borderColor, fit: BoxFit.fill,
width: 2.w,
), ),
// border: Border.all(
// color: borderColor,
// width: 2.w,
// ),
borderRadius: BorderRadius.circular(8.r), borderRadius: BorderRadius.circular(8.r),
boxShadow: isActive boxShadow: isActive
? [ ? [
...@@ -248,7 +263,7 @@ class MonitoringAlertDetailDialog extends StatelessWidget { ...@@ -248,7 +263,7 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
text, text,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
fontSize: 28.sp, fontSize: 32.sp,
fontWeight: FontWeight.bold, 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