eli-video-interview 1.2.42-alpha.8 → 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/AiHeaderTitle/index.js +2 -10
- package/esm/components/AiHeaderTitleV2/index.d.ts +4 -0
- package/esm/components/AiHeaderTitleV2/index.js +39 -0
- package/esm/components/AiHeaderTitleV2/interface.d.ts +4 -0
- package/esm/components/AiHeaderTitleV2/interface.js +1 -0
- package/esm/components/Charts/ReportPie.js +13 -3
- package/esm/components/Charts/const.js +3 -3
- package/esm/components/ScoreBigBall/index.js +1 -1
- package/esm/constants/ai-question.d.ts +1 -1
- package/esm/constants/ai-question.js +3 -3
- package/esm/enum/ai-question.d.ts +11 -1
- package/esm/enum/ai-question.js +10 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/index.js +11 -46
- package/esm/modules/ai-ability/components/AddAbility/index.js +2 -20
- package/esm/modules/ai-ability/components/UpdateAbility/index.js +6 -37
- package/esm/modules/ai-ability-select/Root.js +4 -2
- package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +2 -2
- package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +2 -1
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +2 -2
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +4 -4
- package/esm/modules/ai-ability-select/components/AiAbilityList/index.js +14 -2
- package/esm/modules/ai-ability-select/interface.d.ts +1 -0
- package/esm/modules/ai-question/Root.js +1 -1
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +13 -4
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +39 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +41 -2
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +42 -42
- package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +1 -0
- package/esm/modules/ai-question/components/BaseAccordion/index.js +4 -4
- package/esm/modules/ai-question/components/BaseAccordion/interface.d.ts +3 -0
- package/esm/modules/ai-question/components/BootVideo/index.js +12 -5
- package/esm/modules/ai-question/components/QuestionImport/index.js +2 -2
- package/esm/modules/ai-question/components/QuestionModel/Item.js +3 -3
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +6 -2
- package/esm/modules/ai-question/components/QuestionTemplate/index.js +1 -1
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +4 -3
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +13 -3
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +2 -2
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +4 -4
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +2 -0
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +3 -2
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +3 -0
- package/esm/modules/ai-report/Root.js +6 -3
- package/esm/modules/ai-report/components/VideoQuestion/Video.d.ts +27 -0
- package/esm/modules/ai-report/components/VideoQuestion/Video.js +208 -0
- package/esm/modules/ai-report/interface.d.ts +2 -0
- package/esm/modules/ai-report/useAiReport.d.ts +2 -0
- package/esm/modules/ai-report/useAiReport.js +3 -1
- package/esm/modules/ai-report-v2/Root.d.ts +2 -2
- package/esm/modules/ai-report-v2/Root.js +18 -11
- package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.d.ts +2 -4
- package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +33 -19
- package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.d.ts +13 -0
- package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.js +90 -25
- package/esm/modules/ai-report-v2/components/AIEvaluate/index.d.ts +2 -2
- package/esm/modules/ai-report-v2/components/AIEvaluate/index.js +11 -7
- package/esm/modules/ai-report-v2/components/Candidate/Interface.d.ts +3 -0
- package/esm/modules/ai-report-v2/components/Candidate/Podium.js +2 -2
- package/esm/modules/ai-report-v2/components/Form/Form.js +34 -13
- package/esm/modules/ai-report-v2/components/Form/Nps.d.ts +1 -1
- package/esm/modules/ai-report-v2/components/Form/Nps.js +2 -0
- package/esm/modules/ai-report-v2/components/NotFinish/index.js +13 -5
- package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.d.ts +4 -2
- package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +28 -10
- package/esm/modules/ai-report-v2/components/Suggestion/index.js +1 -1
- package/esm/modules/ai-report-v2/components/VideoQuestion/Evaluate.d.ts +11 -0
- package/esm/modules/ai-report-v2/components/VideoQuestion/Evaluate.js +79 -0
- package/esm/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +50 -25
- package/esm/modules/ai-report-v2/components/VideoQuestion/Workplaces.d.ts +9 -5
- package/esm/modules/ai-report-v2/components/VideoQuestion/Workplaces.js +71 -6
- package/esm/modules/ai-report-v2/components/VideoQuestion/index.d.ts +6 -3
- package/esm/modules/ai-report-v2/components/VideoQuestion/index.js +6 -4
- package/esm/modules/ai-report-v2/components/VideoQuestion/interface.d.ts +1 -0
- package/esm/modules/ai-report-v2/components/VideoQuestion/styled.js +2 -2
- package/esm/modules/ai-report-v2/components/WorkPlaces/index.js +1 -1
- package/esm/modules/ai-report-v2/components/styled.d.ts +4 -1
- package/esm/modules/ai-report-v2/components/styled.js +14 -3
- package/esm/modules/ai-report-v2/interface.d.ts +4 -1
- package/esm/modules/ai-report-v2/useAiReport.d.ts +4 -0
- package/esm/modules/ai-report-v2/useAiReport.js +3 -1
- package/esm/modules/ai-report-v2/useAiReportVersion.d.ts +5 -0
- package/esm/modules/ai-report-v2/useAiReportVersion.js +37 -0
- package/esm/services/ai-report.d.ts +10 -0
- package/esm/services/ai-report.js +2 -0
- package/esm/store/ai-question/ai-analysis-store.d.ts +3 -1
- package/esm/store/ai-question/ai-analysis-store.js +26 -1
- package/esm/store/ai-report/global-store.d.ts +3 -0
- package/lib/components/AiHeaderTitle/index.js +1 -9
- package/lib/components/AiHeaderTitleV2/index.d.ts +4 -0
- package/lib/components/AiHeaderTitleV2/index.js +41 -0
- package/lib/components/AiHeaderTitleV2/interface.d.ts +4 -0
- package/lib/components/AiHeaderTitleV2/interface.js +2 -0
- package/lib/components/Charts/ReportPie.js +13 -3
- package/lib/components/Charts/const.js +3 -3
- package/lib/components/ScoreBigBall/index.js +1 -1
- package/lib/constants/ai-question.d.ts +1 -1
- package/lib/constants/ai-question.js +3 -3
- package/lib/enum/ai-question.d.ts +11 -1
- package/lib/enum/ai-question.js +10 -0
- package/lib/modules/ai-ability/components/AbilityFormItem/index.js +13 -45
- package/lib/modules/ai-ability/components/AddAbility/index.js +2 -20
- package/lib/modules/ai-ability/components/UpdateAbility/index.js +6 -37
- package/lib/modules/ai-ability-select/Root.js +4 -2
- package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +2 -2
- package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +2 -1
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +2 -2
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +4 -4
- package/lib/modules/ai-ability-select/components/AiAbilityList/index.js +14 -2
- package/lib/modules/ai-ability-select/interface.d.ts +1 -0
- package/lib/modules/ai-question/Root.js +1 -1
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +12 -3
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +39 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +42 -3
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +39 -39
- package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +1 -0
- package/lib/modules/ai-question/components/BaseAccordion/index.js +4 -4
- package/lib/modules/ai-question/components/BaseAccordion/interface.d.ts +3 -0
- package/lib/modules/ai-question/components/BootVideo/index.js +12 -5
- package/lib/modules/ai-question/components/QuestionImport/index.js +2 -2
- package/lib/modules/ai-question/components/QuestionModel/Item.js +3 -3
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +5 -1
- package/lib/modules/ai-question/components/QuestionTemplate/index.js +1 -1
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +4 -3
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +12 -2
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +2 -2
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +4 -4
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +2 -0
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +3 -2
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +3 -0
- package/lib/modules/ai-report/Root.js +6 -3
- package/lib/modules/ai-report/components/VideoQuestion/Video.d.ts +27 -0
- package/lib/modules/ai-report/components/VideoQuestion/Video.js +213 -0
- package/lib/modules/ai-report/interface.d.ts +2 -0
- package/lib/modules/ai-report/useAiReport.d.ts +2 -0
- package/lib/modules/ai-report/useAiReport.js +6 -1
- package/lib/modules/ai-report-v2/Root.d.ts +2 -2
- package/lib/modules/ai-report-v2/Root.js +16 -9
- package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.d.ts +2 -4
- package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +30 -16
- package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.d.ts +13 -0
- package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.js +92 -24
- package/lib/modules/ai-report-v2/components/AIEvaluate/index.d.ts +2 -2
- package/lib/modules/ai-report-v2/components/AIEvaluate/index.js +11 -7
- package/lib/modules/ai-report-v2/components/Candidate/Interface.d.ts +3 -0
- package/lib/modules/ai-report-v2/components/Candidate/Podium.js +1 -1
- package/lib/modules/ai-report-v2/components/Form/Form.js +34 -13
- package/lib/modules/ai-report-v2/components/Form/Nps.d.ts +1 -1
- package/lib/modules/ai-report-v2/components/Form/Nps.js +2 -0
- package/lib/modules/ai-report-v2/components/NotFinish/index.js +12 -4
- package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.d.ts +4 -2
- package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +27 -9
- package/lib/modules/ai-report-v2/components/Suggestion/index.js +2 -2
- package/lib/modules/ai-report-v2/components/VideoQuestion/Evaluate.d.ts +11 -0
- package/lib/modules/ai-report-v2/components/VideoQuestion/Evaluate.js +81 -0
- package/lib/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +47 -22
- package/lib/modules/ai-report-v2/components/VideoQuestion/Workplaces.d.ts +9 -5
- package/lib/modules/ai-report-v2/components/VideoQuestion/Workplaces.js +69 -4
- package/lib/modules/ai-report-v2/components/VideoQuestion/index.d.ts +6 -3
- package/lib/modules/ai-report-v2/components/VideoQuestion/index.js +6 -4
- package/lib/modules/ai-report-v2/components/VideoQuestion/interface.d.ts +1 -0
- package/lib/modules/ai-report-v2/components/VideoQuestion/styled.js +2 -2
- package/lib/modules/ai-report-v2/components/WorkPlaces/index.js +2 -2
- package/lib/modules/ai-report-v2/components/styled.d.ts +4 -1
- package/lib/modules/ai-report-v2/components/styled.js +18 -4
- package/lib/modules/ai-report-v2/interface.d.ts +4 -1
- package/lib/modules/ai-report-v2/useAiReport.d.ts +4 -0
- package/lib/modules/ai-report-v2/useAiReport.js +6 -1
- package/lib/modules/ai-report-v2/useAiReportVersion.d.ts +5 -0
- package/lib/modules/ai-report-v2/useAiReportVersion.js +41 -0
- package/lib/services/ai-report.d.ts +10 -0
- package/lib/services/ai-report.js +5 -1
- package/lib/store/ai-question/ai-analysis-store.d.ts +3 -1
- package/lib/store/ai-question/ai-analysis-store.js +26 -1
- package/lib/store/ai-report/global-store.d.ts +3 -0
- package/package.json +4 -2
|
@@ -133,7 +133,9 @@ var QuestionUpdate = function () {
|
|
|
133
133
|
// 职场能力中不参与AI分析的提交时,过滤掉
|
|
134
134
|
var newAiAbilities = aiAbilities
|
|
135
135
|
.map(function (i) {
|
|
136
|
+
var _a;
|
|
136
137
|
i.isNotCompute = true;
|
|
138
|
+
i.child = (_a = i.child) === null || _a === void 0 ? void 0 : _a.map(function (v) { return (__assign(__assign({}, v), { weight: Number(v.weight) || 0 })); });
|
|
137
139
|
if (i.type === 6) {
|
|
138
140
|
var extra_1 = {};
|
|
139
141
|
var extraJson = JSON.parse(i.extra);
|
|
@@ -266,7 +268,6 @@ var QuestionUpdate = function () {
|
|
|
266
268
|
else {
|
|
267
269
|
curAiAbilities.unshift(CurWorkPlaceAiAbility);
|
|
268
270
|
}
|
|
269
|
-
console.log('curAiAbilities', curAiAbilities, inInit);
|
|
270
271
|
updateAiAbilities(curAiAbilities, inInit);
|
|
271
272
|
}, [questionCollectionList, aiAbilities, updateAiAbilities]);
|
|
272
273
|
var handleCategoryChange = useCallback(function (value) {
|
|
@@ -286,7 +287,7 @@ var QuestionUpdate = function () {
|
|
|
286
287
|
[aiAbilities, handleWorkplaceData]);
|
|
287
288
|
useEffect(function () {
|
|
288
289
|
if (open) {
|
|
289
|
-
updateState({ language: item.language, aiSwitch: item.aiSwitch });
|
|
290
|
+
updateState({ language: item.language, aiSwitch: item.aiSwitch, voiceLanguage: item === null || item === void 0 ? void 0 : item.voiceLanguage });
|
|
290
291
|
updateAiAbilities(item.aiAbilities, true);
|
|
291
292
|
}
|
|
292
293
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -37,10 +37,13 @@ export interface QuestionParams {
|
|
|
37
37
|
aiType: number;
|
|
38
38
|
weight: number | string;
|
|
39
39
|
language?: number;
|
|
40
|
+
voiceLanguage?: number;
|
|
40
41
|
aiShowType: number;
|
|
41
42
|
videoBroadcast: VideoBroadcastParams;
|
|
42
43
|
answerStatus: number;
|
|
43
44
|
aiAbilities: BaseAiAbilityParams[];
|
|
45
|
+
selfIntroOpt: number;
|
|
46
|
+
isCustomQa: boolean;
|
|
44
47
|
}
|
|
45
48
|
export interface SubmitModelParams {
|
|
46
49
|
name: string;
|
|
@@ -25,7 +25,7 @@ import { Box, Button, confirm, Message, Paper, Typography } from 'fbm-ui';
|
|
|
25
25
|
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
26
26
|
var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER, FAILED = INTERVIEW_STATUS.FAILED, IN_CALCULATION = INTERVIEW_STATUS.IN_CALCULATION;
|
|
27
27
|
var AiReportRoot = forwardRef(function (props, ref) {
|
|
28
|
-
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
|
|
28
|
+
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, reloadReportVersion = props.reloadReportVersion;
|
|
29
29
|
var firstLoad = useRef(true);
|
|
30
30
|
var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
31
31
|
var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d, _e = _b.model, model = _e === void 0 ? 'standard' : _e, _f = _b.hasProVersion, hasProVersion = _f === void 0 ? false : _f, _g = _b.isSimulated, isSimulated = _g === void 0 ? false : _g;
|
|
@@ -50,8 +50,11 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
50
50
|
}), data = _h.data, loading = _h.loading, postAiInterviewResult = _h.run;
|
|
51
51
|
var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
|
|
52
52
|
var handleRefreshSuccess = useCallback(function () {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
reloadReportVersion === null || reloadReportVersion === void 0 ? void 0 : reloadReportVersion();
|
|
54
|
+
if (!reloadReportVersion) {
|
|
55
|
+
postAiInterviewResult();
|
|
56
|
+
}
|
|
57
|
+
}, [postAiInterviewResult, reloadReportVersion]);
|
|
55
58
|
var handleSwitchReportModel = useCallback(function () {
|
|
56
59
|
var SwithAction = function () {
|
|
57
60
|
SwitchReportModel({
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface VideoProps {
|
|
3
|
+
/** 视频源URL */
|
|
4
|
+
src: string;
|
|
5
|
+
/** 封面图片URL */
|
|
6
|
+
poster?: string;
|
|
7
|
+
/** 视频宽度 */
|
|
8
|
+
width?: number | string;
|
|
9
|
+
/** 视频高度 */
|
|
10
|
+
height?: number | string;
|
|
11
|
+
/** 是否自动播放 */
|
|
12
|
+
autoPlay?: boolean;
|
|
13
|
+
/** 是否静音 */
|
|
14
|
+
muted?: boolean;
|
|
15
|
+
/** 是否循环播放 */
|
|
16
|
+
loop?: boolean;
|
|
17
|
+
/** 容器点击回调 */
|
|
18
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
19
|
+
/** 播放开始回调 */
|
|
20
|
+
onPlay?: (event: React.SyntheticEvent<HTMLVideoElement>) => void;
|
|
21
|
+
/** 暂停回调 */
|
|
22
|
+
onPause?: (event: React.SyntheticEvent<HTMLVideoElement>) => void;
|
|
23
|
+
/** 播放结束回调 */
|
|
24
|
+
onEnded?: (event: React.SyntheticEvent<HTMLVideoElement>) => void;
|
|
25
|
+
}
|
|
26
|
+
declare const Video: FC<VideoProps>;
|
|
27
|
+
export default Video;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
49
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
50
|
+
if (!m) return o;
|
|
51
|
+
var i = m.call(o), r, ar = [], e;
|
|
52
|
+
try {
|
|
53
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
54
|
+
}
|
|
55
|
+
catch (error) { e = { error: error }; }
|
|
56
|
+
finally {
|
|
57
|
+
try {
|
|
58
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
59
|
+
}
|
|
60
|
+
finally { if (e) throw e.error; }
|
|
61
|
+
}
|
|
62
|
+
return ar;
|
|
63
|
+
};
|
|
64
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
65
|
+
import PauseIcon from '@mui/icons-material/Pause';
|
|
66
|
+
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
|
|
67
|
+
import { Box, IconButton } from 'fbm-ui';
|
|
68
|
+
import { styled } from 'fbm-ui';
|
|
69
|
+
import { useCallback, useRef, useState } from 'react';
|
|
70
|
+
var VideoContainer = styled(Box)(function (_a) {
|
|
71
|
+
var theme = _a.theme;
|
|
72
|
+
return ({
|
|
73
|
+
position: 'relative',
|
|
74
|
+
display: 'inline-block',
|
|
75
|
+
backgroundColor: '#000',
|
|
76
|
+
borderRadius: theme.spacing(1),
|
|
77
|
+
overflow: 'hidden',
|
|
78
|
+
cursor: 'pointer',
|
|
79
|
+
'&:hover .play-button': {
|
|
80
|
+
opacity: '0.9 !important',
|
|
81
|
+
transform: 'translate(-50%, -50%) scale(1.1)',
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
var StyledVideo = styled('video')({
|
|
86
|
+
width: '100%',
|
|
87
|
+
height: '100%',
|
|
88
|
+
display: 'block',
|
|
89
|
+
});
|
|
90
|
+
var PlayButton = styled(IconButton)(function (_a) {
|
|
91
|
+
var theme = _a.theme;
|
|
92
|
+
return ({
|
|
93
|
+
position: 'absolute',
|
|
94
|
+
top: '50%',
|
|
95
|
+
left: '50%',
|
|
96
|
+
transform: 'translate(-50%, -50%)',
|
|
97
|
+
backgroundColor: 'rgba(0, 0, 0, 0.7)',
|
|
98
|
+
color: '#fff',
|
|
99
|
+
width: 48,
|
|
100
|
+
height: 48,
|
|
101
|
+
transition: 'all 0.3s ease',
|
|
102
|
+
zIndex: 2,
|
|
103
|
+
'&:hover': {
|
|
104
|
+
backgroundColor: 'rgba(0, 0, 0, 0.8)',
|
|
105
|
+
},
|
|
106
|
+
'& .MuiSvgIcon-root': {
|
|
107
|
+
fontSize: 32,
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
var PosterImage = styled('img')({
|
|
112
|
+
position: 'absolute',
|
|
113
|
+
top: 0,
|
|
114
|
+
left: 0,
|
|
115
|
+
width: '100%',
|
|
116
|
+
height: '100%',
|
|
117
|
+
objectFit: 'cover',
|
|
118
|
+
zIndex: 1,
|
|
119
|
+
});
|
|
120
|
+
var Video = function (_a) {
|
|
121
|
+
var src = _a.src, poster = _a.poster, _b = _a.width, width = _b === void 0 ? '100%' : _b, _c = _a.height, height = _c === void 0 ? 240 : _c, _d = _a.autoPlay, autoPlay = _d === void 0 ? true : _d, _e = _a.muted, muted = _e === void 0 ? false : _e, _f = _a.loop, loop = _f === void 0 ? false : _f, onClick = _a.onClick, onPlay = _a.onPlay, onPause = _a.onPause, onEnded = _a.onEnded;
|
|
122
|
+
var videoRef = useRef(null);
|
|
123
|
+
var _g = __read(useState(false), 2), isPlaying = _g[0], setIsPlaying = _g[1];
|
|
124
|
+
var _h = __read(useState(true), 2), showPoster = _h[0], setShowPoster = _h[1];
|
|
125
|
+
var _j = __read(useState(false), 2), isLoading = _j[0], setIsLoading = _j[1];
|
|
126
|
+
var _k = __read(useState(false), 2), videoLoaded = _k[0], setVideoLoaded = _k[1]; // 控制视频是否已加载
|
|
127
|
+
var handlePlayClick = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
128
|
+
var error_1;
|
|
129
|
+
return __generator(this, function (_a) {
|
|
130
|
+
switch (_a.label) {
|
|
131
|
+
case 0:
|
|
132
|
+
setVideoLoaded(true); // 视频开始加载时设置为已加载
|
|
133
|
+
if (!videoRef.current)
|
|
134
|
+
return [2 /*return*/];
|
|
135
|
+
_a.label = 1;
|
|
136
|
+
case 1:
|
|
137
|
+
_a.trys.push([1, 5, , 6]);
|
|
138
|
+
if (!isPlaying) return [3 /*break*/, 2];
|
|
139
|
+
videoRef.current.pause();
|
|
140
|
+
return [3 /*break*/, 4];
|
|
141
|
+
case 2:
|
|
142
|
+
setIsLoading(true);
|
|
143
|
+
return [4 /*yield*/, videoRef.current.play()];
|
|
144
|
+
case 3:
|
|
145
|
+
_a.sent();
|
|
146
|
+
setShowPoster(false);
|
|
147
|
+
_a.label = 4;
|
|
148
|
+
case 4: return [3 /*break*/, 6];
|
|
149
|
+
case 5:
|
|
150
|
+
error_1 = _a.sent();
|
|
151
|
+
console.error('视频播放失败:', error_1);
|
|
152
|
+
setIsLoading(false);
|
|
153
|
+
return [3 /*break*/, 6];
|
|
154
|
+
case 6: return [2 /*return*/];
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}); }, [isPlaying]);
|
|
158
|
+
var handlePlay = useCallback(function (event) {
|
|
159
|
+
setIsPlaying(true);
|
|
160
|
+
setIsLoading(false);
|
|
161
|
+
setShowPoster(false);
|
|
162
|
+
onPlay === null || onPlay === void 0 ? void 0 : onPlay(event);
|
|
163
|
+
}, [onPlay]);
|
|
164
|
+
var handlePause = useCallback(function (event) {
|
|
165
|
+
setIsPlaying(false);
|
|
166
|
+
onPause === null || onPause === void 0 ? void 0 : onPause(event);
|
|
167
|
+
}, [onPause]);
|
|
168
|
+
var handleEnded = useCallback(function (event) {
|
|
169
|
+
setIsPlaying(false);
|
|
170
|
+
setShowPoster(true);
|
|
171
|
+
onEnded === null || onEnded === void 0 ? void 0 : onEnded(event);
|
|
172
|
+
}, [onEnded]);
|
|
173
|
+
var handleContainerClick = useCallback(function (e) {
|
|
174
|
+
// 避免点击播放按钮时触发容器点击事件
|
|
175
|
+
if (e.target.closest('.play-button')) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
e.stopPropagation();
|
|
179
|
+
// 如果传入了外部onClick回调,优先执行
|
|
180
|
+
if (onClick) {
|
|
181
|
+
onClick(e);
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
// 默认行为:切换播放/暂停状态
|
|
185
|
+
handlePlayClick();
|
|
186
|
+
}, [onClick, handlePlayClick]);
|
|
187
|
+
return (_jsxs(VideoContainer, __assign({ sx: { width: width, height: height }, onClick: handleContainerClick }, { children: [videoLoaded && (_jsx(StyledVideo, { ref: videoRef, src: src, poster: poster, autoPlay: autoPlay, muted: muted, loop: loop, controls: true, onPlay: handlePlay, onPause: handlePause, onEnded: handleEnded, style: {
|
|
188
|
+
visibility: showPoster ? 'hidden' : 'visible',
|
|
189
|
+
} })), showPoster && poster && _jsx(PosterImage, { src: poster, alt: "\u89C6\u9891\u5C01\u9762" }), _jsx(PlayButton, __assign({ className: "play-button", onClick: handlePlayClick, disabled: isLoading, sx: {
|
|
190
|
+
opacity: showPoster || !isPlaying ? 1 : 0,
|
|
191
|
+
'&:hover': {
|
|
192
|
+
opacity: 0.9,
|
|
193
|
+
},
|
|
194
|
+
transition: 'opacity 0.3s ease',
|
|
195
|
+
} }, { children: isLoading ? (_jsx(Box, { sx: {
|
|
196
|
+
width: 24,
|
|
197
|
+
height: 24,
|
|
198
|
+
border: '2px solid rgba(255, 255, 255, 0.3)',
|
|
199
|
+
borderTop: '2px solid #fff',
|
|
200
|
+
borderRadius: '50%',
|
|
201
|
+
animation: 'spin 1s linear infinite',
|
|
202
|
+
'@keyframes spin': {
|
|
203
|
+
'0%': { transform: 'rotate(0deg)' },
|
|
204
|
+
'100%': { transform: 'rotate(360deg)' },
|
|
205
|
+
},
|
|
206
|
+
} })) : isPlaying ? (_jsx(PauseIcon, {})) : (_jsx(PlayArrowIcon, {})) }))] })));
|
|
207
|
+
};
|
|
208
|
+
export default Video;
|
|
@@ -152,6 +152,7 @@ export interface AiInterviewReportList {
|
|
|
152
152
|
completedStatus: number;
|
|
153
153
|
createTime: number;
|
|
154
154
|
startTime: number;
|
|
155
|
+
screenSwitchCount: number;
|
|
155
156
|
completeTime: number;
|
|
156
157
|
hasProVersion: boolean;
|
|
157
158
|
isSimulated: boolean;
|
|
@@ -199,6 +200,7 @@ export interface AiReportProps {
|
|
|
199
200
|
rank: number;
|
|
200
201
|
};
|
|
201
202
|
customInterviewDimRankMap?: CustomInterviewDimRankMap;
|
|
203
|
+
reloadReportVersion?: () => void;
|
|
202
204
|
onLoad?: (values: AiReportLoadedValues) => void;
|
|
203
205
|
onExportReportClick?: () => void;
|
|
204
206
|
onScoreChange?: (scoreState?: ScoreManualUpdateState) => void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AiReportProps, AiReportRef } from './interface';
|
|
3
3
|
export declare const useAiReport: (props: AiReportProps) => {
|
|
4
|
+
version: number;
|
|
5
|
+
reloadReportVersion: () => void;
|
|
4
6
|
handleRefresh?: (() => void) | undefined;
|
|
5
7
|
token: string;
|
|
6
8
|
customScore?: number | undefined;
|
|
@@ -9,8 +9,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
import useAiReportVersion from '../ai-report-v2/useAiReportVersion';
|
|
12
13
|
import { useRef } from 'react';
|
|
13
14
|
export var useAiReport = function (props) {
|
|
14
15
|
var ref = useRef();
|
|
15
|
-
|
|
16
|
+
var reportVersion = useAiReportVersion(props.token);
|
|
17
|
+
return __assign(__assign(__assign({ ref: ref }, props), ref === null || ref === void 0 ? void 0 : ref.current), reportVersion);
|
|
16
18
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { AiReportProps } from './interface';
|
|
2
|
-
|
|
3
|
-
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<AiReportProps & React.RefAttributes<any>>>;
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<AiReportProps & import("react").RefAttributes<any>>>;
|
|
4
4
|
export default _default;
|
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx,
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import { FormReport } from './components/Form';
|
|
14
14
|
import NotFinish from './components/NotFinish';
|
|
15
15
|
import ReportHeader from './components/ReportHeader/ReportHeader';
|
|
@@ -18,11 +18,12 @@ import { INTERVIEW_STATUS } from "../../enum/ai-report";
|
|
|
18
18
|
import { PostAiInterviewResult } from "../../services/ai-report";
|
|
19
19
|
import { useAiReportStore } from "../../store/ai-report/global-store";
|
|
20
20
|
import { useRequest } from 'ahooks';
|
|
21
|
-
import { Box, Button,
|
|
21
|
+
import { Box, Button, Typography } from 'fbm-ui';
|
|
22
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
22
23
|
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
23
24
|
var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER;
|
|
24
25
|
var AiReportRoot = forwardRef(function (props, ref) {
|
|
25
|
-
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, fetchFormResult = props.fetchFormResult, fetchCandidateInfo = props.fetchCandidateInfo;
|
|
26
|
+
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, fetchFormResult = props.fetchFormResult, fetchCandidateInfo = props.fetchCandidateInfo, fetchReportUrl = props.fetchReportUrl, isExportPdf = props.isExportPdf;
|
|
26
27
|
var firstLoad = useRef(true);
|
|
27
28
|
var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
28
29
|
var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
|
|
@@ -62,20 +63,24 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
62
63
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
63
64
|
}, [JSON.stringify(props)]);
|
|
64
65
|
var aiReportResult = useMemo(function () {
|
|
66
|
+
if (loading) {
|
|
67
|
+
return (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [_jsx(Box, { children: _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u62A5\u544A\u52A0\u8F7D\u4E2D\uFF0C\u8BF7\u7A0D\u540E" })) }))] })));
|
|
68
|
+
}
|
|
65
69
|
if (status === NO_ANSWER) {
|
|
66
70
|
return (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [_jsx(Box, { children: _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ style: { marginTop: '2px' } }, { children: _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
|
|
67
71
|
}
|
|
68
72
|
else {
|
|
69
|
-
return (_jsxs(Box, __assign({ pb: 3, sx: {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
return (_jsxs(Stack, { children: [_jsx(NotFinish, {}), _jsxs(Box, __assign({ pb: 3, sx: {
|
|
74
|
+
background: '#F0F9FF',
|
|
75
|
+
backgroundImage: "url('//webcdn.fbmms.cn/assets/9kTa/pmsfSOeFx_7jhhsV9f_ta')",
|
|
76
|
+
backgroundSize: 'contain',
|
|
77
|
+
backgroundRepeat: 'no-repeat',
|
|
78
|
+
backgroundPosition: 'center top',
|
|
79
|
+
paddingTop: (collection === null || collection === void 0 ? void 0 : collection.length) > 0 ? 0 : 3,
|
|
80
|
+
} }, { children: [(collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ReportHeader, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status, fetchReportUrl: fetchReportUrl })), _jsx(FormReport, { fetchFormResult: fetchFormResult }), _jsx(Box, __assign({ sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4, border: '2px solid #FFFFFF', pb: 1 } }, { children: _jsx(VideoQuestion, { isExportPdf: isExportPdf }) }))] }))] }));
|
|
77
81
|
}
|
|
78
82
|
}, [
|
|
83
|
+
loading,
|
|
79
84
|
status,
|
|
80
85
|
operableButtons,
|
|
81
86
|
reminderSent,
|
|
@@ -84,7 +89,9 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
84
89
|
customScore,
|
|
85
90
|
handleRefreshSuccess,
|
|
86
91
|
fetchCandidateInfo,
|
|
92
|
+
fetchReportUrl,
|
|
87
93
|
fetchFormResult,
|
|
94
|
+
isExportPdf,
|
|
88
95
|
]);
|
|
89
96
|
return (_jsx(Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '618px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
90
97
|
});
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare type Mode = 'edit' | 'show';
|
|
3
|
-
declare type Field = 'evaluations' | 'suggestions';
|
|
4
3
|
interface EvaluateProps {
|
|
5
4
|
title: string;
|
|
6
|
-
|
|
7
|
-
field: Field;
|
|
8
|
-
evaluations: string;
|
|
5
|
+
evaluation: string;
|
|
9
6
|
mode?: Mode;
|
|
10
7
|
canEdit?: boolean;
|
|
8
|
+
orderToken: string;
|
|
11
9
|
}
|
|
12
10
|
declare const Evaluate: React.FC<EvaluateProps>;
|
|
13
11
|
export default Evaluate;
|
|
@@ -26,13 +26,13 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
26
26
|
return ar;
|
|
27
27
|
};
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
-
import {
|
|
30
|
-
import { Button, confirm,
|
|
29
|
+
import { PostInterviewEvaluation } from "../../../../services/ai-report";
|
|
30
|
+
import { Button, confirm, FormItem, Typography } from 'fbm-ui';
|
|
31
31
|
import { Box, Stack } from 'fbm-ui/lib/mui';
|
|
32
|
-
import { useCallback, useEffect, useState } from 'react';
|
|
32
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
33
33
|
var Evaluate = function (_a) {
|
|
34
|
-
var title = _a.title,
|
|
35
|
-
var _d = __read(useState(
|
|
34
|
+
var title = _a.title, evaluation = _a.evaluation, orderToken = _a.orderToken, _b = _a.mode, mode = _b === void 0 ? 'show' : _b, _c = _a.canEdit, canEdit = _c === void 0 ? 'false' : _c;
|
|
35
|
+
var _d = __read(useState(evaluation), 2), content = _d[0], setContent = _d[1];
|
|
36
36
|
var _e = __read(useState('show'), 2), internalMode = _e[0], setInternalMode = _e[1];
|
|
37
37
|
var handleChange = useCallback(function (e) {
|
|
38
38
|
var value = e.target.value;
|
|
@@ -41,7 +41,12 @@ var Evaluate = function (_a) {
|
|
|
41
41
|
var handleModeChange = useCallback(function () {
|
|
42
42
|
setInternalMode(internalMode === 'show' ? 'edit' : 'show');
|
|
43
43
|
}, [internalMode]);
|
|
44
|
+
var isValidate = useMemo(function () {
|
|
45
|
+
return content.trim().length > 0;
|
|
46
|
+
}, [content]);
|
|
44
47
|
var handleSubmit = useCallback(function () {
|
|
48
|
+
if (!isValidate)
|
|
49
|
+
return;
|
|
45
50
|
confirm({
|
|
46
51
|
header: null,
|
|
47
52
|
content: '确认将评价内容修改吗?该动作无法被撤销。',
|
|
@@ -52,19 +57,14 @@ var Evaluate = function (_a) {
|
|
|
52
57
|
},
|
|
53
58
|
onOk: function (_a) {
|
|
54
59
|
var onClose = _a.onClose;
|
|
55
|
-
var data =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
: {
|
|
61
|
-
evaluationToken: token,
|
|
62
|
-
manualSuggestions: [content],
|
|
63
|
-
};
|
|
64
|
-
PostAiInterviewEvaluation(data).then(handleModeChange).then(onClose).catch(console.log);
|
|
60
|
+
var data = {
|
|
61
|
+
orderToken: orderToken,
|
|
62
|
+
manualEvaluation: content,
|
|
63
|
+
};
|
|
64
|
+
PostInterviewEvaluation(data).then(handleModeChange).then(onClose).catch(console.error);
|
|
65
65
|
},
|
|
66
66
|
});
|
|
67
|
-
}, [
|
|
67
|
+
}, [isValidate, orderToken, content, handleModeChange]);
|
|
68
68
|
useEffect(function () {
|
|
69
69
|
setInternalMode(mode);
|
|
70
70
|
}, [mode]);
|
|
@@ -73,10 +73,24 @@ var Evaluate = function (_a) {
|
|
|
73
73
|
background: '#FFFBE8',
|
|
74
74
|
boxShadow: ' 0px 2px 6px 0px rgba(91,108,95,0.15)',
|
|
75
75
|
padding: '8px 24px',
|
|
76
|
-
borderRadius:
|
|
77
|
-
} }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between"
|
|
76
|
+
borderRadius: 3,
|
|
77
|
+
} }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between", height: 36, mb: 1, position: "relative" }, { children: [_jsx(Box, __assign({ sx: {
|
|
78
|
+
position: 'relative',
|
|
79
|
+
'&:after': {
|
|
80
|
+
position: 'absolute',
|
|
81
|
+
width: 'calc(100% - 2px)',
|
|
82
|
+
background: ' linear-gradient( 90deg, #FFE5A9 0%, #FFB300 100%)',
|
|
83
|
+
left: -3,
|
|
84
|
+
bottom: 2,
|
|
85
|
+
height: 5,
|
|
86
|
+
content: '""',
|
|
87
|
+
color: 'rgba(0, 0, 0, 0.54)',
|
|
88
|
+
display: 'inline-block',
|
|
89
|
+
margin: '0 4px',
|
|
90
|
+
},
|
|
91
|
+
} }, { children: _jsx(Typography, __assign({ fontWeight: "medium", zIndex: 1, sx: { position: 'relative', zIndex: 1 } }, { children: title })) })), canEdit && (_jsx("img", { onClick: handleModeChange, src: "https://webcdn.fbmms.cn/assets/pWED/KpgryvNScI7XZdjNBgTNC", alt: "", style: { width: 36, height: 36, position: 'absolute', top: -8, right: -24, cursor: 'pointer' } }))] })), internalMode === 'edit' && (_jsxs(Box, __assign({ width: 1, pr: 2 }, { children: [_jsx(FormItem, { sx: { height: 'auto', pr: 0 }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, onChange: handleChange, error: !isValidate }), _jsxs(Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [_jsx(Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
|
|
78
92
|
handleModeChange();
|
|
79
|
-
|
|
93
|
+
setContent(evaluation);
|
|
80
94
|
} }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ size: "medium", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && (_jsx(Typography, __assign({ variant: "body2", color: "textSecondary", sx: { whiteSpace: 'pre-wrap' } }, { children: content })))] })));
|
|
81
95
|
};
|
|
82
96
|
export default Evaluate;
|
|
@@ -3,8 +3,21 @@ interface Dimension {
|
|
|
3
3
|
name: string;
|
|
4
4
|
score: number;
|
|
5
5
|
}
|
|
6
|
+
export declare function getLevel(score: any): {
|
|
7
|
+
label: string;
|
|
8
|
+
width: number;
|
|
9
|
+
fontColor: string;
|
|
10
|
+
color: number[];
|
|
11
|
+
gradient: string[];
|
|
12
|
+
scoreGradient: string[];
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
shadowColor: string;
|
|
15
|
+
endScore: number;
|
|
16
|
+
pointColor: string[];
|
|
17
|
+
};
|
|
6
18
|
interface GraphProps {
|
|
7
19
|
items: Array<Dimension>;
|
|
8
20
|
}
|
|
21
|
+
export declare function hookCanvasContext(ctx: any): void;
|
|
9
22
|
declare const _default: import("react").NamedExoticComponent<GraphProps>;
|
|
10
23
|
export default _default;
|