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
|
@@ -43,8 +43,8 @@ var ahooks_1 = require("ahooks");
|
|
|
43
43
|
var fbm_ui_1 = require("fbm-ui");
|
|
44
44
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
45
45
|
var VideoVoiceUploader = function (_a) {
|
|
46
|
-
var index = _a.index, questions = _a.questions, setQuestions = _a.setQuestions, _b = _a.type, type = _b === void 0 ? 'mobile' : _b;
|
|
47
|
-
var
|
|
46
|
+
var index = _a.index, questions = _a.questions, setQuestions = _a.setQuestions, _b = _a.type, type = _b === void 0 ? 'mobile' : _b, _c = _a.lable, lable = _c === void 0 ? '上传视频' : _c;
|
|
47
|
+
var _d = (0, ahooks_1.useRequest)(ai_question_1.PostCommonUpload, {
|
|
48
48
|
manual: true,
|
|
49
49
|
onSuccess: function (_a) {
|
|
50
50
|
var data = _a.data;
|
|
@@ -52,7 +52,7 @@ var VideoVoiceUploader = function (_a) {
|
|
|
52
52
|
questions[index] = __assign(__assign({}, questions[index]), (type === 'mobile' ? { videoUrl: firstData.url } : { videoURLWide: firstData.url }));
|
|
53
53
|
setQuestions(__spreadArray([], __read(questions), false));
|
|
54
54
|
},
|
|
55
|
-
}), loading =
|
|
55
|
+
}), loading = _d.loading, postCommonUpload = _d.run;
|
|
56
56
|
var uploadProps = {
|
|
57
57
|
type: 'custom',
|
|
58
58
|
showUploadList: false,
|
|
@@ -78,6 +78,6 @@ var VideoVoiceUploader = function (_a) {
|
|
|
78
78
|
cursor: 'pointer',
|
|
79
79
|
width: '100%',
|
|
80
80
|
height: '100%',
|
|
81
|
-
} }, { children: [!loading && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ justifyContent: "center", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.UploadIcon, { color: "inherit" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "inherit" }, { children:
|
|
81
|
+
} }, { children: [!loading && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ justifyContent: "center", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.UploadIcon, { color: "inherit" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "inherit" }, { children: lable }))] }))), loading && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ justifyContent: "center", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(mui_1.CircularProgress, { size: 24, color: "inherit" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption" }, { children: "\u4E0A\u4F20\u4E2D..." }))] })))] })) })));
|
|
82
82
|
};
|
|
83
83
|
exports.default = VideoVoiceUploader;
|
|
@@ -138,7 +138,9 @@ var QuestionUpdate = function () {
|
|
|
138
138
|
// 职场能力中不参与AI分析的提交时,过滤掉
|
|
139
139
|
var newAiAbilities = aiAbilities
|
|
140
140
|
.map(function (i) {
|
|
141
|
+
var _a;
|
|
141
142
|
i.isNotCompute = true;
|
|
143
|
+
i.child = (_a = i.child) === null || _a === void 0 ? void 0 : _a.map(function (v) { return (__assign(__assign({}, v), { weight: Number(v.weight) || 0 })); });
|
|
142
144
|
if (i.type === 6) {
|
|
143
145
|
var extra_1 = {};
|
|
144
146
|
var extraJson = JSON.parse(i.extra);
|
|
@@ -271,7 +273,6 @@ var QuestionUpdate = function () {
|
|
|
271
273
|
else {
|
|
272
274
|
curAiAbilities.unshift(CurWorkPlaceAiAbility);
|
|
273
275
|
}
|
|
274
|
-
console.log('curAiAbilities', curAiAbilities, inInit);
|
|
275
276
|
updateAiAbilities(curAiAbilities, inInit);
|
|
276
277
|
}, [questionCollectionList, aiAbilities, updateAiAbilities]);
|
|
277
278
|
var handleCategoryChange = (0, react_1.useCallback)(function (value) {
|
|
@@ -291,7 +292,7 @@ var QuestionUpdate = function () {
|
|
|
291
292
|
[aiAbilities, handleWorkplaceData]);
|
|
292
293
|
(0, react_1.useEffect)(function () {
|
|
293
294
|
if (open) {
|
|
294
|
-
updateState({ language: item.language, aiSwitch: item.aiSwitch });
|
|
295
|
+
updateState({ language: item.language, aiSwitch: item.aiSwitch, voiceLanguage: item === null || item === void 0 ? void 0 : item.voiceLanguage });
|
|
295
296
|
updateAiAbilities(item.aiAbilities, true);
|
|
296
297
|
}
|
|
297
298
|
// 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;
|
|
@@ -30,7 +30,7 @@ var fbm_ui_1 = require("fbm-ui");
|
|
|
30
30
|
var react_1 = require("react");
|
|
31
31
|
var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER, FAILED = ai_report_1.INTERVIEW_STATUS.FAILED, IN_CALCULATION = ai_report_1.INTERVIEW_STATUS.IN_CALCULATION;
|
|
32
32
|
var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
33
|
-
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
|
|
33
|
+
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, reloadReportVersion = props.reloadReportVersion;
|
|
34
34
|
var firstLoad = (0, react_1.useRef)(true);
|
|
35
35
|
var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
36
36
|
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;
|
|
@@ -55,8 +55,11 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
55
55
|
}), data = _h.data, loading = _h.loading, postAiInterviewResult = _h.run;
|
|
56
56
|
var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
|
|
57
57
|
var handleRefreshSuccess = (0, react_1.useCallback)(function () {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
reloadReportVersion === null || reloadReportVersion === void 0 ? void 0 : reloadReportVersion();
|
|
59
|
+
if (!reloadReportVersion) {
|
|
60
|
+
postAiInterviewResult();
|
|
61
|
+
}
|
|
62
|
+
}, [postAiInterviewResult, reloadReportVersion]);
|
|
60
63
|
var handleSwitchReportModel = (0, react_1.useCallback)(function () {
|
|
61
64
|
var SwithAction = function () {
|
|
62
65
|
(0, ai_report_2.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,213 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (_) try {
|
|
29
|
+
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;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
50
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
51
|
+
if (!m) return o;
|
|
52
|
+
var i = m.call(o), r, ar = [], e;
|
|
53
|
+
try {
|
|
54
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
55
|
+
}
|
|
56
|
+
catch (error) { e = { error: error }; }
|
|
57
|
+
finally {
|
|
58
|
+
try {
|
|
59
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
60
|
+
}
|
|
61
|
+
finally { if (e) throw e.error; }
|
|
62
|
+
}
|
|
63
|
+
return ar;
|
|
64
|
+
};
|
|
65
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
66
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
67
|
+
};
|
|
68
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
70
|
+
var Pause_1 = __importDefault(require("@mui/icons-material/Pause"));
|
|
71
|
+
var PlayArrow_1 = __importDefault(require("@mui/icons-material/PlayArrow"));
|
|
72
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
73
|
+
var fbm_ui_2 = require("fbm-ui");
|
|
74
|
+
var react_1 = require("react");
|
|
75
|
+
var VideoContainer = (0, fbm_ui_2.styled)(fbm_ui_1.Box)(function (_a) {
|
|
76
|
+
var theme = _a.theme;
|
|
77
|
+
return ({
|
|
78
|
+
position: 'relative',
|
|
79
|
+
display: 'inline-block',
|
|
80
|
+
backgroundColor: '#000',
|
|
81
|
+
borderRadius: theme.spacing(1),
|
|
82
|
+
overflow: 'hidden',
|
|
83
|
+
cursor: 'pointer',
|
|
84
|
+
'&:hover .play-button': {
|
|
85
|
+
opacity: '0.9 !important',
|
|
86
|
+
transform: 'translate(-50%, -50%) scale(1.1)',
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
var StyledVideo = (0, fbm_ui_2.styled)('video')({
|
|
91
|
+
width: '100%',
|
|
92
|
+
height: '100%',
|
|
93
|
+
display: 'block',
|
|
94
|
+
});
|
|
95
|
+
var PlayButton = (0, fbm_ui_2.styled)(fbm_ui_1.IconButton)(function (_a) {
|
|
96
|
+
var theme = _a.theme;
|
|
97
|
+
return ({
|
|
98
|
+
position: 'absolute',
|
|
99
|
+
top: '50%',
|
|
100
|
+
left: '50%',
|
|
101
|
+
transform: 'translate(-50%, -50%)',
|
|
102
|
+
backgroundColor: 'rgba(0, 0, 0, 0.7)',
|
|
103
|
+
color: '#fff',
|
|
104
|
+
width: 48,
|
|
105
|
+
height: 48,
|
|
106
|
+
transition: 'all 0.3s ease',
|
|
107
|
+
zIndex: 2,
|
|
108
|
+
'&:hover': {
|
|
109
|
+
backgroundColor: 'rgba(0, 0, 0, 0.8)',
|
|
110
|
+
},
|
|
111
|
+
'& .MuiSvgIcon-root': {
|
|
112
|
+
fontSize: 32,
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
var PosterImage = (0, fbm_ui_2.styled)('img')({
|
|
117
|
+
position: 'absolute',
|
|
118
|
+
top: 0,
|
|
119
|
+
left: 0,
|
|
120
|
+
width: '100%',
|
|
121
|
+
height: '100%',
|
|
122
|
+
objectFit: 'cover',
|
|
123
|
+
zIndex: 1,
|
|
124
|
+
});
|
|
125
|
+
var Video = function (_a) {
|
|
126
|
+
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;
|
|
127
|
+
var videoRef = (0, react_1.useRef)(null);
|
|
128
|
+
var _g = __read((0, react_1.useState)(false), 2), isPlaying = _g[0], setIsPlaying = _g[1];
|
|
129
|
+
var _h = __read((0, react_1.useState)(true), 2), showPoster = _h[0], setShowPoster = _h[1];
|
|
130
|
+
var _j = __read((0, react_1.useState)(false), 2), isLoading = _j[0], setIsLoading = _j[1];
|
|
131
|
+
var _k = __read((0, react_1.useState)(false), 2), videoLoaded = _k[0], setVideoLoaded = _k[1]; // 控制视频是否已加载
|
|
132
|
+
var handlePlayClick = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
133
|
+
var error_1;
|
|
134
|
+
return __generator(this, function (_a) {
|
|
135
|
+
switch (_a.label) {
|
|
136
|
+
case 0:
|
|
137
|
+
setVideoLoaded(true); // 视频开始加载时设置为已加载
|
|
138
|
+
if (!videoRef.current)
|
|
139
|
+
return [2 /*return*/];
|
|
140
|
+
_a.label = 1;
|
|
141
|
+
case 1:
|
|
142
|
+
_a.trys.push([1, 5, , 6]);
|
|
143
|
+
if (!isPlaying) return [3 /*break*/, 2];
|
|
144
|
+
videoRef.current.pause();
|
|
145
|
+
return [3 /*break*/, 4];
|
|
146
|
+
case 2:
|
|
147
|
+
setIsLoading(true);
|
|
148
|
+
return [4 /*yield*/, videoRef.current.play()];
|
|
149
|
+
case 3:
|
|
150
|
+
_a.sent();
|
|
151
|
+
setShowPoster(false);
|
|
152
|
+
_a.label = 4;
|
|
153
|
+
case 4: return [3 /*break*/, 6];
|
|
154
|
+
case 5:
|
|
155
|
+
error_1 = _a.sent();
|
|
156
|
+
console.error('视频播放失败:', error_1);
|
|
157
|
+
setIsLoading(false);
|
|
158
|
+
return [3 /*break*/, 6];
|
|
159
|
+
case 6: return [2 /*return*/];
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}); }, [isPlaying]);
|
|
163
|
+
var handlePlay = (0, react_1.useCallback)(function (event) {
|
|
164
|
+
setIsPlaying(true);
|
|
165
|
+
setIsLoading(false);
|
|
166
|
+
setShowPoster(false);
|
|
167
|
+
onPlay === null || onPlay === void 0 ? void 0 : onPlay(event);
|
|
168
|
+
}, [onPlay]);
|
|
169
|
+
var handlePause = (0, react_1.useCallback)(function (event) {
|
|
170
|
+
setIsPlaying(false);
|
|
171
|
+
onPause === null || onPause === void 0 ? void 0 : onPause(event);
|
|
172
|
+
}, [onPause]);
|
|
173
|
+
var handleEnded = (0, react_1.useCallback)(function (event) {
|
|
174
|
+
setIsPlaying(false);
|
|
175
|
+
setShowPoster(true);
|
|
176
|
+
onEnded === null || onEnded === void 0 ? void 0 : onEnded(event);
|
|
177
|
+
}, [onEnded]);
|
|
178
|
+
var handleContainerClick = (0, react_1.useCallback)(function (e) {
|
|
179
|
+
// 避免点击播放按钮时触发容器点击事件
|
|
180
|
+
if (e.target.closest('.play-button')) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
e.stopPropagation();
|
|
184
|
+
// 如果传入了外部onClick回调,优先执行
|
|
185
|
+
if (onClick) {
|
|
186
|
+
onClick(e);
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
// 默认行为:切换播放/暂停状态
|
|
190
|
+
handlePlayClick();
|
|
191
|
+
}, [onClick, handlePlayClick]);
|
|
192
|
+
return ((0, jsx_runtime_1.jsxs)(VideoContainer, __assign({ sx: { width: width, height: height }, onClick: handleContainerClick }, { children: [videoLoaded && ((0, jsx_runtime_1.jsx)(StyledVideo, { ref: videoRef, src: src, poster: poster, autoPlay: autoPlay, muted: muted, loop: loop, controls: true, onPlay: handlePlay, onPause: handlePause, onEnded: handleEnded, style: {
|
|
193
|
+
visibility: showPoster ? 'hidden' : 'visible',
|
|
194
|
+
} })), showPoster && poster && (0, jsx_runtime_1.jsx)(PosterImage, { src: poster, alt: "\u89C6\u9891\u5C01\u9762" }), (0, jsx_runtime_1.jsx)(PlayButton, __assign({ className: "play-button", onClick: handlePlayClick, disabled: isLoading, sx: {
|
|
195
|
+
opacity: showPoster || !isPlaying ? 1 : 0,
|
|
196
|
+
'&:hover': {
|
|
197
|
+
opacity: 0.9,
|
|
198
|
+
},
|
|
199
|
+
transition: 'opacity 0.3s ease',
|
|
200
|
+
} }, { children: isLoading ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { sx: {
|
|
201
|
+
width: 24,
|
|
202
|
+
height: 24,
|
|
203
|
+
border: '2px solid rgba(255, 255, 255, 0.3)',
|
|
204
|
+
borderTop: '2px solid #fff',
|
|
205
|
+
borderRadius: '50%',
|
|
206
|
+
animation: 'spin 1s linear infinite',
|
|
207
|
+
'@keyframes spin': {
|
|
208
|
+
'0%': { transform: 'rotate(0deg)' },
|
|
209
|
+
'100%': { transform: 'rotate(360deg)' },
|
|
210
|
+
},
|
|
211
|
+
} })) : isPlaying ? ((0, jsx_runtime_1.jsx)(Pause_1.default, {})) : ((0, jsx_runtime_1.jsx)(PlayArrow_1.default, {})) }))] })));
|
|
212
|
+
};
|
|
213
|
+
exports.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;
|
|
@@ -10,11 +10,16 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
13
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
17
|
exports.useAiReport = void 0;
|
|
18
|
+
var useAiReportVersion_1 = __importDefault(require("../ai-report-v2/useAiReportVersion"));
|
|
15
19
|
var react_1 = require("react");
|
|
16
20
|
var useAiReport = function (props) {
|
|
17
21
|
var ref = (0, react_1.useRef)();
|
|
18
|
-
|
|
22
|
+
var reportVersion = (0, useAiReportVersion_1.default)(props.token);
|
|
23
|
+
return __assign(__assign(__assign({ ref: ref }, props), ref === null || ref === void 0 ? void 0 : ref.current), reportVersion);
|
|
19
24
|
};
|
|
20
25
|
exports.useAiReport = useAiReport;
|
|
@@ -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;
|
|
@@ -24,10 +24,11 @@ var ai_report_2 = require("../../services/ai-report");
|
|
|
24
24
|
var global_store_1 = require("../../store/ai-report/global-store");
|
|
25
25
|
var ahooks_1 = require("ahooks");
|
|
26
26
|
var fbm_ui_1 = require("fbm-ui");
|
|
27
|
+
var mui_1 = require("fbm-ui/lib/mui");
|
|
27
28
|
var react_1 = require("react");
|
|
28
29
|
var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER;
|
|
29
30
|
var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
30
|
-
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;
|
|
31
|
+
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;
|
|
31
32
|
var firstLoad = (0, react_1.useRef)(true);
|
|
32
33
|
var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
33
34
|
var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
|
|
@@ -67,20 +68,24 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
67
68
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
69
|
}, [JSON.stringify(props)]);
|
|
69
70
|
var aiReportResult = (0, react_1.useMemo)(function () {
|
|
71
|
+
if (loading) {
|
|
72
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u62A5\u544A\u52A0\u8F7D\u4E2D\uFF0C\u8BF7\u7A0D\u540E" })) }))] })));
|
|
73
|
+
}
|
|
70
74
|
if (status === NO_ANSWER) {
|
|
71
75
|
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.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')) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ style: { marginTop: '2px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.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" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
|
|
72
76
|
}
|
|
73
77
|
else {
|
|
74
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ pb: 3, sx: {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ pb: 3, sx: {
|
|
79
|
+
background: '#F0F9FF',
|
|
80
|
+
backgroundImage: "url('//webcdn.fbmms.cn/assets/9kTa/pmsfSOeFx_7jhhsV9f_ta')",
|
|
81
|
+
backgroundSize: 'contain',
|
|
82
|
+
backgroundRepeat: 'no-repeat',
|
|
83
|
+
backgroundPosition: 'center top',
|
|
84
|
+
paddingTop: (collection === null || collection === void 0 ? void 0 : collection.length) > 0 ? 0 : 3,
|
|
85
|
+
} }, { children: [(collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ReportHeader_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status, fetchReportUrl: fetchReportUrl })), (0, jsx_runtime_1.jsx)(Form_1.FormReport, { fetchFormResult: fetchFormResult }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4, border: '2px solid #FFFFFF', pb: 1 } }, { children: (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, { isExportPdf: isExportPdf }) }))] }))] }));
|
|
82
86
|
}
|
|
83
87
|
}, [
|
|
88
|
+
loading,
|
|
84
89
|
status,
|
|
85
90
|
operableButtons,
|
|
86
91
|
reminderSent,
|
|
@@ -89,7 +94,9 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
89
94
|
customScore,
|
|
90
95
|
handleRefreshSuccess,
|
|
91
96
|
fetchCandidateInfo,
|
|
97
|
+
fetchReportUrl,
|
|
92
98
|
fetchFormResult,
|
|
99
|
+
isExportPdf,
|
|
93
100
|
]);
|
|
94
101
|
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '618px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
95
102
|
});
|
|
@@ -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;
|
|
@@ -33,8 +33,8 @@ var fbm_ui_1 = require("fbm-ui");
|
|
|
33
33
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
34
34
|
var react_1 = require("react");
|
|
35
35
|
var Evaluate = function (_a) {
|
|
36
|
-
var title = _a.title,
|
|
37
|
-
var _d = __read((0, react_1.useState)(
|
|
36
|
+
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;
|
|
37
|
+
var _d = __read((0, react_1.useState)(evaluation), 2), content = _d[0], setContent = _d[1];
|
|
38
38
|
var _e = __read((0, react_1.useState)('show'), 2), internalMode = _e[0], setInternalMode = _e[1];
|
|
39
39
|
var handleChange = (0, react_1.useCallback)(function (e) {
|
|
40
40
|
var value = e.target.value;
|
|
@@ -43,7 +43,12 @@ var Evaluate = function (_a) {
|
|
|
43
43
|
var handleModeChange = (0, react_1.useCallback)(function () {
|
|
44
44
|
setInternalMode(internalMode === 'show' ? 'edit' : 'show');
|
|
45
45
|
}, [internalMode]);
|
|
46
|
+
var isValidate = (0, react_1.useMemo)(function () {
|
|
47
|
+
return content.trim().length > 0;
|
|
48
|
+
}, [content]);
|
|
46
49
|
var handleSubmit = (0, react_1.useCallback)(function () {
|
|
50
|
+
if (!isValidate)
|
|
51
|
+
return;
|
|
47
52
|
(0, fbm_ui_1.confirm)({
|
|
48
53
|
header: null,
|
|
49
54
|
content: '确认将评价内容修改吗?该动作无法被撤销。',
|
|
@@ -54,19 +59,14 @@ var Evaluate = function (_a) {
|
|
|
54
59
|
},
|
|
55
60
|
onOk: function (_a) {
|
|
56
61
|
var onClose = _a.onClose;
|
|
57
|
-
var data =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
: {
|
|
63
|
-
evaluationToken: token,
|
|
64
|
-
manualSuggestions: [content],
|
|
65
|
-
};
|
|
66
|
-
(0, ai_report_1.PostAiInterviewEvaluation)(data).then(handleModeChange).then(onClose).catch(console.log);
|
|
62
|
+
var data = {
|
|
63
|
+
orderToken: orderToken,
|
|
64
|
+
manualEvaluation: content,
|
|
65
|
+
};
|
|
66
|
+
(0, ai_report_1.PostInterviewEvaluation)(data).then(handleModeChange).then(onClose).catch(console.error);
|
|
67
67
|
},
|
|
68
68
|
});
|
|
69
|
-
}, [
|
|
69
|
+
}, [isValidate, orderToken, content, handleModeChange]);
|
|
70
70
|
(0, react_1.useEffect)(function () {
|
|
71
71
|
setInternalMode(mode);
|
|
72
72
|
}, [mode]);
|
|
@@ -75,10 +75,24 @@ var Evaluate = function (_a) {
|
|
|
75
75
|
background: '#FFFBE8',
|
|
76
76
|
boxShadow: ' 0px 2px 6px 0px rgba(91,108,95,0.15)',
|
|
77
77
|
padding: '8px 24px',
|
|
78
|
-
borderRadius:
|
|
79
|
-
} }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between"
|
|
78
|
+
borderRadius: 3,
|
|
79
|
+
} }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between", height: 36, mb: 1, position: "relative" }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ sx: {
|
|
80
|
+
position: 'relative',
|
|
81
|
+
'&:after': {
|
|
82
|
+
position: 'absolute',
|
|
83
|
+
width: 'calc(100% - 2px)',
|
|
84
|
+
background: ' linear-gradient( 90deg, #FFE5A9 0%, #FFB300 100%)',
|
|
85
|
+
left: -3,
|
|
86
|
+
bottom: 2,
|
|
87
|
+
height: 5,
|
|
88
|
+
content: '""',
|
|
89
|
+
color: 'rgba(0, 0, 0, 0.54)',
|
|
90
|
+
display: 'inline-block',
|
|
91
|
+
margin: '0 4px',
|
|
92
|
+
},
|
|
93
|
+
} }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontWeight: "medium", zIndex: 1, sx: { position: 'relative', zIndex: 1 } }, { children: title })) })), canEdit && ((0, jsx_runtime_1.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' && ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ width: 1, pr: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { sx: { height: 'auto', pr: 0 }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, onChange: handleChange, error: !isValidate }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
|
|
80
94
|
handleModeChange();
|
|
81
|
-
|
|
95
|
+
setContent(evaluation);
|
|
82
96
|
} }, { children: "\u53D6\u6D88" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "medium", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary", sx: { whiteSpace: 'pre-wrap' } }, { children: content })))] })));
|
|
83
97
|
};
|
|
84
98
|
exports.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;
|