Compare commits
6 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
545321d5e1 | |
|
|
0621ff1e2a | |
|
|
2582a547c3 | |
|
|
0b0f7c9eff | |
|
|
2fcb288a50 | |
|
|
dc89f7039f |
15
.metadata
15
.metadata
|
|
@ -4,7 +4,7 @@
|
|||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: "35c388afb57ef061d06a39b537336c87e0e3d1b1"
|
||||
revision: "d7b523b356d15fb81e7d340bbe52b47f93937323"
|
||||
channel: "stable"
|
||||
|
||||
project_type: app
|
||||
|
|
@ -13,14 +13,11 @@ project_type: app
|
|||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
|
||||
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
|
||||
- platform: android
|
||||
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
|
||||
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
|
||||
- platform: ios
|
||||
create_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
|
||||
base_revision: 35c388afb57ef061d06a39b537336c87e0e3d1b1
|
||||
create_revision: d7b523b356d15fb81e7d340bbe52b47f93937323
|
||||
base_revision: d7b523b356d15fb81e7d340bbe52b47f93937323
|
||||
- platform: web
|
||||
create_revision: d7b523b356d15fb81e7d340bbe52b47f93937323
|
||||
base_revision: d7b523b356d15fb81e7d340bbe52b47f93937323
|
||||
|
||||
# User provided section
|
||||
|
||||
|
|
|
|||
|
|
@ -1,98 +1,91 @@
|
|||
<?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>智守安全</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>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>baidumap</string>
|
||||
</array>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NFCReaderUsageDescription</key>
|
||||
<string>需要NFC权限来读取和写入标签</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>智守安全</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>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>baidumap</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NFCReaderUsageDescription</key>
|
||||
<string>需要NFC权限来读取和写入标签</string>
|
||||
<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>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>remote-notification</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<false/>
|
||||
<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>com.apple.developer.nfc.readersession.formats</key>
|
||||
<array>
|
||||
<string>NDEF</string>
|
||||
<string>TAG</string>
|
||||
</array>
|
||||
</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>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>remote-notification</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<false/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
<key>com.apple.developer.nfc.readersession.formats</key>
|
||||
<array>
|
||||
<string>TAG</string>
|
||||
<string>NDEF</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
|
|
@ -3,11 +3,8 @@
|
|||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.developer.nfc.readersession.formats</key>
|
||||
<array>
|
||||
<string>NDEF</string>
|
||||
<string>TAG</string>
|
||||
</array>
|
||||
|
||||
<array>
|
||||
<string>TAG</string>
|
||||
</array>
|
||||
</dict>
|
||||
|
||||
</plist>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@ import 'package:flutter/material.dart';
|
|||
import '../tools/tools.dart';
|
||||
|
||||
/// 通用列表卡片组件:
|
||||
/// - 两两为一组,优先尝试同一行显示左右两列并左/右对齐;
|
||||
/// - 如放不下,则自动拆成两行,上行左对齐,下行右对齐。
|
||||
/// - 两两为一组,固定左右布局,平均分配宽度
|
||||
/// - 左侧文字左对齐,右侧文字右对齐
|
||||
/// - 文字过多时各自自动换行
|
||||
/// - 如果一行只有一个元素,靠左显示
|
||||
class DannerRepainItem extends StatelessWidget {
|
||||
final String title;
|
||||
final List<String> details;
|
||||
|
|
@ -50,70 +52,12 @@ class DannerRepainItem extends StatelessWidget {
|
|||
),
|
||||
const Divider(height: 1),
|
||||
|
||||
// — 详情区:动态两列/换行 —
|
||||
// — 详情区:固定左右布局 —
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
|
||||
child: LayoutBuilder(builder: (context, constraints) {
|
||||
// 间距:你可以根据设计随意调整
|
||||
const double horizontalGap = 20;
|
||||
const double verticalGap = 5;
|
||||
|
||||
List<Widget> rows = [];
|
||||
for (int i = 0; i < details.length; i += 2) {
|
||||
final left = details[i];
|
||||
final right = (i + 1 < details.length) ? details[i + 1] : '';
|
||||
|
||||
// 测量文字宽度
|
||||
final leftPainter = TextPainter(
|
||||
text: TextSpan(text: left, style: HhTextStyleUtils.secondaryTitleStyle),
|
||||
maxLines: 1,
|
||||
textDirection: TextDirection.ltr,
|
||||
)..layout();
|
||||
final rightPainter = TextPainter(
|
||||
text: TextSpan(text: right, style: HhTextStyleUtils.secondaryTitleStyle),
|
||||
maxLines: 1,
|
||||
textDirection: TextDirection.ltr,
|
||||
)..layout();
|
||||
|
||||
final canFitOneLine = right.isNotEmpty &&
|
||||
(leftPainter.width + horizontalGap + rightPainter.width)
|
||||
<= constraints.maxWidth;
|
||||
|
||||
if (right.isNotEmpty && canFitOneLine) {
|
||||
// 同行显示,左右对齐
|
||||
rows.add(Padding(
|
||||
padding: EdgeInsets.only(bottom: verticalGap),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
_DetailText(left),
|
||||
_DetailText(right),
|
||||
],
|
||||
),
|
||||
));
|
||||
} else {
|
||||
// 拆为两行
|
||||
rows.add(Padding(
|
||||
padding: EdgeInsets.only(bottom: verticalGap),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// 上行:左对齐
|
||||
_DetailText(left),
|
||||
if (right.isNotEmpty)
|
||||
// 下行:右对齐
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: _DetailText(right),
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
return Column(children: rows);
|
||||
}),
|
||||
child: Column(
|
||||
children: _buildDetailRows(),
|
||||
),
|
||||
),
|
||||
|
||||
// — 底部标签区 —
|
||||
|
|
@ -127,21 +71,86 @@ class DannerRepainItem extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
// 构建详情行
|
||||
List<Widget> _buildDetailRows() {
|
||||
List<Widget> rows = [];
|
||||
for (int i = 0; i < details.length; i += 2) {
|
||||
final left = details[i];
|
||||
final right = (i + 1 < details.length) ? details[i + 1] : '';
|
||||
|
||||
rows.add(
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8),
|
||||
child: _DetailRow(left: left, right: right),
|
||||
),
|
||||
);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
}
|
||||
|
||||
/// Detail 文本封装:
|
||||
/// 默认一行不换行;若超出则让整个组件撑宽,由外层判断拆行。
|
||||
/// 详情行组件:固定左右布局,平均分配宽度,各自换行
|
||||
/// 如果只有左侧文本,则靠左显示
|
||||
class _DetailRow extends StatelessWidget {
|
||||
final String left;
|
||||
final String right;
|
||||
|
||||
const _DetailRow({
|
||||
Key? key,
|
||||
required this.left,
|
||||
required this.right,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// 如果右侧文本为空,只显示左侧文本,靠左显示
|
||||
if (right.isEmpty) {
|
||||
return Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: _DetailText(left, textAlign: TextAlign.left),
|
||||
);
|
||||
}
|
||||
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// 左侧文本 - 占50%宽度
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: _DetailText(left, textAlign: TextAlign.left),
|
||||
),
|
||||
|
||||
// 中间间距
|
||||
const SizedBox(width: 10),
|
||||
|
||||
// 右侧文本 - 占50%宽度
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: _DetailText(right, textAlign: TextAlign.right),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Detail 文本封装:支持自动换行和指定的对齐方式
|
||||
class _DetailText extends StatelessWidget {
|
||||
final String text;
|
||||
const _DetailText(this.text, {Key? key}) : super(key: key);
|
||||
final TextAlign textAlign;
|
||||
|
||||
const _DetailText(this.text, {
|
||||
Key? key,
|
||||
required this.textAlign,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Text(
|
||||
text,
|
||||
style: HhTextStyleUtils.secondaryTitleStyle,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.visible,
|
||||
softWrap: true, // 允许换行
|
||||
textAlign: textAlign, // 使用指定的对齐方式
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -118,11 +118,55 @@ class _DepartmentPickerHiddenTypeState
|
|||
|
||||
void _onSearchChanged() {
|
||||
final q = _searchController.text.toLowerCase().trim();
|
||||
// setState(() {
|
||||
// filtered = q.isEmpty ? original : _filterCategories(original, q);
|
||||
// });
|
||||
|
||||
//新加搜索展开子项
|
||||
setState(() {
|
||||
filtered = q.isEmpty ? original : _filterCategories(original, q);
|
||||
if (q.isEmpty) {
|
||||
filtered = original;
|
||||
expandedSet.clear(); // 清空展开状态
|
||||
} else {
|
||||
filtered = _filterCategories(original, q);
|
||||
// 搜索时自动展开所有过滤后的节点
|
||||
_expandAllMatchingNodes(filtered);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 递归展开所有匹配的节点及其父节点
|
||||
void _expandAllMatchingNodes(List<Category> categories) {
|
||||
for (var category in categories) {
|
||||
// 展开当前节点
|
||||
expandedSet.add(category.id);
|
||||
|
||||
// 递归展开子节点
|
||||
if (category.children.isNotEmpty) {
|
||||
_expandAllMatchingNodes(category.children);
|
||||
}
|
||||
|
||||
// 展开所有父节点直到根节点
|
||||
_expandParentNodes(category.id);
|
||||
}
|
||||
}
|
||||
|
||||
// 展开指定节点的所有父节点
|
||||
void _expandParentNodes(String id) {
|
||||
var currentId = id;
|
||||
var parent = parentMap[currentId];
|
||||
|
||||
while (parent != null) {
|
||||
expandedSet.add(parent.id);
|
||||
currentId = parent.id;
|
||||
parent = parentMap[currentId];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
List<Category> _filterCategories(List<Category> list, String q) {
|
||||
final res = <Category>[];
|
||||
for (var cat in list) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import 'dart:ffi';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ class ApiService {
|
|||
// static const String baseFacePath = "http://192.168.0.25:38199"; //王轩服务器
|
||||
|
||||
/// 登录及其他管理后台接口
|
||||
static const String basePath = "https://qaaqwh.qhdsafety.com/integrated_whb";
|
||||
// static const String basePath = "http://192.168.20.240:8500/integrated_whb";//测试服务器
|
||||
// static const String basePath = "https://qaaqwh.qhdsafety.com/integrated_whb";
|
||||
static const String basePath = "http://192.168.20.240:8500/integrated_whb";//测试服务器
|
||||
// static const String basePath = "http://192.168.0.25:28199";//王轩服务器
|
||||
// static const String basePath = "http://192.168.0.45:28199";//长久服务器
|
||||
|
||||
|
|
@ -2052,6 +2052,7 @@ U6Hzm1ninpWeE+awIDAQAB
|
|||
String correctiveDepartment,
|
||||
String isIndex,
|
||||
String keyWord,
|
||||
String laiYuanId,
|
||||
) {
|
||||
return HttpManager().request(
|
||||
basePath,
|
||||
|
|
@ -2063,7 +2064,7 @@ U6Hzm1ninpWeE+awIDAQAB
|
|||
"ENDTIME": endDate.isEmpty?"":"$endDate 23:59:59",
|
||||
"HIDDENLEVEL": level,
|
||||
"HIDDEN_RISKSTANDARD": riskStandard,
|
||||
// "SOURCE": riskStandard,
|
||||
// "SOURCE": laiYuanId,
|
||||
"STATE": state,
|
||||
"DEPARTMENT_ID": departmentId,
|
||||
"RECTIFICATIONDEPT": correctiveDepartment,
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import 'package:qhd_prevention/http/ApiService.dart';
|
|||
import 'package:qhd_prevention/pages/app/Danger_paicha/check_record_page.dart';
|
||||
import 'package:qhd_prevention/pages/app/Danger_paicha/quick_report_page.dart';
|
||||
import 'package:qhd_prevention/pages/app/danger_wait_list_page.dart';
|
||||
import 'package:qhd_prevention/pages/app/gy_alarm/gy_alarm_page.dart';
|
||||
import 'package:qhd_prevention/pages/badge_manager.dart';
|
||||
import 'package:qhd_prevention/pages/home/work/risk_list_page.dart';
|
||||
|
||||
|
|
@ -25,7 +26,8 @@ enum AppItem {
|
|||
specialRecord, // 专项检查中的隐患记录
|
||||
supervisionRectification, // 监管帮扶中的隐患整改
|
||||
supervisionRecord, // 监管帮扶中的隐患记录
|
||||
aiAlarm, // 监管帮扶中的隐患记录
|
||||
aiAlarm, // 检测预警-AI预警
|
||||
gyAlarm // 检测预警-工艺报警优化
|
||||
}
|
||||
|
||||
class ApplicationPage extends StatefulWidget {
|
||||
|
|
@ -124,6 +126,10 @@ class _ApplicationPageState extends State<ApplicationPage> {
|
|||
case AppItem.aiAlarm:
|
||||
// ai
|
||||
pushPage(AiAlarmPage(), context);
|
||||
break;
|
||||
case AppItem.gyAlarm:
|
||||
pushPage(GyAlarmPage(), context);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -164,11 +170,12 @@ class _ApplicationPageState extends State<ApplicationPage> {
|
|||
{'item': AppItem.acceptedRisk, 'icon': 'assets/icon-apps/icon-zl-1.png', 'title': '已验收隐患', 'num': 0},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
'title': '监测预警',
|
||||
'list': [
|
||||
{'item': AppItem.aiAlarm, 'icon': 'assets/icon-apps/icon-pc-1.png', 'title': 'AI报警', 'num': 0},
|
||||
{'item': AppItem.gyAlarm, 'icon': 'assets/icon-apps/icon-pc-1.png', 'title': '工艺报警优化', 'num': 0},
|
||||
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -76,20 +76,20 @@ class _DangerWaitListPageState extends State<DangerWaitListPage> {
|
|||
void getListData(int type,bool addList,String keyWord){
|
||||
switch(widget.appItem ){
|
||||
case 1://隐患记录
|
||||
_getDangerRecord(-1,_page,"","","","","","","","",keyWord,addList);
|
||||
_getDangerRecord(-1,_page,"","","","","","","","",keyWord,addList,"");
|
||||
// _getListTree();
|
||||
break;
|
||||
case 2://待整改隐患
|
||||
_getDangerRecord(2,_page,"","","","","","","","",keyWord,addList);
|
||||
_getDangerRecord(2,_page,"","","","","","","","",keyWord,addList,"");
|
||||
break;
|
||||
case 3://超期未整改
|
||||
_getDangerRecord(5,_page,"","","","","-1","","","",keyWord,addList);
|
||||
_getDangerRecord(5,_page,"","","","","-1","","","",keyWord,addList,"");
|
||||
break;
|
||||
case 4://隐患验收
|
||||
_getDangerRecord(3,_page,"","","","","","3","","",keyWord,addList);
|
||||
_getDangerRecord(3,_page,"","","","","","3","","",keyWord,addList,"");
|
||||
break;
|
||||
case 5://已验收隐患
|
||||
_getDangerRecord(4,_page,"","","","","","4","","1",keyWord,addList);
|
||||
_getDangerRecord(4,_page,"","","","","","4","","1",keyWord,addList,"");
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
@ -133,11 +133,11 @@ class _DangerWaitListPageState extends State<DangerWaitListPage> {
|
|||
child: DangerWaitDrawer(
|
||||
"",
|
||||
onClose: (String selectedCategoryId,String selectedDepartmentId,String investigationMethodOption,
|
||||
String hazardLevelOption,String dangerStatusOption,String startDate,String endDate) {
|
||||
String hazardLevelOption,String dangerStatusOption,String startDate,String endDate,String laiYuanId) {
|
||||
|
||||
_page=1;
|
||||
_getDangerRecord(-1,_page,startDate,endDate,hazardLevelOption,investigationMethodOption,
|
||||
dangerStatusOption,selectedCategoryId,selectedDepartmentId,"",searchKey,false);
|
||||
dangerStatusOption,selectedCategoryId,selectedDepartmentId,"",searchKey,false,laiYuanId);
|
||||
|
||||
},
|
||||
),
|
||||
|
|
@ -365,7 +365,7 @@ class _DangerWaitListPageState extends State<DangerWaitListPage> {
|
|||
Future<void> _getDangerRecord(int type, int currentPage,
|
||||
String startDate,String endDate,String level,String riskStandard,String state,
|
||||
String departmentId,String correctiveDepartment,
|
||||
String isIndex,String keyWord,bool loadMore) async {
|
||||
String isIndex,String keyWord,bool loadMore,String laiYuanId) async {
|
||||
try {
|
||||
if (_isLoading) return;
|
||||
_isLoading = true;
|
||||
|
|
@ -373,7 +373,7 @@ class _DangerWaitListPageState extends State<DangerWaitListPage> {
|
|||
LoadingDialogHelper.show();
|
||||
final result = await ApiService.getHiddenTreatmentList( type, currentPage,
|
||||
startDate, endDate, level, riskStandard, state,
|
||||
departmentId, correctiveDepartment, isIndex, keyWord);
|
||||
departmentId, correctiveDepartment, isIndex, keyWord,laiYuanId);
|
||||
LoadingDialogHelper.hide();
|
||||
if (result['result'] == 'success') {
|
||||
|
||||
|
|
@ -468,8 +468,10 @@ class _DangerWaitListPageState extends State<DangerWaitListPage> {
|
|||
return "隐患来源:标准排查";
|
||||
}else if("4"==type){
|
||||
return "隐患来源:专项检查";
|
||||
}else{
|
||||
}else if("5"==type){
|
||||
return "隐患来源:安全检查";
|
||||
}else{
|
||||
return "隐患来源:NFC设备巡检";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,130 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:qhd_prevention/customWidget/ItemWidgetFactory.dart';
|
||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||
import 'package:qhd_prevention/http/ApiService.dart';
|
||||
import 'package:qhd_prevention/pages/KeyProjects/Danger/danger_list_page.dart';
|
||||
import 'package:qhd_prevention/pages/KeyProjects/KeyProject/keyProject_list_page.dart';
|
||||
import 'package:qhd_prevention/pages/KeyProjects/SafeCheck/safeCheck_list_page.dart';
|
||||
import 'package:qhd_prevention/pages/home/SafeCheck/CheckPersonSign/safeCheck_sign_list_page.dart';
|
||||
import 'package:qhd_prevention/pages/home/SafeCheck/CheckPersonSure/check_person_list_page.dart';
|
||||
import 'package:qhd_prevention/pages/home/SafeCheck/DangeCheck/safeCheck_danger_list_page.dart';
|
||||
import 'package:qhd_prevention/pages/home/SafeCheck/Record/defend_record_list_page.dart';
|
||||
import 'package:qhd_prevention/pages/home/SafeCheck/Start/safeCheck_start_list_page.dart';
|
||||
import 'package:qhd_prevention/pages/home/tap/tabList/work_tab_icon_grid.dart';
|
||||
import 'package:qhd_prevention/pages/my_appbar.dart';
|
||||
import 'package:qhd_prevention/tools/tools.dart';
|
||||
|
||||
|
||||
class GyAlarmPage extends StatefulWidget {
|
||||
const GyAlarmPage({super.key});
|
||||
|
||||
@override
|
||||
State<GyAlarmPage> createState() => _GyAlarmPageState();
|
||||
}
|
||||
|
||||
class _GyAlarmPageState extends State<GyAlarmPage> {
|
||||
late List<Map<String, dynamic>> buttonInfos = [
|
||||
{
|
||||
"icon": "assets/icon-apps/icon-yxkj-1.png",
|
||||
"title": "已检查",
|
||||
"unreadCount": '0',
|
||||
},
|
||||
{
|
||||
"icon": "assets/icon-apps/icon-yxkj-4.png",
|
||||
"title": "未检查",
|
||||
"unreadCount": '0',
|
||||
},
|
||||
{
|
||||
"icon": "assets/icon-apps/icon-yxkj-2.png",
|
||||
"title": "已完成",
|
||||
"unreadCount":'0',
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// _getData();
|
||||
}
|
||||
// Future<void> _getData() async {
|
||||
// final data = await ApiService.getSafeCheckCount();
|
||||
// setState(() {
|
||||
// final checkedCount = data['checkedCount']['checkedCount'] ?? '';
|
||||
// final repulseAndCheckCount = data['repulseAndCheckCount']['repulseAndCheckCount'] ?? '';
|
||||
// final confirmCount = data['confirmCount']['confirmCount'] ?? '';
|
||||
// final repulseCount = data['repulseCount']['repulseCount'] ?? '';
|
||||
//
|
||||
// buttonInfos = [
|
||||
// {
|
||||
// "icon": "assets/icon-apps/icon-yxkj-1.png",
|
||||
// "title": "安全检查\n发起",
|
||||
// "unreadCount": repulseCount,
|
||||
// },
|
||||
// {
|
||||
// "icon": "assets/icon-apps/icon-yxkj-4.png",
|
||||
// "title": "检查人\n确认",
|
||||
// "unreadCount": confirmCount,
|
||||
// },
|
||||
// {
|
||||
// "icon": "assets/icon-apps/icon-yxkj-2.png",
|
||||
// "title": "被检查人\n签字/申辩",
|
||||
// "unreadCount":checkedCount,
|
||||
// },
|
||||
// {
|
||||
// "icon": "assets/icon-apps/icon-yxkj-2.png",
|
||||
// "title": "隐患指派\n及验收",
|
||||
// "unreadCount":repulseAndCheckCount,
|
||||
// },
|
||||
// {
|
||||
// "icon": "assets/icon-apps/icon-yxkj-2.png",
|
||||
// "title": "申辩记录",
|
||||
// "unreadCount":'0',
|
||||
// },
|
||||
//
|
||||
// ];
|
||||
// });
|
||||
// }
|
||||
void _handleItemPressed(int index) async {
|
||||
// 根据索引执行不同的导航逻辑
|
||||
String title = '';
|
||||
switch (index) {
|
||||
case 0: {
|
||||
title = '安全检查发起';
|
||||
// await pushPage(SafecheckStartListPage(flow: title), context);
|
||||
} break;
|
||||
case 1: {
|
||||
title = '安全检查核实';
|
||||
// await pushPage(CheckPersonListPage(flow: title), context);
|
||||
|
||||
} break;
|
||||
case 2: {
|
||||
title = '安全检查确认';
|
||||
// await pushPage(SafecheckSignListPage(flow: title), context);
|
||||
|
||||
} break;
|
||||
default:
|
||||
print("按钮 $index 被点击");
|
||||
}
|
||||
ToastUtil.showNormal(context, '开发中');
|
||||
// _getData();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: MyAppbar(title: '工艺报警优化'),
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
ListItemFactory.createBuildSimpleSection('工艺报警优化'),
|
||||
WorkTabIconGrid(
|
||||
buttonInfos: buttonInfos,
|
||||
onItemPressed: _handleItemPressed,
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -690,8 +690,8 @@ class _HiddenDangerAcceptancePageState extends State<HiddenDangerAcceptancePage>
|
|||
String _getSourceText(String? source) {
|
||||
switch (source) {
|
||||
case '1': return '隐患快报';
|
||||
case '2': return '隐患排查清单检查';
|
||||
case '3': return '标准排查清单检查';
|
||||
case '2': return '隐患排查';
|
||||
case '3': return '标准排查';
|
||||
case '4': return '专项检查';
|
||||
case '5': return '安全检查';
|
||||
case '6': return 'NFC设备巡检';
|
||||
|
|
|
|||
|
|
@ -496,8 +496,8 @@ class _HiddenRecordDetailPageState extends State<HiddenRecordDetailPage> {
|
|||
|
||||
switch (source) {
|
||||
case '1': return '隐患快报';
|
||||
case '2': return '隐患排查清单检查';
|
||||
case '3': return '标准排查清单检查';
|
||||
case '2': return '隐患排查';
|
||||
case '3': return '标准排查';
|
||||
case '4': return '专项检查';
|
||||
case '5': return '安全检查';
|
||||
case '6': return 'NFC设备巡检';
|
||||
|
|
|
|||
|
|
@ -787,8 +787,8 @@ class _PendingRectificationDetailPageState extends State<PendingRectificationDet
|
|||
String _getSourceText(String? source) {
|
||||
switch (source) {
|
||||
case '1': return '隐患快报';
|
||||
case '2': return '隐患排查清单检查';
|
||||
case '3': return '标准排查清单检查';
|
||||
case '2': return '隐患排查';
|
||||
case '3': return '标准排查';
|
||||
case '4': return '专项检查';
|
||||
case '5': return '安全检查';
|
||||
case '6': return 'NFC设备巡检';
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:ffi';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:qhd_prevention/customWidget/bottom_picker.dart';
|
||||
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
||||
import 'package:qhd_prevention/customWidget/custom_button.dart';
|
||||
import 'package:qhd_prevention/customWidget/department_person_picker.dart';
|
||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||
import 'package:qhd_prevention/http/ApiService.dart';
|
||||
import 'package:qhd_prevention/pages/home/tap/item_list_widget.dart';
|
||||
import 'package:qhd_prevention/pages/home/work_alert.dart';
|
||||
import 'package:qhd_prevention/pages/my_appbar.dart';
|
||||
import 'package:qhd_prevention/services/nfc_service.dart';
|
||||
import 'package:qhd_prevention/tools/tools.dart';
|
||||
|
|
|
|||
|
|
@ -247,13 +247,16 @@ class _SafetyCommitmentDhListState extends State<SafetyCommitmentDhList> {
|
|||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('承诺时间: ${item['SIGN_TIME']??""}'),
|
||||
Text('承诺时间: ${item['START_TIME']??""}-${item['END_TIME']??""}'),
|
||||
const SizedBox(height: 5),
|
||||
Text('承诺人: ${item['SIGN_USER_NAME']??""}'),
|
||||
],
|
||||
),
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Text('承诺时间: ${item['SIGN_TIME']??""}'),
|
||||
// Text('承诺人: ${item['SIGN_USER_NAME']??""}'),
|
||||
// ],
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -99,10 +99,18 @@ class _HomeDangerPageState extends State<HomeDangerPage>
|
|||
setState(() {
|
||||
|
||||
for(int i=0;i<newList.length;i++){
|
||||
if(newList[i]["checkCount"]==0){
|
||||
listOne.add(newList[i]);
|
||||
// }else{
|
||||
// listTwo.add(newList[i]);
|
||||
Map item = newList[i];
|
||||
if (item['PERIOD'] == "checkPeriod0000") {
|
||||
// 特殊处理 checkPeriod0000 的情况
|
||||
if (!item['investigated']) {
|
||||
listOne.add(item);
|
||||
}
|
||||
} else {
|
||||
if(newList[i]["checkCount"]==0){
|
||||
listOne.add(newList[i]);
|
||||
// }else{
|
||||
// listTwo.add(newList[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
listDates.addAll(listOne);
|
||||
|
|
|
|||
|
|
@ -42,12 +42,14 @@ class HomePage extends StatefulWidget {
|
|||
class HomePageState extends State<HomePage> {
|
||||
int _eight_work_count = 0;
|
||||
int _safetyEnvironmentalInspection = 0;
|
||||
|
||||
void startScan() {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) => ScanPage(totalList: totalList)),
|
||||
);
|
||||
}
|
||||
|
||||
// 缓存 key
|
||||
static const String _hiddenCacheKey = 'hidden_roll_cache';
|
||||
|
||||
|
|
@ -67,7 +69,9 @@ class HomePageState extends State<HomePage> {
|
|||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
List totalList = [];
|
||||
|
||||
/// 按钮信息
|
||||
List<Map<String, dynamic>> buttonInfos = [
|
||||
{
|
||||
|
|
@ -117,7 +121,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},
|
||||
];
|
||||
|
||||
/// 我的工作
|
||||
|
|
@ -186,14 +190,12 @@ class HomePageState extends State<HomePage> {
|
|||
// 使用初始化加载:先恢复缓存(若存在则直接显示),然后再发起网络请求(成功则覆盖缓存)
|
||||
BadgeManager().initAllModules();
|
||||
_initialLoad();
|
||||
|
||||
}
|
||||
|
||||
/// 首次加载:先恢复缓存(如果有),然后在后台去刷新(只有当无缓存时才显示 loading)
|
||||
Future<void> _initialLoad() async {
|
||||
final result = await AuthService.checkUpdate();
|
||||
try{
|
||||
|
||||
try {
|
||||
if (FormUtils.hasValue(result, 'pd')) {
|
||||
Map pd = result['pd'];
|
||||
final versionInfo = await getAppVersion();
|
||||
|
|
@ -201,28 +203,28 @@ class HomePageState extends State<HomePage> {
|
|||
if (versionInfo.versionName != pd['VERSION']) {
|
||||
//有更新 提示更新
|
||||
final ok = await CustomAlertDialog.showConfirm(
|
||||
context,
|
||||
barrierDismissible:false,
|
||||
title: '更新通知',
|
||||
content: isWifi ? '发现新版本,是否更新?为了更好的体验,请更新到最新版本。' : '发现新版本,检查到您当前使用的是移动网络,是否更新?更新时请注意流量消耗。为了更好的体验,请更新到最新版本。',
|
||||
cancelText: pd['ISUPDATE'] == '1' ? '' : '稍后更新',
|
||||
confirmText: '立即更新'
|
||||
context,
|
||||
barrierDismissible: false,
|
||||
title: '更新通知',
|
||||
content:
|
||||
isWifi
|
||||
? '发现新版本,是否更新?为了更好的体验,请更新到最新版本。'
|
||||
: '发现新版本,检查到您当前使用的是移动网络,是否更新?更新时请注意流量消耗。为了更好的体验,请更新到最新版本。',
|
||||
cancelText: pd['ISUPDATE'] == '1' ? '' : '稍后更新',
|
||||
confirmText: '立即更新',
|
||||
);
|
||||
if (ok) {
|
||||
if (Platform.isIOS) {
|
||||
openAppStore();
|
||||
}else{
|
||||
} else {
|
||||
final apkUrl = pd['FILEURL'] ?? '';
|
||||
await showUpdateConfirm(context, apkUrl: apkUrl);
|
||||
}
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}catch(_){}
|
||||
|
||||
} catch (_) {}
|
||||
|
||||
final corppromiseData = await ApiService.checkSafeCorppromise();
|
||||
if (corppromiseData['ISSIGN'] == 1) {
|
||||
|
|
@ -232,7 +234,6 @@ class HomePageState extends State<HomePage> {
|
|||
title: '温馨提示',
|
||||
content: '有未签署的安全承诺,点击确认前往签署',
|
||||
force: true,
|
||||
|
||||
);
|
||||
if (confirmed) {
|
||||
Navigator.pushReplacement(
|
||||
|
|
@ -243,11 +244,11 @@ class HomePageState extends State<HomePage> {
|
|||
return;
|
||||
}
|
||||
|
||||
_loadHiddenCache();
|
||||
_loadHiddenCache();
|
||||
// 拉取其他数据 + 隐患列表(当 hiddenList 为空时显示 loading,否则不显示)
|
||||
_fetchData();
|
||||
_fetchHiddenList(showLoading: hiddenList.isEmpty);
|
||||
fetchAndSaveBd09(context);
|
||||
_fetchHiddenList(showLoading: hiddenList.isEmpty);
|
||||
|
||||
/// 清单列表
|
||||
final data = await ApiService.getListData();
|
||||
if (data['result'] == 'success') {
|
||||
|
|
@ -258,6 +259,7 @@ class HomePageState extends State<HomePage> {
|
|||
}
|
||||
}
|
||||
}
|
||||
fetchAndSaveBd09(context);
|
||||
}
|
||||
|
||||
Future<void> _onRefresh() async {
|
||||
|
|
@ -578,7 +580,6 @@ class HomePageState extends State<HomePage> {
|
|||
pushPage(HomeNfcListPage(), context);
|
||||
break;
|
||||
}
|
||||
|
||||
},
|
||||
);
|
||||
}).toList(),
|
||||
|
|
@ -719,9 +720,9 @@ class HomePageState extends State<HomePage> {
|
|||
onTap: () async {
|
||||
if (index == 1) {
|
||||
LoadingDialogHelper.show();
|
||||
bool isRest= await _getIsRest();
|
||||
bool isRest = await _getIsRest();
|
||||
LoadingDialogHelper.hide();
|
||||
if(isRest){
|
||||
if (isRest) {
|
||||
ToastUtil.showNormal(context, "您已经处于离岗状态中");
|
||||
return;
|
||||
}
|
||||
|
|
@ -775,17 +776,16 @@ class HomePageState extends State<HomePage> {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
Future<bool> _getIsRest( )async {
|
||||
Future<bool> _getIsRest() async {
|
||||
try {
|
||||
final raw = await ApiService.getIsRest();
|
||||
if (raw['result'] == 'success') {
|
||||
if( raw['ISREST']=="1"){
|
||||
if (raw['ISREST'] == "1") {
|
||||
return true;
|
||||
}else{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
@ -794,5 +794,4 @@ class HomePageState extends State<HomePage> {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1623,7 +1623,7 @@ class ConfirmWithSignWidget extends StatelessWidget {
|
|||
this.isShowTime = true,
|
||||
}) : super(key: key);
|
||||
|
||||
// 允许外部传入 null(但构建内部会降级为 {},避免空异常)
|
||||
// 允许外部传入 null({}但构建内部会降级为 ,避免空异常)
|
||||
final Map<String, dynamic>? signs;
|
||||
final Map<String, dynamic>? pd;
|
||||
final String baseImgPath;
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ spacing: 12,
|
|||
if (picked != null) {
|
||||
setState(() {
|
||||
endTime = DateFormat(
|
||||
'yyyy-MM-dd HH:mm',
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
).format(picked);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ if (reasonText.isEmpty) {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: MyAppbar(title: '作业人意见'),
|
||||
appBar: MyAppbar(title: '吊装作业人意见'),
|
||||
body: SafeArea(
|
||||
child: SingleChildScrollView(
|
||||
padding: EdgeInsets.all(12),
|
||||
|
|
@ -285,7 +285,7 @@ if (reasonText.isEmpty) {
|
|||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ListItemFactory.headerTitle('作业人'),
|
||||
ListItemFactory.headerTitle('吊装作业人'),
|
||||
CustomButton(
|
||||
text: '新增手写签字',
|
||||
height: 36,
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ class DangerWaitBean {
|
|||
final String itemNameOne;
|
||||
final String itemNameTwo;
|
||||
|
||||
final String laiYuanId;
|
||||
final String laiYuanName;
|
||||
|
||||
|
||||
DangerWaitBean({
|
||||
required this.selectedCategoryId,
|
||||
required this.selectedDepartmentId,
|
||||
|
|
@ -43,7 +47,8 @@ class DangerWaitBean {
|
|||
required this.endTime,
|
||||
required this.itemNameOne,
|
||||
required this.itemNameTwo,
|
||||
|
||||
required this.laiYuanId,
|
||||
required this.laiYuanName,
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -54,6 +59,7 @@ class DangerWaitBean {
|
|||
|
||||
String startTime,String endTime,
|
||||
String itemNameOne,String itemNameTwo,
|
||||
String laiYuanId,String laiYuanName,
|
||||
) {
|
||||
return DangerWaitBean(
|
||||
selectedCategoryId:selectedCategoryId,
|
||||
|
|
@ -67,6 +73,8 @@ class DangerWaitBean {
|
|||
endTime:endTime,
|
||||
itemNameOne:itemNameOne,
|
||||
itemNameTwo:itemNameTwo,
|
||||
laiYuanId:laiYuanId,
|
||||
laiYuanName:laiYuanName,
|
||||
|
||||
);
|
||||
}
|
||||
|
|
@ -76,7 +84,7 @@ class DangerWaitBean {
|
|||
"investigationMethodOption":investigationMethodOption,"investigationMethodId":investigationMethodId,
|
||||
"hazardLevelOption":hazardLevelOption,"dangerStatusOption":dangerStatusOption,
|
||||
"startTime":startTime,"endTime":endTime,
|
||||
"itemNameOne":itemNameOne,"itemNameTwo":itemNameTwo,};
|
||||
"itemNameOne":itemNameOne,"itemNameTwo":itemNameTwo,"laiYuanId":laiYuanId,"laiYuanName":laiYuanName,};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -85,7 +93,7 @@ class DangerWaitBean {
|
|||
class DangerWaitDrawer extends StatefulWidget {
|
||||
const DangerWaitDrawer(this.treeJson, {super.key,required this.onClose});
|
||||
|
||||
final Function(String,String,String,String,String,String,String) onClose; // 回调函数
|
||||
final Function(String,String,String,String,String,String,String,String) onClose; // 回调函数
|
||||
final String treeJson;
|
||||
// final DangerWaitBean waitBean;
|
||||
|
||||
|
|
@ -123,6 +131,12 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
|||
String itemNameOne="请选择";
|
||||
String itemNameTwo="请选择";
|
||||
|
||||
//隐患来源:
|
||||
List<WaitListBean> laiYuanList =[];
|
||||
|
||||
String laiYuanId="";
|
||||
String laiYuanName="请选择";
|
||||
|
||||
// 转换为List<Map<String, dynamic>>
|
||||
late List<Map<String, dynamic>> departmentList ;
|
||||
|
||||
|
|
@ -131,6 +145,7 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
|||
final List<String> investigationMethod = ["风险排查隐患", "隐患排查隐患"];
|
||||
final List<String> hazardLevel = [" 一般风险 ", " 重大风险 "];
|
||||
final List<String> dangerStatus = ["未整改", "已整改", "已验收", "已过期"];
|
||||
final List<String> laiYuanStatus = ["隐患快报", "隐患排查", "标准排查", "专项检查", "安全检查", "NFC设备巡检"];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
@ -162,6 +177,8 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
|||
}
|
||||
itemNameOne= dangerWaitBean["itemNameOne"];
|
||||
itemNameTwo= dangerWaitBean["itemNameTwo"];
|
||||
laiYuanId= dangerWaitBean["laiYuanId"];
|
||||
laiYuanName= dangerWaitBean["laiYuanName"];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -169,6 +186,16 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
|||
print("解析失败: $e");
|
||||
}
|
||||
|
||||
|
||||
//隐患来源数据处理
|
||||
// setState(() {
|
||||
// for(int i=0;i<laiYuanStatus.length;i++){
|
||||
// WaitListBean waitListBean=WaitListBean(id: "${i+1}", name: laiYuanStatus[i], parentId: "");
|
||||
// laiYuanList.add(waitListBean);
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
// // 解析JSON字符串
|
||||
// jsonList = json.decode(widget.treeJson);
|
||||
// departmentList = List<Map<String, dynamic>>.from(jsonList);
|
||||
|
|
@ -261,6 +288,27 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
|||
);
|
||||
}
|
||||
|
||||
// 隐患来源显示分类选择器
|
||||
void showCategoryPickerTwo() {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
barrierColor: Colors.black54,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (ctx) => WaitListPicker(
|
||||
data: laiYuanList,
|
||||
onSelected: (item) {
|
||||
setState(() {
|
||||
laiYuanId=item!.id;
|
||||
laiYuanName=item!.name;
|
||||
setResult();
|
||||
});
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return SafeArea(
|
||||
child:
|
||||
SingleChildScrollView( // 添加这一行
|
||||
|
|
@ -314,6 +362,18 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
|||
// },
|
||||
),
|
||||
|
||||
|
||||
|
||||
// const SizedBox(height: 6),
|
||||
// // 管控部门
|
||||
// _buildDropdownBox(
|
||||
// "隐患来源",
|
||||
// display: laiYuanName ?? '请选择',
|
||||
// onTap: () {
|
||||
// showCategoryPickerTwo();
|
||||
// }
|
||||
// ),
|
||||
|
||||
const SizedBox(height: 12),
|
||||
const Text(
|
||||
"排查方式",
|
||||
|
|
@ -335,6 +395,8 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
|||
itemCount: investigationMethod.length,
|
||||
itemBuilder: _itemGridviewItem
|
||||
),
|
||||
|
||||
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: List.generate(investigationMethod.length, (idx) {
|
||||
|
|
@ -508,6 +570,9 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
|||
itemNameOne="请选择";
|
||||
itemNameTwo="请选择";
|
||||
|
||||
laiYuanId="";
|
||||
laiYuanName="请选择";
|
||||
|
||||
setResult();
|
||||
// widget.onClose("","","","","","","");
|
||||
|
||||
|
|
@ -698,7 +763,9 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
|||
_selectedCategoryId ?? "", _selectedDepartmentId?? "",
|
||||
_investigationMethodOption,investigationMethodId,
|
||||
_hazardLevelOption, _dangerStatusOption,
|
||||
startTime, endTime,itemNameOne, itemNameTwo);
|
||||
startTime, endTime,itemNameOne, itemNameTwo,laiYuanId,laiYuanName);
|
||||
|
||||
|
||||
|
||||
String jsonString = jsonEncode(waitBean.toJson());
|
||||
SessionService.instance.setDangerWaitInfo(jsonString);
|
||||
|
|
@ -711,6 +778,7 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
|||
_dangerStatusOption!=-1?dangerStatusId[_dangerStatusOption]:"",
|
||||
_startDate!=null?startTime:"",
|
||||
_endDate!=null?endTime:"",
|
||||
laiYuanId?? ""
|
||||
); // 触发回调
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -260,84 +260,87 @@ class _LoginPageState extends State<LoginPage> {
|
|||
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 10),
|
||||
child: Row(
|
||||
children: [
|
||||
Checkbox(
|
||||
value: _agreed,
|
||||
activeColor: Colors.white,
|
||||
checkColor: Colors.blueAccent,
|
||||
side: const BorderSide(color: Colors.white),
|
||||
onChanged:(value) {
|
||||
setState(() {
|
||||
_agreed = value??false;
|
||||
});
|
||||
child: Center( // 关键:把 Row 放到 Center 中
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min, // Row 根据子项宽度自适应,不再铺满父宽度
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Checkbox(
|
||||
value: _agreed,
|
||||
activeColor: Colors.white,
|
||||
checkColor: Colors.blueAccent,
|
||||
side: const BorderSide(color: Colors.white),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_agreed = value ?? false;
|
||||
});
|
||||
},
|
||||
),
|
||||
|
||||
},
|
||||
// (v) => setState(() => _agreed = v ?? false),
|
||||
),
|
||||
Expanded(
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '我已阅读并同意',
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
// 用 Flexible 而非 Expanded,且给 RichText 一个居中对齐
|
||||
Flexible(
|
||||
fit: FlexFit.loose,
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center, // 使文本在它的可用宽度内居中
|
||||
text: TextSpan(
|
||||
children: [
|
||||
const TextSpan(
|
||||
text: '我已阅读并同意',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: '《服务协议》',
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF0D1D8C),
|
||||
fontSize: 12,
|
||||
TextSpan(
|
||||
text: '《服务协议》',
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF0D1D8C),
|
||||
fontSize: 12,
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
pushPage(
|
||||
const WebViewPage(
|
||||
name: "用户服务协议",
|
||||
url: 'http://47.92.102.56:7811/file/xieyi/zsyhxy.htm',
|
||||
),
|
||||
context,
|
||||
);
|
||||
},
|
||||
),
|
||||
recognizer:
|
||||
TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
pushPage(
|
||||
const WebViewPage(
|
||||
name: "用户服务协议",
|
||||
url:
|
||||
'http://47.92.102.56:7811/file/xieyi/zsyhxy.htm', // 替换为目标网址
|
||||
),
|
||||
context,
|
||||
);
|
||||
},
|
||||
),
|
||||
TextSpan(
|
||||
text: '和',
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
const TextSpan(
|
||||
text: '和',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: '《隐私政策》',
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF0D1D8C),
|
||||
fontSize: 12,
|
||||
TextSpan(
|
||||
text: '《隐私政策》',
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF0D1D8C),
|
||||
fontSize: 12,
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
pushPage(
|
||||
const WebViewPage(
|
||||
name: "隐私政策",
|
||||
url: 'http://47.92.102.56:7811/file/xieyi/zsysq.htm',
|
||||
),
|
||||
context,
|
||||
);
|
||||
},
|
||||
),
|
||||
recognizer:
|
||||
TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
pushPage(
|
||||
const WebViewPage(
|
||||
name: "隐私政策",
|
||||
url:
|
||||
'http://47.92.102.56:7811/file/xieyi/zsysq.htm', // 替换为目标网址
|
||||
),
|
||||
context,
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
// ),
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class _MineDutyDetailPage extends State<MineDutyDetailPage> {
|
|||
|
||||
// 申请人信息
|
||||
if (widget.item["REVIEW_STATUS"] != '2')
|
||||
_buildInfoRowTwo("审批人:", "${FormUtils.hasValue(widget.item, "REVIEW_USER_NAME") ? widget.item["REVIEW_USER_NAME"] : "unfind"}[${FormUtils.hasValue(widget.item, "REVIEW_USER_DEPARTMENTNAME") ? widget.item["REVIEW_USER_DEPARTMENTNAME"] : "unfind"}]",),
|
||||
_buildInfoRowTwo("审批人:", "${FormUtils.hasValue(widget.item, "REVIEW_USER_NAME") ? widget.item["REVIEW_USER_NAME"] : "无"}${FormUtils.hasValue(widget.item, "REVIEW_USER_DEPARTMENTNAME") ? "[${widget.item["REVIEW_USER_DEPARTMENTNAME"]}]": ""}",),
|
||||
// Container(
|
||||
// padding: const EdgeInsets.symmetric(
|
||||
// horizontal: 5,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import 'dart:ffi';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'h_colors.dart';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import 'dart:ffi';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
// lib/utils/platform_utils.dart
|
||||
import 'package:flutter/foundation.dart' show kIsWeb, defaultTargetPlatform, TargetPlatform;
|
||||
|
||||
/// 简单的跨平台判断工具,避免在 web 上引用 dart:io
|
||||
class PlatformUtils {
|
||||
/// 是否在浏览器
|
||||
static bool get isWeb => kIsWeb;
|
||||
|
||||
/// 是否为 iOS(注意:在 web 上会返回 false)
|
||||
static bool get isIOS => !kIsWeb && defaultTargetPlatform == TargetPlatform.iOS;
|
||||
|
||||
/// 是否为 Android(在 web 上会返回 false)
|
||||
static bool get isAndroid => !kIsWeb && defaultTargetPlatform == TargetPlatform.android;
|
||||
|
||||
/// 返回一个简单的操作系统标识字符串(web 会返回 'web')
|
||||
static String get operatingSystem {
|
||||
if (kIsWeb) return 'web';
|
||||
switch (defaultTargetPlatform) {
|
||||
case TargetPlatform.android:
|
||||
return 'android';
|
||||
case TargetPlatform.iOS:
|
||||
return 'ios';
|
||||
case TargetPlatform.macOS:
|
||||
return 'macos';
|
||||
case TargetPlatform.linux:
|
||||
return 'linux';
|
||||
case TargetPlatform.windows:
|
||||
return 'windows';
|
||||
case TargetPlatform.fuchsia:
|
||||
return 'fuchsia';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -622,6 +622,7 @@ Future<void> openAppStore() async {
|
|||
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
exit(0);
|
||||
} else {
|
||||
// 回退到 https 链接(在浏览器中打开 App Store 页面)
|
||||
final Uri webUri = Uri.parse('https://itunes.apple.com/app/id$appId');
|
||||
|
|
@ -630,5 +631,6 @@ Future<void> openAppStore() async {
|
|||
} else {
|
||||
throw 'Could not launch App Store for app id $appId';
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
|
@ -150,10 +150,7 @@ class _DownloadProgressDialogState extends State<DownloadProgressDialog> {
|
|||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: _onCancel,
|
||||
child: const Text('取消'),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 2.2.0+59
|
||||
version: 2.2.1+60
|
||||
|
||||
environment:
|
||||
sdk: ^3.7.0
|
||||
|
|
|
|||
Loading…
Reference in New Issue