From ada70a17130ce41325225ec99a8c0a0346600fc9 Mon Sep 17 00:00:00 2001 From: xufei <727302827@qq.com> Date: Thu, 25 Jun 2026 17:53:07 +0800 Subject: [PATCH] =?UTF-8?q?2026.6.25=20=E5=8F=A3=E9=97=A8=E9=97=A8?= =?UTF-8?q?=E7=A6=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/customWidget/department_picker_enterprise.dart | 10 ++++++++++ .../doorAndCar/car/firstlevel_car_add_page.dart | 4 ++-- .../doorAndCar/car/onlyLook_car_application.dart | 2 +- .../person/doorArea_person_record_page.dart | 6 +++--- .../person/onlyLook_doorarea_person.dart | 14 ++++++++++---- 5 files changed, 26 insertions(+), 10 deletions(-) diff --git a/lib/customWidget/department_picker_enterprise.dart b/lib/customWidget/department_picker_enterprise.dart index 64ef987..10b9b61 100644 --- a/lib/customWidget/department_picker_enterprise.dart +++ b/lib/customWidget/department_picker_enterprise.dart @@ -109,8 +109,18 @@ class _DepartmentPickerEnterpriseState extends State final result = await DoorAndCarApi.getJurisdictionalAuthorityListTree(widget.jurisdictionalAuthorityId); raw = result['data']; + // 根据 jurisdictionalCorpId 去重 + List uniqueData = raw.fold([], (List acc, item) { + String corpId = item['jurisdictionalCorpId']?.toString() ?? ''; + bool exists = acc.any((element) => element['jurisdictionalCorpId']?.toString() == corpId); + if (!exists && corpId.isNotEmpty) { + acc.add(item); + } + return acc; + }); setState(() { + raw =uniqueData; original = raw.map((e) => CategoryEnterpriseType.fromJson(e as Map)).toList(); filtered = original; loading = false; 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 93fa578..a57a14d 100644 --- a/lib/pages/home/doorAndCar/car/firstlevel_car_add_page.dart +++ b/lib/pages/home/doorAndCar/car/firstlevel_car_add_page.dart @@ -772,8 +772,8 @@ class _FirstlevelCarAddPageState extends State { return; } - addData['drivingUserId']=_personList[0].userPhone; - addData['drivingUserName']=_personList[0].userCard; + addData['drivingUserId']=_personList[0].employeePersonUserId; + addData['drivingUserName']=_personList[0].employeePersonUserName; addData['lsUserPhone']=_personList[0].userPhone; addData['lsUserIdcard']=_personList[0].userCard; diff --git a/lib/pages/home/doorAndCar/car/onlyLook_car_application.dart b/lib/pages/home/doorAndCar/car/onlyLook_car_application.dart index fd62bfd..ae67e4b 100644 --- a/lib/pages/home/doorAndCar/car/onlyLook_car_application.dart +++ b/lib/pages/home/doorAndCar/car/onlyLook_car_application.dart @@ -197,7 +197,7 @@ class _OnlylookCarApplicationState extends State { label: '驾驶人姓名:', isEditable: false, horizontalnum: 0, - text: info['employeeVehicleUserName'] ?? '', + text: info['drivingUserName'] ?? '', onTap: () {}, ), const Divider(), 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 523e153..a2b319a 100644 --- a/lib/pages/home/doorAndCar/person/doorArea_person_record_page.dart +++ b/lib/pages/home/doorAndCar/person/doorArea_person_record_page.dart @@ -400,7 +400,7 @@ class _DoorareaPersonRecordPageState extends State { Expanded( child: SearchBarWidget( showResetButton: true, - hintText: '请输入关键字', + hintText: '请输入项目名称', resetButtonText: '重置', onReset: () { FocusScope.of(context).unfocus(); @@ -453,7 +453,7 @@ class _DoorareaPersonRecordPageState extends State { // int type = item['auditFlag']??""; int type =0; - if(widget.type==1||widget.type==2||widget.type==3||widget.type==4){ + if(widget.type==1||widget.type==2||widget.type==3||widget.type==4||widget.type==7){ type = int.tryParse(item['auditFlag']?.toString() ?? '') ?? 0; }else{ type = int.tryParse(item['auditStatus']?.toString() ?? '') ?? 0; @@ -467,7 +467,7 @@ class _DoorareaPersonRecordPageState extends State { } else if (4 == type) { return "无需审批(长期人员)"; } else { - return "无需审批"; + return ""; } } diff --git a/lib/pages/home/doorAndCar/person/onlyLook_doorarea_person.dart b/lib/pages/home/doorAndCar/person/onlyLook_doorarea_person.dart index c772c3d..4bcb1e0 100644 --- a/lib/pages/home/doorAndCar/person/onlyLook_doorarea_person.dart +++ b/lib/pages/home/doorAndCar/person/onlyLook_doorarea_person.dart @@ -261,7 +261,7 @@ class _OnlylookDoorareaPersonState extends State { } - Widget _buildPersonCard(Map person) { + Widget _buildPersonCard(Map person) { return Card( margin: EdgeInsets.only(bottom: 12), color: Colors.white, @@ -279,7 +279,7 @@ class _OnlylookDoorareaPersonState extends State { children: [ Expanded( child: Text( - '姓名: ${person['employeePersonUserName']}', + '姓名: ${person['employeePersonUserName']??''}', style: TextStyle( fontSize: 14, color: Colors.grey[700], @@ -290,7 +290,7 @@ class _OnlylookDoorareaPersonState extends State { SizedBox(width: 24), Expanded( child: Text( - '部门: ${person['personDepartmentName']}', + '部门: ${person['personCorpName']??''}', style: TextStyle( fontSize: 14, color: Colors.grey[700], @@ -362,7 +362,13 @@ class _OnlylookDoorareaPersonState extends State { setState(() async { applicationInfo=result['data']; - personnelList=applicationInfo['personApplyList']??[]; + // personnelList=applicationInfo['personApplyList']??[]; + dynamic entourageData = jsonDecode(applicationInfo['entourage'] ?? '[]'); + if (entourageData is List) { + personnelList = entourageData.cast>(); + } else { + personnelList = []; + } final imageResults = await Future.wait([ FileApi.getImagePath(applicationInfo['informSignId'], UploadFileType.enclosedAreaPersonnelApplicantSignature),