eli-video-interview 1.2.42-alpha.20 → 1.2.42-alpha.22
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/modules/ai-report/Root.js +6 -3
- package/esm/modules/ai-report/interface.d.ts +1 -0
- package/esm/modules/ai-report-v2/Root.js +3 -2
- package/esm/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +3 -3
- package/esm/modules/ai-report-v2/components/VideoQuestion/index.d.ts +6 -3
- package/esm/modules/ai-report-v2/components/VideoQuestion/index.js +5 -3
- package/esm/modules/ai-report-v2/components/VideoQuestion/interface.d.ts +1 -0
- package/esm/modules/ai-report-v2/components/styled.d.ts +1 -0
- package/esm/modules/ai-report-v2/components/styled.js +16 -0
- package/esm/modules/ai-report-v2/interface.d.ts +1 -0
- package/esm/modules/ai-report-v2/useAiReport.d.ts +1 -0
- package/esm/store/ai-report/global-store.d.ts +3 -0
- package/lib/modules/ai-report/Root.js +6 -3
- package/lib/modules/ai-report/interface.d.ts +1 -0
- package/lib/modules/ai-report-v2/Root.js +3 -2
- package/lib/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +2 -2
- package/lib/modules/ai-report-v2/components/VideoQuestion/index.d.ts +6 -3
- package/lib/modules/ai-report-v2/components/VideoQuestion/index.js +5 -3
- package/lib/modules/ai-report-v2/components/VideoQuestion/interface.d.ts +1 -0
- package/lib/modules/ai-report-v2/components/styled.d.ts +1 -0
- package/lib/modules/ai-report-v2/components/styled.js +17 -1
- package/lib/modules/ai-report-v2/interface.d.ts +1 -0
- package/lib/modules/ai-report-v2/useAiReport.d.ts +1 -0
- package/lib/store/ai-report/global-store.d.ts +3 -0
- package/package.json +1 -1
|
@@ -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({
|
|
@@ -199,6 +199,7 @@ export interface AiReportProps {
|
|
|
199
199
|
rank: number;
|
|
200
200
|
};
|
|
201
201
|
customInterviewDimRankMap?: CustomInterviewDimRankMap;
|
|
202
|
+
reloadReportVersion?: () => void;
|
|
202
203
|
onLoad?: (values: AiReportLoadedValues) => void;
|
|
203
204
|
onExportReportClick?: () => void;
|
|
204
205
|
onScoreChange?: (scoreState?: ScoreManualUpdateState) => void;
|
|
@@ -23,7 +23,7 @@ import { Stack } from 'fbm-ui/lib/mui';
|
|
|
23
23
|
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
24
24
|
var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER;
|
|
25
25
|
var AiReportRoot = forwardRef(function (props, ref) {
|
|
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;
|
|
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;
|
|
27
27
|
var firstLoad = useRef(true);
|
|
28
28
|
var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
29
29
|
var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
|
|
@@ -74,7 +74,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
74
74
|
backgroundRepeat: 'no-repeat',
|
|
75
75
|
backgroundPosition: 'center top',
|
|
76
76
|
paddingTop: (collection === null || collection === void 0 ? void 0 : collection.length) > 0 ? 0 : 3,
|
|
77
|
-
} }, { 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(Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: _jsx(VideoQuestion, {}) }))] }))] }));
|
|
77
|
+
} }, { 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(Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: _jsx(VideoQuestion, { isExportPdf: isExportPdf }) }))] }))] }));
|
|
78
78
|
}
|
|
79
79
|
}, [
|
|
80
80
|
status,
|
|
@@ -87,6 +87,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
87
87
|
fetchCandidateInfo,
|
|
88
88
|
fetchReportUrl,
|
|
89
89
|
fetchFormResult,
|
|
90
|
+
isExportPdf,
|
|
90
91
|
]);
|
|
91
92
|
return (_jsx(Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '618px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
92
93
|
});
|
|
@@ -27,7 +27,7 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
27
27
|
};
|
|
28
28
|
import { createElement as _createElement } from "react";
|
|
29
29
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
30
|
-
import { Video } from '../styled';
|
|
30
|
+
import { ExportButton, Video } from '../styled';
|
|
31
31
|
import Abilities from './Abilities';
|
|
32
32
|
import BodyImages from './BodyImages';
|
|
33
33
|
import ScoreSlider from './ScoreSlider';
|
|
@@ -45,7 +45,7 @@ import update from 'immutability-helper';
|
|
|
45
45
|
import { useCallback, useMemo, useState } from 'react';
|
|
46
46
|
var STEP_NO_ANSWER = INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
|
|
47
47
|
var QuestionItem = function (props) {
|
|
48
|
-
var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities, workplaceEvaluation = _c.workplaceEvaluation, workplaceName = _c.workplaceName;
|
|
48
|
+
var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities, workplaceEvaluation = _c.workplaceEvaluation, workplaceName = _c.workplaceName, isExportPdf = props.isExportPdf;
|
|
49
49
|
var _d = __read(useState(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
|
|
50
50
|
var _e = useAiReportStore(function (store) { return [
|
|
51
51
|
store.reportResult,
|
|
@@ -116,7 +116,7 @@ var QuestionItem = function (props) {
|
|
|
116
116
|
minWidth: 12,
|
|
117
117
|
} }, { children: index + 1 })), _jsx(Typography, __assign({ variant: "body2", color: theme.palette.primary.main }, { children: desc }))] })), _jsxs(QuestionDesc, { children: [_jsx(BodyImages, { reviewImgs: reviewImgs }), _jsx("img", { className: "MuiSvgIcon-root", src: "//webcdn.fbmms.cn/assets/OYDO/1-c2bdx4v1upzLDJ4Ko-c", alt: "", width: 18, height: 11 }), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [isSingleChoice && _jsx(SingleChoice, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), _jsx(Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && (_jsxs(Box, { children: [_jsx("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
|
|
118
118
|
return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ mt: 1, fontSize: 14, color: theme.palette.primary.main }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), _jsxs(QuestionDesc, { children: [_jsx("img", { className: "MuiSvgIcon-root", src: "//webcdn.fbmms.cn/assets/OYDO/1-c2bdx4v1upzLDJ4Ko-c", alt: "", width: 18, height: 11 }), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
|
|
119
|
-
})] })), _jsx(Video, { src: videoUrl, controls: true })] })), isExistWeight && status !== STEP_COMPLETED && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore, "\u5206"] })) }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Stack, __assign({ mt: 3, spacing: 1, component: Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Box, __assign({ mt: 2, display: "flex" }, { children: [_jsxs(Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore, "\u5206"] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice }), abilities.map(function (v) { return (_createElement(Workplaces, __assign({}, v, { key: v.token }))); }), workplaceEvaluation && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), _jsx(Typography, { variant: "caption", sx: {
|
|
119
|
+
})] })), _jsxs(Box, __assign({ position: "relative" }, { children: [_jsx(Video, { src: videoUrl, controls: true }), isExportPdf && _jsx(ExportButton, __assign({ href: videoUrl }, { children: "\u67E5\u770B\u89C6\u9891" }))] }))] })), isExistWeight && status !== STEP_COMPLETED && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore, "\u5206"] })) }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Stack, __assign({ mt: 3, spacing: 1, component: Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Box, __assign({ mt: 2, display: "flex" }, { children: [_jsxs(Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore, "\u5206"] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice }), abilities.map(function (v) { return (_createElement(Workplaces, __assign({}, v, { key: v.token }))); }), workplaceEvaluation && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), _jsx(Typography, { variant: "caption", sx: {
|
|
120
120
|
color: '#424242',
|
|
121
121
|
}, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] })))] }), token));
|
|
122
122
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface VideoQuestionProps {
|
|
3
|
+
isExportPdf?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: React.NamedExoticComponent<VideoQuestionProps>;
|
|
6
|
+
export default _default;
|
|
@@ -14,9 +14,11 @@ import QuestionItem from './QuestionItem';
|
|
|
14
14
|
import AiHeaderTitle from "../../../../components/AiHeaderTitle";
|
|
15
15
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
16
16
|
import { Box, Empty } from 'fbm-ui';
|
|
17
|
-
|
|
17
|
+
import { memo } from 'react';
|
|
18
|
+
var VideoQuestion = function (_a) {
|
|
19
|
+
var _b = _a.isExportPdf, isExportPdf = _b === void 0 ? false : _b;
|
|
18
20
|
var reportResult = useAiReportStore(function (store) { return [store.reportResult, store.operableButtons]; }).reportResult;
|
|
19
21
|
var steps = (reportResult || {}).steps;
|
|
20
|
-
return (_jsxs(Box, __assign({ id: "report-question", mt: 2 }, { children: [_jsx(AiHeaderTitle, { name: "\u89C6\u9891\u9898" }), _jsx(Box, __assign({ mt: 3 }, { children: steps && steps.length > 0 ? (steps === null || steps === void 0 ? void 0 : steps.map(function (item, index) { return _jsx(QuestionItem, __assign({ index: index }, item), item.token); })) : (_jsx(Empty, { src: "//public-static-assets.oss-cn-beijing.aliyuncs.com/img/empty.png", desc: "\u6682\u65E0\u9898\u76EE" })) }))] })));
|
|
22
|
+
return (_jsxs(Box, __assign({ id: "report-question", mt: 2 }, { children: [_jsx(AiHeaderTitle, { name: "\u89C6\u9891\u9898" }), _jsx(Box, __assign({ mt: 3 }, { children: steps && steps.length > 0 ? (steps === null || steps === void 0 ? void 0 : steps.map(function (item, index) { return _jsx(QuestionItem, __assign({ index: index }, item, { isExportPdf: isExportPdf }), item.token); })) : (_jsx(Empty, { src: "//public-static-assets.oss-cn-beijing.aliyuncs.com/img/empty.png", desc: "\u6682\u65E0\u9898\u76EE" })) }))] })));
|
|
21
23
|
};
|
|
22
|
-
export default VideoQuestion;
|
|
24
|
+
export default memo(VideoQuestion);
|
|
@@ -33,6 +33,7 @@ export declare const Podium: import("@emotion/styled").StyledComponent<import("f
|
|
|
33
33
|
children?: import("react").ReactNode;
|
|
34
34
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
35
35
|
export declare const Video: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, {}>;
|
|
36
|
+
export declare const ExportButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
|
|
36
37
|
export declare const BeatProgressBar: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
37
38
|
children?: import("react").ReactNode;
|
|
38
39
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -114,6 +114,22 @@ export var Video = styled('video')(function (_a) {
|
|
|
114
114
|
boxShadow: theme.shadows[6],
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
|
+
export var ExportButton = styled('a')({
|
|
118
|
+
width: 96,
|
|
119
|
+
height: 40,
|
|
120
|
+
background: 'rgba(0,0,0,0.2)',
|
|
121
|
+
borderRadius: 20,
|
|
122
|
+
border: '1px solid rgba(255,255,255,0.0418)',
|
|
123
|
+
display: 'flex',
|
|
124
|
+
alignItems: 'center',
|
|
125
|
+
justifyContent: 'center',
|
|
126
|
+
textDecoration: 'none',
|
|
127
|
+
fontSize: 16,
|
|
128
|
+
color: '#FFFFFF',
|
|
129
|
+
position: 'absolute',
|
|
130
|
+
top: 'calc(50% - 20px) ',
|
|
131
|
+
left: 'calc(50% - 48px)',
|
|
132
|
+
});
|
|
117
133
|
export var BeatProgressBar = styled(Box)({
|
|
118
134
|
width: 169,
|
|
119
135
|
height: 16,
|
|
@@ -191,6 +191,7 @@ export interface AiReportProps {
|
|
|
191
191
|
showAbilitiesDetails?: boolean;
|
|
192
192
|
showAiDimension?: boolean;
|
|
193
193
|
canEditAiDimension?: boolean;
|
|
194
|
+
isExportPdf?: boolean;
|
|
194
195
|
operableButtons?: Array<'export' | 'refresh' | 'scoreRank' | 'abilities' | 'sendReminder'>;
|
|
195
196
|
stepToken?: string;
|
|
196
197
|
interviewCheat?: InterviewCheat;
|
|
@@ -12,6 +12,7 @@ export declare const useAiReportV2: (props: AiReportProps) => {
|
|
|
12
12
|
showAbilitiesDetails?: boolean | undefined;
|
|
13
13
|
showAiDimension?: boolean | undefined;
|
|
14
14
|
canEditAiDimension?: boolean | undefined;
|
|
15
|
+
isExportPdf?: boolean | undefined;
|
|
15
16
|
operableButtons?: ("export" | "refresh" | "scoreRank" | "abilities" | "sendReminder")[] | undefined;
|
|
16
17
|
stepToken?: string | undefined;
|
|
17
18
|
interviewCheat?: import("./interface").InterviewCheat | undefined;
|
|
@@ -20,6 +20,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
20
20
|
rank: number;
|
|
21
21
|
} | undefined;
|
|
22
22
|
customInterviewDimRankMap?: import("@/modules/ai-report/interface").CustomInterviewDimRankMap | undefined;
|
|
23
|
+
reloadReportVersion?: (() => void) | undefined;
|
|
23
24
|
onLoad?: ((values: import("@/modules/ai-report/interface").AiReportLoadedValues) => void) | undefined;
|
|
24
25
|
onExportReportClick?: (() => void) | undefined;
|
|
25
26
|
onScoreChange?: ((scoreState?: import("@/modules/ai-report/interface").ScoreManualUpdateState | undefined) => void) | undefined;
|
|
@@ -47,6 +48,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
47
48
|
rank: number;
|
|
48
49
|
} | undefined;
|
|
49
50
|
customInterviewDimRankMap?: import("@/modules/ai-report/interface").CustomInterviewDimRankMap | undefined;
|
|
51
|
+
reloadReportVersion?: (() => void) | undefined;
|
|
50
52
|
onLoad?: ((values: import("@/modules/ai-report/interface").AiReportLoadedValues) => void) | undefined;
|
|
51
53
|
onExportReportClick?: (() => void) | undefined;
|
|
52
54
|
onScoreChange?: ((scoreState?: import("@/modules/ai-report/interface").ScoreManualUpdateState | undefined) => void) | undefined;
|
|
@@ -74,6 +76,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
74
76
|
rank: number;
|
|
75
77
|
} | undefined;
|
|
76
78
|
customInterviewDimRankMap?: import("@/modules/ai-report/interface").CustomInterviewDimRankMap | undefined;
|
|
79
|
+
reloadReportVersion?: (() => void) | undefined;
|
|
77
80
|
onLoad?: ((values: import("@/modules/ai-report/interface").AiReportLoadedValues) => void) | undefined;
|
|
78
81
|
onExportReportClick?: (() => void) | undefined;
|
|
79
82
|
onScoreChange?: ((scoreState?: import("@/modules/ai-report/interface").ScoreManualUpdateState | undefined) => void) | undefined;
|
|
@@ -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)({
|
|
@@ -199,6 +199,7 @@ export interface AiReportProps {
|
|
|
199
199
|
rank: number;
|
|
200
200
|
};
|
|
201
201
|
customInterviewDimRankMap?: CustomInterviewDimRankMap;
|
|
202
|
+
reloadReportVersion?: () => void;
|
|
202
203
|
onLoad?: (values: AiReportLoadedValues) => void;
|
|
203
204
|
onExportReportClick?: () => void;
|
|
204
205
|
onScoreChange?: (scoreState?: ScoreManualUpdateState) => void;
|
|
@@ -28,7 +28,7 @@ var mui_1 = require("fbm-ui/lib/mui");
|
|
|
28
28
|
var react_1 = require("react");
|
|
29
29
|
var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER;
|
|
30
30
|
var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
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;
|
|
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;
|
|
32
32
|
var firstLoad = (0, react_1.useRef)(true);
|
|
33
33
|
var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
34
34
|
var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
|
|
@@ -79,7 +79,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
79
79
|
backgroundRepeat: 'no-repeat',
|
|
80
80
|
backgroundPosition: 'center top',
|
|
81
81
|
paddingTop: (collection === null || collection === void 0 ? void 0 : collection.length) > 0 ? 0 : 3,
|
|
82
|
-
} }, { 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.Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {}) }))] }))] }));
|
|
82
|
+
} }, { 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.Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, { isExportPdf: isExportPdf }) }))] }))] }));
|
|
83
83
|
}
|
|
84
84
|
}, [
|
|
85
85
|
status,
|
|
@@ -92,6 +92,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
92
92
|
fetchCandidateInfo,
|
|
93
93
|
fetchReportUrl,
|
|
94
94
|
fetchFormResult,
|
|
95
|
+
isExportPdf,
|
|
95
96
|
]);
|
|
96
97
|
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 })));
|
|
97
98
|
});
|
|
@@ -50,7 +50,7 @@ var immutability_helper_1 = __importDefault(require("immutability-helper"));
|
|
|
50
50
|
var react_2 = require("react");
|
|
51
51
|
var STEP_NO_ANSWER = ai_report_1.INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = ai_report_1.INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
|
|
52
52
|
var QuestionItem = function (props) {
|
|
53
|
-
var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities, workplaceEvaluation = _c.workplaceEvaluation, workplaceName = _c.workplaceName;
|
|
53
|
+
var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities, workplaceEvaluation = _c.workplaceEvaluation, workplaceName = _c.workplaceName, isExportPdf = props.isExportPdf;
|
|
54
54
|
var _d = __read((0, react_2.useState)(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
|
|
55
55
|
var _e = (0, global_store_1.useAiReportStore)(function (store) { return [
|
|
56
56
|
store.reportResult,
|
|
@@ -121,7 +121,7 @@ var QuestionItem = function (props) {
|
|
|
121
121
|
minWidth: 12,
|
|
122
122
|
} }, { children: index + 1 })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: ThemeProvider_1.theme.palette.primary.main }, { children: desc }))] })), (0, jsx_runtime_1.jsxs)(styled_2.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(BodyImages_1.default, { reviewImgs: reviewImgs }), (0, jsx_runtime_1.jsx)("img", { className: "MuiSvgIcon-root", src: "//webcdn.fbmms.cn/assets/OYDO/1-c2bdx4v1upzLDJ4Ko-c", alt: "", width: 18, height: 11 }), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isSingleChoice && (0, jsx_runtime_1.jsx)(SingleChoice_1.default, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
|
|
123
123
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ mt: 1, fontSize: 14, color: ThemeProvider_1.theme.palette.primary.main }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), (0, jsx_runtime_1.jsxs)(styled_2.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)("img", { className: "MuiSvgIcon-root", src: "//webcdn.fbmms.cn/assets/OYDO/1-c2bdx4v1upzLDJ4Ko-c", alt: "", width: 18, height: 11 }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
|
|
124
|
-
})] })), (0, jsx_runtime_1.jsx)(styled_1.Video, { src: videoUrl, controls: true })] })), isExistWeight && status !== STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore, "\u5206"] })) }))] }))), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ mt: 3, spacing: 1, component: mui_1.Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore, "\u5206"] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index, disabledScore: isSingleChoice }), abilities.map(function (v) { return ((0, react_1.createElement)(Workplaces_1.default, __assign({}, v, { key: v.token }))); }), workplaceEvaluation && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", sx: {
|
|
124
|
+
})] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ position: "relative" }, { children: [(0, jsx_runtime_1.jsx)(styled_1.Video, { src: videoUrl, controls: true }), isExportPdf && (0, jsx_runtime_1.jsx)(styled_1.ExportButton, __assign({ href: videoUrl }, { children: "\u67E5\u770B\u89C6\u9891" }))] }))] })), isExistWeight && status !== STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore, "\u5206"] })) }))] }))), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ mt: 3, spacing: 1, component: mui_1.Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore, "\u5206"] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index, disabledScore: isSingleChoice }), abilities.map(function (v) { return ((0, react_1.createElement)(Workplaces_1.default, __assign({}, v, { key: v.token }))); }), workplaceEvaluation && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", sx: {
|
|
125
125
|
color: '#424242',
|
|
126
126
|
}, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] })))] }), token));
|
|
127
127
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface VideoQuestionProps {
|
|
3
|
+
isExportPdf?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: React.NamedExoticComponent<VideoQuestionProps>;
|
|
6
|
+
export default _default;
|
|
@@ -19,9 +19,11 @@ var QuestionItem_1 = __importDefault(require("./QuestionItem"));
|
|
|
19
19
|
var AiHeaderTitle_1 = __importDefault(require("../../../../components/AiHeaderTitle"));
|
|
20
20
|
var global_store_1 = require("../../../../store/ai-report/global-store");
|
|
21
21
|
var fbm_ui_1 = require("fbm-ui");
|
|
22
|
-
var
|
|
22
|
+
var react_1 = require("react");
|
|
23
|
+
var VideoQuestion = function (_a) {
|
|
24
|
+
var _b = _a.isExportPdf, isExportPdf = _b === void 0 ? false : _b;
|
|
23
25
|
var reportResult = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.operableButtons]; }).reportResult;
|
|
24
26
|
var steps = (reportResult || {}).steps;
|
|
25
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ id: "report-question", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(AiHeaderTitle_1.default, { name: "\u89C6\u9891\u9898" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 3 }, { children: steps && steps.length > 0 ? (steps === null || steps === void 0 ? void 0 : steps.map(function (item, index) { return (0, jsx_runtime_1.jsx)(QuestionItem_1.default, __assign({ index: index }, item), item.token); })) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Empty, { src: "//public-static-assets.oss-cn-beijing.aliyuncs.com/img/empty.png", desc: "\u6682\u65E0\u9898\u76EE" })) }))] })));
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ id: "report-question", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(AiHeaderTitle_1.default, { name: "\u89C6\u9891\u9898" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 3 }, { children: steps && steps.length > 0 ? (steps === null || steps === void 0 ? void 0 : steps.map(function (item, index) { return (0, jsx_runtime_1.jsx)(QuestionItem_1.default, __assign({ index: index }, item, { isExportPdf: isExportPdf }), item.token); })) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Empty, { src: "//public-static-assets.oss-cn-beijing.aliyuncs.com/img/empty.png", desc: "\u6682\u65E0\u9898\u76EE" })) }))] })));
|
|
26
28
|
};
|
|
27
|
-
exports.default = VideoQuestion;
|
|
29
|
+
exports.default = (0, react_1.memo)(VideoQuestion);
|
|
@@ -33,6 +33,7 @@ export declare const Podium: import("@emotion/styled").StyledComponent<import("f
|
|
|
33
33
|
children?: import("react").ReactNode;
|
|
34
34
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
35
35
|
export declare const Video: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, {}>;
|
|
36
|
+
export declare const ExportButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
|
|
36
37
|
export declare const BeatProgressBar: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
37
38
|
children?: import("react").ReactNode;
|
|
38
39
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.BeatProgressBar = exports.Video = exports.Podium = exports.ReportEvaluate = exports.ReportTag = exports.DinTypography = exports.ReportAvatar = exports.ReportLabel = exports.ReportBadge = exports.ReportHeader = void 0;
|
|
14
|
+
exports.BeatProgressBar = exports.ExportButton = exports.Video = exports.Podium = exports.ReportEvaluate = exports.ReportTag = exports.DinTypography = exports.ReportAvatar = exports.ReportLabel = exports.ReportBadge = exports.ReportHeader = void 0;
|
|
15
15
|
var fbm_ui_1 = require("fbm-ui");
|
|
16
16
|
exports.ReportHeader = (0, fbm_ui_1.styled)(fbm_ui_1.Box)({
|
|
17
17
|
height: '595px',
|
|
@@ -117,6 +117,22 @@ exports.Video = (0, fbm_ui_1.styled)('video')(function (_a) {
|
|
|
117
117
|
boxShadow: theme.shadows[6],
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
|
+
exports.ExportButton = (0, fbm_ui_1.styled)('a')({
|
|
121
|
+
width: 96,
|
|
122
|
+
height: 40,
|
|
123
|
+
background: 'rgba(0,0,0,0.2)',
|
|
124
|
+
borderRadius: 20,
|
|
125
|
+
border: '1px solid rgba(255,255,255,0.0418)',
|
|
126
|
+
display: 'flex',
|
|
127
|
+
alignItems: 'center',
|
|
128
|
+
justifyContent: 'center',
|
|
129
|
+
textDecoration: 'none',
|
|
130
|
+
fontSize: 16,
|
|
131
|
+
color: '#FFFFFF',
|
|
132
|
+
position: 'absolute',
|
|
133
|
+
top: 'calc(50% - 20px) ',
|
|
134
|
+
left: 'calc(50% - 48px)',
|
|
135
|
+
});
|
|
120
136
|
exports.BeatProgressBar = (0, fbm_ui_1.styled)(fbm_ui_1.Box)({
|
|
121
137
|
width: 169,
|
|
122
138
|
height: 16,
|
|
@@ -191,6 +191,7 @@ export interface AiReportProps {
|
|
|
191
191
|
showAbilitiesDetails?: boolean;
|
|
192
192
|
showAiDimension?: boolean;
|
|
193
193
|
canEditAiDimension?: boolean;
|
|
194
|
+
isExportPdf?: boolean;
|
|
194
195
|
operableButtons?: Array<'export' | 'refresh' | 'scoreRank' | 'abilities' | 'sendReminder'>;
|
|
195
196
|
stepToken?: string;
|
|
196
197
|
interviewCheat?: InterviewCheat;
|
|
@@ -12,6 +12,7 @@ export declare const useAiReportV2: (props: AiReportProps) => {
|
|
|
12
12
|
showAbilitiesDetails?: boolean | undefined;
|
|
13
13
|
showAiDimension?: boolean | undefined;
|
|
14
14
|
canEditAiDimension?: boolean | undefined;
|
|
15
|
+
isExportPdf?: boolean | undefined;
|
|
15
16
|
operableButtons?: ("export" | "refresh" | "scoreRank" | "abilities" | "sendReminder")[] | undefined;
|
|
16
17
|
stepToken?: string | undefined;
|
|
17
18
|
interviewCheat?: import("./interface").InterviewCheat | undefined;
|
|
@@ -20,6 +20,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
20
20
|
rank: number;
|
|
21
21
|
} | undefined;
|
|
22
22
|
customInterviewDimRankMap?: import("@/modules/ai-report/interface").CustomInterviewDimRankMap | undefined;
|
|
23
|
+
reloadReportVersion?: (() => void) | undefined;
|
|
23
24
|
onLoad?: ((values: import("@/modules/ai-report/interface").AiReportLoadedValues) => void) | undefined;
|
|
24
25
|
onExportReportClick?: (() => void) | undefined;
|
|
25
26
|
onScoreChange?: ((scoreState?: import("@/modules/ai-report/interface").ScoreManualUpdateState | undefined) => void) | undefined;
|
|
@@ -47,6 +48,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
47
48
|
rank: number;
|
|
48
49
|
} | undefined;
|
|
49
50
|
customInterviewDimRankMap?: import("@/modules/ai-report/interface").CustomInterviewDimRankMap | undefined;
|
|
51
|
+
reloadReportVersion?: (() => void) | undefined;
|
|
50
52
|
onLoad?: ((values: import("@/modules/ai-report/interface").AiReportLoadedValues) => void) | undefined;
|
|
51
53
|
onExportReportClick?: (() => void) | undefined;
|
|
52
54
|
onScoreChange?: ((scoreState?: import("@/modules/ai-report/interface").ScoreManualUpdateState | undefined) => void) | undefined;
|
|
@@ -74,6 +76,7 @@ export declare const useAiReportStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
|
74
76
|
rank: number;
|
|
75
77
|
} | undefined;
|
|
76
78
|
customInterviewDimRankMap?: import("@/modules/ai-report/interface").CustomInterviewDimRankMap | undefined;
|
|
79
|
+
reloadReportVersion?: (() => void) | undefined;
|
|
77
80
|
onLoad?: ((values: import("@/modules/ai-report/interface").AiReportLoadedValues) => void) | undefined;
|
|
78
81
|
onExportReportClick?: (() => void) | undefined;
|
|
79
82
|
onScoreChange?: ((scoreState?: import("@/modules/ai-report/interface").ScoreManualUpdateState | undefined) => void) | undefined;
|