Compare commits

...

2 Commits

Author SHA1 Message Date
hs e86a91fc19 Merge remote-tracking branch 'origin/main' 2025-09-08 18:04:48 +08:00
hs f0ecc31e27 。。。 2025-09-08 18:04:44 +08:00
36 changed files with 643 additions and 169 deletions

View File

@ -1,6 +1,7 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:qhd_prevention/customWidget/custom_button.dart'; import 'package:qhd_prevention/customWidget/custom_button.dart';
import 'package:qhd_prevention/customWidget/single_image_viewer.dart'; import 'package:qhd_prevention/customWidget/single_image_viewer.dart';
import 'package:qhd_prevention/pages/main_tab.dart'; import 'package:qhd_prevention/pages/main_tab.dart';
@ -54,8 +55,8 @@ class _PromisePageState extends State<PromisePage> {
resolved['TEXT'] = payload['TEXT']?.toString() ?? ''; resolved['TEXT'] = payload['TEXT']?.toString() ?? '';
} }
resolved['DETAIL'] = DETAIL; resolved['DETAIL'] = DETAIL;
resolved['SIGNTIME'] = resolved['SIGNTIME'] = DateFormat('yyyy-MM-dd').format(DateTime.now());
DateTime.now().millisecondsSinceEpoch.toString();
resolved['COVERPEOPLE'] = resolved['COVERPEOPLE'] =
(payload['COVERPEOPLE'] is List && payload['COVERPEOPLE'].isNotEmpty) (payload['COVERPEOPLE'] is List && payload['COVERPEOPLE'].isNotEmpty)
? payload['COVERPEOPLE'][0]['USERNAME']?.toString() ?? '' ? payload['COVERPEOPLE'][0]['USERNAME']?.toString() ?? ''

View File

@ -28,8 +28,6 @@ class ApiService {
static const String basePath = "http://192.168.20.240:8500/integrated_whb"; static const String basePath = "http://192.168.20.240:8500/integrated_whb";
// static const String basePath = "http://192.168.0.45:28199";// // static const String basePath = "http://192.168.0.45:28199";//
// static const String basePath = "http://192.168.0.37:8099/api";
/// ///
static const String baseImgPath = "https://file.zcloudchina.com/YTHFile"; static const String baseImgPath = "https://file.zcloudchina.com/YTHFile";

View File

@ -37,10 +37,12 @@ class _PunishmentManagerDetailPageState extends State<PunishmentManagerDetailPag
} }
Future<void> _getData() async { Future<void> _getData() async {
LoadingDialogHelper.show();
final result = await ApiService.getKeyprojectDangerFindHidden( final result = await ApiService.getKeyprojectDangerFindHidden(
widget.info['HIDDEN_ID'] ?? '', widget.info['HIDDEN_ID'] ?? '',
widget.info['OUTSOURCED_ID'] ?? '', widget.info['OUTSOURCED_ID'] ?? '',
); );
LoadingDialogHelper.hide();
try { try {
setState(() { setState(() {
hiddenForm = result['pd'] ?? {}; hiddenForm = result['pd'] ?? {};
@ -116,12 +118,12 @@ class _PunishmentManagerDetailPageState extends State<PunishmentManagerDetailPag
presentOpaque( presentOpaque(
SingleImageViewer( SingleImageViewer(
imageUrl: imageUrl:
'${ApiService.baseImgPath}${_getServerPath(punishForm['HANDLE_IMG'])[index]}', '${ApiService.baseImgPath}${punishForm['HANDLE_IMG']}',
), ),
context, context,
); );
}, },
imageUrls: punishForm['HANDLE_IMG'], imageUrls: [punishForm['HANDLE_IMG'] ?? ''],
), ),
const Divider(), const Divider(),
ItemListWidget.multiLineTitleTextField( ItemListWidget.multiLineTitleTextField(

View File

@ -112,14 +112,17 @@ class _PunishmentManagerPageState extends State<PunishmentManagerPage>
Future<void> _keyprojectPunishAdd(Map<String, dynamic> form) async { Future<void> _keyprojectPunishAdd(Map<String, dynamic> form) async {
try { try {
if (form['ISPUNISH'] == 1) { LoadingDialogHelper.show();
if (form['ISPUNISH'] == "1") {
final result = await ApiService.keyprojectpunishAdd(form); final result = await ApiService.keyprojectpunishAdd(form);
LoadingDialogHelper.hide();
if (result['result'] == 'success') { if (result['result'] == 'success') {
await ApiService.keyprojectPunishEdit(form, '1'); await ApiService.keyprojectPunishEdit(form, '1');
_getDataWithIndex(_selectedTab); _getDataWithIndex(_selectedTab);
} }
}else{ }else{
await ApiService.keyprojectPunishEdit(form, '2'); await ApiService.keyprojectPunishEdit(form, '2');
LoadingDialogHelper.hide();
_getDataWithIndex(_selectedTab); _getDataWithIndex(_selectedTab);
} }

View File

@ -0,0 +1,514 @@
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:qhd_prevention/customWidget/ItemWidgetFactory.dart';
import 'package:qhd_prevention/customWidget/big_video_viewer.dart';
import 'package:qhd_prevention/customWidget/full_screen_video_page.dart';
import 'package:qhd_prevention/customWidget/single_image_viewer.dart';
import 'package:qhd_prevention/http/ApiService.dart';
import 'package:qhd_prevention/pages/app/danger_wait_list_page.dart';
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';
import 'dart:convert';
import 'package:video_player/video_player.dart';
class SafecheckAcceptancePage extends StatefulWidget {
const SafecheckAcceptancePage(this.dangerType, this.item, {Key? key}) : super(key: key);
final DangerType dangerType;
final item;
@override
_SafecheckAcceptancePageState createState() => _SafecheckAcceptancePageState();
}
class _SafecheckAcceptancePageState extends State<SafecheckAcceptancePage> {
late Map<String, dynamic> pd = {};
late Map<String, dynamic> hs = {};
List<String> files = [];
List<String> files2 = [];
List<String> files4 = [];
List<String> files5 = [];
List<dynamic> files6 = [];
List<dynamic> videoList = [];
List<dynamic> checkList = [];
List<String> files7 = [];
bool modalShow = false;
String videoSrc = "";
VideoPlayerController? _videoController;
@override
void initState() {
super.initState();
if("2"==widget.item['HIDDEN_RISKSTANDARD']){
getDataTwo();
}else {
getData();
}
}
@override
void dispose() {
_videoController?.dispose();
super.dispose();
}
Future<void> getData() async {
try {
final data = await ApiService.getDangerDetail(widget.item['HIDDEN_ID']);
if (data['result'] == 'success') {
setState(() {
pd = data['pd'];
hs = data['hs'] ?? {};
//
for (var img in data['hImgs']) {
if (img['FILEPATH'].toString().endsWith('.mp4')) {
videoList.add(img);
} else {
files.add(img["FILEPATH"]);
}
}
// List<dynamic> filesZheng = data['rImgs'] ?? [];
for (var img in data['rImgs']) {
files2.add(img["FILEPATH"]);
}
// files2=data['rImgs'] ?? [];
// files4 = data['sImgs'] ?? [];
for (var img in data['sImgs']) {
files4.add(img["FILEPATH"]);
}
// files5 = data['pImgs'] ?? [];
for (var img in data['pImgs']) {
files5.add(img["FILEPATH"]);
}
files6 = data['yImgs'] ?? [];
checkList = data['checkList'] ?? [];
if(checkList.isNotEmpty) {
for (var img in checkList[0]['cImgs']) {
files7.add(img["FILEPATH"]);
}
}
});
}else{
getDataTwo();
}
} catch (e) {
print('Error fetching data: $e');
}
}
Future<void> getDataTwo() async {
try {
final data = await ApiService.getDangerDetailTwo(widget.item['HIDDEN_ID']);
if (data['result'] == 'success') {
setState(() {
pd = data['pd'];
hs = data['hs'] ?? {};
//
for (var img in data['hImgs']) {
if (img['FILEPATH'].toString().endsWith('.mp4')) {
videoList.add(img);
} else {
files.add(img["FILEPATH"]);
}
}
// List<dynamic> filesZheng = data['rImgs'] ?? [];
for (var img in data['rImgs']) {
files2.add(img["FILEPATH"]);
}
// files2=data['rImgs'] ?? [];
// files4 = data['sImgs'] ?? [];
for (var img in data['sImgs']) {
files4.add(img["FILEPATH"]);
}
// files5 = data['pImgs'] ?? [];
for (var img in data['pImgs']) {
files5.add(img["FILEPATH"]);
}
files6 = data['yImgs'] ?? [];
checkList = data['checkList'] ?? [];
if(checkList.isNotEmpty) {
for (var img in checkList[0]['cImgs']) {
files7.add(img["FILEPATH"]);
}
}
});
}
} catch (e) {
print('Error fetching data: $e');
}
}
Widget _buildInfoItem(String title, String value) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: 120,
child: Text(
title,
style: const TextStyle(fontWeight: FontWeight.bold),
),
),
Expanded(child: Text(value,textAlign: TextAlign.right,)),
],
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppbar(title: widget.dangerType.detailTitle),
body: pd.isEmpty
? const Center(child: CircularProgressIndicator())
: LayoutBuilder(
builder: (context, constraints) {
return SingleChildScrollView(
child: ConstrainedBox(
constraints: BoxConstraints(
minHeight: constraints.maxHeight,
),
child: Padding(
padding: const EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Card(
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildInfoItem('隐患描述', pd['HIDDENDESCR'] ?? ''),
Divider(height: 1),
//
_buildInfoItem('隐患来源', _getSourceText(pd['SOURCE'])),
Divider(height: 1),
//
if (pd['SOURCE'] == '2') ...[
_buildInfoItem('风险点(单元)', pd['RISK_UNIT'] ?? ''),
Divider(height: 1),
_buildInfoItem('辨识部位', pd['IDENTIFICATION'] ?? ''),
Divider(height: 1),
_buildInfoItem('存在风险', pd['RISK_DESCR'] ?? ''),
Divider(height: 1),
_buildInfoItem('风险分级', pd['LEVEL'] ?? ''),
Divider(height: 1),
_buildInfoItem('检查内容', pd['CHECK_CONTENT'] ?? ''),
Divider(height: 1),
],
_buildInfoItem('隐患部位', pd['HIDDENPART'] ?? ''),
Divider(height: 1),
_buildInfoItem('发现人', pd['CREATORNAME'] ?? ''),
Divider(height: 1),
_buildInfoItem('发现时间', pd['CREATTIME'] ?? ''),
Divider(height: 1),
if (pd['HIDDEN_CATEGORY']?.isNotEmpty == true)
_buildInfoItem('隐患类别', pd['HIDDEN_CATEGORY_NAME'] ?? ''),
_buildInfoItem('隐患类型', pd['HIDDENTYPE_NAME'] ?? ''),
Divider(height: 1),
_buildInfoItem('整改类型', _getRectificationType(pd['RECTIFICATIONTYPE'])),
if (pd['RECTIFICATIONTYPE'] == '2')
_buildInfoItem('整改期限', pd['RECTIFICATIONDEADLINE'] ?? ''),
Divider(height: 1),
//
// const Text('隐患照片', style: TextStyle(fontWeight: FontWeight.bold)),
// _buildImageGrid(files, onTap: (index) => _showImageGallery(files, index)),
ListItemFactory.createTextImageItem(
text: "隐患照片",
imageUrls: files,
horizontalPadding:10,
onImageTapped: (index) {
presentOpaque(
SingleImageViewer(imageUrl:ApiService.baseImgPath + files[index]),
context,
);
},
),
//
if (videoList.isNotEmpty) ...[
SizedBox(height: 10),
Padding(
padding: EdgeInsets.only(left: 10,right: 10),
child: Text('隐患视频', style: TextStyle(fontWeight: FontWeight.bold)),
),
GestureDetector(
onTap: () {
showDialog(
context: context,
barrierColor: Colors.black54,
builder: (_) => VideoPlayerPopup(videoUrl: ApiService.baseImgPath + videoList[0]['FILEPATH']),
);
// present(
// BigVideoViewer(videoUrl:ApiService.baseImgPath + videoList[0]['FILEPATH']),
// context,
// );
},
// => _playVideo(ApiService.baseImgPath + videoList[0]['FILEPATH']),
child: Image.asset(
'assets/image/videostart.png', //
color: Colors.blue,
width: 120,
height: 120,
),
),
],
],
),
),
//
if (pd['STATE'] != null && int.parse(pd['STATE']) >= 2 && int.parse(pd['STATE']) <= 4) ...[
SizedBox(height: 10,),
// const Divider(height: 10,color: Colors.grey,),
Card(
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(top: 10,left: 10,right: 10),
child: Row(
children: [
Container(width: 3, height: 15, color: Colors.blue),
const SizedBox(width: 8),
Text(
"整改信息",
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
],
),
),
// const Text('整改信息', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
Divider(height: 1),
_buildInfoItem('整改描述', pd['RECTIFYDESCR'] ?? ''),
Divider(height: 1),
_buildInfoItem('整改部门', pd['RECTIFICATIONDEPTNAME'] ?? ''),
Divider(height: 1),
_buildInfoItem('整改人', pd['RECTIFICATIONORNAME'] ?? ''),
Divider(height: 1),
_buildInfoItem('整改时间', pd['RECTIFICATIONTIME'] ?? ''),
Divider(height: 1),
// const Text('整改后图片', style: TextStyle(fontWeight: FontWeight.bold)),
// _buildImageGrid(files2, onTap: (index) => _showImageGallery(files2, index)),
ListItemFactory.createTextImageItem(
text: "整改后图片",
imageUrls: files2,
horizontalPadding: 10,
onImageTapped: (index) {
presentOpaque(
SingleImageViewer(imageUrl: ApiService.baseImgPath +files2[index]),
context,
);
},
),
Divider(height: 1),
_buildInfoItem('整改方案', pd['HAVESCHEME']=="1" ? '':''),
Divider(height: 1),
if(pd['HAVESCHEME']=="1")
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildInfoItem('排查日期', hs['SCREENINGDATE'] ?? ''),
Divider(height: 1),
_buildInfoItem('隐患清单', hs['LISTNAME'] ?? ''),
Divider(height: 1),
_buildInfoItem('治理标准要求', hs['GOVERNSTANDARDS'] ?? ''),
Divider(height: 1),
_buildInfoItem('治理方法', hs['GOVERNMETHOD'] ?? ''),
Divider(height: 1),
_buildInfoItem('经费和物资的落实', hs['EXPENDITURE'] ?? ''),
Divider(height: 1),
_buildInfoItem('负责治理人员', hs['PRINCIPAL'] ?? ''),
Divider(height: 1),
_buildInfoItem('工时安排', hs['PROGRAMMING'] ?? ''),
Divider(height: 1),
_buildInfoItem('时限要求', hs['TIMELIMITFOR'] ?? ''),
Divider(height: 1),
_buildInfoItem('工作要求', hs['JOBREQUIREMENT'] ?? ''),
Divider(height: 1),
_buildInfoItem('其他事项', hs['OTHERBUSINESS'] ?? ''),
Divider(height: 1),
ListItemFactory.createTextImageItem(
text: "方案图片",
imageUrls: files4,
horizontalPadding: 10,
onImageTapped: (index) {
presentOpaque(
SingleImageViewer(imageUrl: ApiService.baseImgPath +files2[index]),
context,
);
},
),
],
),
Divider(height: 1),
_buildInfoItem('整改计划', pd['HAVEPLAN']=="1" ? '':''),
Divider(height: 1),
if(pd['HAVEPLAN']=="1")
ListItemFactory.createTextImageItem(
text: "计划图片",
imageUrls: files2,
horizontalPadding: 10,
onImageTapped: (index) {
presentOpaque(
SingleImageViewer(imageUrl: ApiService.baseImgPath +files2[index]),
context,
);
},
),
],
),
),
// ...
],
//
if ((6==widget.dangerType.index||1==widget.dangerType.index||0==widget.dangerType.index)&&checkList.isNotEmpty) ...[
// const Divider(height: 10,color: Colors.grey,),
SizedBox(height: 10,),
Card(
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(top: 10,left: 10,right: 10),
child:
Row(
children: [
Container(width: 3, height: 15, color: Colors.blue),
const SizedBox(width: 8),
Text(
"验收信息",
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
],
),
),
// const Text('整改信息', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
Divider(height: 1),
_buildInfoItem('验收描述', checkList[0]['CHECKDESCR'] ?? ''),
Divider(height: 1),
_buildInfoItem('是否合格',_getText (checkList[0]['STATUS'] )),
Divider(height: 1),
_buildInfoItem('验收部门', checkList[0]['CHECKDEPTNAME'] ?? ''),
Divider(height: 1),
_buildInfoItem('验收部门负责人', checkList[0]['CHECKORNAME'] ?? ''),
Divider(height: 1),
_buildInfoItem('验收时间', checkList[0]['CHECK_TIME'] ?? ''),
Divider(height: 1),
// const Text('整改后图片', style: TextStyle(fontWeight: FontWeight.bold)),
// _buildImageGrid(files2, onTap: (index) => _showImageGallery(files2, index)),
ListItemFactory.createTextImageItem(
text: "验收图片",
imageUrls: files7,
horizontalPadding: 10,
onImageTapped: (index) {
presentOpaque(
SingleImageViewer(imageUrl: ApiService.baseImgPath +files5[index]),
context,
);
},
),
],
),
),
],
//
SizedBox(height: MediaQuery.of(context).padding.bottom + 20),
],
),
),
),
);
},
),
);
}
String _getText(String source) {
if(source.isNotEmpty){
if(source=="1"){
return "";
}else{
return "";
}
}else{
return "";
}
}
String _getSourceText(String? source) {
switch (source) {
case '1': return '隐患快报';
case '2': return '隐患排查清单检查';
case '3': return '标准排查清单检查';
case '4': return '专项检查';
case '5': return '安全检查';
case '6': return 'NFC设备巡检';
default: return '';
}
}
String _getRectificationType(String? type) {
switch (type) {
case '1': return '立即整改';
case '2': return '限期整改';
default: return '';
}
}
}

View File

@ -1,5 +1,7 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:qhd_prevention/pages/app/danger_wait_list_page.dart';
import 'package:qhd_prevention/pages/home/SafeCheck/DangeCheck/safeCheck_acceptance_page.dart';
import 'package:qhd_prevention/pages/home/SafeCheck/DangeCheck/safeCheck_assignment_detail_page.dart'; import 'package:qhd_prevention/pages/home/SafeCheck/DangeCheck/safeCheck_assignment_detail_page.dart';
import 'package:qhd_prevention/pages/my_appbar.dart'; import 'package:qhd_prevention/pages/my_appbar.dart';
import 'package:qhd_prevention/tools/tools.dart'; import 'package:qhd_prevention/tools/tools.dart';
@ -124,7 +126,7 @@ class _SafecheckAssignmentListState extends State<SafecheckAssignmentList> {
// //
void _goAccept(Map<String, dynamic> item) async { void _goAccept(Map<String, dynamic> item) async {
// await pushPage(SafecheckSignDetail(INSPECTION_ID: item['INSPECTION_ID'] ?? '', INSPECTION_INSPECTOR_ID: item['INSPECTION_INSPECTOR_ID'] ?? '',isEdit: false), context); await pushPage(SafecheckAcceptancePage(DangerType.waitAcceptance, item), context);
_fetchData(); _fetchData();
@ -242,8 +244,7 @@ class _SafecheckAssignmentListState extends State<SafecheckAssignmentList> {
), ),
if (item['CREATOR'] == SessionService.instance.loginUserId && if (item['CREATOR'] == SessionService.instance.loginUserId &&
(item['HIDDEN_STATUS'] == '4' || item['HIDDEN_STATUS'] == '8') && (item['HIDDEN_STATUS'] == '4' || item['HIDDEN_STATUS'] == '8') &&
(item['HIDDEN_STATUS'] == '4' || item['HIDDEN_STATUS'] == '8') && (!FormUtils.hasValue(item, 'FINAL_CHECK') || item['FINAL_CHECK'] == '2'))
FormUtils.hasValue(item, 'FINAL_CHECK'))
CustomButton( CustomButton(
text: '验收', text: '验收',
height: 32, height: 32,

View File

@ -80,7 +80,7 @@ class _SafecheckDangerListPageState extends State<SafecheckDangerListPage> {
try { try {
final data = { final data = {
'INSPECTION_STATUS': sindex > 0 ? stepList[sindex]['id'] : '', 'INSPECTION_STATUS': sindex > 0 ? stepList[sindex]['id'] : '3-7',
'ARCHIVE_USER_ID': SessionService.instance.loginUserId, 'ARCHIVE_USER_ID': SessionService.instance.loginUserId,
'KEYWORDS': searchKeywords, 'KEYWORDS': searchKeywords,
}; };
@ -129,10 +129,8 @@ class _SafecheckDangerListPageState extends State<SafecheckDangerListPage> {
/// ///
void _goAccept(Map<String, dynamic> item) async { void _goAccept(Map<String, dynamic> item) async {
// await pushPage(SafecheckSignDetail(INSPECTION_ID: item['INSPECTION_ID'] ?? '', INSPECTION_INSPECTOR_ID: item['INSPECTION_INSPECTOR_ID'] ?? '',isEdit: false), context); await pushPage(SafecheckAssignmentList(INSPECTION_ID: item['INSPECTION_ID'] ?? ''), context);
_fetchData(); _fetchData();
} }
Widget _buildFlowStepItem({ Widget _buildFlowStepItem({

View File

@ -379,7 +379,7 @@ class _SafecheckStartDetailState extends State<SafecheckStartDetail> {
} }
seenIds.add(id); seenIds.add(id);
} else { } else {
// ID uniapp // ID
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '有检查人未选择数据,请选择'); ToastUtil.showNormal(context, '有检查人未选择数据,请选择');
return; return;

View File

@ -6,9 +6,7 @@ import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
import 'package:qhd_prevention/customWidget/promise/promise_page.dart'; import 'package:qhd_prevention/customWidget/promise/promise_page.dart';
import 'package:qhd_prevention/customWidget/toast_util.dart'; import 'package:qhd_prevention/customWidget/toast_util.dart';
import 'package:qhd_prevention/pages/home/scan_page.dart'; import 'package:qhd_prevention/pages/home/scan_page.dart';
import 'package:qhd_prevention/pages/my_appbar.dart';
import 'package:qhd_prevention/services/auth_service.dart'; import 'package:qhd_prevention/services/auth_service.dart';
import 'package:qhd_prevention/services/location_service.dart';
import 'package:qhd_prevention/tools/coord_convert.dart'; import 'package:qhd_prevention/tools/coord_convert.dart';
import 'package:qhd_prevention/tools/update/update_dialogs.dart'; import 'package:qhd_prevention/tools/update/update_dialogs.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -548,19 +546,19 @@ class HomePageState extends State<HomePage> {
case 6: // case 6: //
pushPage(SafetyCommitmentPage(), context); pushPage(SafetyCommitmentPage(), context);
break; break;
case 7: case 7: //
pushPage(StudyGardenPage(), context); pushPage(StudyGardenPage(), context);
break; break;
case 9:
pushPage(EquipmentInspectionListPage(), context);
break;
case 8: // case 8: //
await pushPage(SafecheckTabList(), context); await pushPage(SafecheckTabList(), context);
break; break;
case 10: case 9: //
pushPage(EquipmentInspectionListPage(), context);
break;
case 10: //
pushPage(SafetyMeetingListPage(), context); pushPage(SafetyMeetingListPage(), context);
break; break;
case 11: case 11: // NFC
pushPage(HomeNfcListPage(), context); pushPage(HomeNfcListPage(), context);
break; break;
} }
@ -740,13 +738,13 @@ class HomePageState extends State<HomePage> {
Text( Text(
title, title,
style: const TextStyle( style: const TextStyle(
fontSize: 14, fontSize: 13,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
const SizedBox(height: 4), const SizedBox(height: 2),
Text( Text(
subtitle, subtitle,
style: const TextStyle(fontSize: 13, color: Colors.black), style: const TextStyle(fontSize: 13, color: Colors.black),

View File

@ -127,27 +127,17 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
for (Map<String, dynamic> img in signList) { for (Map<String, dynamic> img in signList) {
String imgName = 'file${data.key}'; String imgName = 'file${data.key}';
if (data.filePath!.contains('uploadFiles')) { if (data.filePath!.contains('uploadFiles')) {
// final idata = {
// 'filePath': data.filePath,
// 'SIGNER_TIME': data.SIGNER_TIME,
// 'key': data.key,
// };
final idata = { final idata = {
'SIGN_PATH': data.filePath, 'filePath': data.filePath,
'SIGN_TIME': data.SIGNER_TIME, 'SIGNER_TIME': data.SIGNER_TIME,
'key': data.key, 'key': data.key,
}; };
sineImageList.add(idata); sineImageList.add(idata);
} }
if (imgName == img['key']) { if (imgName == img['key']) {
// final idata = {
// 'filePath': img['filePath'] ?? '',
// 'SIGNER_TIME': data.SIGNER_TIME,
// 'key': data.key,
// };
final idata = { final idata = {
'SIGN_PATH': img['filePath'] ?? '', 'filePath': img['filePath'] ?? '',
'SIGN_TIME': data.SIGNER_TIME, 'SIGNER_TIME': data.SIGNER_TIME,
'key': data.key, 'key': data.key,
}; };
sineImageList.add(idata); sineImageList.add(idata);

View File

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

View File

@ -266,11 +266,17 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> {
const Divider(), const Divider(),
], ],
ItemListWidget.singleLineTitleText( ItemListWidget.singleLineTitleText(
label: '申请部门', label: '作业申请单位',
isEditable: false, isEditable: false,
text: pd['APPLY_DEPARTMENT_NAME'] ?? '', text: pd['APPLY_DEPARTMENT_NAME'] ?? '',
), ),
const Divider(), const Divider(),
ItemListWidget.singleLineTitleText(
label: '申请人:',
isEditable: false,
text: pd['APPLY_USER_NAME'] ?? '',
),
const Divider(),
ItemListWidget.singleLineTitleText( ItemListWidget.singleLineTitleText(
label: '涉及相关单位(部门):', label: '涉及相关单位(部门):',
@ -288,26 +294,6 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> {
text: pd['WORK_REASON'] ?? '', text: pd['WORK_REASON'] ?? '',
), ),
const Divider(), const Divider(),
if (!widget.isEditable && FormUtils.hasValue(pd, 'WORK_CONTENT')) ...[
ItemListWidget.singleLineTitleText(
label: '断路地段示意图相关说明:',
isEditable: false,
text: pd['WORK_CONTENT'] ?? '',
),
const Divider(),
],
if (!widget.isEditable && FormUtils.hasValue(pd, 'CONTENT_IMG_PATH')) ...[
ItemListWidget.twoRowTitleAndImages(
onTapCallBack: (val) {
presentOpaque(SingleImageViewer(imageUrl: val), context);
},
title: '断路地段示意图:',
imageUrls: pd['CONTENT_IMG_PATH'],
),
const Divider(),
],
ItemListWidget.twoRowButtonTitleText( ItemListWidget.twoRowButtonTitleText(
label: '关联其他特殊作业及安全作业票编号', label: '关联其他特殊作业及安全作业票编号',
isRequired: false, isRequired: false,
@ -333,6 +319,25 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> {
text: pd['SPECIAL_WORK'] ?? '', text: pd['SPECIAL_WORK'] ?? '',
), ),
const Divider(), const Divider(),
if (!widget.isEditable && FormUtils.hasValue(pd, 'WORK_CONTENT')) ...[
ItemListWidget.singleLineTitleText(
label: '断路地段示意图(可另附图)及相关说明:',
isEditable: false,
text: pd['WORK_CONTENT'] ?? '',
),
const Divider(),
],
if (!widget.isEditable && FormUtils.hasValue(pd, 'CONTENT_IMG_PATH')) ...[
ItemListWidget.twoRowTitleAndImages(
onTapCallBack: (val) {
presentOpaque(SingleImageViewer(imageUrl: val), context);
},
title: '断路地段示意图:',
imageUrls: pd['CONTENT_IMG_PATH'],
),
const Divider(),
],
ItemListWidget.twoRowButtonTitleText( ItemListWidget.twoRowButtonTitleText(
label: '风险辨识结果', label: '风险辨识结果',
isEditable: widget.isEditable, isEditable: widget.isEditable,
@ -357,23 +362,6 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> {
text: pd['RISK_IDENTIFICATION'] ?? '', text: pd['RISK_IDENTIFICATION'] ?? '',
), ),
const Divider(), const Divider(),
ItemListWidget.selectableLineTitleTextRightButton(
label: '视频监控:',
isClean: widget.isEditable,
cleanText: '清除监控',
onTapClean: () {
setState(() {
pd['VIDEONAME'] = '';
pd['VIDEOMANAGER_ID'] = '';
});
},
isRequired: false,
isEditable: widget.isEditable,
onTap: widget.onChooseVideoManager ?? () {},
text: pd['VIDEONAME'] ?? '',
),
const Divider(),
ItemListWidget.selectableLineTitleTextRightButton( ItemListWidget.selectableLineTitleTextRightButton(
label: '预计作业开始时间:', label: '预计作业开始时间:',
isEditable: widget.isEditable, isEditable: widget.isEditable,
@ -468,12 +456,29 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> {
hintText: '', hintText: '',
text: pd['LATITUDE_LONGITUDE'] ?? (widget.isEditable ? '' : ''), text: pd['LATITUDE_LONGITUDE'] ?? (widget.isEditable ? '' : ''),
), ),
const Divider(),
ItemListWidget.selectableLineTitleTextRightButton(
label: '作业视频监控:',
isClean: widget.isEditable,
cleanText: '清除监控',
onTapClean: () {
setState(() {
pd['VIDEONAME'] = '';
pd['VIDEOMANAGER_ID'] = '';
});
},
isRequired: false,
isEditable: widget.isEditable,
onTap: widget.onChooseVideoManager ?? () {},
text: pd['VIDEONAME'] ?? '',
),
if (widget.signs != null && FormUtils.hasValue(widget.signs, 'PROJECT_MANAGER')) if (widget.signs != null && FormUtils.hasValue(widget.signs, 'PROJECT_MANAGER'))
Column( Column(
children: [ children: [
Divider(), Divider(),
signItemWidget('PROJECT_MANAGER', 'PROJECT_MANAGER_USER_NAME', '作业项目负责人', context), signItemWidget('PROJECT_MANAGER', 'PROJECT_MANAGER_USER_NAME', '断路示意图负责人签字', context),
], ],
) )
], ],

View File

@ -58,7 +58,6 @@ class _CutroadListPageState extends State<CutroadListPage> {
void initState() { void initState() {
super.initState(); super.initState();
_fetchSteps(); _fetchSteps();
_fetchData();
_scrollController.addListener(_onScroll); _scrollController.addListener(_onScroll);
} }
@ -80,25 +79,31 @@ class _CutroadListPageState extends State<CutroadListPage> {
} }
Future<void> _fetchSteps() async { Future<void> _fetchSteps() async {
try { try {
final response = await ApiService.searchGetTaskSetps(1); LoadingDialogHelper.show();
final response = await ApiService.searchGetTaskSetps(12);
setState(() { setState(() {
stepList = [ stepList = [
{'STEP_NAME': '全部', 'STEP_ID': ''}, {'STEP_NAME': '全部', 'STEP_ID': ''},
...response['list'] ?? [], ...response['list'] ?? [],
{"STEP_NAME": "验收归档",
"STEP_ID": "99"}
]; ];
_fetchData();
}); });
} catch (e) { } catch (e) {
print('Error fetching steps: $e'); print('Error fetching steps: $e');
LoadingDialogHelper.hide();
} }
} }
Future<void> _fetchData() async { Future<void> _fetchData() async {
if (isLoading) return; int code = 0;
setState(() => isLoading = true); for (Map item in stepList) {
if (item['STEP_NAME'] == widget.flow) {
code = item['STEP_ID'] ?? 0;
}
}
try { try {
final data = { final data = {
'CREATOR': 'CREATOR':
@ -107,12 +112,14 @@ class _CutroadListPageState extends State<CutroadListPage> {
widget.flow == '气体检测' ? SessionService.instance.loginUserId : '', widget.flow == '气体检测' ? SessionService.instance.loginUserId : '',
'STEP_NAME': 'STEP_NAME':
(widget.flow == '提交申请' || widget.flow == '气体检测') ? '' : widget.flow, (widget.flow == '提交申请' || widget.flow == '气体检测') ? '' : widget.flow,
'STEP_CODE': code,
'STEP_ID': sindex > 0 ? stepList[sindex]['STEP_ID'] : '', 'STEP_ID': sindex > 0 ? stepList[sindex]['STEP_ID'] : '',
'KEYWORDS': searchKeywords, 'KEYWORDS': searchKeywords,
'WORK_STATE': '0', 'WORK_STATE': '0',
}; };
final url = '/app/cutroad/list?showCount=-1&currentPage=$currentPage'; final url = '/app/cutroad/list?showCount=-1&currentPage=$currentPage';
final response = await ApiService.specialCheckListWorkCount(data, url); final response = await ApiService.specialCheckListWorkCount(data, url);
LoadingDialogHelper.hide();
setState(() { setState(() {
if (currentPage == 1) { if (currentPage == 1) {
@ -178,7 +185,7 @@ class _CutroadListPageState extends State<CutroadListPage> {
case '提交申请': case '提交申请':
await pushPage(CutroadApplyDetail(CUTROAD_ID: item['CUTROAD_ID'], flow: widget.flow), context); await pushPage(CutroadApplyDetail(CUTROAD_ID: item['CUTROAD_ID'], flow: widget.flow), context);
break; break;
case '作业项目负责人': case '断路示意图负责人':
await pushPage(CutroadZyrDetail(CUTROAD_ID: item['CUTROAD_ID'], flow: widget.flow), context); await pushPage(CutroadZyrDetail(CUTROAD_ID: item['CUTROAD_ID'], flow: widget.flow), context);
break; break;
case '设置安全措施确认人': case '设置安全措施确认人':
@ -225,7 +232,6 @@ class _CutroadListPageState extends State<CutroadListPage> {
} }
setState(() { setState(() {
_fetchSteps(); _fetchSteps();
_fetchData();
}); });
// Navigator.pushNamed( // Navigator.pushNamed(
// context, // context,
@ -329,7 +335,7 @@ class _CutroadListPageState extends State<CutroadListPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text("申请人: ${item['APPLY_USER_NAME'] ?? ''}"), Text("申请人: ${item['APPLY_USER_NAME'] ?? ''}"),
Expanded(child: Text("作业项目负责人: ${item['PROJECT_MANAGER_USER_NAME'] ?? ''}",softWrap: true, Expanded(child: Text("断路示意图负责人: ${item['PROJECT_MANAGER_USER_NAME'] ?? ''}",softWrap: true,
textAlign: TextAlign.right, textAlign: TextAlign.right,
maxLines: null, // maxLines: null, //
overflow: TextOverflow.visible,) overflow: TextOverflow.visible,)

View File

@ -21,13 +21,13 @@ import 'package:qhd_prevention/pages/home/tap/workArea_picker.dart';
enum EditUserType { enum EditUserType {
PROJECT_MANAGER('作业人项目负责单位', '作业人项目负责人', true), PROJECT_MANAGER('断路示意图负责单位', '断路示意图负责人', true),
GUARDIAN('监护人单位', '监护人', true), GUARDIAN('监护人单位', '监护人', true),
CONFESS('安全交底人单位', '安全交底人', true), CONFESS('安全交底人单位', '安全交底人', true),
ACCEPT_CONFESS('接受交底人单位', '接受交底人', true), ACCEPT_CONFESS('接受交底人单位', '接受交底人', true),
CONFIRM('作业负责人单位', '作业负责人', true), CONFIRM('作业负责人单位', '作业负责人', true),
LEADER('所在单位', '所在单位负责人', true), LEADER('所在单位', '所在单位负责人', true),
AUDIT('安全管理部门', '安全管理部门负责人', true), AUDIT('消防、安全管理部门', '安全管理部门负责人', true),
APPROVE('审批部门', '审批部门负责人', true), APPROVE('审批部门', '审批部门负责人', true),
WORK_START('作业开始负责人单位', '作业开始负责人', true), WORK_START('作业开始负责人单位', '作业开始负责人', true),
WORK_END('作业结束负责人单位', '作业结束负责人', true), WORK_END('作业结束负责人单位', '作业结束负责人', true),
@ -364,6 +364,7 @@ class _CutroadApplyDetailState extends State<CutroadApplyDetail> {
pd['APPLY_USER_ID'] = SessionService.instance.loginUserId; pd['APPLY_USER_ID'] = SessionService.instance.loginUserId;
pd['APPLY_USER_NAME'] = SessionService.instance.username; pd['APPLY_USER_NAME'] = SessionService.instance.username;
pd['USER_ID'] = SessionService.instance.loginUserId; pd['USER_ID'] = SessionService.instance.loginUserId;
pd['SPECIAL_WORK'] = FormUtils.hasValue(pd, 'SPECIAL_WORK') ? pd['SPECIAL_WORK'] : '';
} }
LoadingDialogHelper.show(); LoadingDialogHelper.show();
@ -390,7 +391,6 @@ class _CutroadApplyDetailState extends State<CutroadApplyDetail> {
} }
} }
/// ---------------------------- -------------------------------- /// ---------------------------- --------------------------------
/// ///
Future<void> _chooseVideoManager() async { Future<void> _chooseVideoManager() async {

View File

@ -22,7 +22,7 @@ class ImageData {
ImageData({required this.localPath, required this.serverPath}); ImageData({required this.localPath, required this.serverPath});
} }
/// ///
class CutroadZyrDetail extends StatefulWidget { class CutroadZyrDetail extends StatefulWidget {
const CutroadZyrDetail({ const CutroadZyrDetail({
super.key, super.key,
@ -294,7 +294,7 @@ setState(() {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: MyAppbar(title: '作业项目负责人意见'), appBar: MyAppbar(title: '断路示意图负责人意见'),
body: SafeArea( body: SafeArea(
child: SingleChildScrollView( child: SingleChildScrollView(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
@ -340,7 +340,7 @@ setState(() {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
ListItemFactory.headerTitle('作业项目负责人'), ListItemFactory.headerTitle('断路示意图负责人签字',isRequired: true),
CustomButton( CustomButton(
text: '新增手写签字', text: '新增手写签字',
height: 36, height: 36,

View File

@ -406,7 +406,7 @@ class _BreakgroundDetailFormWidgetState
const Divider(), const Divider(),
ItemListWidget.selectableLineTitleTextRightButton( ItemListWidget.selectableLineTitleTextRightButton(
label: '视频监控:', label: '作业视频监控:',
isClean: widget.isEditable, isClean: widget.isEditable,
cleanText: '清除监控', cleanText: '清除监控',
onTapClean: () { onTapClean: () {

View File

@ -82,12 +82,11 @@ class _BreakgroundListPageState extends State<BreakgroundListPage> {
Future<void> _fetchSteps() async { Future<void> _fetchSteps() async {
try { try {
final response = await ApiService.searchGetTaskSetps(1); final response = await ApiService.searchGetTaskSetps(9);
setState(() { setState(() {
stepList = [ stepList = [
{'STEP_NAME': '全部', 'STEP_ID': ''}, {'STEP_NAME': '全部', 'STEP_ID': ''},
...response['list'] ?? [], ...response['list'] ?? [],
{"STEP_NAME": "验收归档", "STEP_ID": "99"},
]; ];
}); });
} catch (e) { } catch (e) {

View File

@ -387,7 +387,7 @@ class _HoistworkDetailFormWidgetState extends State<HoistWorkDetailFormWidget> {
), ),
const Divider(), const Divider(),
ItemListWidget.selectableLineTitleTextRightButton( ItemListWidget.selectableLineTitleTextRightButton(
label: '视频监控:', label: '作业视频监控:',
isClean: widget.isEditable, isClean: widget.isEditable,
cleanText: '清除监控', cleanText: '清除监控',
onTapClean: () { onTapClean: () {

View File

@ -84,13 +84,12 @@ class _HoistworkListPageState extends State<HoistworkListPage> {
Future<void> _fetchSteps() async { Future<void> _fetchSteps() async {
try { try {
final response = await ApiService.searchGetTaskSetps(1); final response = await ApiService.searchGetTaskSetps(10);
setState(() { setState(() {
stepList = [ stepList = [
{'STEP_NAME': '全部', 'STEP_ID': ''}, {'STEP_NAME': '全部', 'STEP_ID': ''},
...response['list'] ?? [], ...response['list'] ?? [],
{"STEP_NAME": "验收归档",
"STEP_ID": "99"}
]; ];
}); });
} catch (e) { } catch (e) {

View File

@ -176,7 +176,7 @@ class _HighWorkDetailFormWidgetState extends State<HighWorkDetailFormWidget> {
), ),
const Divider(), const Divider(),
ItemListWidget.selectableLineTitleTextRightButton( ItemListWidget.selectableLineTitleTextRightButton(
label: '视频监控:', label: '作业视频监控:',
isClean: widget.isEditable, isClean: widget.isEditable,
cleanText: '清除监控', cleanText: '清除监控',
onTapClean: () { onTapClean: () {

View File

@ -82,7 +82,7 @@ class _HighworkListPageState extends State<HighworkListPage> {
Future<void> _fetchSteps() async { Future<void> _fetchSteps() async {
try { try {
final response = await ApiService.searchGetTaskSetps(1); final response = await ApiService.searchGetTaskSetps(5);
setState(() { setState(() {
stepList = [ stepList = [
{'STEP_NAME': '全部', 'STEP_ID': ''}, {'STEP_NAME': '全部', 'STEP_ID': ''},

View File

@ -244,7 +244,7 @@ class _ElectricityDetailFormWidgetState extends State<ElectricityDetailFormWidge
const Divider(), const Divider(),
ItemListWidget.selectableLineTitleTextRightButton( ItemListWidget.selectableLineTitleTextRightButton(
label: '视频监控:', label: '作业视频监控:',
isClean: widget.isEditable, isClean: widget.isEditable,
cleanText: '清除监控', cleanText: '清除监控',
onTapClean: () { onTapClean: () {

View File

@ -82,7 +82,7 @@ class _ElectricityListPageState extends State<ElectricityListPage> {
Future<void> _fetchSteps() async { Future<void> _fetchSteps() async {
try { try {
final response = await ApiService.searchGetTaskSetps(1); final response = await ApiService.searchGetTaskSetps(8);
setState(() { setState(() {
stepList = [ stepList = [
{'STEP_NAME': '全部', 'STEP_ID': ''}, {'STEP_NAME': '全部', 'STEP_ID': ''},

View File

@ -354,7 +354,7 @@ class _BlindboardDetailFormWidgetState
), ),
const Divider(), const Divider(),
ItemListWidget.selectableLineTitleTextRightButton( ItemListWidget.selectableLineTitleTextRightButton(
label: '视频监控:', label: '作业视频监控:',
isClean: widget.isEditable, isClean: widget.isEditable,
cleanText: '清除监控', cleanText: '清除监控',
onTapClean: () { onTapClean: () {

View File

@ -82,13 +82,11 @@ class _BlindboardListPageState extends State<BlindboardListPage> {
Future<void> _fetchSteps() async { Future<void> _fetchSteps() async {
try { try {
final response = await ApiService.searchGetTaskSetps(1); final response = await ApiService.searchGetTaskSetps(13);
setState(() { setState(() {
stepList = [ stepList = [
{'STEP_NAME': '全部', 'STEP_ID': ''}, {'STEP_NAME': '全部', 'STEP_ID': ''},
...response['list'] ?? [], ...response['list'] ?? [],
{"STEP_NAME": "验收归档",
"STEP_ID": "99"}
]; ];
}); });
} catch (e) { } catch (e) {

View File

@ -231,7 +231,7 @@ class _SpaceWorkDetailFormWidgetState extends State<SpaceWorkDetailFormWidget> {
), ),
const Divider(), const Divider(),
ItemListWidget.selectableLineTitleTextRightButton( ItemListWidget.selectableLineTitleTextRightButton(
label: '视频监控:', label: '作业视频监控:',
isClean: widget.isEditable, isClean: widget.isEditable,
cleanText: '清除监控', cleanText: '清除监控',
onTapClean: () { onTapClean: () {

View File

@ -26,7 +26,6 @@ class _SxkjTzglListPageState extends State<SxkjTzglListPage> {
bool isLoading = false; bool isLoading = false;
final TextEditingController _searchController = TextEditingController(); final TextEditingController _searchController = TextEditingController();
List<Map<String, dynamic>> stepList = [];
int sindex = 0; int sindex = 0;
String searchKeywords = ''; String searchKeywords = '';
@ -38,7 +37,6 @@ class _SxkjTzglListPageState extends State<SxkjTzglListPage> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_fetchSteps();
_fetchData(); _fetchData();
_scrollController.addListener(_onScroll); _scrollController.addListener(_onScroll);
} }
@ -60,20 +58,6 @@ class _SxkjTzglListPageState extends State<SxkjTzglListPage> {
} }
} }
Future<void> _fetchSteps() async {
try {
final response = await ApiService.searchGetTaskSetps(1);
setState(() {
stepList = [
{'STEP_NAME': '全部', 'STEP_ID': ''},
...response['list'] ?? [],
];
});
} catch (e) {
print('Error fetching steps: $e');
}
}
Future<void> _fetchData() async { Future<void> _fetchData() async {
if (isLoading) return; if (isLoading) return;
setState(() => isLoading = true); setState(() => isLoading = true);
@ -159,44 +143,6 @@ class _SxkjTzglListPageState extends State<SxkjTzglListPage> {
); );
} }
//
Future<void> _showStepPicker() async {
if (stepList.isEmpty) {
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text('正在加载步骤数据,请稍后...')));
await _fetchSteps();
if (stepList.isEmpty) {
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text('无法加载步骤数据')));
return;
}
}
//
final options = stepList.map((e) => e['STEP_NAME'] as String).toList();
//
final choice = await BottomPicker.show<String>(
context,
items: options,
itemBuilder: (item) => Text(item, textAlign: TextAlign.center),
initialIndex: sindex,
);
if (choice != null) {
//
final newIndex = options.indexOf(choice);
if (newIndex != -1) {
setState(() {
sindex = newIndex;
});
_search();
}
}
}
Widget _buildListContent() { Widget _buildListContent() {
if (isLoading && list.isEmpty) { if (isLoading && list.isEmpty) {
// //

View File

@ -23,7 +23,9 @@ class _WorkTabDhListState extends State<WorkTabDhList> {
_getData(); _getData();
} }
Future<void> _getData() async { Future<void> _getData() async {
LoadingDialogHelper.show();
final data = await ApiService.specialcheckWorkCount('hotwork'); final data = await ApiService.specialcheckWorkCount('hotwork');
LoadingDialogHelper.hide();
setState(() { setState(() {
final eight_work_count = data['count'] ?? {}; final eight_work_count = data['count'] ?? {};
buttonInfos = [ buttonInfos = [

View File

@ -24,7 +24,9 @@ class _WorkTabDlListState extends State<WorkTabDlList> {
_getData(); _getData();
} }
Future<void> _getData() async { Future<void> _getData() async {
LoadingDialogHelper.show();
final data = await ApiService.specialcheckWorkCount('cutroad'); final data = await ApiService.specialcheckWorkCount('cutroad');
LoadingDialogHelper.hide();
setState(() { setState(() {
final eight_work_count = data['count'] ?? {}; final eight_work_count = data['count'] ?? {};
buttonInfos = [ buttonInfos = [
@ -35,7 +37,7 @@ class _WorkTabDlListState extends State<WorkTabDlList> {
}, },
{ {
"icon": "assets/icon-apps/icon-yxkj-2.png", "icon": "assets/icon-apps/icon-yxkj-2.png",
"title": "作业项目负责人\n意见", "title": "断路示意图\n负责人意见",
"unreadCount": eight_work_count['PROJECT_MANAGER'] ?? '0', "unreadCount": eight_work_count['PROJECT_MANAGER'] ?? '0',
}, },
{ {
@ -109,7 +111,7 @@ class _WorkTabDlListState extends State<WorkTabDlList> {
String title = ''; String title = '';
switch (index) { switch (index) {
case 0: title = '提交申请'; break; case 0: title = '提交申请'; break;
case 1: title = '作业项目负责人'; break; case 1: title = '断路示意图负责人'; break;
case 2: title = '设置安全措施确认人'; break; case 2: title = '设置安全措施确认人'; break;
case 3: title = '安全措施确认'; break; case 3: title = '安全措施确认'; break;
case 4: title = '监护人签字'; break; case 4: title = '监护人签字'; break;

View File

@ -24,7 +24,9 @@ class _WorkTabDtListState extends State<WorkTabDtList> {
_getData(); _getData();
} }
Future<void> _getData() async { Future<void> _getData() async {
LoadingDialogHelper.show();
final data = await ApiService.specialcheckWorkCount('breakground'); final data = await ApiService.specialcheckWorkCount('breakground');
LoadingDialogHelper.hide();
setState(() { setState(() {
final eight_work_count = data['count'] ?? {}; final eight_work_count = data['count'] ?? {};
buttonInfos = [ buttonInfos = [

View File

@ -24,7 +24,9 @@ class _WorkTabDzListState extends State<WorkTabDzList> {
_getData(); _getData();
} }
Future<void> _getData() async { Future<void> _getData() async {
LoadingDialogHelper.show();
final data = await ApiService.specialcheckWorkCount('hoisting'); final data = await ApiService.specialcheckWorkCount('hoisting');
LoadingDialogHelper.hide();
setState(() { setState(() {
final eight_work_count = data['count'] ?? {}; final eight_work_count = data['count'] ?? {};
buttonInfos = [ buttonInfos = [

View File

@ -24,7 +24,9 @@ class _WorkTabGcListState extends State<WorkTabGcList> {
_getData(); _getData();
} }
Future<void> _getData() async { Future<void> _getData() async {
LoadingDialogHelper.show();
final data = await ApiService.specialcheckWorkCount('highwork'); final data = await ApiService.specialcheckWorkCount('highwork');
LoadingDialogHelper.hide();
setState(() { setState(() {
final eight_work_count = data['count'] ?? {}; final eight_work_count = data['count'] ?? {};
buttonInfos = [ buttonInfos = [

View File

@ -24,7 +24,9 @@ class _WorkTabLsydListState extends State<WorkTabLsydList> {
_getData(); _getData();
} }
Future<void> _getData() async { Future<void> _getData() async {
LoadingDialogHelper.show();
final data = await ApiService.specialcheckWorkCount('electricity'); final data = await ApiService.specialcheckWorkCount('electricity');
LoadingDialogHelper.hide();
setState(() { setState(() {
final eight_work_count = data['count'] ?? {}; final eight_work_count = data['count'] ?? {};
buttonInfos = [ buttonInfos = [

View File

@ -24,7 +24,9 @@ class _WorkTabMbcdListState extends State<WorkTabMbcdList> {
_getData(); _getData();
} }
Future<void> _getData() async { Future<void> _getData() async {
LoadingDialogHelper.show();
final data = await ApiService.specialcheckWorkCount('blindboard'); final data = await ApiService.specialcheckWorkCount('blindboard');
LoadingDialogHelper.hide();
setState(() { setState(() {
final eight_work_count = data['count'] ?? {}; final eight_work_count = data['count'] ?? {};
buttonInfos = [ buttonInfos = [

View File

@ -27,7 +27,9 @@ class _WorkTabSxkjListState extends State<WorkTabSxkjList> {
} }
Future<void> _getData() async { Future<void> _getData() async {
LoadingDialogHelper.show();
final data = await ApiService.specialcheckWorkCount('confinedspace'); final data = await ApiService.specialcheckWorkCount('confinedspace');
LoadingDialogHelper.hide();
setState(() { setState(() {
final eight_work_count = data['count'] ?? {}; final eight_work_count = data['count'] ?? {};
topButtonInfos = [ topButtonInfos = [

View File

@ -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 # 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 # 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. # of the product and file versions while build-number is used as the build suffix.
version: 2.1.2+5 version: 2.1.2+6
environment: environment:
sdk: ^3.7.0 sdk: ^3.7.0