未车辆显示
This commit is contained in:
@@ -15,9 +15,9 @@ class CarInfoController extends GetxController with BaseControllerMixin {
|
||||
|
||||
// --- 车辆基本信息 ---
|
||||
String plateNumber = "";
|
||||
String vin = "未知";
|
||||
String modelName = "未知";
|
||||
String brandName = "未知";
|
||||
String vin = "-";
|
||||
String modelName = "-";
|
||||
String brandName = "-";
|
||||
|
||||
// --- 证件附件列表 ---
|
||||
final RxList<String> drivingAttachments = <String>[].obs;
|
||||
|
||||
@@ -163,11 +163,26 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
_buildModernStatItem('本月里程数', 'Accumulated', '2,852km', ''),
|
||||
_buildModernStatItem(
|
||||
'本月里程数',
|
||||
'Accumulated',
|
||||
StorageService.to.hasVehicleInfo ? '2,852km' : '-',
|
||||
'',
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
_buildModernStatItem('总里程', 'Refuel Count', "2.5W km", ''),
|
||||
_buildModernStatItem(
|
||||
'总里程',
|
||||
'Refuel Count',
|
||||
StorageService.to.hasVehicleInfo ? "2.5W km" : '-',
|
||||
'',
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
_buildModernStatItem('服务评分', 'Driver rating', "4.9分", ''),
|
||||
_buildModernStatItem(
|
||||
'服务评分',
|
||||
'Driver rating',
|
||||
StorageService.to.hasVehicleInfo ? "4.9分" : '-',
|
||||
'',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -300,20 +315,20 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
child: const LinearProgressIndicator(
|
||||
value: 0.75,
|
||||
child: LinearProgressIndicator(
|
||||
value: StorageService.to.hasVehicleInfo ? 0.75 : 0,
|
||||
minHeight: 8,
|
||||
backgroundColor: Color(0xFFF0F2F5),
|
||||
valueColor: AlwaysStoppedAnimation<Color>(Color.fromRGBO(16, 185, 129, 1)),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const Row(
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("H2 Level", style: TextStyle(fontSize: 11, color: Colors.grey)),
|
||||
Text(
|
||||
"75%",
|
||||
StorageService.to.hasVehicleInfo ? "75%" : "0%",
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
color: Color.fromRGBO(16, 185, 129, 1),
|
||||
@@ -382,7 +397,11 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
_buildCertDetailItem('所属公司', controller.rentFromCompany, isFull: false),
|
||||
_buildCertDetailItem(
|
||||
'所属公司',
|
||||
controller.rentFromCompany,
|
||||
isFull: false,
|
||||
),
|
||||
_buildCertDetailItem('运营城市', controller.address),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -536,13 +536,13 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
|
||||
}
|
||||
}
|
||||
|
||||
String workEfficiency = "0";
|
||||
String fillingWeight = "0";
|
||||
String fillingTimes = "0";
|
||||
String workEfficiency = "-";
|
||||
String fillingWeight = "-";
|
||||
String fillingTimes = "-";
|
||||
String modeImage = "";
|
||||
String plateNumber = "";
|
||||
String vin = "";
|
||||
String leftHydrogen = "0";
|
||||
String leftHydrogen = "-";
|
||||
num maxHydrogen = 0;
|
||||
String difference = "";
|
||||
var progressValue = 0.0;
|
||||
@@ -691,8 +691,8 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
|
||||
|
||||
var result = BaseModel.fromJson(responseData.data);
|
||||
|
||||
leftHydrogen = result.data["leftHydrogen"].toString();
|
||||
workEfficiency = result.data["workEfficiency"].toString();
|
||||
leftHydrogen = "${result.data["leftHydrogen"]}Kg";
|
||||
workEfficiency = "${result.data["workEfficiency"]}Kg";
|
||||
|
||||
final leftHydrogenNum = double.tryParse(leftHydrogen) ?? 0.0;
|
||||
difference = (maxHydrogen - leftHydrogenNum).toStringAsFixed(2);
|
||||
|
||||
@@ -179,7 +179,12 @@ class ReservationPage extends GetView<C_ReservationController> {
|
||||
const SizedBox(width: 8),
|
||||
_buildModernStatItem('总加氢次数', '', controller.fillingTimes, ''),
|
||||
const SizedBox(width: 8),
|
||||
_buildModernStatItem('今日里程', '', "7kg", ''),
|
||||
_buildModernStatItem(
|
||||
'今日里程',
|
||||
'',
|
||||
StorageService.to.hasVehicleInfo ? "7kg" : "-",
|
||||
'',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -258,11 +263,14 @@ class ReservationPage extends GetView<C_ReservationController> {
|
||||
flex: 6,
|
||||
child: Column(
|
||||
children: [
|
||||
_buildCarDataItem('剩余电量', '36.8%'),
|
||||
_buildCarDataItem(
|
||||
'剩余电量',
|
||||
StorageService.to.hasVehicleInfo ? '36.8%' : '-',
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
_buildCarDataItem('剩余氢量', '${controller.leftHydrogen}Kg'),
|
||||
_buildCarDataItem('剩余氢量', controller.leftHydrogen),
|
||||
const SizedBox(height: 8),
|
||||
_buildCarDataItem('百公里氢耗', '${controller.workEfficiency}Kg'),
|
||||
_buildCarDataItem('百公里氢耗', controller.workEfficiency),
|
||||
const SizedBox(height: 12),
|
||||
Column(
|
||||
children: [
|
||||
@@ -290,7 +298,7 @@ class ReservationPage extends GetView<C_ReservationController> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"${controller.leftHydrogen}Kg",
|
||||
controller.leftHydrogen,
|
||||
style: const TextStyle(
|
||||
fontSize: 10,
|
||||
color: Color(0xFF006633),
|
||||
|
||||
Reference in New Issue
Block a user