Compare commits
2 Commits
5ecc8d3c23
...
0923f27daa
Author | SHA1 | Date |
---|---|---|
|
0923f27daa | |
|
ec8c252e20 |
|
@ -21,12 +21,13 @@ class ApiService {
|
|||
/// 人脸识别服务
|
||||
// static const String baseFacePath = "https://qaaqwh.qhdsafety.com/whb_stu_face";
|
||||
static const String baseFacePath = "http://192.168.20.240:8500/whb_stu_face/";
|
||||
// static const String baseFacePath = "http://192.168.0.25:38199"; //王轩服务器
|
||||
|
||||
/// 登录及其他管理后台接口
|
||||
// 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.25:28199";//王轩服务器
|
||||
// static const String basePath = "http://192.168.0.45:28199";//长久服务器
|
||||
static const String basePath = "http://192.168.0.45:28199";//长久服务器
|
||||
|
||||
/// 图片文件服务
|
||||
static const String baseImgPath = "https://file.zcloudchina.com/YTHFile";
|
||||
|
|
|
@ -334,6 +334,10 @@ class HomePageState extends State<HomePage> {
|
|||
final data = await ApiService.getWork();
|
||||
final hidCount = data['hidCount'] as Map<String, dynamic>? ?? {};
|
||||
|
||||
// // 告知BadgeManager去更新“安全巡检”和“八项作业”角标
|
||||
// BadgeManager().updateEnvInspectCount();
|
||||
// BadgeManager().updateEightWorkCount();
|
||||
|
||||
// 拉取其他数据
|
||||
final results = await Future.wait([
|
||||
ApiService.getUserData(),
|
||||
|
|
|
@ -143,7 +143,7 @@ class _PracticePageState extends State<StudyPractisePage> {
|
|||
children: [
|
||||
...q.options.entries.map((e) {
|
||||
bool isChecked = q.checked.split(',').contains(e.key);
|
||||
bool isCorrect = q.answer.split(',').contains(e.key);
|
||||
bool isCorrect = q.answer.contains(e.key);
|
||||
return _optionItem(
|
||||
label: e.key,
|
||||
text: e.value,
|
||||
|
@ -155,11 +155,14 @@ class _PracticePageState extends State<StudyPractisePage> {
|
|||
onTap: () => _chooseTopic('multiple', e.key),
|
||||
);
|
||||
}),
|
||||
if (!q.correctAnswerShow)
|
||||
ElevatedButton(
|
||||
onPressed: _correctAnswerShow,
|
||||
child: Text('确认答案'),
|
||||
),
|
||||
if (!q.correctAnswerShow) ...[
|
||||
const SizedBox(height: 10,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
CustomButton(text: '确认答案', backgroundColor: Colors.blue, onPressed: _correctAnswerShow,padding: EdgeInsets.symmetric(horizontal: 30, vertical: 5),)
|
||||
],)
|
||||
]
|
||||
],
|
||||
);
|
||||
case '4':
|
||||
|
@ -219,17 +222,16 @@ class _PracticePageState extends State<StudyPractisePage> {
|
|||
height: 40,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
multiple ? Colors.transparent : (active ? Colors.blue : bg),
|
||||
color: active ? Colors.blue : bg,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child:
|
||||
multiple
|
||||
? (right
|
||||
? Icon(Icons.check_circle, color: Colors.green)
|
||||
? Text(label, style: TextStyle(color: hasTextColor))
|
||||
: err
|
||||
? Icon(Icons.cancel, color: Colors.red)
|
||||
: Text(label, style: TextStyle(color: fg)))
|
||||
? Text(label, style: TextStyle(color: hasTextColor))
|
||||
: Text(label, style: TextStyle(color: active ? Colors.white:hasTextColor)))
|
||||
: Text(
|
||||
label,
|
||||
style: TextStyle(color: multiple ? fg : hasTextColor),
|
||||
|
@ -301,7 +303,7 @@ class _PracticePageState extends State<StudyPractisePage> {
|
|||
_buildOptions(q),
|
||||
if (q.correctAnswerShow) ...[
|
||||
Divider(),
|
||||
Text('我的答案: ${_renderAnswerText(q)}'),
|
||||
Text('我的答案: ${q.checked.split(',').join('')}'),
|
||||
Text('正确答案: ${q.answer}'),
|
||||
Text('权威解读: ${q.descr}'),
|
||||
],
|
||||
|
|
|
@ -395,7 +395,7 @@ class _HotWorkListPageState extends State<HotWorkListPage> {
|
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("监护人: ${item['GUARDIAN_USER_NAME'] ?? ''}"),
|
||||
Text("批准人: ${item['APPROVE_USER_NAME'] ?? ''}"),
|
||||
Text("审批部门负责人: ${item['APPROVE_USER_NAME'] ?? ''}"),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
|
|
|
@ -239,6 +239,29 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> {
|
|||
ItemListWidget.twoRowTitleText(label: '段路作业实施时间', text: FormUtils.hasValue(pd, 'WORK_END_DATE')
|
||||
? '${pd['WORK_START_DATE'] ?? ''} - ${pd['WORK_END_DATE'] ?? ''}'
|
||||
: pd['WORK_START_DATE'] ?? ''),
|
||||
if (!FormUtils.hasValue(pd, 'WORK_END_DATE'))
|
||||
...[
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
label: '预计作业结束时间:',
|
||||
isEditable: widget.isEditable,
|
||||
onTap: () async {
|
||||
DateTime? picked = await BottomDateTimePicker.showDate(
|
||||
context,
|
||||
minTimeStr: pd['WORK_EXPECTED_START_TIME'] ?? '',
|
||||
allowFuture: true,
|
||||
);
|
||||
if (picked != null) {
|
||||
setState(() {
|
||||
pd['WORK_EXPECTED_END_TIME'] = DateFormat(
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
).format(picked);
|
||||
});
|
||||
}
|
||||
},
|
||||
text: pd['WORK_EXPECTED_END_TIME'] ?? '',
|
||||
),
|
||||
],
|
||||
|
||||
] else ...[
|
||||
const Divider(),
|
||||
|
|
|
@ -142,17 +142,17 @@ class _BreakgroundDetailFormWidgetState
|
|||
hintText: '请输入作业内容',
|
||||
text: pd['JOB_CONTENT'] ?? '',
|
||||
),
|
||||
// if (FormUtils.hasValue(pd, 'GUARDIAN_USER_NAME') &&
|
||||
// !widget.isEditable) ...[
|
||||
// const Divider(),
|
||||
// // ItemListWidget.OneRowImageTitle(label: '作业负责人', imgPath: imgPath)
|
||||
// SignRowImageTitle(
|
||||
// label: '监护人:',
|
||||
// signKey: 'GUARDIAN',
|
||||
// signs: widget.signs,
|
||||
// text: pd['GUARDIAN_USER_NAME'] ?? '',
|
||||
// ),
|
||||
// ],
|
||||
if (FormUtils.hasValue(pd, 'GUARDIAN_USER_NAME') &&
|
||||
!widget.isEditable) ...[
|
||||
const Divider(),
|
||||
// ItemListWidget.OneRowImageTitle(label: '作业负责人', imgPath: imgPath)
|
||||
SignRowImageTitle(
|
||||
label: '监护人:',
|
||||
signKey: 'GUARDIAN',
|
||||
signs: widget.signs,
|
||||
text: pd['GUARDIAN_USER_NAME'] ?? '',
|
||||
),
|
||||
],
|
||||
if (FormUtils.hasValue(pd, 'CONFIRM_USER_NAME') &&
|
||||
!widget.isEditable) ...[
|
||||
const Divider(),
|
||||
|
@ -262,6 +262,29 @@ class _BreakgroundDetailFormWidgetState
|
|||
ItemListWidget.twoRowTitleText(label: '作业实施时间', text: FormUtils.hasValue(pd, 'WORK_END_DATE')
|
||||
? '${pd['WORK_START_DATE'] ?? ''} - ${pd['WORK_END_DATE'] ?? ''}'
|
||||
: pd['WORK_START_DATE'] ?? ''),
|
||||
if (!FormUtils.hasValue(pd, 'WORK_END_DATE'))
|
||||
...[
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
label: '预计作业结束时间:',
|
||||
isEditable: widget.isEditable,
|
||||
onTap: () async {
|
||||
DateTime? picked = await BottomDateTimePicker.showDate(
|
||||
context,
|
||||
minTimeStr: pd['WORK_EXPECTED_START_TIME'] ?? '',
|
||||
allowFuture: true,
|
||||
);
|
||||
if (picked != null) {
|
||||
setState(() {
|
||||
pd['WORK_EXPECTED_END_TIME'] = DateFormat(
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
).format(picked);
|
||||
});
|
||||
}
|
||||
},
|
||||
text: pd['WORK_EXPECTED_END_TIME'] ?? '',
|
||||
),
|
||||
],
|
||||
] else ...[
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
|
|
@ -98,16 +98,16 @@ class SpecialWorkFormBaseWork extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
if (FormUtils.hasValue(signs, 'GUARDIAN'))
|
||||
ConfirmWithSignWidget(
|
||||
signs: signs,
|
||||
pd: pd,
|
||||
baseImgPath: baseImgPath,
|
||||
sectionKey: 'GUARDIAN',
|
||||
nameKey: 'GUARDIAN_USER_NAME',
|
||||
headerTitle: '监护人签字',
|
||||
roleTitle: '监护人',
|
||||
),
|
||||
// if (FormUtils.hasValue(signs, 'GUARDIAN'))
|
||||
// ConfirmWithSignWidget(
|
||||
// signs: signs,
|
||||
// pd: pd,
|
||||
// baseImgPath: baseImgPath,
|
||||
// sectionKey: 'GUARDIAN',
|
||||
// nameKey: 'GUARDIAN_USER_NAME',
|
||||
// headerTitle: '监护人签字',
|
||||
// roleTitle: '监护人',
|
||||
// ),
|
||||
if (FormUtils.hasValue(signs, 'CONFESS'))
|
||||
ConfirmWithSignWidget(
|
||||
signs: signs,
|
||||
|
|
|
@ -167,26 +167,26 @@ class _HoistworkDetailFormWidgetState extends State<HoistWorkDetailFormWidget> {
|
|||
text: pd['WORK_USER_USER_NAME'] ?? '',
|
||||
),
|
||||
],
|
||||
// if (FormUtils.hasValue(pd, 'SISUO_USER_NAME') &&
|
||||
// !widget.isEditable) ...[
|
||||
// const Divider(),
|
||||
// SignRowImageTitle(
|
||||
// label: '司索人:',
|
||||
// signKey: 'SISUO',
|
||||
// signs: widget.signs,
|
||||
// text: pd['SISUO_USER_NAME'] ?? '',
|
||||
// ),
|
||||
// ],
|
||||
// if (FormUtils.hasValue(pd, 'GUARDIAN_USER_NAME') &&
|
||||
// !widget.isEditable) ...[
|
||||
// const Divider(),
|
||||
// SignRowImageTitle(
|
||||
// label: '监护人:',
|
||||
// signKey: 'GUARDIAN',
|
||||
// signs: widget.signs,
|
||||
// text: pd['GUARDIAN_USER_NAME'] ?? '',
|
||||
// ),
|
||||
// ],
|
||||
if (FormUtils.hasValue(pd, 'SISUO_USER_NAME') &&
|
||||
!widget.isEditable) ...[
|
||||
const Divider(),
|
||||
SignRowImageTitle(
|
||||
label: '司索人:',
|
||||
signKey: 'SISUO',
|
||||
signs: widget.signs,
|
||||
text: pd['SISUO_USER_NAME'] ?? '',
|
||||
),
|
||||
],
|
||||
if (FormUtils.hasValue(pd, 'GUARDIAN_USER_NAME') &&
|
||||
!widget.isEditable) ...[
|
||||
const Divider(),
|
||||
SignRowImageTitle(
|
||||
label: '监护人:',
|
||||
signKey: 'GUARDIAN',
|
||||
signs: widget.signs,
|
||||
text: pd['GUARDIAN_USER_NAME'] ?? '',
|
||||
),
|
||||
],
|
||||
if (FormUtils.hasValue(pd, 'PROJECT_MANAGER_USER_NAME') &&
|
||||
!widget.isEditable) ...[
|
||||
const Divider(),
|
||||
|
@ -286,7 +286,29 @@ class _HoistworkDetailFormWidgetState extends State<HoistWorkDetailFormWidget> {
|
|||
ItemListWidget.twoRowTitleText(label: '作业实施时间', text: FormUtils.hasValue(pd, 'WORK_END_DATE')
|
||||
? '${pd['WORK_START_DATE'] ?? ''} - ${pd['WORK_END_DATE'] ?? ''}'
|
||||
: pd['WORK_START_DATE'] ?? ''),
|
||||
|
||||
if (!FormUtils.hasValue(pd, 'WORK_END_DATE'))
|
||||
...[
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
label: '预计作业结束时间:',
|
||||
isEditable: widget.isEditable,
|
||||
onTap: () async {
|
||||
DateTime? picked = await BottomDateTimePicker.showDate(
|
||||
context,
|
||||
minTimeStr: pd['WORK_EXPECTED_START_TIME'] ?? '',
|
||||
allowFuture: true,
|
||||
);
|
||||
if (picked != null) {
|
||||
setState(() {
|
||||
pd['WORK_EXPECTED_END_TIME'] = DateFormat(
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
).format(picked);
|
||||
});
|
||||
}
|
||||
},
|
||||
text: pd['WORK_EXPECTED_END_TIME'] ?? '',
|
||||
),
|
||||
],
|
||||
] else ...[
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
|
|
@ -260,16 +260,16 @@ class SpecialWorkFormBaseWork extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
if (FormUtils.hasValue(signs, 'GUARDIAN'))
|
||||
ConfirmWithSignWidget(
|
||||
signs: signs,
|
||||
pd: pd,
|
||||
baseImgPath: baseImgPath,
|
||||
sectionKey: 'GUARDIAN',
|
||||
nameKey: 'GUARDIAN_USER_NAME',
|
||||
headerTitle: '监护人签字',
|
||||
roleTitle: '监护人',
|
||||
),
|
||||
// if (FormUtils.hasValue(signs, 'GUARDIAN'))
|
||||
// ConfirmWithSignWidget(
|
||||
// signs: signs,
|
||||
// pd: pd,
|
||||
// baseImgPath: baseImgPath,
|
||||
// sectionKey: 'GUARDIAN',
|
||||
// nameKey: 'GUARDIAN_USER_NAME',
|
||||
// headerTitle: '监护人签字',
|
||||
// roleTitle: '监护人',
|
||||
// ),
|
||||
if (FormUtils.hasValue(signs, 'CONFESS'))
|
||||
ConfirmWithSignWidget(
|
||||
signs: signs,
|
||||
|
|
|
@ -305,7 +305,7 @@ class _HoistworkApplyDetailState extends State<HoistworkApplyDetail> {
|
|||
Widget _chooseItem(EditUserType type) {
|
||||
bool isClean = false;
|
||||
bool isRequird = true;
|
||||
if (pd['WORK_LEVEL'] != '1' && type == EditUserType.APPROVE) {
|
||||
if (pd['WORK_LEVEL'] != 1 && type == EditUserType.APPROVE) {
|
||||
isRequird = false;
|
||||
isClean = true;
|
||||
}
|
||||
|
@ -445,7 +445,7 @@ class _HoistworkApplyDetailState extends State<HoistworkApplyDetail> {
|
|||
EditUserType.LEADER,
|
||||
EditUserType.PROJECT_MANAGER,
|
||||
EditUserType.AUDIT,
|
||||
if (pd['WORK_LEVEL'] == '1') EditUserType.APPROVE,
|
||||
if (pd['WORK_LEVEL'] == 1) EditUserType.APPROVE,
|
||||
EditUserType.WORK_USER,
|
||||
EditUserType.WORK_START,
|
||||
EditUserType.WORK_END,
|
||||
|
|
|
@ -366,10 +366,6 @@ ToastUtil.showNormal(context, '获取流程图失败');
|
|||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(child: Text("作业负责人: ${item['CONFIRM_USER_NAME'] ?? ''}",softWrap: true,
|
||||
maxLines: null, // 不限制行数
|
||||
overflow: TextOverflow.visible,)
|
||||
),
|
||||
Expanded(child: Text("所在单位负责人: ${item['LEADER_USER_NAME'] ?? ''}",softWrap: true,
|
||||
textAlign: TextAlign.right,
|
||||
maxLines: null, // 不限制行数
|
||||
|
|
|
@ -192,16 +192,16 @@ class _HighWorkDetailFormWidgetState extends State<HighWorkDetailFormWidget> {
|
|||
text: pd['WORK_USER_USER_NAME'] ?? '',
|
||||
),
|
||||
],
|
||||
// if (FormUtils.hasValue(pd, 'GUARDIAN_USER_NAME') &&
|
||||
// !widget.isEditable) ...[
|
||||
// const Divider(),
|
||||
// SignRowImageTitle(
|
||||
// label: '监护人:',
|
||||
// signKey: 'GUARDIAN',
|
||||
// signs: widget.signs,
|
||||
// text: pd['GUARDIAN_USER_NAME'] ?? '',
|
||||
// ),
|
||||
// ],
|
||||
if (FormUtils.hasValue(pd, 'GUARDIAN_USER_NAME') &&
|
||||
!widget.isEditable) ...[
|
||||
const Divider(),
|
||||
SignRowImageTitle(
|
||||
label: '监护人:',
|
||||
signKey: 'GUARDIAN',
|
||||
signs: widget.signs,
|
||||
text: pd['GUARDIAN_USER_NAME'] ?? '',
|
||||
),
|
||||
],
|
||||
if (FormUtils.hasValue(pd, 'CONFIRM_USER_NAME') &&
|
||||
!widget.isEditable) ...[
|
||||
const Divider(),
|
||||
|
@ -263,13 +263,35 @@ class _HighWorkDetailFormWidgetState extends State<HighWorkDetailFormWidget> {
|
|||
controller: widget.riskController,
|
||||
text: pd['RISK_IDENTIFICATION'] ?? '',
|
||||
),
|
||||
const Divider(),
|
||||
|
||||
if (FormUtils.hasValue(pd, 'WORK_START_DATE')) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.twoRowTitleText(label: '作业实施时间', text: FormUtils.hasValue(pd, 'WORK_END_DATE')
|
||||
? '${pd['WORK_START_DATE'] ?? ''} - ${pd['WORK_END_DATE'] ?? ''}'
|
||||
: pd['WORK_START_DATE'] ?? ''),
|
||||
if (!FormUtils.hasValue(pd, 'WORK_END_DATE'))
|
||||
...[
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
label: '预计作业结束时间:',
|
||||
isEditable: widget.isEditable,
|
||||
onTap: () async {
|
||||
DateTime? picked = await BottomDateTimePicker.showDate(
|
||||
context,
|
||||
minTimeStr: pd['WORK_EXPECTED_START_TIME'] ?? '',
|
||||
allowFuture: true,
|
||||
);
|
||||
if (picked != null) {
|
||||
setState(() {
|
||||
pd['WORK_EXPECTED_END_TIME'] = DateFormat(
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
).format(picked);
|
||||
});
|
||||
}
|
||||
},
|
||||
text: pd['WORK_EXPECTED_END_TIME'] ?? '',
|
||||
),
|
||||
],
|
||||
] else ...[
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
|
|
@ -97,16 +97,16 @@ class HighWorkFormBaseWork extends StatelessWidget {
|
|||
),
|
||||
|
||||
// 4. 各环节签字及意见
|
||||
if (FormUtils.hasValue(signs, 'GUARDIAN'))
|
||||
ConfirmWithSignWidget(
|
||||
signs: signs,
|
||||
pd: pd,
|
||||
baseImgPath: baseImgPath,
|
||||
sectionKey: 'GUARDIAN',
|
||||
nameKey: 'GUARDIAN_USER_NAME',
|
||||
headerTitle: '监护人签字',
|
||||
roleTitle: '监护人',
|
||||
),
|
||||
// if (FormUtils.hasValue(signs, 'GUARDIAN'))
|
||||
// ConfirmWithSignWidget(
|
||||
// signs: signs,
|
||||
// pd: pd,
|
||||
// baseImgPath: baseImgPath,
|
||||
// sectionKey: 'GUARDIAN',
|
||||
// nameKey: 'GUARDIAN_USER_NAME',
|
||||
// headerTitle: '监护人签字',
|
||||
// roleTitle: '监护人',
|
||||
// ),
|
||||
if (FormUtils.hasValue(signs, 'CONFESS'))
|
||||
ConfirmWithSignWidget(
|
||||
signs: signs,
|
||||
|
|
|
@ -319,15 +319,13 @@ class _HighworkApplyDetailState extends State<HighworkApplyDetail> {
|
|||
Widget _chooseItem(EditUserType type) {
|
||||
bool isClean = false;
|
||||
bool isRequird = true;
|
||||
if (pd['WORK_LEVEL'] == 1 && type == EditUserType.AUDIT) {
|
||||
if (pd['WORK_LEVEL'] == '1' && (type == EditUserType.AUDIT || type == EditUserType.APPROVE)) {
|
||||
isRequird = false;
|
||||
isClean = true;
|
||||
}else if ((pd['WORK_LEVEL'] == '2' || pd['WORK_LEVEL'] == '3') && type == EditUserType.APPROVE) {
|
||||
isRequird = false;
|
||||
isClean = true;
|
||||
}
|
||||
if (pd['WORK_LEVEL'] != 4 && type == EditUserType.APPROVE) {
|
||||
isRequird = false;
|
||||
isClean = true;
|
||||
}
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
@ -459,8 +457,12 @@ class _HighworkApplyDetailState extends State<HighworkApplyDetail> {
|
|||
EditUserType.ACCEPT_CONFESS,
|
||||
EditUserType.CONFIRM,
|
||||
EditUserType.LEADER,
|
||||
if (pd['WORK_LEVEL'] != 1) EditUserType.AUDIT,
|
||||
if (pd['WORK_LEVEL'] == 4) EditUserType.APPROVE,
|
||||
if (pd['WORK_LEVEL'] == '4') ...[
|
||||
EditUserType.AUDIT,
|
||||
EditUserType.APPROVE
|
||||
]else if (pd['WORK_LEVEL'] == '2' || pd['WORK_LEVEL'] == '3') ...[
|
||||
EditUserType.AUDIT,
|
||||
],
|
||||
EditUserType.WORK_USER,
|
||||
EditUserType.WORK_START,
|
||||
EditUserType.WORK_END,
|
||||
|
@ -509,11 +511,11 @@ class _HighworkApplyDetailState extends State<HighworkApplyDetail> {
|
|||
// LoadingDialogHelper.show();
|
||||
|
||||
String taskId = '0';
|
||||
if (pd['WORK_LEVEL'] == 1) {
|
||||
if (pd['WORK_LEVEL'] == '1') {
|
||||
taskId = '5';
|
||||
} else if (pd['WORK_LEVEL'] == 2 || pd['WORK_LEVEL'] == 3) {
|
||||
} else if (pd['WORK_LEVEL'] == '2' || pd['WORK_LEVEL'] == '3') {
|
||||
taskId = '6';
|
||||
} else if (pd['WORK_LEVEL'] == 4) {
|
||||
} else if (pd['WORK_LEVEL'] == '4') {
|
||||
taskId = '7';
|
||||
}
|
||||
pd['USER_ID'] = SessionService.instance.loginUserId ?? '';
|
||||
|
@ -547,6 +549,8 @@ class _HighworkApplyDetailState extends State<HighworkApplyDetail> {
|
|||
if (result['result'] == 'success') {
|
||||
ToastUtil.showSuccess(context, status == '1' ? '提交成功' : '已暂存');
|
||||
Navigator.of(context).pop(true);
|
||||
}else{
|
||||
ToastUtil.showError(context, result['msg'] ?? '提交失败');
|
||||
}
|
||||
} catch (e) {
|
||||
LoadingDialogHelper.hide();
|
||||
|
|
|
@ -270,6 +270,29 @@ class _ElectricityDetailFormWidgetState extends State<ElectricityDetailFormWidge
|
|||
ItemListWidget.twoRowTitleText(label: '作业实施时间', text: FormUtils.hasValue(pd, 'WORK_END_DATE')
|
||||
? '${pd['WORK_START_DATE'] ?? ''} - ${pd['WORK_END_DATE'] ?? ''}'
|
||||
: pd['WORK_START_DATE'] ?? ''),
|
||||
if (!FormUtils.hasValue(pd, 'WORK_END_DATE'))
|
||||
...[
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
label: '预计作业结束时间:',
|
||||
isEditable: widget.isEditable,
|
||||
onTap: () async {
|
||||
DateTime? picked = await BottomDateTimePicker.showDate(
|
||||
context,
|
||||
minTimeStr: pd['WORK_EXPECTED_START_TIME'] ?? '',
|
||||
allowFuture: true,
|
||||
);
|
||||
if (picked != null) {
|
||||
setState(() {
|
||||
pd['WORK_EXPECTED_END_TIME'] = DateFormat(
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
).format(picked);
|
||||
});
|
||||
}
|
||||
},
|
||||
text: pd['WORK_EXPECTED_END_TIME'] ?? '',
|
||||
),
|
||||
],
|
||||
] else ...[
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
|
|
@ -491,6 +491,29 @@ class _BlindboardDetailFormWidgetState
|
|||
ItemListWidget.twoRowTitleText(label: '盲板作业实施时间', text: FormUtils.hasValue(pd, 'WORK_END_DATE')
|
||||
? '${pd['WORK_START_DATE'] ?? ''} - ${pd['WORK_END_DATE'] ?? ''}'
|
||||
: pd['WORK_START_DATE'] ?? ''),
|
||||
if (!FormUtils.hasValue(pd, 'WORK_END_DATE'))
|
||||
...[
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
label: '预计作业结束时间:',
|
||||
isEditable: widget.isEditable,
|
||||
onTap: () async {
|
||||
DateTime? picked = await BottomDateTimePicker.showDate(
|
||||
context,
|
||||
minTimeStr: pd['WORK_EXPECTED_START_TIME'] ?? '',
|
||||
allowFuture: true,
|
||||
);
|
||||
if (picked != null) {
|
||||
setState(() {
|
||||
pd['WORK_EXPECTED_END_TIME'] = DateFormat(
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
).format(picked);
|
||||
});
|
||||
}
|
||||
},
|
||||
text: pd['WORK_EXPECTED_END_TIME'] ?? '',
|
||||
),
|
||||
],
|
||||
|
||||
] else ...[
|
||||
const Divider(),
|
||||
|
|
|
@ -276,11 +276,42 @@ class _SpaceWorkDetailFormWidgetState extends State<SpaceWorkDetailFormWidget> {
|
|||
controller: widget.riskController,
|
||||
text: pd['RISK_IDENTIFICATION'] ?? '',
|
||||
),
|
||||
if (FormUtils.hasValue(pd, 'ANALYZE_TIME') && !widget.isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.OneRowStartButtonTitle(
|
||||
label: '气体分析信息:',
|
||||
text: pd['ANALYZE_USER_NAME'] ?? '',
|
||||
onTap: widget.onAnalyzeTap,
|
||||
),
|
||||
],
|
||||
if (FormUtils.hasValue(pd, 'WORK_START_DATE')) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.twoRowTitleText(label: '作业实施时间', text: FormUtils.hasValue(pd, 'WORK_END_DATE')
|
||||
? '${pd['WORK_START_DATE'] ?? ''} - ${pd['WORK_END_DATE'] ?? ''}'
|
||||
: pd['WORK_START_DATE'] ?? ''),
|
||||
if (!FormUtils.hasValue(pd, 'WORK_END_DATE'))
|
||||
...[
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
label: '预计作业结束时间:',
|
||||
isEditable: widget.isEditable,
|
||||
onTap: () async {
|
||||
DateTime? picked = await BottomDateTimePicker.showDate(
|
||||
context,
|
||||
minTimeStr: pd['WORK_EXPECTED_START_TIME'] ?? '',
|
||||
allowFuture: true,
|
||||
);
|
||||
if (picked != null) {
|
||||
setState(() {
|
||||
pd['WORK_EXPECTED_END_TIME'] = DateFormat(
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
).format(picked);
|
||||
});
|
||||
}
|
||||
},
|
||||
text: pd['WORK_EXPECTED_END_TIME'] ?? '',
|
||||
),
|
||||
],
|
||||
] else ...[
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
@ -397,14 +428,7 @@ class _SpaceWorkDetailFormWidgetState extends State<SpaceWorkDetailFormWidget> {
|
|||
text: pd['VIDEONAME'] ?? '',
|
||||
),
|
||||
|
||||
if (FormUtils.hasValue(pd, 'ANALYZE_TIME') && !widget.isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.OneRowStartButtonTitle(
|
||||
label: '气体分析信息:',
|
||||
text: pd['ANALYZE_USER_NAME'] ?? '',
|
||||
onTap: widget.onAnalyzeTap,
|
||||
),
|
||||
],
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue