eli-video-interview 1.2.26 → 1.2.28-beta.0
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/README.md +1 -1
- package/esm/constants/ai-report.d.ts +27 -0
- package/esm/constants/ai-report.js +27 -0
- package/esm/modules/ai-question/components/AiAnalysis/index.js +1 -1
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +3 -3
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +5 -2
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +26 -23
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
- package/esm/modules/ai-report/Root.js +4 -4
- package/esm/modules/ai-report/components/AIEvaluate/index.js +1 -1
- package/esm/modules/ai-report/components/MenuAnchor/index.d.ts +4 -0
- package/esm/modules/ai-report/components/MenuAnchor/index.js +115 -0
- package/esm/modules/ai-report/components/ScoreReport/Report.js +1 -1
- package/esm/modules/ai-report/components/ScoreReport/index.d.ts +1 -1
- package/esm/modules/ai-report/components/ScoreReport/index.js +8 -8
- package/esm/modules/ai-report/components/Suggestion/index.js +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/index.js +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -1
- package/esm/modules/ai-report/components/WorkPlaces/index.js +1 -1
- package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +1 -1
- package/esm/modules/ai-report/index.js +4 -2
- package/esm/modules/ai-report/interface.d.ts +10 -0
- package/esm/store/ai-question/ai-analysis-store.js +4 -3
- package/lib/constants/ai-report.d.ts +27 -0
- package/lib/constants/ai-report.js +28 -1
- package/lib/modules/ai-question/components/AiAnalysis/index.js +1 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +3 -3
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +5 -2
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +26 -23
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
- package/lib/modules/ai-report/Root.js +4 -4
- package/lib/modules/ai-report/components/AIEvaluate/index.js +1 -1
- package/lib/modules/ai-report/components/MenuAnchor/index.d.ts +4 -0
- package/lib/modules/ai-report/components/MenuAnchor/index.js +117 -0
- package/lib/modules/ai-report/components/ScoreReport/Report.js +1 -1
- package/lib/modules/ai-report/components/ScoreReport/index.d.ts +1 -1
- package/lib/modules/ai-report/components/ScoreReport/index.js +8 -8
- package/lib/modules/ai-report/components/Suggestion/index.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/index.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -1
- package/lib/modules/ai-report/components/WorkPlaces/index.js +1 -1
- package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +1 -1
- package/lib/modules/ai-report/index.js +3 -1
- package/lib/modules/ai-report/interface.d.ts +10 -0
- package/lib/store/ai-question/ai-analysis-store.js +4 -3
- package/package.json +1 -1
- package/CHANGELOG.md +0 -30
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ return (
|
|
|
75
75
|
|
|
76
76
|
| 名称 | 说明 | 类型 |
|
|
77
77
|
| :--- | :--- | :--- |
|
|
78
|
-
| handleValues | 获取AI
|
|
78
|
+
| handleValues | 获取AI视频题目所有字段值 | () => [AiQuestionValues](#aiquestionvalues) |
|
|
79
79
|
| handleSubmit | 提交AI视频题目 | () => Promise<[AiQuestionSubmitRes](#aiquestionsubmitres)> |
|
|
80
80
|
|
|
81
81
|
#### MediaList
|
|
@@ -1,2 +1,29 @@
|
|
|
1
1
|
export declare const RosePieColors: string[][];
|
|
2
2
|
export declare const scoreRankIntervalColors: string[];
|
|
3
|
+
export declare const REPORT_MODULE_MAP: {
|
|
4
|
+
score: {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
};
|
|
9
|
+
workplace: {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
evaluate: {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
suggestion: {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
videoQuestion: {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -10,3 +10,30 @@ export var RosePieColors = [
|
|
|
10
10
|
['rgba(160, 115, 255, 0.2)', 'rgba(160, 115, 255, 0.4)', 'rgba(160, 115, 255, 0.6)', 'rgba(160, 115, 255, 1)'],
|
|
11
11
|
];
|
|
12
12
|
export var scoreRankIntervalColors = ['#C8E6C9', '#A5D6A7', '#81C784', '#66BB6A', '#4CAF50'];
|
|
13
|
+
export var REPORT_MODULE_MAP = {
|
|
14
|
+
score: {
|
|
15
|
+
id: 'report-score',
|
|
16
|
+
name: '综合表现',
|
|
17
|
+
type: 'score',
|
|
18
|
+
},
|
|
19
|
+
workplace: {
|
|
20
|
+
id: 'report-workplace',
|
|
21
|
+
name: '职场能力表现',
|
|
22
|
+
type: 'workplace',
|
|
23
|
+
},
|
|
24
|
+
evaluate: {
|
|
25
|
+
id: 'report-evaluate',
|
|
26
|
+
name: 'AI基础能力',
|
|
27
|
+
type: 'evaluate',
|
|
28
|
+
},
|
|
29
|
+
suggestion: {
|
|
30
|
+
id: 'report-suggestion',
|
|
31
|
+
name: '考察建议',
|
|
32
|
+
type: 'suggestion',
|
|
33
|
+
},
|
|
34
|
+
videoQuestion: {
|
|
35
|
+
id: 'report-question',
|
|
36
|
+
name: '视频题',
|
|
37
|
+
type: 'videoQuestion',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -22,6 +22,6 @@ var AiAnalysis = function () {
|
|
|
22
22
|
var _b = useState(false), aiAnalysisOpen = _b[0], setAiAnalysisOpen = _b[1];
|
|
23
23
|
var language = analysisState.language;
|
|
24
24
|
var isOpenAiAnalysis = aiAbilities.length > 0;
|
|
25
|
-
return (_jsxs(Box, { children: [aiAnalysisOpen && _jsx(AiAssessmentCriteria, { open: aiAnalysisOpen, onClose: function () { return setAiAnalysisOpen(false); } }), isOpenAiAnalysis && (_jsx(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle1" }, { children: "\u6743\u91CD\u8BBE\u7F6E" })), language && LANGUAGE_NAMES[language]
|
|
25
|
+
return (_jsxs(Box, { children: [aiAnalysisOpen && _jsx(AiAssessmentCriteria, { open: aiAnalysisOpen, onClose: function () { return setAiAnalysisOpen(false); } }), isOpenAiAnalysis && (_jsx(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle1" }, { children: "\u6743\u91CD\u8BBE\u7F6E" })), language && LANGUAGE_NAMES[language] ? (_jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: "8px" }, { children: ["\u8BED\u79CD\uFF1A", language && LANGUAGE_NAMES[language]] }))) : ('')] })) }))), aiAbilities.length > 0 && (_jsx(List, { children: aiAbilities.map(function (item, index) { return (_jsx(AnalysisItem, __assign({ index: index }, item), item.token)); }) })), _jsx(Divider, { sx: { mb: 1 } }), _jsx(Button, __assign({ variant: "text", color: "inherit", icon: _jsx(AddIcon, {}), onClick: function () { return setAiAnalysisOpen(true); } }, { children: "\u6DFB\u52A0AI\u5206\u6790\u7EF4\u5EA6" }))] }));
|
|
26
26
|
};
|
|
27
27
|
export default AiAnalysis;
|
|
@@ -63,9 +63,9 @@ var AiAssessmentCriteria = function (props) {
|
|
|
63
63
|
setRelatedAbilities(item === null || item === void 0 ? void 0 : item.relatedAbilities);
|
|
64
64
|
};
|
|
65
65
|
var handleOk = useCallback(function () {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
updateAiAbilities(Object.values(checkAbilities)
|
|
67
|
+
.filter(function (item) { return item; })
|
|
68
|
+
.sort(function (a, b) { return ((a === null || a === void 0 ? void 0 : a.sort) && (b === null || b === void 0 ? void 0 : b.sort) ? (a === null || a === void 0 ? void 0 : a.sort) - (b === null || b === void 0 ? void 0 : b.sort) : 0); }));
|
|
69
69
|
updateState({ language: SERVER_LANGUAGE_TYPE[language], aiSwitch: 1 });
|
|
70
70
|
onClose();
|
|
71
71
|
}, [checkAbilities, language, onClose, updateAiAbilities, updateState]);
|
|
@@ -56,7 +56,7 @@ import { useRequest } from 'ahooks';
|
|
|
56
56
|
import { Autocomplete, Box, Form, FormItem, Select, useForm } from 'fbm-ui';
|
|
57
57
|
import { forwardRef, memo, useEffect, useImperativeHandle } from 'react';
|
|
58
58
|
var QuestionForm = forwardRef(function (props, ref) {
|
|
59
|
-
var aiShowType = props.aiShowType, initialValues = props.initialValues, values = props.values, preview = props.preview, onValuesChange = props.onValuesChange, onSubmit = props.onSubmit;
|
|
59
|
+
var aiShowType = props.aiShowType, initialValues = props.initialValues, values = props.values, preview = props.preview, onValuesChange = props.onValuesChange, onSubmit = props.onSubmit, onCategoryChange = props.onCategoryChange;
|
|
60
60
|
var _a = useQuestionCollectionListStore(function (store) { return [store.questionCollectionList]; }), questionCollectionList = _a.questionCollectionList, updateQuestionCollectionList = _a.updateQuestionCollectionList;
|
|
61
61
|
var data = useRequest(PostQuestionCollectionList, { manual: preview }).data;
|
|
62
62
|
var form = useForm({
|
|
@@ -73,6 +73,9 @@ var QuestionForm = forwardRef(function (props, ref) {
|
|
|
73
73
|
});
|
|
74
74
|
}); },
|
|
75
75
|
});
|
|
76
|
+
var handleCategoryChange = function (e, value) {
|
|
77
|
+
onCategoryChange === null || onCategoryChange === void 0 ? void 0 : onCategoryChange(value);
|
|
78
|
+
};
|
|
76
79
|
useImperativeHandle(ref, function () { return ({
|
|
77
80
|
handleValues: function () { return form.values; },
|
|
78
81
|
handleSubmit: function () { return form.handleSubmit(); },
|
|
@@ -96,7 +99,7 @@ var QuestionForm = forwardRef(function (props, ref) {
|
|
|
96
99
|
token: token,
|
|
97
100
|
isWorkplace: isWorkplace,
|
|
98
101
|
});
|
|
99
|
-
}) }) })))] })), form.values.broadcastType === 1 || preview ? (_jsx(FormItem, { required: true, disabled: preview, name: "desc", label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09" })) : (_jsx(VideoVoice, {})), aiShowType === ADD_QUESTION_TYPE.LANGUAGE && (_jsx(FormItem, { sx: { height: 'auto', mb: 2 }, required: true, name: "readText", label: "\u6717\u8BFB\u5185\u5BB9", max: 240, InputProps: {
|
|
102
|
+
}), onChange: handleCategoryChange }) })))] })), form.values.broadcastType === 1 || preview ? (_jsx(FormItem, { required: true, disabled: preview, name: "desc", label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09" })) : (_jsx(VideoVoice, {})), aiShowType === ADD_QUESTION_TYPE.LANGUAGE && (_jsx(FormItem, { sx: { height: 'auto', mb: 2 }, required: true, name: "readText", label: "\u6717\u8BFB\u5185\u5BB9", max: 240, InputProps: {
|
|
100
103
|
rows: 3,
|
|
101
104
|
multiline: true,
|
|
102
105
|
placeholder: '朗读内容(候选人将根据此内容进行朗读)',
|
|
@@ -136,7 +136,8 @@ var QuestionUpdate = function () {
|
|
|
136
136
|
var _b = values || { category: undefined }, _c = _b.readText, readText = _c === void 0 ? '' : _c, otherValues = __rest(_b, ["readText"]);
|
|
137
137
|
resolve({
|
|
138
138
|
errorIndexes: errorIndexes,
|
|
139
|
-
params: __assign(__assign(__assign(__assign({}, item), otherValues), analysisState), { category: (otherValues === null || otherValues === void 0 ? void 0 : otherValues.category) ? [(_a = otherValues === null || otherValues === void 0 ? void 0 : otherValues.category) === null || _a === void 0 ? void 0 : _a.value] : [], extra: readText && item.extra ? __assign(__assign({}, item.extra), { readText: readText }) : item.extra, aiType: newAiAbilities.length > 0
|
|
139
|
+
params: __assign(__assign(__assign(__assign({}, item), otherValues), analysisState), { category: (otherValues === null || otherValues === void 0 ? void 0 : otherValues.category) ? [(_a = otherValues === null || otherValues === void 0 ? void 0 : otherValues.category) === null || _a === void 0 ? void 0 : _a.value] : [], extra: readText && item.extra ? __assign(__assign({}, item.extra), { readText: readText }) : item.extra, aiType: newAiAbilities.length > 0 ? 2 : 1, // 不参与AI分析的考察能力不可设置题目权重,只有可AI分析的职场能力和AI基础能力
|
|
140
|
+
aiShowType: aiShowType, aiAbilities: newAiAbilities }),
|
|
140
141
|
});
|
|
141
142
|
});
|
|
142
143
|
}, [aiAbilities, aiShowType, analysisState, item, setKeyPointAnalysisError]);
|
|
@@ -200,40 +201,42 @@ var QuestionUpdate = function () {
|
|
|
200
201
|
});
|
|
201
202
|
}); }, [getModelParams, item === null || item === void 0 ? void 0 : item.videoBroadcast.videoUrl, token, editModel, index, addModel, updateQuestionState]);
|
|
202
203
|
var handleWorkplaceData = useCallback(function (curSelectWorkPlace) {
|
|
203
|
-
|
|
204
|
-
var curAiAbilities =
|
|
204
|
+
console.log('curSelectWorkPlace', curSelectWorkPlace);
|
|
205
|
+
var curAiAbilities = aiAbilities.slice();
|
|
205
206
|
// 是否是初始化
|
|
206
207
|
var inInit = true;
|
|
207
208
|
// 考察能力是否包含在AI能力
|
|
208
209
|
var workplaceTypeIndex = curAiAbilities.findIndex(function (v) { return v.abilityType === 2; });
|
|
209
210
|
var CurWorkplace = questionCollectionList.find(function (v) { return v.name === curSelectWorkPlace.label; }) || {};
|
|
210
|
-
var CurWorkPlaceAiAbility = __assign(__assign(__assign({}, curSelectWorkPlace), CurWorkplace), { abilityType: 2, weight: 0 });
|
|
211
|
+
var CurWorkPlaceAiAbility = __assign(__assign(__assign({}, curSelectWorkPlace), CurWorkplace), { abilityType: 2, weight: 0, sort: 0 });
|
|
211
212
|
inInit = workplaceTypeIndex === -1;
|
|
212
|
-
// 是否可修改
|
|
213
|
-
// CurWorkPlaceAiAbility.isNotCompute = !CurWorkPlaceAiAbility.isWorkplace;
|
|
214
213
|
CurWorkPlaceAiAbility.desc = CurWorkPlaceAiAbility.name;
|
|
215
214
|
console.log('CurWorkPlaceAiAbility', CurWorkPlaceAiAbility);
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
console.log('form value category:', value.category);
|
|
223
|
-
// 考察能力未发生变化
|
|
224
|
-
var WorkplaceIndex = item.aiAbilities.findIndex(function (v) { var _a; return v.name === ((_a = value.category) === null || _a === void 0 ? void 0 : _a.label); });
|
|
225
|
-
if (WorkplaceIndex > -1) {
|
|
226
|
-
return;
|
|
215
|
+
// 添加和修改
|
|
216
|
+
if (workplaceTypeIndex > -1) {
|
|
217
|
+
curAiAbilities.splice(workplaceTypeIndex, 1, CurWorkPlaceAiAbility);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
curAiAbilities.unshift(CurWorkPlaceAiAbility);
|
|
227
221
|
}
|
|
222
|
+
console.log('curAiAbilities', curAiAbilities, inInit);
|
|
223
|
+
updateAiAbilities(curAiAbilities, inInit);
|
|
224
|
+
}, [questionCollectionList, aiAbilities, updateAiAbilities]);
|
|
225
|
+
var handleCategoryChange = useCallback(function (value) {
|
|
226
|
+
console.log('category value:', value);
|
|
228
227
|
// 考察能力更改
|
|
229
|
-
if (value
|
|
230
|
-
handleWorkplaceData(value
|
|
228
|
+
if (value && value.label) {
|
|
229
|
+
handleWorkplaceData(value);
|
|
231
230
|
}
|
|
232
|
-
else if (!value
|
|
231
|
+
else if (!(value === null || value === void 0 ? void 0 : value.label)) {
|
|
232
|
+
var curAiAbilities = aiAbilities.filter(function (v) { return v.abilityType === 1; });
|
|
233
|
+
updateAiAbilities(curAiAbilities);
|
|
233
234
|
// 考察能力删除
|
|
234
|
-
console.log('考察能力删除');
|
|
235
|
+
console.log('考察能力删除', aiAbilities);
|
|
235
236
|
}
|
|
236
|
-
},
|
|
237
|
+
},
|
|
238
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
239
|
+
[aiAbilities, handleWorkplaceData]);
|
|
237
240
|
useEffect(function () {
|
|
238
241
|
if (open) {
|
|
239
242
|
updateState({ language: item.language, aiSwitch: item.aiSwitch });
|
|
@@ -249,6 +252,6 @@ var QuestionUpdate = function () {
|
|
|
249
252
|
(_a = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _a === void 0 ? void 0 : _a.setFormValues({ category: { label: '', value: '' } });
|
|
250
253
|
}
|
|
251
254
|
}, [workplaces]);
|
|
252
|
-
return (_jsx(Dialog, __assign({ open: open, header: CustomHeader, size: "sm", okText: "\u786E\u8BA4", onClose: handleClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: _jsx(Box, __assign({ sx: { mt: 1 } }, { children: _jsx(Form, { ref: formRef, initialValues: initialValues, aiShowType: aiShowType, onSubmit: handleSubmit,
|
|
255
|
+
return (_jsx(Dialog, __assign({ open: open, header: CustomHeader, size: "sm", okText: "\u786E\u8BA4", onClose: handleClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: _jsx(Box, __assign({ sx: { mt: 1 } }, { children: _jsx(Form, { ref: formRef, initialValues: initialValues, aiShowType: aiShowType, onSubmit: handleSubmit, onCategoryChange: handleCategoryChange }) })) }) })));
|
|
253
256
|
};
|
|
254
257
|
export default QuestionUpdate;
|
|
@@ -45,6 +45,7 @@ export interface QuestionFormProps {
|
|
|
45
45
|
values?: QuestionFormValues;
|
|
46
46
|
preview?: boolean;
|
|
47
47
|
aiShowType: number;
|
|
48
|
+
onCategoryChange?: (category: any) => void;
|
|
48
49
|
onValuesChange?: (values: QuestionFormValues) => void;
|
|
49
50
|
onSubmit?: (values: QuestionFormValues) => void;
|
|
50
51
|
}
|
|
@@ -27,8 +27,8 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
27
27
|
var token = props.token, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
|
|
28
28
|
var firstLoad = useRef(true);
|
|
29
29
|
var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
30
|
-
var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.
|
|
31
|
-
var
|
|
30
|
+
var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d;
|
|
31
|
+
var _e = useRequest(function () { return PostAiInterviewResult([token]); }, {
|
|
32
32
|
manual: true,
|
|
33
33
|
onSuccess: function (_a) {
|
|
34
34
|
var list = _a.data.list;
|
|
@@ -46,7 +46,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
46
46
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
}), data =
|
|
49
|
+
}), data = _e.data, loading = _e.loading, postAiInterviewResult = _e.run;
|
|
50
50
|
var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
|
|
51
51
|
var handleRefreshSuccess = useCallback(function () {
|
|
52
52
|
postAiInterviewResult();
|
|
@@ -70,7 +70,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
70
70
|
else {
|
|
71
71
|
return (_jsxs(Box, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(ScoreReport, { onRefreshSuccess: handleRefreshSuccess }), (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, {})] }));
|
|
72
72
|
}
|
|
73
|
-
}, [handleRefreshSuccess, onSendReminderClick, reminderSent, status, operableButtons, collection, workplaces
|
|
73
|
+
}, [handleRefreshSuccess, onSendReminderClick, reminderSent, status, operableButtons, collection, workplaces]);
|
|
74
74
|
return (_jsx(Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '584px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
75
75
|
});
|
|
76
76
|
AiReportRoot.displayName = 'AiReportRoot';
|
|
@@ -30,7 +30,7 @@ var Index = function () {
|
|
|
30
30
|
}, [expand]);
|
|
31
31
|
if (!showAiDimension || ((_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.length) === 0)
|
|
32
32
|
return null;
|
|
33
|
-
return (_jsxs(Box, __assign({ component: Paper, variant: "outlined", px: 2, mt: 2 }, { children: [_jsxs(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: [_jsx(AiHeaderTitle, { name: "AI\u57FA\u7840\u80FD\u529B" }), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u7ED3\u679C\u8BF4\u660E\uFF1A", _jsx("br", {}), "AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", _jsx("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }) }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center" }, { children: _jsx(InfoOutlineIcon, { sx: { fontSize: '16px' } }) })) }))] })), _jsxs(Collapse, __assign({ in: expand }, { children: [(_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _b === void 0 ? void 0 : _b.map(function (v) {
|
|
33
|
+
return (_jsxs(Box, __assign({ id: "report-evaluate", component: Paper, variant: "outlined", px: 2, mt: 2 }, { children: [_jsxs(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: [_jsx(AiHeaderTitle, { name: "AI\u57FA\u7840\u80FD\u529B" }), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u7ED3\u679C\u8BF4\u660E\uFF1A", _jsx("br", {}), "AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", _jsx("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }) }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center" }, { children: _jsx(InfoOutlineIcon, { sx: { fontSize: '16px' } }) })) }))] })), _jsxs(Collapse, __assign({ in: expand }, { children: [(_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _b === void 0 ? void 0 : _b.map(function (v) {
|
|
34
34
|
var _a;
|
|
35
35
|
var c = customInterviewDimRankMap === null || customInterviewDimRankMap === void 0 ? void 0 : customInterviewDimRankMap[v.evaluationToken];
|
|
36
36
|
var rank = rankPercent((c === null || c === void 0 ? void 0 : c.rank) || (v === null || v === void 0 ? void 0 : v.rank), (c === null || c === void 0 ? void 0 : c.total) || (v === null || v === void 0 ? void 0 : v.total));
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { REPORT_MODULE_MAP } from "../../../../constants/ai-report";
|
|
14
|
+
import { PostAiInterviewResult } from "../../../../services/ai-report";
|
|
15
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
16
|
+
import { useRequest } from 'ahooks';
|
|
17
|
+
import { Box, MenuIcon } from 'fbm-ui';
|
|
18
|
+
import { List, ListItem, ListItemButton, ListItemText, Popover } from 'fbm-ui/lib/mui';
|
|
19
|
+
import { forwardRef, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
20
|
+
var MenuAnchor = forwardRef(function (props) {
|
|
21
|
+
var _a = useState(null), anchorEl = _a[0], setAnchorEl = _a[1];
|
|
22
|
+
var open = Boolean(anchorEl);
|
|
23
|
+
// 接口请求
|
|
24
|
+
var token = props.token, showAiDimension = props.showAiDimension;
|
|
25
|
+
var firstLoad = useRef(true);
|
|
26
|
+
var _b = useState([]), list = _b[0], setList = _b[1];
|
|
27
|
+
var _c = useAiReportStore(), updateState = _c.updateState, updateReportResult = _c.updateReportResult;
|
|
28
|
+
var postAiInterviewResult = useRequest(function () { return PostAiInterviewResult([token]); }, {
|
|
29
|
+
manual: true,
|
|
30
|
+
onSuccess: function (_a) {
|
|
31
|
+
var list = _a.data.list;
|
|
32
|
+
var result = list[0];
|
|
33
|
+
updateReportResult(result);
|
|
34
|
+
if (firstLoad.current) {
|
|
35
|
+
firstLoad.current = false;
|
|
36
|
+
handleMenuList(result);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
}).run;
|
|
40
|
+
useEffect(function () {
|
|
41
|
+
firstLoad.current = true;
|
|
42
|
+
postAiInterviewResult();
|
|
43
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44
|
+
}, [token]);
|
|
45
|
+
useEffect(function () {
|
|
46
|
+
updateState(props);
|
|
47
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
48
|
+
}, [props]);
|
|
49
|
+
// 处理菜单数据
|
|
50
|
+
var handleMenuList = function (reportResult) {
|
|
51
|
+
if (!reportResult.status) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
var resList = [REPORT_MODULE_MAP['videoQuestion']];
|
|
55
|
+
var _a = reportResult.collection, collection = _a === void 0 ? [] : _a, _b = reportResult.workplaces, workplaces = _b === void 0 ? [] : _b, _c = reportResult.suggestion, suggestion = _c === void 0 ? { show: false } : _c, _d = reportResult.evaluations, evaluations = _d === void 0 ? [] : _d;
|
|
56
|
+
if (showAiDimension) {
|
|
57
|
+
if (suggestion === null || suggestion === void 0 ? void 0 : suggestion.show) {
|
|
58
|
+
resList.unshift(REPORT_MODULE_MAP['suggestion']);
|
|
59
|
+
}
|
|
60
|
+
if (collection.length > 0 && evaluations.length > 0) {
|
|
61
|
+
resList.unshift(REPORT_MODULE_MAP['evaluate']);
|
|
62
|
+
}
|
|
63
|
+
if (workplaces.length > 0) {
|
|
64
|
+
resList.unshift(REPORT_MODULE_MAP['workplace']);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (collection.length > 0) {
|
|
68
|
+
resList.unshift(REPORT_MODULE_MAP['score']);
|
|
69
|
+
}
|
|
70
|
+
console.log(resList);
|
|
71
|
+
setList(resList);
|
|
72
|
+
};
|
|
73
|
+
var handlePopoverOpen = function (event) {
|
|
74
|
+
setAnchorEl(event.currentTarget);
|
|
75
|
+
};
|
|
76
|
+
var handlePopoverClose = function () {
|
|
77
|
+
setAnchorEl(null);
|
|
78
|
+
};
|
|
79
|
+
var scrollToAnchor = useCallback(function (id) {
|
|
80
|
+
if (id) {
|
|
81
|
+
var anchorEle = document.getElementById(id);
|
|
82
|
+
if (anchorEle) {
|
|
83
|
+
anchorEle.scrollIntoView({ block: 'start', behavior: 'smooth' });
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}, []);
|
|
87
|
+
var content = useMemo(function () {
|
|
88
|
+
return (_jsx(List, __assign({ style: { minWidth: 150 }, onMouseLeave: handlePopoverClose }, { children: list.map(function (_a) {
|
|
89
|
+
var name = _a.name, id = _a.id;
|
|
90
|
+
return (_jsx(ListItem, __assign({ disablePadding: true }, { children: _jsx(ListItemButton, __assign({ onClick: function () { return scrollToAnchor(id); } }, { children: _jsx(ListItemText, { primary: name }) })) }), id));
|
|
91
|
+
}) })));
|
|
92
|
+
}, [scrollToAnchor, list]);
|
|
93
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ style: {
|
|
94
|
+
display: 'flex',
|
|
95
|
+
alignItems: 'center',
|
|
96
|
+
justifyContent: 'center',
|
|
97
|
+
position: 'absolute',
|
|
98
|
+
top: 20,
|
|
99
|
+
right: -10,
|
|
100
|
+
zIndex: 999,
|
|
101
|
+
height: 32,
|
|
102
|
+
width: 32,
|
|
103
|
+
backgroundColor: '#fff',
|
|
104
|
+
borderRadius: 4,
|
|
105
|
+
boxShadow: '0px 2px 4px rgba(0,0,0, 0.08)',
|
|
106
|
+
}, "aria-owns": open ? 'menu-anchor-popover' : undefined, "aria-haspopup": "true", onClick: handlePopoverOpen, onMouseEnter: handlePopoverOpen }, { children: _jsx(MenuIcon, {}) })), _jsx(Popover, __assign({ id: "menu-anchor-popover", open: open, anchorEl: anchorEl, anchorOrigin: {
|
|
107
|
+
vertical: 'bottom',
|
|
108
|
+
horizontal: 'right',
|
|
109
|
+
}, transformOrigin: {
|
|
110
|
+
vertical: -8,
|
|
111
|
+
horizontal: 'right',
|
|
112
|
+
}, onClose: handlePopoverClose }, { children: content }))] }));
|
|
113
|
+
});
|
|
114
|
+
MenuAnchor.displayName = 'MenuAnchor';
|
|
115
|
+
export default memo(MenuAnchor);
|
|
@@ -27,7 +27,7 @@ var Report = function () {
|
|
|
27
27
|
var _a = summaryText.sprintf, sprintf = _a === void 0 ? '' : _a, _b = summaryText.variables, variables = _b === void 0 ? [] : _b;
|
|
28
28
|
var textList = (sprintf === null || sprintf === void 0 ? void 0 : sprintf.split('%s')) || [];
|
|
29
29
|
return textList.map(function (text, index) {
|
|
30
|
-
return (_jsxs(_Fragment, { children: [_jsx("span", __assign({ style: { fontSize: 14, color: 'RGBA(0, 0, 0, 0.56)' } }, { children: text })), _jsx("span", __assign({ style: { fontSize: 14, color: '#4CAF50' } }, { children: variables[index] || '' }))] }));
|
|
30
|
+
return (_jsxs(_Fragment, { children: [_jsx("span", __assign({ style: { fontSize: 14, color: 'RGBA(0, 0, 0, 0.56)' } }, { children: text })), _jsx("span", __assign({ style: { fontSize: 14, color: '#4CAF50', fontWeight: 500 } }, { children: variables[index] || '' }))] }));
|
|
31
31
|
});
|
|
32
32
|
}, [summaryText]);
|
|
33
33
|
return (_jsxs(Box, __assign({ width: "100%" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", pl: 2, pt: 2, pr: 2 }, { children: [_jsx(AiHeaderTitle, { name: "\u7EFC\u5408\u8868\u73B0" }), _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u80FD\u529B\u6807\u51C6" })), _jsx(Tooltip, __assign({ title: title }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '4px' } }, { children: _jsx(InfoOutlineIcon, { sx: { fontSize: 14, color: 'RGBA(0, 0, 0, 0.86)' } }) })) }))] }))] })), _jsxs(Box, __assign({ height: 300, sx: { position: 'relative' } }, { children: [_jsx(ReportPie, { id: orderToken || '', source: collection }), _jsx(ScoreBigBall, { score: score || 0, status: status })] })), showSummaryText.length > 0 && (_jsx(Box, __assign({ display: "block", width: 498, style: { backgroundColor: '#FAFAFA', padding: 8, margin: '0 auto 16px' } }, { children: showSummaryText })))] })));
|
|
@@ -10,15 +10,15 @@ 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 { Message } from 'fbm-ui';
|
|
14
|
-
import { Divider, Paper } from 'fbm-ui/lib/mui';
|
|
15
|
-
import { useRequest } from 'ahooks';
|
|
16
|
-
import { INTERVIEW_STATUS } from "../../../../enum/ai-report";
|
|
17
|
-
import { PostAiInterviewRefresh } from "../../../../services/ai-report";
|
|
18
|
-
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
19
13
|
import Failed from './Failed';
|
|
20
14
|
import Report from './Report';
|
|
21
15
|
import Score from './Score';
|
|
16
|
+
import { INTERVIEW_STATUS } from "../../../../enum/ai-report";
|
|
17
|
+
import { PostAiInterviewRefresh } from "../../../../services/ai-report";
|
|
18
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
19
|
+
import { useRequest } from 'ahooks';
|
|
20
|
+
import { Message } from 'fbm-ui';
|
|
21
|
+
import { Divider, Paper } from 'fbm-ui/lib/mui';
|
|
22
22
|
var FAILED = INTERVIEW_STATUS.FAILED, IN_CALCULATION = INTERVIEW_STATUS.IN_CALCULATION;
|
|
23
23
|
var ScoreReport = function (_a) {
|
|
24
24
|
var onRefreshSuccess = _a.onRefreshSuccess;
|
|
@@ -32,10 +32,10 @@ var ScoreReport = function (_a) {
|
|
|
32
32
|
},
|
|
33
33
|
}), run = _d.run, loading = _d.loading;
|
|
34
34
|
if ([FAILED, IN_CALCULATION].includes(status)) {
|
|
35
|
-
return (_jsx(Paper, __assign({ variant: "outlined" }, { children: _jsx(Failed, { status: status, loading: loading, onRefresh: run }) })));
|
|
35
|
+
return (_jsx(Paper, __assign({ id: "report-score", variant: "outlined" }, { children: _jsx(Failed, { status: status, loading: loading, onRefresh: run }) })));
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
|
-
return (_jsxs(Paper, __assign({ variant: "outlined" }, { children: [_jsx(Score, { loading: loading, onRefresh: run }), _jsx(Divider, {}), _jsx(Report, {})] })));
|
|
38
|
+
return (_jsxs(Paper, __assign({ id: "report-score", variant: "outlined" }, { children: [_jsx(Score, { loading: loading, onRefresh: run }), _jsx(Divider, {}), _jsx(Report, {})] })));
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
export default ScoreReport;
|
|
@@ -20,7 +20,7 @@ var Index = function () {
|
|
|
20
20
|
var _e = useAiReportStore(function (store) { return [store.reportResult]; }), reportResult = _e.reportResult, showAiDimension = _e.showAiDimension;
|
|
21
21
|
if (!showAiDimension || !((_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.suggestion) === null || _a === void 0 ? void 0 : _a.show))
|
|
22
22
|
return null;
|
|
23
|
-
return (_jsxs(Box, __assign({ component: Paper, variant: "outlined", px: 2, mt: 2, pb: 2 }, { children: [_jsx(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1 }, { children: _jsx(AiHeaderTitle, { name: "\u8003\u5BDF\u5EFA\u8BAE" }) })), _jsx(Typography, __assign({ variant: "body2", color: "secondary", mt: 1 }, { children: (_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.suggestion) === null || _b === void 0 ? void 0 : _b.text })), _jsx(Collapse, __assign({ in: true }, { children: (_d = (_c = reportResult === null || reportResult === void 0 ? void 0 : reportResult.suggestion) === null || _c === void 0 ? void 0 : _c.abilitys) === null || _d === void 0 ? void 0 : _d.map(function (v) {
|
|
23
|
+
return (_jsxs(Box, __assign({ id: "report-suggestion", component: Paper, variant: "outlined", px: 2, mt: 2, pb: 2 }, { children: [_jsx(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1 }, { children: _jsx(AiHeaderTitle, { name: "\u8003\u5BDF\u5EFA\u8BAE" }) })), _jsx(Typography, __assign({ variant: "body2", color: "secondary", mt: 1 }, { children: (_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.suggestion) === null || _b === void 0 ? void 0 : _b.text })), _jsx(Collapse, __assign({ in: true }, { children: (_d = (_c = reportResult === null || reportResult === void 0 ? void 0 : reportResult.suggestion) === null || _c === void 0 ? void 0 : _c.abilitys) === null || _d === void 0 ? void 0 : _d.map(function (v) {
|
|
24
24
|
return _jsx(Suggestion, { abilityName: v.abilityName, interviewQuestion: v.interviewQuestion, keyPoints: v.keyPoints }, v.abilityName);
|
|
25
25
|
}) }))] })));
|
|
26
26
|
};
|
|
@@ -17,6 +17,6 @@ import { Box, Empty, Paper } from 'fbm-ui';
|
|
|
17
17
|
var VideoQuestion = function () {
|
|
18
18
|
var reportResult = useAiReportStore(function (store) { return [store.reportResult, store.operableButtons]; }).reportResult;
|
|
19
19
|
var steps = (reportResult || {}).steps;
|
|
20
|
-
return (_jsxs(Box, __assign({ component: Paper, pl: 2, pt: 2, pr: 2, style: { background: '#fff', border: '1px solid rgb(244, 244, 244)' }, 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" })) }))] })));
|
|
20
|
+
return (_jsxs(Box, __assign({ id: "report-question", component: Paper, pl: 2, pt: 2, pr: 2, style: { background: '#fff', border: '1px solid rgb(244, 244, 244)' }, 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" })) }))] })));
|
|
21
21
|
};
|
|
22
22
|
export default VideoQuestion;
|
|
@@ -46,7 +46,7 @@ export declare const StyledSlider: import("@emotion/styled").StyledComponent<{
|
|
|
46
46
|
name?: string | undefined;
|
|
47
47
|
onChange?: ((event: Event, value: number | number[], activeThumb: number) => void) | undefined;
|
|
48
48
|
onChangeCommitted?: ((event: Event | import("react").SyntheticEvent<Element, Event>, value: number | number[]) => void) | undefined;
|
|
49
|
-
orientation?: "
|
|
49
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
50
50
|
scale?: ((value: number) => number) | undefined;
|
|
51
51
|
step?: number | null | undefined;
|
|
52
52
|
tabIndex?: number | undefined;
|
|
@@ -60,7 +60,7 @@ var Index = function () {
|
|
|
60
60
|
var _b = useAiReportStore(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _b.reportResult, showAiDimension = _b.showAiDimension, canEditAiDimension = _b.canEditAiDimension;
|
|
61
61
|
if (!showAiDimension)
|
|
62
62
|
return null;
|
|
63
|
-
return (_jsxs(Box, __assign({ component: Paper, variant: "outlined", 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) {
|
|
63
|
+
return (_jsxs(Box, __assign({ id: "report-workplace", component: Paper, variant: "outlined", 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) {
|
|
64
64
|
return (_jsxs(Box, __assign({ component: Paper, variant: "outlined", elevation: 0, mb: 2, pb: 2, pr: 2 }, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between", alignItems: "center" }, { children: [_jsx(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: _jsx(Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff' } }, { children: v.dimensionName })) })), _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));
|
|
65
65
|
}) }))] })));
|
|
66
66
|
};
|
|
@@ -46,7 +46,7 @@ export declare const WorkplaceStyledSlider: import("@emotion/styled").StyledComp
|
|
|
46
46
|
name?: string | undefined;
|
|
47
47
|
onChange?: ((event: Event, value: number | number[], activeThumb: number) => void) | undefined;
|
|
48
48
|
onChangeCommitted?: ((event: Event | import("react").SyntheticEvent<Element, Event>, value: number | number[]) => void) | undefined;
|
|
49
|
-
orientation?: "
|
|
49
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
50
50
|
scale?: ((value: number) => number) | undefined;
|
|
51
51
|
step?: number | null | undefined;
|
|
52
52
|
tabIndex?: number | undefined;
|
|
@@ -9,12 +9,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import MenuAnchor from './components/MenuAnchor';
|
|
13
14
|
import ReportRoot from './Root';
|
|
14
15
|
import RootProvider from "../../components/RootProvider";
|
|
15
16
|
import { forwardRef, memo } from 'react';
|
|
16
17
|
var AiReport = forwardRef(function (props, ref) {
|
|
17
|
-
|
|
18
|
+
var token = props.token, _a = props.showAiDimension, showAiDimension = _a === void 0 ? true : _a;
|
|
19
|
+
return (_jsxs(RootProvider, { children: [_jsx(MenuAnchor, { token: token, showAiDimension: showAiDimension }), _jsx(ReportRoot, __assign({ ref: ref }, props))] }));
|
|
18
20
|
});
|
|
19
21
|
AiReport.displayName = 'AiReport';
|
|
20
22
|
export default memo(AiReport);
|
|
@@ -175,3 +175,13 @@ export interface AiReportProps {
|
|
|
175
175
|
export interface AiReportRef {
|
|
176
176
|
handleRefresh: () => void;
|
|
177
177
|
}
|
|
178
|
+
export interface AnchorItem {
|
|
179
|
+
type: string;
|
|
180
|
+
name: string;
|
|
181
|
+
id: string;
|
|
182
|
+
}
|
|
183
|
+
export interface MenuAnchorProps {
|
|
184
|
+
list?: AnchorItem[];
|
|
185
|
+
token: string;
|
|
186
|
+
showAiDimension: boolean;
|
|
187
|
+
}
|
|
@@ -71,7 +71,9 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
71
71
|
__assign(__assign({}, item), { isNotCompute: false, weight: weight }),
|
|
72
72
|
];
|
|
73
73
|
});
|
|
74
|
-
|
|
74
|
+
var resAiAbilities = update(data, { $splice: $splice });
|
|
75
|
+
console.log('resAiAbilities', resAiAbilities);
|
|
76
|
+
setAiAbilities(resAiAbilities);
|
|
75
77
|
}, []);
|
|
76
78
|
/**
|
|
77
79
|
* 更新AI分析维度
|
|
@@ -101,7 +103,7 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
101
103
|
*/
|
|
102
104
|
var updateAiAbilitiesWeight = useCallback(function (value, index) {
|
|
103
105
|
var _a;
|
|
104
|
-
console.log(value);
|
|
106
|
+
console.log('updateAiAbilitiesWeight', value);
|
|
105
107
|
var formatValue = formatNumberDecimal(value);
|
|
106
108
|
var curOriginalWeight = Number(aiAbilities[index].weight);
|
|
107
109
|
var disabledWeight = Number(aiAbilities[aiAbilities.length - 1].weight);
|
|
@@ -119,7 +121,6 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
119
121
|
var WorkplaceLength = newAiAbilities.filter(function (v) { return v.abilityType === 2; }).length;
|
|
120
122
|
if (WorkplaceLength === 0) {
|
|
121
123
|
setWorkplaces([]);
|
|
122
|
-
console.log('222');
|
|
123
124
|
}
|
|
124
125
|
if (newAiAbilities.length) {
|
|
125
126
|
computeWeight(newAiAbilities);
|
|
@@ -1,2 +1,29 @@
|
|
|
1
1
|
export declare const RosePieColors: string[][];
|
|
2
2
|
export declare const scoreRankIntervalColors: string[];
|
|
3
|
+
export declare const REPORT_MODULE_MAP: {
|
|
4
|
+
score: {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
};
|
|
9
|
+
workplace: {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
evaluate: {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
suggestion: {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
videoQuestion: {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
};
|