日报周报月报
This commit is contained in:
@@ -39,7 +39,7 @@ class _MhMessageListWidgetState extends State<MhMessageListWidget> {
|
||||
highlightColor: Color(0xFF055466),
|
||||
borderRadius: 20.rpx,
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(31.rpx, 33.rpx, 26.rpx, 26.rpx),
|
||||
EdgeInsetsDirectional.fromSTEB(30.rpx, 26.rpx, 30.rpx, 26.rpx),
|
||||
onTap: () {},
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
@@ -47,7 +47,7 @@ class _MhMessageListWidgetState extends State<MhMessageListWidget> {
|
||||
Container(
|
||||
width: double.infinity,
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 66.rpx,
|
||||
minHeight: 60.rpx,
|
||||
),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
@@ -63,94 +63,90 @@ class _MhMessageListWidgetState extends State<MhMessageListWidget> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 30.rpx,
|
||||
maxWidth: 140.rpx,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: messageInfo['data']['val']
|
||||
.map<Widget>((mapItem) =>
|
||||
_buildInfoItem(context, mapItem['k'] ?? ''))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 30.rpx,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: messageInfo['data']['val']
|
||||
.map<Widget>((mapItem) =>
|
||||
_buildValueItem(context, mapItem['v'] ?? ''))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 30.rpx)),
|
||||
),
|
||||
if (messageInfo['type'] == 'app_system')
|
||||
|
||||
// // right: 26.rpx,
|
||||
// left: 26.rpx,
|
||||
Row(mainAxisSize: MainAxisSize.max, children: [
|
||||
Container(
|
||||
// width: 123.rpx,
|
||||
height: 61.rpx,
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx, // 直角
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
colors: [Color(0xFF84F5FF)],
|
||||
enableAnimation: true, // 有点击缩放动画
|
||||
enableGradient: false, // 不用渐变
|
||||
onTap: () {
|
||||
// if (messageInfo['status'] == 1) {
|
||||
// showConfirmDialog(
|
||||
// context, Container(), "是否确认接受该设备".tr,
|
||||
// onConfirm: () async {
|
||||
// ApiResponse apiResponse =
|
||||
// await deviceShareController.confirmShare(
|
||||
// messageInfo['data']['shareCode']);
|
||||
// if (apiResponse.code == HttpStatusCodes.ok) {
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: apiResponse.msg!,
|
||||
// textColor: themeController.currentColor.sc2,
|
||||
// );
|
||||
// messageController.getMessageList();
|
||||
// messageController.updateAll();
|
||||
// } else {
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: apiResponse.msg!,
|
||||
// textColor: themeController.currentColor.sc9,
|
||||
// );
|
||||
// messageController.getMessageList();
|
||||
// messageController.updateAll();
|
||||
// }
|
||||
// }, onCancel: () {});
|
||||
// }
|
||||
Get.toNamed('/messageDetail', arguments: messageInfo);
|
||||
},
|
||||
child: Center(
|
||||
child: Text(
|
||||
// getMessageStatus(messageInfo['status']),
|
||||
"查看详情",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: Color(0xFF011D33),
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 60.rpx,
|
||||
maxWidth: 140.rpx,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: messageInfo['data']['val']
|
||||
.map<Widget>((mapItem) =>
|
||||
_buildInfoItem(context, mapItem['k'] ?? ''))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 60.rpx,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: messageInfo['data']['val']
|
||||
.map<Widget>((mapItem) =>
|
||||
_buildValueItem(context, mapItem['v'] ?? ''))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
]),
|
||||
if (messageInfo['type'] == 'app_system')
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 28.rpx),
|
||||
child: Container(
|
||||
height: 60.rpx,
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx, // 直角
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
colors: [Color(0xFF84F5FF)],
|
||||
enableAnimation: true, // 有点击缩放动画
|
||||
enableGradient: false, // 不用渐变
|
||||
onTap: () {
|
||||
// if (messageInfo['status'] == 1) {
|
||||
// showConfirmDialog(
|
||||
// context, Container(), "是否确认接受该设备".tr,
|
||||
// onConfirm: () async {
|
||||
// ApiResponse apiResponse =
|
||||
// await deviceShareController.confirmShare(
|
||||
// messageInfo['data']['shareCode']);
|
||||
// if (apiResponse.code == HttpStatusCodes.ok) {
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: apiResponse.msg!,
|
||||
// textColor: themeController.currentColor.sc2,
|
||||
// );
|
||||
// messageController.getMessageList();
|
||||
// messageController.updateAll();
|
||||
// } else {
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: apiResponse.msg!,
|
||||
// textColor: themeController.currentColor.sc9,
|
||||
// );
|
||||
// messageController.getMessageList();
|
||||
// messageController.updateAll();
|
||||
// }
|
||||
// }, onCancel: () {});
|
||||
// }
|
||||
Get.toNamed('/messageDetail', arguments: messageInfo);
|
||||
},
|
||||
child: Center(
|
||||
child: Text(
|
||||
// getMessageStatus(messageInfo['status']),
|
||||
"查看详情",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: Color(0xFF011D33),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -161,7 +157,7 @@ class _MhMessageListWidgetState extends State<MhMessageListWidget> {
|
||||
Widget _buildInfoItem(BuildContext context, String label) {
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 62.rpx,
|
||||
minHeight: 60.rpx,
|
||||
),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
@@ -183,7 +179,7 @@ class _MhMessageListWidgetState extends State<MhMessageListWidget> {
|
||||
Widget _buildValueItem(BuildContext context, value) {
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 62.rpx,
|
||||
minHeight: 60.rpx,
|
||||
),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(-1, 0),
|
||||
|
||||
Reference in New Issue
Block a user