From 325bd9f58cf11e07994475a15995ba8159f1ff6c Mon Sep 17 00:00:00 2001 From: hs <873121290@qq.com> Date: Thu, 13 Aug 2026 09:23:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=A3=E9=97=A8bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/route/routes.txt | 346 +++++++++++++----- .../car/firstlevel_car_add_page.dart | 10 + .../home/doorAndCar/doorArea_type_page.dart | 128 ++++--- .../home/doorAndCar/doorCar_tab_page.dart | 15 +- .../person/doorArea_person_record_page.dart | 17 +- .../doorAndCar/person_selection_page.dart | 6 +- 6 files changed, 367 insertions(+), 155 deletions(-) diff --git a/assets/route/routes.txt b/assets/route/routes.txt index 36c617e..2645558 100644 --- a/assets/route/routes.txt +++ b/assets/route/routes.txt @@ -6,7 +6,7 @@ "errCode": null, "errMessage": null, "exception": null, - "traceId": "18688908153423296", + "traceId": "19369235529231168", "data": [ { "extValues": { @@ -36,7 +36,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 3, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -51,7 +51,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 21, - "showFlag": 1, + "showFlag": 2, "children": null }, { @@ -67,7 +67,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 22, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -100,7 +100,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 23, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -115,7 +115,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 27, - "showFlag": 1, + "showFlag": 2, "children": null }, { @@ -131,7 +131,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 28, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -198,7 +198,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 25, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -213,7 +213,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 31, - "showFlag": 1, + "showFlag": 2, "children": null }, { @@ -229,7 +229,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 32, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -247,7 +247,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 26, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -262,7 +262,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 33, - "showFlag": 1, + "showFlag": 2, "children": null }, { @@ -278,7 +278,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 34, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -298,7 +298,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 6, - "showFlag": 1, + "showFlag": 2, "children": null }, { @@ -314,7 +314,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 7, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -329,7 +329,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -344,7 +344,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -352,14 +352,14 @@ }, "id": "2043498882628493314", "menuName": "相关方端", - "menuUrl": "eightwork/container/stakeholder/hotWork/homework/list", + "menuUrl": "/eightwork/container/stakeholder/hotWork/homework/list", "parentId": "2043493319253336066", "parentIds": null, - "menuPerms": "container/stakeholder/hotWork", + "menuPerms": "container:stakeholder:hotWork", "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -379,7 +379,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 2, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -394,7 +394,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 2, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -402,14 +402,14 @@ }, "id": "2043499269284601857", "menuName": "相关方端", - "menuUrl": "eightwork/container/stakeholder/confinedSpaceWork/homework/list", + "menuUrl": "/eightwork/container/stakeholder/confinedSpaceWork/homework/list", "parentId": "2043494498838421506", "parentIds": null, - "menuPerms": "container/stakeholder/confinedSpaceWork", + "menuPerms": "container:stakeholder:confinedSpaceWork", "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -429,7 +429,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 3, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -444,7 +444,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -452,14 +452,14 @@ }, "id": "2043499407277203457", "menuName": "相关方端", - "menuUrl": "eightwork/container/stakeholder/highPlaceWork/homework/list", + "menuUrl": "/eightwork/container/stakeholder/highPlaceWork/homework/list", "parentId": "2043494968994734081", "parentIds": null, - "menuPerms": "stakeholder/highPlaceWork/homework", + "menuPerms": "stakeholder:highPlaceWork:homework", "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -479,7 +479,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 4, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -494,7 +494,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -502,14 +502,14 @@ }, "id": "2043499579373690881", "menuName": "相关方端", - "menuUrl": "eightwork/container/stakeholder/liftingWork/homework/list", + "menuUrl": "/eightwork/container/stakeholder/liftingWork/homework/list", "parentId": "2043496113083424769", "parentIds": null, - "menuPerms": "container/stakeholder/liftingWork", + "menuPerms": "container:stakeholder:liftingWork", "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -529,7 +529,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 5, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -544,7 +544,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -552,14 +552,14 @@ }, "id": "2043499892205854721", "menuName": "相关方端", - "menuUrl": "eightwork/container/stakeholder/liftingWork/homework/eightwork/container/stakeholder/blindBoardWork/homework/list", + "menuUrl": "/eightwork/container/stakeholder/liftingWork/homework/eightwork/container/stakeholder/blindBoardWork/homework/list", "parentId": "2043496339164798978", "parentIds": null, - "menuPerms": "container/stakeholder/blindBoardWork", + "menuPerms": "container:stakeholder:blindBoardWork", "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -579,7 +579,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 6, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -594,7 +594,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -602,14 +602,14 @@ }, "id": "2043500014041997314", "menuName": "相关方端", - "menuUrl": "eightwork/container/stakeholder/digWork/homework/list", + "menuUrl": "/eightwork/container/stakeholder/digWork/homework/list", "parentId": "2043496580261781506", "parentIds": null, - "menuPerms": "eightwork/container/stakeholder/digWork", + "menuPerms": "eightwork:container:stakeholder:digWork", "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -629,7 +629,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 7, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -644,7 +644,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -652,14 +652,14 @@ }, "id": "2043500162541330434", "menuName": "相关方端", - "menuUrl": "eightwork/container/stakeholder/cutWork/homework/list", + "menuUrl": "/eightwork/container/stakeholder/cutWork/homework/list", "parentId": "2043496777767362561", "parentIds": null, - "menuPerms": "container/stakeholder/cutWork", + "menuPerms": "container:stakeholder:cutWork", "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -679,7 +679,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 8, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -694,7 +694,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -702,14 +702,14 @@ }, "id": "2043500266430046210", "menuName": "相关方端", - "menuUrl": "eightwork/container/stakeholder/electricWork/homework/list", + "menuUrl": "/eightwork/container/stakeholder/electricWork/homework/list", "parentId": "2043496999897702402", "parentIds": null, - "menuPerms": "container/stakeholder/electricWork", + "menuPerms": "container:stakeholder:electricWork", "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -731,7 +731,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 8, - "showFlag": 1, + "showFlag": 2, "children": [ { "extValues": { @@ -739,14 +739,14 @@ }, "id": "2033844996439449602", "menuName": "隐患整改", - "menuUrl": "/hidden/container/branchCompany/average/rectification/list?clientId=XGFZD", + "menuUrl": "/hidden/container/branchCompany/average/rectification/list", "parentId": "2030925300149387273", "parentIds": null, "menuPerms": "hidden-container-branchCompany-average-rectification-list", "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 1, + "showFlag": 2, "children": null }, { @@ -762,7 +762,7 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 2, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -770,22 +770,6 @@ { "extValues": { - }, - "id": "2030935458707537921", - "menuName": "入港培训", - "menuUrl": "/dashboard/Study/Training", - "parentId": "2030925300149387265", - "parentIds": null, - "menuPerms": "dashboard-Study-Training", - "menuType": 1, - "menuAttribution": "QINGANG_RELATED_PARTIES", - "sort": 11, - "showFlag": 1, - "children": null - }, - { - "extValues": { - }, "id": "2033789896438398977", "menuName": "首页入职企业", @@ -796,12 +780,210 @@ "menuType": 1, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 11, - "showFlag": 1, + "showFlag": 2, "children": null }, { "extValues": { + }, + "id": "2030935458707537921", + "menuName": "入港培训", + "menuUrl": "/dashboard/Study/Training", + "parentId": "2030925300149387265", + "parentIds": null, + "menuPerms": "dashboard-Study-Training", + "menuType": 1, + "menuAttribution": "QINGANG_RELATED_PARTIES", + "sort": 11, + "showFlag": 2, + "children": null + }, + { + "extValues": { + + }, + "id": "2048700702355267585", + "menuName": "重点作业", + "menuUrl": "/dashboard/Key-assignment", + "parentId": "2030925300149387265", + "parentIds": null, + "menuPerms": "dashboard:Key-assignment", + "menuType": 1, + "menuAttribution": "QINGANG_RELATED_PARTIES", + "sort": 12, + "showFlag": 2, + "children": [ + { + "extValues": { + + }, + "id": "2048701086515765250", + "menuName": "重点作业申请", + "menuUrl": "/dashboard/Key-assignment/Key-Task-Application", + "parentId": "2048700702355267585", + "parentIds": null, + "menuPerms": "dashboard:Key-assignment:Key-Task-Application", + "menuType": 1, + "menuAttribution": "QINGANG_RELATED_PARTIES", + "sort": 1, + "showFlag": 2, + "children": [ + { + "extValues": { + + }, + "id": "2048701756107038721", + "menuName": "相关方端", + "menuUrl": "/keyProject/container/stakeholder/keyProjectApple/list", + "parentId": "2048701086515765250", + "parentIds": null, + "menuPerms": "container:stakeholder:keyProjectApple", + "menuType": 2, + "menuAttribution": "QINGANG_RELATED_PARTIES", + "sort": 1, + "showFlag": 2, + "children": null + } + ] + }, + { + "extValues": { + + }, + "id": "2048701299397664769", + "menuName": "被检查人确认", + "menuUrl": "/dashboard/Key-assignment/Confirmed-by-the-inspectee", + "parentId": "2048700702355267585", + "parentIds": null, + "menuPerms": "dashboard:Key-assignment:Confirmed-by-the-inspectee", + "menuType": 1, + "menuAttribution": "QINGANG_RELATED_PARTIES", + "sort": 2, + "showFlag": 2, + "children": [ + { + "extValues": { + + }, + "id": "2048701861241462786", + "menuName": "相关方端", + "menuUrl": "/keyProject/container/stakeholder/confirmedByInspection/list", + "parentId": "2048701299397664769", + "parentIds": null, + "menuPerms": "container:stakeholder:confirmedByInspection", + "menuType": 2, + "menuAttribution": "QINGANG_RELATED_PARTIES", + "sort": 1, + "showFlag": 2, + "children": null + } + ] + }, + { + "extValues": { + + }, + "id": "2048701491937189889", + "menuName": "隐患整改", + "menuUrl": "/dashboard/Key-assignment/Hidden-danger-rectification", + "parentId": "2048700702355267585", + "parentIds": null, + "menuPerms": "dashboard:Key-assignment:Hidden-danger-rectification", + "menuType": 1, + "menuAttribution": "QINGANG_RELATED_PARTIES", + "sort": 3, + "showFlag": 2, + "children": [ + { + "extValues": { + + }, + "id": "2048701972650565634", + "menuName": "相关方端", + "menuUrl": "/keyProject/container/stakeholder/hiddenRectification/list", + "parentId": "2048701491937189889", + "parentIds": null, + "menuPerms": "container:stakeholder:hiddenRectification", + "menuType": 2, + "menuAttribution": "QINGANG_RELATED_PARTIES", + "sort": 1, + "showFlag": 2, + "children": null + } + ] + }, + { + "extValues": { + + }, + "id": "2057625850700697601", + "menuName": "隐患记录", + "menuUrl": "/dashboard/Key-assignment/Hidden-Hazard-Record", + "parentId": "2048700702355267585", + "parentIds": null, + "menuPerms": "dashboard:Key-assignment:Hidden-Hazard-Record", + "menuType": 1, + "menuAttribution": "QINGANG_RELATED_PARTIES", + "sort": 4, + "showFlag": 2, + "children": [ + { + "extValues": { + + }, + "id": "2057625948167933954", + "menuName": "相关方端", + "menuUrl": "/keyProject/container/stakeholder/hiddenRecode/list", + "parentId": "2057625850700697601", + "parentIds": null, + "menuPerms": "container:stakeholder", + "menuType": 2, + "menuAttribution": "QINGANG_RELATED_PARTIES", + "sort": 1, + "showFlag": 2, + "children": null + } + ] + }, + { + "extValues": { + + }, + "id": "2084203639696330753", + "menuName": "处罚反馈", + "menuUrl": "/dashboard/Key-assignment/Penalty-Feedback", + "parentId": "2048700702355267585", + "parentIds": null, + "menuPerms": "dashboard:Key-assignment:Penalty-Feedback", + "menuType": 1, + "menuAttribution": "QINGANG_RELATED_PARTIES", + "sort": 5, + "showFlag": 2, + "children": [ + { + "extValues": { + + }, + "id": "2084205207803990017", + "menuName": "相关方端", + "menuUrl": "/keyProject/container/stakeholder/penaltyFeedback/list", + "parentId": "2084203639696330753", + "parentIds": null, + "menuPerms": "container:stakeholder:penaltyFeedback", + "menuType": 1, + "menuAttribution": "QINGANG_RELATED_PARTIES", + "sort": 1, + "showFlag": 2, + "children": null + } + ] + } + ] + }, + { + "extValues": { + }, "id": "2030925300149387300", "menuName": "首页扫码", @@ -812,7 +994,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 35, - "showFlag": 1, + "showFlag": 2, "children": null }, { @@ -828,7 +1010,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 36, - "showFlag": 1, + "showFlag": 2, "children": null }, { @@ -844,7 +1026,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 37, - "showFlag": 1, + "showFlag": 2, "children": null }, { @@ -860,7 +1042,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 38, - "showFlag": 1, + "showFlag": 2, "children": null } ] @@ -878,7 +1060,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 1, - "showFlag": 2, + "showFlag": 1, "children": [ { "extValues": { @@ -893,7 +1075,7 @@ "menuType": 2, "menuAttribution": "QINGANG_RELATED_PARTIES", "sort": 9, - "showFlag": 2, + "showFlag": 1, "children": null } ] diff --git a/lib/pages/home/doorAndCar/car/firstlevel_car_add_page.dart b/lib/pages/home/doorAndCar/car/firstlevel_car_add_page.dart index a57a14d..39ab81f 100644 --- a/lib/pages/home/doorAndCar/car/firstlevel_car_add_page.dart +++ b/lib/pages/home/doorAndCar/car/firstlevel_car_add_page.dart @@ -127,6 +127,16 @@ class _FirstlevelCarAddPageState extends State { }, ), const Divider(), + ItemListWidget.selectableLineTitleTextRightButton( + label: '访问口门名称:', + isEditable: true, + text: addData['gateLevelAuthAreaName'] ?? '请选择', + isRequired: true, + onTap: () { + _getVisitPortArea(); + }, + ), + const Divider(), // ItemListWidget.selectableLineTitleTextRightButton( // label: '选择范围:', // isEditable: true, diff --git a/lib/pages/home/doorAndCar/doorArea_type_page.dart b/lib/pages/home/doorAndCar/doorArea_type_page.dart index 3534d96..dcc4d55 100644 --- a/lib/pages/home/doorAndCar/doorArea_type_page.dart +++ b/lib/pages/home/doorAndCar/doorArea_type_page.dart @@ -1,50 +1,66 @@ import 'package:flutter/material.dart'; +import 'package:qhd_prevention/common/route_service.dart'; import 'package:qhd_prevention/customWidget/item_list_widget.dart'; import 'package:qhd_prevention/pages/home/doorAndCar/person/doorArea_person_record_page.dart'; - import 'package:qhd_prevention/pages/my_appbar.dart'; import 'package:qhd_prevention/tools/tools.dart'; class DoorareaTypePage extends StatefulWidget { const DoorareaTypePage(this.type, {super.key}); - final int type;//1 进港口门申请 2 进港口门申请记录 3 封闭区域口门申请 4 封闭区域口门申请记录 + final int type; //1 进港口门申请 2 进港口门申请记录 3 封闭区域口门申请 4 封闭区域口门申请记录 @override State createState() => _DoorareaTypePageState(); } class _DoorareaTypePageState extends State { - - String labelOne=''; - String labelTwo=''; + String labelOne = ''; + String labelTwo = ''; + String menuPamermsOne = ''; + String menuPamermsTwo = ''; @override void initState() { // TODO: implement initState super.initState(); - switch(widget.type){ + switch (widget.type) { case 1: - labelOne='人员申请'; - labelTwo='车辆申请'; + menuPamermsOne = + 'dashboard-Port-Gate-Entry-Application-Personnel-Application'; + menuPamermsTwo = + 'dashboard-Port-Gate-Entry-Application-Vehicle-Application'; + labelOne = '人员申请'; + labelTwo = '车辆申请'; break; case 2: - labelOne='人员申请记录'; - labelTwo='车辆申请记录'; + menuPamermsOne = + 'dashboard-Port-Gate-Entry-Record-Record-Personnel-Application-Record'; + menuPamermsTwo = + 'dashboard-Port-Gate-Entry-Record-Record-Vehicle-Application-Record'; + labelOne = '人员申请记录'; + labelTwo = '车辆申请记录'; break; case 3: - labelOne='人员申请'; - labelTwo='车辆申请'; + menuPamermsOne = + 'dashboard-Closed-Area-Gate-Application-Personnel-Application'; + menuPamermsTwo = + 'dashboard-Closed-Area-Gate-Application-Vehicle-Application'; + labelOne = '人员申请'; + labelTwo = '车辆申请'; break; case 4: - labelOne='人员申请记录'; - labelTwo='车辆申请记录'; + menuPamermsOne = + 'dashboard-Closed-Area-Gate-Record-Record-Personnel-Application-Record'; + menuPamermsTwo = + 'dashboard-Closed-Area-Gate-Record-Record-Vehicle-Application-Record'; + labelOne = '人员申请记录'; + labelTwo = '车辆申请记录'; break; } } - @override Widget build(BuildContext context) { return Scaffold( @@ -53,47 +69,47 @@ class _DoorareaTypePageState extends State { body: SafeArea( child: Column( children: [ - const SizedBox(height: 10), - ItemListWidget.selectableLineTitleTextRightButton( - label: labelOne, - isEditable: true, - isRequired: false, - onTap: () async { - if(widget.type==1){ - await pushPage(DoorareaPersonRecordPage(1), context); - }else if(widget.type==2){ - await pushPage(DoorareaPersonRecordPage(2), context); - }else if(widget.type==3){ - await pushPage(DoorareaPersonRecordPage(3), context); - }else if(widget.type==4){ - await pushPage(DoorareaPersonRecordPage(4), context); - } - - }, - text: ' ', - - ), - const Divider(), - ItemListWidget.selectableLineTitleTextRightButton( - label: labelTwo, - isEditable: true, - isRequired: false, - onTap: () async { - if(widget.type==1){ - await pushPage(DoorareaPersonRecordPage(5), context); - }else if(widget.type==2){ - await pushPage(DoorareaPersonRecordPage(6), context); - }else if(widget.type==3){ - await pushPage(DoorareaPersonRecordPage(7), context); - }else if(widget.type==4){ - await pushPage(DoorareaPersonRecordPage(8), context); - } - - }, - text: ' ', - - ), - const Divider(), + if (RouteService().hasPerm(menuPamermsOne)) ...[ + const SizedBox(height: 10), + ItemListWidget.selectableLineTitleTextRightButton( + label: labelOne, + isEditable: true, + isRequired: false, + onTap: () async { + if (widget.type == 1) { + await pushPage(DoorareaPersonRecordPage(1, menuPamermsOne), context); + } else if (widget.type == 2) { + await pushPage(DoorareaPersonRecordPage(2, menuPamermsOne), context); + } else if (widget.type == 3) { + await pushPage(DoorareaPersonRecordPage(3, menuPamermsOne), context); + } else if (widget.type == 4) { + await pushPage(DoorareaPersonRecordPage(4, menuPamermsOne), context); + } + }, + text: ' ', + ), + const Divider(), + ], + if (RouteService().hasPerm(menuPamermsTwo)) ...[ + ItemListWidget.selectableLineTitleTextRightButton( + label: labelTwo, + isEditable: true, + isRequired: false, + onTap: () async { + if (widget.type == 1) { + await pushPage(DoorareaPersonRecordPage(5, menuPamermsTwo), context); + } else if (widget.type == 2) { + await pushPage(DoorareaPersonRecordPage(6, menuPamermsTwo), context); + } else if (widget.type == 3) { + await pushPage(DoorareaPersonRecordPage(7, menuPamermsTwo), context); + } else if (widget.type == 4) { + await pushPage(DoorareaPersonRecordPage(8, menuPamermsTwo), context); + } + }, + text: ' ', + ), + const Divider(), + ], ], ), ), diff --git a/lib/pages/home/doorAndCar/doorCar_tab_page.dart b/lib/pages/home/doorAndCar/doorCar_tab_page.dart index f83c0bd..7ed9634 100644 --- a/lib/pages/home/doorAndCar/doorCar_tab_page.dart +++ b/lib/pages/home/doorAndCar/doorCar_tab_page.dart @@ -2,6 +2,7 @@ import 'dart:ffi'; import 'package:flutter/material.dart'; +import 'package:qhd_prevention/common/route_service.dart'; import 'package:qhd_prevention/pages/home/doorAndCar/doorArea_type_page.dart'; import 'package:qhd_prevention/pages/my_appbar.dart'; @@ -118,11 +119,15 @@ class _DoorcarTabPageState extends State { // 过滤掉没有可见 items 的分组 final visibleSections = defaultSections - .map((s) => AppSection( - title: s.title, - items: s.items.where((it) => it.visible).toList())) - .where((s) => s.items.isNotEmpty) - .toList(); + .map((s) { + final visibleItems = s.items.where((item) { + return item.visible && RouteService().hasPerm(item.menuPerms); + }).toList(); + return AppSection( + title: s.title, + items: visibleItems + ); + }).where((s) => s.items.isNotEmpty).toList(); return Scaffold( extendBodyBehindAppBar: true, diff --git a/lib/pages/home/doorAndCar/person/doorArea_person_record_page.dart b/lib/pages/home/doorAndCar/person/doorArea_person_record_page.dart index 083ba25..00a57e7 100644 --- a/lib/pages/home/doorAndCar/person/doorArea_person_record_page.dart +++ b/lib/pages/home/doorAndCar/person/doorArea_person_record_page.dart @@ -22,10 +22,11 @@ import 'package:qhd_prevention/customWidget/search_bar_widget.dart'; class DoorareaPersonRecordPage extends StatefulWidget { - const DoorareaPersonRecordPage(this.type, {Key? key}) : super(key: key); + const DoorareaPersonRecordPage(this.type,this.menuPerms, {Key? key}) : super(key: key); final int type;//1 进港口门申请(人) 2 进港口门申请记录(人) 3 封闭区域口门申请(人) 4 封闭区域口门申请记录(人) //5 进港口门申请(车) 6 进港口门申请记录(车) 7 封闭区域口门申请(车) 8 封闭区域口门申请记录(车) + final String menuPerms; @override _DoorareaPersonRecordPageState createState() => _DoorareaPersonRecordPageState(); @@ -60,7 +61,6 @@ class _DoorareaPersonRecordPageState extends State { @override void initState() { super.initState(); - final routeService = RouteService(); switch(widget.type){ case 1://1 进港口门申请(人) titleName='人员申请'; @@ -73,7 +73,6 @@ class _DoorareaPersonRecordPageState extends State { isAdd=true; xgfDataApplyListData['processOrRecord']=1; - xgfDataApplyListData['menuPath'] = '/primeport/container/stakeholder/firstLevelDoor/personnelApplication/list'; break; case 2:// 2 进港口门申请记录(人) titleName='人员审核记录'; @@ -81,7 +80,6 @@ class _DoorareaPersonRecordPageState extends State { isAdd=false; xgfDataApplyListData['processOrRecord']=2; - xgfDataApplyListData['menuPath'] = '/primeport/container/stakeholder/firstLevelDoor/personnelApplicationRecords/list'; break; case 3://3 封闭区域口门申请(人) titleName='人员申请'; @@ -90,7 +88,6 @@ class _DoorareaPersonRecordPageState extends State { xgfDataApplyListData['processOrRecord']=1; xgfDataApplyListData['personBelongType']=3; - xgfDataApplyListData['menuPath'] = '/primeport/container/stakeholder/enclosedArea/apply/personnel/list'; break; case 4://4 封闭区域口门申请记录(人) titleName='人员审核记录'; @@ -99,7 +96,6 @@ class _DoorareaPersonRecordPageState extends State { xgfDataApplyListData['processOrRecord']=2; xgfDataApplyListData['personBelongType']=3; - xgfDataApplyListData['menuPath'] = '/primeport/container/stakeholder/enclosedArea/apply/personnelRecords/list'; break; case 5: //5 进港口门申请(车) titleName='车辆申请'; @@ -108,7 +104,6 @@ class _DoorareaPersonRecordPageState extends State { xgfDataApplyListData['processOrRecord']=1; xgfDataApplyListData['vehicleBelongType']='5'; - xgfDataApplyListData['menuPath'] = '/primeport/container/stakeholder/firstLevelDoor/vehicleApplication/list'; break; case 6: // 6 进港口门申请记录(车) titleName='车辆审核记录'; @@ -117,7 +112,6 @@ class _DoorareaPersonRecordPageState extends State { xgfDataApplyListData['processOrRecord']=2; xgfDataApplyListData['vehicleBelongType']='5'; - xgfDataApplyListData['menuPath'] = '/primeport/container/stakeholder/firstLevelDoor/vehicleApplicationRecords/list'; break; case 7: // 7 封闭区域口门申请(车) titleName='车辆申请'; @@ -126,7 +120,6 @@ class _DoorareaPersonRecordPageState extends State { xgfDataApplyListData['processOrRecord']=1; xgfDataApplyListData['personBelongType']=3; - xgfDataApplyListData['menuPath'] = '/primeport/container/stakeholder/enclosedArea/apply/vehicle/list'; break; case 8: // 8 封闭区域口门申请记录(车) titleName='车辆审核记录'; @@ -135,10 +128,11 @@ class _DoorareaPersonRecordPageState extends State { xgfDataApplyListData['processOrRecord']=2; xgfDataApplyListData['personBelongType']=3; - xgfDataApplyListData['menuPath'] = '/primeport/container/stakeholder/enclosedArea/apply/vehicleRecords/list'; break; } + + _fetchData(); _scrollController.addListener(_onScroll); } @@ -163,7 +157,8 @@ class _DoorareaPersonRecordPageState extends State { Future _fetchData() async { - + final menuPath = await RouteService.getMenuPath('dashboard-Gate-Access-Control', widget.menuPerms); + xgfDataApplyListData['menuPath'] = menuPath; if (isLoading) return; setState(() => isLoading = true); diff --git a/lib/pages/home/doorAndCar/person_selection_page.dart b/lib/pages/home/doorAndCar/person_selection_page.dart index 53ba384..d9213f2 100644 --- a/lib/pages/home/doorAndCar/person_selection_page.dart +++ b/lib/pages/home/doorAndCar/person_selection_page.dart @@ -4,6 +4,7 @@ import 'package:qhd_prevention/customWidget/search_bar_widget.dart'; import 'package:qhd_prevention/customWidget/toast_util.dart'; import 'package:qhd_prevention/http/modules/doorAndCar_api.dart'; import 'package:qhd_prevention/pages/my_appbar.dart'; +import 'package:qhd_prevention/tools/tools.dart'; // 人员模型类 class Person { @@ -403,7 +404,7 @@ class _PersonSelectionPageState extends State { ), ), - + if (sortedGroupKeys.isNotEmpty) // 人员列表 Expanded( child: Row( @@ -457,6 +458,9 @@ class _PersonSelectionPageState extends State { ], ), ), + if (sortedGroupKeys.isEmpty) + NoDataWidget.show(text: '暂无可选人员') + ], ); },