diff --git a/lib/http/ApiService.dart b/lib/http/ApiService.dart index e24887a..c7282e2 100644 --- a/lib/http/ApiService.dart +++ b/lib/http/ApiService.dart @@ -24,7 +24,7 @@ class ApiService { "http://192.168.20.240:8500/whb_stu_face/"; /// 登录及其他管理后台接口 // 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.20.240:8500/integrated_whb"; // static const String basePath = "http://192.168.0.37:8099/api"; diff --git a/lib/pages/app/Danger_paicha/danger_image_updata_page.dart b/lib/pages/app/Danger_paicha/danger_image_updata_page.dart index 92a4a46..d9d6ebf 100644 --- a/lib/pages/app/Danger_paicha/danger_image_updata_page.dart +++ b/lib/pages/app/Danger_paicha/danger_image_updata_page.dart @@ -7,6 +7,7 @@ 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/my_appbar.dart'; +import 'package:qhd_prevention/tools/tools.dart'; class PhotoItem { final String id; @@ -40,38 +41,38 @@ class _DangerImageUpdataPageState extends State { // TODO: implement initState super.initState(); _imgList = widget.imgList; - _getAlreadyUpImages(); + // _getAlreadyUpImages(); } - Future _getAlreadyUpImages() async { - try { - final result = await ApiService.getAlreadyUpImages(widget.id); - if (result['result'] == 'success') { - final List newList = result['imgs'] ?? []; - setState(() { - for (Map item in newList) { - String id = item['IMGFILES_ID'] ?? ''; - String filePath = item['FILEPATH'] ?? ''; - _imgList.add( - PhotoItem( - id: id, // 新图片没有ID - filePath: ApiService.baseImgPath+filePath, - type: "1", - ), - ); - - } - - }); - } else { - ToastUtil.showNormal(context, "加载数据失败"); - // _showMessage('加载数据失败'); - } - } catch (e) { - // 出错时可以 Toast 或者在页面上显示错误状态 - print('加载数据失败:$e'); - } - } + // Future _getAlreadyUpImages() async { + // try { + // final result = await ApiService.getAlreadyUpImages(widget.id); + // if (result['result'] == 'success') { + // final List newList = result['imgs'] ?? []; + // setState(() { + // for (Map item in newList) { + // String id = item['IMGFILES_ID'] ?? ''; + // String filePath = item['FILEPATH'] ?? ''; + // _imgList.add( + // PhotoItem( + // id: id, // 新图片没有ID + // filePath: ApiService.baseImgPath+filePath, + // type: "1", + // ), + // ); + // + // } + // + // }); + // } else { + // ToastUtil.showNormal(context, "加载数据失败"); + // // _showMessage('加载数据失败'); + // } + // } catch (e) { + // // 出错时可以 Toast 或者在页面上显示错误状态 + // print('加载数据失败:$e'); + // } + // } @override Widget build(BuildContext context) { @@ -151,6 +152,7 @@ class _DangerImageUpdataPageState extends State { ); } Future _submitAll() async { + LoadingDialogHelper.show(message: "上传中..."); int i = 0; for (PhotoItem item in _imgList) { if (item.type == '2') { @@ -163,7 +165,7 @@ class _DangerImageUpdataPageState extends State { } i++; } - + LoadingDialogHelper.hide(); ToastUtil.showNormal(context, "提交成功"); Navigator.of(context).pop(); } diff --git a/lib/pages/app/Danger_paicha/quick_report_page.dart b/lib/pages/app/Danger_paicha/quick_report_page.dart index 6886442..dff767c 100644 --- a/lib/pages/app/Danger_paicha/quick_report_page.dart +++ b/lib/pages/app/Danger_paicha/quick_report_page.dart @@ -560,6 +560,8 @@ class _QuickReportPageState extends State { }); }else{ LoadingDialogHelper.hide(); + ToastUtil.showNormal(context, "提交失败"); + } } catch (e) { LoadingDialogHelper.hide(); diff --git a/lib/pages/app/checking_information_one_page.dart b/lib/pages/app/checking_information_one_page.dart index dace362..0a602ac 100644 --- a/lib/pages/app/checking_information_one_page.dart +++ b/lib/pages/app/checking_information_one_page.dart @@ -99,9 +99,9 @@ class _CheckingInformationOnePageState extends State listDates.addAll(newList);//"HIDDENDESCR" -> "3111111" for(int i=0;i listDates.addAll(newList);//"HIDDENDESCR" -> "3111111" for(int i=0;i Container( color: Colors.white, padding: EdgeInsets.symmetric(horizontal: 15), + child: GestureDetector( child: ListItemFactory.createRowSpaceBetweenItem( leftText: "日期选择", rightText: dataTime.isEmpty?"请选择":dataTime, isRight: true, ), + onTap: () async { + DateTime? picked = await BottomDateTimePicker.showDate(context); + if (picked != null) { + setState(() { + dataTime = DateFormat('yyyy-MM-dd').format(picked); + stringTime = DateFormat('HH:mm').format(picked); + }); + } + }, + ), ), Divider(height: 1,), @@ -176,6 +187,7 @@ class _CheckingInformationOnePageState extends State DateTime? picked = await BottomDateTimePicker.showDate(context); if (picked != null) { setState(() { + dataTime = DateFormat('yyyy-MM-dd').format(picked); stringTime = DateFormat('HH:mm').format(picked); }); } @@ -559,7 +571,7 @@ class _CheckingInformationOnePageState extends State } void _addOtherHidden() { setState(() { - otherHidden.add(DepartmentEntry(department: '请选择', responsible: '请选择',index:'',departmentId: '',responsibleId:'')); + otherHidden.add(DepartmentEntry(department: '点击填写', responsible: '点击填写',index:'',departmentId: '',responsibleId:'')); }); } diff --git a/lib/pages/app/danger_wait_list_page.dart b/lib/pages/app/danger_wait_list_page.dart index 273171d..0905654 100644 --- a/lib/pages/app/danger_wait_list_page.dart +++ b/lib/pages/app/danger_wait_list_page.dart @@ -460,9 +460,9 @@ class _DangerWaitListPageState extends State { if("1"==type){ return "隐患来源:隐患快报"; }else if("2"==type){ - return "隐患来源:隐患排查清单检查"; + return "隐患来源:隐患排查"; }else if("3"==type){ - return "隐患来源:标准排查清单检查"; + return "隐患来源:标准排查"; }else if("4"==type){ return "隐患来源:专项检查"; }else{ diff --git a/lib/pages/app/danner_repair.dart b/lib/pages/app/danner_repair.dart index 9dd4f93..62dbdc7 100644 --- a/lib/pages/app/danner_repair.dart +++ b/lib/pages/app/danner_repair.dart @@ -300,7 +300,8 @@ class DannerRepairState extends State { Widget _acceptPrepare() { final fields = [ _buildReadOnlyRow("排查日期", widget.pd["CREATTIME"]), - _buildReadOnlyRow("隐患清单", ""), + if(FormUtils.hasValue(widget.pd, "LIST_NAME")) + _buildReadOnlyRow("隐患清单", widget.pd["LIST_NAME"]), ListItemFactory.createBuildMultilineInput("治理标准", "请输入治理标准", standardController), ListItemFactory.createBuildMultilineInput("治理方法", "请输入治理方法", methodController), ListItemFactory.createBuildMultilineInput("经费落实", "请输入经费落实", fundController), diff --git a/lib/pages/app/hidden_danger_acceptance_page.dart b/lib/pages/app/hidden_danger_acceptance_page.dart index 771c442..9d828fe 100644 --- a/lib/pages/app/hidden_danger_acceptance_page.dart +++ b/lib/pages/app/hidden_danger_acceptance_page.dart @@ -157,7 +157,7 @@ class _HiddenDangerAcceptancePageState extends State Widget _buildInfoItem(String title, String value) { return Padding( - padding: const EdgeInsets.symmetric(vertical: 8), + padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -188,12 +188,17 @@ class _HiddenDangerAcceptancePageState extends State minHeight: constraints.maxHeight, ), child: Padding( - padding: const EdgeInsets.all(16), + padding: const EdgeInsets.all(10), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - _buildInfoItem('隐患描述', pd['HIDDENDESCR'] ?? ''), + Card( + color: Colors.white, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _buildInfoItem('隐患描述', pd['HIDDENDESCR'] ?? ''), Divider(height: 1), // 隐患来源 _buildInfoItem('隐患来源', _getSourceText(pd['SOURCE'])), @@ -240,6 +245,7 @@ class _HiddenDangerAcceptancePageState extends State ListItemFactory.createTextImageItem( text: "隐患照片", imageUrls: files, + horizontalPadding:10, onImageTapped: (index) { presentOpaque( SingleImageViewer(imageUrl:ApiService.baseImgPath + files[index]), @@ -249,10 +255,14 @@ class _HiddenDangerAcceptancePageState extends State ), - // 隐患视频 - if (videoList.isNotEmpty) ...[ - const SizedBox(height: 16), - const Text('隐患视频', style: TextStyle(fontWeight: FontWeight.bold)), + // 隐患视频 + if (videoList.isNotEmpty) ...[ + SizedBox(height: 10), + Padding( + padding: EdgeInsets.only(left: 10,right: 10), + child: Text('隐患视频', style: TextStyle(fontWeight: FontWeight.bold)), + + ), GestureDetector( onTap: () { showDialog( @@ -274,13 +284,27 @@ class _HiddenDangerAcceptancePageState extends State height: 120, ), ), - ], + ], + + + ], + ), + ), + - SizedBox(height: 10,), // 整改信息部分 if (pd['STATE'] != null && int.parse(pd['STATE']) >= 2 && int.parse(pd['STATE']) <= 4) ...[ // const Divider(height: 10,color: Colors.grey,), - Row( + 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), @@ -290,7 +314,7 @@ class _HiddenDangerAcceptancePageState extends State ), ], ), - + ), // const Text('整改信息', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)), Divider(height: 1), @@ -307,6 +331,7 @@ class _HiddenDangerAcceptancePageState extends State ListItemFactory.createTextImageItem( text: "整改后图片", imageUrls: files2, + horizontalPadding: 10, onImageTapped: (index) { presentOpaque( SingleImageViewer(imageUrl: ApiService.baseImgPath +files2[index]), @@ -346,6 +371,7 @@ class _HiddenDangerAcceptancePageState extends State ListItemFactory.createTextImageItem( text: "方案图片", imageUrls: files4, + horizontalPadding: 10, onImageTapped: (index) { presentOpaque( SingleImageViewer(imageUrl: ApiService.baseImgPath +files2[index]), @@ -360,11 +386,13 @@ class _HiddenDangerAcceptancePageState extends State Divider(height: 1), _buildInfoItem('整改计划', pd['HAVEPLAN']=="0" ? '无':'有'), + if(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]), @@ -373,7 +401,9 @@ class _HiddenDangerAcceptancePageState extends State }, ), - + ], + ), + ), // 隐患整改 _danner_type_wait(), @@ -399,7 +429,11 @@ class _HiddenDangerAcceptancePageState extends State return SizedBox( child: Column( children: [ - _getRepairState(), + Card( + color:Colors.white, + child: _getRepairState(), + ), + // 整改选项 // _accepted ? _getRepairState() : _noAccepet_repair(_accepted), @@ -427,11 +461,12 @@ class _HiddenDangerAcceptancePageState extends State children: [ - ListItemFactory.createBuildSimpleSection("隐患验收",horPadding:0), + ListItemFactory.createBuildSimpleSection("隐患验收",horPadding:10), Divider(height: 1), ListItemFactory.createYesNoSection( horizontalPadding: 0, + verticalPadding:0, title: '是否合格', yesLabel: '是', noLabel: '否', @@ -448,7 +483,7 @@ class _HiddenDangerAcceptancePageState extends State Column(children: [ Divider(), Container( - padding: EdgeInsets.only(top: 15,bottom: 15), + padding: EdgeInsets.only(top: 10,bottom: 10,left: 10,right: 10), child: Column( children: [ Row( @@ -481,7 +516,7 @@ class _HiddenDangerAcceptancePageState extends State }, child: Padding( - padding: EdgeInsets.symmetric(horizontal: 0), + padding: EdgeInsets.symmetric(horizontal: 10), child: ListItemFactory.createRowSpaceBetweenItem( leftText: "验收日期", rightText: dataTime.isEmpty?"请选择":dataTime, @@ -494,6 +529,7 @@ class _HiddenDangerAcceptancePageState extends State title: "验收照片", maxCount: 4, mediaType: MediaType.image, + horizontalPadding: 10, onChanged: (files) { // 上传 files 到服务器 gaiHouImages.clear(); diff --git a/lib/pages/app/hidden_record_detail_page.dart b/lib/pages/app/hidden_record_detail_page.dart index 87bce15..c5f42ab 100644 --- a/lib/pages/app/hidden_record_detail_page.dart +++ b/lib/pages/app/hidden_record_detail_page.dart @@ -98,7 +98,9 @@ class _HiddenRecordDetailPageState extends State { } } }); - } + }else{ + getDataTwo(); + } } catch (e) { print('Error fetching data: $e'); @@ -156,7 +158,7 @@ class _HiddenRecordDetailPageState extends State { Widget _buildInfoItem(String title, String value) { return Padding( - padding: const EdgeInsets.symmetric(vertical: 8), + padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -187,105 +189,133 @@ class _HiddenRecordDetailPageState extends State { minHeight: constraints.maxHeight, ), child: Padding( - padding: const EdgeInsets.all(16), + padding: const EdgeInsets.all(10), 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), - ], + 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), + _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'] ?? ''), + if (pd['HIDDEN_CATEGORY']?.isNotEmpty == true) + _buildInfoItem('隐患类别', pd['HIDDEN_CATEGORY_NAME'] ?? ''), - _buildInfoItem('隐患类型', pd['HIDDENTYPE_NAME'] ?? ''), - Divider(height: 1), - _buildInfoItem('整改类型', _getRectificationType(pd['RECTIFICATIONTYPE'])), + _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, - onImageTapped: (index) { - presentOpaque( - SingleImageViewer(imageUrl:ApiService.baseImgPath + files[index]), - context, - ); - }, + 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 (videoList.isNotEmpty) ...[ - const SizedBox(height: 16), - const 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, - ), - ), - ], - SizedBox(height: 10,), + // 整改信息部分 if (pd['STATE'] != null && int.parse(pd['STATE']) >= 2 && int.parse(pd['STATE']) <= 4) ...[ + SizedBox(height: 10,), // const Divider(height: 10,color: Colors.grey,), - Row( - children: [ - Container(width: 3, height: 15, color: Colors.blue), - const SizedBox(width: 8), - Text( + 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'] ?? ''), @@ -301,6 +331,7 @@ class _HiddenRecordDetailPageState extends State { ListItemFactory.createTextImageItem( text: "整改后图片", imageUrls: files2, + horizontalPadding: 10, onImageTapped: (index) { presentOpaque( SingleImageViewer(imageUrl: ApiService.baseImgPath +files2[index]), @@ -340,6 +371,7 @@ class _HiddenRecordDetailPageState extends State { ListItemFactory.createTextImageItem( text: "方案图片", imageUrls: files4, + horizontalPadding: 10, onImageTapped: (index) { presentOpaque( SingleImageViewer(imageUrl: ApiService.baseImgPath +files2[index]), @@ -359,6 +391,7 @@ class _HiddenRecordDetailPageState extends State { ListItemFactory.createTextImageItem( text: "计划图片", imageUrls: files2, + horizontalPadding: 10, onImageTapped: (index) { presentOpaque( SingleImageViewer(imageUrl: ApiService.baseImgPath +files2[index]), @@ -366,7 +399,9 @@ class _HiddenRecordDetailPageState extends State { ); }, ), - + ], + ), + ), // ... 其他整改信息字段 ], @@ -376,16 +411,26 @@ class _HiddenRecordDetailPageState extends State { 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,), - Row( + Card( + color: Colors.white, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container(width: 3, height: 15, color: Colors.blue), - const SizedBox(width: 8), - Text( - "验收信息", - style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold), - ), - ], - ), + + 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)), @@ -405,6 +450,7 @@ class _HiddenRecordDetailPageState extends State { ListItemFactory.createTextImageItem( text: "验收图片", imageUrls: files7, + horizontalPadding: 10, onImageTapped: (index) { presentOpaque( SingleImageViewer(imageUrl: ApiService.baseImgPath +files5[index]), @@ -412,6 +458,9 @@ class _HiddenRecordDetailPageState extends State { ); }, ), + ], + ), + ), ], diff --git a/lib/pages/home/EquipmentInspection/equipment_inspection_list_page.dart b/lib/pages/home/EquipmentInspection/equipment_inspection_list_page.dart index aa275b0..349b94f 100644 --- a/lib/pages/home/EquipmentInspection/equipment_inspection_list_page.dart +++ b/lib/pages/home/EquipmentInspection/equipment_inspection_list_page.dart @@ -159,7 +159,7 @@ class _EquipmentInspectionListPageState return ListView.builder( controller: _scrollController, - itemCount: _equipList.length, + itemCount: _periodList.length, itemBuilder: (context, index) { final period = _periodList[index]; final items = groupedItems[period] ?? []; diff --git a/lib/pages/home/NFC/home_nfc_detail_page.dart b/lib/pages/home/NFC/home_nfc_detail_page.dart index f0f83d9..7843354 100644 --- a/lib/pages/home/NFC/home_nfc_detail_page.dart +++ b/lib/pages/home/NFC/home_nfc_detail_page.dart @@ -86,7 +86,8 @@ class _HomeNfcDetailPageState extends State { ); if (result == null) { - _showMessage('请求失败:结果为 null'); + ToastUtil.showNormal(context, '请求失败:结果为 null'); + // _showMessage('请求失败:结果为 null'); return; } printLongString(jsonEncode(result)); diff --git a/lib/pages/home/NFC/nfc_question_fecebook.dart b/lib/pages/home/NFC/nfc_question_fecebook.dart index b8f31e3..e289cfb 100644 --- a/lib/pages/home/NFC/nfc_question_fecebook.dart +++ b/lib/pages/home/NFC/nfc_question_fecebook.dart @@ -168,12 +168,14 @@ class _NfcQuestionFecebookState extends State { final text = _descriptionController.text.trim(); if (text.isEmpty) { - _showMessage('请填写问题'); + ToastUtil.showNormal(context, '请填写问题'); + // _showMessage('请填写问题'); return; } if (_images.isEmpty) { - _showMessage('请上传图片'); + ToastUtil.showNormal(context, '请上传图片'); + // _showMessage('请上传图片'); return; } Map data = { @@ -225,9 +227,11 @@ class _NfcQuestionFecebookState extends State { final raw = await ApiService.nfcFeedBack(data); if (raw['result'] == 'success') { - _showMessage('提交成功'); + ToastUtil.showNormal(context, '提交成功'); + // _showMessage('提交成功'); } else { - _showMessage('提交失败'); + ToastUtil.showNormal(context, '提交失败'); + // _showMessage('提交失败'); } } catch (e) { // 出错时可以 Toast 或者在页面上显示错误状态 diff --git a/lib/pages/home/risk/riskControl_page.dart b/lib/pages/home/risk/riskControl_page.dart index ef44b31..e593b79 100644 --- a/lib/pages/home/risk/riskControl_page.dart +++ b/lib/pages/home/risk/riskControl_page.dart @@ -175,7 +175,7 @@ class _RiskControlPageState extends State { ); }, child: Container( - height: 100, + color: Colors.white, padding: EdgeInsets.symmetric(horizontal: 16), // 添加水平内边距 child: Row( @@ -197,6 +197,8 @@ class _RiskControlPageState extends State { Text( '风险点(单元):${item['RISKUNITNAME'] ?? ''}', style: TextStyle(fontSize: 14, color: Colors.grey), + maxLines: 2, + overflow: TextOverflow.ellipsis, ), SizedBox(height: 4), Text( @@ -209,8 +211,10 @@ class _RiskControlPageState extends State { // 右侧风险等级和箭头 Padding( - padding: EdgeInsets.only(top: 15), - child: Column( + padding: EdgeInsets.only(top: 5,bottom: 5), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, children: [ // 风险等级标签 Row( @@ -235,7 +239,7 @@ class _RiskControlPageState extends State { SizedBox(height: 12), // 添加间距 Row( children: [ - SizedBox(width: 110), + Icon(Icons.arrow_forward_ios_rounded, size: 16), ], ), diff --git a/lib/pages/home/risk/risk_detail_page.dart b/lib/pages/home/risk/risk_detail_page.dart index 4a1160b..9014eb3 100644 --- a/lib/pages/home/risk/risk_detail_page.dart +++ b/lib/pages/home/risk/risk_detail_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:qhd_prevention/customWidget/toast_util.dart'; import 'package:qhd_prevention/pages/my_appbar.dart'; import 'package:qhd_prevention/tools/coord_convert.dart'; import 'package:qhd_prevention/tools/tools.dart'; @@ -65,7 +66,7 @@ class _RiskDetailPageState extends State { Future _addCoordinate() async { try { - + LoadingDialogHelper.show(message: "提交中..."); //获取定位 await fetchAndSaveBd09(context); final prefs = await SharedPreferences.getInstance(); @@ -73,16 +74,20 @@ class _RiskDetailPageState extends State { String longitude = prefs.getString('bd_lon') ?? ''; final result = await ApiService.addCoordinate( widget.itemData["IDENTIFICATIONPARTS_ID"], longitude,latitude); + LoadingDialogHelper.hide(); if (result['result'] == 'success') { setState(() { - _showMessage('提交成功'); + ToastUtil.showNormal(context, "提交成功"); + // _showMessage('提交成功'); Navigator.pop(context); }); }else{ + ToastUtil.showNormal(context, "提交失败"); _showMessage('加载数据失败'); } } catch (e) { + LoadingDialogHelper.hide(); // 出错时可以 Toast 或者在页面上显示错误状态 print('加载数据失败:$e'); } @@ -99,13 +104,13 @@ class _RiskDetailPageState extends State { // 设置底部最小高度,要预留出来 const double bottomAreaHeight = 100; final double maxCardHeight = - constraints.maxHeight - bottomAreaHeight; + constraints.maxHeight - bottomAreaHeight-10; return Column( children: [ // 卡片区:最大高度受限 Padding( - padding: const EdgeInsets.all(15), + padding: EdgeInsets.all(15), child: ConstrainedBox( constraints: BoxConstraints(maxHeight: maxCardHeight), child: Container( @@ -118,12 +123,6 @@ class _RiskDetailPageState extends State { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - _buildHeader(), - const Divider( - height: .5, - thickness: .5, - color: Colors.grey, - ), // ★ 这个 Flexible 包裹 SingleChildScrollView ★ Flexible( @@ -134,6 +133,14 @@ class _RiskDetailPageState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ + + _buildHeader(), + const Divider( + height: .5, + thickness: .5, + color: Colors.grey, + ), + _itemCell("存在风险",0), _itemCell("主要管控措施",1), _itemCell("管控部门",2), @@ -171,17 +178,23 @@ class _RiskDetailPageState extends State { // 头部信息组件 Widget _buildHeader() { return Padding( - padding: const EdgeInsets.all(15), + padding: EdgeInsets.only(top:5,left: 15,right: 15,bottom: 15), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - widget.itemData['RISKUNITNAME']?? "", - style: TextStyle(fontSize: 16, color: Colors.black54), + Expanded( + child: Text( + widget.itemData['RISKUNITNAME']?? "", + style: TextStyle(fontSize: 16, color: Colors.black54), + ), ), - Text( - widget.itemData['PARTSNAME'] ?? "未知地区", - style: const TextStyle(fontSize: 16, color: Colors.black54), + SizedBox(width: 15,), + Expanded( + child: Text( + widget.itemData['PARTSNAME'] ?? "未知地区", + style: const TextStyle(fontSize: 16, color: Colors.black54), + ), ), ], ), diff --git a/lib/pages/home/scan_page.dart b/lib/pages/home/scan_page.dart index b806604..0068b2e 100644 --- a/lib/pages/home/scan_page.dart +++ b/lib/pages/home/scan_page.dart @@ -82,18 +82,19 @@ class _ScanPageState extends State { } } else { // 不是 STUDENT_ID 的情况:按列表 id 匹配 - bool found = false; - final listId = result; - for (final item in widget.totalList) { - if (item['LISTMANAGER_ID'] == listId) { - found = true; - goToList(listId: item['LISTMANAGER_ID'], listName: item['NAME']); - break; - } - } - if (!found) { - ToastUtil.showError(context, '无法检查该清单'); - } + Navigator.pop(context, result); + // bool found = false; + // final listId = result; + // for (final item in widget.totalList) { + // if (item['LISTMANAGER_ID'] == listId) { + // found = true; + // goToList(listId: item['LISTMANAGER_ID'], listName: item['NAME']); + // break; + // } + // } + // if (!found) { + // ToastUtil.showError(context, '无法检查该清单'); + // } } } catch (e, st) { // 捕获解析或运行时错误 diff --git a/lib/pages/home/work/danger_page.dart b/lib/pages/home/work/danger_page.dart index 9c92a5b..9dec74b 100644 --- a/lib/pages/home/work/danger_page.dart +++ b/lib/pages/home/work/danger_page.dart @@ -44,7 +44,7 @@ class _DangerPageState extends State - + List allList = []; List listOne = []; List listTwo = []; @@ -97,11 +97,11 @@ class _DangerPageState extends State listTwo.clear(); switch(widget.type ){ case 1://隐患排查 - appBarTitle="隐患排查清单"; + appBarTitle="隐患排查"; _getHazardInvestigationList(); break; case 2://标准排查 - appBarTitle="标准排查清单"; + appBarTitle="标准排查"; _getStandardInvestigationList(); break; // case 3://首页-待排查 @@ -117,6 +117,7 @@ class _DangerPageState extends State final result = await ApiService.getHazardInvestigationList(id,searchKey); if (result['result'] == 'success') { final List newList = result['varList'] ?? []; + allList.addAll(newList); setState(() { for(int i=0;i final result = await ApiService.getStandardInvestigationList(id,searchKey); if (result['result'] == 'success') { final List newList = result['varList'] ?? []; + allList.addAll(newList); setState(() { for(int i=0;i Widget build(BuildContext context) { return Scaffold( appBar: MyAppbar( - title: "隐患排查", + title: appBarTitle, actions: [ TextButton( onPressed: () { @@ -427,12 +429,12 @@ class _DangerPageState extends State Future _goScan() async { final result = await Navigator.push( context, - MaterialPageRoute(builder: (_) => ScanPage(totalList: [])), + MaterialPageRoute(builder: (_) => ScanPage(totalList: allList)), ); dynamic item; - for(int i=0;i item=listItem; } } - - _handleItemTap(item,0); + if(item!=null) { + _handleItemTap(item, 0); + }else{ + ToastUtil.showNormal(context, "无法检查该清单"); + } } diff --git a/lib/pages/home/work/laws_regulations_page.dart b/lib/pages/home/work/laws_regulations_page.dart index 1ccb002..16187de 100644 --- a/lib/pages/home/work/laws_regulations_page.dart +++ b/lib/pages/home/work/laws_regulations_page.dart @@ -1,9 +1,13 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; +import 'package:open_file/open_file.dart'; import 'dart:convert'; import 'package:path_provider/path_provider.dart'; import 'package:intl/intl.dart'; import 'package:dio/dio.dart'; +import 'package:qhd_prevention/customWidget/toast_util.dart'; import 'package:qhd_prevention/pages/home/work/read_file_page.dart'; import 'package:qhd_prevention/pages/home/work/risk_list_picker.dart'; import 'package:qhd_prevention/pages/my_appbar.dart'; @@ -78,6 +82,34 @@ class _LawsRegulationsPage extends State { ); } + Future _downloadAndLoad(String url) async { + try { + + final filename = url.split('/').last; + final dir = await getTemporaryDirectory(); + final filePath = '${dir.path}/$filename'; + + final dio = Dio(); + final response = await dio.get>( + url, + options: Options(responseType: ResponseType.bytes), + ); + final file = File(filePath); + await file.writeAsBytes(response.data!); + + final result = await OpenFile.open(filePath); + if (result.type != ResultType.done) { + ToastUtil.showNormal(context, "文件加载失败"); + } + } catch (e) { + // 下载或加载失败 + ToastUtil.showNormal(context, "文件加载失败"); + // ScaffoldMessenger.of(context).showSnackBar( + // SnackBar(content: Text('文件加载失败: \$e')), + // ); + } + } + Future _downloadFile(String filePath) async { //下载 try { @@ -94,13 +126,13 @@ class _LawsRegulationsPage extends State { //预览 try { final url =ApiService.baseImgPath + file["FILEPATH"]; - - pushPage( - ReadFilePage( - fileUrl: url, - ), - context, - ); + _downloadAndLoad(url); + // pushPage( + // ReadFilePage( + // fileUrl: url, + // ), + // context, + // ); } catch (e) { print(e.toString()); } diff --git a/lib/pages/home/work/laws_regulations_two_page.dart b/lib/pages/home/work/laws_regulations_two_page.dart index 441b68d..56f0edd 100644 --- a/lib/pages/home/work/laws_regulations_two_page.dart +++ b/lib/pages/home/work/laws_regulations_two_page.dart @@ -1,9 +1,13 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; +import 'package:open_file/open_file.dart'; import 'dart:convert'; import 'package:path_provider/path_provider.dart'; import 'package:intl/intl.dart'; import 'package:dio/dio.dart'; +import 'package:qhd_prevention/customWidget/toast_util.dart'; import 'package:qhd_prevention/pages/home/work/read_file_page.dart'; import 'package:qhd_prevention/pages/home/work/risk_list_picker.dart'; import 'package:qhd_prevention/pages/my_appbar.dart'; @@ -57,7 +61,33 @@ class _LawsRegulationsTwoPage extends State { } } + Future _downloadAndLoad(String url) async { + try { + final filename = url.split('/').last; + final dir = await getTemporaryDirectory(); + final filePath = '${dir.path}/$filename'; + + final dio = Dio(); + final response = await dio.get>( + url, + options: Options(responseType: ResponseType.bytes), + ); + final file = File(filePath); + await file.writeAsBytes(response.data!); + + final result = await OpenFile.open(filePath); + if (result.type != ResultType.done) { + ToastUtil.showNormal(context, "文件加载失败"); + } + } catch (e) { + // 下载或加载失败 + ToastUtil.showNormal(context, "文件加载失败"); + // ScaffoldMessenger.of(context).showSnackBar( + // SnackBar(content: Text('文件加载失败: \$e')), + // ); + } + } @@ -78,12 +108,13 @@ class _LawsRegulationsTwoPage extends State { try { final url =ApiService.baseImgPath + file["FILEPATH"]; - pushPage( - ReadFilePage( - fileUrl: url, - ), - context, - ); + _downloadAndLoad(url); + // pushPage( + // ReadFilePage( + // fileUrl: url, + // ), + // context, + // ); } catch (e) { print(e.toString()); } diff --git a/lib/pages/home/workSet_page.dart b/lib/pages/home/workSet_page.dart index e909fd4..427de77 100644 --- a/lib/pages/home/workSet_page.dart +++ b/lib/pages/home/workSet_page.dart @@ -1,6 +1,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; +import 'package:qhd_prevention/customWidget/toast_util.dart'; import 'package:qhd_prevention/pages/home/work_alert.dart'; import 'package:qhd_prevention/pages/my_appbar.dart'; import 'package:qhd_prevention/tools/tools.dart'; @@ -103,7 +104,8 @@ class _WorkSetPageState extends State { final result = await ApiService.addRiCheng(data,title,content,id,urlPath); if (result['result'] == 'success') { setState(() { - _showMessage('保存成功'); + ToastUtil.showNormal(context, '保存成功'); + // _showMessage('保存成功'); String data= DateFormat('yyyy-MM-dd').format(_selectedDay); _getRiCheng(data,false); }); diff --git a/lib/pages/mine/mine_duty_application.dart b/lib/pages/mine/mine_duty_application.dart index 671a162..14a2048 100644 --- a/lib/pages/mine/mine_duty_application.dart +++ b/lib/pages/mine/mine_duty_application.dart @@ -39,6 +39,8 @@ class _MineDutyApplicationPage extends State { ToastUtil.showSuccess(context, '提交成功'); widget.onClose('关闭提交'); // 触发回调 Navigator.pop(context); // 关闭页面 + }else{ + ToastUtil.showSuccess(context, '提交失败'); } } catch (e) { print('加载出错: $e'); diff --git a/lib/pages/mine/mine_feedback_page.dart b/lib/pages/mine/mine_feedback_page.dart index d60e981..24a1513 100644 --- a/lib/pages/mine/mine_feedback_page.dart +++ b/lib/pages/mine/mine_feedback_page.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:image_picker/image_picker.dart'; +import 'package:qhd_prevention/customWidget/toast_util.dart'; import 'dart:io'; import '../../../../../customWidget/photo_picker_row.dart'; import 'package:qhd_prevention/pages/my_appbar.dart'; @@ -296,17 +297,20 @@ class _FeedbackPageState extends State { final text = _descriptionController.text.trim(); if (title.isEmpty ) { - _showMessage('请填写标题'); + ToastUtil.showNormal(context, '请填写标题'); + // _showMessage('请填写标题'); return; } if (text.isEmpty ) { - _showMessage('请填写问题和意见'); + ToastUtil.showNormal(context, '请填写问题和意见'); + // _showMessage('请填写问题和意见'); return; } if (_images.isEmpty) { - _showMessage('请上传隐患图片'); + ToastUtil.showNormal(context, '请上传相关图片'); + // _showMessage('请上传隐患图片'); return; } @@ -373,11 +377,13 @@ class _FeedbackPageState extends State { final raw = await ApiService.setFeedBack(title,text,num,imagePaths); if (raw['result'] == 'success') { + ToastUtil.showNormal(context, '反馈提交成功'); Navigator.pop(context); // 关闭加载对话框 - _showMessage('反馈提交成功'); + // _showMessage('反馈提交成功'); }else{ - _showMessage('反馈提交失败'); + ToastUtil.showNormal(context, '反馈提交失败'); + // _showMessage('反馈提交失败'); } } catch (e) { diff --git a/lib/pages/mine/mine_page.dart b/lib/pages/mine/mine_page.dart index b9f09aa..ab610f0 100644 --- a/lib/pages/mine/mine_page.dart +++ b/lib/pages/mine/mine_page.dart @@ -120,8 +120,9 @@ class _MinePageState extends State { GestureDetector( child: _setItemWidget("离岗"), onTap: () async { - + LoadingDialogHelper.show(); bool isRest= await _getIsRest(); + LoadingDialogHelper.hide(); if(isRest){ ToastUtil.showNormal(context, "您已经处于离岗状态中"); return; diff --git a/lib/pages/mine/mine_set_pwd_page.dart b/lib/pages/mine/mine_set_pwd_page.dart index d2c75a7..b56fb17 100644 --- a/lib/pages/mine/mine_set_pwd_page.dart +++ b/lib/pages/mine/mine_set_pwd_page.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:qhd_prevention/customWidget/custom_button.dart'; +import 'package:qhd_prevention/customWidget/toast_util.dart'; import 'package:qhd_prevention/pages/my_appbar.dart'; import 'package:flutter/material.dart'; @@ -36,25 +37,47 @@ class _MineSetPwdPageState extends State { final newPwd = _newPwdController.text.trim(); final confirmPwd = _confirmPwdController.text.trim(); - if (oldPwd.isEmpty || newPwd.isEmpty || confirmPwd.isEmpty) { - _showMessage('请填写完整所有字段'); + if (oldPwd.isEmpty) { + ToastUtil.showNormal(context, '请填写旧密码'); + // _showMessage('请填写旧密码'); return; } + if (newPwd.isEmpty) { + ToastUtil.showNormal(context, '请填写新密码'); + // _showMessage('请填写新密码'); + return; + } + + if (confirmPwd.isEmpty) { + ToastUtil.showNormal(context, '请填写确认新密码'); + // _showMessage('请填写确认新密码'); + return; + } + + + // if (oldPwd.isEmpty || newPwd.isEmpty || confirmPwd.isEmpty) { + // _showMessage('请填写完整所有字段'); + // return; + // } + if (newPwd != confirmPwd) { - _showMessage('新密码与确认密码不一致'); + ToastUtil.showNormal(context, '新密码与确认密码不一致'); + // _showMessage('新密码与确认密码不一致'); return; } final RegExp regex = RegExp(r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,18}$'); if (regex.hasMatch(newPwd)) { - _showMessage('密码长度为6-18位,必须包含大小字母,小写字母数字和特殊符号。'); + ToastUtil.showNormal(context, '密码长度为6-18位,必须包含大小字母,小写字母数字和特殊符号。'); + // _showMessage('密码长度为6-18位,必须包含大小字母,小写字母数字和特殊符号。'); return; } // 示例验证:密码复杂度(实际可用正则加强) if (newPwd.length < 8 || newPwd.length > 18) { - _showMessage('密码长度需在8-18位之间'); + ToastUtil.showNormal(context, '密码长度需在8-18位之间'); + // _showMessage('密码长度需在8-18位之间'); return; } @@ -138,7 +161,8 @@ class _MineSetPwdPageState extends State { // final hidCount = raw['hidCount'] as Map; // print(hidCount); if (raw['result'] == 'success') { - _showMessage('密码修改成功'); // 这里换成实际调用接口逻辑 + ToastUtil.showNormal(context, '密码修改成功'); + // _showMessage('密码修改成功'); // 这里换成实际调用接口逻辑 Navigator.pop(context,true); // 清除用户登录状态 @@ -151,13 +175,15 @@ class _MineSetPwdPageState extends State { ); }else{ - _showMessage('密码修改失败'); + ToastUtil.showNormal(context, '密码修改失败'); + // _showMessage('密码修改失败'); } } catch (e) { // 出错时可以 Toast 或者在页面上显示错误状态 print('加载首页数据失败:$e'); - _showMessage('密码修改失败'); + ToastUtil.showNormal(context, '密码修改失败'); + // _showMessage('密码修改失败'); } } diff --git a/lib/pages/notif/notif_page.dart b/lib/pages/notif/notif_page.dart index 5d709fd..bea646d 100644 --- a/lib/pages/notif/notif_page.dart +++ b/lib/pages/notif/notif_page.dart @@ -22,6 +22,7 @@ class _NotifPageState extends State late TabController _tabController; int _selectedTab = 0; int pageNum = 1; + String keyWord=""; // 模拟数据 final List> _notifications = List.generate(10, (i) { @@ -45,25 +46,26 @@ class _NotifPageState extends State if (_tabController.indexIsChanging) { setState(() => _selectedTab = _tabController.index); print('切换到标签:${_tabController.index}'); + searchController.text = ""; + keyWord=""; reRefreshData(); } }); - _getNotifList(""); + _getNotifList(); } void reRefreshData() { pageNum = 1; _list.clear(); - searchController.text = ""; if (0 == _selectedTab) { - _getNotifList(""); + _getNotifList(); } else { - _getNotifEnterprise(""); + _getNotifEnterprise(); } } - Future _getNotifList(String keyWord) async { + Future _getNotifList() async { LoadingDialogHelper.show(); try { final result = await ApiService.getNotifList( @@ -87,7 +89,7 @@ class _NotifPageState extends State } } - Future _getNotifEnterprise(String keyWord) async { + Future _getNotifEnterprise() async { // LoadingDialogHelper.show(); try { final result = await ApiService.getNotifEnterprise( @@ -166,10 +168,11 @@ class _NotifPageState extends State // String word="整改"; pageNum = 1; _list.clear(); + keyWord=keyword; if (0 == _selectedTab) { - _getNotifList(keyword); + _getNotifList(); } else { - _getNotifEnterprise(keyword); + _getNotifEnterprise(); } }, ), diff --git a/pubspec.yaml b/pubspec.yaml index 1c7d5d8..ff3ca77 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -114,7 +114,7 @@ dependencies: video_compress: ^3.1.4 #息屏处理 wakelock_plus: ^1.3.2 - + open_file: ^3.2.1 dev_dependencies: