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"/>
<application
android:label="qhd_prevention"
android:label="@string/appName"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true"

View File

@ -1,12 +1,6 @@
<?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">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
<item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item>
</layer-list>

View File

@ -1,12 +1,6 @@
<?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">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
<item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item>
</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
the Flutter engine draws its first frame -->
<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>
<!-- Theme applied to the Android Window as soon as the process has started.
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
the Flutter engine draws its first frame -->
<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>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your

View File

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

View File

@ -567,7 +567,7 @@
isa = XCBuildConfiguration;
buildSettings = {
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_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
@ -624,7 +624,7 @@
isa = XCBuildConfiguration;
buildSettings = {
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_CXX_LANGUAGE_STANDARD = "gnu++0x";
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" : "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"
}
}
{"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"}}

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" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"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">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI"/>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"></imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="3T2-ad-Qdv"/>
<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>
</view>
</viewController>
@ -33,5 +39,6 @@
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
<image name="LaunchBackground" width="1" height="1"/>
</resources>
</document>

View File

@ -1,87 +1,89 @@
<?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">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDisplayName</key>
<string>Qhd Prevention</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>qhd_prevention</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NFCReaderUsageDescription</key>
<string>用于读取 NFC 标签</string>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>智守安全</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NFCReaderUsageDescription</key>
<string>用于读取 NFC 标签</string>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>app需要蓝牙权限连接设备</string>
<key>NSCameraUsageDescription</key>
<string>app需要相机权限来扫描二维码</string>
<key>NSContactsUsageDescription</key>
<string>app需要通讯录权限添加好友</string>
<key>NSHealthShareUsageDescription</key>
<string>app需要读取健康数据</string>
<key>NSHealthUpdateUsageDescription</key>
<string>app需要写入健康数据</string>
<key>NSLocalNetworkUsageDescription</key>
<string>app需要发现本地网络设备</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>app需要后台定位以实现持续跟踪</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>需要位置权限以提供定位服务</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>需要位置权限以提供定位服务</string>
<key>NSMicrophoneUsageDescription</key>
<string>app需要麦克风权限进行语音通话</string>
<key>NSMotionUsageDescription</key>
<string>app需要访问运动数据统计步数</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>app需要保存图片到相册</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>app需要访问相册以上传图片</string>
<key>NSUserNotificationsUsageDescription</key>
<string>app需要发送通知提醒重要信息</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIStatusBarHidden</key>
<false/>
</dict>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>app需要蓝牙权限连接设备</string>
<key>NSCameraUsageDescription</key>
<string>app需要相机权限来扫描二维码</string>
<key>NSContactsUsageDescription</key>
<string>app需要通讯录权限添加好友</string>
<key>NSHealthShareUsageDescription</key>
<string>app需要读取健康数据</string>
<key>NSHealthUpdateUsageDescription</key>
<string>app需要写入健康数据</string>
<key>NSLocalNetworkUsageDescription</key>
<string>app需要发现本地网络设备</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>app需要后台定位以实现持续跟踪</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>需要位置权限以提供定位服务</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>需要位置权限以提供定位服务</string>
<key>NSMicrophoneUsageDescription</key>
<string>app需要麦克风权限进行语音通话</string>
<key>NSMotionUsageDescription</key>
<string>app需要访问运动数据统计步数</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>app需要保存图片到相册</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>app需要访问相册以上传图片</string>
<key>NSUserNotificationsUsageDescription</key>
<string>app需要发送通知提醒重要信息</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
</plist>

View File

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

View File

@ -96,7 +96,8 @@ class MyApp extends StatelessWidget {
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).unfocus();
// FocusScope.of(context).unfocus();
FocusHelper.clearFocus(context);
},
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:intl/intl.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/toast_util.dart';
import 'dart:convert';
import 'dart:math' as math;
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/my_appbar.dart';
import 'package:qhd_prevention/pages/notif/notif_detail_page.dart';
import 'package:qhd_prevention/tools/tools.dart';
class SafetyCommitmentOtherListPage extends StatefulWidget {
const SafetyCommitmentOtherListPage({Key? key}) : super(key: key);
@override
State<SafetyCommitmentOtherListPage> createState() => _SafetyCommitmentOtherListPageState();
State<SafetyCommitmentOtherListPage> createState() =>
_SafetyCommitmentOtherListPageState();
}
class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherListPage>
with SingleTickerProviderStateMixin{
late TabController _tabController= TabController(length: 2, vsync: this);
int _selectedTab = 0;
class _SafetyCommitmentOtherListPageState
extends State<SafetyCommitmentOtherListPage>
with SingleTickerProviderStateMixin {
late TabController _tabController = TabController(
length: 2,
vsync: this,
initialIndex: 1,
);
int _selectedTab = 1;
int _page = 1;
String searchKey="";
int _totalPage=1;
String searchKey = "";
int _totalPage = 1;
late List<dynamic> _list = [];
bool _isLoading = false;
bool _hasMore = true;
@override
void initState() {
super.initState();
@ -52,17 +54,15 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
print('切换到标签:${_tabController.index}');
reRefreshData();
}
});
_getSafetyMeetingList(false);
}
void reRefreshData(){
_page=1;
void reRefreshData() {
_page = 1;
_list.clear();
_getSafetyMeetingList(false);
}
Future<void> _getSafetyMeetingList(bool loadMore) async {
@ -71,16 +71,15 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
if (_isLoading) return;
_isLoading = true;
final Map<String, dynamic> result;
if(_selectedTab==0){
if (_selectedTab == 0) {
result = await ApiService.getMyOtherCommitmentsList();
}else{
result = await ApiService.getAcceptCommitmentList( );
} else {
result = await ApiService.getAcceptCommitmentList();
}
if (result['result'] == 'success') {
_totalPage =result["page"]['totalPage'] ?? 1;
_totalPage = result["page"]['totalPage'] ?? 1;
final List<dynamic> newList = result['varList'] ?? [];
// setState(() {
// _list.addAll(newList);
@ -95,12 +94,10 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
_hasMore = _page < _totalPage;
// if (_hasMore) _page++;
});
}else{
} else {
ToastUtil.showNormal(context, "加载数据失败");
// _showMessage('加载数据失败');
}
} catch (e) {
// Toast
print('加载数据失败:$e');
@ -110,12 +107,6 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
}
}
@override
void dispose() {
_tabController.dispose();
@ -126,8 +117,7 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppbar(title: "其他行业安全承诺"),
body:
GestureDetector(
body: GestureDetector(
onTap: () {
FocusScope.of(context).unfocus(); //
},
@ -152,20 +142,19 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
// Search bar
// List
NotificationListener<ScrollNotification>(
onNotification: _onScroll,
child: Expanded(
child:
_list.isEmpty
? NoDataWidget.show()
: ListView.builder(
itemCount: _list.length,
itemBuilder: (context, index) {
return _itemCell(_list[index]);
},
),
),
onNotification: _onScroll,
child: Expanded(
child:
_list.isEmpty
? NoDataWidget.show()
: ListView.builder(
itemCount: _list.length,
itemBuilder: (context, index) {
return _itemCell(_list[index]);
},
),
),
),
],
),
),
@ -174,7 +163,7 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
);
}
Widget _itemCell(final item) {
Widget _itemCell(dynamic item) {
return InkWell(
onTap: () => _goToDetail(item),
child: Container(
@ -194,58 +183,60 @@ class _SafetyCommitmentOtherListPageState extends State<SafetyCommitmentOtherLis
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'被承诺人:${item['coverpeople']}', //$itemTitle
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
if (item['ISREAD'] == '0')
Container(
width: 5,
height: 5,
decoration: BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
),
],
),
Text(
'-${item['DEPARTMENT_NAME']}',//$itemTitle
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
'承诺人:${item['NAME']}', //$itemTitle
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('承诺时间: ${item['SIGN_TIME']}'),
Text('承诺人: ${item['SIGN_USER_NAME']}'),
],
children: [Text('${item['SIGNTIME']}')],
),
],
),
),
);
}
bool _onScroll(ScrollNotification n) {
if (n.metrics.pixels > n.metrics.maxScrollExtent - 100 &&
_hasMore && !_isLoading) {
_hasMore &&
!_isLoading) {
_page++;
_getSafetyMeetingList(true);
}
return false;
}
void _goToDetail(String id){
pushPage(SafetyMeetingDetailPage(
id,_selectedTab,
onClose: (String result) {
setState(() {
reRefreshData();
});
},
), context);
void _goToDetail(dynamic item) {
pushPage(
OtherPromisePage(
TabCur: _selectedTab,
PROMISE_ID: item['PROMISE_ID'],
PROMISEPEOPLE_ID: item['PROMISEPEOPLE_ID'],
),
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/tools/tools.dart';
class SafetyCommitmentPage extends StatefulWidget {
const SafetyCommitmentPage({super.key});
@ -14,7 +13,6 @@ class SafetyCommitmentPage extends StatefulWidget {
State<SafetyCommitmentPage> createState() => _SafetyCommitmentPageState();
}
class _SafetyCommitmentPageState extends State<SafetyCommitmentPage> {
@override
Widget build(BuildContext context) {
@ -22,33 +20,35 @@ class _SafetyCommitmentPageState extends State<SafetyCommitmentPage> {
appBar: MyAppbar(title: "安全承诺"),
body: Column(
children: [
Padding(padding: EdgeInsets.only(top: 10),
child: ItemListWidget.selectableLineTitleTextRightButton(
label: '危化行业安全承诺:',
isEditable: true,
isRequired:false,
onTap: () {
pushPage(SafetyCommitmentTabList(), context);
},
text:' ',
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 10),
child: Column(
children: [
ItemListWidget.selectableLineTitleTextRightButton(
label: '危化行业安全承诺:',
isEditable: true,
isRequired: false,
onTap: () {
pushPage(SafetyCommitmentTabList(), context);
},
text: ' ',
),
const Divider(),
ItemListWidget.selectableLineTitleTextRightButton(
label: '其他行业安全承诺:',
isEditable: true,
isRequired: false,
onTap: () {
pushPage(SafetyCommitmentOtherListPage(), context);
},
text: ' ',
),
const Divider(color: Colors.white,),
],
),
),
const Divider(),
Padding(padding: EdgeInsets.only(top: 10),
child:ItemListWidget.selectableLineTitleTextRightButton(
label: '其他行业安全承诺:',
isEditable: true,
isRequired:false,
onTap: () {
pushPage(SafetyCommitmentOtherListPage(), context);
},
text: ' ',
),
),
const Divider(),
],
),
);

View File

@ -109,7 +109,7 @@ class _HomePageState extends State<HomePage> {
"title": "安全例会",
"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(),
ItemListWidget.selectableLineTitleTextRightButton(
label: '视频监控:',
isClean: pd['WORK_LEVEL'] == '一级' || pd['WORK_LEVEL'] == '二级',
isClean: widget.isEditable && (pd['WORK_LEVEL'] == '一级' || pd['WORK_LEVEL'] == '二级'),
cleanText: '清除监控',
isRequired: pd['WORK_LEVEL'] == '特级',
isEditable: widget.isEditable,

View File

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

View File

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

View File

@ -85,7 +85,7 @@ class _HotworkAqjdDetailState extends State<HotworkAqjdDetail> {
MaterialPageRoute(builder: (context) => MineSignPage()),
);
await NativeOrientation.setPortrait();
if (path != null) {
if (path != null) {
final now = DateFormat('yyyy-MM-dd HH:mm').format(DateTime.now());
setState(() {
signImages.add(path);
@ -182,11 +182,11 @@ if (path != null) {
return;
}
}
// serverPath
// serverPath
final serverPathString = imgList
.map((e) => e.serverPath)
.where((s) => s.isNotEmpty)
.map((s) => s) // String? String
.map((s) => s) // String? String
.join(',');
// measures
@ -199,39 +199,40 @@ if (path != null) {
formData['STEP_REASON'] = reasonText;
formData['IMG_PATH'] = serverPathString;
await showDialog<String>(
context: context,
builder:
(_) => CustomAlertDialog(
title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消',
confirmText: '确定',
onConfirm: () async {
LoadingDialogHelper.show();
try {
final result = await ApiService.saveSafeFunctionSure('hotwork',
formData,
signImages,
);
LoadingDialogHelper.hide();
if (result['result'] == 'success') {
ToastUtil.showSuccess(context, '保存成功');
Navigator.of(context).pop(true);
}
} catch (e) {
LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e');
}
},
),
final confirmed = await CustomAlertDialog.showConfirm(
context,
title: '提示',
content: '请确认' + (status == '1' ? "通过" : "作废") + '本作业票?',
cancelText: '取消',
confirmText: '确定',
barrierDismissible: false,
);
if (confirmed) {
LoadingDialogHelper.show();
try {
final result = await ApiService.saveSafeFunctionSure(
'hotwork',
formData,
signImages,
);
LoadingDialogHelper.hide();
if (result['result'] == 'success') {
ToastUtil.showSuccess(context, '保存成功');
Navigator.of(context).pop(true);
}
} catch (e) {
LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '操作失败:$e');
}
}
}
///
Future<void> _getData() async {
final data = await ApiService.getHomeworkFindById('hotwork', widget.HOTWORK_ID);
final data = await ApiService.getHomeworkFindById(
'hotwork',
widget.HOTWORK_ID,
);
setState(() {
pd = data['pd'];
@ -241,7 +242,8 @@ if (path != null) {
}
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,
);
setState(() {
@ -252,7 +254,8 @@ if (path != null) {
}
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,
);
setState(() {
@ -317,42 +320,47 @@ if (path != null) {
);
},
),
ItemListWidget.itemContainer(Column(
children: [
RepairedPhotoSection(
title: '上传图片',
maxCount: 2,
mediaType: MediaType.image,
onChanged: (paths) {},
onMediaAdded: _onImageAdded,
onMediaRemoved: (path) {
final item = imgList.firstWhere((e) => e.localPath == path);
_onImageRemoved(item);
},
onAiIdentify: () {},
),
ItemListWidget.itemContainer(
Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
ListItemFactory.headerTitle('安全交底人'),
CustomButton(
text: '新增手写签字',
height: 36,
backgroundColor: Colors.green,
onPressed: () {
_sign();
},
),
],
),
if (signImages.isNotEmpty) _signListWidget(),
],
ItemListWidget.itemContainer(
Column(
children: [
RepairedPhotoSection(
title: '上传图片',
maxCount: 2,
mediaType: MediaType.image,
onChanged: (paths) {},
onMediaAdded: _onImageAdded,
onMediaRemoved: (path) {
final item = imgList.firstWhere(
(e) => e.localPath == path,
);
_onImageRemoved(item);
},
onAiIdentify: () {},
),
),],
),),
ItemListWidget.itemContainer(
Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
ListItemFactory.headerTitle('安全交底人'),
CustomButton(
text: '新增手写签字',
height: 36,
backgroundColor: Colors.green,
onPressed: () {
_sign();
},
),
],
),
if (signImages.isNotEmpty) _signListWidget(),
],
),
),
],
),
),
_bottomButtons(),
],

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -290,6 +290,8 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> {
hintText: '请输入断路原因',
text: pd['WORK_REASON'] ?? '',
),
const Divider(),
if (!widget.isEditable && FormUtils.hasValue(pd, 'WORK_CONTENT')) ...[
ItemListWidget.singleLineTitleText(
label: '断路地段示意图相关说明:',
@ -308,9 +310,59 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> {
),
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(
label: '视频监控:',
isClean: true,
isClean: widget.isEditable,
cleanText: '清除监控',
isRequired: false,
isEditable: widget.isEditable,
@ -375,55 +427,7 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> {
buttonText: '定位',
onTap: widget.onWorkAreaLocationHandle ?? (){},
hintText: '',
text: pd['LATITUDE_LONGITUDE'] ?? '',
),
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'] ?? '',
text: pd['LATITUDE_LONGITUDE'] ?? (widget.isEditable ? '' : ''),
),
if (widget.signs != null && FormUtils.hasValue(widget.signs, 'PROJECT_MANAGER'))

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -356,9 +356,60 @@ class _BreakgroundDetailFormWidgetState
),),
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(
label: '视频监控:',
isClean: true,
isClean: widget.isEditable,
cleanText: '清除监控',
isRequired: false,
isEditable: widget.isEditable,
@ -423,60 +474,8 @@ class _BreakgroundDetailFormWidgetState
buttonText: '定位',
onTap: widget.onWorkAreaLocationHandle ?? (){},
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'))
Column(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -341,9 +341,57 @@ class _HoistworkDetailFormWidgetState extends State<HoistWorkDetailFormWidget> {
),
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(
label: '视频监控:',
isClean: true,
isClean: widget.isEditable,
cleanText: '清除监控',
isRequired: false,
isEditable: widget.isEditable,
@ -408,56 +456,9 @@ class _HoistworkDetailFormWidgetState extends State<HoistWorkDetailFormWidget> {
buttonText: '定位',
onTap: widget.onWorkAreaLocationHandle ?? (){},
hintText: '',
text: pd['LATITUDE_LONGITUDE'] ?? '',
),
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'] ?? '',
text: pd['LATITUDE_LONGITUDE'] ?? (widget.isEditable ? '' : ''),
),
if (FormUtils.hasValue(widget.signs, 'SISUO'))
Column(
children: [

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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