Merge remote-tracking branch 'origin/main'

# Conflicts:
#	android/app/src/main/res/drawable-v21/background.png
#	ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png
main
hs 2025-08-27 16:20:44 +08:00
commit e7d144ce40
22 changed files with 309 additions and 269 deletions

View File

@ -36,27 +36,27 @@ android {
versionName = flutter.versionName versionName = flutter.versionName
} }
// ✅ 添加 release 签名配置 // // ✅ 添加 release 签名配置
signingConfigs { // signingConfigs {
create("release") { // create("release") {
storeFile = file(keystoreProperties["storeFile"] as String) // storeFile = file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["storePassword"] as String // storePassword = keystoreProperties["storePassword"] as String
keyAlias = keystoreProperties["keyAlias"] as String // keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String // keyPassword = keystoreProperties["keyPassword"] as String
} // }
} // }
//
buildTypes { // buildTypes {
release { // release {
// ✅ 替换成 release 签名 // // ✅ 替换成 release 签名
signingConfig = signingConfigs.getByName("release") // signingConfig = signingConfigs.getByName("release")
isMinifyEnabled = false // isMinifyEnabled = false
isShrinkResources = false // isShrinkResources = false
} // }
debug { // debug {
signingConfig = signingConfigs.getByName("debug") // signingConfig = signingConfigs.getByName("debug")
} // }
} // }
} }
flutter { flutter {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 345 KiB

View File

@ -23,13 +23,14 @@ class BottomPickerTwo {
/// [itemExtent]: /// [itemExtent]:
/// [height]: /// [height]:
static Future<dynamic> show<T>( static Future<dynamic> show<T>(
BuildContext context, { BuildContext context, {
required List<dynamic> items, required List<dynamic> items,
required Widget Function(dynamic item) itemBuilder, required Widget Function(dynamic item) itemBuilder,
int initialIndex = 0, int initialIndex = 0,
double itemExtent = 40.0, double itemExtent = 40.0,
double height = 250, double height = 250,
}) { double desiredSpacing = 16.0,
}) {
// //
dynamic selected = items[initialIndex]; dynamic selected = items[initialIndex];
@ -46,7 +47,10 @@ class BottomPickerTwo {
children: [ children: [
// //
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 8,
),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -65,13 +69,39 @@ class BottomPickerTwo {
// //
Expanded( Expanded(
child: CupertinoPicker( child: CupertinoPicker(
scrollController: scrollController: FixedExtentScrollController(
FixedExtentScrollController(initialItem: initialIndex), initialItem: initialIndex,
itemExtent: 30, ),
itemExtent: 35,
onSelectedItemChanged: (index) { onSelectedItemChanged: (index) {
selected = items[index]; selected = items[index];
}, },
children: items.map(itemBuilder).toList(), // children: items.map(itemBuilder).toList(),
children: List<Widget>.generate(items.length, (int index) {
return Padding(
// Padding
padding: EdgeInsets.symmetric(
vertical: desiredSpacing / 2,
),
child: Center(
child: Text(
// '选项 $index',
items[index]["NAME"],
style: TextStyle(
fontSize: 18,
color:
index == selected
? CupertinoColors.activeBlue
: CupertinoColors.inactiveGray,
fontWeight:
index == selected
? FontWeight.bold
: FontWeight.normal,
),
),
),
);
}),
), ),
), ),
], ],

View File

@ -152,7 +152,7 @@ class _CheckInformationOneItemState extends State<CheckInformationOneItem> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: MyAppbar(title: "隐患登记"), appBar: MyAppbar(title: "隐患等级"),
body: Column( body: Column(
children: [ children: [
// //

View File

@ -151,7 +151,7 @@ class _HazardRegistrationPageState extends State<HazardRegistrationPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: MyAppbar(title: "隐患登记"), appBar: MyAppbar(title: "隐患等级"),
body: Column( body: Column(
children: [ children: [
// //

View File

@ -311,7 +311,7 @@ class _CheckingInformationOnePageState extends State<CheckingInformationOnePage>
// //
// const Spacer(), // const Spacer(),
_buildTrueButton(), _buildTrueButton(),
SizedBox(height: 10,),
], ],
), ),

View File

@ -152,53 +152,54 @@ class _SafetyCommitmentDhListState extends State<SafetyCommitmentDhList> {
Future<void> _handleApply() async { Future<void> _handleApply() async {
// //
setState(() async { // setState(() async {
// if(widget.type==1) {
// await pushPage(CompanySafetyCommitmentApply(), context);
// }else if(widget.type==2){
// await pushPage(WorkShopSafetyCommitmentApply(), context);
// }else {
// await pushPage(TeamSafetyCommitmentApply(), context);
// }
//
// searchKeywords = "";
// currentPage = 1;
// list.clear();
// _fetchData();
// });
try {
final Map<String, dynamic> response;
if(widget.type==1) { if(widget.type==1) {
await pushPage(CompanySafetyCommitmentApply(), context); response = await ApiService.getCompanySafetyCommitmentPermission( id);
}else if(widget.type==2){ }else if(widget.type==2){
await pushPage(WorkShopSafetyCommitmentApply(), context); response = await ApiService.getWorkshopSafetyCommitmentPermission(id);
}else { }else {
await pushPage(TeamSafetyCommitmentApply(), context); response = await ApiService.getTeamSafetyCommitmentPermission(id);
} }
searchKeywords = ""; if (response['result'] == 'success') {
currentPage = 1;
list.clear();
_fetchData();
});
// try { if(widget.type==1) {
// final Map<String, dynamic> response; await pushPage(CompanySafetyCommitmentApply(), context);
// if(widget.type==1) { }else if(widget.type==2){
// response = await ApiService.getCompanySafetyCommitmentPermission( id); await pushPage(WorkShopSafetyCommitmentApply(), context);
// }else if(widget.type==2){ }else {
// response = await ApiService.getWorkshopSafetyCommitmentPermission(id); await pushPage(TeamSafetyCommitmentApply(), context);
// }else { }
// response = await ApiService.getTeamSafetyCommitmentPermission(id);
// } setState(() {
// searchKeywords = "";
// if (response['result'] == 'success') { currentPage = 1;
// setState(() async { list.clear();
// if(widget.type==1) { _fetchData();
// await pushPage(CompanySafetyCommitmentApply(), context); });
// }else if(widget.type==2){ }else{
// ToastUtil.showNormal(context, response['msg']);
// }else { }
// } catch (e) {
// } ToastUtil.showNormal(context,'$e');
// print('Error fetching data: $e');
// searchKeywords = ""; }
// currentPage = 1;
// list.clear();
// _fetchData();
// });
// }else{
// ToastUtil.showNormal(context, response['msg']);
// }
// } catch (e) {
// ToastUtil.showNormal(context,'$e');
// print('Error fetching data: $e');
// }
} }

View File

@ -35,7 +35,7 @@ class _SafetyCommitmentTabListState extends State<SafetyCommitmentTabList> {
buttonInfos = [ buttonInfos = [
{ {
"icon": "assets/icon-apps/icon_101.png", "icon": "assets/icon-apps/icon_101.png",
"title": "动火作业", "title": "公司安全承诺",
"unreadCount": 0, "unreadCount": 0,
}, },
{ {

View File

@ -153,6 +153,7 @@ class _RiskDetailPageState extends State<RiskDetailPage> {
Spacer(), Spacer(),
// //
_buildBottomButton(), _buildBottomButton(),
SizedBox(height: 10,)
], ],
); );
}, },

View File

@ -13,6 +13,8 @@ class HotWorkDetailFormWidget extends StatefulWidget {
final VoidCallback onChooseHotworkUser; final VoidCallback onChooseHotworkUser;
final VoidCallback onAnalyzeTap; final VoidCallback onAnalyzeTap;
// //
final VoidCallback? onChooseVideoManager; final VoidCallback? onChooseVideoManager;
/// ///
@ -55,6 +57,7 @@ class HotWorkDetailFormWidget extends StatefulWidget {
this.hotworkPersonController, this.hotworkPersonController,
this.relatedController, this.relatedController,
this.riskController, this.riskController,
}) : assert( }) : assert(
!isEditable || !isEditable ||
(contentController != null && (contentController != null &&

View File

@ -100,7 +100,7 @@ class _HotworkApplyDetailState extends State<HotworkApplyDetail> {
_getData(); _getData();
} else { } else {
isEditable = true; isEditable = true;
pd['ANALYZE_TIME'] = 1; // pd['ANALYZE_TIME'] = 1;
pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId; pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId;
pd['APPLY_DEPARTMENT_NAME'] = pd['APPLY_DEPARTMENT_NAME'] =
SessionService.instance.loginUser!['DEPARTMENT_NAME'] ?? ''; SessionService.instance.loginUser!['DEPARTMENT_NAME'] ?? '';
@ -731,6 +731,7 @@ class _HotworkApplyDetailState extends State<HotworkApplyDetail> {
onWorkAreaHandle: _getWorkArea, onWorkAreaHandle: _getWorkArea,
onWorkAreaLocationHandle: _showLocationHandle, onWorkAreaLocationHandle: _showLocationHandle,
onAnalyzeTap: () { onAnalyzeTap: () {
pushPage( pushPage(
HotworkGasList(HOTWORK_ID: widget.HOTWORK_ID), HotworkGasList(HOTWORK_ID: widget.HOTWORK_ID),

View File

@ -53,13 +53,13 @@ class _UserinfoPageState extends State<UserinfoPage> {
Divider(height: 1), Divider(height: 1),
_userItemCell("部门", user["DEPARTMENT_NAME"]??"", false), _userItemCell("部门", user["DEPARTMENT_NAME"]??"", false),
Divider(height: 1), Divider(height: 1),
_userItemCell("岗位", user["DUTIES_NAME"]??"", true), _userItemCell("岗位(工种)", user["POST_NAME"]??"", true),
Divider(height: 1), Divider(height: 1),
_userItemCell("人员类型", user["PERSONNEL_TYPE_NAME"]??"", false), _userItemCell("人员类型", user["PERSONNEL_TYPE_NAME"]??"", false),
Divider(height: 1), Divider(height: 1),
_userItemCell("入职时间", user["ENTRY_DATE"]??"", false), _userItemCell("入职时间", user["ENTRY_DATE"]??"", false),
Divider(height: 1), Divider(height: 1),
_userItemCell("工种", user["TYPE_OF_WORK_NAME"]??"", false), // _userItemCell("工种", user["TYPE_OF_WORK_NAME"]??"", false),
], ],
), ),
), ),

View File

@ -263,7 +263,7 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
Card( Card(
color: Colors.white, color: Colors.white,
child: Container( child: Container(
padding: const EdgeInsets.all(16), padding: const EdgeInsets.all(10),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -375,7 +375,7 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
VoidCallback? onImageTap, VoidCallback? onImageTap,
}) { }) {
final isSelected = item["REFERENCE_BASIS"] == value; final isSelected = item["REFERENCE_BASIS"] == value;
final buttonWidth = (screenWidth - 60) / 3 - 10; // final buttonWidth = (screenWidth - 30) / 3 - 10; //
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
@ -395,15 +395,15 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
// Expanded Flex // Expanded Flex
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SizedBox( SizedBox(
height: 30, height: 30,
width: 90, width: 100,
child: Row( child: Row(
children: [ children: [
Icon(icon, color: isSelected ? color : Colors.grey, size: 30), Icon(icon, color: isSelected ? color : Colors.grey, size: 30),
const SizedBox(width: 8), const SizedBox(width: 3),
Flexible( Flexible(
child: Text( child: Text(
label, label,
@ -415,31 +415,34 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
), ),
), ),
), ),
const SizedBox(width: 3),
if ((value == "option1" && item["REFERENCE_BASIS"] == "option1") ||
(value == "option2" &&
item["REFERENCE_BASIS"] == "option2" &&
item.containsKey("ids") &&
item["ids"].toString().isNotEmpty))
GestureDetector(
onTap: () {
if (onImageTap != null) {
onImageTap();
}
},
behavior: HitTestBehavior.opaque,
child: Transform.translate(
offset: const Offset(0, -6),
child: Image.asset(
"assets/images/gantan-blue.png",
width: 15,
height: 15,
),
),
),
], ],
), ),
), ),
const SizedBox(width: 6),
if ((value == "option1" && item["REFERENCE_BASIS"] == "option1") ||
(value == "option2" &&
item["REFERENCE_BASIS"] == "option2" &&
item.containsKey("ids") &&
item["ids"].toString().isNotEmpty))
GestureDetector(
onTap: () {
if (onImageTap != null) {
onImageTap();
}
},
behavior: HitTestBehavior.opaque,
child: Transform.translate(
offset: const Offset(0, -6),
child: Image.asset(
"assets/images/gantan-blue.png",
width: 15,
height: 15,
),
),
),
], ],
), ),
), ),

View File

@ -206,8 +206,9 @@ class _riskListPageState extends State<RiskListPage> {
height: 50, height: 50,
child: TextButton( child: TextButton(
onPressed: () => _nextHandle(), child: Text("下一步", style: TextStyle(color: Colors.white),)), onPressed: () => _nextHandle(), child: Text("下一步", style: TextStyle(color: Colors.white),)),
) ),
SizedBox(height: 20,),
], ],
)), )),
); );

File diff suppressed because it is too large Load Diff