From d108d2c693ba2805df725ac67e772b2efc91c0bc Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 5 Feb 2026 23:32:55 -0800 Subject: [PATCH] =?UTF-8?q?fix(admin-web):=20=E5=90=88=E5=90=8C=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=9C=81=E4=BB=BD=E7=AD=9B=E9=80=89=E5=8F=AA=E4=BD=BF?= =?UTF-8?q?=E7=94=A86=E4=BD=8D=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PROVINCE_CODE_NAMES 同时包含2位和6位省份代码,但数据库存储的是6位代码。 筛选下拉菜单只使用6位代码,避免查询不到数据。 Co-Authored-By: Claude Opus 4.5 --- .../admin-web/src/app/(dashboard)/contracts/page.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/admin-web/src/app/(dashboard)/contracts/page.tsx b/frontend/admin-web/src/app/(dashboard)/contracts/page.tsx index d3096f78..3ee42a9d 100644 --- a/frontend/admin-web/src/app/(dashboard)/contracts/page.tsx +++ b/frontend/admin-web/src/app/(dashboard)/contracts/page.tsx @@ -38,11 +38,13 @@ const getStatusStyleClass = (status: string): string => { } }; -// 省份列表(用于筛选) -const PROVINCE_OPTIONS = Object.entries(PROVINCE_CODE_NAMES).map(([code, name]) => ({ - value: code, - label: name, -})); +// 省份列表(用于筛选)- 只使用 6 位代码(数据库中存的是 6 位) +const PROVINCE_OPTIONS = Object.entries(PROVINCE_CODE_NAMES) + .filter(([code]) => code.length === 6) + .map(([code, name]) => ({ + value: code, + label: name, + })); /** * 合同管理页面