2025.9.15 修改bug

main
xufei 2025-09-15 15:53:47 +08:00
parent 31b5a9b532
commit 22234e8c9b
9 changed files with 63 additions and 29 deletions

View File

@ -242,8 +242,10 @@ class _SafecheckSignListPageState extends State<SafecheckSignListPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Expanded(
"检查时间: ${item['INSPECTION_TIME_START'] ?? ''}${item['INSPECTION_TIME_END'] ?? ''}", child: Text(
"检查时间: ${item['INSPECTION_TIME_START'] ?? ''}${item['INSPECTION_TIME_END'] ?? ''}",
),
), ),
], ],
), ),

View File

@ -251,9 +251,12 @@ class _SafecheckDangerListPageState extends State<SafecheckDangerListPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Expanded(
"检查时间: ${item['INSPECTION_TIME_START'] ?? ''}${item['INSPECTION_TIME_END'] ?? ''}", child: Text(
"检查时间: ${item['INSPECTION_TIME_START'] ?? ''}${item['INSPECTION_TIME_END'] ?? ''}",
),
), ),
], ],
), ),
const SizedBox(height: 8), const SizedBox(height: 8),

View File

@ -249,9 +249,12 @@ class _DefendRecordListPageState extends State<DefendRecordListPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Expanded(
"检查时间: ${item['INSPECTION_TIME_START'] ?? ''}${item['INSPECTION_TIME_END'] ?? ''}", child: Text(
"检查时间: ${item['INSPECTION_TIME_START'] ?? ''}${item['INSPECTION_TIME_END'] ?? ''}",
),
), ),
], ],
), ),
const SizedBox(height: 8), const SizedBox(height: 8),

View File

@ -135,7 +135,10 @@ setState(() {
} }
Future<void> _submit() async{ Future<void> _submit() async{
if (INSPECTION_STATUS == '-2') { if (INSPECTION_STATUS == '-2') {
await pushPage(SafecheckStartDetail(INSPECTION_ID: form['INSPECTION_ID'] ?? '', type: 'edit'), context); String text= await pushPage(SafecheckStartDetail(INSPECTION_ID: form['INSPECTION_ID'] ?? '', type: 'edit'), context);
if("success"==text){
Navigator.of(context).pop();
}
return; return;
} }
if (INSPECTION_STATUS == '3' && form['INSPECTED_EXPLAIN_REFUSE'] == '') { if (INSPECTION_STATUS == '3' && form['INSPECTED_EXPLAIN_REFUSE'] == '') {
@ -158,6 +161,7 @@ setState(() {
}else{ }else{
ToastUtil.showError(context, '保存失败'); ToastUtil.showError(context, '保存失败');
} }
Navigator.of(context).pop(); Navigator.of(context).pop();
}catch(e){} }catch(e){}
} }

View File

@ -539,7 +539,7 @@ class _SafecheckStartDetailState extends State<SafecheckStartDetail> {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
ToastUtil.showNormal(context, '提交成功'); ToastUtil.showNormal(context, '提交成功');
Navigator.of(context).pop(); Navigator.of(context).pop("success");
} else { } else {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
final msgErr = final msgErr =

View File

@ -309,7 +309,7 @@ class _SafecheckStartListPageState extends State<SafecheckStartListPage> {
Row( Row(
spacing: 5, spacing: 5,
children: [ children: [
if (item['INSPECTION_STATUS'] == '-1') if (item['INSPECTION_STATUS'] == '-1'&&item['INSPECTION_ORIGINATOR_ID'] == SessionService.instance.loginUserId)
CustomButton( CustomButton(
text: '编辑', text: '编辑',
height: 35, height: 35,
@ -318,7 +318,7 @@ class _SafecheckStartListPageState extends State<SafecheckStartListPage> {
backgroundColor: Colors.green, backgroundColor: Colors.green,
onPressed: () => _goToDetail(item, 'edit'), onPressed: () => _goToDetail(item, 'edit'),
), ),
if (item['INSPECTION_STATUS'] == '-1') if (item['INSPECTION_STATUS'] == '-1'&&item['INSPECTION_ORIGINATOR_ID'] == SessionService.instance.loginUserId)
CustomButton( CustomButton(
text: '查看', text: '查看',
height: 35, height: 35,

View File

@ -113,10 +113,10 @@ class _LoginPageState extends State<LoginPage> {
), ),
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 30), padding: const EdgeInsets.symmetric(horizontal: 30),
child: SingleChildScrollView( // child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
const SizedBox(height: 150), const SizedBox(height: 70),
Row( Row(
children: [ children: [
Image.asset('assets/image/logo.png', height: 50), Image.asset('assets/image/logo.png', height: 50),
@ -125,7 +125,7 @@ class _LoginPageState extends State<LoginPage> {
child: Text( child: Text(
'欢迎使用,\n智守安全云平台!', '欢迎使用,\n智守安全云平台!',
style: TextStyle( style: TextStyle(
fontSize: 22, fontSize: 20,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@ -185,8 +185,10 @@ class _LoginPageState extends State<LoginPage> {
style: const TextStyle(color: Colors.blue), style: const TextStyle(color: Colors.blue),
), ),
), ),
Padding( Padding(
padding: const EdgeInsets.symmetric(vertical: 24), padding: const EdgeInsets.symmetric(vertical: 0),
child: SizedBox( child: SizedBox(
width: double.infinity, width: double.infinity,
height: 48, height: 48,
@ -212,8 +214,10 @@ class _LoginPageState extends State<LoginPage> {
), ),
), ),
Spacer(),
Padding( Padding(
padding: const EdgeInsets.all(0), padding: const EdgeInsets.only(bottom: 10),
child: Row( child: Row(
children: [ children: [
Checkbox( Checkbox(
@ -237,12 +241,14 @@ class _LoginPageState extends State<LoginPage> {
text: '我已阅读并同意', text: '我已阅读并同意',
style: const TextStyle( style: const TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 12,
), ),
), ),
TextSpan( TextSpan(
text: '《服务协议》', text: '《服务协议》',
style: const TextStyle( style: const TextStyle(
color: Color(0xFF0D1D8C), color: Color(0xFF0D1D8C),
fontSize: 12,
), ),
recognizer: recognizer:
TapGestureRecognizer() TapGestureRecognizer()
@ -261,12 +267,14 @@ class _LoginPageState extends State<LoginPage> {
text: '', text: '',
style: const TextStyle( style: const TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 12,
), ),
), ),
TextSpan( TextSpan(
text: '《隐私政策》', text: '《隐私政策》',
style: const TextStyle( style: const TextStyle(
color: Color(0xFF0D1D8C), color: Color(0xFF0D1D8C),
fontSize: 12,
), ),
recognizer: recognizer:
TapGestureRecognizer() TapGestureRecognizer()
@ -290,7 +298,7 @@ class _LoginPageState extends State<LoginPage> {
), ),
], ],
), ),
), // ),
), ),
], ],
), ),
@ -316,7 +324,7 @@ class _LoginPageState extends State<LoginPage> {
Text( Text(
label, label,
style: const TextStyle( style: const TextStyle(
fontSize: 20, fontSize: 15,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Colors.white, color: Colors.white,
), ),

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'dart:io'; import 'dart:io';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:qhd_prevention/customWidget/single_image_viewer.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/my_appbar.dart'; import 'package:qhd_prevention/pages/my_appbar.dart';
@ -95,20 +96,30 @@ class _SignatureUpdatePageState extends State<FirstSignPage> {
), ),
const SizedBox(width: 15), const SizedBox(width: 15),
if (imagePath.isNotEmpty&&!imagePath.startsWith('http')) if (imagePath.isNotEmpty&&!imagePath.startsWith('http'))
Image.file( GestureDetector(
File(imagePath), onTap: () {
width: 200, presentOpaque(SingleImageViewer(imageUrl: imagePath), context);
height: 100, },
fit: BoxFit.fill, child: Image.file(
), File(imagePath),
if (imagePath.isNotEmpty&&imagePath.startsWith('http')) width: 200,
Image.network( height: 100,
imagePath, fit: BoxFit.contain ,
width: 200, ),
height: 100,
fit: BoxFit.fill,
), ),
if (imagePath.isNotEmpty&&imagePath.startsWith('http'))
GestureDetector(
onTap: () {
presentOpaque(SingleImageViewer(imageUrl: imagePath), context);
},
child: Image.network(
imagePath,
width: 200,
height: 100,
fit: BoxFit.contain ,
),
),
], ],
), ),

View File

@ -113,12 +113,14 @@ class _NotifPageState extends State<NotifPage>
Future<void> _getNotifEnterprise() async { Future<void> _getNotifEnterprise() async {
// LoadingDialogHelper.show(); // LoadingDialogHelper.show();
try { try {
LoadingDialogHelper.show();
final result = await ApiService.getNotifEnterprise( final result = await ApiService.getNotifEnterprise(
"-1", "-1",
pageNum.toString(), pageNum.toString(),
keyWord, keyWord,
_selectedTabTwo.toString(), _selectedTabTwo.toString(),
); );
LoadingDialogHelper.hide();
if (result['result'] == 'success') { if (result['result'] == 'success') {
final List<dynamic> newList = result['varList'] ?? []; final List<dynamic> newList = result['varList'] ?? [];
setState(() { setState(() {
@ -126,6 +128,7 @@ class _NotifPageState extends State<NotifPage>
}); });
} }
} catch (e) { } catch (e) {
LoadingDialogHelper.hide();
print('加载出错: $e'); print('加载出错: $e');
} finally { } finally {
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();