eli-video-interview 1.2.41-alpha.12 → 1.2.41-alpha.14
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 -7
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +1 -0
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.js +2 -1
- package/esm/modules/ai-report/components/WorkPlaces/index.js +2 -1
- package/esm/modules/ai-report/interface.d.ts +1 -0
- package/esm/services/ai-report.d.ts +1 -0
- package/lib/modules/ai-report/Root.js +6 -7
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +1 -0
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.js +2 -1
- package/lib/modules/ai-report/components/WorkPlaces/index.js +2 -1
- package/lib/modules/ai-report/interface.d.ts +1 -0
- package/lib/services/ai-report.d.ts +1 -0
- package/package.json +1 -1
|
@@ -23,14 +23,13 @@ import { useAiReportStore } from "../../store/ai-report/global-store";
|
|
|
23
23
|
import { useRequest } from 'ahooks';
|
|
24
24
|
import { Box, Button, confirm, Message, Paper, Typography } from 'fbm-ui';
|
|
25
25
|
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
26
|
-
var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER;
|
|
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
28
|
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
|
|
29
29
|
var firstLoad = useRef(true);
|
|
30
30
|
var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
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;
|
|
32
|
-
|
|
33
|
-
var _f = useRequest(function () { return PostAiInterviewResult([token]); }, {
|
|
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;
|
|
32
|
+
var _g = useRequest(function () { return PostAiInterviewResult([token]); }, {
|
|
34
33
|
manual: true,
|
|
35
34
|
onSuccess: function (_a) {
|
|
36
35
|
var list = _a.data.list;
|
|
@@ -48,7 +47,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
48
47
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
|
|
49
48
|
}
|
|
50
49
|
},
|
|
51
|
-
}), data =
|
|
50
|
+
}), data = _g.data, loading = _g.loading, postAiInterviewResult = _g.run;
|
|
52
51
|
var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
|
|
53
52
|
var handleRefreshSuccess = useCallback(function () {
|
|
54
53
|
postAiInterviewResult();
|
|
@@ -66,7 +65,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
66
65
|
Message.error('升级报告失败,请重试。');
|
|
67
66
|
});
|
|
68
67
|
};
|
|
69
|
-
if (model === 'standard') {
|
|
68
|
+
if (model === 'standard' && !hasProVersion) {
|
|
70
69
|
confirm({
|
|
71
70
|
title: '确认使用增值服务',
|
|
72
71
|
content: (_jsxs(Typography, __assign({ color: "textSecondary", sx: { display: 'inline' } }, { children: ["\u4E13\u4E1A\u7248\u62A5\u544A\u4EE5\u9AD8\u7EA7AI\u6280\u672F\u63D0\u4F9B\u66F4\u7CBE\u51C6\u8BC4\u4F30\uFF0C\u5C5E\u589E\u503C\u4EA7\u54C1\uFF0C\u6BCF\u4E13\u4E1A\u7248\u62A5\u544A\u6309\u6807\u51C6\u72482\u4EBA\u6B21\u8BA1\u8D39\uFF0C\u4EC5\u9996\u6B21\u5207\u6362\u6536\u8D39\u3002\u9ED8\u8BA4\u63D0\u4F9B\u6807\u51C6\u7248\uFF0C\u54A8\u8BE2\u5BA2\u6237\u987E\u95EE\u4E86\u89E3\u8D44\u8D39\u4F18\u60E0\u3002", _jsx(Typography, __assign({ fontWeight: "medium", sx: { display: 'inline' } }, { children: "\u672C\u6B21\u64CD\u4F5C\u5C06\u6D88\u80172\u4EBA \u6B21\uFF0C\u662F\u5426\u786E\u8BA4\uFF1F" }))] }))),
|
|
@@ -103,7 +102,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
103
102
|
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 ? '已提醒' : '发送提醒' })) }))] }))] })));
|
|
104
103
|
}
|
|
105
104
|
else {
|
|
106
|
-
return (_jsxs(Box, __assign({ pb: 3 }, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ScoreReport, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), _jsxs(Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [_jsx(Report, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && _jsx(WorkPlaces, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(AIEvaluate, {}), _jsx(Suggestion, {}), _jsx(VideoQuestion, {})] }))] })));
|
|
105
|
+
return (_jsxs(Box, __assign({ pb: 3 }, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ScoreReport, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), _jsxs(Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [![FAILED, IN_CALCULATION].includes(status) && _jsx(Report, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && _jsx(WorkPlaces, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(AIEvaluate, {}), _jsx(Suggestion, {}), _jsx(VideoQuestion, {})] }))] })));
|
|
107
106
|
}
|
|
108
107
|
}, [
|
|
109
108
|
status,
|
|
@@ -31,7 +31,7 @@ import { Button, confirm, EditIcon, FormItem, IconButton, Typography } from 'fbm
|
|
|
31
31
|
import { Box, Stack } from 'fbm-ui/lib/mui';
|
|
32
32
|
import { useCallback, useEffect, useState } from 'react';
|
|
33
33
|
var Evaluate = function (_a) {
|
|
34
|
-
var answer = _a.answer, token = _a.token, bgcolor = _a.bgcolor, _b = _a.mode, mode = _b === void 0 ? 'show' : _b, _c = _a.canEdit, canEdit = _c === void 0 ? 'true' : _c;
|
|
34
|
+
var answer = _a.answer, token = _a.token, thirdOrderID = _a.thirdOrderID, bgcolor = _a.bgcolor, _b = _a.mode, mode = _b === void 0 ? 'show' : _b, _c = _a.canEdit, canEdit = _c === void 0 ? 'true' : _c;
|
|
35
35
|
var _d = __read(useState(answer), 2), content = _d[0], setContent = _d[1];
|
|
36
36
|
var _e = __read(useState('show'), 2), internalMode = _e[0], setInternalMode = _e[1];
|
|
37
37
|
var handleChange = useCallback(function (e) {
|
|
@@ -54,6 +54,7 @@ var Evaluate = function (_a) {
|
|
|
54
54
|
var onClose = _a.onClose;
|
|
55
55
|
var data = {
|
|
56
56
|
token: token,
|
|
57
|
+
thirdOrderID: thirdOrderID,
|
|
57
58
|
answer: content,
|
|
58
59
|
};
|
|
59
60
|
PostAiInterviewWorkplace(data).then(handleModeChange).then(onClose).catch(console.log);
|
|
@@ -60,10 +60,11 @@ var ColorIndexMap = {
|
|
|
60
60
|
var Index = function () {
|
|
61
61
|
var _a;
|
|
62
62
|
var _b = useAiReportStore(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _b.reportResult, showAiDimension = _b.showAiDimension, canEditAiDimension = _b.canEditAiDimension;
|
|
63
|
+
var _c = (reportResult || {}).orderToken, orderToken = _c === void 0 ? '' : _c;
|
|
63
64
|
if (!showAiDimension)
|
|
64
65
|
return null;
|
|
65
66
|
return (_jsxs(Box, __assign({ id: "report-workplace", px: 2, mt: 2 }, { children: [_jsx(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: _jsx(AiHeaderTitle, { name: "\u804C\u573A\u80FD\u529B\u8868\u73B0" }) })), _jsx(Collapse, __assign({ in: true }, { children: (_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaces) === null || _a === void 0 ? void 0 : _a.map(function (v, idx) {
|
|
66
|
-
return (_jsxs(Box, __assign({ mb: 2, pb: 2, pr: 2 }, { children: [_jsxs(Box, __assign({ display: "flex", mb: 2, mt: 1, justifyContent: "space-between", alignItems: "center" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", maxWidth: "calc(100% - 90px)" }, { children: [_jsx(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: _jsx(Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' } }, { children: v.dimensionName })) })), v.dimensionType === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } })] })), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u9AD8\u5206\u8868\u73B0\uFF1A", v.abilityExpression.good, _jsx("br", {}), "\u4F4E\u5206\u8868\u73B0\uFF1A", v.abilityExpression.bad] }) }, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body2", style: { lineHeight: '32px' }, mr: 1 }, { children: "\u4F18\u6B21\u8868\u73B0" })), _jsx(InfoOutlineIcon, { sx: { fontSize: '16px' } })] })) }))] })), _jsx(Typography, __assign({ variant: "body2", color: "secondary", ml: 2, style: { background: '#F5F5F5', borderRadius: 4, padding: 8 } }, { children: v.define })), _jsxs(Stack, __assign({ pl: 2 }, { children: [_jsx(Box, __assign({ mt: 2 }, { children: _jsx(ScoreSlider, { width: "100%", isShowLabel: true, score: v.score, scoreText: v.scoreText, scoreLevel: v.scoreLevel }) })), _jsx(Stack, __assign({ spacing: 2 }, { children: _jsx(WorkPlace, { token: v.token, canEdit: canEditAiDimension, answer: v.answer, mode: "show", bgcolor: ColorIndexMap[idx % 3][50] }) }))] }))] }), v.token));
|
|
67
|
+
return (_jsxs(Box, __assign({ mb: 2, pb: 2, pr: 2 }, { children: [_jsxs(Box, __assign({ display: "flex", mb: 2, mt: 1, justifyContent: "space-between", alignItems: "center" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", maxWidth: "calc(100% - 90px)" }, { children: [_jsx(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: _jsx(Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' } }, { children: v.dimensionName })) })), v.dimensionType === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } })] })), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u9AD8\u5206\u8868\u73B0\uFF1A", v.abilityExpression.good, _jsx("br", {}), "\u4F4E\u5206\u8868\u73B0\uFF1A", v.abilityExpression.bad] }) }, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body2", style: { lineHeight: '32px' }, mr: 1 }, { children: "\u4F18\u6B21\u8868\u73B0" })), _jsx(InfoOutlineIcon, { sx: { fontSize: '16px' } })] })) }))] })), _jsx(Typography, __assign({ variant: "body2", color: "secondary", ml: 2, style: { background: '#F5F5F5', borderRadius: 4, padding: 8 } }, { children: v.define })), _jsxs(Stack, __assign({ pl: 2 }, { children: [_jsx(Box, __assign({ mt: 2 }, { children: _jsx(ScoreSlider, { width: "100%", isShowLabel: true, score: v.score, scoreText: v.scoreText, scoreLevel: v.scoreLevel }) })), _jsx(Stack, __assign({ spacing: 2 }, { children: _jsx(WorkPlace, { thirdOrderID: orderToken, token: v.token, canEdit: canEditAiDimension, answer: v.answer, mode: "show", bgcolor: ColorIndexMap[idx % 3][50] }) }))] }))] }), v.token));
|
|
67
68
|
}) }))] })));
|
|
68
69
|
};
|
|
69
70
|
export default Index;
|
|
@@ -7,6 +7,7 @@ interface PostAiInterviewEvaluationData {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const PostAiInterviewEvaluation: <R>(data: PostAiInterviewEvaluationData) => import("axios").AxiosPromise<R>;
|
|
9
9
|
interface PostAiInterviewWorkplaceData {
|
|
10
|
+
thirdOrderID: string;
|
|
10
11
|
token: string;
|
|
11
12
|
answer?: string;
|
|
12
13
|
}
|
|
@@ -28,14 +28,13 @@ var global_store_1 = require("../../store/ai-report/global-store");
|
|
|
28
28
|
var ahooks_1 = require("ahooks");
|
|
29
29
|
var fbm_ui_1 = require("fbm-ui");
|
|
30
30
|
var react_1 = require("react");
|
|
31
|
-
var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER;
|
|
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
33
|
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
|
|
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
|
-
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;
|
|
37
|
-
|
|
38
|
-
var _f = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewResult)([token]); }, {
|
|
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;
|
|
37
|
+
var _g = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewResult)([token]); }, {
|
|
39
38
|
manual: true,
|
|
40
39
|
onSuccess: function (_a) {
|
|
41
40
|
var list = _a.data.list;
|
|
@@ -53,7 +52,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
53
52
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
|
|
54
53
|
}
|
|
55
54
|
},
|
|
56
|
-
}), data =
|
|
55
|
+
}), data = _g.data, loading = _g.loading, postAiInterviewResult = _g.run;
|
|
57
56
|
var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
|
|
58
57
|
var handleRefreshSuccess = (0, react_1.useCallback)(function () {
|
|
59
58
|
postAiInterviewResult();
|
|
@@ -71,7 +70,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
71
70
|
fbm_ui_1.Message.error('升级报告失败,请重试。');
|
|
72
71
|
});
|
|
73
72
|
};
|
|
74
|
-
if (model === 'standard') {
|
|
73
|
+
if (model === 'standard' && !hasProVersion) {
|
|
75
74
|
(0, fbm_ui_1.confirm)({
|
|
76
75
|
title: '确认使用增值服务',
|
|
77
76
|
content: ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ color: "textSecondary", sx: { display: 'inline' } }, { children: ["\u4E13\u4E1A\u7248\u62A5\u544A\u4EE5\u9AD8\u7EA7AI\u6280\u672F\u63D0\u4F9B\u66F4\u7CBE\u51C6\u8BC4\u4F30\uFF0C\u5C5E\u589E\u503C\u4EA7\u54C1\uFF0C\u6BCF\u4E13\u4E1A\u7248\u62A5\u544A\u6309\u6807\u51C6\u72482\u4EBA\u6B21\u8BA1\u8D39\uFF0C\u4EC5\u9996\u6B21\u5207\u6362\u6536\u8D39\u3002\u9ED8\u8BA4\u63D0\u4F9B\u6807\u51C6\u7248\uFF0C\u54A8\u8BE2\u5BA2\u6237\u987E\u95EE\u4E86\u89E3\u8D44\u8D39\u4F18\u60E0\u3002", (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontWeight: "medium", sx: { display: 'inline' } }, { children: "\u672C\u6B21\u64CD\u4F5C\u5C06\u6D88\u80172\u4EBA \u6B21\uFF0C\u662F\u5426\u786E\u8BA4\uFF1F" }))] }))),
|
|
@@ -108,7 +107,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
108
107
|
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ style: { marginTop: '2px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
|
|
109
108
|
}
|
|
110
109
|
else {
|
|
111
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ pb: 3 }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ScoreReport_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [(0, jsx_runtime_1.jsx)(Report_1.default, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }))] })));
|
|
110
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ pb: 3 }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ScoreReport_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [![FAILED, IN_CALCULATION].includes(status) && (0, jsx_runtime_1.jsx)(Report_1.default, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }))] })));
|
|
112
111
|
}
|
|
113
112
|
}, [
|
|
114
113
|
status,
|
|
@@ -33,7 +33,7 @@ var fbm_ui_1 = require("fbm-ui");
|
|
|
33
33
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
34
34
|
var react_1 = require("react");
|
|
35
35
|
var Evaluate = function (_a) {
|
|
36
|
-
var answer = _a.answer, token = _a.token, bgcolor = _a.bgcolor, _b = _a.mode, mode = _b === void 0 ? 'show' : _b, _c = _a.canEdit, canEdit = _c === void 0 ? 'true' : _c;
|
|
36
|
+
var answer = _a.answer, token = _a.token, thirdOrderID = _a.thirdOrderID, bgcolor = _a.bgcolor, _b = _a.mode, mode = _b === void 0 ? 'show' : _b, _c = _a.canEdit, canEdit = _c === void 0 ? 'true' : _c;
|
|
37
37
|
var _d = __read((0, react_1.useState)(answer), 2), content = _d[0], setContent = _d[1];
|
|
38
38
|
var _e = __read((0, react_1.useState)('show'), 2), internalMode = _e[0], setInternalMode = _e[1];
|
|
39
39
|
var handleChange = (0, react_1.useCallback)(function (e) {
|
|
@@ -56,6 +56,7 @@ var Evaluate = function (_a) {
|
|
|
56
56
|
var onClose = _a.onClose;
|
|
57
57
|
var data = {
|
|
58
58
|
token: token,
|
|
59
|
+
thirdOrderID: thirdOrderID,
|
|
59
60
|
answer: content,
|
|
60
61
|
};
|
|
61
62
|
(0, ai_report_1.PostAiInterviewWorkplace)(data).then(handleModeChange).then(onClose).catch(console.log);
|
|
@@ -65,10 +65,11 @@ var ColorIndexMap = {
|
|
|
65
65
|
var Index = function () {
|
|
66
66
|
var _a;
|
|
67
67
|
var _b = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _b.reportResult, showAiDimension = _b.showAiDimension, canEditAiDimension = _b.canEditAiDimension;
|
|
68
|
+
var _c = (reportResult || {}).orderToken, orderToken = _c === void 0 ? '' : _c;
|
|
68
69
|
if (!showAiDimension)
|
|
69
70
|
return null;
|
|
70
71
|
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ id: "report-workplace", px: 2, mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: (0, jsx_runtime_1.jsx)(AiHeaderTitle_1.default, { name: "\u804C\u573A\u80FD\u529B\u8868\u73B0" }) })), (0, jsx_runtime_1.jsx)(mui_1.Collapse, __assign({ in: true }, { children: (_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaces) === null || _a === void 0 ? void 0 : _a.map(function (v, idx) {
|
|
71
|
-
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ mb: 2, pb: 2, pr: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", mb: 2, mt: 1, justifyContent: "space-between", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", alignItems: "center", maxWidth: "calc(100% - 90px)" }, { children: [(0, jsx_runtime_1.jsx)(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' } }, { children: v.dimensionName })) })), v.dimensionType === 3 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } })] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: (0, jsx_runtime_1.jsxs)("span", { children: ["\u9AD8\u5206\u8868\u73B0\uFF1A", v.abilityExpression.good, (0, jsx_runtime_1.jsx)("br", {}), "\u4F4E\u5206\u8868\u73B0\uFF1A", v.abilityExpression.bad] }) }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { lineHeight: '32px' }, mr: 1 }, { children: "\u4F18\u6B21\u8868\u73B0" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { fontSize: '16px' } })] })) }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", ml: 2, style: { background: '#F5F5F5', borderRadius: 4, padding: 8 } }, { children: v.define })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ pl: 2 }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { width: "100%", isShowLabel: true, score: v.score, scoreText: v.scoreText, scoreLevel: v.scoreLevel }) })), (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 2 }, { children: (0, jsx_runtime_1.jsx)(WorkPlace_1.default, { token: v.token, canEdit: canEditAiDimension, answer: v.answer, mode: "show", bgcolor: ColorIndexMap[idx % 3][50] }) }))] }))] }), v.token));
|
|
72
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ mb: 2, pb: 2, pr: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", mb: 2, mt: 1, justifyContent: "space-between", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", alignItems: "center", maxWidth: "calc(100% - 90px)" }, { children: [(0, jsx_runtime_1.jsx)(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' } }, { children: v.dimensionName })) })), v.dimensionType === 3 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } })] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: (0, jsx_runtime_1.jsxs)("span", { children: ["\u9AD8\u5206\u8868\u73B0\uFF1A", v.abilityExpression.good, (0, jsx_runtime_1.jsx)("br", {}), "\u4F4E\u5206\u8868\u73B0\uFF1A", v.abilityExpression.bad] }) }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { lineHeight: '32px' }, mr: 1 }, { children: "\u4F18\u6B21\u8868\u73B0" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { fontSize: '16px' } })] })) }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", ml: 2, style: { background: '#F5F5F5', borderRadius: 4, padding: 8 } }, { children: v.define })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ pl: 2 }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { width: "100%", isShowLabel: true, score: v.score, scoreText: v.scoreText, scoreLevel: v.scoreLevel }) })), (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 2 }, { children: (0, jsx_runtime_1.jsx)(WorkPlace_1.default, { thirdOrderID: orderToken, token: v.token, canEdit: canEditAiDimension, answer: v.answer, mode: "show", bgcolor: ColorIndexMap[idx % 3][50] }) }))] }))] }), v.token));
|
|
72
73
|
}) }))] })));
|
|
73
74
|
};
|
|
74
75
|
exports.default = Index;
|
|
@@ -7,6 +7,7 @@ interface PostAiInterviewEvaluationData {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const PostAiInterviewEvaluation: <R>(data: PostAiInterviewEvaluationData) => import("axios").AxiosPromise<R>;
|
|
9
9
|
interface PostAiInterviewWorkplaceData {
|
|
10
|
+
thirdOrderID: string;
|
|
10
11
|
token: string;
|
|
11
12
|
answer?: string;
|
|
12
13
|
}
|