From 3a9b55268168d2d3076a6a71eb740a344f276238 Mon Sep 17 00:00:00 2001 From: zhuyu <990951175@qq.com> Date: Tue, 14 Apr 2026 14:40:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=89=8D=E7=AB=AF=E6=8C=87?= =?UTF-8?q?=E5=90=91SAE=E7=9A=84=E5=BE=8C=E7=AB=AF=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.env.production | 7 +++++++ frontend/src/pages/manager/PerformanceReview.tsx | 4 ++-- frontend/src/pages/manager/SubordinateList.tsx | 12 ++++++------ 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 frontend/.env.production diff --git a/frontend/.env.production b/frontend/.env.production new file mode 100644 index 0000000..9cca039 --- /dev/null +++ b/frontend/.env.production @@ -0,0 +1,7 @@ +# 前端生产环境配置 +# 构建时使用的环境变量 + +# API 基础 URL - 使用阿里云NLB负载均衡器 +VITE_API_BASE_URL=http://nlb-y7wvnvbyb726t5m4bz.cn-hongkong.nlb.aliyuncsslbintl.com:3001 + +# 其他环境变量可根据需要添加 \ No newline at end of file diff --git a/frontend/src/pages/manager/PerformanceReview.tsx b/frontend/src/pages/manager/PerformanceReview.tsx index ea85cdf..5474be7 100644 --- a/frontend/src/pages/manager/PerformanceReview.tsx +++ b/frontend/src/pages/manager/PerformanceReview.tsx @@ -24,7 +24,7 @@ import { ArrowLeftOutlined, } from '@ant-design/icons'; import { useParams, useNavigate } from 'react-router-dom'; -import { PerformanceRecord } from '../../api/performance'; +import { PerformanceRecord, PerformanceItemDetail } from '../../api/performance'; import http from '../../api/http'; import { useIsMobile } from '../../hooks/useBreakpoint'; import dayjs from 'dayjs'; @@ -85,7 +85,7 @@ const PerformanceReview: React.FC = () => { // Initialize form with existing manager scores if available const itemScores: Record = {}; - data.performanceItems?.forEach((item) => { + data.performanceItems?.forEach((item: PerformanceItemDetail) => { itemScores[item.itemName] = { managerScore: item.managerScore ?? item.aiScore ?? item.selfScore ?? 0, scoreExplanation: item.managerExplanation ?? '', diff --git a/frontend/src/pages/manager/SubordinateList.tsx b/frontend/src/pages/manager/SubordinateList.tsx index d5d4693..c558955 100644 --- a/frontend/src/pages/manager/SubordinateList.tsx +++ b/frontend/src/pages/manager/SubordinateList.tsx @@ -42,12 +42,12 @@ interface SubordinateRecord extends PerformanceRecord { userPosition?: string; } -interface PageResult { - list: T[]; - total: number; - page: number; - pageSize: number; -} +// interface PageResult { +// list: T[]; +// total: number; +// page: number; +// pageSize: number; +// } const SubordinateList: React.FC = () => { const navigate = useNavigate();