Skip to content

Commit 1383849

Browse files
committed
fix: 修复新建面试时的备注无效
1 parent f1c2099 commit 1383849

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/api/interview.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ import { Dayjs } from 'dayjs';
44
import { StepType } from '../console/result/ResultOverview';
55
import { pkgPost } from './core';
66

7-
export function addInterview(formId: number, depart: number, step: StepType, capacity: number, location: string, startAt: Dayjs, endAt: Dayjs) {
7+
export function addInterview(
8+
formId: number,
9+
depart: number,
10+
step: StepType,
11+
capacity: number,
12+
location: string,
13+
startAt: Dayjs,
14+
endAt: Dayjs,
15+
comment?: string
16+
) {
817
return pkgPost('/interview/add', {
918
formId,
1019
depart,
@@ -13,6 +22,7 @@ export function addInterview(formId: number, depart: number, step: StepType, cap
1322
location,
1423
startAt,
1524
endAt,
25+
comment,
1626
});
1727
}
1828

src/console/interview/InterviewManage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,10 @@ export default function InterviewManage() {
156156
message.error('地点不能超过50字');
157157
return false;
158158
}
159+
let comment = commentRef.value.trim() || undefined; //如果为空则传undefined
159160
const startAt = startTime;
160161
const endAt = startTime.add(num(durationRef.value, 0), 'minute');
161-
const { code } = await addInterview(formId, ivDepart, step, capacity, location, startAt, endAt);
162+
const { code } = await addInterview(formId, ivDepart, step, capacity, location, startAt, endAt, comment);
162163
if (!code) message.success('新建面试成功');
163164
reload();
164165
},

0 commit comments

Comments
 (0)