2026.5.12 重大较大隐患,图标,重点作业
parent
5420cfe4aa
commit
171cb3acf6
Binary file not shown.
|
After Width: | Height: | Size: 419 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:qhd_prevention/common/route_service.dart';
|
||||||
import 'package:qhd_prevention/http/ApiService.dart';
|
import 'package:qhd_prevention/http/ApiService.dart';
|
||||||
import 'package:qhd_prevention/http/HttpManager.dart';
|
import 'package:qhd_prevention/http/HttpManager.dart';
|
||||||
import 'package:qhd_prevention/services/SessionService.dart';
|
import 'package:qhd_prevention/services/SessionService.dart';
|
||||||
|
|
@ -7,12 +8,16 @@ class KeyTasksApi {
|
||||||
|
|
||||||
|
|
||||||
/// 重点作业确认分页-监管-分公司
|
/// 重点作业确认分页-监管-分公司
|
||||||
static Future<Map<String, dynamic>> getKeyTasksConfirmList(Map data) {
|
static Future<Map<String, dynamic>> getKeyTasksConfirmList(Map data) async {
|
||||||
|
final parentPerm = 'dashboard:Key-assignment:Key-Task-Application';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
return HttpManager().request(
|
return HttpManager().request(
|
||||||
'${ApiService.basePath}/keyProject',
|
'${ApiService.basePath}/keyProject',
|
||||||
'/keyProject/pageConfirm',
|
'/keyProject/pageConfirm',
|
||||||
method: Method.post,
|
method: Method.post,
|
||||||
data: {
|
data: {
|
||||||
|
"menuPath": menuPath,
|
||||||
...data
|
...data
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
@ -57,12 +62,16 @@ class KeyTasksApi {
|
||||||
|
|
||||||
|
|
||||||
/// 安全环保检查分页
|
/// 安全环保检查分页
|
||||||
static Future<Map<String, dynamic>> getKeyTasksSafetyEnvironmentalInspectionList(Map data) {
|
static Future<Map<String, dynamic>> getKeyTasksSafetyEnvironmentalInspectionList(Map data) async {
|
||||||
|
final parentPerm = 'dashboard:Key-assignment:Confirmed-by-the-inspectee';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
return HttpManager().request(
|
return HttpManager().request(
|
||||||
'${ApiService.basePath}/keyProject',
|
'${ApiService.basePath}/keyProject',
|
||||||
'/safetyEnvironmentalInspection/list',
|
'/safetyEnvironmentalInspection/list',
|
||||||
method: Method.post,
|
method: Method.post,
|
||||||
data: {
|
data: {
|
||||||
|
"menuPath": menuPath,
|
||||||
...data
|
...data
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
@ -131,6 +140,17 @@ class KeyTasksApi {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 待整改数量
|
||||||
|
static Future<Map<String, dynamic>> getKeyTasksToDoCount(String id) {
|
||||||
|
return HttpManager().request(
|
||||||
|
'${ApiService.basePath}/keyProject',
|
||||||
|
'/keyProject/count/$id',
|
||||||
|
method: Method.get,
|
||||||
|
data: {
|
||||||
|
// ...data
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -12,13 +12,15 @@ typedef ItemTapCallback = void Function();
|
||||||
class AppSectionItem {
|
class AppSectionItem {
|
||||||
final String title;
|
final String title;
|
||||||
final String icon; // asset path
|
final String icon; // asset path
|
||||||
final int badge;
|
final String menuPerms; // 路由唯一权限标识
|
||||||
|
int badge;
|
||||||
final bool visible;
|
final bool visible;
|
||||||
final ItemTapCallback? onTap;
|
final ItemTapCallback? onTap;
|
||||||
|
|
||||||
AppSectionItem({
|
AppSectionItem({
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.icon,
|
required this.icon,
|
||||||
|
required this.menuPerms,
|
||||||
this.badge = 0,
|
this.badge = 0,
|
||||||
this.visible = true,
|
this.visible = true,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
|
|
@ -50,6 +52,7 @@ class _DoorcarTabPageState extends State<DoorcarTabPage> {
|
||||||
AppSectionItem(
|
AppSectionItem(
|
||||||
title: '进港口门申请',
|
title: '进港口门申请',
|
||||||
icon: 'assets/images/door_ico9.png',
|
icon: 'assets/images/door_ico9.png',
|
||||||
|
menuPerms:'',
|
||||||
badge: 0,
|
badge: 0,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await pushPage(DoorareaTypePage(1), context);
|
await pushPage(DoorareaTypePage(1), context);
|
||||||
|
|
@ -59,6 +62,7 @@ class _DoorcarTabPageState extends State<DoorcarTabPage> {
|
||||||
AppSectionItem(
|
AppSectionItem(
|
||||||
title: '进港口门申请记录',
|
title: '进港口门申请记录',
|
||||||
icon: 'assets/images/door_ico10.png',
|
icon: 'assets/images/door_ico10.png',
|
||||||
|
menuPerms:'',
|
||||||
badge: 0,
|
badge: 0,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await pushPage(DoorareaTypePage(2), context);
|
await pushPage(DoorareaTypePage(2), context);
|
||||||
|
|
@ -71,6 +75,7 @@ class _DoorcarTabPageState extends State<DoorcarTabPage> {
|
||||||
AppSectionItem(
|
AppSectionItem(
|
||||||
title: '封闭区域口门申请',
|
title: '封闭区域口门申请',
|
||||||
icon: 'assets/images/door_ico9.png',
|
icon: 'assets/images/door_ico9.png',
|
||||||
|
menuPerms:'',
|
||||||
badge: 0,
|
badge: 0,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await pushPage(DoorareaTypePage(3), context);
|
await pushPage(DoorareaTypePage(3), context);
|
||||||
|
|
@ -80,6 +85,7 @@ class _DoorcarTabPageState extends State<DoorcarTabPage> {
|
||||||
AppSectionItem(
|
AppSectionItem(
|
||||||
title: '封闭区域口门申请记录',
|
title: '封闭区域口门申请记录',
|
||||||
icon: 'assets/images/door_ico10.png',
|
icon: 'assets/images/door_ico10.png',
|
||||||
|
menuPerms:'',
|
||||||
badge: 0,
|
badge: 0,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await pushPage(DoorareaTypePage(4), context);
|
await pushPage(DoorareaTypePage(4), context);
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
||||||
import 'package:qhd_prevention/customWidget/custom_button.dart';
|
import 'package:qhd_prevention/customWidget/custom_button.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
import 'package:qhd_prevention/http/ApiService.dart';
|
import 'package:qhd_prevention/http/ApiService.dart';
|
||||||
|
import 'package:qhd_prevention/http/modules/key_tasks_api.dart';
|
||||||
import 'package:qhd_prevention/pages/home/Study/study_tab_list_page.dart';
|
import 'package:qhd_prevention/pages/home/Study/study_tab_list_page.dart';
|
||||||
import 'package:qhd_prevention/pages/home/Tap/work_tab_list_page.dart';
|
import 'package:qhd_prevention/pages/home/Tap/work_tab_list_page.dart';
|
||||||
import 'package:qhd_prevention/pages/home/doorAndCar/doorCar_tab_page.dart';
|
import 'package:qhd_prevention/pages/home/doorAndCar/doorCar_tab_page.dart';
|
||||||
|
|
@ -19,6 +20,7 @@ import 'package:qhd_prevention/pages/main_tab.dart';
|
||||||
import 'package:qhd_prevention/pages/mine/onboarding_full_page.dart';
|
import 'package:qhd_prevention/pages/mine/onboarding_full_page.dart';
|
||||||
import 'package:qhd_prevention/pages/user/choose_userFirm_page.dart';
|
import 'package:qhd_prevention/pages/user/choose_userFirm_page.dart';
|
||||||
import 'package:qhd_prevention/pages/user/firm_list_page.dart';
|
import 'package:qhd_prevention/pages/user/firm_list_page.dart';
|
||||||
|
import 'package:qhd_prevention/services/SessionService.dart';
|
||||||
import 'package:qhd_prevention/services/auth_service.dart';
|
import 'package:qhd_prevention/services/auth_service.dart';
|
||||||
import 'package:qhd_prevention/services/scan_service.dart';
|
import 'package:qhd_prevention/services/scan_service.dart';
|
||||||
import 'package:qhd_prevention/tools/h_colors.dart';
|
import 'package:qhd_prevention/tools/h_colors.dart';
|
||||||
|
|
@ -120,7 +122,7 @@ class HomePageState extends RouteAwareState<HomePage>
|
||||||
"现场监管": "dashboard-Site-Supervision",
|
"现场监管": "dashboard-Site-Supervision",
|
||||||
"危险作业": "dashboard-Hazardous-Work",
|
"危险作业": "dashboard-Hazardous-Work",
|
||||||
"隐患治理": "dashboard-Hazard-Management",
|
"隐患治理": "dashboard-Hazard-Management",
|
||||||
"重点作业": "dashboard-Hazard-Management", // 无对应,暂时留空
|
"重点作业": "dashboard:Key-assignment",
|
||||||
"口门门禁": "dashboard-Gate-Access-Control",
|
"口门门禁": "dashboard-Gate-Access-Control",
|
||||||
"入港培训": "dashboard-Study-Training",
|
"入港培训": "dashboard-Study-Training",
|
||||||
};
|
};
|
||||||
|
|
@ -1103,7 +1105,9 @@ class HomePageState extends RouteAwareState<HomePage>
|
||||||
};
|
};
|
||||||
final result = await TodoApi.getTodoList(data);
|
final result = await TodoApi.getTodoList(data);
|
||||||
final specialWork = await SpecialWorkApi.specialWorkTaskLogTotalCount();
|
final specialWork = await SpecialWorkApi.specialWorkTaskLogTotalCount();
|
||||||
|
final keyTasksWork = await KeyTasksApi.getKeyTasksToDoCount(SessionService.instance.accountId??'');
|
||||||
int specialWorkNum = 0;
|
int specialWorkNum = 0;
|
||||||
|
int keyTasksNum = 0;
|
||||||
try {
|
try {
|
||||||
if (specialWork['success']) {
|
if (specialWork['success']) {
|
||||||
List<dynamic> specialWorkList = specialWork['data'] ?? [];
|
List<dynamic> specialWorkList = specialWork['data'] ?? [];
|
||||||
|
|
@ -1114,11 +1118,21 @@ class HomePageState extends RouteAwareState<HomePage>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (keyTasksWork['success']) {
|
||||||
|
int zdzysqCount = int.parse(keyTasksWork['data']['zdzysqCount']??0);
|
||||||
|
int bjcrqrCount = int.parse(keyTasksWork['data']['bjcrqrCount']??0);
|
||||||
|
int yhdzgCount = int.parse(keyTasksWork['data']['yhdzgCount']??0);
|
||||||
|
keyTasksNum = bjcrqrCount+yhdzgCount+zdzysqCount;
|
||||||
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
for (var section in buttonInfos) {
|
for (var section in buttonInfos) {
|
||||||
if (section['title'] == '危险作业') {
|
if (section['title'] == '危险作业') {
|
||||||
section['unreadCount'] = specialWorkNum;
|
section['unreadCount'] = specialWorkNum;
|
||||||
}
|
}
|
||||||
|
if (section['title'] == '重点作业') {
|
||||||
|
section['unreadCount'] = keyTasksNum;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
|
||||||
|
|
@ -481,12 +481,12 @@ class _KeyTasksHiddenDangerDetailState extends State<KeyTasksHiddenDangerDetail>
|
||||||
|
|
||||||
_buildInfoItem(
|
_buildInfoItem(
|
||||||
'整改部门',
|
'整改部门',
|
||||||
pd["rectificationRecord"]['rectificationDepartmentIdName'] ?? '',
|
pd['rectificationDepartmentName'] ?? '',
|
||||||
),
|
),
|
||||||
Divider(height: 1),
|
Divider(height: 1),
|
||||||
_buildInfoItem(
|
_buildInfoItem(
|
||||||
'整改人',
|
'整改人',
|
||||||
pd["rectificationRecord"]['rectificationUserIdName'] ?? '',
|
pd['rectificationUserName'] ?? '',
|
||||||
),
|
),
|
||||||
|
|
||||||
Divider(height: 1),
|
Divider(height: 1),
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:qhd_prevention/CustomWidget/range_filter_bar.dart';
|
import 'package:qhd_prevention/CustomWidget/range_filter_bar.dart';
|
||||||
|
import 'package:qhd_prevention/common/route_service.dart';
|
||||||
import 'package:qhd_prevention/customWidget/custom_button.dart';
|
import 'package:qhd_prevention/customWidget/custom_button.dart';
|
||||||
import 'package:qhd_prevention/customWidget/search_bar_widget.dart';
|
import 'package:qhd_prevention/customWidget/search_bar_widget.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
|
|
@ -48,19 +49,31 @@ class _KeyTasksHiddenDangerListState extends State<KeyTasksHiddenDangerList> {
|
||||||
|
|
||||||
_searchController.addListener(_onSearchChanged);
|
_searchController.addListener(_onSearchChanged);
|
||||||
|
|
||||||
|
_distinguishData();
|
||||||
|
// _getListData(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _distinguishData() async {
|
||||||
switch (widget.appItem) {
|
switch (widget.appItem) {
|
||||||
case 1:
|
case 1:
|
||||||
buttonTextTwo = '整改';
|
buttonTextTwo = '整改';
|
||||||
title = "隐患整改";
|
title = "隐患整改";
|
||||||
keyTasksHiddenDangerListData['stateList']=[1];
|
keyTasksHiddenDangerListData['stateList']=[1,4];
|
||||||
|
final parentPerm = 'dashboard:Key-assignment:Hidden-danger-rectification';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
|
keyTasksHiddenDangerListData['menuPath']=menuPath;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
buttonTextTwo = '查看';
|
buttonTextTwo = '查看';
|
||||||
title = "隐患记录";
|
title = "隐患记录";
|
||||||
keyTasksHiddenDangerListData['stateList']=[1,2,3,4];
|
keyTasksHiddenDangerListData['stateList']=[1,2,3,4];
|
||||||
|
final parentPerm = 'dashboard:Key-assignment:Hidden-Hazard-Record';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
|
keyTasksHiddenDangerListData['menuPath']=menuPath;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
_getListData(false);
|
_getListData(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -304,7 +317,7 @@ class _KeyTasksHiddenDangerListState extends State<KeyTasksHiddenDangerList> {
|
||||||
// 隐患发现人 - 使用 Expanded 包裹
|
// 隐患发现人 - 使用 Expanded 包裹
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'发现人:${truncateString(pageData['createName'] ?? '')}',
|
'发现人:${truncateString(pageData['findUserName'] ?? '')}',
|
||||||
style: TextStyle(fontSize: 14, color: Colors.black87),
|
style: TextStyle(fontSize: 14, color: Colors.black87),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
import 'package:qhd_prevention/http/ApiService.dart';
|
import 'package:qhd_prevention/http/ApiService.dart';
|
||||||
import 'package:qhd_prevention/http/modules/auth_api.dart';
|
import 'package:qhd_prevention/http/modules/auth_api.dart';
|
||||||
import 'package:qhd_prevention/http/modules/hidden_danger_api.dart';
|
import 'package:qhd_prevention/http/modules/hidden_danger_api.dart';
|
||||||
|
import 'package:qhd_prevention/http/modules/key_tasks_api.dart';
|
||||||
import 'package:qhd_prevention/http/modules/safety_check_api.dart';
|
import 'package:qhd_prevention/http/modules/safety_check_api.dart';
|
||||||
import 'package:qhd_prevention/pages/my_appbar.dart';
|
import 'package:qhd_prevention/pages/my_appbar.dart';
|
||||||
import 'package:qhd_prevention/services/SessionService.dart';
|
import 'package:qhd_prevention/services/SessionService.dart';
|
||||||
|
|
@ -105,7 +106,7 @@ class _KeyTaskesDangerPageState extends State<KeyTaskesDangerPage> {
|
||||||
"hiddenUserId": "", //整改id(整改图片反的id)
|
"hiddenUserId": "", //整改id(整改图片反的id)
|
||||||
"hiddenPartName": "", //隐患部位名称
|
"hiddenPartName": "", //隐患部位名称
|
||||||
|
|
||||||
'hiddenFindUserdList':[],//隐患发现人多选
|
'hiddenFindUserList':[],//隐患发现人多选
|
||||||
'hiddenFindUserdName':'',//隐患发现人多选名字
|
'hiddenFindUserdName':'',//隐患发现人多选名字
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
@ -185,16 +186,26 @@ class _KeyTaskesDangerPageState extends State<KeyTaskesDangerPage> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _getHiddenDetail() async {
|
Future<void> _getHiddenDetail() async {
|
||||||
// LoadingDialogHelper.show();
|
|
||||||
// final result = await HiddenDangerApi.getDangerDetail(widget.initData['id']);
|
|
||||||
// LoadingDialogHelper.hide();
|
|
||||||
// if (result['success']) {
|
|
||||||
// final data = result['data'];
|
|
||||||
// setState(() {
|
|
||||||
// addData = data;
|
|
||||||
_getHiddenImages();
|
_getHiddenImages();
|
||||||
// });
|
LoadingDialogHelper.show();
|
||||||
// }
|
final result = await KeyTasksApi.getKeyTasksHiddenDangerDetail(widget.initData['id']);
|
||||||
|
LoadingDialogHelper.hide();
|
||||||
|
if (result['success']) {
|
||||||
|
final data = result['data'];
|
||||||
|
setState(() {
|
||||||
|
addData['rectificationDepartmentId'] = data['rectificationDepartmentId'];
|
||||||
|
addData['rectificationDepartmentName'] = data['rectificationDepartmentName'];
|
||||||
|
addData['rectificationUserId'] = data['rectificationUserId'];
|
||||||
|
addData['rectificationUserName'] = data['rectificationUserName'];
|
||||||
|
|
||||||
|
//发现人
|
||||||
|
List<dynamic> result = addData['findUserList']??[];
|
||||||
|
addData['hiddenFindUserName'] = result.map((user) => user['findUserName']).join(',');
|
||||||
|
List<String> idList = result.map<String>((item) => item['findUserId'].toString()).toList();
|
||||||
|
addData['hiddenFindUserList'] = idList;
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 获取隐患照片
|
/// 获取隐患照片
|
||||||
|
|
@ -610,7 +621,7 @@ class _KeyTaskesDangerPageState extends State<KeyTaskesDangerPage> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前已选择的项目
|
// 获取当前已选择的项目
|
||||||
final dynamic currentSelected = addData['hiddenFindUserdList'] ?? [];
|
final dynamic currentSelected = addData['hiddenFindUserList'] ?? [];
|
||||||
List<String> selectedList = [];
|
List<String> selectedList = [];
|
||||||
|
|
||||||
if (currentSelected is List) {
|
if (currentSelected is List) {
|
||||||
|
|
@ -657,7 +668,7 @@ class _KeyTaskesDangerPageState extends State<KeyTaskesDangerPage> {
|
||||||
String userName = person['userName']?.toString() ?? '';
|
String userName = person['userName']?.toString() ?? '';
|
||||||
return selectedItems.contains(userName);
|
return selectedItems.contains(userName);
|
||||||
}).toList();
|
}).toList();
|
||||||
addData['hiddenFindUserdList'] = result;
|
addData['hiddenFindUserList'] = result;
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
|
||||||
|
|
||||||
final _standardController = TextEditingController();
|
final _standardController = TextEditingController();
|
||||||
|
|
||||||
double centerLat = 39.8883;
|
double centerLat = 0;
|
||||||
double centerLng = 119.519;
|
double centerLng = 0;
|
||||||
|
|
||||||
late Map<String, dynamic> pd = {};
|
late Map<String, dynamic> pd = {};
|
||||||
|
|
||||||
|
|
@ -208,6 +208,7 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
|
||||||
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
if(centerLat!=0)
|
||||||
Container(
|
Container(
|
||||||
height: 200,
|
height: 200,
|
||||||
margin: EdgeInsetsGeometry.symmetric(horizontal: 15),
|
margin: EdgeInsetsGeometry.symmetric(horizontal: 15),
|
||||||
|
|
@ -357,7 +358,11 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
|
||||||
_buildTableHeaderCell("视频类型"),
|
_buildTableHeaderCell("视频类型"),
|
||||||
]),
|
]),
|
||||||
if (monitorList.isEmpty)
|
if (monitorList.isEmpty)
|
||||||
TableRow(children: [Padding(padding: EdgeInsets.all(12), child: Text("暂无数据")), SizedBox()])
|
TableRow(children: [
|
||||||
|
SizedBox(),
|
||||||
|
Padding(padding: EdgeInsets.all(12), child: Text("暂无数据",textAlign: TextAlign.center, )),
|
||||||
|
Padding(padding: EdgeInsets.all(12), child: Text("暂无数据",textAlign: TextAlign.center, )),
|
||||||
|
])
|
||||||
else
|
else
|
||||||
...monitorList.asMap().entries.map((entry) {
|
...monitorList.asMap().entries.map((entry) {
|
||||||
final index = entry.key + 1; // 序号从1开始
|
final index = entry.key + 1; // 序号从1开始
|
||||||
|
|
@ -412,7 +417,12 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
|
||||||
_buildTableHeaderCell("操作"),
|
_buildTableHeaderCell("操作"),
|
||||||
]),
|
]),
|
||||||
if (monitorList.isEmpty)
|
if (monitorList.isEmpty)
|
||||||
TableRow(children: [Padding(padding: EdgeInsets.all(12), child: Text("暂无数据")), SizedBox()])
|
TableRow(children: [
|
||||||
|
SizedBox(),
|
||||||
|
Padding(padding: EdgeInsets.all(12), child: Text("暂无数据",textAlign: TextAlign.center, )),
|
||||||
|
Padding(padding: EdgeInsets.all(12), child: Text("暂无数据",textAlign: TextAlign.center, )),
|
||||||
|
SizedBox()
|
||||||
|
])
|
||||||
else
|
else
|
||||||
...monitorList.asMap().entries.map((entry) {
|
...monitorList.asMap().entries.map((entry) {
|
||||||
final index = entry.key + 1; // 序号从1开始
|
final index = entry.key + 1; // 序号从1开始
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,14 @@
|
||||||
import 'dart:ffi';
|
import 'dart:ffi';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:qhd_prevention/common/route_service.dart';
|
||||||
|
import 'package:qhd_prevention/http/modules/key_tasks_api.dart';
|
||||||
import 'package:qhd_prevention/pages/home/doorAndCar/doorCar_tab_page.dart';
|
import 'package:qhd_prevention/pages/home/doorAndCar/doorCar_tab_page.dart';
|
||||||
import 'package:qhd_prevention/pages/home/keyTasks/keyTasksDetail/keyTasksHiddenDanger/key_tasks_hidden_danger_list.dart';
|
import 'package:qhd_prevention/pages/home/keyTasks/keyTasksDetail/keyTasksHiddenDanger/key_tasks_hidden_danger_list.dart';
|
||||||
import 'package:qhd_prevention/pages/home/keyTasks/key_tasks_check_list_page.dart';
|
import 'package:qhd_prevention/pages/home/keyTasks/key_tasks_check_list_page.dart';
|
||||||
import 'package:qhd_prevention/pages/home/keyTasks/key_tasks_confirm_list_page.dart';
|
import 'package:qhd_prevention/pages/home/keyTasks/key_tasks_confirm_list_page.dart';
|
||||||
import 'package:qhd_prevention/pages/my_appbar.dart';
|
import 'package:qhd_prevention/pages/my_appbar.dart';
|
||||||
|
import 'package:qhd_prevention/services/SessionService.dart';
|
||||||
import 'package:qhd_prevention/tools/tools.dart';
|
import 'package:qhd_prevention/tools/tools.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -20,7 +23,7 @@ class KeyTasksTabPage extends StatefulWidget {
|
||||||
|
|
||||||
class _DoorcarTabPageState extends State<KeyTasksTabPage> {
|
class _DoorcarTabPageState extends State<KeyTasksTabPage> {
|
||||||
|
|
||||||
final String bannerAsset = 'assets/images/door_banner.png';
|
final String bannerAsset = 'assets/images/key_tasks_banner.jpg';
|
||||||
late List<AppSection> defaultSections;
|
late List<AppSection> defaultSections;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -40,7 +43,8 @@ class _DoorcarTabPageState extends State<KeyTasksTabPage> {
|
||||||
AppSection(title: '重点作业管理', items: [
|
AppSection(title: '重点作业管理', items: [
|
||||||
AppSectionItem(
|
AppSectionItem(
|
||||||
title: '重点作业申请',
|
title: '重点作业申请',
|
||||||
icon: 'assets/images/door_ico9.png',
|
icon: 'assets/images/key_tasks_ico2.png',
|
||||||
|
menuPerms:'dashboard:Key-assignment:Key-Task-Application',
|
||||||
badge: 0,
|
badge: 0,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await pushPage(KeyTasksConfirmListPage(), context);
|
await pushPage(KeyTasksConfirmListPage(), context);
|
||||||
|
|
@ -49,7 +53,8 @@ class _DoorcarTabPageState extends State<KeyTasksTabPage> {
|
||||||
),
|
),
|
||||||
AppSectionItem(
|
AppSectionItem(
|
||||||
title: '被检查确认',
|
title: '被检查确认',
|
||||||
icon: 'assets/images/door_ico9.png',
|
icon: 'assets/images/key_tasks_ico3.png',
|
||||||
|
menuPerms:'dashboard:Key-assignment:Key-Task-Application',
|
||||||
badge: 0,
|
badge: 0,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await pushPage(KeyTasksCheckListPage(), context);
|
await pushPage(KeyTasksCheckListPage(), context);
|
||||||
|
|
@ -58,7 +63,8 @@ class _DoorcarTabPageState extends State<KeyTasksTabPage> {
|
||||||
),
|
),
|
||||||
AppSectionItem(
|
AppSectionItem(
|
||||||
title: '隐患整改',
|
title: '隐患整改',
|
||||||
icon: 'assets/images/door_ico9.png',
|
icon: 'assets/images/key_tasks_ico6.png',
|
||||||
|
menuPerms:'dashboard:Key-assignment:Hidden-danger-rectification',
|
||||||
badge: 0,
|
badge: 0,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await pushPage(KeyTasksHiddenDangerList(1), context);
|
await pushPage(KeyTasksHiddenDangerList(1), context);
|
||||||
|
|
@ -67,7 +73,8 @@ class _DoorcarTabPageState extends State<KeyTasksTabPage> {
|
||||||
),
|
),
|
||||||
AppSectionItem(
|
AppSectionItem(
|
||||||
title: '隐患记录',
|
title: '隐患记录',
|
||||||
icon: 'assets/images/door_ico9.png',
|
icon: 'assets/images/key_tasks_ico7.png',
|
||||||
|
menuPerms:'dashboard:Key-assignment:Hidden-Hazard-Record',
|
||||||
badge: 0,
|
badge: 0,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await pushPage(KeyTasksHiddenDangerList(2), context);
|
await pushPage(KeyTasksHiddenDangerList(2), context);
|
||||||
|
|
@ -81,106 +88,32 @@ class _DoorcarTabPageState extends State<KeyTasksTabPage> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _getDoorCarCount() async {
|
Future<void> _getDoorCarCount() async {
|
||||||
// try {
|
try {
|
||||||
// final result = await DoorAndCarApi.getDoorCarCount();
|
String userId= SessionService.instance.accountId??'';
|
||||||
// if (result['success'] ) {
|
final result = await KeyTasksApi.getKeyTasksToDoCount(userId);
|
||||||
// List< dynamic> data = result['data']??[] ;
|
if (result['success'] ) {
|
||||||
//
|
dynamic data = result['data']?? {} ;
|
||||||
// int stakeholderPersonCount =0;
|
|
||||||
// int stakeholderCarCount =0;
|
setState(() {
|
||||||
// int temporaryPersonCount =0;
|
// 重点作业管理
|
||||||
// int temporaryCarCount =0;
|
final gateSection = defaultSections[0];
|
||||||
// int companyCarCount =0;
|
|
||||||
// int closureLongPersonCount =0;
|
// // 重点作业申请
|
||||||
// int closureLongCarCount =0;
|
gateSection.items[0].badge = int.parse(data['zdzysqCount']??0);
|
||||||
// int closureTemporaryPersonCount =0;
|
// 确认
|
||||||
// int closureTemporaryCarCount =0;
|
gateSection.items[1].badge = int.parse(data['bjcrqrCount']??0);
|
||||||
// for(int i=0;i<data.length;i++){
|
// 整改
|
||||||
// if(data[i]['type']=='one_level_person'){
|
gateSection.items[2].badge = int.parse(data['yhdzgCount']??0);
|
||||||
// if(data[i]['belongType']=='3'){
|
|
||||||
// stakeholderPersonCount=data[i]['waitAuditCount']??0;
|
});
|
||||||
// }
|
}
|
||||||
// if(data[i]['belongType']=='4'){
|
// else {
|
||||||
// temporaryPersonCount=data[i]['waitAuditCount']??0;
|
// ToastUtil.showNormal(context, result['errMessage'] ?? "加载数据失败");
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if(data[i]['type']=='one_level_car'){
|
|
||||||
// if(widget.isLoginJGD&&data[i]['belongType']=='2'){
|
|
||||||
// stakeholderCarCount=data[i]['waitAuditCount']??0;
|
|
||||||
// }
|
|
||||||
// if(!widget.isLoginJGD&&data[i]['belongType']=='4'){
|
|
||||||
// temporaryCarCount=data[i]['waitAuditCount']??0;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// if(data[i]['type']=='one_level_car'){//公司车辆审批
|
|
||||||
// if(data[i]['belongType']=='2'){
|
|
||||||
// companyCarCount=data[i]['waitAuditCount']??0;
|
|
||||||
// }
|
|
||||||
// if(data[i]['belongType']=='4'){
|
|
||||||
// companyCarCount=data[i]['waitAuditCount']??0;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if(data[i]['type']=='two_level_person'){
|
|
||||||
// if(data[i]['belongType']=='1'||data[i]['belongType']=='2'||data[i]['belongType']=='3'){
|
|
||||||
// closureLongPersonCount=closureLongPersonCount+((data[i]['waitAuditCount']??0)as int);
|
|
||||||
// }
|
|
||||||
// if(data[i]['belongType']=='4'){
|
|
||||||
// closureTemporaryPersonCount=data[i]['waitAuditCount']??0;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if(data[i]['type']=='two_level_car'){
|
|
||||||
// if(data[i]['belongType']=='1'||data[i]['belongType']=='2'||data[i]['belongType']=='3'){
|
|
||||||
// closureLongCarCount=closureLongCarCount+((data[i]['waitAuditCount']??0)as int);
|
|
||||||
// }
|
|
||||||
// if(data[i]['belongType']=='4'){
|
|
||||||
// closureTemporaryCarCount=data[i]['waitAuditCount']??0;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// setState(() {
|
|
||||||
// // 更新一级口门审核管理的 badge
|
|
||||||
// final gateSection = defaultSections[0];
|
|
||||||
//
|
|
||||||
// // 相关方人员审核
|
|
||||||
// gateSection.items[0].badge = stakeholderPersonCount;
|
|
||||||
// // 相关方车辆审核
|
|
||||||
// gateSection.items[1].badge = stakeholderCarCount;
|
|
||||||
// // 临时访客审核
|
|
||||||
// gateSection.items[3].badge = temporaryPersonCount;
|
|
||||||
// // 临时车辆审核
|
|
||||||
// gateSection.items[4].badge = temporaryCarCount;
|
|
||||||
//
|
|
||||||
// // 公司车辆审核
|
|
||||||
// gateSection.items[7].badge = companyCarCount;
|
|
||||||
//
|
|
||||||
// // 如果有封闭区域审核管理部分(非JGD用户)
|
|
||||||
// if (!widget.isLoginJGD && defaultSections.length > 2) {
|
|
||||||
// final closureSection = defaultSections[2];
|
|
||||||
// // 长期人员审核
|
|
||||||
// closureSection.items[0].badge = closureLongPersonCount;
|
|
||||||
// // 长期车辆审核
|
|
||||||
// closureSection.items[1].badge = closureLongCarCount;
|
|
||||||
// // 临时访客审核
|
|
||||||
// closureSection.items[2].badge = closureTemporaryPersonCount;
|
|
||||||
// // 临时车辆审核
|
|
||||||
// closureSection.items[3].badge = closureTemporaryCarCount;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// // else {
|
|
||||||
// // ToastUtil.showNormal(context, result['errMessage'] ?? "加载数据失败");
|
|
||||||
// // }
|
|
||||||
// } catch (e) {
|
|
||||||
// LoadingDialogHelper.hide();
|
|
||||||
// print('加载数据失败:$e');
|
|
||||||
// }
|
// }
|
||||||
|
} catch (e) {
|
||||||
|
LoadingDialogHelper.hide();
|
||||||
|
print('加载数据失败:$e');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -191,12 +124,28 @@ class _DoorcarTabPageState extends State<KeyTasksTabPage> {
|
||||||
const double iconOverlapBanner = 30.0;
|
const double iconOverlapBanner = 30.0;
|
||||||
|
|
||||||
// 过滤掉没有可见 items 的分组
|
// 过滤掉没有可见 items 的分组
|
||||||
final visibleSections = defaultSections
|
// final visibleSections = defaultSections
|
||||||
.map((s) => AppSection(
|
// .map((s) => AppSection(
|
||||||
title: s.title,
|
// title: s.title,
|
||||||
items: s.items.where((it) => it.visible).toList()))
|
// items: s.items.where((it) => it.visible).toList()))
|
||||||
.where((s) => s.items.isNotEmpty)
|
// .where((s) => s.items.isNotEmpty)
|
||||||
.toList();
|
// .toList();
|
||||||
|
final routeService = RouteService();
|
||||||
|
|
||||||
|
return AnimatedBuilder(
|
||||||
|
animation: routeService,
|
||||||
|
builder: (context, _)
|
||||||
|
{
|
||||||
|
final rebuiltVisibleSections = defaultSections.map((section) {
|
||||||
|
final visibleItems = section.items.where((item) {
|
||||||
|
return item.visible && routeService.hasPerm(item.menuPerms);
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
return AppSection(
|
||||||
|
title: section.title,
|
||||||
|
items: visibleItems,
|
||||||
|
);
|
||||||
|
}).where((section) => section.items.isNotEmpty).toList();
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
|
|
@ -222,13 +171,15 @@ class _DoorcarTabPageState extends State<KeyTasksTabPage> {
|
||||||
right: 10,
|
right: 10,
|
||||||
top: bannerHeight - iconOverlapBanner,
|
top: bannerHeight - iconOverlapBanner,
|
||||||
height: iconSectionHeight,
|
height: iconSectionHeight,
|
||||||
child: _buildIconSection(context, visibleSections),
|
child: _buildIconSection(context, rebuiltVisibleSections),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue