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