Compare commits
No commits in common. "7f21c22d66622e78ba033c8c4a716ff374cf0216" and "7b404dabd0695da108db104dbcfe72b86da52ad9" have entirely different histories.
7f21c22d66
...
7b404dabd0
|
|
@ -3,7 +3,6 @@ import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:geolocator/geolocator.dart';
|
import 'package:geolocator/geolocator.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
|
|
@ -28,7 +27,6 @@ class _MapWebViewPageState extends State<MapWebViewPage> {
|
||||||
double? _selectedLongitude;
|
double? _selectedLongitude;
|
||||||
double? _selectedLatitude;
|
double? _selectedLatitude;
|
||||||
bool _locationError = false;
|
bool _locationError = false;
|
||||||
late final bool _supportsWebView;
|
|
||||||
|
|
||||||
// 默认坐标(北京)
|
// 默认坐标(北京)
|
||||||
static const double defaultLongitude = 116.397428;
|
static const double defaultLongitude = 116.397428;
|
||||||
|
|
@ -37,14 +35,6 @@ class _MapWebViewPageState extends State<MapWebViewPage> {
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_supportsWebView = !kIsWeb &&
|
|
||||||
(defaultTargetPlatform == TargetPlatform.android ||
|
|
||||||
defaultTargetPlatform == TargetPlatform.iOS ||
|
|
||||||
defaultTargetPlatform == TargetPlatform.macOS);
|
|
||||||
if (!_supportsWebView) {
|
|
||||||
_loading = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_initializeWebView();
|
_initializeWebView();
|
||||||
_initializeMap();
|
_initializeMap();
|
||||||
}
|
}
|
||||||
|
|
@ -428,64 +418,53 @@ class _MapWebViewPageState extends State<MapWebViewPage> {
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
if (!_supportsWebView)
|
// 状态提示栏
|
||||||
const Expanded(
|
if (_locationError)
|
||||||
child: Center(
|
Container(
|
||||||
child: Padding(
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 24),
|
color: Colors.orange[100],
|
||||||
child: Text(
|
child: Row(
|
||||||
'当前运行平台不支持地图选点,请切换到 Android 或 iPhone 设备运行。',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
else ...[
|
|
||||||
if (_locationError)
|
|
||||||
Container(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
|
||||||
color: Colors.orange[100],
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Icon(Icons.warning_amber, color: Colors.orange[800], size: 16),
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
'定位失败,使用默认位置',
|
|
||||||
style: TextStyle(color: Colors.orange[800], fontSize: 12),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextButton(
|
|
||||||
onPressed: _retryLocation,
|
|
||||||
child: Text(
|
|
||||||
'重试',
|
|
||||||
style: TextStyle(color: Colors.orange[800], fontSize: 12),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
children: [
|
||||||
if (_mapUrl.isNotEmpty)
|
Icon(Icons.warning_amber, color: Colors.orange[800], size: 16),
|
||||||
WebViewWidget(controller: _controller),
|
const SizedBox(width: 8),
|
||||||
|
Expanded(
|
||||||
if (_loading)
|
child: Text(
|
||||||
const Center(
|
'定位失败,使用默认位置',
|
||||||
child: Column(
|
style: TextStyle(color: Colors.orange[800], fontSize: 12),
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
CircularProgressIndicator(),
|
|
||||||
SizedBox(height: 16),
|
|
||||||
Text('地图加载中...'),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: _retryLocation,
|
||||||
|
child: Text(
|
||||||
|
'重试',
|
||||||
|
style: TextStyle(color: Colors.orange[800], fontSize: 12),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
|
// 地图区域
|
||||||
|
Expanded(
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
if (_mapUrl.isNotEmpty)
|
||||||
|
WebViewWidget(controller: _controller),
|
||||||
|
|
||||||
|
if (_loading)
|
||||||
|
const Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
CircularProgressIndicator(),
|
||||||
|
SizedBox(height: 16),
|
||||||
|
Text('地图加载中...'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -506,4 +485,4 @@ class _MapWebViewPageState extends State<MapWebViewPage> {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
debugPrint('地图页面销毁');
|
debugPrint('地图页面销毁');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -132,7 +132,6 @@ class _CustomButtonState extends State<CustomButton> {
|
||||||
final now = DateTime.now();
|
final now = DateTime.now();
|
||||||
if (now.difference(_lastClickTime).inMilliseconds < widget.debounceInterval) {
|
if (now.difference(_lastClickTime).inMilliseconds < widget.debounceInterval) {
|
||||||
// 在防连点间隔内,不执行操作
|
// 在防连点间隔内,不执行操作
|
||||||
print('---');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
// main.dart
|
// main.dart
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
||||||
|
|
@ -19,8 +18,6 @@ import 'package:flutter/services.dart'; // for TextInput.hide
|
||||||
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'
|
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'
|
||||||
show BMFMapSDK, BMF_COORD_TYPE;
|
show BMFMapSDK, BMF_COORD_TYPE;
|
||||||
import 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart';
|
import 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart';
|
||||||
import 'package:webview_flutter_android/webview_flutter_android.dart';
|
|
||||||
import 'package:webview_flutter_wkwebview/webview_flutter_wkwebview.dart';
|
|
||||||
import 'package:qhd_prevention/common/route_observer.dart';
|
import 'package:qhd_prevention/common/route_observer.dart';
|
||||||
import 'pages/mine/mine_set_pwd_page.dart';
|
import 'pages/mine/mine_set_pwd_page.dart';
|
||||||
|
|
||||||
|
|
@ -70,23 +67,8 @@ Future<T?> showModalBottomSheetAfterUnfocus<T>({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _registerWebViewPlatform() {
|
|
||||||
switch (defaultTargetPlatform) {
|
|
||||||
case TargetPlatform.android:
|
|
||||||
AndroidWebViewPlatform.registerWith();
|
|
||||||
break;
|
|
||||||
case TargetPlatform.iOS:
|
|
||||||
case TargetPlatform.macOS:
|
|
||||||
WebKitWebViewPlatform.registerWith();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void main( ) async {
|
void main( ) async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
_registerWebViewPlatform();
|
|
||||||
StorageService.instance.init();
|
StorageService.instance.init();
|
||||||
/**
|
/**
|
||||||
// 1) 同意 SDK 隐私(百度 SDK 要求)
|
// 1) 同意 SDK 隐私(百度 SDK 要求)
|
||||||
|
|
|
||||||
|
|
@ -225,9 +225,23 @@ class DhWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'现场负责人: ${step10['actUserName'] ?? ''}',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'动火单位负责人: ${step4['actUserName'] ?? ''}',
|
children: [
|
||||||
|
Text(
|
||||||
|
'现场负责人: ${step10['actUserName'] ?? ''}',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'动火单位负责人: ${step4['actUserName'] ?? ''}',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'现场管辖单位负责人: ${step6['actUserName'] ?? ''}',
|
'现场管辖单位负责人: ${step6['actUserName'] ?? ''}',
|
||||||
|
|
@ -269,4 +283,4 @@ class DhWaitPage extends SpecialWorkWaitPageBase {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -22,7 +22,7 @@ class _workTabDhListState extends State<workTabDhList> {
|
||||||
final List<Map<String, dynamic>> topButtonInfos = const [
|
final List<Map<String, dynamic>> topButtonInfos = const [
|
||||||
{
|
{
|
||||||
"icon": "assets/icon-apps/icon-pc-1.png",
|
"icon": "assets/icon-apps/icon-pc-1.png",
|
||||||
"title": "动火作业台账",
|
"title": "动火台账",
|
||||||
"unreadCount": '0',
|
"unreadCount": '0',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
@ -191,14 +191,14 @@ class _workTabDhListState extends State<workTabDhList> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// 台账分区(UI)
|
// 台账分区(UI)
|
||||||
ListItemFactory.createBuildSimpleSection('动火作业台账管理'),
|
ListItemFactory.createBuildSimpleSection('动火台账'),
|
||||||
WorkTabIconGrid(
|
WorkTabIconGrid(
|
||||||
buttonInfos: topButtonInfos,
|
buttonInfos: topButtonInfos,
|
||||||
onItemPressed: (index) {
|
onItemPressed: (index) {
|
||||||
pushPage(
|
pushPage(
|
||||||
DhWaitPage(
|
DhWaitPage(
|
||||||
stepId: '',
|
stepId: '',
|
||||||
workTypeTitle: '动火作业台账',
|
workTypeTitle: '动火台账',
|
||||||
listType: SpecialListType.list,
|
listType: SpecialListType.list,
|
||||||
),
|
),
|
||||||
context,
|
context,
|
||||||
|
|
@ -217,7 +217,7 @@ class _workTabDhListState extends State<workTabDhList> {
|
||||||
|
|
||||||
// 如果没有分组数据且非加载状态,显示空提示
|
// 如果没有分组数据且非加载状态,显示空提示
|
||||||
if (!_loading && (steps.isEmpty)) ...[
|
if (!_loading && (steps.isEmpty)) ...[
|
||||||
ListItemFactory.createBuildSimpleSection('动火作业申请审批'),
|
ListItemFactory.createBuildSimpleSection('动火申请审批'),
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 20),
|
padding: EdgeInsets.symmetric(vertical: 20),
|
||||||
child: Center(child: Text('暂无审批项')),
|
child: Center(child: Text('暂无审批项')),
|
||||||
|
|
|
||||||
|
|
@ -176,17 +176,59 @@ class DlWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'作业负责人: $workUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'所在单位负责人: $unitLeaderUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'作业负责人: $workUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'所在单位负责人: $unitLeaderUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'监护人: $guardianUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'安全交底人: $safeDisclosureUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'监护人: $guardianUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'安全交底人: $safeDisclosureUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'接受交底人: $acceptDisclosureUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'接受交底人: $acceptDisclosureUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'作业类型: ${info['operationTypeName'] ?? ''}',
|
'作业类型: ${info['operationTypeName'] ?? ''}',
|
||||||
|
|
@ -209,4 +251,4 @@ class DlWaitPage extends SpecialWorkWaitPageBase {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -190,7 +190,7 @@ class _WorkTabDlListState extends State<WorkTabDlList> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// 台账分区(UI)
|
// 台账分区(UI)
|
||||||
ListItemFactory.createBuildSimpleSection('断路作业台账管理'),
|
ListItemFactory.createBuildSimpleSection('作业台账'),
|
||||||
WorkTabIconGrid(
|
WorkTabIconGrid(
|
||||||
buttonInfos: topButtonInfos,
|
buttonInfos: topButtonInfos,
|
||||||
onItemPressed: (index) {
|
onItemPressed: (index) {
|
||||||
|
|
|
||||||
|
|
@ -176,17 +176,59 @@ class DtWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'作业负责人: $workUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'所在单位负责人: $unitLeaderUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'作业负责人: $workUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'所在单位负责人: $unitLeaderUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'监护人: $guardianUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'安全交底人: $safeDisclosureUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'监护人: $guardianUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'安全交底人: $safeDisclosureUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'接受交底人: $acceptDisclosureUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'接受交底人: $acceptDisclosureUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'作业类型: ${info['operationTypeName'] ?? ''}',
|
'作业类型: ${info['operationTypeName'] ?? ''}',
|
||||||
|
|
@ -209,4 +251,4 @@ class DtWaitPage extends SpecialWorkWaitPageBase {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -190,7 +190,7 @@ class _WorkTabDtListState extends State<WorkTabDtList> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// 台账分区(UI)
|
// 台账分区(UI)
|
||||||
ListItemFactory.createBuildSimpleSection('动土作业台账管理'),
|
ListItemFactory.createBuildSimpleSection('作业台账'),
|
||||||
WorkTabIconGrid(
|
WorkTabIconGrid(
|
||||||
buttonInfos: topButtonInfos,
|
buttonInfos: topButtonInfos,
|
||||||
onItemPressed: (index) {
|
onItemPressed: (index) {
|
||||||
|
|
|
||||||
|
|
@ -176,17 +176,59 @@ class DzWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'作业负责人: $workUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'所在单位负责人: $unitLeaderUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'作业负责人: $workUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'所在单位负责人: $unitLeaderUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'监护人: $guardianUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'安全交底人: $safeDisclosureUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'监护人: $guardianUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'安全交底人: $safeDisclosureUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'接受交底人: $acceptDisclosureUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'接受交底人: $acceptDisclosureUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'作业类型: ${info['operationTypeName'] ?? ''}',
|
'作业类型: ${info['operationTypeName'] ?? ''}',
|
||||||
|
|
@ -209,4 +251,4 @@ class DzWaitPage extends SpecialWorkWaitPageBase {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -190,7 +190,7 @@ class _WorkTabDzListState extends State<WorkTabDzList> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// 台账分区(UI)
|
// 台账分区(UI)
|
||||||
ListItemFactory.createBuildSimpleSection('吊装作业台账管理'),
|
ListItemFactory.createBuildSimpleSection('作业台账'),
|
||||||
WorkTabIconGrid(
|
WorkTabIconGrid(
|
||||||
buttonInfos: topButtonInfos,
|
buttonInfos: topButtonInfos,
|
||||||
onItemPressed: (index) {
|
onItemPressed: (index) {
|
||||||
|
|
|
||||||
|
|
@ -199,21 +199,41 @@ class GcWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'作业负责人: $workUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'所在单位负责人: $unitLeaderUserName',
|
children: [
|
||||||
|
Text("作业负责人: $workUserName",
|
||||||
|
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||||
|
Text("所在单位负责人: $unitLeaderUserName",
|
||||||
|
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'审核部门负责人: $auditDepartmentLeaderUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'审批部门负责人: $spDepartmentLeaderUserName',
|
children: [
|
||||||
|
Text("审核部门负责人: $auditDepartmentLeaderUserName",
|
||||||
|
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||||
|
Text("审批部门负责人: $spDepartmentLeaderUserName",
|
||||||
|
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'监护人: $guardianUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'安全交底人: $safeDisclosureUserName',
|
children: [
|
||||||
|
Text("监护人: $guardianUserName",
|
||||||
|
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||||
|
Text("安全交底人: $safeDisclosureUserName",
|
||||||
|
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'接受交底人: $acceptDisclosureUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
children: [
|
||||||
|
Text("接受交底人: $acceptDisclosureUserName",
|
||||||
|
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||||
|
Text("验收部门负责人: $acceptDepartmentLeaderUserName",
|
||||||
|
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"作业类型: ${info['operationTypeName'] ?? ''}",
|
"作业类型: ${info['operationTypeName'] ?? ''}",
|
||||||
|
|
@ -236,4 +256,4 @@ class GcWaitPage extends SpecialWorkWaitPageBase {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -190,7 +190,7 @@ class _WorkTabGcListState extends State<WorkTabGcList> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// 台账分区(UI)
|
// 台账分区(UI)
|
||||||
ListItemFactory.createBuildSimpleSection('高处作业台账管理'),
|
ListItemFactory.createBuildSimpleSection('作业台账'),
|
||||||
WorkTabIconGrid(
|
WorkTabIconGrid(
|
||||||
buttonInfos: topButtonInfos,
|
buttonInfos: topButtonInfos,
|
||||||
onItemPressed: (index) {
|
onItemPressed: (index) {
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,11 @@ class LsydWaitPage extends SpecialWorkWaitPageBase {
|
||||||
final String safeDisclosureUserName = '${step18['actUserName'] ?? ''}';
|
final String safeDisclosureUserName = '${step18['actUserName'] ?? ''}';
|
||||||
final String acceptDisclosureUserName = '${step19['actUserName'] ?? ''}';
|
final String acceptDisclosureUserName = '${step19['actUserName'] ?? ''}';
|
||||||
final String guardianUserName = '${step20['actUserName'] ?? ''}';
|
final String guardianUserName = '${step20['actUserName'] ?? ''}';
|
||||||
|
final String workUserName = '${step21['actUserName'] ?? ''}';
|
||||||
|
final String unitLeaderUserName = '${step22['actUserName'] ?? ''}';
|
||||||
|
final String auditDepartmentLeaderUserName =
|
||||||
|
'${step23['actUserName'] ?? ''}';
|
||||||
|
final String spDepartmentLeaderUserName = '${step24['actUserName'] ?? ''}';
|
||||||
final String acceptDepartmentLeaderUserName =
|
final String acceptDepartmentLeaderUserName =
|
||||||
'${step25['actUserName'] ?? ''}';
|
'${step25['actUserName'] ?? ''}';
|
||||||
final String userElectDepartmentLeaderUserName =
|
final String userElectDepartmentLeaderUserName =
|
||||||
|
|
@ -191,21 +196,78 @@ class LsydWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'作业指挥负责人: ${info['workCommandPerson'] ?? ''}',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'用电单位负责人: $userElectDepartmentLeaderUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'作业指挥负责人: ${info['workCommandPerson'] ?? ''}',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'用电单位负责人: $userElectDepartmentLeaderUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'配送电单位负责人: $sendEletDepartmentLeaderUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'${info['gasFlag']}' == '1' ? '气体分析人: $gasUserName' : '',
|
children: [
|
||||||
|
Text(
|
||||||
|
'配送电单位负责人: $sendEletDepartmentLeaderUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
if ('${info['gasFlag']}' == '1')
|
||||||
|
Text(
|
||||||
|
'气体分析人: $gasUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'监护人: $guardianUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'安全交底人: $safeDisclosureUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'监护人: ${guardianUserName}',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'安全交底人: $safeDisclosureUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'接受交底人: $acceptDisclosureUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'接受交底人: $acceptDisclosureUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'作业类型: ${info['operationTypeName'] ?? ''}',
|
'作业类型: ${info['operationTypeName'] ?? ''}',
|
||||||
|
|
@ -228,4 +290,4 @@ class LsydWaitPage extends SpecialWorkWaitPageBase {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -190,7 +190,7 @@ class _WorkTabLsydListState extends State<WorkTabLsydList> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// 台账分区(UI)
|
// 台账分区(UI)
|
||||||
ListItemFactory.createBuildSimpleSection('临时用电作业台账管理'),
|
ListItemFactory.createBuildSimpleSection('作业台账'),
|
||||||
WorkTabIconGrid(
|
WorkTabIconGrid(
|
||||||
buttonInfos: topButtonInfos,
|
buttonInfos: topButtonInfos,
|
||||||
onItemPressed: (index) {
|
onItemPressed: (index) {
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,9 @@ class MbcdWaitPage extends SpecialWorkWaitPageBase {
|
||||||
final String guardianUserName = '${step20['actUserName'] ?? ''}';
|
final String guardianUserName = '${step20['actUserName'] ?? ''}';
|
||||||
final String workUserName = '${step21['actUserName'] ?? ''}';
|
final String workUserName = '${step21['actUserName'] ?? ''}';
|
||||||
final String unitLeaderUserName = '${step22['actUserName'] ?? ''}';
|
final String unitLeaderUserName = '${step22['actUserName'] ?? ''}';
|
||||||
|
final String auditDepartmentLeaderUserName =
|
||||||
|
'${step23['actUserName'] ?? ''}';
|
||||||
|
final String spDepartmentLeaderUserName = '${step24['actUserName'] ?? ''}';
|
||||||
final String acceptDepartmentLeaderUserName =
|
final String acceptDepartmentLeaderUserName =
|
||||||
'${step25['actUserName'] ?? ''}';
|
'${step25['actUserName'] ?? ''}';
|
||||||
|
|
||||||
|
|
@ -181,17 +184,59 @@ class MbcdWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'作业负责人: $workUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'所在单位负责人: $unitLeaderUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'作业负责人: $workUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'所在单位负责人: $unitLeaderUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'监护人: $guardianUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'安全交底人: $safeDisclosureUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'监护人: $guardianUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'安全交底人: $safeDisclosureUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'接受交底人: $acceptDisclosureUserName',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
children: [
|
||||||
|
Text(
|
||||||
|
'接受交底人: $acceptDisclosureUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'作业类型: ${info['operationTypeName'] ?? ''}',
|
'作业类型: ${info['operationTypeName'] ?? ''}',
|
||||||
|
|
@ -214,4 +259,4 @@ class MbcdWaitPage extends SpecialWorkWaitPageBase {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -190,7 +190,7 @@ class _WorkTabMbcdListState extends State<WorkTabMbcdList> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// 台账分区(UI)
|
// 台账分区(UI)
|
||||||
ListItemFactory.createBuildSimpleSection('盲板抽堵作业台账管理'),
|
ListItemFactory.createBuildSimpleSection('作业台账'),
|
||||||
WorkTabIconGrid(
|
WorkTabIconGrid(
|
||||||
buttonInfos: topButtonInfos,
|
buttonInfos: topButtonInfos,
|
||||||
onItemPressed: (index) {
|
onItemPressed: (index) {
|
||||||
|
|
|
||||||
|
|
@ -161,9 +161,23 @@ class SxkjWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
buildWrapPairRow(
|
Row(
|
||||||
'管理单位: ${chooseLimitedSpace['manageDeptName'] ?? ''}',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
'作业单位: ${info['workDepartmentName'] ?? ''}',
|
children: [
|
||||||
|
Text(
|
||||||
|
'管理单位: ${chooseLimitedSpace['manageDeptName'] ?? ''}',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'作业单位: ${info['workDepartmentName'] ?? ''}',
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: null,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'有限空间名称及编号: ${info['limitedSpaceNameAndCode'] ?? ''}',
|
'有限空间名称及编号: ${info['limitedSpaceNameAndCode'] ?? ''}',
|
||||||
|
|
@ -199,4 +213,4 @@ class SxkjWaitPage extends SpecialWorkWaitPageBase {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -184,7 +184,7 @@ class _WorkTabSpaceListState extends State<WorkTabSpaceList> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: const MyAppbar(title: '有限空间作业'),
|
appBar: const MyAppbar(title: '有限空间安全作业'),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: RefreshIndicator(
|
child: RefreshIndicator(
|
||||||
onRefresh: _getData,
|
onRefresh: _getData,
|
||||||
|
|
|
||||||
|
|
@ -935,10 +935,15 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
'checkNo': info['checkNo'] ?? '',
|
'checkNo': info['checkNo'] ?? '',
|
||||||
'signLogs': signLogs,
|
'signLogs': signLogs,
|
||||||
'workId': form['workId'] ?? '',
|
'workId': form['workId'] ?? '',
|
||||||
'xgfId' : info['xgfId'] ?? ''
|
|
||||||
};
|
};
|
||||||
payload.addAll(extraPayload);
|
payload.addAll(extraPayload);
|
||||||
|
|
||||||
|
if (pd['internalOperationFlag'] == 1) {
|
||||||
|
payload['xgfId'] = info['xgfId'] ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (FormUtils.hasValue(payload, 'workId') && widget.status == '2') {
|
if (FormUtils.hasValue(payload, 'workId') && widget.status == '2') {
|
||||||
payload.remove('checkNo');
|
payload.remove('checkNo');
|
||||||
payload.remove('workId');
|
payload.remove('workId');
|
||||||
|
|
@ -1267,10 +1272,10 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 统一标题
|
/// 统一标题
|
||||||
String get pageTitleForEdit => '编辑';
|
String get pageTitleForEdit => '$workTitle编辑';
|
||||||
|
|
||||||
/// 统一标题
|
/// 统一标题
|
||||||
String get pageTitleForApply => '新增';
|
String get pageTitleForApply => '$workTitle申请';
|
||||||
|
|
||||||
/// 统一 map 转换
|
/// 统一 map 转换
|
||||||
Map<String, dynamic> _toMap(dynamic raw) {
|
Map<String, dynamic> _toMap(dynamic raw) {
|
||||||
|
|
|
||||||
|
|
@ -1221,7 +1221,7 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: MyAppbar(title: widget.isEdit ? '审批' : '查看'),
|
appBar: MyAppbar(title: widget.stepName),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
padding: const EdgeInsets.all(5),
|
padding: const EdgeInsets.all(5),
|
||||||
|
|
|
||||||
|
|
@ -102,67 +102,6 @@ abstract class SpecialWorkWaitPageBase extends StatefulWidget {
|
||||||
String statusName,
|
String statusName,
|
||||||
);
|
);
|
||||||
|
|
||||||
@protected
|
|
||||||
Widget buildWrapPairRow(
|
|
||||||
String leftText,
|
|
||||||
String rightText, {
|
|
||||||
TextStyle? style,
|
|
||||||
double spacing = 12,
|
|
||||||
}) {
|
|
||||||
final TextStyle effectiveStyle = style ?? const TextStyle();
|
|
||||||
final String trimmedLeftText = leftText.trim();
|
|
||||||
final String trimmedRightText = rightText.trim();
|
|
||||||
|
|
||||||
Widget buildItem(String text, {TextAlign textAlign = TextAlign.left}) {
|
|
||||||
return Text(
|
|
||||||
text,
|
|
||||||
style: effectiveStyle,
|
|
||||||
textAlign: textAlign,
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (trimmedLeftText.isEmpty && trimmedRightText.isEmpty) {
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (trimmedRightText.isEmpty) {
|
|
||||||
return buildItem(leftText);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (trimmedLeftText.isEmpty) {
|
|
||||||
return Align(
|
|
||||||
alignment: Alignment.centerRight,
|
|
||||||
child: buildItem(rightText, textAlign: TextAlign.right),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return LayoutBuilder(
|
|
||||||
builder: (context, constraints) {
|
|
||||||
final double itemWidth = constraints.maxWidth.isFinite
|
|
||||||
? (constraints.maxWidth - spacing) / 2
|
|
||||||
: double.infinity;
|
|
||||||
|
|
||||||
return Wrap(
|
|
||||||
spacing: spacing,
|
|
||||||
runSpacing: 8,
|
|
||||||
children: [
|
|
||||||
SizedBox(width: itemWidth, child: buildItem(leftText)),
|
|
||||||
SizedBox(
|
|
||||||
width: itemWidth,
|
|
||||||
child: Align(
|
|
||||||
alignment: Alignment.centerRight,
|
|
||||||
child: buildItem(rightText, textAlign: TextAlign.right),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 修改为接收具体的方法回调,由 State 传入
|
/// 修改为接收具体的方法回调,由 State 传入
|
||||||
Widget buildActionButtons(
|
Widget buildActionButtons(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
|
|
@ -587,4 +526,4 @@ class _SpecialWorkWaitPageBaseState extends State<SpecialWorkWaitPageBase> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'dart:io' show Platform;
|
import 'dart:io' show Platform;
|
||||||
import 'package:qhd_prevention/customWidget/guarded_tap.dart';
|
|
||||||
|
|
||||||
class MyAppbar extends StatelessWidget implements PreferredSizeWidget {
|
class MyAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||||
final String title;
|
final String title;
|
||||||
|
|
@ -58,7 +57,7 @@ class MyAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||||
Widget _buildBackButton(BuildContext context) {
|
Widget _buildBackButton(BuildContext context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.only(left: Platform.isIOS ? 8.0 : 16.0),
|
padding: EdgeInsets.only(left: Platform.isIOS ? 8.0 : 16.0),
|
||||||
child: GuardedIconButton(
|
child: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Platform.isIOS ? Icons.arrow_back_ios : Icons.arrow_back,
|
Platform.isIOS ? Icons.arrow_back_ios : Icons.arrow_back,
|
||||||
color: textColor,
|
color: textColor,
|
||||||
|
|
@ -85,4 +84,4 @@ class MyAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -12,8 +12,6 @@ import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
import 'package:crypto/crypto.dart' as crypto;
|
import 'package:crypto/crypto.dart' as crypto;
|
||||||
|
|
||||||
export 'click_util.dart';
|
|
||||||
|
|
||||||
int getRandomWithNum(int min, int max) {
|
int getRandomWithNum(int min, int max) {
|
||||||
if (max < min) {
|
if (max < min) {
|
||||||
// 保护性处理:交换或抛错,这里交换
|
// 保护性处理:交换或抛错,这里交换
|
||||||
|
|
@ -256,6 +254,29 @@ bool isBeforeNow(String timeStr) {
|
||||||
}
|
}
|
||||||
return dt.isBefore(DateTime.now());
|
return dt.isBefore(DateTime.now());
|
||||||
}
|
}
|
||||||
|
/// ------------------------------------------------------
|
||||||
|
/// 防多次点击
|
||||||
|
/// ------------------------------------------------------
|
||||||
|
class ClickUtil {
|
||||||
|
ClickUtil._();
|
||||||
|
|
||||||
|
static bool _canClick = true;
|
||||||
|
|
||||||
|
/// 调用示例:
|
||||||
|
/// ClickUtil.noMultipleClicks(() { /* your code */ });
|
||||||
|
static void noMultipleClicks(VoidCallback fn, {int delayMs = 2000}) {
|
||||||
|
if (_canClick) {
|
||||||
|
_canClick = false;
|
||||||
|
fn();
|
||||||
|
Future.delayed(Duration(milliseconds: delayMs), () {
|
||||||
|
_canClick = true;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
debugPrint('请稍后点击');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void presentPage(BuildContext context, Widget page) {
|
void presentPage(BuildContext context, Widget page) {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
|
|
@ -873,4 +894,4 @@ List<Map<String, String>> nationMapList = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
@ -1371,7 +1371,7 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.13.1"
|
version: "4.13.1"
|
||||||
webview_flutter_android:
|
webview_flutter_android:
|
||||||
dependency: "direct main"
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: webview_flutter_android
|
name: webview_flutter_android
|
||||||
sha256: f560f57d0f529c1dcdaf4edc3a3217b099560622f9f4a10b6bdbb566553c61ea
|
sha256: f560f57d0f529c1dcdaf4edc3a3217b099560622f9f4a10b6bdbb566553c61ea
|
||||||
|
|
@ -1387,7 +1387,7 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.15.1"
|
version: "2.15.1"
|
||||||
webview_flutter_wkwebview:
|
webview_flutter_wkwebview:
|
||||||
dependency: "direct main"
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: webview_flutter_wkwebview
|
name: webview_flutter_wkwebview
|
||||||
sha256: a68868ac4828a5f012bf81e8bd25d879f3cec5bd5301575466caafbf9a320a65
|
sha256: a68868ac4828a5f012bf81e8bd25d879f3cec5bd5301575466caafbf9a320a65
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,6 @@ dependencies:
|
||||||
fluttertoast: ^8.2.12
|
fluttertoast: ^8.2.12
|
||||||
#网页页面加载
|
#网页页面加载
|
||||||
webview_flutter: ^4.4.0
|
webview_flutter: ^4.4.0
|
||||||
webview_flutter_android: ^4.11.0
|
|
||||||
webview_flutter_wkwebview: ^3.24.5
|
|
||||||
path_provider: ^2.0.1
|
path_provider: ^2.0.1
|
||||||
|
|
||||||
camera: ^0.11.2
|
camera: ^0.11.2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue