特殊作业修改0602
parent
1c4efc4253
commit
b4669add92
|
|
@ -3,6 +3,7 @@ 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';
|
||||||
|
|
@ -27,6 +28,7 @@ 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;
|
||||||
|
|
@ -35,6 +37,14 @@ 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();
|
||||||
}
|
}
|
||||||
|
|
@ -418,53 +428,64 @@ class _MapWebViewPageState extends State<MapWebViewPage> {
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
// 状态提示栏
|
if (!_supportsWebView)
|
||||||
if (_locationError)
|
const Expanded(
|
||||||
Container(
|
child: Center(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
child: Padding(
|
||||||
color: Colors.orange[100],
|
padding: EdgeInsets.symmetric(horizontal: 24),
|
||||||
child: Row(
|
child: Text(
|
||||||
|
'当前运行平台不支持地图选点,请切换到 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: [
|
||||||
Icon(Icons.warning_amber, color: Colors.orange[800], size: 16),
|
if (_mapUrl.isNotEmpty)
|
||||||
const SizedBox(width: 8),
|
WebViewWidget(controller: _controller),
|
||||||
Expanded(
|
|
||||||
child: Text(
|
if (_loading)
|
||||||
'定位失败,使用默认位置',
|
const Center(
|
||||||
style: TextStyle(color: Colors.orange[800], fontSize: 12),
|
child: Column(
|
||||||
|
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('地图加载中...'),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -485,4 +506,4 @@ class _MapWebViewPageState extends State<MapWebViewPage> {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
debugPrint('地图页面销毁');
|
debugPrint('地图页面销毁');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ 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,6 +1,7 @@
|
||||||
// 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';
|
||||||
|
|
@ -18,6 +19,8 @@ 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';
|
||||||
|
|
||||||
|
|
@ -67,8 +70,23 @@ 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,23 +225,9 @@ class DhWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'现场负责人: ${step10['actUserName'] ?? ''}',
|
||||||
children: [
|
'动火单位负责人: ${step4['actUserName'] ?? ''}',
|
||||||
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'] ?? ''}',
|
||||||
|
|
@ -283,4 +269,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,59 +176,17 @@ class DlWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'作业负责人: $workUserName',
|
||||||
children: [
|
'所在单位负责人: $unitLeaderUserName',
|
||||||
Text(
|
|
||||||
'作业负责人: $workUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'所在单位负责人: $unitLeaderUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'监护人: $guardianUserName',
|
||||||
children: [
|
'安全交底人: $safeDisclosureUserName',
|
||||||
Text(
|
|
||||||
'监护人: $guardianUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'安全交底人: $safeDisclosureUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'接受交底人: $acceptDisclosureUserName',
|
||||||
children: [
|
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
||||||
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'] ?? ''}',
|
||||||
|
|
@ -251,4 +209,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,59 +176,17 @@ class DtWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'作业负责人: $workUserName',
|
||||||
children: [
|
'所在单位负责人: $unitLeaderUserName',
|
||||||
Text(
|
|
||||||
'作业负责人: $workUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'所在单位负责人: $unitLeaderUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'监护人: $guardianUserName',
|
||||||
children: [
|
'安全交底人: $safeDisclosureUserName',
|
||||||
Text(
|
|
||||||
'监护人: $guardianUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'安全交底人: $safeDisclosureUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'接受交底人: $acceptDisclosureUserName',
|
||||||
children: [
|
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
||||||
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'] ?? ''}',
|
||||||
|
|
@ -251,4 +209,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,59 +176,17 @@ class DzWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'作业负责人: $workUserName',
|
||||||
children: [
|
'所在单位负责人: $unitLeaderUserName',
|
||||||
Text(
|
|
||||||
'作业负责人: $workUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'所在单位负责人: $unitLeaderUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'监护人: $guardianUserName',
|
||||||
children: [
|
'安全交底人: $safeDisclosureUserName',
|
||||||
Text(
|
|
||||||
'监护人: $guardianUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'安全交底人: $safeDisclosureUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'接受交底人: $acceptDisclosureUserName',
|
||||||
children: [
|
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
||||||
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'] ?? ''}',
|
||||||
|
|
@ -251,4 +209,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,41 +199,21 @@ class GcWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'作业负责人: $workUserName',
|
||||||
children: [
|
'所在单位负责人: $unitLeaderUserName',
|
||||||
Text("作业负责人: $workUserName",
|
|
||||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
|
||||||
Text("所在单位负责人: $unitLeaderUserName",
|
|
||||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'审核部门负责人: $auditDepartmentLeaderUserName',
|
||||||
children: [
|
'审批部门负责人: $spDepartmentLeaderUserName',
|
||||||
Text("审核部门负责人: $auditDepartmentLeaderUserName",
|
|
||||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
|
||||||
Text("审批部门负责人: $spDepartmentLeaderUserName",
|
|
||||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'监护人: $guardianUserName',
|
||||||
children: [
|
'安全交底人: $safeDisclosureUserName',
|
||||||
Text("监护人: $guardianUserName",
|
|
||||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
|
||||||
Text("安全交底人: $safeDisclosureUserName",
|
|
||||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'接受交底人: $acceptDisclosureUserName',
|
||||||
children: [
|
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
||||||
Text("接受交底人: $acceptDisclosureUserName",
|
|
||||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
|
||||||
Text("验收部门负责人: $acceptDepartmentLeaderUserName",
|
|
||||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"作业类型: ${info['operationTypeName'] ?? ''}",
|
"作业类型: ${info['operationTypeName'] ?? ''}",
|
||||||
|
|
@ -256,4 +236,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,11 +131,6 @@ 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 =
|
||||||
|
|
@ -196,78 +191,21 @@ class LsydWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'作业指挥负责人: ${info['workCommandPerson'] ?? ''}',
|
||||||
children: [
|
'用电单位负责人: $userElectDepartmentLeaderUserName',
|
||||||
Text(
|
|
||||||
'作业指挥负责人: ${info['workCommandPerson'] ?? ''}',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'用电单位负责人: $userElectDepartmentLeaderUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'配送电单位负责人: $sendEletDepartmentLeaderUserName',
|
||||||
children: [
|
'${info['gasFlag']}' == '1' ? '气体分析人: $gasUserName' : '',
|
||||||
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,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'监护人: $guardianUserName',
|
||||||
children: [
|
'安全交底人: $safeDisclosureUserName',
|
||||||
Text(
|
|
||||||
'监护人: ${guardianUserName}',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'安全交底人: $safeDisclosureUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'接受交底人: $acceptDisclosureUserName',
|
||||||
children: [
|
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
||||||
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'] ?? ''}',
|
||||||
|
|
@ -290,4 +228,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,9 +125,6 @@ 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'] ?? ''}';
|
||||||
|
|
||||||
|
|
@ -184,59 +181,17 @@ class MbcdWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'作业负责人: $workUserName',
|
||||||
children: [
|
'所在单位负责人: $unitLeaderUserName',
|
||||||
Text(
|
|
||||||
'作业负责人: $workUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'所在单位负责人: $unitLeaderUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'监护人: $guardianUserName',
|
||||||
children: [
|
'安全交底人: $safeDisclosureUserName',
|
||||||
Text(
|
|
||||||
'监护人: $guardianUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'安全交底人: $safeDisclosureUserName',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: null,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'接受交底人: $acceptDisclosureUserName',
|
||||||
children: [
|
'验收部门负责人: $acceptDepartmentLeaderUserName',
|
||||||
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'] ?? ''}',
|
||||||
|
|
@ -259,4 +214,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,23 +161,9 @@ class SxkjWaitPage extends SpecialWorkWaitPageBase {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
buildWrapPairRow(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
'管理单位: ${chooseLimitedSpace['manageDeptName'] ?? ''}',
|
||||||
children: [
|
'作业单位: ${info['workDepartmentName'] ?? ''}',
|
||||||
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'] ?? ''}',
|
||||||
|
|
@ -213,4 +199,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,15 +935,10 @@ 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');
|
||||||
|
|
@ -1272,10 +1267,10 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 统一标题
|
/// 统一标题
|
||||||
String get pageTitleForEdit => '$workTitle编辑';
|
String get pageTitleForEdit => '编辑';
|
||||||
|
|
||||||
/// 统一标题
|
/// 统一标题
|
||||||
String get pageTitleForApply => '$workTitle申请';
|
String get pageTitleForApply => '新增';
|
||||||
|
|
||||||
/// 统一 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.stepName),
|
appBar: MyAppbar(title: widget.isEdit ? '审批' : '查看'),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
padding: const EdgeInsets.all(5),
|
padding: const EdgeInsets.all(5),
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,67 @@ 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,
|
||||||
|
|
@ -526,4 +587,4 @@ class _SpecialWorkWaitPageBaseState extends State<SpecialWorkWaitPageBase> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
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;
|
||||||
|
|
@ -57,7 +58,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: IconButton(
|
child: GuardedIconButton(
|
||||||
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,
|
||||||
|
|
@ -84,4 +85,4 @@ class MyAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ 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) {
|
||||||
// 保护性处理:交换或抛错,这里交换
|
// 保护性处理:交换或抛错,这里交换
|
||||||
|
|
@ -254,29 +256,6 @@ 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,
|
||||||
|
|
@ -894,4 +873,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: transitive
|
dependency: "direct main"
|
||||||
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: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: webview_flutter_wkwebview
|
name: webview_flutter_wkwebview
|
||||||
sha256: a68868ac4828a5f012bf81e8bd25d879f3cec5bd5301575466caafbf9a320a65
|
sha256: a68868ac4828a5f012bf81e8bd25d879f3cec5bd5301575466caafbf9a320a65
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,8 @@ 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