diff --git a/lib/http/ApiService.dart b/lib/http/ApiService.dart index 6f720f9..05cfe2e 100644 --- a/lib/http/ApiService.dart +++ b/lib/http/ApiService.dart @@ -1808,12 +1808,14 @@ U6Hzm1ninpWeE+awIDAQAB String showCount, String currentPage, String keyWord, + String type, ) { return HttpManager().request( basePath, '/app/notice/listForCp', method: Method.post, data: { + "TYPE": type, "showCount": showCount, "currentPage": currentPage, "KEYWORDS": keyWord, @@ -2473,33 +2475,7 @@ U6Hzm1ninpWeE+awIDAQAB Map data, ) { - print("======>"+{ - // ...data, - "HIDDEN_ID": "", - "SOURCE": '1', - "HIDDENDESCR": hazardDescription, - "HIDDENPART": partDescription, - "LATITUDE": latitude, - "LONGITUDE": longitude, - "RECTIFYDESCR": dangerDetail, - "RECTIFICATIONDEADLINE": dataTime, - "RECTIFICATIONTYPE": type, - "RECTIFICATIONOR": responsibleId, - - "HIDDENTYPE": yinHuanTypeIds, - "HIDDENLEVEL": hazardLeve, - "RECTIFICATIONDEPT": buMenId, - "HIDDENFINDDEPT": buMenPDId.isNotEmpty ? buMenPDId : buMenId, - - "CREATOR": SessionService.instance.loginUserId, - "HIDDENTYPE_NAME": yinHuanTypeNames, - "HIDDENTYPE1": hiddenType1, - "HIDDENTYPE2": hiddenType2, - "HIDDENTYPE3": hiddenType3, - "CORPINFO_ID": SessionService.instance.corpinfoId, - "USER_ID": SessionService.instance.loginUserId, - }.toString()); return HttpManager().request( basePath, '/app/hidden/riskListCheckAppAdd', @@ -2521,7 +2497,7 @@ U6Hzm1ninpWeE+awIDAQAB "HIDDENTYPE": yinHuanTypeIds, "HIDDENLEVEL": hazardLeve, "RECTIFICATIONDEPT": buMenId, - "HIDDENFINDDEPT": buMenPDId.isNotEmpty ? buMenPDId : buMenId, + "HIDDENFINDDEPT": buMenId, "CREATOR": SessionService.instance.loginUserId, "HIDDENTYPE_NAME": yinHuanTypeNames, diff --git a/lib/pages/KeyProjects/Danger/danger_manager_detail_page.dart b/lib/pages/KeyProjects/Danger/danger_manager_detail_page.dart index aede099..96fb1b5 100644 --- a/lib/pages/KeyProjects/Danger/danger_manager_detail_page.dart +++ b/lib/pages/KeyProjects/Danger/danger_manager_detail_page.dart @@ -131,7 +131,7 @@ class _DangerManagerDetailPageState extends State { ItemListWidget.multiLineTitleTextField( label: '是否缴纳罚款:', isEditable: false, - text: punishForm['已缴'] == '1' ? '已缴' : '未缴', + text: punishForm['HANDLED'] == '1' ? '已缴' : '未缴', ), const Divider(), if (punishForm['HANDLED'].toString() == '1') diff --git a/lib/pages/KeyProjects/Punishment/punishment_manager_detail_page.dart b/lib/pages/KeyProjects/Punishment/punishment_manager_detail_page.dart index b33a183..5789b6f 100644 --- a/lib/pages/KeyProjects/Punishment/punishment_manager_detail_page.dart +++ b/lib/pages/KeyProjects/Punishment/punishment_manager_detail_page.dart @@ -129,7 +129,7 @@ class _PunishmentManagerDetailPageState extends State Future _getNotifEnterprise(String keyWord) async { // LoadingDialogHelper.show(); try { - final result = await ApiService.getNotifEnterprise("-1", pageNum.toString(),keyWord); + final result = await ApiService.getNotifEnterprise("-1", pageNum.toString(),keyWord,"0"); if (result['result'] == 'success') { final List newList = result['varList'] ?? []; setState(() { diff --git a/lib/pages/app/danner_repair.dart b/lib/pages/app/danner_repair.dart index 03f0a46..6708c53 100644 --- a/lib/pages/app/danner_repair.dart +++ b/lib/pages/app/danner_repair.dart @@ -141,25 +141,31 @@ class DannerRepairState extends State { ListItemFactory.createBuildSimpleSection("隐患整改"), Divider(height: 1), Container( - height: 130, + padding: EdgeInsets.all(15), child: Column( children: [ - Row( - children: [ - Text('* ', style: TextStyle(color: Colors.red)), - HhTextStyleUtils.mainTitle("隐患描述", fontSize: 15)], - ), - TextField( - controller: miaoShuController, - keyboardType: TextInputType.multiline, - maxLines: null, // 不限制行数,输入多少文字就撑开多少行 - style: TextStyle(fontSize: 15), - decoration: InputDecoration( - hintText: '请对隐患进行详细描述(必填项)', - border: InputBorder.none, - ), + ListItemFactory.createBuildMultilineInput( + isRequired:true, + "隐患描述", + "请对隐患进行详细描述(必填项)", + miaoShuController, ), + // Row( + // children: [ + // Text('* ', style: TextStyle(color: Colors.red)), + // HhTextStyleUtils.mainTitle("隐患描述", fontSize: 15)], + // ), + // TextField( + // controller: miaoShuController, + // keyboardType: TextInputType.multiline, + // maxLines: null, // 不限制行数,输入多少文字就撑开多少行 + // style: TextStyle(fontSize: 15), + // decoration: InputDecoration( + // hintText: '请对隐患进行详细描述(必填项)', + // border: InputBorder.none, + // ), + // ), ], ), ), diff --git a/lib/pages/app/hidden_danger_acceptance_page.dart b/lib/pages/app/hidden_danger_acceptance_page.dart index 8feec33..ee23e42 100644 --- a/lib/pages/app/hidden_danger_acceptance_page.dart +++ b/lib/pages/app/hidden_danger_acceptance_page.dart @@ -486,22 +486,28 @@ class _HiddenDangerAcceptancePageState extends State padding: EdgeInsets.only(top: 10,bottom: 10,left: 10,right: 10), child: Column( children: [ - Row( - children: [ - Text('* ', style: TextStyle(color: Colors.red)), - HhTextStyleUtils.mainTitle("验收描述", fontSize: 15)], - ), - TextField( - controller: miaoShuController, - keyboardType: TextInputType.multiline, - minLines: 3, - maxLines: null, // 不限制行数,输入多少文字就撑开多少行 - style: TextStyle(fontSize: 15), - decoration: InputDecoration( - hintText: '请对隐患进行详细描述(必填项)', - border: InputBorder.none, - ), + ListItemFactory.createBuildMultilineInput( + isRequired:true, + "验收描述", + "请对隐患进行详细描述(必填项)", + miaoShuController, ), + // Row( + // children: [ + // Text('* ', style: TextStyle(color: Colors.red)), + // HhTextStyleUtils.mainTitle("验收描述", fontSize: 15)], + // ), + // TextField( + // controller: miaoShuController, + // keyboardType: TextInputType.multiline, + // minLines: 3, + // maxLines: null, // 不限制行数,输入多少文字就撑开多少行 + // style: TextStyle(fontSize: 15), + // decoration: InputDecoration( + // hintText: '请对隐患进行详细描述(必填项)', + // border: InputBorder.none, + // ), + // ), ], ), ), diff --git a/lib/pages/app/pending_rectification_detail_page.dart b/lib/pages/app/pending_rectification_detail_page.dart index 1a194fb..afde82a 100644 --- a/lib/pages/app/pending_rectification_detail_page.dart +++ b/lib/pages/app/pending_rectification_detail_page.dart @@ -224,6 +224,8 @@ class _PendingRectificationDetailPageState extends State - with SingleTickerProviderStateMixin { + with TickerProviderStateMixin { final TextEditingController searchController = TextEditingController(); late List _list = []; late TabController _tabController; + late TabController _tabControllerTwo; int _selectedTab = 0; + int _selectedTabTwo = 0; int pageNum = 1; String keyWord=""; + // 模拟数据 final List> _notifications = List.generate(10, (i) { bool read = i % 3 == 0; @@ -52,6 +55,24 @@ class _NotifPageState extends State } }); + + _tabControllerTwo = TabController(length: 2, vsync: this); + _tabControllerTwo.addListener(() { + // if (!_tabController.indexIsChanging) { + // setState(() => _selectedTab = _tabController.index); + // } + + if (_tabControllerTwo.indexIsChanging) { + setState(() => _selectedTabTwo = _tabControllerTwo.index); + print('切换到标签:${_tabControllerTwo.index}'); + + searchController.text = ""; + keyWord=""; + reRefreshData(); + } + }); + + _getNotifList(); } @@ -96,6 +117,7 @@ class _NotifPageState extends State "-1", pageNum.toString(), keyWord, + _selectedTabTwo.toString(), ); if (result['result'] == 'success') { final List newList = result['varList'] ?? []; @@ -129,6 +151,7 @@ class _NotifPageState extends State @override void dispose() { _tabController.dispose(); + _tabControllerTwo.dispose(); super.dispose(); } @@ -156,9 +179,23 @@ class _NotifPageState extends State tabs: const [Tab(text: '平台公告'), Tab(text: '企业公告')], ), + + if(_selectedTab==1) + TabBar( + controller: _tabControllerTwo, + labelStyle: TextStyle(fontSize: 14), + indicator: UnderlineTabIndicator( + borderSide: BorderSide(width: 3.0, color: Colors.blue), + insets: EdgeInsets.symmetric(horizontal: 80.0), + ), + labelColor: Colors.blue, + unselectedLabelColor: Colors.grey, + tabs: const [Tab(text: '未读'), Tab(text: '已读')], + ), + // Search bar Padding( - padding: const EdgeInsets.all(10), + padding: EdgeInsets.only(left: 10,right: 10,top: 10), child: SearchBarWidget( key: Key("searchBody"), controller: searchController, @@ -178,6 +215,7 @@ class _NotifPageState extends State ), ), + // List Expanded( child: