Merge remote-tracking branch 'origin/main'
# Conflicts: # android/app/src/main/res/drawable-v21/background.png # ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.pngmain
|
@ -36,27 +36,27 @@ android {
|
|||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
// ✅ 添加 release 签名配置
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// ✅ 替换成 release 签名
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
isMinifyEnabled = false
|
||||
isShrinkResources = false
|
||||
}
|
||||
debug {
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
}
|
||||
// // ✅ 添加 release 签名配置
|
||||
// signingConfigs {
|
||||
// create("release") {
|
||||
// storeFile = file(keystoreProperties["storeFile"] as String)
|
||||
// storePassword = keystoreProperties["storePassword"] as String
|
||||
// keyAlias = keystoreProperties["keyAlias"] as String
|
||||
// keyPassword = keystoreProperties["keyPassword"] as String
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// buildTypes {
|
||||
// release {
|
||||
// // ✅ 替换成 release 签名
|
||||
// signingConfig = signingConfigs.getByName("release")
|
||||
// isMinifyEnabled = false
|
||||
// isShrinkResources = false
|
||||
// }
|
||||
// debug {
|
||||
// signingConfig = signingConfigs.getByName("debug")
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
flutter {
|
||||
|
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 345 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 345 KiB |
|
@ -23,13 +23,14 @@ class BottomPickerTwo {
|
|||
/// [itemExtent]: 列表行高
|
||||
/// [height]: 弹窗总高度
|
||||
static Future<dynamic> show<T>(
|
||||
BuildContext context, {
|
||||
required List<dynamic> items,
|
||||
required Widget Function(dynamic item) itemBuilder,
|
||||
int initialIndex = 0,
|
||||
double itemExtent = 40.0,
|
||||
double height = 250,
|
||||
}) {
|
||||
BuildContext context, {
|
||||
required List<dynamic> items,
|
||||
required Widget Function(dynamic item) itemBuilder,
|
||||
int initialIndex = 0,
|
||||
double itemExtent = 40.0,
|
||||
double height = 250,
|
||||
double desiredSpacing = 16.0,
|
||||
}) {
|
||||
// 当前选中项
|
||||
dynamic selected = items[initialIndex];
|
||||
|
||||
|
@ -46,7 +47,10 @@ class BottomPickerTwo {
|
|||
children: [
|
||||
// 按钮行
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 8,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
@ -65,13 +69,39 @@ class BottomPickerTwo {
|
|||
// 滚动选择器
|
||||
Expanded(
|
||||
child: CupertinoPicker(
|
||||
scrollController:
|
||||
FixedExtentScrollController(initialItem: initialIndex),
|
||||
itemExtent: 30,
|
||||
scrollController: FixedExtentScrollController(
|
||||
initialItem: initialIndex,
|
||||
),
|
||||
itemExtent: 35,
|
||||
onSelectedItemChanged: (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,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
@ -152,7 +152,7 @@ class _CheckInformationOneItemState extends State<CheckInformationOneItem> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: MyAppbar(title: "隐患登记"),
|
||||
appBar: MyAppbar(title: "隐患等级"),
|
||||
body: Column(
|
||||
children: [
|
||||
// 详情滚动区域
|
||||
|
|
|
@ -151,7 +151,7 @@ class _HazardRegistrationPageState extends State<HazardRegistrationPage> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: MyAppbar(title: "隐患登记"),
|
||||
appBar: MyAppbar(title: "隐患等级"),
|
||||
body: Column(
|
||||
children: [
|
||||
// 详情滚动区域
|
||||
|
|
|
@ -311,7 +311,7 @@ class _CheckingInformationOnePageState extends State<CheckingInformationOnePage>
|
|||
// 确认按钮
|
||||
// const Spacer(),
|
||||
_buildTrueButton(),
|
||||
|
||||
SizedBox(height: 10,),
|
||||
|
||||
],
|
||||
),
|
||||
|
|
|
@ -152,53 +152,54 @@ class _SafetyCommitmentDhListState extends State<SafetyCommitmentDhList> {
|
|||
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) {
|
||||
await pushPage(CompanySafetyCommitmentApply(), context);
|
||||
response = await ApiService.getCompanySafetyCommitmentPermission( id);
|
||||
}else if(widget.type==2){
|
||||
await pushPage(WorkShopSafetyCommitmentApply(), context);
|
||||
response = await ApiService.getWorkshopSafetyCommitmentPermission(id);
|
||||
}else {
|
||||
await pushPage(TeamSafetyCommitmentApply(), context);
|
||||
response = await ApiService.getTeamSafetyCommitmentPermission(id);
|
||||
}
|
||||
|
||||
searchKeywords = "";
|
||||
currentPage = 1;
|
||||
list.clear();
|
||||
_fetchData();
|
||||
});
|
||||
if (response['result'] == 'success') {
|
||||
|
||||
// try {
|
||||
// final Map<String, dynamic> response;
|
||||
// if(widget.type==1) {
|
||||
// response = await ApiService.getCompanySafetyCommitmentPermission( id);
|
||||
// }else if(widget.type==2){
|
||||
// response = await ApiService.getWorkshopSafetyCommitmentPermission(id);
|
||||
// }else {
|
||||
// response = await ApiService.getTeamSafetyCommitmentPermission(id);
|
||||
// }
|
||||
//
|
||||
// if (response['result'] == 'success') {
|
||||
// setState(() async {
|
||||
// if(widget.type==1) {
|
||||
// await pushPage(CompanySafetyCommitmentApply(), context);
|
||||
// }else if(widget.type==2){
|
||||
//
|
||||
// }else {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// searchKeywords = "";
|
||||
// currentPage = 1;
|
||||
// list.clear();
|
||||
// _fetchData();
|
||||
// });
|
||||
// }else{
|
||||
// ToastUtil.showNormal(context, response['msg']);
|
||||
// }
|
||||
// } catch (e) {
|
||||
// ToastUtil.showNormal(context,'$e');
|
||||
// print('Error fetching data: $e');
|
||||
// }
|
||||
if(widget.type==1) {
|
||||
await pushPage(CompanySafetyCommitmentApply(), context);
|
||||
}else if(widget.type==2){
|
||||
await pushPage(WorkShopSafetyCommitmentApply(), context);
|
||||
}else {
|
||||
await pushPage(TeamSafetyCommitmentApply(), context);
|
||||
}
|
||||
|
||||
setState(() {
|
||||
searchKeywords = "";
|
||||
currentPage = 1;
|
||||
list.clear();
|
||||
_fetchData();
|
||||
});
|
||||
}else{
|
||||
ToastUtil.showNormal(context, response['msg']);
|
||||
}
|
||||
} catch (e) {
|
||||
ToastUtil.showNormal(context,'$e');
|
||||
print('Error fetching data: $e');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ class _SafetyCommitmentTabListState extends State<SafetyCommitmentTabList> {
|
|||
buttonInfos = [
|
||||
{
|
||||
"icon": "assets/icon-apps/icon_101.png",
|
||||
"title": "动火作业",
|
||||
"title": "公司安全承诺",
|
||||
"unreadCount": 0,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -153,6 +153,7 @@ class _RiskDetailPageState extends State<RiskDetailPage> {
|
|||
Spacer(),
|
||||
// 底部按钮固定
|
||||
_buildBottomButton(),
|
||||
SizedBox(height: 10,)
|
||||
],
|
||||
);
|
||||
},
|
||||
|
|
|
@ -13,6 +13,8 @@ class HotWorkDetailFormWidget extends StatefulWidget {
|
|||
final VoidCallback onChooseHotworkUser;
|
||||
final VoidCallback onAnalyzeTap;
|
||||
|
||||
|
||||
|
||||
// 新增
|
||||
final VoidCallback? onChooseVideoManager;
|
||||
/// 选择摄像头
|
||||
|
@ -55,6 +57,7 @@ class HotWorkDetailFormWidget extends StatefulWidget {
|
|||
this.hotworkPersonController,
|
||||
this.relatedController,
|
||||
this.riskController,
|
||||
|
||||
}) : assert(
|
||||
!isEditable ||
|
||||
(contentController != null &&
|
||||
|
|
|
@ -100,7 +100,7 @@ class _HotworkApplyDetailState extends State<HotworkApplyDetail> {
|
|||
_getData();
|
||||
} else {
|
||||
isEditable = true;
|
||||
pd['ANALYZE_TIME'] = 1;
|
||||
// pd['ANALYZE_TIME'] = 1;
|
||||
pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId;
|
||||
pd['APPLY_DEPARTMENT_NAME'] =
|
||||
SessionService.instance.loginUser!['DEPARTMENT_NAME'] ?? '';
|
||||
|
@ -731,6 +731,7 @@ class _HotworkApplyDetailState extends State<HotworkApplyDetail> {
|
|||
onWorkAreaHandle: _getWorkArea,
|
||||
onWorkAreaLocationHandle: _showLocationHandle,
|
||||
|
||||
|
||||
onAnalyzeTap: () {
|
||||
pushPage(
|
||||
HotworkGasList(HOTWORK_ID: widget.HOTWORK_ID),
|
||||
|
|
|
@ -53,13 +53,13 @@ class _UserinfoPageState extends State<UserinfoPage> {
|
|||
Divider(height: 1),
|
||||
_userItemCell("部门", user["DEPARTMENT_NAME"]??"", false),
|
||||
Divider(height: 1),
|
||||
_userItemCell("岗位", user["DUTIES_NAME"]??"", true),
|
||||
_userItemCell("岗位(工种)", user["POST_NAME"]??"", true),
|
||||
Divider(height: 1),
|
||||
_userItemCell("人员类型", user["PERSONNEL_TYPE_NAME"]??"", false),
|
||||
Divider(height: 1),
|
||||
_userItemCell("入职时间", user["ENTRY_DATE"]??"", false),
|
||||
Divider(height: 1),
|
||||
_userItemCell("工种", user["TYPE_OF_WORK_NAME"]??"", false),
|
||||
// _userItemCell("工种", user["TYPE_OF_WORK_NAME"]??"", false),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -263,7 +263,7 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
|
|||
Card(
|
||||
color: Colors.white,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
@ -375,7 +375,7 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
|
|||
VoidCallback? onImageTap,
|
||||
}) {
|
||||
final isSelected = item["REFERENCE_BASIS"] == value;
|
||||
final buttonWidth = (screenWidth - 60) / 3 - 10; // 计算按钮宽度
|
||||
final buttonWidth = (screenWidth - 30) / 3 - 10; // 计算按钮宽度
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
|
@ -395,15 +395,15 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
|
|||
// 不要在这里放 Expanded(非 Flex 父组件)
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 30,
|
||||
width: 90,
|
||||
width: 100,
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(icon, color: isSelected ? color : Colors.grey, size: 30),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: 3),
|
||||
Flexible(
|
||||
child: Text(
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -206,8 +206,9 @@ class _riskListPageState extends State<RiskListPage> {
|
|||
height: 50,
|
||||
child: TextButton(
|
||||
onPressed: () => _nextHandle(), child: Text("下一步", style: TextStyle(color: Colors.white),)),
|
||||
)
|
||||
),
|
||||
|
||||
SizedBox(height: 20,),
|
||||
],
|
||||
)),
|
||||
);
|
||||
|
|