动火、有限空间申请添加定位
parent
fca208248b
commit
d98dc5a14b
File diff suppressed because one or more lines are too long
|
|
@ -66,7 +66,7 @@ class ListItemFactory {
|
|||
Flexible(
|
||||
fit: FlexFit.loose,
|
||||
child: Text(
|
||||
_truncateText(rightText,17) ,
|
||||
rightText,
|
||||
style: TextStyle(fontSize: 13, color: Colors.grey),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import 'dart:io';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:qhd_prevention/constants/app_enums.dart';
|
||||
import 'package:qhd_prevention/customWidget/BaiDuMap/map_webview_page.dart';
|
||||
import 'package:qhd_prevention/customWidget/ItemWidgetFactory.dart';
|
||||
import 'package:qhd_prevention/customWidget/bottom_picker.dart';
|
||||
import 'package:qhd_prevention/customWidget/center_multi_picker.dart';
|
||||
|
|
@ -25,7 +26,6 @@ import 'package:qhd_prevention/pages/home/Tap/special_work_apply_base_page.dart'
|
|||
import 'package:qhd_prevention/services/SessionService.dart';
|
||||
import 'package:qhd_prevention/tools/tools.dart';
|
||||
|
||||
|
||||
class HotWorkApplyPage extends SpecialWorkApplyBasePage {
|
||||
const HotWorkApplyPage({
|
||||
super.key,
|
||||
|
|
@ -60,6 +60,7 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState<HotWorkApplyPage>
|
|||
"workLevel": "请选择动火等级",
|
||||
"workStartTime": "请选择作业开始时间",
|
||||
"workEndTime": "请选择作业结束时间",
|
||||
"longitude": "请定位位置",
|
||||
"workContent": "请填写作业内容",
|
||||
"workMonitor": "请填写动火监火人",
|
||||
"hotWorkLeaderConfirmUserName": "请选择动火负责人确认负责人",
|
||||
|
|
@ -269,6 +270,8 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState<HotWorkApplyPage>
|
|||
text: pd['workEndTime'] ?? '',
|
||||
),
|
||||
const Divider(),
|
||||
_buildCustomLocationWidget(),
|
||||
const Divider(),
|
||||
// 作业内容
|
||||
ItemListWidget.multiLineTitleTextField(
|
||||
label: '作业内容:',
|
||||
|
|
@ -323,6 +326,58 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState<HotWorkApplyPage>
|
|||
);
|
||||
}
|
||||
|
||||
Widget _buildCustomLocationWidget() {
|
||||
return Container(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 5),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
border: Border.all(color: Colors.grey.shade300, width: 1),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
ItemListWidget.OneRowButtonTitleText(
|
||||
horizontalnum: 10,
|
||||
label: '地点坐标',
|
||||
isRequired: true,
|
||||
buttonText: '定位',
|
||||
text: '',
|
||||
onTap: () async {
|
||||
final result = await pushPage(MapWebViewPage(), context);
|
||||
if (result != null) {
|
||||
setState(() {
|
||||
pd['longitude'] = result['longitude'].toString();
|
||||
pd['latitude'] = result['latitude'].toString();
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
const Divider(),
|
||||
ItemListWidget.itemContainer(
|
||||
ListItemFactory.createRowSpaceBetweenItem(
|
||||
verticalPadding: 2,
|
||||
isRequired: true,
|
||||
leftText: '经度',
|
||||
rightText: pd['longitude'] ?? '',
|
||||
isRight: false,
|
||||
),
|
||||
),
|
||||
const Divider(),
|
||||
ItemListWidget.itemContainer(
|
||||
ListItemFactory.createRowSpaceBetweenItem(
|
||||
verticalPadding: 5,
|
||||
isRequired: true,
|
||||
leftText: '纬度',
|
||||
rightText: pd['latitude'] ?? '',
|
||||
isRight: false,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// 动火方法多选
|
||||
Future<void> _chooseHotWorkWay() async {
|
||||
final items = dhworkWays.map((item) => item['dictLabel'] as String).toList();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:intl/intl.dart';
|
||||
import 'package:qhd_prevention/common/route_service.dart';
|
||||
import 'package:qhd_prevention/constants/app_enums.dart';
|
||||
import 'package:qhd_prevention/customWidget/BaiDuMap/map_webview_page.dart';
|
||||
import 'package:qhd_prevention/customWidget/ItemWidgetFactory.dart';
|
||||
import 'package:qhd_prevention/customWidget/bottom_picker.dart';
|
||||
import 'package:qhd_prevention/customWidget/custom_button.dart';
|
||||
|
|
@ -62,6 +63,7 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState<SxkjApplyPage> {
|
|||
"applyTime": "请选择申请时间",
|
||||
"operationTypeName": "请选择作业类型",
|
||||
"limitedSpaceNameAndCode": "请选择有限空间名称及编号",
|
||||
"longitude": "请定位位置",
|
||||
"workContent": "请输入作业内容",
|
||||
"emergencyEquipment": "请输入应急装备",
|
||||
"workDepartment": "请选择作业单位",
|
||||
|
|
@ -150,6 +152,58 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState<SxkjApplyPage> {
|
|||
};
|
||||
}
|
||||
|
||||
Widget _buildCustomLocationWidget() {
|
||||
return Container(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 5),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
border: Border.all(color: Colors.grey.shade300, width: 1),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
ItemListWidget.OneRowButtonTitleText(
|
||||
horizontalnum: 10,
|
||||
label: '地点坐标',
|
||||
isRequired: true,
|
||||
buttonText: '定位',
|
||||
text: '',
|
||||
onTap: () async {
|
||||
final result = await pushPage(MapWebViewPage(), context);
|
||||
if (result != null) {
|
||||
setState(() {
|
||||
pd['longitude'] = result['longitude'].toString();
|
||||
pd['latitude'] = result['latitude'].toString();
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
const Divider(),
|
||||
ItemListWidget.itemContainer(
|
||||
ListItemFactory.createRowSpaceBetweenItem(
|
||||
verticalPadding: 2,
|
||||
isRequired: true,
|
||||
leftText: '经度',
|
||||
rightText: pd['longitude'] ?? '',
|
||||
isRight: false,
|
||||
),
|
||||
),
|
||||
const Divider(),
|
||||
ItemListWidget.itemContainer(
|
||||
ListItemFactory.createRowSpaceBetweenItem(
|
||||
verticalPadding: 5,
|
||||
isRequired: true,
|
||||
leftText: '纬度',
|
||||
rightText: pd['latitude'] ?? '',
|
||||
isRight: false,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget buildFormContent() {
|
||||
final chooseLimitedSpace = (pd['chooseLimitedSpace'] as Map?) ?? {};
|
||||
|
|
@ -321,6 +375,8 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState<SxkjApplyPage> {
|
|||
text: chooseLimitedSpace['separateSafetyMeasures'] ?? '',
|
||||
),
|
||||
const Divider(),
|
||||
_buildCustomLocationWidget(),
|
||||
const Divider(),
|
||||
// 作业内容
|
||||
ItemListWidget.multiLineTitleTextField(
|
||||
label: '作业内容:',
|
||||
|
|
|
|||
|
|
@ -126,13 +126,13 @@ class _PersonSelectionPageState extends State<PersonSelectionPage> {
|
|||
employeePersonUserName: name,
|
||||
group: firstLetter,
|
||||
|
||||
personCorpId: item['deptId']??'',
|
||||
personCorpName: item['deptName']??'',
|
||||
personCorpId: item['corpId']??'',
|
||||
personCorpName: item['corpName']??'',
|
||||
personDepartmentId: item['deptId']??'',
|
||||
personDepartmentName: item['deptName']??'',
|
||||
userFaceUrl: item['deptName']??'',
|
||||
userFaceUrl: item['userFaceUrl']??'',
|
||||
userPhone: item['phone']??'',
|
||||
userCard: item['deptName']??'',
|
||||
userCard: item['userCard']??'',
|
||||
);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import 'package:qhd_prevention/customWidget/custom_button.dart';
|
|||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||
import 'package:qhd_prevention/http/ApiService.dart';
|
||||
import 'package:qhd_prevention/http/modules/key_tasks_api.dart';
|
||||
import 'package:qhd_prevention/pages/WebViewInteractionPage.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/doorAndCar/doorCar_tab_page.dart';
|
||||
|
|
@ -110,6 +111,12 @@ class HomePageState extends RouteAwareState<HomePage>
|
|||
{"icon": "assets/images/ico5.png", "title": "重点作业", "unreadCount": 0},
|
||||
{"icon": "assets/images/ico6.png", "title": "口门门禁", "unreadCount": 0},
|
||||
{"icon": "assets/images/ico7.png", "title": "入港培训", "unreadCount": 0},
|
||||
{
|
||||
"icon": "assets/icon-apps/home_yanruan.png",
|
||||
"title": "设备管理",
|
||||
"isHandle": true,
|
||||
"unreadCount": 0,
|
||||
},
|
||||
];
|
||||
|
||||
// 浮动 AppBar
|
||||
|
|
@ -211,7 +218,13 @@ class HomePageState extends RouteAwareState<HomePage>
|
|||
for (int i = 0; i < buttonInfos.length; i++) {
|
||||
final title = buttonInfos[i]['title'] as String;
|
||||
final perm = _titleToPerm[title];
|
||||
if (perm == null || perm.isEmpty) continue;
|
||||
if (perm == null || perm.isEmpty) {
|
||||
if (buttonInfos[i]['isHandle'] == true && title == '设备管理') {
|
||||
newVisibility[i] =
|
||||
SessionService.instance.userData?.nineCompanyFlag == true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
newVisibility[i] = routeService.hasPerm(perm);
|
||||
} catch (e) {
|
||||
|
|
@ -766,6 +779,14 @@ class HomePageState extends RouteAwareState<HomePage>
|
|||
case "隐患治理":
|
||||
await pushPage(HiddenDangerTabPage(), context);
|
||||
break;
|
||||
case "设备管理":
|
||||
await pushPage(
|
||||
WebViewMediaBridgePage(
|
||||
userId: SessionService.instance.accountId ?? '',
|
||||
),
|
||||
context,
|
||||
);
|
||||
break;
|
||||
default:
|
||||
ToastUtil.showNormal(context, '功能开发中...');
|
||||
break;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -164,6 +164,7 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
|
|||
horizontalnum: 10,
|
||||
label: '安全管理协议',
|
||||
buttonText: '新增',
|
||||
isEdit: widget.type == 2,
|
||||
text: '',
|
||||
onTap: () async {
|
||||
final List<SelectedFile> picked = await DocumentPicker.showPickerModal(
|
||||
|
|
@ -224,6 +225,7 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
|
|||
},
|
||||
),
|
||||
),
|
||||
if (widget.type == 2)
|
||||
CustomButton(
|
||||
text: '删除',
|
||||
height: 30,
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class _KeyTasksPunishmentFilterPageState extends State<KeyTasksPunishmentFilterP
|
|||
_inspectionSiteController.text = searchData['hiddenDesc'];
|
||||
_initiatorInspectionController.text = searchData['xgfCorpinfoName'];
|
||||
_inspectorController.text = searchData['projectName'];
|
||||
_punishmentReasonController.text = searchData['projectName'];
|
||||
_punishmentReasonController.text = searchData['penaltyDesc'];
|
||||
|
||||
});
|
||||
}
|
||||
|
|
@ -113,7 +113,7 @@ class _KeyTasksPunishmentFilterPageState extends State<KeyTasksPunishmentFilterP
|
|||
controller: _punishmentReasonController,
|
||||
hintText: '请输入处罚原因',
|
||||
onChanged: (value) {
|
||||
searchData['projectName'] = value;
|
||||
searchData['penaltyDesc'] = value;
|
||||
},
|
||||
),
|
||||
|
||||
|
|
@ -440,7 +440,10 @@ class _KeyTasksPunishmentFilterPageState extends State<KeyTasksPunishmentFilterP
|
|||
_initiatorInspectionController.clear();
|
||||
_inspectorController.clear();
|
||||
_punishmentReasonController.clear();
|
||||
|
||||
searchData['hiddenDesc'] = '';
|
||||
searchData['xgfCorpinfoName'] = '';
|
||||
searchData['projectName'] = '';
|
||||
searchData['penaltyDesc'] = '';
|
||||
// searchData['hiddenDesc']='';
|
||||
// searchData['source']='';
|
||||
// searchData['sourceName']='';
|
||||
|
|
|
|||
|
|
@ -18,11 +18,8 @@ import 'package:qhd_prevention/tools/h_colors.dart';
|
|||
import 'package:qhd_prevention/tools/tools.dart';
|
||||
import 'dart:async';
|
||||
|
||||
|
||||
|
||||
class KeyTasksPunishmentList extends StatefulWidget {
|
||||
const KeyTasksPunishmentList( {super.key});
|
||||
|
||||
const KeyTasksPunishmentList({super.key});
|
||||
|
||||
@override
|
||||
State<KeyTasksPunishmentList> createState() => _KeyTasksPunishmentListState();
|
||||
|
|
@ -30,6 +27,7 @@ class KeyTasksPunishmentList extends StatefulWidget {
|
|||
|
||||
class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
||||
int _page = 1;
|
||||
|
||||
// String searchKey = "";
|
||||
int _totalPage = 1;
|
||||
|
||||
|
|
@ -54,17 +52,15 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
_searchController.addListener(_onSearchChanged);
|
||||
|
||||
_distinguishData();
|
||||
|
||||
}
|
||||
|
||||
Future<void> _distinguishData() async {
|
||||
|
||||
buttonTextTwo = '反馈';
|
||||
title = "处罚反馈";
|
||||
final parentPerm = 'dashboard:Key-assignment:Hidden-hazard-record';
|
||||
final targetPerm = '';
|
||||
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||
keyTasksPunishmentData['menuPath']=menuPath;
|
||||
buttonTextTwo = '反馈';
|
||||
title = "处罚反馈";
|
||||
final parentPerm = 'dashboard:Key-assignment:Hidden-hazard-record';
|
||||
final targetPerm = '';
|
||||
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||
keyTasksPunishmentData['menuPath'] = menuPath;
|
||||
|
||||
_getListData(false);
|
||||
}
|
||||
|
|
@ -83,7 +79,7 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
final double screenWidth = MediaQuery.of(context).size.width;
|
||||
|
||||
return Scaffold(
|
||||
appBar: MyAppbar(title:title),
|
||||
appBar: MyAppbar(title: title),
|
||||
|
||||
body: SafeArea(
|
||||
child: NotificationListener<ScrollNotification>(
|
||||
|
|
@ -98,47 +94,46 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
Widget _vcDetailWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
|
||||
RangeFilterBar(
|
||||
initial: RangeOption.none,
|
||||
mode: RangeFilterBarMode.dayWeekMonth,
|
||||
onRangeChanged: (range) {
|
||||
switch (range) {
|
||||
case RangeOption.oneDay:
|
||||
keyTasksPunishmentData['hiddenCreateTimeStart'] = DateFormat('yyyy-MM-dd HH:mm:ss')
|
||||
.format(DateTime.now().subtract(const Duration(days: 1)));
|
||||
break;
|
||||
case RangeOption.oneWeek:
|
||||
keyTasksPunishmentData['hiddenCreateTimeStart'] = DateFormat('yyyy-MM-dd HH:mm:ss')
|
||||
.format(DateTime.now().subtract(const Duration(days: 7)));
|
||||
break;
|
||||
case RangeOption.oneMonth:
|
||||
keyTasksPunishmentData['hiddenCreateTimeStart'] = DateFormat('yyyy-MM-dd HH:mm:ss')
|
||||
.format(DateTime.now().subtract(const Duration(days: 30)));
|
||||
break;
|
||||
case RangeOption.threeMonths:
|
||||
break;
|
||||
case RangeOption.none:
|
||||
break;
|
||||
}
|
||||
RangeFilterBar(
|
||||
initial: RangeOption.none,
|
||||
mode: RangeFilterBarMode.dayWeekMonth,
|
||||
onRangeChanged: (range) {
|
||||
switch (range) {
|
||||
case RangeOption.oneDay:
|
||||
keyTasksPunishmentData['hiddenCreateTimeStart'] = DateFormat(
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
).format(DateTime.now().subtract(const Duration(days: 1)));
|
||||
break;
|
||||
case RangeOption.oneWeek:
|
||||
keyTasksPunishmentData['hiddenCreateTimeStart'] = DateFormat(
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
).format(DateTime.now().subtract(const Duration(days: 7)));
|
||||
break;
|
||||
case RangeOption.oneMonth:
|
||||
keyTasksPunishmentData['hiddenCreateTimeStart'] = DateFormat(
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
).format(DateTime.now().subtract(const Duration(days: 30)));
|
||||
break;
|
||||
case RangeOption.threeMonths:
|
||||
break;
|
||||
case RangeOption.none:
|
||||
break;
|
||||
}
|
||||
_performSearch();
|
||||
},
|
||||
onFilterPressed: () async {
|
||||
// 弹出筛选对话框或跳转到筛选页面
|
||||
// String searchData='';
|
||||
final searchData = await pushPage(
|
||||
KeyTasksPunishmentFilterPage(searchData: keyTasksPunishmentData),
|
||||
context,
|
||||
);
|
||||
if (searchData != null) {
|
||||
keyTasksPunishmentData = searchData;
|
||||
_performSearch();
|
||||
},
|
||||
onFilterPressed: () async {
|
||||
// 弹出筛选对话框或跳转到筛选页面
|
||||
// String searchData='';
|
||||
final searchData= await pushPage(
|
||||
KeyTasksPunishmentFilterPage(
|
||||
searchData: keyTasksPunishmentData,
|
||||
),
|
||||
context,
|
||||
);
|
||||
if(searchData!=null){
|
||||
keyTasksPunishmentData=searchData;
|
||||
_performSearch();
|
||||
}
|
||||
|
||||
},
|
||||
),
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
Container(height: 5, color: h_backGroundColor()),
|
||||
Expanded(
|
||||
|
|
@ -157,6 +152,17 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
);
|
||||
}
|
||||
|
||||
// 处罚反馈状态
|
||||
String _getPunishmentStatus(Map data) {
|
||||
// data['feedbackStatus']
|
||||
int status = int.parse('${data['feedbackStatus']}');
|
||||
if (status > 0) {
|
||||
return '已反馈';
|
||||
} else {
|
||||
return '待反馈';
|
||||
}
|
||||
}
|
||||
|
||||
Widget _fxitemCell(pageData) {
|
||||
// 使用GestureDetector包裹整个列表项以添加点击事件
|
||||
return GestureDetector(
|
||||
|
|
@ -224,7 +230,6 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
|
||||
SizedBox(height: 16),
|
||||
|
||||
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 10, right: 10),
|
||||
child: Row(
|
||||
|
|
@ -234,7 +239,7 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
// 隐患状态
|
||||
Expanded(
|
||||
child: Text(
|
||||
'被处罚单位: ${pageData['xgfCorpinfoName']??''}',
|
||||
'被处罚单位: ${pageData['xgfCorpinfoName'] ?? ''}',
|
||||
style: TextStyle(fontSize: 14, color: Colors.black87),
|
||||
),
|
||||
),
|
||||
|
|
@ -253,7 +258,7 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
// 隐患发现人 - 使用 Expanded 包裹
|
||||
Expanded(
|
||||
child: Text(
|
||||
'被处罚人:${pageData['feedbackUserName'] ?? ''}',
|
||||
'被处罚人:${pageData['penalizedUserName'] ?? ''}',
|
||||
style: TextStyle(fontSize: 14, color: Colors.black87),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
|
@ -281,8 +286,8 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
children: [
|
||||
// 整改人
|
||||
Expanded(
|
||||
child:
|
||||
Text('处罚原因: ${pageData['penaltyDesc'] ?? ''}',
|
||||
child: Text(
|
||||
'处罚原因: ${pageData['penaltyDesc'] ?? ''}',
|
||||
style: TextStyle(fontSize: 14, color: Colors.black87),
|
||||
),
|
||||
),
|
||||
|
|
@ -298,8 +303,8 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
children: [
|
||||
// 整改人
|
||||
Expanded(
|
||||
child:
|
||||
Text('下发人: ${pageData['findUserName'] ?? ''}',
|
||||
child: Text(
|
||||
'下发人: ${pageData['findUserName'] ?? ''}',
|
||||
style: TextStyle(fontSize: 14, color: Colors.black87),
|
||||
),
|
||||
),
|
||||
|
|
@ -315,8 +320,8 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
children: [
|
||||
// 整改人
|
||||
Expanded(
|
||||
child:
|
||||
Text('处罚反馈状态: ${pageData['feedbackStatus'] ?? ''}',
|
||||
child: Text(
|
||||
'处罚反馈状态: ${_getPunishmentStatus(pageData)}',
|
||||
style: TextStyle(fontSize: 14, color: Colors.black87),
|
||||
),
|
||||
),
|
||||
|
|
@ -332,8 +337,7 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
children: [
|
||||
// 整改人
|
||||
Expanded(
|
||||
child:
|
||||
Text(
|
||||
child: Text(
|
||||
'重点作业名称: ${pageData['projectName'] ?? ''}',
|
||||
style: TextStyle(fontSize: 14, color: Colors.black87),
|
||||
),
|
||||
|
|
@ -352,52 +356,23 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
),
|
||||
),
|
||||
|
||||
|
||||
SizedBox(height: 8),
|
||||
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
//查看
|
||||
|
||||
Expanded(
|
||||
child: CustomButton(
|
||||
height: 35,
|
||||
onPressed: () async {
|
||||
// print('查看: ${pageData['title']}');
|
||||
await pushPage(
|
||||
KeyTasksHiddenDangerDetail(
|
||||
2,
|
||||
pageData['hiddenTableId']??'',
|
||||
pageData['hiddenId']??'',
|
||||
pageData['foreignKey']??'',
|
||||
false,
|
||||
),
|
||||
context,
|
||||
);
|
||||
_page = 1;
|
||||
_getListData(false);
|
||||
},
|
||||
backgroundColor: h_backGroundColor(),
|
||||
textStyle: const TextStyle(color: Colors.black),
|
||||
buttonStyle: ButtonStyleType.secondary,
|
||||
text: buttonTextOne,
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
SizedBox(width: 10), // 使用width而不是height
|
||||
//查看
|
||||
Expanded(
|
||||
child: CustomButton(
|
||||
height: 35,
|
||||
onPressed: () async {
|
||||
await pushPage(
|
||||
// print('查看: ${pageData['title']}');
|
||||
await pushPage(
|
||||
KeyTasksHiddenDangerDetail(
|
||||
3,
|
||||
pageData['hiddenTableId']??'',
|
||||
pageData['hiddenId']??'',
|
||||
pageData['foreignKey']??'',
|
||||
itemData:pageData,
|
||||
2,
|
||||
pageData['hiddenTableId'] ?? '',
|
||||
pageData['hiddenId'] ?? '',
|
||||
pageData['foreignKey'] ?? '',
|
||||
false,
|
||||
),
|
||||
context,
|
||||
|
|
@ -405,13 +380,39 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
_page = 1;
|
||||
_getListData(false);
|
||||
},
|
||||
backgroundColor: h_AppBarColor(),
|
||||
textStyle: const TextStyle(color: Colors.white),
|
||||
buttonStyle: ButtonStyleType.primary,
|
||||
text: buttonTextTwo,
|
||||
backgroundColor: h_backGroundColor(),
|
||||
textStyle: const TextStyle(color: Colors.black),
|
||||
buttonStyle: ButtonStyleType.secondary,
|
||||
text: buttonTextOne,
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(width: 10), // 使用width而不是height
|
||||
if (int.parse('${pageData['feedbackStatus']}') < 1)
|
||||
Expanded(
|
||||
child: CustomButton(
|
||||
height: 35,
|
||||
onPressed: () async {
|
||||
await pushPage(
|
||||
KeyTasksHiddenDangerDetail(
|
||||
3,
|
||||
pageData['hiddenTableId'] ?? '',
|
||||
pageData['hiddenId'] ?? '',
|
||||
pageData['foreignKey'] ?? '',
|
||||
itemData: pageData,
|
||||
false,
|
||||
),
|
||||
context,
|
||||
);
|
||||
_page = 1;
|
||||
_getListData(false);
|
||||
},
|
||||
backgroundColor: h_AppBarColor(),
|
||||
textStyle: const TextStyle(color: Colors.white),
|
||||
buttonStyle: ButtonStyleType.primary,
|
||||
text: buttonTextTwo,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
|
|
@ -452,17 +453,17 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
Future<void> _getListData(bool loadMore) async {
|
||||
try {
|
||||
if (_isLoading) return;
|
||||
_isLoading = true;
|
||||
|
||||
keyTasksPunishmentData['pageIndex']=_page;
|
||||
keyTasksPunishmentData['pageIndex'] = _page;
|
||||
// keyTasksPunishmentData['hiddenDesc']=searchKey;
|
||||
|
||||
LoadingDialogHelper.show();
|
||||
final Map<String, dynamic> result = await KeyTasksApi.getHiddenDangerPenalty(keyTasksPunishmentData);
|
||||
final Map<String, dynamic> result =
|
||||
await KeyTasksApi.getHiddenDangerPenalty(keyTasksPunishmentData);
|
||||
LoadingDialogHelper.hide();
|
||||
|
||||
if (result['success']) {
|
||||
|
|
@ -504,7 +505,7 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
return "隐患来源:安全环保检查(监管端)";
|
||||
} else if (3 == type) {
|
||||
return "隐患来源:安全环保检查(企业端)";
|
||||
} else {
|
||||
} else {
|
||||
return "隐患来源:";
|
||||
}
|
||||
}
|
||||
|
|
@ -528,15 +529,15 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
String _getState(final item) {
|
||||
//1,未整改,2:已整改,3:已验收,4:验收打回
|
||||
int type = item["state"];
|
||||
if(1==type){
|
||||
if (1 == type) {
|
||||
return "未整改";
|
||||
}else if(2==type){
|
||||
} else if (2 == type) {
|
||||
return "已整改";
|
||||
}else if(3==type){
|
||||
} else if (3 == type) {
|
||||
return "已验收";
|
||||
}else if(4==type){
|
||||
} else if (4 == type) {
|
||||
return "验收打回";
|
||||
}else{
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -560,8 +561,7 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
return input;
|
||||
}
|
||||
|
||||
|
||||
Map<String, dynamic> keyTasksPunishmentData={
|
||||
Map<String, dynamic> keyTasksPunishmentData = {
|
||||
"needTotalCount": true,
|
||||
"pageSize": 20,
|
||||
"orderBy": "",
|
||||
|
|
@ -575,8 +575,6 @@ class _KeyTasksPunishmentListState extends State<KeyTasksPunishmentList> {
|
|||
"orderDirection": "",
|
||||
"findUserName": "",
|
||||
"projectName": "",
|
||||
"hiddenCreateTimeEnd": ""
|
||||
"hiddenCreateTimeEnd": "",
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -340,7 +340,6 @@ class _KeyTasksCheckListPageState extends State<KeyTasksCheckListPage> {
|
|||
Future<void> _fetchData() async {
|
||||
if (isLoading) return;
|
||||
setState(() => isLoading = true);
|
||||
|
||||
try {
|
||||
keyTasksInspectionListData['pageIndex']=currentPage;
|
||||
keyTasksInspectionListData['place']=searchKey;
|
||||
|
|
@ -359,6 +358,7 @@ class _KeyTasksCheckListPageState extends State<KeyTasksCheckListPage> {
|
|||
isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
debugPrint('Error fetching data: $e');
|
||||
setState(() => isLoading = false);
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ class UserData {
|
|||
final String? mappingPostName;
|
||||
final String? mappingDeptName;
|
||||
final dynamic employmentFlag;
|
||||
final bool nineCompanyFlag;
|
||||
|
||||
UserData({
|
||||
this.id,
|
||||
|
|
@ -128,6 +129,7 @@ class UserData {
|
|||
this.mappingPostName,
|
||||
this.mappingDeptName,
|
||||
this.employmentFlag,
|
||||
this.nineCompanyFlag = false,
|
||||
});
|
||||
|
||||
factory UserData.fromJson(Map<String, dynamic> json) {
|
||||
|
|
@ -183,6 +185,10 @@ class UserData {
|
|||
mappingPostName: json['mappingPostName'] as String?,
|
||||
mappingDeptName: json['mappingDeptName'] as String?,
|
||||
employmentFlag: json['employmentFlag'],
|
||||
nineCompanyFlag:
|
||||
json['nineCompanyFlag'] is bool
|
||||
? json['nineCompanyFlag'] as bool
|
||||
: false,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -239,6 +245,7 @@ class UserData {
|
|||
'mappingPostName': mappingPostName,
|
||||
'mappingDeptName': mappingDeptName,
|
||||
'employmentFlag': employmentFlag,
|
||||
'nineCompanyFlag': nineCompanyFlag,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -425,4 +432,4 @@ class SessionService {
|
|||
// await SessionService.instance.saveToPrefs();
|
||||
//
|
||||
// 程序启动时尝试恢复:
|
||||
// await SessionService.instance.loadFromPrefs();
|
||||
// await SessionService.instance.loadFromPrefs();
|
||||
|
|
|
|||
22
pubspec.lock
22
pubspec.lock
|
|
@ -93,10 +93,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
|
||||
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
version: "1.4.1"
|
||||
checked_yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -721,26 +721,26 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
|
||||
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "0.12.17"
|
||||
version: "0.12.19"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
||||
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "0.11.1"
|
||||
version: "0.13.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
|
||||
sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.16.0"
|
||||
version: "1.18.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1174,10 +1174,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
|
||||
sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "0.7.6"
|
||||
version: "0.7.11"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1467,5 +1467,5 @@ packages:
|
|||
source: hosted
|
||||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.9.0 <4.0.0"
|
||||
dart: ">=3.10.0-0 <4.0.0"
|
||||
flutter: ">=3.35.6"
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ flutter:
|
|||
# - family: Schyler
|
||||
# fonts:
|
||||
# - asset: fonts/Schyler-Regular.ttf
|
||||
# - asset: fonts/Schyler-Italic.ttf
|
||||
# - asset: fonts/Schyler-Italic.ttf8846
|
||||
# style: italic
|
||||
# - family: Trajan Pro
|
||||
# fonts:
|
||||
|
|
|
|||
Loading…
Reference in New Issue