NFC巡检准备

main
hs 2025-08-22 09:02:35 +08:00
parent 87b1f80d3d
commit 2495e4b9d4
170 changed files with 2599 additions and 2269 deletions

View File

@ -64,7 +64,7 @@
<uses-permission android:name="com.majeur.launcher.permission.UPDATE_BADGE"/> <uses-permission android:name="com.majeur.launcher.permission.UPDATE_BADGE"/>
<application <application
android:label="qhd_prevention" android:label="@string/appName"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"

View File

@ -1,12 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" /> <item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
<!-- You can insert your own image assets here --> </item>
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list> </layer-list>

View File

@ -1,12 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" /> <item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
<!-- You can insert your own image assets here --> </item>
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list> </layer-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -5,6 +5,10 @@
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame --> the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your This theme determines the color of the Android Window while your

View File

@ -5,6 +5,10 @@
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame --> the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your This theme determines the color of the Android Window while your

View File

@ -16,6 +16,8 @@ PODS:
- BaiduMapKit/Map (= 6.6.4) - BaiduMapKit/Map (= 6.6.4)
- Flutter - Flutter
- flutter_baidu_mapapi_base - flutter_baidu_mapapi_base
- flutter_native_splash (2.4.3):
- Flutter
- flutter_new_badger (0.0.1): - flutter_new_badger (0.0.1):
- Flutter - Flutter
- fluttertoast (0.0.2): - fluttertoast (0.0.2):
@ -60,6 +62,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_baidu_mapapi_base (from `.symlinks/plugins/flutter_baidu_mapapi_base/ios`) - flutter_baidu_mapapi_base (from `.symlinks/plugins/flutter_baidu_mapapi_base/ios`)
- flutter_baidu_mapapi_map (from `.symlinks/plugins/flutter_baidu_mapapi_map/ios`) - flutter_baidu_mapapi_map (from `.symlinks/plugins/flutter_baidu_mapapi_map/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_new_badger (from `.symlinks/plugins/flutter_new_badger/ios`) - flutter_new_badger (from `.symlinks/plugins/flutter_new_badger/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/darwin`) - geolocator_apple (from `.symlinks/plugins/geolocator_apple/darwin`)
@ -91,6 +94,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_baidu_mapapi_base/ios" :path: ".symlinks/plugins/flutter_baidu_mapapi_base/ios"
flutter_baidu_mapapi_map: flutter_baidu_mapapi_map:
:path: ".symlinks/plugins/flutter_baidu_mapapi_map/ios" :path: ".symlinks/plugins/flutter_baidu_mapapi_map/ios"
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
flutter_new_badger: flutter_new_badger:
:path: ".symlinks/plugins/flutter_new_badger/ios" :path: ".symlinks/plugins/flutter_new_badger/ios"
fluttertoast: fluttertoast:
@ -129,6 +134,7 @@ SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_baidu_mapapi_base: 24dd82034374c6f52a73e90316834c63ff8d4f64 flutter_baidu_mapapi_base: 24dd82034374c6f52a73e90316834c63ff8d4f64
flutter_baidu_mapapi_map: f799cc1bb3d39196b8d3d59399ca8635e690bd44 flutter_baidu_mapapi_map: f799cc1bb3d39196b8d3d59399ca8635e690bd44
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
flutter_new_badger: 133aaf93e9a5542bf905c8483d8b83c5ef4946ea flutter_new_badger: 133aaf93e9a5542bf905c8483d8b83c5ef4946ea
fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1 fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1
geolocator_apple: ab36aa0e8b7d7a2d7639b3b4e48308394e8cef5e geolocator_apple: ab36aa0e8b7d7a2d7639b3b4e48308394e8cef5e

View File

@ -567,7 +567,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
@ -624,7 +624,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";

View File

@ -1,122 +1 @@
{ {"images":[{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@3x.png","scale":"3x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}}
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 704 B

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 862 B

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 862 B

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,23 +1,23 @@
{ {
"images" : [ "images" : [
{ {
"idiom" : "universal",
"filename" : "LaunchImage.png", "filename" : "LaunchImage.png",
"idiom" : "universal",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"idiom" : "universal",
"filename" : "LaunchImage@2x.png", "filename" : "LaunchImage@2x.png",
"idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal",
"filename" : "LaunchImage@3x.png", "filename" : "LaunchImage@3x.png",
"idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
], ],
"info" : { "info" : {
"version" : 1, "author" : "xcode",
"author" : "xcode" "version" : 1
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 69 B

View File

@ -16,13 +16,19 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI"/>
</imageView> <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"></imageView>
</subviews> </subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/> <constraint firstItem="YRO-k0-Ey4" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="3T2-ad-Qdv"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/> <constraint firstItem="tWc-Dq-wcI" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="RPx-PI-7Xg"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="SdS-ul-q2q"/>
<constraint firstAttribute="trailing" secondItem="tWc-Dq-wcI" secondAttribute="trailing" id="Swv-Gf-Rwn"/>
<constraint firstAttribute="trailing" secondItem="YRO-k0-Ey4" secondAttribute="trailing" id="TQA-XW-tRk"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="duK-uY-Gun"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="kV7-tw-vXt"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="xPn-NY-SIU"/>
</constraints> </constraints>
</view> </view>
</viewController> </viewController>
@ -33,5 +39,6 @@
</scenes> </scenes>
<resources> <resources>
<image name="LaunchImage" width="168" height="185"/> <image name="LaunchImage" width="168" height="185"/>
<image name="LaunchBackground" width="1" height="1"/>
</resources> </resources>
</document> </document>

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>CADisableMinimumFrameDurationOnPhone</key> <key>CADisableMinimumFrameDurationOnPhone</key>
<true/> <true/>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>Qhd Prevention</string> <string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
@ -13,7 +13,7 @@
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>qhd_prevention</string> <string>智守安全</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
@ -83,5 +83,7 @@
<string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>
</dict> <key>UIStatusBarHidden</key>
<false/>
</dict>
</plist> </plist>

View File

@ -37,7 +37,7 @@ class _MapPageState extends State<MapPage> {
_isLoading = true; _isLoading = true;
_errorMessage = null; _errorMessage = null;
}); });
LoadingDialogHelper.show(message: '地图加载中');
try { try {
final LocationResult loc = await LocationService.getCurrentLocation( final LocationResult loc = await LocationService.getCurrentLocation(
timeout: const Duration(seconds: 10), timeout: const Duration(seconds: 10),
@ -91,6 +91,8 @@ class _MapPageState extends State<MapPage> {
..setNavigationDelegate( ..setNavigationDelegate(
NavigationDelegate( NavigationDelegate(
onPageFinished: (String url) async { onPageFinished: (String url) async {
LoadingDialogHelper.hide();
debugPrint('网页加载完成: $url'); debugPrint('网页加载完成: $url');
await _injectLocationParams(); await _injectLocationParams();
}, },

View File

@ -3143,7 +3143,30 @@ U6Hzm1ninpWeE+awIDAQAB
}, },
); );
} }
///
static Future<Map<String, dynamic>> getWorkshopSafetyOtherCommitmen(String PROMISE_ID, String PROMISEPEOPLE_ID) {
return HttpManager().request(
basePath,
'/app/corppromise/goEdit_II',
method: Method.post,
data: {
"PROMISE_ID": PROMISE_ID,
"PROMISEPEOPLE_ID": PROMISEPEOPLE_ID,
},
);
}
static Future<Map<String, dynamic>> getWorkshopSafetyOthercorppromise(String PROMISEPEOPLE_ID) {
return HttpManager().request(
basePath,
'/app/corppromise/editIsRead_II',
method: Method.post,
data: {
"PROMISEPEOPLE_ID": PROMISEPEOPLE_ID,
},
);
}
/// ///
static Future<Map<String, dynamic>> getTeamSafetyCommitmentList(int page,String keyWord,String id) { static Future<Map<String, dynamic>> getTeamSafetyCommitmentList(int page,String keyWord,String id) {

View File

@ -96,7 +96,8 @@ class MyApp extends StatelessWidget {
return GestureDetector( return GestureDetector(
behavior: HitTestBehavior.translucent, behavior: HitTestBehavior.translucent,
onTap: () { onTap: () {
FocusScope.of(context).unfocus(); // FocusScope.of(context).unfocus();
FocusHelper.clearFocus(context);
}, },
child: widget, child: widget,
); );

View File

@ -0,0 +1,355 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:qhd_prevention/customWidget/custom_button.dart';
import 'package:qhd_prevention/customWidget/single_image_viewer.dart';
import 'package:qhd_prevention/pages/main_tab.dart';
import 'package:qhd_prevention/pages/mine/mine_sign_page.dart';
import 'package:qhd_prevention/pages/my_appbar.dart';
import 'package:qhd_prevention/customWidget/toast_util.dart';
import 'package:qhd_prevention/http/ApiService.dart';
import 'package:qhd_prevention/tools/tools.dart';
/// uniapp
/// ApiService goEditII / editIsReadII / submitCorppromiseSign
///
class OtherPromisePage extends StatefulWidget {
const OtherPromisePage({
super.key,
required this.TabCur,
required this.PROMISE_ID,
required this.PROMISEPEOPLE_ID,
});
final int TabCur;
final String PROMISE_ID;
final String PROMISEPEOPLE_ID;
@override
State<OtherPromisePage> createState() => _OtherPromisePageState();
}
class _OtherPromisePageState extends State<OtherPromisePage> {
bool _loading = true;
Map<String, dynamic> info = {};
String? baseImgPath = ApiService.baseImgPath;
@override
void initState() {
super.initState();
// uniapp onLoad
_loadData();
// TabCur == 1uniapp if(option.TabCur=='1') this.setPromiseIsRead
if (widget.TabCur == 1) {
_setPromiseIsRead();
}
}
Future<void> _loadData() async {
setState(() => _loading = true);
try {
// ApiService widget.PROMISE_ID / PROMISEPEOPLE_ID
final res = await ApiService.getWorkshopSafetyOtherCommitmen(
widget.PROMISE_ID,
widget.PROMISEPEOPLE_ID,
);
final coll = (res['promistDetail'] as List?) ?? (res['promistdetail'] as List?) ?? [];
final DETAIL = coll
.map((e) => {
'value': e?['COLLATERAL']?.toString() ?? e?['collateral']?.toString() ?? '',
'id': e?['PROMISEDETAIL_ID']?.toString() ?? e?['promiseDetail_id']?.toString() ?? '',
})
.toList();
final Map<String, dynamic> merged = {};
if (res['varList'] is Map) merged.addAll(Map<String, dynamic>.from(res['varList']));
if (res['people'] is Map) merged.addAll(Map<String, dynamic>.from(res['people']));
merged['TEXT'] = res['TEXT']?.toString() ?? res['text']?.toString() ?? merged['TEXT'] ?? '';
merged['DETAIL'] = DETAIL;
if (res['coverpeople'] is List && (res['coverpeople'] as List).isNotEmpty) {
merged['COVERPEOPLE'] = (res['coverpeople'][0]['USERNAME'] ?? res['coverpeople'][0]['username'])?.toString() ?? '';
} else if (res['coverpeople'] is String) {
merged['COVERPEOPLE'] = res['coverpeople'];
}
res.forEach((k, v) {
if (!merged.containsKey(k)) merged[k] = v;
});
merged['PROMISEPEOPLE_ID'] = res['PROMISEPEOPLE_ID'] ?? widget.PROMISEPEOPLE_ID;
merged['SIGNTIME'] = merged['SIGNTIME'] ?? merged['signtime'] ?? '';
merged['CREATTIME'] = merged['CREATTIME'] ?? merged['creattime'] ?? merged['CREATTIME'] ?? '';
setState(() {
info = merged;
_loading = false;
});
} catch (e, st) {
debugPrint('加载承诺详情失败:$e\n$st');
setState(() => _loading = false);
ToastUtil.showNormal(context, '加载失败,请稍后重试');
}
}
Future<void> _setPromiseIsRead() async {
try {
await ApiService.getWorkshopSafetyOthercorppromise(widget.PROMISEPEOPLE_ID);
} catch (e) {
debugPrint('标记已读失败: $e');
// uniapp
}
}
String _formatDateShort(dynamic s) {
if (s == null) return '';
final str = s.toString();
if (str.length >= 10) return str.substring(0, 10);
return str;
}
Future<void> _sign() async {
// MineSignPage
// String uniapp
final result = await Navigator.push<String>(
context,
MaterialPageRoute(builder: (_) => const MineSignPage()),
);
if (result != null && result.isNotEmpty) {
setState(() {
info['FILEPATH'] = result;
});
// /
FocusScope.of(context).unfocus();
}
}
Future<void> submitSignedPromise() async {
final filePath = (info['FILEPATH'] ?? '').toString();
if (filePath.isEmpty) {
ToastUtil.showNormal(context, '请签字');
return;
}
try {
LoadingDialogHelper.show();
// 使 submitCorppromiseSign(filePath, info)
final res = await ApiService.submitCorppromiseSign(filePath, info);
LoadingDialogHelper.hide();
if (res is Map && (res['result'] == 'success' || res['code'] == 0 || res['status'] == 'success')) {
ToastUtil.showSuccess(context, '提交成功');
// uniapp
Navigator.pushReplacement(context, MaterialPageRoute(builder: (_) => const MainPage()));
} else {
final msg = (res is Map) ? (res['message'] ?? res['msg'] ?? '提交失败') : '提交失败';
ToastUtil.showNormal(context, msg.toString());
}
} catch (e, st) {
LoadingDialogHelper.hide();
debugPrint('提交签字失败:$e\n$st');
ToastUtil.showNormal(context, '提交失败,请重试');
}
}
Widget _buildTitle() {
final type = (info['TYPE'] ?? '').toString();
final title = type == '0' ? '安全生产承诺书' : '安全生产责任状';
return Padding(
padding: const EdgeInsets.symmetric(vertical: 12.0),
child: Text(
title,
style: const TextStyle(fontSize: 22, fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
),
);
}
Widget _buildHeaderName() {
final type = (info['TYPE'] ?? '').toString();
if (type == '0') {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: Text(
'${info['COVERPEOPLE'] ?? ''}',
style: const TextStyle(fontSize: 16),
),
);
}
return const SizedBox.shrink();
}
Widget _buildParagraph(String text) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 8.0),
child: RichText(
textAlign: TextAlign.justify,
text: TextSpan(
style: const TextStyle(
height: 1.6,
letterSpacing: 0.5,
color: Colors.black,
),
children: [
const WidgetSpan(child: SizedBox(width: 28)),
TextSpan(text: text),
],
),
),
);
}
Widget _buildCollateralList() {
final detail = (info['DETAIL'] as List?) ?? [];
if (detail.isEmpty) return const SizedBox.shrink();
return Padding(
padding: const EdgeInsets.only(left: 0, right: 8.0, top: 6.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: detail.map<Widget>((e) {
return _buildParagraph(e['value']?.toString() ?? '');
}).toList(),
),
);
}
Widget _buildFooter() {
final type = (info['TYPE'] ?? '').toString();
final signImagePath = (info['FILEPATH'] ?? '').toString();
final signTime = (info['SIGNTIME'] ?? '').toString();
final creatTime = (info['CREATTIME'] ?? '').toString();
Widget signPreview;
if (signImagePath.isNotEmpty && (signImagePath.startsWith('http') || signImagePath.startsWith('https'))) {
signPreview = Image.network(
signImagePath,
width: 100,
height: 50,
fit: BoxFit.cover,
);
} else if (signImagePath.isNotEmpty && File(signImagePath).existsSync()) {
signPreview = Image.file(
File(signImagePath),
width: 100,
height: 50,
fit: BoxFit.cover,
);
} else if (signImagePath.isNotEmpty && baseImgPath != null) {
// baseImgPath
signPreview = Image.network(
'${baseImgPath!}$signImagePath',
width: 100,
height: 50,
fit: BoxFit.cover,
);
} else {
signPreview = const SizedBox(width: 100, height: 50);
}
return Padding(
padding: const EdgeInsets.only(top: 12.0, left: 8.0, right: 8.0, bottom: 20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
if (type == '0')
const Align(alignment: Alignment.centerRight, child: Text('承诺单位(盖章)')),
if (type == '1')
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text('发状人:${info['COVERPEOPLE'] ?? ''}'),
const SizedBox(height: 6),
Text(creatTime.isNotEmpty ? _formatDateShort(creatTime) : ''),
],
),
const SizedBox(height: 12),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(type == '0' ? '主要负责人签字:' : '受状人:'),
const SizedBox(width: 8),
GestureDetector(
onTap: () {
if ((info['FILEPATH'] ?? '').toString().isNotEmpty) {
presentOpaque(
SingleImageViewer(imageUrl: info['FILEPATH'] ?? ''),
context,
);
}
},
child: signPreview,
),
],
),
),
],
),
const SizedBox(height: 10),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const SizedBox(),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [Text(signTime.isNotEmpty ? _formatDateShort(signTime) : '')],
),
],
),
],
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const MyAppbar(title: '安全承诺'),
body: _loading
? const Center(child: CircularProgressIndicator())
: SingleChildScrollView(
child: Container(
color: Colors.white,
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Center(child: _buildTitle()),
_buildHeaderName(),
_buildParagraph(info['TEXT']?.toString() ?? ''),
_buildCollateralList(),
if ((info['TYPE'] ?? '').toString() == '0') ...[
_buildParagraph(
'若违反上述承诺和未履行安全生产职责,或发生责任事故的,接受政府或公司事故调查组做出的处罚决定。',
),
_buildParagraph(
'承诺期限自${_formatDateShort(info['PROMISE_TERM_START'])}${_formatDateShort(info['PROMISE_TERM_END'])}',
),
] else ...[
_buildParagraph(
'若未履行安全生产职责,或发生生产安全事故的,接受公司或政府事故调查组做出的处罚。',
),
_buildParagraph(
'责任期限自${_formatDateShort(info['PROMISE_TERM_START'])}${_formatDateShort(info['PROMISE_TERM_END'])}',
),
],
const SizedBox(height: 8),
_buildFooter(),
],
),
),
),
);
}
}

View File

@ -2,42 +2,44 @@ import 'package:flutter/material.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:qhd_prevention/customWidget/custom_button.dart'; import 'package:qhd_prevention/customWidget/custom_button.dart';
import 'package:qhd_prevention/customWidget/promise/promise_page.dart';
import 'package:qhd_prevention/customWidget/search_bar_widget.dart'; import 'package:qhd_prevention/customWidget/search_bar_widget.dart';
import 'package:qhd_prevention/customWidget/toast_util.dart'; import 'package:qhd_prevention/customWidget/toast_util.dart';
import 'dart:convert'; import 'dart:convert';
import 'dart:math' as math; import 'dart:math' as math;
import 'package:qhd_prevention/http/ApiService.dart'; import 'package:qhd_prevention/http/ApiService.dart';
import 'package:qhd_prevention/pages/home/SafetyCommitment/other_promise_page.dart';
import 'package:qhd_prevention/pages/home/Safetymeeting/safety_meeting_detail_page.dart'; import 'package:qhd_prevention/pages/home/Safetymeeting/safety_meeting_detail_page.dart';
import 'package:qhd_prevention/pages/my_appbar.dart'; import 'package:qhd_prevention/pages/my_appbar.dart';
import 'package:qhd_prevention/pages/notif/notif_detail_page.dart'; import 'package:qhd_prevention/pages/notif/notif_detail_page.dart';
import 'package:qhd_prevention/tools/tools.dart'; import 'package:qhd_prevention/tools/tools.dart';
class SafetyCommitmentOtherListPage extends StatefulWidget { class SafetyCommitmentOtherListPage extends StatefulWidget {
const SafetyCommitmentOtherListPage({Key? key}) : super(key: key); const SafetyCommitmentOtherListPage({Key? key}) : super(key: key);
@override @override
State<SafetyCommitmentOtherListPage> createState() => _SafetyCommitmentOtherListPageState(); State<SafetyCommitmentOtherListPage> createState() =>
_SafetyCommitmentOtherListPageState();
} }
class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherListPage> class _SafetyCommitmentOtherListPageState
with SingleTickerProviderStateMixin{ extends State<SafetyCommitmentOtherListPage>
with SingleTickerProviderStateMixin {
late TabController _tabController = TabController(
length: 2,
late TabController _tabController= TabController(length: 2, vsync: this); vsync: this,
int _selectedTab = 0; initialIndex: 1,
);
int _selectedTab = 1;
int _page = 1; int _page = 1;
String searchKey=""; String searchKey = "";
int _totalPage=1; int _totalPage = 1;
late List<dynamic> _list = []; late List<dynamic> _list = [];
bool _isLoading = false; bool _isLoading = false;
bool _hasMore = true; bool _hasMore = true;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -52,17 +54,15 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
print('切换到标签:${_tabController.index}'); print('切换到标签:${_tabController.index}');
reRefreshData(); reRefreshData();
} }
}); });
_getSafetyMeetingList(false); _getSafetyMeetingList(false);
} }
void reRefreshData(){ void reRefreshData() {
_page=1; _page = 1;
_list.clear(); _list.clear();
_getSafetyMeetingList(false); _getSafetyMeetingList(false);
} }
Future<void> _getSafetyMeetingList(bool loadMore) async { Future<void> _getSafetyMeetingList(bool loadMore) async {
@ -71,16 +71,15 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
if (_isLoading) return; if (_isLoading) return;
_isLoading = true; _isLoading = true;
final Map<String, dynamic> result; final Map<String, dynamic> result;
if(_selectedTab==0){ if (_selectedTab == 0) {
result = await ApiService.getMyOtherCommitmentsList(); result = await ApiService.getMyOtherCommitmentsList();
}else{ } else {
result = await ApiService.getAcceptCommitmentList( ); result = await ApiService.getAcceptCommitmentList();
} }
if (result['result'] == 'success') { if (result['result'] == 'success') {
_totalPage =result["page"]['totalPage'] ?? 1; _totalPage = result["page"]['totalPage'] ?? 1;
final List<dynamic> newList = result['varList'] ?? []; final List<dynamic> newList = result['varList'] ?? [];
// setState(() { // setState(() {
// _list.addAll(newList); // _list.addAll(newList);
@ -95,12 +94,10 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
_hasMore = _page < _totalPage; _hasMore = _page < _totalPage;
// if (_hasMore) _page++; // if (_hasMore) _page++;
}); });
} else {
}else{
ToastUtil.showNormal(context, "加载数据失败"); ToastUtil.showNormal(context, "加载数据失败");
// _showMessage('加载数据失败'); // _showMessage('加载数据失败');
} }
} catch (e) { } catch (e) {
// Toast // Toast
print('加载数据失败:$e'); print('加载数据失败:$e');
@ -110,12 +107,6 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
} }
} }
@override @override
void dispose() { void dispose() {
_tabController.dispose(); _tabController.dispose();
@ -126,8 +117,7 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: MyAppbar(title: "其他行业安全承诺"), appBar: MyAppbar(title: "其他行业安全承诺"),
body: body: GestureDetector(
GestureDetector(
onTap: () { onTap: () {
FocusScope.of(context).unfocus(); // FocusScope.of(context).unfocus(); //
}, },
@ -165,7 +155,6 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
), ),
), ),
), ),
], ],
), ),
), ),
@ -174,7 +163,7 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
); );
} }
Widget _itemCell(final item) { Widget _itemCell(dynamic item) {
return InkWell( return InkWell(
onTap: () => _goToDetail(item), onTap: () => _goToDetail(item),
child: Container( child: Container(
@ -193,59 +182,61 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Text(
'-${item['DEPARTMENT_NAME']}',//$itemTitle '被承诺人:${item['coverpeople']}', //$itemTitle
style: const TextStyle( style: const TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
if (item['ISREAD'] == '0')
Container(
width: 5,
height: 5,
decoration: BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
),
],
),
Text(
'承诺人:${item['NAME']}', //$itemTitle
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
const SizedBox(height: 8), const SizedBox(height: 8),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [Text('${item['SIGNTIME']}')],
Text('承诺时间: ${item['SIGN_TIME']}'),
Text('承诺人: ${item['SIGN_USER_NAME']}'),
],
), ),
], ],
), ),
), ),
); );
} }
bool _onScroll(ScrollNotification n) { bool _onScroll(ScrollNotification n) {
if (n.metrics.pixels > n.metrics.maxScrollExtent - 100 && if (n.metrics.pixels > n.metrics.maxScrollExtent - 100 &&
_hasMore && !_isLoading) { _hasMore &&
!_isLoading) {
_page++; _page++;
_getSafetyMeetingList(true); _getSafetyMeetingList(true);
} }
return false; return false;
} }
void _goToDetail(dynamic item) {
void _goToDetail(String id){ pushPage(
pushPage(SafetyMeetingDetailPage( OtherPromisePage(
id,_selectedTab, TabCur: _selectedTab,
onClose: (String result) { PROMISE_ID: item['PROMISE_ID'],
setState(() { PROMISEPEOPLE_ID: item['PROMISEPEOPLE_ID'],
reRefreshData(); ),
}); context,
);
},
), context);
} }
} }

View File

@ -6,7 +6,6 @@ import 'package:qhd_prevention/pages/home/tap/item_list_widget.dart';
import 'package:qhd_prevention/pages/my_appbar.dart'; import 'package:qhd_prevention/pages/my_appbar.dart';
import 'package:qhd_prevention/tools/tools.dart'; import 'package:qhd_prevention/tools/tools.dart';
class SafetyCommitmentPage extends StatefulWidget { class SafetyCommitmentPage extends StatefulWidget {
const SafetyCommitmentPage({super.key}); const SafetyCommitmentPage({super.key});
@ -14,7 +13,6 @@ class SafetyCommitmentPage extends StatefulWidget {
State<SafetyCommitmentPage> createState() => _SafetyCommitmentPageState(); State<SafetyCommitmentPage> createState() => _SafetyCommitmentPageState();
} }
class _SafetyCommitmentPageState extends State<SafetyCommitmentPage> { class _SafetyCommitmentPageState extends State<SafetyCommitmentPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -22,33 +20,35 @@ class _SafetyCommitmentPageState extends State<SafetyCommitmentPage> {
appBar: MyAppbar(title: "安全承诺"), appBar: MyAppbar(title: "安全承诺"),
body: Column( body: Column(
children: [ children: [
Padding(padding: EdgeInsets.only(top: 10), Container(
child: ItemListWidget.selectableLineTitleTextRightButton( color: Colors.white,
padding: EdgeInsets.only(top: 10),
child: Column(
children: [
ItemListWidget.selectableLineTitleTextRightButton(
label: '危化行业安全承诺:', label: '危化行业安全承诺:',
isEditable: true, isEditable: true,
isRequired:false, isRequired: false,
onTap: () { onTap: () {
pushPage(SafetyCommitmentTabList(), context); pushPage(SafetyCommitmentTabList(), context);
}, },
text:' ', text: ' ',
), ),
),
const Divider(), const Divider(),
Padding(padding: EdgeInsets.only(top: 10), ItemListWidget.selectableLineTitleTextRightButton(
child:ItemListWidget.selectableLineTitleTextRightButton(
label: '其他行业安全承诺:', label: '其他行业安全承诺:',
isEditable: true, isEditable: true,
isRequired:false, isRequired: false,
onTap: () { onTap: () {
pushPage(SafetyCommitmentOtherListPage(), context); pushPage(SafetyCommitmentOtherListPage(), context);
}, },
text: ' ', text: ' ',
), ),
const Divider(color: Colors.white,),
],
),
), ),
const Divider(),
], ],
), ),
); );

View File

@ -109,7 +109,7 @@ class _HomePageState extends State<HomePage> {
"title": "安全例会", "title": "安全例会",
"unreadCount": 0, "unreadCount": 0,
}, },
// {"icon": "assets/icon-apps/home-xj.png", "title": "燃气巡检", "unreadCount": 0}, {"icon": "assets/icon-apps/home-xj.png", "title": "燃气巡检", "unreadCount": 0},
]; ];
/// ///

View File

@ -207,7 +207,7 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
const Divider(), const Divider(),
ItemListWidget.selectableLineTitleTextRightButton( ItemListWidget.selectableLineTitleTextRightButton(
label: '视频监控:', label: '视频监控:',
isClean: pd['WORK_LEVEL'] == '一级' || pd['WORK_LEVEL'] == '二级', isClean: widget.isEditable && (pd['WORK_LEVEL'] == '一级' || pd['WORK_LEVEL'] == '二级'),
cleanText: '清除监控', cleanText: '清除监控',
isRequired: pd['WORK_LEVEL'] == '特级', isRequired: pd['WORK_LEVEL'] == '特级',
isEditable: widget.isEditable, isEditable: widget.isEditable,

View File

@ -234,15 +234,15 @@ class _HotworkSafeFuncSureState extends State<HotworkSafeFuncSure> {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['MEASURES'] = json.encode(measuresList); formData['MEASURES'] = json.encode(measuresList);
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -252,19 +252,14 @@ class _HotworkSafeFuncSureState extends State<HotworkSafeFuncSure> {
); );
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
if (result['result'] == 'success') { if (result['result'] == 'success') {
ToastUtil.showSuccess( ToastUtil.showSuccess(context, status == '1' ? '提交成功' : '已暂存');
context,
status == '1' ? '提交成功' : '已暂存',
);
Navigator.of(context).pop(true); // true Navigator.of(context).pop(true); // true
} }
} catch (e) { } catch (e) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
}, }
),
);
} }
void printLongString(String text, {int chunkSize = 800}) { void printLongString(String text, {int chunkSize = 800}) {

View File

@ -170,15 +170,15 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure('hotwork', final result = await ApiService.saveSafeFunctionSure('hotwork',
@ -194,9 +194,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -85,7 +85,7 @@ class _HotworkAqjdDetailState extends State<HotworkAqjdDetail> {
MaterialPageRoute(builder: (context) => MineSignPage()), MaterialPageRoute(builder: (context) => MineSignPage()),
); );
await NativeOrientation.setPortrait(); await NativeOrientation.setPortrait();
if (path != null) { if (path != null) {
final now = DateFormat('yyyy-MM-dd HH:mm').format(DateTime.now()); final now = DateFormat('yyyy-MM-dd HH:mm').format(DateTime.now());
setState(() { setState(() {
signImages.add(path); signImages.add(path);
@ -182,7 +182,7 @@ if (path != null) {
return; return;
} }
} }
// serverPath // serverPath
final serverPathString = imgList final serverPathString = imgList
.map((e) => e.serverPath) .map((e) => e.serverPath)
.where((s) => s.isNotEmpty) .where((s) => s.isNotEmpty)
@ -199,19 +199,19 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['IMG_PATH'] = serverPathString; formData['IMG_PATH'] = serverPathString;
final confirmed = await CustomAlertDialog.showConfirm(
await showDialog<String>( context,
context: context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure('hotwork', final result = await ApiService.saveSafeFunctionSure(
'hotwork',
formData, formData,
signImages, signImages,
); );
@ -224,14 +224,15 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
}, }
),
);
} }
/// ///
Future<void> _getData() async { Future<void> _getData() async {
final data = await ApiService.getHomeworkFindById('hotwork', widget.HOTWORK_ID); final data = await ApiService.getHomeworkFindById(
'hotwork',
widget.HOTWORK_ID,
);
setState(() { setState(() {
pd = data['pd']; pd = data['pd'];
@ -241,7 +242,8 @@ if (path != null) {
} }
Future<void> _getMeasures(String homework_id) async { Future<void> _getMeasures(String homework_id) async {
final data = await ApiService.listSignFinishMeasures('hotwork', final data = await ApiService.listSignFinishMeasures(
'hotwork',
homework_id.length > 0 ? homework_id : widget.HOTWORK_ID, homework_id.length > 0 ? homework_id : widget.HOTWORK_ID,
); );
setState(() { setState(() {
@ -252,7 +254,8 @@ if (path != null) {
} }
Future<void> _getSigns(String homework_id) async { Future<void> _getSigns(String homework_id) async {
final data = await ApiService.listSignFinished('hotwork', final data = await ApiService.listSignFinished(
'hotwork',
homework_id.length > 0 ? homework_id : widget.HOTWORK_ID, homework_id.length > 0 ? homework_id : widget.HOTWORK_ID,
); );
setState(() { setState(() {
@ -317,7 +320,8 @@ if (path != null) {
); );
}, },
), ),
ItemListWidget.itemContainer(Column( ItemListWidget.itemContainer(
Column(
children: [ children: [
RepairedPhotoSection( RepairedPhotoSection(
title: '上传图片', title: '上传图片',
@ -326,7 +330,9 @@ if (path != null) {
onChanged: (paths) {}, onChanged: (paths) {},
onMediaAdded: _onImageAdded, onMediaAdded: _onImageAdded,
onMediaRemoved: (path) { onMediaRemoved: (path) {
final item = imgList.firstWhere((e) => e.localPath == path); final item = imgList.firstWhere(
(e) => e.localPath == path,
);
_onImageRemoved(item); _onImageRemoved(item);
}, },
onAiIdentify: () {}, onAiIdentify: () {},
@ -351,8 +357,10 @@ if (path != null) {
if (signImages.isNotEmpty) _signListWidget(), if (signImages.isNotEmpty) _signListWidget(),
], ],
), ),
),], ),
),), ],
),
),
_bottomButtons(), _bottomButtons(),
], ],

View File

@ -172,15 +172,15 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -197,9 +197,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -106,6 +106,8 @@ class _HotworkApplyDetailState extends State<HotworkApplyDetail> {
SessionService.instance.loginUser!['DEPARTMENT_NAME'] ?? ''; SessionService.instance.loginUser!['DEPARTMENT_NAME'] ?? '';
pd['APPLY_USER_ID'] = SessionService.instance.loginUserId; pd['APPLY_USER_ID'] = SessionService.instance.loginUserId;
pd['APPLY_USER_NAME'] = SessionService.instance.username; pd['APPLY_USER_NAME'] = SessionService.instance.username;
pd['IS_CONTRACTOR_WORK'] = '0';
} }
_getHotWorkNameList(); _getHotWorkNameList();
_getVideoList(); _getVideoList();

View File

@ -56,7 +56,7 @@ class _HotworkDhspDetailState extends State<HotworkDhspDetail> {
MaterialPageRoute(builder: (context) => MineSignPage()), MaterialPageRoute(builder: (context) => MineSignPage()),
); );
await NativeOrientation.setPortrait(); await NativeOrientation.setPortrait();
if (path != null) { if (path != null) {
final now = DateFormat('yyyy-MM-dd HH:mm').format(DateTime.now()); final now = DateFormat('yyyy-MM-dd HH:mm').format(DateTime.now());
setState(() { setState(() {
signImages.add(path); signImages.add(path);
@ -169,19 +169,19 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
'hotwork', 'hotwork',
formData, formData,
signImages, signImages,
); );
@ -194,14 +194,15 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
}, }
),
);
} }
/// ///
Future<void> _getData() async { Future<void> _getData() async {
final data = await ApiService.getHomeworkFindById('hotwork', widget.HOTWORK_ID); final data = await ApiService.getHomeworkFindById(
'hotwork',
widget.HOTWORK_ID,
);
setState(() { setState(() {
pd = data['pd']; pd = data['pd'];
@ -211,7 +212,8 @@ if (path != null) {
} }
Future<void> _getMeasures(String homework_id) async { Future<void> _getMeasures(String homework_id) async {
final data = await ApiService.listSignFinishMeasures('hotwork', final data = await ApiService.listSignFinishMeasures(
'hotwork',
homework_id.length > 0 ? homework_id : widget.HOTWORK_ID, homework_id.length > 0 ? homework_id : widget.HOTWORK_ID,
); );
setState(() { setState(() {
@ -222,7 +224,8 @@ if (path != null) {
} }
Future<void> _getSigns(String homework_id) async { Future<void> _getSigns(String homework_id) async {
final data = await ApiService.listSignFinished('hotwork', final data = await ApiService.listSignFinished(
'hotwork',
homework_id.length > 0 ? homework_id : widget.HOTWORK_ID, homework_id.length > 0 ? homework_id : widget.HOTWORK_ID,
); );
setState(() { setState(() {
@ -294,7 +297,7 @@ if (path != null) {
'动火审批部门意见', '动火审批部门意见',
'请输入意见', '请输入意见',
_contentController, _contentController,
isRequired: true isRequired: true,
), ),
Divider(), Divider(),
Column( Column(
@ -315,7 +318,7 @@ if (path != null) {
), ),
if (signImages.isNotEmpty) _signListWidget(), if (signImages.isNotEmpty) _signListWidget(),
], ],
) ),
], ],
), ),
), ),

View File

@ -159,15 +159,15 @@ if (path != null) {
formData['APPLY_STATUS'] = status; formData['APPLY_STATUS'] = status;
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -187,9 +187,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -160,15 +160,15 @@ if (path != null) {
formData['APPLY_STATUS'] = status; formData['APPLY_STATUS'] = status;
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -185,9 +185,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -205,15 +205,15 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['WORK_END_DATE'] = endTime; formData['WORK_END_DATE'] = endTime;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -230,9 +230,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -178,15 +178,15 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['WORK_START_DATE'] = startTime; formData['WORK_START_DATE'] = startTime;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure('hotwork', final result = await ApiService.saveSafeFunctionSure('hotwork',
@ -202,9 +202,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -169,15 +169,15 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -194,9 +194,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -230,15 +230,15 @@ if (path != null) {
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
formData['VIDEO_PATH'] = serverPathString; formData['VIDEO_PATH'] = serverPathString;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -255,9 +255,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -169,15 +169,15 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -194,9 +194,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -290,6 +290,8 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> {
hintText: '请输入断路原因', hintText: '请输入断路原因',
text: pd['WORK_REASON'] ?? '', text: pd['WORK_REASON'] ?? '',
), ),
const Divider(),
if (!widget.isEditable && FormUtils.hasValue(pd, 'WORK_CONTENT')) ...[ if (!widget.isEditable && FormUtils.hasValue(pd, 'WORK_CONTENT')) ...[
ItemListWidget.singleLineTitleText( ItemListWidget.singleLineTitleText(
label: '断路地段示意图相关说明:', label: '断路地段示意图相关说明:',
@ -308,9 +310,59 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> {
), ),
const Divider(), const Divider(),
], ],
ItemListWidget.twoRowButtonTitleText(
label: '关联其他特殊作业及安全作业票编号',
isEditable: widget.isEditable,
onTap: () async {
final val = await showDialog<String>(
context: context,
builder: (_) => SelectionPopup(
type: 'assignments',
initialValue: pd['SPECIAL_WORK'] ?? '',
onConfirm: (v) {
setState(() {
pd['SPECIAL_WORK'] = v;
widget.relatedController?.text = v;
});
},
),
);
FocusHelper.clearFocus(context);
},
hintText: '请输入关联的其他特殊作业及安全作业票编号',
controller: widget.relatedController,
text: pd['SPECIAL_WORK'] ?? '',
),
const Divider(),
ItemListWidget.twoRowButtonTitleText(
label: '风险辨识结果',
isEditable: widget.isEditable,
onTap: () async {
await showDialog<String>(
context: context,
builder: (_) => SelectionPopup(
type: 'identification',
initialValue: pd['RISK_IDENTIFICATION'] ?? '',
onConfirm: (v) {
setState(() {
pd['RISK_IDENTIFICATION'] = v;
widget.riskController?.text = v;
});
},
),
);
FocusHelper.clearFocus(context);
},
hintText: '请输入风险辨识结果',
controller: widget.riskController,
text: pd['RISK_IDENTIFICATION'] ?? '',
),
const Divider(),
ItemListWidget.selectableLineTitleTextRightButton( ItemListWidget.selectableLineTitleTextRightButton(
label: '视频监控:', label: '视频监控:',
isClean: true, isClean: widget.isEditable,
cleanText: '清除监控', cleanText: '清除监控',
isRequired: false, isRequired: false,
isEditable: widget.isEditable, isEditable: widget.isEditable,
@ -375,55 +427,7 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> {
buttonText: '定位', buttonText: '定位',
onTap: widget.onWorkAreaLocationHandle ?? (){}, onTap: widget.onWorkAreaLocationHandle ?? (){},
hintText: '', hintText: '',
text: pd['LATITUDE_LONGITUDE'] ?? '', text: pd['LATITUDE_LONGITUDE'] ?? (widget.isEditable ? '' : ''),
),
const Divider(),
ItemListWidget.twoRowButtonTitleText(
label: '关联其他特殊作业及安全作业票编号',
isEditable: widget.isEditable,
onTap: () async {
final val = await showDialog<String>(
context: context,
builder: (_) => SelectionPopup(
type: 'assignments',
initialValue: pd['SPECIAL_WORK'] ?? '',
onConfirm: (v) {
setState(() {
pd['SPECIAL_WORK'] = v;
widget.relatedController?.text = v;
});
},
),
);
FocusHelper.clearFocus(context);
},
hintText: '请输入关联的其他特殊作业及安全作业票编号',
controller: widget.relatedController,
text: pd['SPECIAL_WORK'] ?? '',
),
const Divider(),
ItemListWidget.twoRowButtonTitleText(
label: '风险辨识结果',
isEditable: widget.isEditable,
onTap: () async {
await showDialog<String>(
context: context,
builder: (_) => SelectionPopup(
type: 'identification',
initialValue: pd['RISK_IDENTIFICATION'] ?? '',
onConfirm: (v) {
setState(() {
pd['RISK_IDENTIFICATION'] = v;
widget.riskController?.text = v;
});
},
),
);
FocusHelper.clearFocus(context);
},
hintText: '请输入风险辨识结果',
controller: widget.riskController,
text: pd['RISK_IDENTIFICATION'] ?? '',
), ),
if (widget.signs != null && FormUtils.hasValue(widget.signs, 'PROJECT_MANAGER')) if (widget.signs != null && FormUtils.hasValue(widget.signs, 'PROJECT_MANAGER'))

View File

@ -236,16 +236,15 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['MEASURES'] = json.encode(measuresList); formData['MEASURES'] = json.encode(measuresList);
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) =>
CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -265,9 +264,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
void printLongString(String text, {int chunkSize = 800}) { void printLongString(String text, {int chunkSize = 800}) {

View File

@ -199,15 +199,15 @@ if (path != null) {
formData['IMG_PATH'] = serverPathString; formData['IMG_PATH'] = serverPathString;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -224,9 +224,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -95,6 +95,8 @@ class _CutroadApplyDetailState extends State<CutroadApplyDetail> {
SessionService.instance.loginUser!['DEPARTMENT_NAME'] ?? ''; SessionService.instance.loginUser!['DEPARTMENT_NAME'] ?? '';
pd['APPLY_USER_ID'] = SessionService.instance.loginUserId; pd['APPLY_USER_ID'] = SessionService.instance.loginUserId;
pd['APPLY_USER_NAME'] = SessionService.instance.username; pd['APPLY_USER_NAME'] = SessionService.instance.username;
pd['IS_CONTRACTOR_WORK'] = '0';
} }
_getVideoList(); _getVideoList();

View File

@ -161,15 +161,15 @@ if (path != null) {
formData['APPLY_STATUS'] = status; formData['APPLY_STATUS'] = status;
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -189,9 +189,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -163,15 +163,15 @@ setState(() {
formData['APPLY_STATUS'] = status; formData['APPLY_STATUS'] = status;
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
printLongString(jsonEncode(formData)); printLongString(jsonEncode(formData));
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -188,9 +188,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -186,15 +186,15 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['WORK_END_DATE'] = endTime; formData['WORK_END_DATE'] = endTime;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -211,9 +211,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -172,15 +172,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['WORK_START_DATE'] = startTime; formData['WORK_START_DATE'] = startTime;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -197,9 +197,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -169,15 +169,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -194,9 +194,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -168,15 +168,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -193,9 +193,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -311,15 +311,15 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['PREPARERS'] = json.encode(signers); formData['PREPARERS'] = json.encode(signers);
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -339,9 +339,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
void printLongString(String text, {int chunkSize = 800}) { void printLongString(String text, {int chunkSize = 800}) {

View File

@ -169,15 +169,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -194,9 +194,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -226,15 +226,15 @@ setState(() {
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
formData['VIDEO_PATH'] = serverPathString; formData['VIDEO_PATH'] = serverPathString;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -251,9 +251,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -169,15 +169,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -194,9 +194,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -188,15 +188,15 @@ setState(() {
formData['APPLY_STATUS'] = status; formData['APPLY_STATUS'] = status;
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -213,9 +213,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -356,9 +356,60 @@ class _BreakgroundDetailFormWidgetState
),), ),),
const Divider(), const Divider(),
], ],
ItemListWidget.twoRowButtonTitleText(
label: '关联其他特殊作业及安全作业票编号',
isEditable: widget.isEditable,
onTap: () async {
final val = await showDialog<String>(
context: context,
builder:
(_) => SelectionPopup(
type: 'assignments',
initialValue: pd['SPECIAL_WORK'] ?? '',
onConfirm: (v) {
setState(() {
pd['SPECIAL_WORK'] = v;
widget.relatedController?.text = v;
});
},
),
);
FocusHelper.clearFocus(context);
},
hintText: '请输入关联的其他特殊作业及安全作业票编号',
controller: widget.relatedController,
text: pd['SPECIAL_WORK'] ?? '',
),
const Divider(),
ItemListWidget.twoRowButtonTitleText(
label: '风险辨识结果',
isEditable: widget.isEditable,
onTap: () async {
await showDialog<String>(
context: context,
builder:
(_) => SelectionPopup(
type: 'identification',
initialValue: pd['RISK_IDENTIFICATION'] ?? '',
onConfirm: (v) {
setState(() {
pd['RISK_IDENTIFICATION'] = v;
widget.riskController?.text = v;
});
},
),
);
FocusHelper.clearFocus(context);
},
hintText: '请输入风险辨识结果',
controller: widget.riskController,
text: pd['RISK_IDENTIFICATION'] ?? '',
),
const Divider(),
ItemListWidget.selectableLineTitleTextRightButton( ItemListWidget.selectableLineTitleTextRightButton(
label: '视频监控:', label: '视频监控:',
isClean: true, isClean: widget.isEditable,
cleanText: '清除监控', cleanText: '清除监控',
isRequired: false, isRequired: false,
isEditable: widget.isEditable, isEditable: widget.isEditable,
@ -423,60 +474,8 @@ class _BreakgroundDetailFormWidgetState
buttonText: '定位', buttonText: '定位',
onTap: widget.onWorkAreaLocationHandle ?? (){}, onTap: widget.onWorkAreaLocationHandle ?? (){},
hintText: '', hintText: '',
text: pd['LATITUDE_LONGITUDE'] ?? '', text: pd['LATITUDE_LONGITUDE'] ?? (widget.isEditable ? '' : ''),
), ),
const Divider(),
ItemListWidget.twoRowButtonTitleText(
label: '关联其他特殊作业及安全作业票编号',
isEditable: widget.isEditable,
onTap: () async {
final val = await showDialog<String>(
context: context,
builder:
(_) => SelectionPopup(
type: 'assignments',
initialValue: pd['SPECIAL_WORK'] ?? '',
onConfirm: (v) {
setState(() {
pd['SPECIAL_WORK'] = v;
widget.relatedController?.text = v;
});
},
),
);
FocusHelper.clearFocus(context);
},
hintText: '请输入关联的其他特殊作业及安全作业票编号',
controller: widget.relatedController,
text: pd['SPECIAL_WORK'] ?? '',
),
const Divider(),
ItemListWidget.twoRowButtonTitleText(
label: '风险辨识结果',
isEditable: widget.isEditable,
onTap: () async {
await showDialog<String>(
context: context,
builder:
(_) => SelectionPopup(
type: 'identification',
initialValue: pd['RISK_IDENTIFICATION'] ?? '',
onConfirm: (v) {
setState(() {
pd['RISK_IDENTIFICATION'] = v;
widget.riskController?.text = v;
});
},
),
);
FocusHelper.clearFocus(context);
},
hintText: '请输入风险辨识结果',
controller: widget.riskController,
text: pd['RISK_IDENTIFICATION'] ?? '',
),
// //
if (FormUtils.hasValue(widget.signs, 'WORK_USER')) if (FormUtils.hasValue(widget.signs, 'WORK_USER'))
Column( Column(

View File

@ -236,16 +236,15 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['MEASURES'] = json.encode(measuresList); formData['MEASURES'] = json.encode(measuresList);
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) =>
CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -265,9 +264,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
void printLongString(String text, {int chunkSize = 800}) { void printLongString(String text, {int chunkSize = 800}) {

View File

@ -199,15 +199,15 @@ if (path != null) {
formData['IMG_PATH'] = serverPathString; formData['IMG_PATH'] = serverPathString;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -224,9 +224,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -95,9 +95,10 @@ class _BreakgroundApplyDetailState extends State<BreakgroundApplyDetail> {
} else { } else {
isEditable = true; isEditable = true;
pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId; pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId;
pd['APPLY_USER_ID'] = SessionService.instance.loginUserId; pd['APPLY_USER_ID'] = SessionService.instance.loginUserId;
pd['APPLY_USER_NAME'] = SessionService.instance.username; pd['APPLY_USER_NAME'] = SessionService.instance.username;
pd['IS_CONTRACTOR_WORK'] = '0';
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() { setState(() {
pd['APPLY_DEPARTMENT_NAME'] = pd['APPLY_DEPARTMENT_NAME'] =
@ -638,6 +639,7 @@ class _BreakgroundApplyDetailState extends State<BreakgroundApplyDetail> {
if (isEditable) if (isEditable)
Column( Column(
children: [ children: [
SizedBox(height: 15),
_card(_chooseItem(EditUserType.WORK_USER)), _card(_chooseItem(EditUserType.WORK_USER)),
SizedBox(height: 15), SizedBox(height: 15),
_card(_chooseItem(EditUserType.GUARDIAN)), _card(_chooseItem(EditUserType.GUARDIAN)),

View File

@ -169,15 +169,15 @@ if (path != null) {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -194,9 +194,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -161,15 +161,15 @@ class _BreakgroundJhrDetailState extends State<BreakgroundJhrDetail> {
formData['APPLY_STATUS'] = status; formData['APPLY_STATUS'] = status;
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -189,9 +189,8 @@ class _BreakgroundJhrDetailState extends State<BreakgroundJhrDetail> {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -160,15 +160,15 @@ setState(() {
formData['APPLY_STATUS'] = status; formData['APPLY_STATUS'] = status;
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -185,9 +185,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -186,15 +186,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['WORK_END_DATE'] = endTime; formData['WORK_END_DATE'] = endTime;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -211,9 +211,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -172,15 +172,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['WORK_START_DATE'] = startTime; formData['WORK_START_DATE'] = startTime;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -197,9 +197,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -169,15 +169,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -194,9 +194,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -168,15 +168,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -193,9 +193,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -162,15 +162,15 @@ setState(() {
formData['APPLY_STATUS'] = status; formData['APPLY_STATUS'] = status;
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -187,9 +187,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -312,15 +312,15 @@ class _BreakgroundSetSafeDetailState extends State<BreakgroundSetSafeDetail> {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['PREPARERS'] = json.encode(signers); formData['PREPARERS'] = json.encode(signers);
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -340,9 +340,8 @@ class _BreakgroundSetSafeDetailState extends State<BreakgroundSetSafeDetail> {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
void printLongString(String text, {int chunkSize = 800}) { void printLongString(String text, {int chunkSize = 800}) {

View File

@ -169,15 +169,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -194,9 +194,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -230,15 +230,15 @@ setState(() {
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
formData['VIDEO_PATH'] = serverPathString; formData['VIDEO_PATH'] = serverPathString;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -255,9 +255,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -169,15 +169,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -194,9 +194,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -186,15 +186,15 @@ setState(() {
formData['CONIMG_PATH'] = workImages.map((e) => e.serverPath).toList().join(','); formData['CONIMG_PATH'] = workImages.map((e) => e.serverPath).toList().join(',');
formData['WORK_CONTENT'] = _contentController.text; formData['WORK_CONTENT'] = _contentController.text;
formData['DESCR'] = pd['DESCR'] ?? ''; formData['DESCR'] = pd['DESCR'] ?? '';
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -211,9 +211,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -341,9 +341,57 @@ class _HoistworkDetailFormWidgetState extends State<HoistWorkDetailFormWidget> {
), ),
const Divider(), const Divider(),
], ],
ItemListWidget.twoRowButtonTitleText(
label: '关联其他特殊作业及安全作业票编号',
isEditable: widget.isEditable,
onTap: () async {
final val = await showDialog<String>(
context: context,
builder: (_) => SelectionPopup(
type: 'assignments',
initialValue: pd['SPECIAL_WORK'] ?? '',
onConfirm: (v) {
setState(() {
pd['SPECIAL_WORK'] = v;
widget.relatedController?.text = v;
});
},
),
);
FocusHelper.clearFocus(context);
},
hintText: '请输入关联的其他特殊作业及安全作业票编号',
controller: widget.relatedController,
text: pd['SPECIAL_WORK'] ?? '',
),
const Divider(),
ItemListWidget.twoRowButtonTitleText(
label: '风险辨识结果',
isEditable: widget.isEditable,
onTap: () async {
await showDialog<String>(
context: context,
builder: (_) => SelectionPopup(
type: 'identification',
initialValue: pd['RISK_IDENTIFICATION'] ?? '',
onConfirm: (v) {
setState(() {
pd['RISK_IDENTIFICATION'] = v;
widget.riskController?.text = v;
});
},
),
);
FocusHelper.clearFocus(context);
},
hintText: '请输入风险辨识结果',
controller: widget.riskController,
text: pd['RISK_IDENTIFICATION'] ?? '',
),
const Divider(),
ItemListWidget.selectableLineTitleTextRightButton( ItemListWidget.selectableLineTitleTextRightButton(
label: '视频监控:', label: '视频监控:',
isClean: true, isClean: widget.isEditable,
cleanText: '清除监控', cleanText: '清除监控',
isRequired: false, isRequired: false,
isEditable: widget.isEditable, isEditable: widget.isEditable,
@ -408,56 +456,9 @@ class _HoistworkDetailFormWidgetState extends State<HoistWorkDetailFormWidget> {
buttonText: '定位', buttonText: '定位',
onTap: widget.onWorkAreaLocationHandle ?? (){}, onTap: widget.onWorkAreaLocationHandle ?? (){},
hintText: '', hintText: '',
text: pd['LATITUDE_LONGITUDE'] ?? '', text: pd['LATITUDE_LONGITUDE'] ?? (widget.isEditable ? '' : ''),
),
const Divider(),
ItemListWidget.twoRowButtonTitleText(
label: '关联其他特殊作业及安全作业票编号',
isEditable: widget.isEditable,
onTap: () async {
final val = await showDialog<String>(
context: context,
builder: (_) => SelectionPopup(
type: 'assignments',
initialValue: pd['SPECIAL_WORK'] ?? '',
onConfirm: (v) {
setState(() {
pd['SPECIAL_WORK'] = v;
widget.relatedController?.text = v;
});
},
),
);
FocusHelper.clearFocus(context);
},
hintText: '请输入关联的其他特殊作业及安全作业票编号',
controller: widget.relatedController,
text: pd['SPECIAL_WORK'] ?? '',
),
const Divider(),
ItemListWidget.twoRowButtonTitleText(
label: '风险辨识结果',
isEditable: widget.isEditable,
onTap: () async {
await showDialog<String>(
context: context,
builder: (_) => SelectionPopup(
type: 'identification',
initialValue: pd['RISK_IDENTIFICATION'] ?? '',
onConfirm: (v) {
setState(() {
pd['RISK_IDENTIFICATION'] = v;
widget.riskController?.text = v;
});
},
),
);
FocusHelper.clearFocus(context);
},
hintText: '请输入风险辨识结果',
controller: widget.riskController,
text: pd['RISK_IDENTIFICATION'] ?? '',
), ),
if (FormUtils.hasValue(widget.signs, 'SISUO')) if (FormUtils.hasValue(widget.signs, 'SISUO'))
Column( Column(
children: [ children: [

View File

@ -229,7 +229,6 @@ class SpecialWorkFormBaseWork extends StatelessWidget {
signs: signs, signs: signs,
onChooseLevel: onChooseLevel, onChooseLevel: onChooseLevel,
), ),
// //
if (measuresList.isNotEmpty) if (measuresList.isNotEmpty)
_itemContainer( _itemContainer(

View File

@ -236,16 +236,15 @@ class _HoistworkSafeFuncSureState extends State<HoistworkSafeFuncSure> {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['MEASURES'] = json.encode(measuresList); formData['MEASURES'] = json.encode(measuresList);
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) =>
CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -265,9 +264,8 @@ class _HoistworkSafeFuncSureState extends State<HoistworkSafeFuncSure> {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
void printLongString(String text, {int chunkSize = 800}) { void printLongString(String text, {int chunkSize = 800}) {

View File

@ -199,15 +199,15 @@ setState(() {
formData['IMG_PATH'] = serverPathString; formData['IMG_PATH'] = serverPathString;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -224,9 +224,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -101,6 +101,8 @@ class _HoistworkApplyDetailState extends State<HoistworkApplyDetail> {
SessionService.instance.loginUser!['DEPARTMENT_NAME'] ?? ''; SessionService.instance.loginUser!['DEPARTMENT_NAME'] ?? '';
pd['APPLY_USER_ID'] = SessionService.instance.loginUserId; pd['APPLY_USER_ID'] = SessionService.instance.loginUserId;
pd['APPLY_USER_NAME'] = SessionService.instance.username; pd['APPLY_USER_NAME'] = SessionService.instance.username;
pd['IS_CONTRACTOR_WORK'] = '0';
} }
_getVideoList(); _getVideoList();
_getUnitListAll(); _getUnitListAll();
@ -662,9 +664,11 @@ class _HoistworkApplyDetailState extends State<HoistworkApplyDetail> {
onWorkAreaLocationHandle: _showLocationHandle, onWorkAreaLocationHandle: _showLocationHandle,
), ),
), ),
if (isEditable) if (isEditable)
Column( Column(
children: [ children: [
SizedBox(height: 15),
_card(_chooseItem(EditUserType.SISUO)), _card(_chooseItem(EditUserType.SISUO)),
SizedBox(height: 15), SizedBox(height: 15),
_card(_chooseItem(EditUserType.GUARDIAN)), _card(_chooseItem(EditUserType.GUARDIAN)),

View File

@ -169,15 +169,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -194,9 +194,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -161,15 +161,15 @@ if (path != null) {
formData['APPLY_STATUS'] = status; formData['APPLY_STATUS'] = status;
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -189,9 +189,8 @@ if (path != null) {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -160,15 +160,15 @@ setState(() {
formData['APPLY_STATUS'] = status; formData['APPLY_STATUS'] = status;
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -185,9 +185,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -186,15 +186,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['WORK_END_DATE'] = endTime; formData['WORK_END_DATE'] = endTime;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -211,9 +211,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -172,15 +172,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['WORK_START_DATE'] = startTime; formData['WORK_START_DATE'] = startTime;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -197,9 +197,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -169,15 +169,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -194,9 +194,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -168,15 +168,15 @@ setState(() {
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
formData['DESCR'] = DESCR; formData['DESCR'] = DESCR;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -193,9 +193,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

View File

@ -162,15 +162,15 @@ setState(() {
formData['APPLY_STATUS'] = status; formData['APPLY_STATUS'] = status;
formData['STEP_REASON'] = reasonText; formData['STEP_REASON'] = reasonText;
await showDialog<String>( final confirmed = await CustomAlertDialog.showConfirm(
context: context, context,
builder:
(_) => CustomAlertDialog(
title: '提示', title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?', content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
onConfirm: () async { barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { try {
final result = await ApiService.saveSafeFunctionSure( final result = await ApiService.saveSafeFunctionSure(
@ -187,9 +187,8 @@ setState(() {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e'); ToastUtil.showNormal(context, '操作失败:$e');
} }
},
), }
);
} }
/// ///

Some files were not shown because too many files have changed in this diff Show More