2025.9.19 修改bug
parent
dc89f7039f
commit
0b0f7c9eff
|
@ -491,9 +491,9 @@
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = 60;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8AKCJ9LW7D;
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8AKCJ9LW7D;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
@ -503,10 +503,11 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
|
MARKETING_VERSION = 2.2.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = uni.UNI85F7A17;
|
PRODUCT_BUNDLE_IDENTIFIER = uni.UNI85F7A17;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "qa-zsaq-des";
|
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "qa-zsaq";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
@ -685,9 +686,9 @@
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = 60;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8AKCJ9LW7D;
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8AKCJ9LW7D;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
@ -697,10 +698,11 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
|
MARKETING_VERSION = 2.2.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = uni.UNI85F7A17;
|
PRODUCT_BUNDLE_IDENTIFIER = uni.UNI85F7A17;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "qa-zsaq-des";
|
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "qa-zsaq";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
@ -716,9 +718,9 @@
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = 60;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8AKCJ9LW7D;
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8AKCJ9LW7D;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
@ -728,10 +730,11 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
|
MARKETING_VERSION = 2.2.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = uni.UNI85F7A17;
|
PRODUCT_BUNDLE_IDENTIFIER = uni.UNI85F7A17;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "qa-zsaq-des";
|
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "qa-zsaq";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
|
|
@ -2,8 +2,10 @@ import 'package:flutter/material.dart';
|
||||||
import '../tools/tools.dart';
|
import '../tools/tools.dart';
|
||||||
|
|
||||||
/// 通用列表卡片组件:
|
/// 通用列表卡片组件:
|
||||||
/// - 两两为一组,优先尝试同一行显示左右两列并左/右对齐;
|
/// - 两两为一组,固定左右布局,平均分配宽度
|
||||||
/// - 如放不下,则自动拆成两行,上行左对齐,下行右对齐。
|
/// - 左侧文字左对齐,右侧文字右对齐
|
||||||
|
/// - 文字过多时各自自动换行
|
||||||
|
/// - 如果一行只有一个元素,靠左显示
|
||||||
class DannerRepainItem extends StatelessWidget {
|
class DannerRepainItem extends StatelessWidget {
|
||||||
final String title;
|
final String title;
|
||||||
final List<String> details;
|
final List<String> details;
|
||||||
|
@ -50,70 +52,12 @@ class DannerRepainItem extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const Divider(height: 1),
|
const Divider(height: 1),
|
||||||
|
|
||||||
// — 详情区:动态两列/换行 —
|
// — 详情区:固定左右布局 —
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
|
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
|
||||||
child: LayoutBuilder(builder: (context, constraints) {
|
child: Column(
|
||||||
// 间距:你可以根据设计随意调整
|
children: _buildDetailRows(),
|
||||||
const double horizontalGap = 20;
|
),
|
||||||
const double verticalGap = 5;
|
|
||||||
|
|
||||||
List<Widget> rows = [];
|
|
||||||
for (int i = 0; i < details.length; i += 2) {
|
|
||||||
final left = details[i];
|
|
||||||
final right = (i + 1 < details.length) ? details[i + 1] : '';
|
|
||||||
|
|
||||||
// 测量文字宽度
|
|
||||||
final leftPainter = TextPainter(
|
|
||||||
text: TextSpan(text: left, style: HhTextStyleUtils.secondaryTitleStyle),
|
|
||||||
maxLines: 1,
|
|
||||||
textDirection: TextDirection.ltr,
|
|
||||||
)..layout();
|
|
||||||
final rightPainter = TextPainter(
|
|
||||||
text: TextSpan(text: right, style: HhTextStyleUtils.secondaryTitleStyle),
|
|
||||||
maxLines: 1,
|
|
||||||
textDirection: TextDirection.ltr,
|
|
||||||
)..layout();
|
|
||||||
|
|
||||||
final canFitOneLine = right.isNotEmpty &&
|
|
||||||
(leftPainter.width + horizontalGap + rightPainter.width)
|
|
||||||
<= constraints.maxWidth;
|
|
||||||
|
|
||||||
if (right.isNotEmpty && canFitOneLine) {
|
|
||||||
// 同行显示,左右对齐
|
|
||||||
rows.add(Padding(
|
|
||||||
padding: EdgeInsets.only(bottom: verticalGap),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
_DetailText(left),
|
|
||||||
_DetailText(right),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
));
|
|
||||||
} else {
|
|
||||||
// 拆为两行
|
|
||||||
rows.add(Padding(
|
|
||||||
padding: EdgeInsets.only(bottom: verticalGap),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
// 上行:左对齐
|
|
||||||
_DetailText(left),
|
|
||||||
if (right.isNotEmpty)
|
|
||||||
// 下行:右对齐
|
|
||||||
Align(
|
|
||||||
alignment: Alignment.centerRight,
|
|
||||||
child: _DetailText(right),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Column(children: rows);
|
|
||||||
}),
|
|
||||||
),
|
),
|
||||||
|
|
||||||
// — 底部标签区 —
|
// — 底部标签区 —
|
||||||
|
@ -127,21 +71,86 @@ class DannerRepainItem extends StatelessWidget {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 构建详情行
|
||||||
|
List<Widget> _buildDetailRows() {
|
||||||
|
List<Widget> rows = [];
|
||||||
|
for (int i = 0; i < details.length; i += 2) {
|
||||||
|
final left = details[i];
|
||||||
|
final right = (i + 1 < details.length) ? details[i + 1] : '';
|
||||||
|
|
||||||
|
rows.add(
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 8),
|
||||||
|
child: _DetailRow(left: left, right: right),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Detail 文本封装:
|
/// 详情行组件:固定左右布局,平均分配宽度,各自换行
|
||||||
/// 默认一行不换行;若超出则让整个组件撑宽,由外层判断拆行。
|
/// 如果只有左侧文本,则靠左显示
|
||||||
|
class _DetailRow extends StatelessWidget {
|
||||||
|
final String left;
|
||||||
|
final String right;
|
||||||
|
|
||||||
|
const _DetailRow({
|
||||||
|
Key? key,
|
||||||
|
required this.left,
|
||||||
|
required this.right,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
// 如果右侧文本为空,只显示左侧文本,靠左显示
|
||||||
|
if (right.isEmpty) {
|
||||||
|
return Align(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: _DetailText(left, textAlign: TextAlign.left),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// 左侧文本 - 占50%宽度
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: _DetailText(left, textAlign: TextAlign.left),
|
||||||
|
),
|
||||||
|
|
||||||
|
// 中间间距
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
|
||||||
|
// 右侧文本 - 占50%宽度
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: _DetailText(right, textAlign: TextAlign.right),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Detail 文本封装:支持自动换行和指定的对齐方式
|
||||||
class _DetailText extends StatelessWidget {
|
class _DetailText extends StatelessWidget {
|
||||||
final String text;
|
final String text;
|
||||||
const _DetailText(this.text, {Key? key}) : super(key: key);
|
final TextAlign textAlign;
|
||||||
|
|
||||||
|
const _DetailText(this.text, {
|
||||||
|
Key? key,
|
||||||
|
required this.textAlign,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Text(
|
return Text(
|
||||||
text,
|
text,
|
||||||
style: HhTextStyleUtils.secondaryTitleStyle,
|
style: HhTextStyleUtils.secondaryTitleStyle,
|
||||||
softWrap: false,
|
softWrap: true, // 允许换行
|
||||||
overflow: TextOverflow.visible,
|
textAlign: textAlign, // 使用指定的对齐方式
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -118,11 +118,55 @@ class _DepartmentPickerHiddenTypeState
|
||||||
|
|
||||||
void _onSearchChanged() {
|
void _onSearchChanged() {
|
||||||
final q = _searchController.text.toLowerCase().trim();
|
final q = _searchController.text.toLowerCase().trim();
|
||||||
|
// setState(() {
|
||||||
|
// filtered = q.isEmpty ? original : _filterCategories(original, q);
|
||||||
|
// });
|
||||||
|
|
||||||
|
//新加搜索展开子项
|
||||||
setState(() {
|
setState(() {
|
||||||
filtered = q.isEmpty ? original : _filterCategories(original, q);
|
if (q.isEmpty) {
|
||||||
|
filtered = original;
|
||||||
|
expandedSet.clear(); // 清空展开状态
|
||||||
|
} else {
|
||||||
|
filtered = _filterCategories(original, q);
|
||||||
|
// 搜索时自动展开所有过滤后的节点
|
||||||
|
_expandAllMatchingNodes(filtered);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 递归展开所有匹配的节点及其父节点
|
||||||
|
void _expandAllMatchingNodes(List<Category> categories) {
|
||||||
|
for (var category in categories) {
|
||||||
|
// 展开当前节点
|
||||||
|
expandedSet.add(category.id);
|
||||||
|
|
||||||
|
// 递归展开子节点
|
||||||
|
if (category.children.isNotEmpty) {
|
||||||
|
_expandAllMatchingNodes(category.children);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 展开所有父节点直到根节点
|
||||||
|
_expandParentNodes(category.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 展开指定节点的所有父节点
|
||||||
|
void _expandParentNodes(String id) {
|
||||||
|
var currentId = id;
|
||||||
|
var parent = parentMap[currentId];
|
||||||
|
|
||||||
|
while (parent != null) {
|
||||||
|
expandedSet.add(parent.id);
|
||||||
|
currentId = parent.id;
|
||||||
|
parent = parentMap[currentId];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<Category> _filterCategories(List<Category> list, String q) {
|
List<Category> _filterCategories(List<Category> list, String q) {
|
||||||
final res = <Category>[];
|
final res = <Category>[];
|
||||||
for (var cat in list) {
|
for (var cat in list) {
|
||||||
|
|
|
@ -24,10 +24,10 @@ class ApiService {
|
||||||
// static const String baseFacePath = "http://192.168.0.25:38199"; //王轩服务器
|
// 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.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";
|
||||||
|
@ -2052,6 +2052,7 @@ U6Hzm1ninpWeE+awIDAQAB
|
||||||
String correctiveDepartment,
|
String correctiveDepartment,
|
||||||
String isIndex,
|
String isIndex,
|
||||||
String keyWord,
|
String keyWord,
|
||||||
|
String laiYuanId,
|
||||||
) {
|
) {
|
||||||
return HttpManager().request(
|
return HttpManager().request(
|
||||||
basePath,
|
basePath,
|
||||||
|
@ -2063,7 +2064,7 @@ U6Hzm1ninpWeE+awIDAQAB
|
||||||
"ENDTIME": endDate.isEmpty?"":"$endDate 23:59:59",
|
"ENDTIME": endDate.isEmpty?"":"$endDate 23:59:59",
|
||||||
"HIDDENLEVEL": level,
|
"HIDDENLEVEL": level,
|
||||||
"HIDDEN_RISKSTANDARD": riskStandard,
|
"HIDDEN_RISKSTANDARD": riskStandard,
|
||||||
// "SOURCE": riskStandard,
|
// "SOURCE": laiYuanId,
|
||||||
"STATE": state,
|
"STATE": state,
|
||||||
"DEPARTMENT_ID": departmentId,
|
"DEPARTMENT_ID": departmentId,
|
||||||
"RECTIFICATIONDEPT": correctiveDepartment,
|
"RECTIFICATIONDEPT": correctiveDepartment,
|
||||||
|
|
|
@ -76,20 +76,20 @@ class _DangerWaitListPageState extends State<DangerWaitListPage> {
|
||||||
void getListData(int type,bool addList,String keyWord){
|
void getListData(int type,bool addList,String keyWord){
|
||||||
switch(widget.appItem ){
|
switch(widget.appItem ){
|
||||||
case 1://隐患记录
|
case 1://隐患记录
|
||||||
_getDangerRecord(-1,_page,"","","","","","","","",keyWord,addList);
|
_getDangerRecord(-1,_page,"","","","","","","","",keyWord,addList,"");
|
||||||
// _getListTree();
|
// _getListTree();
|
||||||
break;
|
break;
|
||||||
case 2://待整改隐患
|
case 2://待整改隐患
|
||||||
_getDangerRecord(2,_page,"","","","","","","","",keyWord,addList);
|
_getDangerRecord(2,_page,"","","","","","","","",keyWord,addList,"");
|
||||||
break;
|
break;
|
||||||
case 3://超期未整改
|
case 3://超期未整改
|
||||||
_getDangerRecord(5,_page,"","","","","-1","","","",keyWord,addList);
|
_getDangerRecord(5,_page,"","","","","-1","","","",keyWord,addList,"");
|
||||||
break;
|
break;
|
||||||
case 4://隐患验收
|
case 4://隐患验收
|
||||||
_getDangerRecord(3,_page,"","","","","","3","","",keyWord,addList);
|
_getDangerRecord(3,_page,"","","","","","3","","",keyWord,addList,"");
|
||||||
break;
|
break;
|
||||||
case 5://已验收隐患
|
case 5://已验收隐患
|
||||||
_getDangerRecord(4,_page,"","","","","","4","","1",keyWord,addList);
|
_getDangerRecord(4,_page,"","","","","","4","","1",keyWord,addList,"");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -133,11 +133,11 @@ class _DangerWaitListPageState extends State<DangerWaitListPage> {
|
||||||
child: DangerWaitDrawer(
|
child: DangerWaitDrawer(
|
||||||
"",
|
"",
|
||||||
onClose: (String selectedCategoryId,String selectedDepartmentId,String investigationMethodOption,
|
onClose: (String selectedCategoryId,String selectedDepartmentId,String investigationMethodOption,
|
||||||
String hazardLevelOption,String dangerStatusOption,String startDate,String endDate) {
|
String hazardLevelOption,String dangerStatusOption,String startDate,String endDate,String laiYuanId) {
|
||||||
|
|
||||||
_page=1;
|
_page=1;
|
||||||
_getDangerRecord(-1,_page,startDate,endDate,hazardLevelOption,investigationMethodOption,
|
_getDangerRecord(-1,_page,startDate,endDate,hazardLevelOption,investigationMethodOption,
|
||||||
dangerStatusOption,selectedCategoryId,selectedDepartmentId,"",searchKey,false);
|
dangerStatusOption,selectedCategoryId,selectedDepartmentId,"",searchKey,false,laiYuanId);
|
||||||
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -365,7 +365,7 @@ class _DangerWaitListPageState extends State<DangerWaitListPage> {
|
||||||
Future<void> _getDangerRecord(int type, int currentPage,
|
Future<void> _getDangerRecord(int type, int currentPage,
|
||||||
String startDate,String endDate,String level,String riskStandard,String state,
|
String startDate,String endDate,String level,String riskStandard,String state,
|
||||||
String departmentId,String correctiveDepartment,
|
String departmentId,String correctiveDepartment,
|
||||||
String isIndex,String keyWord,bool loadMore) async {
|
String isIndex,String keyWord,bool loadMore,String laiYuanId) async {
|
||||||
try {
|
try {
|
||||||
if (_isLoading) return;
|
if (_isLoading) return;
|
||||||
_isLoading = true;
|
_isLoading = true;
|
||||||
|
@ -373,7 +373,7 @@ class _DangerWaitListPageState extends State<DangerWaitListPage> {
|
||||||
LoadingDialogHelper.show();
|
LoadingDialogHelper.show();
|
||||||
final result = await ApiService.getHiddenTreatmentList( type, currentPage,
|
final result = await ApiService.getHiddenTreatmentList( type, currentPage,
|
||||||
startDate, endDate, level, riskStandard, state,
|
startDate, endDate, level, riskStandard, state,
|
||||||
departmentId, correctiveDepartment, isIndex, keyWord);
|
departmentId, correctiveDepartment, isIndex, keyWord,laiYuanId);
|
||||||
LoadingDialogHelper.hide();
|
LoadingDialogHelper.hide();
|
||||||
if (result['result'] == 'success') {
|
if (result['result'] == 'success') {
|
||||||
|
|
||||||
|
@ -468,8 +468,10 @@ class _DangerWaitListPageState extends State<DangerWaitListPage> {
|
||||||
return "隐患来源:标准排查";
|
return "隐患来源:标准排查";
|
||||||
}else if("4"==type){
|
}else if("4"==type){
|
||||||
return "隐患来源:专项检查";
|
return "隐患来源:专项检查";
|
||||||
}else{
|
}else if("5"==type){
|
||||||
return "隐患来源:安全检查";
|
return "隐患来源:安全检查";
|
||||||
|
}else{
|
||||||
|
return "隐患来源:NFC设备巡检";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -690,8 +690,8 @@ class _HiddenDangerAcceptancePageState extends State<HiddenDangerAcceptancePage>
|
||||||
String _getSourceText(String? source) {
|
String _getSourceText(String? source) {
|
||||||
switch (source) {
|
switch (source) {
|
||||||
case '1': return '隐患快报';
|
case '1': return '隐患快报';
|
||||||
case '2': return '隐患排查清单检查';
|
case '2': return '隐患排查';
|
||||||
case '3': return '标准排查清单检查';
|
case '3': return '标准排查';
|
||||||
case '4': return '专项检查';
|
case '4': return '专项检查';
|
||||||
case '5': return '安全检查';
|
case '5': return '安全检查';
|
||||||
case '6': return 'NFC设备巡检';
|
case '6': return 'NFC设备巡检';
|
||||||
|
|
|
@ -496,8 +496,8 @@ class _HiddenRecordDetailPageState extends State<HiddenRecordDetailPage> {
|
||||||
|
|
||||||
switch (source) {
|
switch (source) {
|
||||||
case '1': return '隐患快报';
|
case '1': return '隐患快报';
|
||||||
case '2': return '隐患排查清单检查';
|
case '2': return '隐患排查';
|
||||||
case '3': return '标准排查清单检查';
|
case '3': return '标准排查';
|
||||||
case '4': return '专项检查';
|
case '4': return '专项检查';
|
||||||
case '5': return '安全检查';
|
case '5': return '安全检查';
|
||||||
case '6': return 'NFC设备巡检';
|
case '6': return 'NFC设备巡检';
|
||||||
|
|
|
@ -787,8 +787,8 @@ class _PendingRectificationDetailPageState extends State<PendingRectificationDet
|
||||||
String _getSourceText(String? source) {
|
String _getSourceText(String? source) {
|
||||||
switch (source) {
|
switch (source) {
|
||||||
case '1': return '隐患快报';
|
case '1': return '隐患快报';
|
||||||
case '2': return '隐患排查清单检查';
|
case '2': return '隐患排查';
|
||||||
case '3': return '标准排查清单检查';
|
case '3': return '标准排查';
|
||||||
case '4': return '专项检查';
|
case '4': return '专项检查';
|
||||||
case '5': return '安全检查';
|
case '5': return '安全检查';
|
||||||
case '6': return 'NFC设备巡检';
|
case '6': return 'NFC设备巡检';
|
||||||
|
|
|
@ -247,13 +247,16 @@ class _SafetyCommitmentDhListState extends State<SafetyCommitmentDhList> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Row(
|
Text('承诺时间: ${item['START_TIME']??""}-${item['END_TIME']??""}'),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
const SizedBox(height: 5),
|
||||||
children: [
|
|
||||||
Text('承诺时间: ${item['SIGN_TIME']??""}'),
|
|
||||||
Text('承诺人: ${item['SIGN_USER_NAME']??""}'),
|
Text('承诺人: ${item['SIGN_USER_NAME']??""}'),
|
||||||
],
|
// Row(
|
||||||
),
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
// children: [
|
||||||
|
// Text('承诺时间: ${item['SIGN_TIME']??""}'),
|
||||||
|
// Text('承诺人: ${item['SIGN_USER_NAME']??""}'),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -31,6 +31,10 @@ class DangerWaitBean {
|
||||||
final String itemNameOne;
|
final String itemNameOne;
|
||||||
final String itemNameTwo;
|
final String itemNameTwo;
|
||||||
|
|
||||||
|
final String laiYuanId;
|
||||||
|
final String laiYuanName;
|
||||||
|
|
||||||
|
|
||||||
DangerWaitBean({
|
DangerWaitBean({
|
||||||
required this.selectedCategoryId,
|
required this.selectedCategoryId,
|
||||||
required this.selectedDepartmentId,
|
required this.selectedDepartmentId,
|
||||||
|
@ -43,7 +47,8 @@ class DangerWaitBean {
|
||||||
required this.endTime,
|
required this.endTime,
|
||||||
required this.itemNameOne,
|
required this.itemNameOne,
|
||||||
required this.itemNameTwo,
|
required this.itemNameTwo,
|
||||||
|
required this.laiYuanId,
|
||||||
|
required this.laiYuanName,
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -54,6 +59,7 @@ class DangerWaitBean {
|
||||||
|
|
||||||
String startTime,String endTime,
|
String startTime,String endTime,
|
||||||
String itemNameOne,String itemNameTwo,
|
String itemNameOne,String itemNameTwo,
|
||||||
|
String laiYuanId,String laiYuanName,
|
||||||
) {
|
) {
|
||||||
return DangerWaitBean(
|
return DangerWaitBean(
|
||||||
selectedCategoryId:selectedCategoryId,
|
selectedCategoryId:selectedCategoryId,
|
||||||
|
@ -67,6 +73,8 @@ class DangerWaitBean {
|
||||||
endTime:endTime,
|
endTime:endTime,
|
||||||
itemNameOne:itemNameOne,
|
itemNameOne:itemNameOne,
|
||||||
itemNameTwo:itemNameTwo,
|
itemNameTwo:itemNameTwo,
|
||||||
|
laiYuanId:laiYuanId,
|
||||||
|
laiYuanName:laiYuanName,
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -76,7 +84,7 @@ class DangerWaitBean {
|
||||||
"investigationMethodOption":investigationMethodOption,"investigationMethodId":investigationMethodId,
|
"investigationMethodOption":investigationMethodOption,"investigationMethodId":investigationMethodId,
|
||||||
"hazardLevelOption":hazardLevelOption,"dangerStatusOption":dangerStatusOption,
|
"hazardLevelOption":hazardLevelOption,"dangerStatusOption":dangerStatusOption,
|
||||||
"startTime":startTime,"endTime":endTime,
|
"startTime":startTime,"endTime":endTime,
|
||||||
"itemNameOne":itemNameOne,"itemNameTwo":itemNameTwo,};
|
"itemNameOne":itemNameOne,"itemNameTwo":itemNameTwo,"laiYuanId":laiYuanId,"laiYuanName":laiYuanName,};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -85,7 +93,7 @@ class DangerWaitBean {
|
||||||
class DangerWaitDrawer extends StatefulWidget {
|
class DangerWaitDrawer extends StatefulWidget {
|
||||||
const DangerWaitDrawer(this.treeJson, {super.key,required this.onClose});
|
const DangerWaitDrawer(this.treeJson, {super.key,required this.onClose});
|
||||||
|
|
||||||
final Function(String,String,String,String,String,String,String) onClose; // 回调函数
|
final Function(String,String,String,String,String,String,String,String) onClose; // 回调函数
|
||||||
final String treeJson;
|
final String treeJson;
|
||||||
// final DangerWaitBean waitBean;
|
// final DangerWaitBean waitBean;
|
||||||
|
|
||||||
|
@ -123,6 +131,12 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
||||||
String itemNameOne="请选择";
|
String itemNameOne="请选择";
|
||||||
String itemNameTwo="请选择";
|
String itemNameTwo="请选择";
|
||||||
|
|
||||||
|
//隐患来源:
|
||||||
|
List<WaitListBean> laiYuanList =[];
|
||||||
|
|
||||||
|
String laiYuanId="";
|
||||||
|
String laiYuanName="请选择";
|
||||||
|
|
||||||
// 转换为List<Map<String, dynamic>>
|
// 转换为List<Map<String, dynamic>>
|
||||||
late List<Map<String, dynamic>> departmentList ;
|
late List<Map<String, dynamic>> departmentList ;
|
||||||
|
|
||||||
|
@ -131,6 +145,7 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
||||||
final List<String> investigationMethod = ["风险排查隐患", "隐患排查隐患"];
|
final List<String> investigationMethod = ["风险排查隐患", "隐患排查隐患"];
|
||||||
final List<String> hazardLevel = [" 一般风险 ", " 重大风险 "];
|
final List<String> hazardLevel = [" 一般风险 ", " 重大风险 "];
|
||||||
final List<String> dangerStatus = ["未整改", "已整改", "已验收", "已过期"];
|
final List<String> dangerStatus = ["未整改", "已整改", "已验收", "已过期"];
|
||||||
|
final List<String> laiYuanStatus = ["隐患快报", "隐患排查", "标准排查", "专项检查", "安全检查", "NFC设备巡检"];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
@ -162,6 +177,8 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
||||||
}
|
}
|
||||||
itemNameOne= dangerWaitBean["itemNameOne"];
|
itemNameOne= dangerWaitBean["itemNameOne"];
|
||||||
itemNameTwo= dangerWaitBean["itemNameTwo"];
|
itemNameTwo= dangerWaitBean["itemNameTwo"];
|
||||||
|
laiYuanId= dangerWaitBean["laiYuanId"];
|
||||||
|
laiYuanName= dangerWaitBean["laiYuanName"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,6 +186,16 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
||||||
print("解析失败: $e");
|
print("解析失败: $e");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//隐患来源数据处理
|
||||||
|
// setState(() {
|
||||||
|
// for(int i=0;i<laiYuanStatus.length;i++){
|
||||||
|
// WaitListBean waitListBean=WaitListBean(id: "${i+1}", name: laiYuanStatus[i], parentId: "");
|
||||||
|
// laiYuanList.add(waitListBean);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
// // 解析JSON字符串
|
// // 解析JSON字符串
|
||||||
// jsonList = json.decode(widget.treeJson);
|
// jsonList = json.decode(widget.treeJson);
|
||||||
// departmentList = List<Map<String, dynamic>>.from(jsonList);
|
// departmentList = List<Map<String, dynamic>>.from(jsonList);
|
||||||
|
@ -261,6 +288,27 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 隐患来源显示分类选择器
|
||||||
|
void showCategoryPickerTwo() {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
isScrollControlled: true,
|
||||||
|
barrierColor: Colors.black54,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
builder: (ctx) => WaitListPicker(
|
||||||
|
data: laiYuanList,
|
||||||
|
onSelected: (item) {
|
||||||
|
setState(() {
|
||||||
|
laiYuanId=item!.id;
|
||||||
|
laiYuanName=item!.name;
|
||||||
|
setResult();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
child:
|
child:
|
||||||
SingleChildScrollView( // 添加这一行
|
SingleChildScrollView( // 添加这一行
|
||||||
|
@ -314,6 +362,18 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
||||||
// },
|
// },
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// const SizedBox(height: 6),
|
||||||
|
// // 管控部门
|
||||||
|
// _buildDropdownBox(
|
||||||
|
// "隐患来源",
|
||||||
|
// display: laiYuanName ?? '请选择',
|
||||||
|
// onTap: () {
|
||||||
|
// showCategoryPickerTwo();
|
||||||
|
// }
|
||||||
|
// ),
|
||||||
|
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
const Text(
|
const Text(
|
||||||
"排查方式",
|
"排查方式",
|
||||||
|
@ -335,6 +395,8 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
||||||
itemCount: investigationMethod.length,
|
itemCount: investigationMethod.length,
|
||||||
itemBuilder: _itemGridviewItem
|
itemBuilder: _itemGridviewItem
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
// Row(
|
// Row(
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
// children: List.generate(investigationMethod.length, (idx) {
|
// children: List.generate(investigationMethod.length, (idx) {
|
||||||
|
@ -508,6 +570,9 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
||||||
itemNameOne="请选择";
|
itemNameOne="请选择";
|
||||||
itemNameTwo="请选择";
|
itemNameTwo="请选择";
|
||||||
|
|
||||||
|
laiYuanId="";
|
||||||
|
laiYuanName="请选择";
|
||||||
|
|
||||||
setResult();
|
setResult();
|
||||||
// widget.onClose("","","","","","","");
|
// widget.onClose("","","","","","","");
|
||||||
|
|
||||||
|
@ -698,7 +763,9 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
||||||
_selectedCategoryId ?? "", _selectedDepartmentId?? "",
|
_selectedCategoryId ?? "", _selectedDepartmentId?? "",
|
||||||
_investigationMethodOption,investigationMethodId,
|
_investigationMethodOption,investigationMethodId,
|
||||||
_hazardLevelOption, _dangerStatusOption,
|
_hazardLevelOption, _dangerStatusOption,
|
||||||
startTime, endTime,itemNameOne, itemNameTwo);
|
startTime, endTime,itemNameOne, itemNameTwo,laiYuanId,laiYuanName);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String jsonString = jsonEncode(waitBean.toJson());
|
String jsonString = jsonEncode(waitBean.toJson());
|
||||||
SessionService.instance.setDangerWaitInfo(jsonString);
|
SessionService.instance.setDangerWaitInfo(jsonString);
|
||||||
|
@ -711,6 +778,7 @@ class DangerWaitDrawerState extends State<DangerWaitDrawer> {
|
||||||
_dangerStatusOption!=-1?dangerStatusId[_dangerStatusOption]:"",
|
_dangerStatusOption!=-1?dangerStatusId[_dangerStatusOption]:"",
|
||||||
_startDate!=null?startTime:"",
|
_startDate!=null?startTime:"",
|
||||||
_endDate!=null?endTime:"",
|
_endDate!=null?endTime:"",
|
||||||
|
laiYuanId?? ""
|
||||||
); // 触发回调
|
); // 触发回调
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ class _MineDutyDetailPage extends State<MineDutyDetailPage> {
|
||||||
|
|
||||||
// 申请人信息
|
// 申请人信息
|
||||||
if (widget.item["REVIEW_STATUS"] != '2')
|
if (widget.item["REVIEW_STATUS"] != '2')
|
||||||
_buildInfoRowTwo("审批人:", "${FormUtils.hasValue(widget.item, "REVIEW_USER_NAME") ? widget.item["REVIEW_USER_NAME"] : "unfind"}[${FormUtils.hasValue(widget.item, "REVIEW_USER_DEPARTMENTNAME") ? widget.item["REVIEW_USER_DEPARTMENTNAME"] : "unfind"}]",),
|
_buildInfoRowTwo("审批人:", "${FormUtils.hasValue(widget.item, "REVIEW_USER_NAME") ? widget.item["REVIEW_USER_NAME"] : "无"}${FormUtils.hasValue(widget.item, "REVIEW_USER_DEPARTMENTNAME") ? "[${widget.item["REVIEW_USER_DEPARTMENTNAME"]}]": ""}",),
|
||||||
// Container(
|
// Container(
|
||||||
// padding: const EdgeInsets.symmetric(
|
// padding: const EdgeInsets.symmetric(
|
||||||
// horizontal: 5,
|
// horizontal: 5,
|
||||||
|
|
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 2.2.0+59
|
version: 2.2.1+60
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.7.0
|
sdk: ^3.7.0
|
||||||
|
|
Loading…
Reference in New Issue