eli-video-interview 1.2.42-alpha.1 → 1.2.42-alpha.10
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 +4 -3
- package/esm/components/Charts/const.js +5 -5
- package/esm/modules/ai-report/interface.d.ts +6 -0
- package/esm/modules/ai-report-v2/Root.js +19 -9
- package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +15 -1
- package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.js +12 -10
- package/esm/modules/ai-report-v2/components/AIEvaluate/index.js +2 -2
- package/esm/modules/ai-report-v2/components/Candidate/Candidate.js +14 -3
- package/esm/modules/ai-report-v2/components/Candidate/Podium.js +1 -1
- package/esm/modules/ai-report-v2/components/Form/Form.js +6 -4
- package/esm/modules/ai-report-v2/components/Form/Forms.d.ts +3 -3
- package/esm/modules/ai-report-v2/components/Form/Forms.js +4 -4
- package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.d.ts +3 -1
- package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +8 -3
- package/esm/modules/ai-report-v2/components/VideoQuestion/Abilities.js +1 -1
- package/esm/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +14 -4
- package/esm/modules/ai-report-v2/components/VideoQuestion/ScoreSlider.js +1 -1
- package/esm/modules/ai-report-v2/components/styled.d.ts +1 -1
- package/esm/modules/ai-report-v2/components/styled.js +11 -5
- package/esm/modules/ai-report-v2/interface.d.ts +7 -1
- package/esm/modules/ai-report-v2/useAiReport.d.ts +4 -1
- package/esm/modules/ai-report-v2/useAiReport.js +3 -1
- package/esm/modules/ai-report-v2/useAiReportVersion.d.ts +4 -0
- package/esm/modules/ai-report-v2/useAiReportVersion.js +34 -0
- package/esm/services/ai-report.d.ts +1 -0
- package/esm/services/ai-report.js +1 -0
- package/lib/components/AiHeaderTitle/index.js +3 -2
- package/lib/components/Charts/const.js +5 -5
- package/lib/modules/ai-report/interface.d.ts +6 -0
- package/lib/modules/ai-report-v2/Root.js +19 -9
- package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +15 -1
- package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.js +12 -10
- package/lib/modules/ai-report-v2/components/AIEvaluate/index.js +2 -2
- package/lib/modules/ai-report-v2/components/Candidate/Candidate.js +12 -1
- package/lib/modules/ai-report-v2/components/Candidate/Podium.js +1 -1
- package/lib/modules/ai-report-v2/components/Form/Form.js +6 -4
- package/lib/modules/ai-report-v2/components/Form/Forms.d.ts +3 -3
- package/lib/modules/ai-report-v2/components/Form/Forms.js +4 -4
- package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.d.ts +3 -1
- package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +10 -5
- package/lib/modules/ai-report-v2/components/VideoQuestion/Abilities.js +1 -1
- package/lib/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +13 -3
- package/lib/modules/ai-report-v2/components/VideoQuestion/ScoreSlider.js +1 -1
- package/lib/modules/ai-report-v2/components/styled.d.ts +1 -1
- package/lib/modules/ai-report-v2/components/styled.js +11 -5
- package/lib/modules/ai-report-v2/interface.d.ts +7 -1
- package/lib/modules/ai-report-v2/useAiReport.d.ts +4 -1
- package/lib/modules/ai-report-v2/useAiReport.js +6 -1
- package/lib/modules/ai-report-v2/useAiReportVersion.d.ts +4 -0
- package/lib/modules/ai-report-v2/useAiReportVersion.js +38 -0
- package/lib/services/ai-report.d.ts +1 -0
- package/lib/services/ai-report.js +3 -1
- package/package.json +1 -1
|
@@ -10,17 +10,18 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { DinTypography } from "../../modules/ai-report-v2/components/styled";
|
|
13
14
|
import SvgIcon from "../SvgIcon";
|
|
14
|
-
import { Box
|
|
15
|
+
import { Box } from 'fbm-ui';
|
|
15
16
|
var AiHeaderTitle = function (_a) {
|
|
16
17
|
var name = _a.name;
|
|
17
18
|
return (_jsxs(Box, __assign({ display: "inline-flex", sx: {
|
|
18
19
|
pl: 3,
|
|
19
20
|
color: '#009D56',
|
|
20
|
-
pt:
|
|
21
|
+
pt: 1,
|
|
21
22
|
background: 'url(//webcdn.fbmms.cn/assets/yt-b/yf2BqqIlr8Xtb8N2o44t1) no-repeat center center',
|
|
22
23
|
backgroundSize: 'contain',
|
|
23
24
|
width: 24 + (56 / 4) * name.length + 84,
|
|
24
|
-
} }, { children: [_jsx(SvgIcon, { name: "AI" }), _jsx(
|
|
25
|
+
} }, { children: [_jsx(SvgIcon, { name: "AI" }), _jsx(DinTypography, __assign({ variant: "h6", color: "inherit" }, { children: name }))] })));
|
|
25
26
|
};
|
|
26
27
|
export default AiHeaderTitle;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export var levelMapping = {
|
|
2
2
|
3: {
|
|
3
3
|
text: '优秀',
|
|
4
|
-
itemColor: '
|
|
5
|
-
color: 'rgb(
|
|
4
|
+
itemColor: '#00D99D',
|
|
5
|
+
color: 'rgb(255, 153, 3)',
|
|
6
6
|
},
|
|
7
7
|
2: {
|
|
8
8
|
text: '适中',
|
|
9
9
|
itemColor: 'rgb(166, 234, 193)',
|
|
10
|
-
color: 'rgba(0,
|
|
10
|
+
color: 'rgba(0, 217, 157)',
|
|
11
11
|
},
|
|
12
12
|
1: {
|
|
13
13
|
text: '欠佳',
|
|
14
|
-
itemColor: '
|
|
15
|
-
color: 'rgb(
|
|
14
|
+
itemColor: '#00D99D',
|
|
15
|
+
color: 'rgb(98, 156, 255)',
|
|
16
16
|
},
|
|
17
17
|
};
|
|
@@ -25,6 +25,7 @@ export interface Collection {
|
|
|
25
25
|
level: number;
|
|
26
26
|
rank: number;
|
|
27
27
|
total: number;
|
|
28
|
+
avgScore: number;
|
|
28
29
|
}
|
|
29
30
|
export interface AnalysisResult {
|
|
30
31
|
text: string;
|
|
@@ -44,6 +45,9 @@ export interface AnalysisResult {
|
|
|
44
45
|
}
|
|
45
46
|
export interface Answer {
|
|
46
47
|
videoUrl: string;
|
|
48
|
+
media: {
|
|
49
|
+
durationTime: number;
|
|
50
|
+
};
|
|
47
51
|
analysisResult: AnalysisResult;
|
|
48
52
|
}
|
|
49
53
|
export interface Ability {
|
|
@@ -58,6 +62,8 @@ export interface Ability {
|
|
|
58
62
|
}
|
|
59
63
|
export interface ScoreInfo {
|
|
60
64
|
weight: number | string;
|
|
65
|
+
workplaceName: string;
|
|
66
|
+
workplaceEvaluation: string;
|
|
61
67
|
originScore: number;
|
|
62
68
|
finalScore: number;
|
|
63
69
|
score: number;
|
|
@@ -20,14 +20,13 @@ import { useAiReportStore } from "../../store/ai-report/global-store";
|
|
|
20
20
|
import { useRequest } from 'ahooks';
|
|
21
21
|
import { Box, Button, Paper, Typography } from 'fbm-ui';
|
|
22
22
|
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
23
|
-
var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER
|
|
23
|
+
var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER;
|
|
24
24
|
var AiReportRoot = forwardRef(function (props, ref) {
|
|
25
|
-
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick,
|
|
25
|
+
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, fetchFormResult = props.fetchFormResult, fetchCandidateInfo = props.fetchCandidateInfo;
|
|
26
26
|
var firstLoad = useRef(true);
|
|
27
|
-
// @ts-ignore
|
|
28
27
|
var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
29
|
-
|
|
30
|
-
var
|
|
28
|
+
var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
|
|
29
|
+
var _c = useRequest(function () { return PostAiInterviewResult([token]); }, {
|
|
31
30
|
manual: true,
|
|
32
31
|
onSuccess: function (_a) {
|
|
33
32
|
var list = _a.data.list;
|
|
@@ -45,7 +44,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
45
44
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
|
|
46
45
|
}
|
|
47
46
|
},
|
|
48
|
-
}), data =
|
|
47
|
+
}), data = _c.data, loading = _c.loading, postAiInterviewResult = _c.run;
|
|
49
48
|
var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
|
|
50
49
|
var handleRefreshSuccess = useCallback(function () {
|
|
51
50
|
postAiInterviewResult();
|
|
@@ -61,7 +60,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
61
60
|
useEffect(function () {
|
|
62
61
|
updateState(props);
|
|
63
62
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
|
-
}, [props]);
|
|
63
|
+
}, [JSON.stringify(props)]);
|
|
65
64
|
var aiReportResult = useMemo(function () {
|
|
66
65
|
if (status === NO_ANSWER) {
|
|
67
66
|
return (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [_jsx(Box, { children: _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ style: { marginTop: '2px' } }, { children: _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
|
|
@@ -73,9 +72,20 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
73
72
|
backgroundSize: 'contain',
|
|
74
73
|
backgroundRepeat: 'no-repeat',
|
|
75
74
|
backgroundPosition: 'center top',
|
|
76
|
-
|
|
75
|
+
paddingTop: (collection === null || collection === void 0 ? void 0 : collection.length) > 0 ? 0 : 3,
|
|
76
|
+
} }, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ReportHeader, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status })), _jsx(FormReport, { fetchFormResult: fetchFormResult }), _jsx(Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: _jsx(VideoQuestion, {}) }))] })));
|
|
77
77
|
}
|
|
78
|
-
}, [
|
|
78
|
+
}, [
|
|
79
|
+
status,
|
|
80
|
+
operableButtons,
|
|
81
|
+
reminderSent,
|
|
82
|
+
onSendReminderClick,
|
|
83
|
+
collection === null || collection === void 0 ? void 0 : collection.length,
|
|
84
|
+
customScore,
|
|
85
|
+
handleRefreshSuccess,
|
|
86
|
+
fetchCandidateInfo,
|
|
87
|
+
fetchFormResult,
|
|
88
|
+
]);
|
|
79
89
|
return (_jsx(Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '618px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
80
90
|
});
|
|
81
91
|
AiReportRoot.displayName = 'AiReportRoot';
|
|
@@ -74,7 +74,21 @@ var Evaluate = function (_a) {
|
|
|
74
74
|
boxShadow: ' 0px 2px 6px 0px rgba(91,108,95,0.15)',
|
|
75
75
|
padding: '8px 24px',
|
|
76
76
|
borderRadius: 1.5,
|
|
77
|
-
} }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(
|
|
77
|
+
} }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Box, __assign({ sx: {
|
|
78
|
+
position: 'relative',
|
|
79
|
+
'&:after': {
|
|
80
|
+
position: 'absolute',
|
|
81
|
+
width: 'calc(100% - 2px)',
|
|
82
|
+
background: ' linear-gradient( 90deg, #FFE5A9 0%, #FFB300 100%)',
|
|
83
|
+
left: -3,
|
|
84
|
+
bottom: 2,
|
|
85
|
+
height: 5,
|
|
86
|
+
content: '""',
|
|
87
|
+
color: 'rgba(0, 0, 0, 0.54)',
|
|
88
|
+
display: 'inline-block',
|
|
89
|
+
margin: '0 4px',
|
|
90
|
+
},
|
|
91
|
+
} }, { children: _jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", zIndex: 1, sx: { position: 'relative', zIndex: 1 } }, { children: title })) })), canEdit && (_jsx(IconButton, __assign({ onClick: handleModeChange }, { children: _jsx(EditIcon, {}) })))] })), internalMode === 'edit' && (_jsxs(Box, __assign({ width: 1, pr: 2 }, { children: [_jsx(FormItem, { sx: { height: 'auto', pr: 0 }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, onChange: handleChange }), _jsxs(Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [_jsx(Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
|
|
78
92
|
handleModeChange();
|
|
79
93
|
// setContent(evaluations?.join('\n'));
|
|
80
94
|
} }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ size: "medium", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && (_jsx(Typography, __assign({ variant: "body2", color: "textSecondary", sx: { whiteSpace: 'pre-wrap' } }, { children: content })))] })));
|
|
@@ -83,7 +83,6 @@ function isInPath(x, y, tx, ty, ctx) {
|
|
|
83
83
|
var drawTop = function (layout, ctx) {
|
|
84
84
|
// 设置全局样式
|
|
85
85
|
var leftLableWidth = layout.leftLableWidth, height = layout.height, topLableHeight = layout.topLableHeight;
|
|
86
|
-
ctx.font = '16px sans-serif';
|
|
87
86
|
var offset = leftLableWidth;
|
|
88
87
|
levelOrder.forEach(function (level, i) {
|
|
89
88
|
var _a = levelConf[level], width = _a.width, gradient = _a.gradient, label = _a.label, fontColor = _a.fontColor;
|
|
@@ -97,17 +96,16 @@ var drawTop = function (layout, ctx) {
|
|
|
97
96
|
var labelWidth = measureTextWidth(ctx, label);
|
|
98
97
|
ctx.fillStyle = fontColor;
|
|
99
98
|
ctx.fillText(label, offset + width / 2 - labelWidth / 2, 18);
|
|
100
|
-
console.log(offset);
|
|
101
99
|
// 绘制垂直虚线
|
|
102
|
-
drawVerticalDashedLine(ctx, offset - 1, 0, height + topLableHeight -
|
|
100
|
+
drawVerticalDashedLine(ctx, offset - 1, 0, height + topLableHeight - 54, 2, 2);
|
|
103
101
|
// 绘制分数文本
|
|
104
102
|
ctx.fillStyle = '#4CAF50';
|
|
105
|
-
ctx.fillText("".concat(levelOrderScore[i]), offset - (i === 0 ?
|
|
103
|
+
ctx.fillText("".concat(levelOrderScore[i]), offset - (i === 0 ? 5 : 9), height + topLableHeight - 40);
|
|
106
104
|
offset += width + 1;
|
|
107
105
|
// 绘制结束的虚线和文本 '100'
|
|
108
106
|
if (i === levelOrder.length - 1) {
|
|
109
|
-
drawVerticalDashedLine(ctx, offset - 2, 0, height + topLableHeight -
|
|
110
|
-
ctx.fillText('100', offset - 2 -
|
|
107
|
+
drawVerticalDashedLine(ctx, offset - 2, 0, height + topLableHeight - 54, 2, 2);
|
|
108
|
+
ctx.fillText('100', offset - 2 - 10, height + topLableHeight - 40);
|
|
111
109
|
}
|
|
112
110
|
});
|
|
113
111
|
};
|
|
@@ -168,12 +166,14 @@ var drawScore = function (layout, ctx, config, rect, score) {
|
|
|
168
166
|
var borderRadius = 12;
|
|
169
167
|
drawRoundedRect(rect.x, rect.y, rect.width, rect.height, borderRadius, true, false, ctx);
|
|
170
168
|
ctx.fillStyle = score < 10 ? '#0D67FF' : '#fff';
|
|
171
|
-
ctx
|
|
169
|
+
var scoreWidth = measureTextWidth(ctx, "".concat(score));
|
|
170
|
+
ctx.fillText("".concat(score), layout.leftLableWidth + rect.width + (score < 10 ? 4 : -scoreWidth - 4), rect.y + 18);
|
|
172
171
|
};
|
|
173
172
|
var draw = function (layout, dimensions, pathRef, ctx) {
|
|
173
|
+
ctx.font = '16px sans-serif';
|
|
174
174
|
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
|
175
|
-
drawTop(layout, ctx);
|
|
176
175
|
dimensions.forEach(function (v, i) {
|
|
176
|
+
var _a;
|
|
177
177
|
var config = getLevel(v.score);
|
|
178
178
|
// 绘制圆角矩形
|
|
179
179
|
var borderRadius = 12;
|
|
@@ -184,20 +184,22 @@ var draw = function (layout, dimensions, pathRef, ctx) {
|
|
|
184
184
|
drawRoundedRect(x, y, MAX_WIDTH, MAX_HEIGHT, borderRadius, true, false, ctx);
|
|
185
185
|
var endPointY = 65 + layout.itemSpacing * i;
|
|
186
186
|
drawLable(v.name, 10, endPointY, ctx);
|
|
187
|
+
var score = (_a = v.score) !== null && _a !== void 0 ? _a : (v.score < 4 ? 4 : v.score);
|
|
187
188
|
drawScore(layout, ctx, config, {
|
|
188
189
|
x: layout.leftLableWidth,
|
|
189
190
|
y: y,
|
|
190
|
-
width: MAX_WIDTH * (
|
|
191
|
+
width: MAX_WIDTH * (score / 100),
|
|
191
192
|
height: MAX_HEIGHT,
|
|
192
193
|
}, v.score);
|
|
193
194
|
});
|
|
195
|
+
drawTop(layout, ctx);
|
|
194
196
|
};
|
|
195
197
|
var Graph = function (_a) {
|
|
196
198
|
var _b = _a.items, items = _b === void 0 ? [] : _b;
|
|
197
199
|
var ref = useRef(null);
|
|
198
200
|
var pathRef = useRef([]);
|
|
199
201
|
var _c = __read(useState(), 2), ctx = _c[0], setCtx = _c[1];
|
|
200
|
-
var height = useMemo(function () { return 36 * items.length +
|
|
202
|
+
var height = useMemo(function () { return 36 * items.length + 50 + 35; }, [items]);
|
|
201
203
|
useEffect(function () {
|
|
202
204
|
if (items.length === 0)
|
|
203
205
|
return;
|
|
@@ -20,10 +20,10 @@ var Index = function () {
|
|
|
20
20
|
var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
|
|
21
21
|
var items = collection.map(function (item) { return ({
|
|
22
22
|
name: item.name,
|
|
23
|
-
score: item.
|
|
23
|
+
score: item.avgScore,
|
|
24
24
|
}); });
|
|
25
25
|
if (!showAiDimension)
|
|
26
26
|
return null;
|
|
27
|
-
return (_jsx(Box, __assign({ id: "report-evaluate", px: 2,
|
|
27
|
+
return (_jsx(Box, __assign({ id: "report-evaluate", px: 2, width: 1 }, { children: _jsx(Box, __assign({ component: Paper, elevation: 0, bgcolor: "transparent", mb: 2, pb: 2 }, { children: _jsxs(Stack, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Box, __assign({ mt: 2, flex: 1 }, { children: _jsx(Graph, { items: items }) })), _jsx(Report, {})] })), (reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaceEvaluation) && (_jsx(Evaluate, { token: "", canEdit: canEditAiDimension, evaluations: reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaceEvaluation, title: "\u8BC4\u4EF7\u5185\u5BB9", field: "evaluations", mode: "show" }))] }) })) })));
|
|
28
28
|
};
|
|
29
29
|
export default Index;
|
|
@@ -27,11 +27,16 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
27
27
|
};
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
29
|
import { DinTypography, ReportAvatar, ReportTag } from '../styled';
|
|
30
|
-
import {
|
|
30
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
31
|
+
import { getSecondToTime } from "../../../../utils/utils";
|
|
32
|
+
import { Box, Message, Typography } from 'fbm-ui';
|
|
31
33
|
import { Stack } from 'fbm-ui/lib/mui';
|
|
32
|
-
import { memo, useEffect, useState } from 'react';
|
|
34
|
+
import { memo, useEffect, useMemo, useState } from 'react';
|
|
33
35
|
var Form = function (_a) {
|
|
34
36
|
var fetchCandidateInfo = _a.fetchCandidateInfo;
|
|
37
|
+
var reportResult = useAiReportStore(function (store) { return [store.reportResult]; }).reportResult;
|
|
38
|
+
var steps = (reportResult || {}).steps;
|
|
39
|
+
var duration = useMemo(function () { return getSecondToTime((steps === null || steps === void 0 ? void 0 : steps.reduce(function (acc, cur) { return acc + cur.answer.media.durationTime; }, 0)) || 0); }, [steps]);
|
|
35
40
|
var _b = __read(useState({ name: '', mobile: '', processName: '', positionName: '', avatar: '', tags: [] }), 2), data = _b[0], setData = _b[1];
|
|
36
41
|
useEffect(function () {
|
|
37
42
|
if (fetchCandidateInfo) {
|
|
@@ -39,6 +44,12 @@ var Form = function (_a) {
|
|
|
39
44
|
}
|
|
40
45
|
}, [fetchCandidateInfo]);
|
|
41
46
|
var name = data.name, mobile = data.mobile, positionName = data.positionName, avatar = data.avatar, tags = data.tags;
|
|
42
|
-
return (_jsxs(Stack, __assign({ direction: "row" }, { children: [_jsx(ReportAvatar, { sx: { mx: 3 }, avatar: avatar }), _jsxs(Stack, __assign({ spacing: 1 }, { children: [_jsx(DinTypography, __assign({ sx: { fontSize: 18 } }, { children: positionName })), _jsxs(Typography, __assign({ variant: "body1" }, { children: [name, " ", mobile] })), _jsx(
|
|
47
|
+
return (_jsxs(Stack, __assign({ direction: "row", minHeight: 221, mt: 13.25 }, { children: [_jsx(ReportAvatar, { sx: { mx: 3 }, avatar: avatar }), _jsxs(Stack, __assign({ spacing: 1 }, { children: [_jsx(DinTypography, __assign({ sx: { fontSize: 18 } }, { children: positionName })), _jsxs(Typography, __assign({ variant: "body1" }, { children: [name, " ", mobile] })), _jsx(Box, __assign({ sx: {
|
|
48
|
+
display: 'flex',
|
|
49
|
+
flexWrap: 'wrap',
|
|
50
|
+
gap: '8px',
|
|
51
|
+
alignItems: 'flex-start',
|
|
52
|
+
width: '450px',
|
|
53
|
+
} }, { children: tags === null || tags === void 0 ? void 0 : tags.map(function (tag) { return (_jsx(ReportTag, { children: tag.name }, tag.token)); }) })), _jsxs(Typography, { children: ["\u9762\u8BD5\u65F6\u957F\uFF1A", duration] })] }))] })));
|
|
43
54
|
};
|
|
44
55
|
export default memo(Form);
|
|
@@ -45,6 +45,6 @@ var Form = function () {
|
|
|
45
45
|
setText('');
|
|
46
46
|
}
|
|
47
47
|
}, [score, reportRank, scoreRankIntervals, progress]);
|
|
48
|
-
return (_jsx(Podium, { children: _jsxs(Stack, __assign({ direction: "row", position: "relative", bottom: -128, left: 88 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", justifyContent: "center", width: 300 }, { children: [_jsx(Typography, __assign({ sx: { fontSize: 100, fontWeight: 'bold', lineHeight: 1 }, color: "inherit" }, { children: score })), _jsx(Typography, __assign({ variant: "h5", color: "inherit", sx: { fontSize: 30, fontWeight: 'bold', alignSelf: 'flex-end' } }, { children: "\u5206" }))] })), (reportRank === null || reportRank === void 0 ? void 0 : reportRank.total) !== 0 && (_jsxs(Stack, __assign({ spacing: 1 }, { children: [_jsxs(Typography, __assign({ color: "inherit", fontWeight: 500 }, { children: [text, "\u00A0"] })), _jsx(BeatProgressBar, { children: _jsx("div", { className: "progress-bar-fill", style: { width: "".concat(progress, "%") } }) })] })))] })) }));
|
|
48
|
+
return (_jsx(Podium, { children: _jsxs(Stack, __assign({ direction: "row", position: "relative", bottom: -128, left: 88 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", justifyContent: "center", width: 300 }, { children: [_jsx(Typography, __assign({ sx: { fontSize: 100, fontWeight: 'bold', lineHeight: 1 }, color: "inherit" }, { children: score })), _jsx(Typography, __assign({ variant: "h5", color: "inherit", sx: { fontSize: 30, fontWeight: 'bold', alignSelf: 'flex-end' } }, { children: "\u5206" }))] })), (reportRank === null || reportRank === void 0 ? void 0 : reportRank.total) !== 0 && (_jsxs(Stack, __assign({ spacing: 1, mt: 6.25 }, { children: [_jsxs(Typography, __assign({ color: "inherit", fontWeight: 500 }, { children: [text, "\u00A0"] })), _jsx(BeatProgressBar, { children: _jsx("div", { className: "progress-bar-fill", style: { width: "".concat(progress, "%") } }) })] })))] })) }));
|
|
49
49
|
};
|
|
50
50
|
export default Form;
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
var _a;
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import { DinTypography } from '../styled';
|
|
14
15
|
import Nps from './Nps';
|
|
15
16
|
import { PhotoProvider, PhotoView } from "../../../../components/react-photo-view";
|
|
16
17
|
import dayjs from 'dayjs';
|
|
@@ -54,15 +55,16 @@ var template = (_a = {},
|
|
|
54
55
|
_a);
|
|
55
56
|
var Form = function (_a) {
|
|
56
57
|
var answers = _a.answers, _b = _a.customProcessName, customProcessName = _b === void 0 ? '资料收集' : _b;
|
|
57
|
-
return (_jsxs(Box, __assign({ component: Paper, m: 3, pt: 2 }, { children: [_jsxs(
|
|
58
|
+
return (_jsxs(Box, __assign({ component: Paper, m: 3, pt: 2 }, { children: [_jsxs(DinTypography, __assign({ variant: "h6", sx: {
|
|
58
59
|
pl: 3,
|
|
60
|
+
pr: 8,
|
|
61
|
+
display: 'inline-block',
|
|
59
62
|
color: '#009D56',
|
|
60
63
|
background: 'url(//webcdn.fbmms.cn/assets/yt-b/yf2BqqIlr8Xtb8N2o44t1) no-repeat center center',
|
|
61
64
|
backgroundSize: 'contain',
|
|
62
|
-
width:
|
|
65
|
+
width: 'auto',
|
|
66
|
+
overflow: 'hidden',
|
|
63
67
|
mb: 2,
|
|
64
|
-
display: 'flex',
|
|
65
|
-
alignItems: 'center',
|
|
66
68
|
} }, { children: [_jsx(EditIcon, {}), customProcessName] })), _jsxs(Stack, __assign({ p: 3, pt: 0 }, { children: [_jsxs(Stack, __assign({ direction: "row", sx: {
|
|
67
69
|
background: '#E5FDE6',
|
|
68
70
|
color: '#009D56',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FormReports } from './interface';
|
|
3
3
|
export interface FormsProps {
|
|
4
|
-
|
|
4
|
+
fetchFormResult: () => Promise<FormReports>;
|
|
5
5
|
}
|
|
6
|
-
declare const Forms: ({
|
|
7
|
-
|
|
6
|
+
declare const Forms: ({ fetchFormResult }: {
|
|
7
|
+
fetchFormResult: any;
|
|
8
8
|
}) => JSX.Element;
|
|
9
9
|
export default Forms;
|
|
@@ -29,17 +29,17 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
29
29
|
import Form from './Form';
|
|
30
30
|
import { useEffect, useState } from 'react';
|
|
31
31
|
var Forms = function (_a) {
|
|
32
|
-
var
|
|
32
|
+
var fetchFormResult = _a.fetchFormResult;
|
|
33
33
|
var _b = __read(useState([]), 2), data = _b[0], setData = _b[1];
|
|
34
34
|
useEffect(function () {
|
|
35
|
-
if (
|
|
36
|
-
|
|
35
|
+
if (fetchFormResult) {
|
|
36
|
+
fetchFormResult()
|
|
37
37
|
.then(function (res) {
|
|
38
38
|
setData(res);
|
|
39
39
|
})
|
|
40
40
|
.catch(console);
|
|
41
41
|
}
|
|
42
|
-
}, [
|
|
42
|
+
}, [fetchFormResult]);
|
|
43
43
|
return (_jsx(_Fragment, { children: data.map(function (item, index) { return (_jsx(Form, __assign({}, item), index)); }) }));
|
|
44
44
|
};
|
|
45
45
|
export default Forms;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CandidateInfo } from '../Candidate/Interface';
|
|
3
3
|
export interface ReportHeaderProps {
|
|
4
|
+
status: number;
|
|
4
5
|
customScore?: number;
|
|
5
6
|
onRefreshSuccess: () => void;
|
|
6
7
|
fetchCandidateInfo: () => Promise<CandidateInfo>;
|
|
7
8
|
}
|
|
8
|
-
declare const ReportHeader: ({ customScore, onRefreshSuccess, fetchCandidateInfo }: {
|
|
9
|
+
declare const ReportHeader: ({ customScore, onRefreshSuccess, fetchCandidateInfo, status }: {
|
|
9
10
|
customScore: any;
|
|
10
11
|
onRefreshSuccess: any;
|
|
11
12
|
fetchCandidateInfo: any;
|
|
13
|
+
status: any;
|
|
12
14
|
}) => JSX.Element;
|
|
13
15
|
export default ReportHeader;
|
|
@@ -29,6 +29,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
29
29
|
import AIEvaluate from '../AIEvaluate';
|
|
30
30
|
import { CandidateReport, PodiumReport } from '../Candidate';
|
|
31
31
|
import { ReportBadge, ReportLabel } from '../styled';
|
|
32
|
+
import { INTERVIEW_STATUS } from "../../../../enum/ai-report";
|
|
32
33
|
import { PostAiInterviewRefresh } from "../../../../services/ai-report";
|
|
33
34
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
34
35
|
import { formatScore } from "../../../../utils/utils";
|
|
@@ -39,7 +40,7 @@ import { Box, Button, IconButton, Message, Popover, Typography } from 'fbm-ui';
|
|
|
39
40
|
import { Stack } from 'fbm-ui/lib/mui';
|
|
40
41
|
import { useEffect, useMemo, useState } from 'react';
|
|
41
42
|
var ReportHeader = function (_a) {
|
|
42
|
-
var customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess, fetchCandidateInfo = _a.fetchCandidateInfo;
|
|
43
|
+
var customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess, fetchCandidateInfo = _a.fetchCandidateInfo, status = _a.status;
|
|
43
44
|
var _b = __read(useState(false), 2), openRefresh = _b[0], setOpenRefresh = _b[1];
|
|
44
45
|
var _c = useAiReportStore(function (store) { return [
|
|
45
46
|
store.token,
|
|
@@ -73,10 +74,14 @@ var ReportHeader = function (_a) {
|
|
|
73
74
|
if (!loading)
|
|
74
75
|
setOpenRefresh(false);
|
|
75
76
|
}, [loading, customScore, score]);
|
|
76
|
-
return (_jsxs(Stack, { children: [model === 'pro' && _jsx(ReportBadge, {}), _jsx(ReportLabel, { level:
|
|
77
|
+
return (_jsxs(Stack, __assign({ position: "relative" }, { children: [model === 'pro' && _jsx(ReportBadge, {}), _jsx(ReportLabel, { level: status === INTERVIEW_STATUS.COMPLETED ? level : 'calculation' }), _jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between", sx: {
|
|
78
|
+
width: 'calc(100% - 180px)',
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
top: 0,
|
|
81
|
+
} }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", pl: 3, py: 3 }, { children: [_jsxs(Typography, __assign({ variant: "caption", sx: {
|
|
77
82
|
color: 'rgba(74, 74, 74, 0.86)',
|
|
78
83
|
} }, { children: ["\u62A5\u544A\u751F\u6210\u65F6\u95F4\uFF1A", dayjs(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(IconButton, __assign({ size: "small", onClick: function () { return setOpenRefresh(true); } }, { children: _jsx(RefreshIcon, { sx: {
|
|
79
84
|
color: '#009908',
|
|
80
|
-
} }) })) })))] })), _jsx(Typography, __assign({ variant: "h5", textAlign: "center", color: "#009D56", sx: { fontFamily: '
|
|
85
|
+
} }) })) })))] })), _jsx(Typography, __assign({ variant: "h5", textAlign: "center", color: "#009D56", sx: { fontFamily: 'MiSans Medium', alignSelf: 'center' } }, { children: "AI \u9762\u8BD5\u62A5\u544A" })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && (_jsx(Button, __assign({ endIcon: _jsx(ShareIcon, {}), variant: "outlined", onClick: onExportReportClick, sx: { borderRadius: 18 } }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), _jsxs(Stack, { children: [fetchCandidateInfo && _jsx(CandidateReport, { fetchCandidateInfo: fetchCandidateInfo }), !fetchCandidateInfo && _jsx(PodiumReport, { score: formatScore(feScore || 0) })] }), _jsx(Stack, __assign({ width: 1, direction: "row" }, { children: _jsx(AIEvaluate, {}) }))] })));
|
|
81
86
|
};
|
|
82
87
|
export default ReportHeader;
|
|
@@ -36,7 +36,7 @@ var Abilities = function (_a) {
|
|
|
36
36
|
return (_jsxs(Box, __assign({ mt: 1 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary", mb: 1 }, { children: "\u5206\u503C\u8BA1\u7B97\u89C4\u5219\uFF1A\u7EFC\u5408\u8BC4\u5206=AI\u8BC4\u5206*\u5355\u9898\u6743\u91CD" })), _jsx(Box, __assign({ mt: 3 }, { children: steps &&
|
|
37
37
|
steps[stepIndex].scoreInfo.abilities.map(function (_a, index) {
|
|
38
38
|
var name = _a.name, originScore = _a.originScore, finalScore = _a.finalScore;
|
|
39
|
-
return (_jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: name })), _jsx(ScoreSlider, { width:
|
|
39
|
+
return (_jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: name })), _jsx(ScoreSlider, { width: 604, disabledScore: disabledScore, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "".concat(disabledScore ? 'off' : 'auto'), onChangeCommitted: function (score) { return handleChangeCommitted(score, index, 'ability'); } })] }, name));
|
|
40
40
|
}) }))] })));
|
|
41
41
|
};
|
|
42
42
|
export default Abilities;
|
|
@@ -41,12 +41,12 @@ import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
|
41
41
|
import { formatScore, highlighKeywords } from "../../../../utils/utils";
|
|
42
42
|
import { Box, Button, Typography } from 'fbm-ui';
|
|
43
43
|
import { theme } from 'fbm-ui/lib/components/ThemeProvider';
|
|
44
|
-
import { Stack } from 'fbm-ui/lib/mui';
|
|
44
|
+
import { Paper, Stack } from 'fbm-ui/lib/mui';
|
|
45
45
|
import update from 'immutability-helper';
|
|
46
46
|
import { useCallback, useMemo, useState } from 'react';
|
|
47
47
|
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;
|
|
48
48
|
var QuestionItem = function (props) {
|
|
49
|
-
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;
|
|
49
|
+
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;
|
|
50
50
|
var _d = __read(useState(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
|
|
51
51
|
var _e = useAiReportStore(function (store) { return [store.reportResult, store.stepToken, store.operableButtons, store.showAbilitiesDetails]; }), reportResult = _e.reportResult, stepToken = _e.stepToken, operableButtons = _e.operableButtons, showAbilitiesDetails = _e.showAbilitiesDetails, updateState = _e.updateState, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange, onStepChange = _e.onStepChange;
|
|
52
52
|
var steps = (reportResult || {}).steps;
|
|
@@ -108,8 +108,18 @@ var QuestionItem = function (props) {
|
|
|
108
108
|
return (_jsxs(Stack, __assign({ sx: {
|
|
109
109
|
padding: '16px 24px',
|
|
110
110
|
mt: 2,
|
|
111
|
-
}, onClick: handleClickItem }, { children: [_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 4 }, { children: [_jsxs(Stack, __assign({ flex: 1 }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5 }, { children: [_jsx(Typography, __assign({ variant: "body2", sx: {
|
|
111
|
+
}, onClick: handleClickItem }, { children: [_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 4 }, { children: [_jsxs(Stack, __assign({ flex: 1 }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5 }, { children: [_jsx(Typography, __assign({ variant: "body2", sx: {
|
|
112
|
+
backgroundColor: theme.palette.primary.main,
|
|
113
|
+
color: '#fff',
|
|
114
|
+
px: 0.5,
|
|
115
|
+
borderRadius: '4px 4px 4px 4px',
|
|
116
|
+
lineHeight: 1,
|
|
117
|
+
alignSelf: 'flex-start',
|
|
118
|
+
mt: 0.5,
|
|
119
|
+
} }, { children: index + 1 })), _jsx(Typography, __assign({ variant: "body2", color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: desc }))] })), _jsxs(QuestionDesc, { children: [_jsx(BodyImages, { reviewImgs: reviewImgs }), _jsx(FormatQuoteIcon, {}), 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) {
|
|
112
120
|
return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), _jsxs(QuestionDesc, { children: [_jsx(FormatQuoteIcon, {}), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
|
|
113
|
-
})] })), _jsx(Video, { src: videoUrl, controls: true })] })), 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"] })), isShowWeight && _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] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice }), abilities.map(function (v) { return (_createElement(Workplaces, __assign({}, v, { key: v.token }))); })
|
|
121
|
+
})] })), _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] })) }))] }))), 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"] })), isShowWeight && _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] })) }))] }))), 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: {
|
|
122
|
+
color: '#424242',
|
|
123
|
+
}, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] })))] }), token));
|
|
114
124
|
};
|
|
115
125
|
export default QuestionItem;
|
|
@@ -32,7 +32,7 @@ import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
|
32
32
|
import { Tooltip, Typography } from 'fbm-ui';
|
|
33
33
|
import { useCallback, useEffect, useState } from 'react';
|
|
34
34
|
var ScoreSlider = function (props) {
|
|
35
|
-
var _a = props.width, width = _a === void 0 ?
|
|
35
|
+
var _a = props.width, width = _a === void 0 ? 504 : _a, originScore = props.originScore, finalScore = props.finalScore, _b = props.valueLabelDisplay, valueLabelDisplay = _b === void 0 ? 'on' : _b, _c = props.isShowLabel, isShowLabel = _c === void 0 ? false : _c, _d = props.isShowScoreRank, isShowScoreRank = _d === void 0 ? false : _d, onChangeCommitted = props.onChangeCommitted, _e = props.disabledScore, sliderDisabledScore = _e === void 0 ? false : _e;
|
|
36
36
|
var aiScore = originScore.toFixed(0);
|
|
37
37
|
var _f = __read(useState(0), 2), score = _f[0], setScore = _f[1];
|
|
38
38
|
var disabledScore = useAiReportStore(function (store) { return [store.disabledScore, store.scoreRankIntervals]; }).disabledScore;
|
|
@@ -6,7 +6,7 @@ export declare const ReportBadge: import("@emotion/styled").StyledComponent<impo
|
|
|
6
6
|
children?: import("react").ReactNode;
|
|
7
7
|
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
8
|
interface ReportLabelProps {
|
|
9
|
-
level?: 'low' | 'middle' | 'high';
|
|
9
|
+
level?: 'low' | 'middle' | 'high' | 'calculation';
|
|
10
10
|
}
|
|
11
11
|
export declare const ReportLabel: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
12
12
|
children?: import("react").ReactNode;
|
|
@@ -28,6 +28,7 @@ var LabelImage = {
|
|
|
28
28
|
low: '//webcdn.fbmms.cn/assets/ieud/S3Zpk0MrG7xS7GNhhPR91',
|
|
29
29
|
middle: '//webcdn.fbmms.cn/assets/QSes/sdMFEHcqx5fYijnEU2d-q',
|
|
30
30
|
high: '//webcdn.fbmms.cn/assets/sXb7/jADl-WOO_6B27l56HKlBM',
|
|
31
|
+
calculation: '//webcdn.fbmms.cn/assets/9bjO/UaJ2R4JousNJezEJdY00s',
|
|
31
32
|
};
|
|
32
33
|
export var ReportLabel = styled(Box)(function (_a) {
|
|
33
34
|
var _b = _a.level, level = _b === void 0 ? 'low' : _b;
|
|
@@ -52,7 +53,7 @@ export var ReportAvatar = styled(Box)(function (_a) {
|
|
|
52
53
|
});
|
|
53
54
|
});
|
|
54
55
|
export var DinTypography = styled(Typography)({
|
|
55
|
-
fontFamily: '
|
|
56
|
+
fontFamily: 'MiSans Medium',
|
|
56
57
|
});
|
|
57
58
|
var ReportTagStyles = [
|
|
58
59
|
{
|
|
@@ -79,7 +80,7 @@ function hashString(str) {
|
|
|
79
80
|
export var ReportTag = styled(DinTypography)(function (_a) {
|
|
80
81
|
var children = _a.children;
|
|
81
82
|
var hash = children ? Math.abs(hashString(children.toString())) % 3 : 0;
|
|
82
|
-
return __assign({ padding: '2px 8px', fontSize: '12px', lineHeight: '16px', marginRight: '8px', borderRadius: '177px 177px 177px 177px', border: '1px solid #FFFFFF' }, ReportTagStyles[hash]);
|
|
83
|
+
return __assign(__assign({ flex: '0 1 auto', padding: '2px 8px', fontSize: '12px', lineHeight: '16px', marginRight: '8px', borderRadius: '177px 177px 177px 177px', border: '1px solid #FFFFFF' }, ReportTagStyles[hash]), { mb: 8 });
|
|
83
84
|
});
|
|
84
85
|
export var ReportEvaluate = styled(Box)({
|
|
85
86
|
// margin: 24,
|
|
@@ -103,9 +104,14 @@ export var Podium = styled(Box)({
|
|
|
103
104
|
backgroundSize: 'cover',
|
|
104
105
|
color: '#119E45',
|
|
105
106
|
});
|
|
106
|
-
export var Video = styled('video')({
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
export var Video = styled('video')(function (_a) {
|
|
108
|
+
var theme = _a.theme;
|
|
109
|
+
return ({
|
|
110
|
+
width: 166,
|
|
111
|
+
height: 296,
|
|
112
|
+
borderRadius: 8,
|
|
113
|
+
boxShadow: theme.shadows[6],
|
|
114
|
+
});
|
|
109
115
|
});
|
|
110
116
|
export var BeatProgressBar = styled(Box)({
|
|
111
117
|
width: 169,
|
|
@@ -27,6 +27,7 @@ export interface Collection {
|
|
|
27
27
|
level: number;
|
|
28
28
|
rank: number;
|
|
29
29
|
total: number;
|
|
30
|
+
avgScore: number;
|
|
30
31
|
}
|
|
31
32
|
export interface AnalysisResult {
|
|
32
33
|
text: string;
|
|
@@ -46,6 +47,9 @@ export interface AnalysisResult {
|
|
|
46
47
|
}
|
|
47
48
|
export interface Answer {
|
|
48
49
|
videoUrl: string;
|
|
50
|
+
media: {
|
|
51
|
+
durationTime: number;
|
|
52
|
+
};
|
|
49
53
|
analysisResult: AnalysisResult;
|
|
50
54
|
}
|
|
51
55
|
export interface Ability {
|
|
@@ -60,6 +64,8 @@ export interface Ability {
|
|
|
60
64
|
}
|
|
61
65
|
export interface ScoreInfo {
|
|
62
66
|
weight: number | string;
|
|
67
|
+
workplaceEvaluation: string;
|
|
68
|
+
workplaceName: string;
|
|
63
69
|
originScore: number;
|
|
64
70
|
finalScore: number;
|
|
65
71
|
score: number;
|
|
@@ -200,7 +206,7 @@ export interface AiReportProps {
|
|
|
200
206
|
onSendReminderClick?: () => void;
|
|
201
207
|
onScoreRankIntervalsChange?: (scoreRankIntervals?: ScoreRankIntervals[]) => void;
|
|
202
208
|
onScoreRankIntervalsSubmit?: (scoreRankIntervals?: ScoreRankIntervals[]) => Promise<any>;
|
|
203
|
-
|
|
209
|
+
fetchFormResult?: () => Promise<FormReports>;
|
|
204
210
|
fetchCandidateInfo?: () => Promise<CandidateInfo>;
|
|
205
211
|
}
|
|
206
212
|
export interface AiReportRef {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AiReportProps, AiReportRef } from './interface';
|
|
3
3
|
export declare const useAiReportV2: (props: AiReportProps) => {
|
|
4
|
+
version: {
|
|
5
|
+
version: number;
|
|
6
|
+
};
|
|
4
7
|
handleRefresh?: (() => void) | undefined;
|
|
5
8
|
token: string;
|
|
6
9
|
customScore?: number | undefined;
|
|
@@ -25,7 +28,7 @@ export declare const useAiReportV2: (props: AiReportProps) => {
|
|
|
25
28
|
onSendReminderClick?: (() => void) | undefined;
|
|
26
29
|
onScoreRankIntervalsChange?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => void) | undefined;
|
|
27
30
|
onScoreRankIntervalsSubmit?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => Promise<any>) | undefined;
|
|
28
|
-
|
|
31
|
+
fetchFormResult?: (() => Promise<import("./components/Form/interface").FormReports>) | undefined;
|
|
29
32
|
fetchCandidateInfo?: (() => Promise<import("./components/Candidate/Interface").CandidateInfo>) | undefined;
|
|
30
33
|
ref: import("react").MutableRefObject<AiReportRef | undefined>;
|
|
31
34
|
};
|