1.优化补足了首页下拉刷新中对获取场站接口的加入,确保能够实时获取数据并渲染。
2.优化修改了tcp重连机制,具体操作:断开重连时候不再建立新链接 而是将旧链接重置,并重新发送数据。 3.大面积的给项目中的各个页面 手动接入了多语言的支持。同时也调整了相应带来的问题英文长度较大影响原有的样式的问题,已解决了对应的样式不和谐问题。保证了外观的统一性。 4.给项目中的主要操作加了几个核心的操作比如远程遥控和路径规划添加了双层的保护,设置里安全模式,即在此期间对服务器推送的重复登录操作后的自动退出登录做一个拦截 保证操作的安全性。
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:maibu_satabot_v2/core/localization/app_localizations.dart';
|
||||
|
||||
class QuickEntryCard extends StatelessWidget {
|
||||
const QuickEntryCard({super.key});
|
||||
@@ -11,9 +12,9 @@ class QuickEntryCard extends StatelessWidget {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Text(
|
||||
'快捷入口',
|
||||
style: TextStyle(
|
||||
Text(
|
||||
AppLocalizations.of(context).translate('home_v2.quick_entry'),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF1D2129),
|
||||
@@ -36,32 +37,44 @@ class QuickEntryCard extends StatelessWidget {
|
||||
children: [
|
||||
_buildQuickEntryCard(
|
||||
icon: Icons.upload_file,
|
||||
label: '设备上报',
|
||||
label: AppLocalizations.of(
|
||||
context,
|
||||
).translate('home_v2.device_report'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
_buildQuickEntryCard(
|
||||
icon: Icons.qr_code_scanner,
|
||||
label: '扫一扫',
|
||||
label: AppLocalizations.of(
|
||||
context,
|
||||
).translate('home_v2.scan_qr'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
_buildQuickEntryCard(
|
||||
icon: Icons.assignment,
|
||||
label: '工单任务',
|
||||
label: AppLocalizations.of(
|
||||
context,
|
||||
).translate('home_v2.work_order'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
_buildQuickEntryCard(
|
||||
icon: Icons.notifications_active,
|
||||
label: '告警中心',
|
||||
label: AppLocalizations.of(
|
||||
context,
|
||||
).translate('home_v2.alarm_center'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
_buildQuickEntryCard(
|
||||
icon: Icons.map,
|
||||
label: '电厂地图',
|
||||
label: AppLocalizations.of(
|
||||
context,
|
||||
).translate('home_v2.power_plant_map'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
_buildQuickEntryCard(
|
||||
icon: Icons.devices,
|
||||
label: '设备列表',
|
||||
label: AppLocalizations.of(
|
||||
context,
|
||||
).translate('home_v2.device_list'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
],
|
||||
@@ -71,10 +84,7 @@ class QuickEntryCard extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildQuickEntryCard({
|
||||
required IconData icon,
|
||||
required String label,
|
||||
}) {
|
||||
Widget _buildQuickEntryCard({required IconData icon, required String label}) {
|
||||
return InkWell(
|
||||
onTap: () => print('点击:$label'),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@@ -97,11 +107,7 @@ class QuickEntryCard extends StatelessWidget {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
color: const Color(0xFF165DFF),
|
||||
size: 26,
|
||||
),
|
||||
Icon(icon, color: const Color(0xFF165DFF), size: 26),
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
label,
|
||||
|
||||
Reference in New Issue
Block a user