危险作业bug修改
parent
95c410bf1b
commit
627ef2201f
File diff suppressed because it is too large
Load Diff
|
|
@ -120,7 +120,7 @@ class RouteService extends ChangeNotifier {
|
||||||
void visit(RouteModel m) {
|
void visit(RouteModel m) {
|
||||||
if (found) return;
|
if (found) return;
|
||||||
// 若父节点不可见,跳过(不再遍历子节点)
|
// 若父节点不可见,跳过(不再遍历子节点)
|
||||||
if (!m.visible) return;
|
if (m.showFlag == 2) return;
|
||||||
|
|
||||||
final mp = (m.menuPerms ?? '').trim();
|
final mp = (m.menuPerms ?? '').trim();
|
||||||
if (mp.isNotEmpty && mp == needle) {
|
if (mp.isNotEmpty && mp == needle) {
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,11 @@ class ApiService {
|
||||||
|
|
||||||
|
|
||||||
/// 图片文件服务
|
/// 图片文件服务
|
||||||
// static final String baseImgPath =
|
static final String baseImgPath =
|
||||||
// isProduct
|
isProduct
|
||||||
// ? "https://jpfz.qhdsafety.com/gbsFileTest/"
|
? "https://jpfz.qhdsafety.com/gbsFileTest/"
|
||||||
// : "http://192.168.20.240:9787/mnt/"; //内网图片地址
|
: "http://192.168.20.240:9787/mnt/"; //内网图片地址
|
||||||
static final String baseImgPath = "https://skqhdg.porthebei.com:9004/file/uploadFiles2/";
|
// static final String baseImgPath = "https://skqhdg.porthebei.com:9004/file/uploadFiles2/";
|
||||||
|
|
||||||
|
|
||||||
static const publicKey =
|
static const publicKey =
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ class SpecialWorkApi {
|
||||||
static Future<Map<String, dynamic>> specialWorkFlowList(String workId) {
|
static Future<Map<String, dynamic>> specialWorkFlowList(String workId) {
|
||||||
return HttpManager().request(
|
return HttpManager().request(
|
||||||
basePath + '/eightwork',
|
basePath + '/eightwork',
|
||||||
'/taskLog/listAll/$workId',
|
'/taskLog/flowChart/$workId',
|
||||||
method: Method.get,
|
method: Method.get,
|
||||||
data: {},
|
data: {},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,6 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
if (_otherMeasuresList.isNotEmpty) ...[
|
if (_otherMeasuresList.isNotEmpty) ...[
|
||||||
const Divider(),
|
|
||||||
ListItemFactory.createBuildSimpleSection('其他安全措施'),
|
ListItemFactory.createBuildSimpleSection('其他安全措施'),
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
|
@ -398,10 +397,11 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
||||||
);
|
);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
),
|
),
|
||||||
|
const Divider(),
|
||||||
|
|
||||||
],
|
],
|
||||||
// 气体分析
|
// 气体分析
|
||||||
if (gasUsername.isNotEmpty) ...[
|
if (gasUsername.isNotEmpty) ...[
|
||||||
const Divider(),
|
|
||||||
ItemListWidget.OneRowButtonTitleText(
|
ItemListWidget.OneRowButtonTitleText(
|
||||||
label: '气体分析人:',
|
label: '气体分析人:',
|
||||||
text: gasUsername,
|
text: gasUsername,
|
||||||
|
|
@ -410,9 +410,10 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
||||||
pushPage(SpecialWorkGasList(data: widget.pd), context);
|
pushPage(SpecialWorkGasList(data: widget.pd), context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
const Divider(),
|
||||||
|
|
||||||
],
|
],
|
||||||
if (delayStatus.isNotEmpty) ...[
|
if (delayStatus.isNotEmpty) ...[
|
||||||
const Divider(),
|
|
||||||
ItemListWidget.OneRowButtonTitleText(
|
ItemListWidget.OneRowButtonTitleText(
|
||||||
label: '延时监火',
|
label: '延时监火',
|
||||||
text: '',
|
text: '',
|
||||||
|
|
@ -421,14 +422,17 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
||||||
pushPage(HotDelayPage(data: widget.pd, isEdit: false,), context);
|
pushPage(HotDelayPage(data: widget.pd, isEdit: false,), context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
const Divider(),
|
||||||
|
|
||||||
],
|
],
|
||||||
if (_finishMeasures.isNotEmpty &&
|
if (_finishMeasures.isNotEmpty &&
|
||||||
pd['specialStepCode'] != 'measures') ...[
|
pd['specialStepCode'] != 'measures') ...[
|
||||||
const Divider(),
|
|
||||||
MeasuresListWidget(
|
MeasuresListWidget(
|
||||||
measuresList: _finishMeasures,
|
measuresList: _finishMeasures,
|
||||||
isAllowEdit: false,
|
isAllowEdit: false,
|
||||||
),
|
),
|
||||||
|
const Divider(),
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -438,7 +442,6 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
||||||
..._buildStepSignWidgets(pd),
|
..._buildStepSignWidgets(pd),
|
||||||
|
|
||||||
if (rejectReason.keys.isNotEmpty) ...[
|
if (rejectReason.keys.isNotEmpty) ...[
|
||||||
const Divider(),
|
|
||||||
ListItemFactory.createBuildSimpleSection('打回信息'),
|
ListItemFactory.createBuildSimpleSection('打回信息'),
|
||||||
// 打回信息
|
// 打回信息
|
||||||
ItemListWidget.singleLineTitleText(
|
ItemListWidget.singleLineTitleText(
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:qhd_prevention/common/route_service.dart';
|
||||||
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
||||||
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
|
|
@ -95,12 +96,15 @@ class _DhWaitPageState extends State<DhWaitPage> {
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
||||||
}else{
|
}else{
|
||||||
|
final parentPerm = 'dashboard:hazardous:work:hot-work:Hot-Work-Operation-Ledger';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
final data = {
|
final data = {
|
||||||
"eqWorkType": SpecialWorkTypeEnum.hotWork.code,
|
"eqWorkType": SpecialWorkTypeEnum.hotWork.code,
|
||||||
"pageSize": rows,
|
"pageSize": rows,
|
||||||
"pageIndex": currentPage,
|
"pageIndex": currentPage,
|
||||||
|
"menuPath" : menuPath,
|
||||||
...searchData
|
...searchData
|
||||||
// "eqStatus" : 1,
|
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkList(data);
|
response = await SpecialWorkApi.specialWorkList(data);
|
||||||
}
|
}
|
||||||
|
|
@ -435,7 +439,7 @@ class _DhWaitPageState extends State<DhWaitPage> {
|
||||||
if (status != '0' && widget.listType == SpecialListType.task) {
|
if (status != '0' && widget.listType == SpecialListType.task) {
|
||||||
buttons.add(
|
buttons.add(
|
||||||
CustomButton(
|
CustomButton(
|
||||||
text: '审批',
|
text: status == '2' ? '编辑' : '审批',
|
||||||
backgroundColor: Colors.blue,
|
backgroundColor: Colors.blue,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_goToDetail(item, true);
|
_goToDetail(item, true);
|
||||||
|
|
|
||||||
|
|
@ -993,7 +993,7 @@ class _HotworkApplyDetailState extends State<HotworkApplyDetail> {
|
||||||
DateTime? picked = await BottomDateTimePicker.showDate(
|
DateTime? picked = await BottomDateTimePicker.showDate(
|
||||||
mode: BottomPickerMode.dateTimeWithSeconds,
|
mode: BottomPickerMode.dateTimeWithSeconds,
|
||||||
context,
|
context,
|
||||||
minTimeStr: pd['workEndTime'] ?? '',
|
minTimeStr: pd['workStartTime'] ?? '',
|
||||||
allowFuture: true,
|
allowFuture: true,
|
||||||
);
|
);
|
||||||
if (picked != null) {
|
if (picked != null) {
|
||||||
|
|
@ -1034,7 +1034,6 @@ class _HotworkApplyDetailState extends State<HotworkApplyDetail> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
|
||||||
if (widget.isReEdit && FormUtils.hasValue(form, 'id')) ...[
|
if (widget.isReEdit && FormUtils.hasValue(form, 'id')) ...[
|
||||||
HotWorkDetailFormWidget(pd: form, isEditable: true),
|
HotWorkDetailFormWidget(pd: form, isEditable: true),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -175,8 +175,8 @@ class _workTabDhListState extends State<workTabDhList> {
|
||||||
|
|
||||||
final button = stepsData[buttonIndex];
|
final button = stepsData[buttonIndex];
|
||||||
final workTypeTitle =
|
final workTypeTitle =
|
||||||
(group is Map && group['groupName'] != null)
|
(button is Map && button['stepName'] != null)
|
||||||
? group['groupName'].toString()
|
? button['stepName'].toString()
|
||||||
: '';
|
: '';
|
||||||
final stepId = button['stepId'] ?? '';
|
final stepId = button['stepId'] ?? '';
|
||||||
await pushPage(
|
await pushPage(
|
||||||
|
|
|
||||||
|
|
@ -965,24 +965,7 @@ class _DlApplyPageState extends State<DlApplyPage> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildDetail() {
|
Widget _buildDetail() {
|
||||||
List linkWorks = pd['linkSpecialWorks'] ?? [];
|
|
||||||
String linkShowStr = linkWorks
|
|
||||||
.map((item) {
|
|
||||||
final workName = item['workTypeName'];
|
|
||||||
final checkNo = item['checkNo'] ?? '';
|
|
||||||
return '$workName $checkNo';
|
|
||||||
})
|
|
||||||
.toList()
|
|
||||||
.join(',');
|
|
||||||
List riskResults = pd['riskResults'] ?? [];
|
|
||||||
String riskShowStr =
|
|
||||||
riskResults
|
|
||||||
.map((item) {
|
|
||||||
final riskResultName = item['riskResultName'];
|
|
||||||
return riskResultName;
|
|
||||||
})
|
|
||||||
.toList()
|
|
||||||
.join();
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
|
|
@ -1148,7 +1131,7 @@ class _DlApplyPageState extends State<DlApplyPage> {
|
||||||
DateTime? picked = await BottomDateTimePicker.showDate(
|
DateTime? picked = await BottomDateTimePicker.showDate(
|
||||||
mode: BottomPickerMode.dateTimeWithSeconds,
|
mode: BottomPickerMode.dateTimeWithSeconds,
|
||||||
context,
|
context,
|
||||||
minTimeStr: pd['workEndTime'] ?? '',
|
minTimeStr: pd['workStartTime'] ?? '',
|
||||||
allowFuture: true,
|
allowFuture: true,
|
||||||
);
|
);
|
||||||
if (picked != null) {
|
if (picked != null) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:qhd_prevention/common/route_service.dart';
|
||||||
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
||||||
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
|
|
@ -94,12 +95,15 @@ class _DlWaitPageState extends State<DlWaitPage> {
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
||||||
} else {
|
} else {
|
||||||
|
final parentPerm = 'dashboard:hazardous:work:circuit-breaking-operation:Circuit-Breaker-Work-Ledger';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
final data = {
|
final data = {
|
||||||
"eqWorkType": SpecialWorkTypeEnum.cutRoadWork.code,
|
"eqWorkType": SpecialWorkTypeEnum.cutRoadWork.code,
|
||||||
"pageSize": rows,
|
"pageSize": rows,
|
||||||
"pageIndex": currentPage,
|
"pageIndex": currentPage,
|
||||||
...searchData,
|
"menuPath" : menuPath,
|
||||||
// "eqStatus" : 1,
|
...searchData
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkList(data);
|
response = await SpecialWorkApi.specialWorkList(data);
|
||||||
}
|
}
|
||||||
|
|
@ -504,7 +508,7 @@ class _DlWaitPageState extends State<DlWaitPage> {
|
||||||
if (status != '0' && widget.listType == SpecialListType.task) {
|
if (status != '0' && widget.listType == SpecialListType.task) {
|
||||||
buttons.add(
|
buttons.add(
|
||||||
CustomButton(
|
CustomButton(
|
||||||
text: '审批',
|
text: status == '2' ? '编辑' : '审批',
|
||||||
backgroundColor: Colors.blue,
|
backgroundColor: Colors.blue,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_goToDetail(item, true);
|
_goToDetail(item, true);
|
||||||
|
|
|
||||||
|
|
@ -170,8 +170,8 @@ class _WorkTabDlListState extends State<WorkTabDlList> {
|
||||||
|
|
||||||
final button = stepsData[buttonIndex];
|
final button = stepsData[buttonIndex];
|
||||||
final workTypeTitle =
|
final workTypeTitle =
|
||||||
(group is Map && group['groupName'] != null)
|
(button is Map && button['stepName'] != null)
|
||||||
? group['groupName'].toString()
|
? button['stepName'].toString()
|
||||||
: '';
|
: '';
|
||||||
final stepId = button['stepId'] ?? '';
|
final stepId = button['stepId'] ?? '';
|
||||||
await pushPage(DlWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task), context);
|
await pushPage(DlWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task), context);
|
||||||
|
|
|
||||||
|
|
@ -962,24 +962,7 @@ class _DtApplyPageState extends State<DtApplyPage> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildDetail() {
|
Widget _buildDetail() {
|
||||||
List linkWorks = pd['linkSpecialWorks'] ?? [];
|
|
||||||
String linkShowStr = linkWorks
|
|
||||||
.map((item) {
|
|
||||||
final workName = item['workTypeName'];
|
|
||||||
final checkNo = item['checkNo'] ?? '';
|
|
||||||
return '$workName $checkNo';
|
|
||||||
})
|
|
||||||
.toList()
|
|
||||||
.join(',');
|
|
||||||
List riskResults = pd['riskResults'] ?? [];
|
|
||||||
String riskShowStr =
|
|
||||||
riskResults
|
|
||||||
.map((item) {
|
|
||||||
final riskResultName = item['riskResultName'];
|
|
||||||
return riskResultName;
|
|
||||||
})
|
|
||||||
.toList()
|
|
||||||
.join();
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
|
|
@ -1069,7 +1052,7 @@ class _DtApplyPageState extends State<DtApplyPage> {
|
||||||
DateTime? picked = await BottomDateTimePicker.showDate(
|
DateTime? picked = await BottomDateTimePicker.showDate(
|
||||||
mode: BottomPickerMode.dateTimeWithSeconds,
|
mode: BottomPickerMode.dateTimeWithSeconds,
|
||||||
context,
|
context,
|
||||||
minTimeStr: pd['workEndTime'] ?? '',
|
minTimeStr: pd['workStartTime'] ?? '',
|
||||||
allowFuture: true,
|
allowFuture: true,
|
||||||
);
|
);
|
||||||
if (picked != null) {
|
if (picked != null) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:qhd_prevention/common/route_service.dart';
|
||||||
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
||||||
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
|
|
@ -78,13 +79,6 @@ class _DtWaitPageState extends State<DtWaitPage> {
|
||||||
setState(() => isLoading = true);
|
setState(() => isLoading = true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final data = {
|
|
||||||
"eqWorkType": "confinedspace_work",
|
|
||||||
"pageSize": rows,
|
|
||||||
"pageIndex": currentPage,
|
|
||||||
...searchData,
|
|
||||||
"eqStepId": widget.stepId,
|
|
||||||
};
|
|
||||||
var response = {};
|
var response = {};
|
||||||
if (widget.listType == SpecialListType.task) {
|
if (widget.listType == SpecialListType.task) {
|
||||||
final data = {
|
final data = {
|
||||||
|
|
@ -95,12 +89,15 @@ class _DtWaitPageState extends State<DtWaitPage> {
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
||||||
}else{
|
}else{
|
||||||
|
final parentPerm = 'dashboard:hazardous:work:earthwork-operations:Earthmoving-Work-Ledger';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
final data = {
|
final data = {
|
||||||
"eqWorkType": SpecialWorkTypeEnum.breakgroundWork.code,
|
"eqWorkType": SpecialWorkTypeEnum.breakgroundWork.code,
|
||||||
"pageSize": rows,
|
"pageSize": rows,
|
||||||
"pageIndex": currentPage,
|
"pageIndex": currentPage,
|
||||||
|
"menuPath" : menuPath,
|
||||||
...searchData
|
...searchData
|
||||||
// "eqStatus" : 1,
|
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkList(data);
|
response = await SpecialWorkApi.specialWorkList(data);
|
||||||
}
|
}
|
||||||
|
|
@ -491,7 +488,7 @@ class _DtWaitPageState extends State<DtWaitPage> {
|
||||||
if (status != '0' && widget.listType == SpecialListType.task) {
|
if (status != '0' && widget.listType == SpecialListType.task) {
|
||||||
buttons.add(
|
buttons.add(
|
||||||
CustomButton(
|
CustomButton(
|
||||||
text: '审批',
|
text: status == '2' ? '编辑' : '审批',
|
||||||
backgroundColor: Colors.blue,
|
backgroundColor: Colors.blue,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_goToDetail(item, true);
|
_goToDetail(item, true);
|
||||||
|
|
|
||||||
|
|
@ -170,8 +170,8 @@ class _WorkTabDtListState extends State<WorkTabDtList> {
|
||||||
|
|
||||||
final button = stepsData[buttonIndex];
|
final button = stepsData[buttonIndex];
|
||||||
final workTypeTitle =
|
final workTypeTitle =
|
||||||
(group is Map && group['groupName'] != null)
|
(button is Map && button['stepName'] != null)
|
||||||
? group['groupName'].toString()
|
? button['stepName'].toString()
|
||||||
: '';
|
: '';
|
||||||
final stepId = button['stepId'] ?? '';
|
final stepId = button['stepId'] ?? '';
|
||||||
await pushPage(DtWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task), context);
|
await pushPage(DtWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task), context);
|
||||||
|
|
|
||||||
|
|
@ -968,24 +968,7 @@ class _DzApplyPageState extends State<DzApplyPage> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildDetail() {
|
Widget _buildDetail() {
|
||||||
List linkWorks = pd['linkSpecialWorks'] ?? [];
|
|
||||||
String linkShowStr = linkWorks
|
|
||||||
.map((item) {
|
|
||||||
final workName = item['workTypeName'];
|
|
||||||
final checkNo = item['checkNo'] ?? '';
|
|
||||||
return '$workName $checkNo';
|
|
||||||
})
|
|
||||||
.toList()
|
|
||||||
.join(',');
|
|
||||||
List riskResults = pd['riskResults'] ?? [];
|
|
||||||
String riskShowStr =
|
|
||||||
riskResults
|
|
||||||
.map((item) {
|
|
||||||
final riskResultName = item['riskResultName'];
|
|
||||||
return riskResultName;
|
|
||||||
})
|
|
||||||
.toList()
|
|
||||||
.join();
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
|
|
@ -1149,7 +1132,7 @@ class _DzApplyPageState extends State<DzApplyPage> {
|
||||||
DateTime? picked = await BottomDateTimePicker.showDate(
|
DateTime? picked = await BottomDateTimePicker.showDate(
|
||||||
mode: BottomPickerMode.dateTimeWithSeconds,
|
mode: BottomPickerMode.dateTimeWithSeconds,
|
||||||
context,
|
context,
|
||||||
minTimeStr: pd['workEndTime'] ?? '',
|
minTimeStr: pd['workStartTime'] ?? '',
|
||||||
allowFuture: true,
|
allowFuture: true,
|
||||||
);
|
);
|
||||||
if (picked != null) {
|
if (picked != null) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:qhd_prevention/common/route_service.dart';
|
||||||
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
||||||
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
|
|
@ -78,13 +79,6 @@ class _DzWaitPageState extends State<DzWaitPage> {
|
||||||
setState(() => isLoading = true);
|
setState(() => isLoading = true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final data = {
|
|
||||||
"eqWorkType": "confinedspace_work",
|
|
||||||
"pageSize": rows,
|
|
||||||
"pageIndex": currentPage,
|
|
||||||
...searchData,
|
|
||||||
"eqStepId": widget.stepId,
|
|
||||||
};
|
|
||||||
var response = {};
|
var response = {};
|
||||||
if (widget.listType == SpecialListType.task) {
|
if (widget.listType == SpecialListType.task) {
|
||||||
final data = {
|
final data = {
|
||||||
|
|
@ -95,12 +89,15 @@ class _DzWaitPageState extends State<DzWaitPage> {
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
||||||
}else{
|
}else{
|
||||||
|
final parentPerm = 'dashboard:hazardous:work:hoisting-operations:Hoisting-Operation-Ledger';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
final data = {
|
final data = {
|
||||||
"eqWorkType": SpecialWorkTypeEnum.hoistingWork.code,
|
"eqWorkType": SpecialWorkTypeEnum.hoistingWork.code,
|
||||||
"pageSize": rows,
|
"pageSize": rows,
|
||||||
"pageIndex": currentPage,
|
"pageIndex": currentPage,
|
||||||
|
"menuPath" : menuPath,
|
||||||
...searchData
|
...searchData
|
||||||
// "eqStatus" : 1,
|
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkList(data);
|
response = await SpecialWorkApi.specialWorkList(data);
|
||||||
}
|
}
|
||||||
|
|
@ -490,7 +487,7 @@ class _DzWaitPageState extends State<DzWaitPage> {
|
||||||
if (status != '0' && widget.listType == SpecialListType.task) {
|
if (status != '0' && widget.listType == SpecialListType.task) {
|
||||||
buttons.add(
|
buttons.add(
|
||||||
CustomButton(
|
CustomButton(
|
||||||
text: '审批',
|
text: status == '2' ? '编辑' : '审批',
|
||||||
backgroundColor: Colors.blue,
|
backgroundColor: Colors.blue,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_goToDetail(item, true);
|
_goToDetail(item, true);
|
||||||
|
|
|
||||||
|
|
@ -170,8 +170,8 @@ class _WorkTabDzListState extends State<WorkTabDzList> {
|
||||||
|
|
||||||
final button = stepsData[buttonIndex];
|
final button = stepsData[buttonIndex];
|
||||||
final workTypeTitle =
|
final workTypeTitle =
|
||||||
(group is Map && group['groupName'] != null)
|
(button is Map && button['stepName'] != null)
|
||||||
? group['groupName'].toString()
|
? button['stepName'].toString()
|
||||||
: '';
|
: '';
|
||||||
final stepId = button['stepId'] ?? '';
|
final stepId = button['stepId'] ?? '';
|
||||||
await pushPage(DzWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task), context);
|
await pushPage(DzWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task), context);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:qhd_prevention/common/route_service.dart';
|
||||||
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
||||||
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
|
|
@ -78,13 +79,7 @@ class _GcWaitPageState extends State<GcWaitPage> {
|
||||||
setState(() => isLoading = true);
|
setState(() => isLoading = true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final data = {
|
|
||||||
"eqWorkType": "confinedspace_work",
|
|
||||||
"pageSize": rows,
|
|
||||||
"pageIndex": currentPage,
|
|
||||||
...searchData,
|
|
||||||
"eqStepId": widget.stepId,
|
|
||||||
};
|
|
||||||
var response = {};
|
var response = {};
|
||||||
if (widget.listType == SpecialListType.task) {
|
if (widget.listType == SpecialListType.task) {
|
||||||
final data = {
|
final data = {
|
||||||
|
|
@ -95,12 +90,15 @@ class _GcWaitPageState extends State<GcWaitPage> {
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
||||||
}else{
|
}else{
|
||||||
|
final parentPerm = 'dashboard:hazardous:work:work-at-height:High-altitude-Work-Ledger';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
final data = {
|
final data = {
|
||||||
"eqWorkType": SpecialWorkTypeEnum.highWork.code,
|
"eqWorkType": SpecialWorkTypeEnum.highWork.code,
|
||||||
"pageSize": rows,
|
"pageSize": rows,
|
||||||
"pageIndex": currentPage,
|
"pageIndex": currentPage,
|
||||||
|
"menuPath" : menuPath,
|
||||||
...searchData
|
...searchData
|
||||||
// "eqStatus" : 1,
|
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkList(data);
|
response = await SpecialWorkApi.specialWorkList(data);
|
||||||
}
|
}
|
||||||
|
|
@ -493,7 +491,7 @@ class _GcWaitPageState extends State<GcWaitPage> {
|
||||||
if (status != '0' && widget.listType == SpecialListType.task) {
|
if (status != '0' && widget.listType == SpecialListType.task) {
|
||||||
buttons.add(
|
buttons.add(
|
||||||
CustomButton(
|
CustomButton(
|
||||||
text: '审批',
|
text: status == '2' ? '编辑' : '审批',
|
||||||
backgroundColor: Colors.blue,
|
backgroundColor: Colors.blue,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_goToDetail(item, true);
|
_goToDetail(item, true);
|
||||||
|
|
|
||||||
|
|
@ -170,8 +170,8 @@ class _WorkTabGcListState extends State<WorkTabGcList> {
|
||||||
|
|
||||||
final button = stepsData[buttonIndex];
|
final button = stepsData[buttonIndex];
|
||||||
final workTypeTitle =
|
final workTypeTitle =
|
||||||
(group is Map && group['groupName'] != null)
|
(button is Map && button['stepName'] != null)
|
||||||
? group['groupName'].toString()
|
? button['stepName'].toString()
|
||||||
: '';
|
: '';
|
||||||
final stepId = button['stepId'] ?? '';
|
final stepId = button['stepId'] ?? '';
|
||||||
await pushPage(GcWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task), context);
|
await pushPage(GcWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task), context);
|
||||||
|
|
|
||||||
|
|
@ -1143,7 +1143,7 @@ class _LsydApplyPageState extends State<LsydApplyPage> {
|
||||||
DateTime? picked = await BottomDateTimePicker.showDate(
|
DateTime? picked = await BottomDateTimePicker.showDate(
|
||||||
mode: BottomPickerMode.dateTimeWithSeconds,
|
mode: BottomPickerMode.dateTimeWithSeconds,
|
||||||
context,
|
context,
|
||||||
minTimeStr: pd['workEndTime'] ?? '',
|
minTimeStr: pd['workStartTime'] ?? '',
|
||||||
allowFuture: true,
|
allowFuture: true,
|
||||||
);
|
);
|
||||||
if (picked != null) {
|
if (picked != null) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:qhd_prevention/common/route_service.dart';
|
||||||
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
||||||
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
|
|
@ -79,13 +80,6 @@ class _LsydWaitPageState extends State<LsydWaitPage> {
|
||||||
setState(() => isLoading = true);
|
setState(() => isLoading = true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final data = {
|
|
||||||
"eqWorkType": "confinedspace_work",
|
|
||||||
"pageSize": rows,
|
|
||||||
"pageIndex": currentPage,
|
|
||||||
...searchData,
|
|
||||||
"eqStepId": widget.stepId,
|
|
||||||
};
|
|
||||||
var response = {};
|
var response = {};
|
||||||
if (widget.listType == SpecialListType.task) {
|
if (widget.listType == SpecialListType.task) {
|
||||||
final data = {
|
final data = {
|
||||||
|
|
@ -96,12 +90,15 @@ class _LsydWaitPageState extends State<LsydWaitPage> {
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
||||||
}else{
|
}else{
|
||||||
|
final parentPerm = 'dashboard:hazardous:work:temporary-electrical-work:Temporary-Electricity-Work-Ledger';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
final data = {
|
final data = {
|
||||||
"eqWorkType": SpecialWorkTypeEnum.electricityWork.code,
|
"eqWorkType": SpecialWorkTypeEnum.electricityWork.code,
|
||||||
"pageSize": rows,
|
"pageSize": rows,
|
||||||
"pageIndex": currentPage,
|
"pageIndex": currentPage,
|
||||||
|
"menuPath" : menuPath,
|
||||||
...searchData
|
...searchData
|
||||||
// "eqStatus" : 1,
|
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkList(data);
|
response = await SpecialWorkApi.specialWorkList(data);
|
||||||
}
|
}
|
||||||
|
|
@ -516,7 +513,7 @@ class _LsydWaitPageState extends State<LsydWaitPage> {
|
||||||
if (status != '0' && widget.listType == SpecialListType.task) {
|
if (status != '0' && widget.listType == SpecialListType.task) {
|
||||||
buttons.add(
|
buttons.add(
|
||||||
CustomButton(
|
CustomButton(
|
||||||
text: '审批',
|
text: status == '2' ? '编辑' : '审批',
|
||||||
backgroundColor: Colors.blue,
|
backgroundColor: Colors.blue,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_goToDetail(item, true);
|
_goToDetail(item, true);
|
||||||
|
|
|
||||||
|
|
@ -170,8 +170,8 @@ class _WorkTabLsydListState extends State<WorkTabLsydList> {
|
||||||
|
|
||||||
final button = stepsData[buttonIndex];
|
final button = stepsData[buttonIndex];
|
||||||
final workTypeTitle =
|
final workTypeTitle =
|
||||||
(group is Map && group['groupName'] != null)
|
(button is Map && button['stepName'] != null)
|
||||||
? group['groupName'].toString()
|
? button['stepName'].toString()
|
||||||
: '';
|
: '';
|
||||||
final stepId = button['stepId'] ?? '';
|
final stepId = button['stepId'] ?? '';
|
||||||
await pushPage(LsydWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task), context);
|
await pushPage(LsydWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task), context);
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ class _MbcdApplyPageState extends State<MbcdApplyPage> {
|
||||||
// 初始化必填规则
|
// 初始化必填规则
|
||||||
final Map<String, dynamic> _requiredRules = {
|
final Map<String, dynamic> _requiredRules = {
|
||||||
"operationTypeName": "请选择作业类型",
|
"operationTypeName": "请选择作业类型",
|
||||||
"blindboardWorkName": "请选择作业类别",
|
"blindboardWorkTypeName": "请选择作业类别",
|
||||||
"devicePipelineName": "请输入设备管道名称",
|
"devicePipelineName": "请输入设备管道名称",
|
||||||
"workStartTime": "请选择作业开始时间",
|
"workStartTime": "请选择作业开始时间",
|
||||||
"workUserName": "请填写作业人",
|
"workUserName": "请填写作业人",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:qhd_prevention/common/route_service.dart';
|
||||||
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
||||||
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
|
|
@ -78,13 +79,6 @@ class _MbcdWaitPageState extends State<MbcdWaitPage> {
|
||||||
setState(() => isLoading = true);
|
setState(() => isLoading = true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final data = {
|
|
||||||
"eqWorkType": "confinedspace_work",
|
|
||||||
"pageSize": rows,
|
|
||||||
"pageIndex": currentPage,
|
|
||||||
...searchData,
|
|
||||||
"eqStepId": widget.stepId,
|
|
||||||
};
|
|
||||||
var response = {};
|
var response = {};
|
||||||
if (widget.listType == SpecialListType.task) {
|
if (widget.listType == SpecialListType.task) {
|
||||||
final data = {
|
final data = {
|
||||||
|
|
@ -95,12 +89,15 @@ class _MbcdWaitPageState extends State<MbcdWaitPage> {
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
||||||
}else{
|
}else{
|
||||||
|
final parentPerm = 'dashboard:hazardous:work:blind-flange-plugging-operation:Blind-Flange-Blocking-Work-Ledger';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
final data = {
|
final data = {
|
||||||
"eqWorkType": SpecialWorkTypeEnum.blindboardWork.code,
|
"eqWorkType": SpecialWorkTypeEnum.blindboardWork.code,
|
||||||
"pageSize": rows,
|
"pageSize": rows,
|
||||||
"pageIndex": currentPage,
|
"pageIndex": currentPage,
|
||||||
|
"menuPath" : menuPath,
|
||||||
...searchData
|
...searchData
|
||||||
// "eqStatus" : 1,
|
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkList(data);
|
response = await SpecialWorkApi.specialWorkList(data);
|
||||||
}
|
}
|
||||||
|
|
@ -490,7 +487,7 @@ class _MbcdWaitPageState extends State<MbcdWaitPage> {
|
||||||
if (status != '0' && widget.listType == SpecialListType.task) {
|
if (status != '0' && widget.listType == SpecialListType.task) {
|
||||||
buttons.add(
|
buttons.add(
|
||||||
CustomButton(
|
CustomButton(
|
||||||
text: '审批',
|
text: status == '2' ? '编辑' : '审批',
|
||||||
backgroundColor: Colors.blue,
|
backgroundColor: Colors.blue,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_goToDetail(item, true);
|
_goToDetail(item, true);
|
||||||
|
|
|
||||||
|
|
@ -170,8 +170,8 @@ class _WorkTabMbcdListState extends State<WorkTabMbcdList> {
|
||||||
|
|
||||||
final button = stepsData[buttonIndex];
|
final button = stepsData[buttonIndex];
|
||||||
final workTypeTitle =
|
final workTypeTitle =
|
||||||
(group is Map && group['groupName'] != null)
|
(button is Map && button['stepName'] != null)
|
||||||
? group['groupName'].toString()
|
? button['stepName'].toString()
|
||||||
: '';
|
: '';
|
||||||
final stepId = button['stepId'] ?? '';
|
final stepId = button['stepId'] ?? '';
|
||||||
await pushPage(MbcdWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task), context);
|
await pushPage(MbcdWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task), context);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:qhd_prevention/common/route_service.dart';
|
||||||
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
import 'package:qhd_prevention/customWidget/custom_alert_dialog.dart';
|
||||||
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
|
|
@ -79,13 +80,6 @@ class _SxkjWaitPageState extends State<SxkjWaitPage> {
|
||||||
setState(() => isLoading = true);
|
setState(() => isLoading = true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final data = {
|
|
||||||
"eqWorkType": "confinedspace_work",
|
|
||||||
"pageSize": rows,
|
|
||||||
"pageIndex": currentPage,
|
|
||||||
...searchData,
|
|
||||||
"eqStepId": widget.stepId,
|
|
||||||
};
|
|
||||||
var response = {};
|
var response = {};
|
||||||
if (widget.listType == SpecialListType.task) {
|
if (widget.listType == SpecialListType.task) {
|
||||||
final data = {
|
final data = {
|
||||||
|
|
@ -96,12 +90,15 @@ class _SxkjWaitPageState extends State<SxkjWaitPage> {
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
response = await SpecialWorkApi.specialWorkTaskLogList(data);
|
||||||
}else{
|
}else{
|
||||||
|
final parentPerm = 'dashboard:hazardous:work:confined-space-operations:Confined-Space-Work-Ledger';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
final data = {
|
final data = {
|
||||||
"eqWorkType": SpecialWorkTypeEnum.confinedspaceWork.code,
|
"eqWorkType": SpecialWorkTypeEnum.confinedspaceWork.code,
|
||||||
"pageSize": rows,
|
"pageSize": rows,
|
||||||
"pageIndex": currentPage,
|
"pageIndex": currentPage,
|
||||||
|
"menuPath" : menuPath,
|
||||||
...searchData
|
...searchData
|
||||||
// "eqStatus" : 1,
|
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkList(data);
|
response = await SpecialWorkApi.specialWorkList(data);
|
||||||
}
|
}
|
||||||
|
|
@ -430,7 +427,7 @@ class _SxkjWaitPageState extends State<SxkjWaitPage> {
|
||||||
if (status != '0' && widget.listType == SpecialListType.task) {
|
if (status != '0' && widget.listType == SpecialListType.task) {
|
||||||
buttons.add(
|
buttons.add(
|
||||||
CustomButton(
|
CustomButton(
|
||||||
text: '审批',
|
text: status == '2' ? '编辑' : '审批',
|
||||||
backgroundColor: Colors.blue,
|
backgroundColor: Colors.blue,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_goToDetail(item, true);
|
_goToDetail(item, true);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:qhd_prevention/common/route_service.dart';
|
||||||
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
import 'package:qhd_prevention/CustomWidget/range_filter_bar.dart';
|
import 'package:qhd_prevention/CustomWidget/range_filter_bar.dart';
|
||||||
|
|
@ -71,12 +72,6 @@ class _SxkjTzListPageState extends State<SxkjTzListPage> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _fetchSteps() async {
|
|
||||||
try {} 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);
|
||||||
|
|
@ -84,10 +79,15 @@ class _SxkjTzListPageState extends State<SxkjTzListPage> {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
var response = {};
|
var response = {};
|
||||||
|
final parentPerm = 'dashboard:hazardous:work:confined-space-operations:confined-space-management-ledger';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
final data = {
|
final data = {
|
||||||
"eqWorkType": "confinedspace_work",
|
"eqWorkType": "confinedspace_work",
|
||||||
"pageSize": rows,
|
"pageSize": rows,
|
||||||
"pageIndex": currentPage,
|
"pageIndex": currentPage,
|
||||||
|
"menuPath" : menuPath,
|
||||||
|
...searchData
|
||||||
};
|
};
|
||||||
response = await SpecialWorkApi.specialWorkLimitedSpaceList(data);
|
response = await SpecialWorkApi.specialWorkLimitedSpaceList(data);
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
|
||||||
|
|
@ -180,8 +180,8 @@ class _WorkTabSpaceListState extends State<WorkTabSpaceList> {
|
||||||
|
|
||||||
final button = stepsData[buttonIndex];
|
final button = stepsData[buttonIndex];
|
||||||
final workTypeTitle =
|
final workTypeTitle =
|
||||||
(group is Map && group['groupName'] != null)
|
(button is Map && button['stepName'] != null)
|
||||||
? group['groupName'].toString()
|
? button['stepName'].toString()
|
||||||
: '';
|
: '';
|
||||||
final stepId = button['stepId'] ?? '';
|
final stepId = button['stepId'] ?? '';
|
||||||
await pushPage(SxkjWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task,), context);
|
await pushPage(SxkjWaitPage(stepId: stepId, workTypeTitle: workTypeTitle , listType: SpecialListType.task,), context);
|
||||||
|
|
|
||||||
|
|
@ -25,59 +25,59 @@ class WorkTabListPage extends StatefulWidget {
|
||||||
class _WorkTabListPageState extends RouteAwareState<WorkTabListPage> {
|
class _WorkTabListPageState extends RouteAwareState<WorkTabListPage> {
|
||||||
final List<_WorkButtonConfig> _allButtons = [
|
final List<_WorkButtonConfig> _allButtons = [
|
||||||
_WorkButtonConfig(
|
_WorkButtonConfig(
|
||||||
icon: 'assets/image/wxzy_ico7.png',
|
icon: 'assets/images/wxzy_ico7.png',
|
||||||
title: '动火作业',
|
title: '动火作业',
|
||||||
workType: 'hot_work',
|
workType: 'hot_work',
|
||||||
menuPerms: 'dashboard:hazardous-work:hot-work',
|
menuPerms: 'dashboard:hazardous:work:hot-work',
|
||||||
pageBuilder: () => workTabDhList(),
|
pageBuilder: () => workTabDhList(),
|
||||||
),
|
),
|
||||||
_WorkButtonConfig(
|
_WorkButtonConfig(
|
||||||
icon: 'assets/image/wxzy_ico6.png',
|
icon: 'assets/images/wxzy_ico6.png',
|
||||||
title: '受限空间作业',
|
title: '受限空间作业',
|
||||||
workType: 'confinedspace_work',
|
workType: 'confinedspace_work',
|
||||||
menuPerms: 'dashboard:hazardous-work:confined-space-operations',
|
menuPerms: 'dashboard:hazardous:work:confined-space-operations',
|
||||||
pageBuilder: () => WorkTabSpaceList(),
|
pageBuilder: () => WorkTabSpaceList(),
|
||||||
),
|
),
|
||||||
_WorkButtonConfig(
|
_WorkButtonConfig(
|
||||||
icon: 'assets/image/wxzy_ico5.png',
|
icon: 'assets/images/wxzy_ico5.png',
|
||||||
title: '高处作业',
|
title: '高处作业',
|
||||||
workType: 'high_work',
|
workType: 'high_work',
|
||||||
menuPerms: 'dashboard:hazardous-work:work-at-height',
|
menuPerms: 'dashboard:hazardous:work:work-at-height',
|
||||||
pageBuilder: () => WorkTabGcList(),
|
pageBuilder: () => WorkTabGcList(),
|
||||||
),
|
),
|
||||||
_WorkButtonConfig(
|
_WorkButtonConfig(
|
||||||
icon: 'assets/image/wxzy_ico4.png',
|
icon: 'assets/images/wxzy_ico4.png',
|
||||||
title: '动土作业',
|
title: '动土作业',
|
||||||
workType: 'breakground_work',
|
workType: 'breakground_work',
|
||||||
menuPerms: 'dashboard:hazardous-work:earthwork-operations',
|
menuPerms: 'dashboard:hazardous:work:earthwork-operations',
|
||||||
pageBuilder: () => WorkTabDtList(),
|
pageBuilder: () => WorkTabDtList(),
|
||||||
),
|
),
|
||||||
_WorkButtonConfig(
|
_WorkButtonConfig(
|
||||||
icon: 'assets/image/wxzy_ico3.png',
|
icon: 'assets/images/wxzy_ico3.png',
|
||||||
title: '吊装作业',
|
title: '吊装作业',
|
||||||
workType: 'hoisting_work',
|
workType: 'hoisting_work',
|
||||||
menuPerms: 'dashboard:hazardous-work:hoisting-operations',
|
menuPerms: 'dashboard:hazardous:work:hoisting-operations',
|
||||||
pageBuilder: () => WorkTabDzList(),
|
pageBuilder: () => WorkTabDzList(),
|
||||||
),
|
),
|
||||||
_WorkButtonConfig(
|
_WorkButtonConfig(
|
||||||
icon: 'assets/image/wxzy_ico2.png',
|
icon: 'assets/images/wxzy_ico2.png',
|
||||||
title: '断路作业',
|
title: '断路作业',
|
||||||
workType: 'cutroad_work',
|
workType: 'cutroad_work',
|
||||||
menuPerms: 'dashboard:hazardous-work:circuit-breaking-operation',
|
menuPerms: 'dashboard:hazardous:work:circuit-breaking-operation',
|
||||||
pageBuilder: () => WorkTabDlList(),
|
pageBuilder: () => WorkTabDlList(),
|
||||||
),
|
),
|
||||||
_WorkButtonConfig(
|
_WorkButtonConfig(
|
||||||
icon: 'assets/image/wxzy_ico1.png',
|
icon: 'assets/images/wxzy_ico1.png',
|
||||||
title: '临时用电作业',
|
title: '临时用电作业',
|
||||||
workType: 'electricity_work',
|
workType: 'electricity_work',
|
||||||
menuPerms: 'dashboard:hazardous-work:temporary-electrical-work',
|
menuPerms: 'dashboard:hazardous:work:temporary-electrical-work',
|
||||||
pageBuilder: () => WorkTabLsydList(),
|
pageBuilder: () => WorkTabLsydList(),
|
||||||
),
|
),
|
||||||
_WorkButtonConfig(
|
_WorkButtonConfig(
|
||||||
icon: 'assets/image/wxzy_ico8.png',
|
icon: 'assets/images/wxzy_ico8.png',
|
||||||
title: '盲板抽堵作业',
|
title: '盲板抽堵作业',
|
||||||
workType: 'blindboard_work',
|
workType: 'blindboard_work',
|
||||||
menuPerms: 'dashboard:hazardous-work:blind-flange-plugging-operation',
|
menuPerms: 'dashboard:hazardous:work:blind-flange-plugging-operation',
|
||||||
pageBuilder: () => WorkTabMbcdList(),
|
pageBuilder: () => WorkTabMbcdList(),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
@ -188,7 +188,7 @@ class _WorkTabListPageState extends RouteAwareState<WorkTabListPage> {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/image/wxzy_banner.png',
|
'assets/images/wxzy_banner.png',
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
height: bannerHeight,
|
height: bannerHeight,
|
||||||
fit: BoxFit.fitWidth,
|
fit: BoxFit.fitWidth,
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import 'package:qhd_prevention/customWidget/custom_button.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
import 'package:qhd_prevention/http/ApiService.dart';
|
import 'package:qhd_prevention/http/ApiService.dart';
|
||||||
import 'package:qhd_prevention/pages/home/Study/study_tab_list_page.dart';
|
import 'package:qhd_prevention/pages/home/Study/study_tab_list_page.dart';
|
||||||
|
import 'package:qhd_prevention/pages/home/Tap/work_tab_list_page.dart';
|
||||||
import 'package:qhd_prevention/pages/home/doorAndCar/doorCar_tab_page.dart';
|
import 'package:qhd_prevention/pages/home/doorAndCar/doorCar_tab_page.dart';
|
||||||
import 'package:qhd_prevention/pages/home/keyTasks/key_tasks_tab_page.dart';
|
import 'package:qhd_prevention/pages/home/keyTasks/key_tasks_tab_page.dart';
|
||||||
import 'package:qhd_prevention/pages/home/scan_page.dart';
|
import 'package:qhd_prevention/pages/home/scan_page.dart';
|
||||||
|
|
@ -118,7 +119,7 @@ class HomePageState extends RouteAwareState<HomePage>
|
||||||
final Map<String, String> _titleToPerm = {
|
final Map<String, String> _titleToPerm = {
|
||||||
"单位管理": "dashboard-Unit-Management",
|
"单位管理": "dashboard-Unit-Management",
|
||||||
"现场监管": "dashboard-Site-Supervision",
|
"现场监管": "dashboard-Site-Supervision",
|
||||||
"危险作业": "dashboard-Hazardous-Work",
|
"危险作业": "dashboard:hazardous:work:hot-work",
|
||||||
"隐患治理": "dashboard-Hazard-Management",
|
"隐患治理": "dashboard-Hazard-Management",
|
||||||
"重点作业": "dashboard-Hazard-Management", // 无对应,暂时留空
|
"重点作业": "dashboard-Hazard-Management", // 无对应,暂时留空
|
||||||
"口门门禁": "dashboard-Gate-Access-Control",
|
"口门门禁": "dashboard-Gate-Access-Control",
|
||||||
|
|
@ -640,6 +641,9 @@ class HomePageState extends RouteAwareState<HomePage>
|
||||||
case "重点作业":
|
case "重点作业":
|
||||||
pushPage(KeyTasksTabPage(), context);
|
pushPage(KeyTasksTabPage(), context);
|
||||||
break;
|
break;
|
||||||
|
case "危险作业":
|
||||||
|
pushPage(WorkTabListPage(), context);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ToastUtil.showNormal(context, '功能开发中...');
|
ToastUtil.showNormal(context, '功能开发中...');
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,19 @@ class _UnitJoinDetailPageState extends State<UnitJoinDetailPage> {
|
||||||
// final filePath = fileData.first['filePath'] ?? '';
|
// final filePath = fileData.first['filePath'] ?? '';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if ('${pd['userAvatarUrl']}'.isEmpty) {
|
||||||
|
await FileApi.getImagePathWithType(
|
||||||
|
eqForeignKey,
|
||||||
|
'',
|
||||||
|
UploadFileType.userAvatar,
|
||||||
|
).then((result) {
|
||||||
|
if (result['success']) {
|
||||||
|
List files = result['data'] ?? [];
|
||||||
|
pd['userAvatarUrl'] = files.map((item) => item['filePath'].toString()).toList().first;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
pd = data;
|
pd = data;
|
||||||
|
|
@ -98,7 +111,7 @@ class _UnitJoinDetailPageState extends State<UnitJoinDetailPage> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
bool isShow = _isEdit;
|
bool isShow = _isEdit;
|
||||||
if (!_isEdit && FormUtils.hasValue(pd, 'id')) {
|
if (!_isEdit && FormUtils.hasValue(pd, 'userAvatarUrl')) {
|
||||||
isShow = true;
|
isShow = true;
|
||||||
}
|
}
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
|
|
||||||
|
|
@ -95,26 +95,27 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver {
|
||||||
try {
|
try {
|
||||||
Map? route;
|
Map? route;
|
||||||
// 接口获取
|
// 接口获取
|
||||||
// try {
|
|
||||||
// LoadingDialogHelper.show(message: '加载中...');
|
|
||||||
// final roleId = SessionService.instance.roleId;
|
|
||||||
// final res = await AppMenuApi.getAppMenu({'roleId': roleId});
|
|
||||||
// LoadingDialogHelper.hide();
|
|
||||||
// if (res['success'] == true) {
|
|
||||||
// route = res;
|
|
||||||
// } else {}
|
|
||||||
// } catch (e) {
|
|
||||||
// debugPrint(
|
|
||||||
// 'AppMenuApi.getAppMenu error: $e -> fallback to local assets.',
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// 本地获取
|
|
||||||
try {
|
try {
|
||||||
final routeString = await loadFromAssets();
|
LoadingDialogHelper.show(message: '加载中...');
|
||||||
route = jsonDecode(routeString) as Map<String, dynamic>;
|
final roleId = SessionService.instance.roleId;
|
||||||
|
final res = await AppMenuApi.getAppMenu({'roleId': roleId});
|
||||||
|
LoadingDialogHelper.hide();
|
||||||
|
if (res['success'] == true) {
|
||||||
|
route = res;
|
||||||
|
printLongString(jsonEncode(route));
|
||||||
|
} else {}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint('loadFromAssets error: $e');
|
debugPrint(
|
||||||
|
'AppMenuApi.getAppMenu error: $e -> fallback to local assets.',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
// 本地获取
|
||||||
|
// try {
|
||||||
|
// final routeString = await loadFromAssets();
|
||||||
|
// route = jsonDecode(routeString) as Map<String, dynamic>;
|
||||||
|
// } catch (e) {
|
||||||
|
// debugPrint('loadFromAssets error: $e');
|
||||||
|
// }
|
||||||
final data = route?['data'] ?? [];
|
final data = route?['data'] ?? [];
|
||||||
RouteService().initializeRoutes(data);
|
RouteService().initializeRoutes(data);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,8 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
|
||||||
);
|
);
|
||||||
if (res['success']) {
|
if (res['success']) {
|
||||||
final data = res['data'];
|
final data = res['data'];
|
||||||
|
pd = data;
|
||||||
|
|
||||||
_genderText = data['sex'] ?? '';
|
_genderText = data['sex'] ?? '';
|
||||||
_birthText = data['birthday'] ?? '';
|
_birthText = data['birthday'] ?? '';
|
||||||
final eqForeignKey = data['userId'];
|
final eqForeignKey = data['userId'];
|
||||||
|
|
@ -112,9 +114,21 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
|
||||||
_idCartImgIds = files.map((item) => item['id'].toString()).toList();
|
_idCartImgIds = files.map((item) => item['id'].toString()).toList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if ('${pd['userAvatarUrl']}'.isEmpty) {
|
||||||
|
await FileApi.getImagePathWithType(
|
||||||
|
eqForeignKey,
|
||||||
|
'',
|
||||||
|
UploadFileType.userAvatar,
|
||||||
|
).then((result) {
|
||||||
|
if (result['success']) {
|
||||||
|
List files = result['data'] ?? [];
|
||||||
|
pd['userAvatarUrl'] = files.map((item) => item['filePath'].toString()).toList().first;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
pd = data;
|
|
||||||
try {
|
try {
|
||||||
final idCardBase64 = utf8.decode(base64.decode(pd['userIdCard']));
|
final idCardBase64 = utf8.decode(base64.decode(pd['userIdCard']));
|
||||||
if (idCardBase64.isNotEmpty) {
|
if (idCardBase64.isNotEmpty) {
|
||||||
|
|
@ -156,18 +170,6 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void _applyParsedIdCardInfo(IDCardInfo info, String input) {
|
|
||||||
setState(() {
|
|
||||||
pd['userIdCard'] = info.id18 ?? input;
|
|
||||||
pd['birthday'] = info.birth;
|
|
||||||
pd['age'] = info.age;
|
|
||||||
pd['gender'] = info.gender;
|
|
||||||
pd['provinceCode'] = info.provinceCode;
|
|
||||||
pd['province'] = info.province;
|
|
||||||
_genderText = info.gender ?? '未知';
|
|
||||||
_birthText = info.birth ?? '未知';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 身份证输入变化
|
/// 身份证输入变化
|
||||||
void _onIdChanged(String value) {
|
void _onIdChanged(String value) {
|
||||||
|
|
@ -312,7 +314,8 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
|
||||||
.then((result) {
|
.then((result) {
|
||||||
if (result['success']) {
|
if (result['success']) {
|
||||||
pd['userAvatarUrl'] = result['data']['filePath'] ?? '';
|
pd['userAvatarUrl'] = result['data']['filePath'] ?? '';
|
||||||
isSuccess = true;
|
pd['userId'] = result['data']['foreignKey'] ?? '';
|
||||||
|
isSuccess = true;
|
||||||
} else {
|
} else {
|
||||||
LoadingDialogHelper.hide();
|
LoadingDialogHelper.hide();
|
||||||
ToastUtil.showNormal(context, '人脸照片上传失败');
|
ToastUtil.showNormal(context, '人脸照片上传失败');
|
||||||
|
|
@ -356,7 +359,7 @@ class _FullUserinfoPageState extends State<FullUserinfoPage> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
bool isShow = _isEdit;
|
bool isShow = _isEdit;
|
||||||
if (!_isEdit && FormUtils.hasValue(pd, 'id')) {
|
if (!_isEdit && FormUtils.hasValue(pd, 'userAvatarUrl')) {
|
||||||
isShow = true;
|
isShow = true;
|
||||||
}
|
}
|
||||||
String token = SessionService.instance.token ?? '';
|
String token = SessionService.instance.token ?? '';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue