地址接口的视线
This commit is contained in:
@@ -15,35 +15,37 @@ import '../../controller/mh_controller/apply_repair_controller.dart';
|
||||
import '../../controller/mh_controller/repair_info_controller.dart';
|
||||
|
||||
class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
Map data;
|
||||
RepairHistoryListPage({Key? key, required this.data});
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
BoxConstraints? bodysize;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
controller.model.applyRepairModel = ApplyRepairModel()
|
||||
..id = 1001
|
||||
..apply_name = '张三'
|
||||
..tel = '13812345678'
|
||||
..address = '北京市海淀区清华东路66号'
|
||||
..desc = '床垫传感器失灵,无法监测心率和呼吸'
|
||||
..create_time = DateTime.parse('2025-05-01 10:00:00')
|
||||
..device_type = '床垫'
|
||||
..device_category = 'BY-H'
|
||||
..device_id = 'BD202505011001'
|
||||
..device_name = '智能床垫 BY-H 型号'
|
||||
..issue_img = [
|
||||
'https://example.com/img1.jpg',
|
||||
'https://example.com/img2.jpg'
|
||||
]
|
||||
..imagesLImit = 3
|
||||
..img_bucket = 'mianhuatang_repair'
|
||||
..status = '待处理'
|
||||
..select_device = '床垫/BY-H/智能床垫'
|
||||
..device_list = ['床垫/BY-H/智能床垫', '床垫/BY-A/智能床垫', '床垫/BY-C/智能床垫']
|
||||
..score = null
|
||||
..score_time = null
|
||||
..messageType = 1
|
||||
..repairId = 1001;
|
||||
// controller.model.applyRepairModel = ApplyRepairModel()
|
||||
// ..id = 1001
|
||||
// ..apply_name = '张三'
|
||||
// ..tel = '13812345678'
|
||||
// ..desc = '床垫传感器失灵,无法监测心率和呼吸'
|
||||
// ..create_time = DateTime.parse('2025-05-01 10:00:00')
|
||||
// ..device_type = 1
|
||||
// ..device_category = 'BY-H'
|
||||
// ..device_id = 'BD202505011001'
|
||||
// ..device_name = '智能床垫 BY-H 型号'
|
||||
// ..issue_img = [
|
||||
// 'https://example.com/img1.jpg',
|
||||
// 'https://example.com/img2.jpg'
|
||||
// ]
|
||||
// ..imagesLImit = 3
|
||||
// ..img_bucket = 'mianhuatang_repair'
|
||||
// ..status = '待处理'
|
||||
// ..select_device = '床垫/BY-H/智能床垫'
|
||||
// ..device_list = ['床垫/BY-H/智能床垫', '床垫/BY-A/智能床垫', '床垫/BY-C/智能床垫']
|
||||
// ..score = null
|
||||
// ..score_time = null
|
||||
// ..messageType = 1
|
||||
// ..repairId = 1001;
|
||||
|
||||
controller.model.repairProcessList = [
|
||||
RepairProcessModel()
|
||||
@@ -154,10 +156,7 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
-1, 0),
|
||||
child: Text(
|
||||
// 'SWES01号智能一键入眠床',
|
||||
controller
|
||||
.model
|
||||
.applyRepairModel!
|
||||
.device_name ??
|
||||
data['device'][0]['name'] ??
|
||||
'未命名',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
@@ -173,10 +172,8 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'系列:' +
|
||||
(controller
|
||||
.model
|
||||
.applyRepairModel!
|
||||
.device_category ??
|
||||
(data['device'][0][
|
||||
'device_category'] ??
|
||||
'未命名'),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
@@ -193,11 +190,12 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'类型:' +
|
||||
(controller
|
||||
.model
|
||||
.applyRepairModel!
|
||||
.device_type ??
|
||||
'未命名'),
|
||||
getDeviceTypeName(
|
||||
controller
|
||||
.model
|
||||
.applyRepairModel
|
||||
?.device_type,
|
||||
),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: const Color(
|
||||
@@ -254,11 +252,9 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'提交时间:' +
|
||||
(MyUtils.formatDateTime(
|
||||
controller
|
||||
.model
|
||||
.applyRepairModel!
|
||||
.create_time!)),
|
||||
(MyUtils.formatDateTimeDay(
|
||||
data['device'][0][
|
||||
'create_time']!)),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: const Color(
|
||||
@@ -274,10 +270,8 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
-1, 0),
|
||||
child: Text(
|
||||
'问题描述:' +
|
||||
(controller
|
||||
.model
|
||||
.applyRepairModel!
|
||||
.desc ??
|
||||
(data['device'][0]
|
||||
['desc'] ??
|
||||
'未命名'),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
@@ -755,4 +749,17 @@ class RepairHistoryListPage extends GetView<RepairInfoController> {
|
||||
|
||||
return images;
|
||||
}
|
||||
|
||||
String getDeviceTypeName(int? type) {
|
||||
switch (type) {
|
||||
case 1:
|
||||
return '体征检测设备';
|
||||
case 2:
|
||||
return '智能床';
|
||||
case 3:
|
||||
return '智能床垫';
|
||||
default:
|
||||
return '未知设备';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user