This commit is contained in:
wyf
2025-08-16 11:01:17 +08:00
parent 79cbdb3fa2
commit 2e1ce8f9d7
13 changed files with 174 additions and 50 deletions

View File

@@ -84,7 +84,10 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
}
if (bodyDeviceController.deviceList.isNotEmpty) {
repairController.deviceListId = bodyDeviceController.deviceList
.map((e) => e['_id'] as String)
.map((e) => (e['_id']) as String)
.toList();
repairController.deviceListIdLabel = bodyDeviceController.deviceList
.map((e) => (e['code']??e['mac']) as String)
.toList();
}
return LayoutBuilder(
@@ -157,14 +160,20 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
EdgeInsetsDirectional.fromSTEB(30.rpx, 29.rpx, 30.rpx, 0),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
Obx(() {
var devicetype = deviceTypeController
.deviceTypeList.value
.where((device) => device['type'] == 1)
.toList();
return SingleChildScrollView(
scrollDirection: Axis.horizontal, // 横向滚动
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min, // 设置为 min避免撑满父组件宽度
children: deviceTypeController.deviceTypeList.value
children: devicetype
.map(
(deviceType) => CustomCard(
borderRadius: