eli-video-interview 1.5.0 → 1.6.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/esm/components/Charts/ReportPie.js +2 -2
- package/esm/index.d.ts +2 -0
- package/esm/index.js +2 -0
- package/esm/modules/ai-report/components/AIEvaluate/index.js +1 -1
- package/esm/modules/ai-report/interface.d.ts +28 -0
- package/esm/modules/ai-report-v3/Root.d.ts +4 -0
- package/esm/modules/ai-report-v3/Root.js +110 -0
- package/esm/modules/ai-report-v3/components/AIEvaluate/Evaluate.d.ts +11 -0
- package/esm/modules/ai-report-v3/components/AIEvaluate/Evaluate.js +79 -0
- package/esm/modules/ai-report-v3/components/AIEvaluate/Graph.d.ts +22 -0
- package/esm/modules/ai-report-v3/components/AIEvaluate/Graph.js +272 -0
- package/esm/modules/ai-report-v3/components/AIEvaluate/index.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/AIEvaluate/index.js +32 -0
- package/esm/modules/ai-report-v3/components/Candidate/Candidate.d.ts +7 -0
- package/esm/modules/ai-report-v3/components/Candidate/Candidate.js +55 -0
- package/esm/modules/ai-report-v3/components/Candidate/Interface.d.ts +16 -0
- package/esm/modules/ai-report-v3/components/Candidate/Interface.js +1 -0
- package/esm/modules/ai-report-v3/components/Candidate/Podium.d.ts +6 -0
- package/esm/modules/ai-report-v3/components/Candidate/Podium.js +50 -0
- package/esm/modules/ai-report-v3/components/Candidate/index.d.ts +2 -0
- package/esm/modules/ai-report-v3/components/Candidate/index.js +2 -0
- package/esm/modules/ai-report-v3/components/CapabilityTable/CapabilityTable.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/CapabilityTable/CapabilityTable.js +62 -0
- package/esm/modules/ai-report-v3/components/CheatRisk/CheatRisk.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/CheatRisk/CheatRisk.js +42 -0
- package/esm/modules/ai-report-v3/components/Form/Form.d.ts +23 -0
- package/esm/modules/ai-report-v3/components/Form/Form.js +67 -0
- package/esm/modules/ai-report-v3/components/Form/Forms.d.ts +9 -0
- package/esm/modules/ai-report-v3/components/Form/Forms.js +45 -0
- package/esm/modules/ai-report-v3/components/Form/Nps.d.ts +6 -0
- package/esm/modules/ai-report-v3/components/Form/Nps.js +57 -0
- package/esm/modules/ai-report-v3/components/Form/index.d.ts +1 -0
- package/esm/modules/ai-report-v3/components/Form/index.js +1 -0
- package/esm/modules/ai-report-v3/components/Form/interface.d.ts +57 -0
- package/esm/modules/ai-report-v3/components/Form/interface.js +1 -0
- package/esm/modules/ai-report-v3/components/MenuAnchor/index.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/MenuAnchor/index.js +130 -0
- package/esm/modules/ai-report-v3/components/ModuleTitle.d.ts +5 -0
- package/esm/modules/ai-report-v3/components/ModuleTitle.js +24 -0
- package/esm/modules/ai-report-v3/components/NotFinish/index.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/NotFinish/index.js +32 -0
- package/esm/modules/ai-report-v3/components/RankingRange/Item.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/RankingRange/Item.js +46 -0
- package/esm/modules/ai-report-v3/components/RankingRange/index.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/RankingRange/index.js +187 -0
- package/esm/modules/ai-report-v3/components/RankingRange/interface.d.ts +26 -0
- package/esm/modules/ai-report-v3/components/RankingRange/interface.js +1 -0
- package/esm/modules/ai-report-v3/components/RankingRange/styled.d.ts +7 -0
- package/esm/modules/ai-report-v3/components/RankingRange/styled.js +11 -0
- package/esm/modules/ai-report-v3/components/ReportHeader/ReportHeader.d.ts +17 -0
- package/esm/modules/ai-report-v3/components/ReportHeader/ReportHeader.js +105 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Bar.d.ts +6 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Bar.js +68 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Failed.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Failed.js +33 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/RecommendIcon.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/RecommendIcon.js +17 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Report.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Report.js +22 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Score.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Score.js +83 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/ScoreLegend.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/ScoreLegend.js +33 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Tips.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/Tips.js +18 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/index.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/index.js +39 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/interface.d.ts +20 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/interface.js +1 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/styled.d.ts +22 -0
- package/esm/modules/ai-report-v3/components/ScoreReport/styled.js +21 -0
- package/esm/modules/ai-report-v3/components/SectionTabs/SectionTabs.d.ts +11 -0
- package/esm/modules/ai-report-v3/components/SectionTabs/SectionTabs.js +114 -0
- package/esm/modules/ai-report-v3/components/Suggestion/Suggestion.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/Suggestion/Suggestion.js +31 -0
- package/esm/modules/ai-report-v3/components/Suggestion/index.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/Suggestion/index.js +27 -0
- package/esm/modules/ai-report-v3/components/V3Header/V3Header.d.ts +11 -0
- package/esm/modules/ai-report-v3/components/V3Header/V3Header.js +154 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/Abilities.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/Abilities.js +42 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/BodyImages.d.ts +7 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/BodyImages.js +56 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/Evaluate.d.ts +11 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/Evaluate.js +79 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/QuestionItem.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/QuestionItem.js +145 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/ScoreSlider.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/ScoreSlider.js +47 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/SingleChoice.d.ts +8 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/SingleChoice.js +31 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/Workplaces.d.ts +10 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/Workplaces.js +91 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/index.d.ts +6 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/index.js +24 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/interface.d.ts +17 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/interface.js +1 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/styled.d.ts +72 -0
- package/esm/modules/ai-report-v3/components/VideoQuestion/styled.js +93 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/ScoreSlider.d.ts +4 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/ScoreSlider.js +24 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/WorkPlace.d.ts +12 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/WorkPlace.js +72 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/index.d.ts +3 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/index.js +70 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/interface.d.ts +7 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/interface.js +1 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/styled.d.ts +62 -0
- package/esm/modules/ai-report-v3/components/WorkPlaces/styled.js +27 -0
- package/esm/modules/ai-report-v3/components/styled.d.ts +42 -0
- package/esm/modules/ai-report-v3/components/styled.js +140 -0
- package/esm/modules/ai-report-v3/index.d.ts +4 -0
- package/esm/modules/ai-report-v3/index.js +20 -0
- package/esm/modules/ai-report-v3/interface.d.ts +257 -0
- package/esm/modules/ai-report-v3/interface.js +1 -0
- package/esm/modules/ai-report-v3/useAiReport.d.ts +37 -0
- package/esm/modules/ai-report-v3/useAiReport.js +18 -0
- package/esm/modules/ai-report-v3/useAiReportVersion.d.ts +5 -0
- package/esm/modules/ai-report-v3/useAiReportVersion.js +45 -0
- package/esm/modules/ai-report-v3/utils.d.ts +1 -0
- package/esm/modules/ai-report-v3/utils.js +1 -0
- package/lib/components/Charts/ReportPie.js +2 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.js +5 -1
- package/lib/modules/ai-report/components/AIEvaluate/index.js +1 -1
- package/lib/modules/ai-report/interface.d.ts +28 -0
- package/lib/modules/ai-report-v3/Root.d.ts +4 -0
- package/lib/modules/ai-report-v3/Root.js +115 -0
- package/lib/modules/ai-report-v3/components/AIEvaluate/Evaluate.d.ts +11 -0
- package/lib/modules/ai-report-v3/components/AIEvaluate/Evaluate.js +81 -0
- package/lib/modules/ai-report-v3/components/AIEvaluate/Graph.d.ts +22 -0
- package/lib/modules/ai-report-v3/components/AIEvaluate/Graph.js +276 -0
- package/lib/modules/ai-report-v3/components/AIEvaluate/index.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/AIEvaluate/index.js +37 -0
- package/lib/modules/ai-report-v3/components/Candidate/Candidate.d.ts +7 -0
- package/lib/modules/ai-report-v3/components/Candidate/Candidate.js +57 -0
- package/lib/modules/ai-report-v3/components/Candidate/Interface.d.ts +16 -0
- package/lib/modules/ai-report-v3/components/Candidate/Interface.js +2 -0
- package/lib/modules/ai-report-v3/components/Candidate/Podium.d.ts +6 -0
- package/lib/modules/ai-report-v3/components/Candidate/Podium.js +52 -0
- package/lib/modules/ai-report-v3/components/Candidate/index.d.ts +2 -0
- package/lib/modules/ai-report-v3/components/Candidate/index.js +10 -0
- package/lib/modules/ai-report-v3/components/CapabilityTable/CapabilityTable.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/CapabilityTable/CapabilityTable.js +64 -0
- package/lib/modules/ai-report-v3/components/CheatRisk/CheatRisk.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/CheatRisk/CheatRisk.js +44 -0
- package/lib/modules/ai-report-v3/components/Form/Form.d.ts +23 -0
- package/lib/modules/ai-report-v3/components/Form/Form.js +73 -0
- package/lib/modules/ai-report-v3/components/Form/Forms.d.ts +9 -0
- package/lib/modules/ai-report-v3/components/Form/Forms.js +50 -0
- package/lib/modules/ai-report-v3/components/Form/Nps.d.ts +6 -0
- package/lib/modules/ai-report-v3/components/Form/Nps.js +59 -0
- package/lib/modules/ai-report-v3/components/Form/index.d.ts +1 -0
- package/lib/modules/ai-report-v3/components/Form/index.js +8 -0
- package/lib/modules/ai-report-v3/components/Form/interface.d.ts +57 -0
- package/lib/modules/ai-report-v3/components/Form/interface.js +2 -0
- package/lib/modules/ai-report-v3/components/MenuAnchor/index.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/MenuAnchor/index.js +132 -0
- package/lib/modules/ai-report-v3/components/ModuleTitle.d.ts +5 -0
- package/lib/modules/ai-report-v3/components/ModuleTitle.js +28 -0
- package/lib/modules/ai-report-v3/components/NotFinish/index.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/NotFinish/index.js +34 -0
- package/lib/modules/ai-report-v3/components/RankingRange/Item.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/RankingRange/Item.js +48 -0
- package/lib/modules/ai-report-v3/components/RankingRange/index.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/RankingRange/index.js +192 -0
- package/lib/modules/ai-report-v3/components/RankingRange/interface.d.ts +26 -0
- package/lib/modules/ai-report-v3/components/RankingRange/interface.js +2 -0
- package/lib/modules/ai-report-v3/components/RankingRange/styled.d.ts +7 -0
- package/lib/modules/ai-report-v3/components/RankingRange/styled.js +14 -0
- package/lib/modules/ai-report-v3/components/ReportHeader/ReportHeader.d.ts +17 -0
- package/lib/modules/ai-report-v3/components/ReportHeader/ReportHeader.js +110 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Bar.d.ts +6 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Bar.js +70 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Failed.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Failed.js +34 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/RecommendIcon.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/RecommendIcon.js +22 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Report.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Report.js +27 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Score.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Score.js +86 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/ScoreLegend.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/ScoreLegend.js +35 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Tips.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/Tips.js +20 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/index.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/index.js +44 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/interface.d.ts +20 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/interface.js +2 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/styled.d.ts +22 -0
- package/lib/modules/ai-report-v3/components/ScoreReport/styled.js +24 -0
- package/lib/modules/ai-report-v3/components/SectionTabs/SectionTabs.d.ts +11 -0
- package/lib/modules/ai-report-v3/components/SectionTabs/SectionTabs.js +116 -0
- package/lib/modules/ai-report-v3/components/Suggestion/Suggestion.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/Suggestion/Suggestion.js +33 -0
- package/lib/modules/ai-report-v3/components/Suggestion/index.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/Suggestion/index.js +32 -0
- package/lib/modules/ai-report-v3/components/V3Header/V3Header.d.ts +11 -0
- package/lib/modules/ai-report-v3/components/V3Header/V3Header.js +159 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/Abilities.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/Abilities.js +47 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/BodyImages.d.ts +7 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/BodyImages.js +61 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/Evaluate.d.ts +11 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/Evaluate.js +81 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/QuestionItem.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/QuestionItem.js +150 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/ScoreSlider.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/ScoreSlider.js +49 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/SingleChoice.d.ts +8 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/SingleChoice.js +33 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/Workplaces.d.ts +10 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/Workplaces.js +93 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/index.d.ts +6 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/index.js +29 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/interface.d.ts +17 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/interface.js +2 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/styled.d.ts +72 -0
- package/lib/modules/ai-report-v3/components/VideoQuestion/styled.js +96 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/ScoreSlider.d.ts +4 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/ScoreSlider.js +26 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/WorkPlace.d.ts +12 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/WorkPlace.js +74 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/index.d.ts +3 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/index.js +75 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/interface.d.ts +7 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/interface.js +2 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/styled.d.ts +62 -0
- package/lib/modules/ai-report-v3/components/WorkPlaces/styled.js +30 -0
- package/lib/modules/ai-report-v3/components/styled.d.ts +42 -0
- package/lib/modules/ai-report-v3/components/styled.js +146 -0
- package/lib/modules/ai-report-v3/index.d.ts +4 -0
- package/lib/modules/ai-report-v3/index.js +25 -0
- package/lib/modules/ai-report-v3/interface.d.ts +257 -0
- package/lib/modules/ai-report-v3/interface.js +2 -0
- package/lib/modules/ai-report-v3/useAiReport.d.ts +37 -0
- package/lib/modules/ai-report-v3/useAiReport.js +25 -0
- package/lib/modules/ai-report-v3/useAiReportVersion.d.ts +5 -0
- package/lib/modules/ai-report-v3/useAiReportVersion.js +49 -0
- package/lib/modules/ai-report-v3/utils.d.ts +1 -0
- package/lib/modules/ai-report-v3/utils.js +5 -0
- package/package.json +2 -2
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
import { REPORT_MODULE_MAP } from "../../../../constants/ai-report";
|
|
30
|
+
import { PostAiInterviewResult } from "../../../../services/ai-report";
|
|
31
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
32
|
+
import { useRequest } from 'ahooks';
|
|
33
|
+
import { Box, MenuIcon } from 'fbm-ui';
|
|
34
|
+
import { List, ListItem, ListItemButton, ListItemText, Popover } from 'fbm-ui/lib/mui';
|
|
35
|
+
import { forwardRef, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
36
|
+
var MenuAnchor = forwardRef(function (props) {
|
|
37
|
+
var _a = __read(useState(null), 2), anchorEl = _a[0], setAnchorEl = _a[1];
|
|
38
|
+
var open = Boolean(anchorEl);
|
|
39
|
+
// 接口请求
|
|
40
|
+
var token = props.token, showAiDimension = props.showAiDimension;
|
|
41
|
+
var firstLoad = useRef(true);
|
|
42
|
+
var _b = __read(useState([]), 2), list = _b[0], setList = _b[1];
|
|
43
|
+
var _c = useAiReportStore(), reportResult = _c.reportResult, updateState = _c.updateState, updateReportResult = _c.updateReportResult;
|
|
44
|
+
var postAiInterviewResult = useRequest(function () { return PostAiInterviewResult([token]); }, {
|
|
45
|
+
manual: true,
|
|
46
|
+
onSuccess: function (_a) {
|
|
47
|
+
var list = _a.data.list;
|
|
48
|
+
var result = list[0];
|
|
49
|
+
updateReportResult(result);
|
|
50
|
+
if (firstLoad.current) {
|
|
51
|
+
firstLoad.current = false;
|
|
52
|
+
handleMenuList(result);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
}).run;
|
|
56
|
+
useEffect(function () {
|
|
57
|
+
firstLoad.current = true;
|
|
58
|
+
postAiInterviewResult();
|
|
59
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
60
|
+
}, [token]);
|
|
61
|
+
useEffect(function () {
|
|
62
|
+
updateState(props);
|
|
63
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
|
+
}, [props]);
|
|
65
|
+
// 处理菜单数据
|
|
66
|
+
var handleMenuList = function (reportResult) {
|
|
67
|
+
if (!reportResult.status) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
var resList = [REPORT_MODULE_MAP['videoQuestion']];
|
|
71
|
+
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;
|
|
72
|
+
if (showAiDimension) {
|
|
73
|
+
if (suggestion === null || suggestion === void 0 ? void 0 : suggestion.show) {
|
|
74
|
+
resList.unshift(REPORT_MODULE_MAP['suggestion']);
|
|
75
|
+
}
|
|
76
|
+
if (collection.length > 0 && evaluations.length > 0) {
|
|
77
|
+
resList.unshift(REPORT_MODULE_MAP['evaluate']);
|
|
78
|
+
}
|
|
79
|
+
if (workplaces.length > 0) {
|
|
80
|
+
resList.unshift(REPORT_MODULE_MAP['workplace']);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (collection.length > 0) {
|
|
84
|
+
resList.unshift(REPORT_MODULE_MAP['score']);
|
|
85
|
+
}
|
|
86
|
+
setList(resList);
|
|
87
|
+
};
|
|
88
|
+
var handlePopoverOpen = function (event) {
|
|
89
|
+
setAnchorEl(event.currentTarget);
|
|
90
|
+
};
|
|
91
|
+
var handlePopoverClose = function () {
|
|
92
|
+
setAnchorEl(null);
|
|
93
|
+
};
|
|
94
|
+
var scrollToAnchor = useCallback(function (id) {
|
|
95
|
+
if (id) {
|
|
96
|
+
var anchorEle = document.getElementById(id);
|
|
97
|
+
if (anchorEle) {
|
|
98
|
+
anchorEle.scrollIntoView({ block: 'start', behavior: 'smooth' });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}, []);
|
|
102
|
+
var content = useMemo(function () {
|
|
103
|
+
return (_jsx(List, __assign({ style: { minWidth: 150 }, onMouseLeave: handlePopoverClose }, { children: list.map(function (_a) {
|
|
104
|
+
var name = _a.name, id = _a.id;
|
|
105
|
+
return (_jsx(ListItem, __assign({ disablePadding: true }, { children: _jsx(ListItemButton, __assign({ onClick: function () { return scrollToAnchor(id); } }, { children: _jsx(ListItemText, { primary: name }) })) }), id));
|
|
106
|
+
}) })));
|
|
107
|
+
}, [scrollToAnchor, list]);
|
|
108
|
+
return (_jsxs(_Fragment, { children: [(reportResult === null || reportResult === void 0 ? void 0 : reportResult.status) && (_jsx(Box, __assign({ style: {
|
|
109
|
+
display: 'flex',
|
|
110
|
+
alignItems: 'center',
|
|
111
|
+
justifyContent: 'center',
|
|
112
|
+
position: 'absolute',
|
|
113
|
+
top: 20,
|
|
114
|
+
right: -10,
|
|
115
|
+
zIndex: 999,
|
|
116
|
+
height: 32,
|
|
117
|
+
width: 32,
|
|
118
|
+
backgroundColor: '#fff',
|
|
119
|
+
borderRadius: 4,
|
|
120
|
+
boxShadow: '0px 2px 4px rgba(0,0,0, 0.08)',
|
|
121
|
+
}, "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: {
|
|
122
|
+
vertical: 'bottom',
|
|
123
|
+
horizontal: 'right',
|
|
124
|
+
}, transformOrigin: {
|
|
125
|
+
vertical: -8,
|
|
126
|
+
horizontal: 'right',
|
|
127
|
+
}, onClose: handlePopoverClose }, { children: content }))] }));
|
|
128
|
+
});
|
|
129
|
+
MenuAnchor.displayName = 'MenuAnchor';
|
|
130
|
+
export default memo(MenuAnchor);
|
|
@@ -0,0 +1,24 @@
|
|
|
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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Box, Typography } from 'fbm-ui';
|
|
14
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
15
|
+
export var ModuleTitle = function (_a) {
|
|
16
|
+
var title = _a.title, action = _a.action;
|
|
17
|
+
return (_jsxs(Box, { children: [_jsxs(Box, __assign({ sx: { position: 'relative' } }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [_jsx(Box, { sx: {
|
|
18
|
+
width: 16,
|
|
19
|
+
height: 16,
|
|
20
|
+
borderRadius: '50%',
|
|
21
|
+
flexShrink: 0,
|
|
22
|
+
background: 'linear-gradient(158deg, #5EE2B8 2.38%, #41C446 97.38%)',
|
|
23
|
+
} }), _jsx(Typography, __assign({ fontWeight: 700, sx: { color: 'rgba(0,0,0,0.86)', fontSize: 16, lineHeight: '24px' } }, { children: title }))] })), action && _jsx(Box, __assign({ sx: { position: 'absolute', top: 0, right: 0 } }, { children: action }))] })), _jsx(Box, { sx: { height: 2, mt: 1, borderRadius: 2, background: 'linear-gradient(90deg, #5EE2B8 0%, rgba(94,226,184,0) 100%)' } })] }));
|
|
24
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { COMPLETED_STATUS } from "../../../../enum/ai-report";
|
|
14
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
15
|
+
import { Alert, Box, Typography } from 'fbm-ui';
|
|
16
|
+
var PrintScreen = function (_a) {
|
|
17
|
+
var screenSwitchCount = _a.screenSwitchCount;
|
|
18
|
+
if (screenSwitchCount > 0) {
|
|
19
|
+
return (_jsx(Box, __assign({ mb: 2 }, { children: _jsx(Alert, __assign({ type: "warning" }, { children: _jsxs(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: ["\u8BE5\u5019\u9009\u4EBA\u9762\u8BD5\u671F\u95F4\u622A\u5F55\u5C4F\u6216\u5207\u6362\u9875\u9762 ", screenSwitchCount, " \u6B21\u3002"] })) })) })));
|
|
20
|
+
}
|
|
21
|
+
return null;
|
|
22
|
+
};
|
|
23
|
+
var NotFinish = function () {
|
|
24
|
+
var _a = useAiReportStore(function (store) { return [store.reportResult, store.interviewCheat]; }), reportResult = _a.reportResult, interviewCheat = _a.interviewCheat;
|
|
25
|
+
var _b = reportResult || {}, _c = _b.completedStatus, completedStatus = _c === void 0 ? 1 : _c, _d = _b.screenSwitchCount, screenSwitchCount = _d === void 0 ? 0 : _d;
|
|
26
|
+
var _e = interviewCheat || {}, isCheat = _e.isCheat, info = _e.info;
|
|
27
|
+
if (completedStatus === COMPLETED_STATUS.NOT_COMPLETED || isCheat) {
|
|
28
|
+
return (_jsxs(Box, __assign({ mb: 2 }, { children: [_jsx(PrintScreen, { screenSwitchCount: screenSwitchCount }), _jsx(Alert, __assign({ type: isCheat ? 'error' : 'warning' }, { children: _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: info || '该候选人尚未回答完所有题目,建议提醒候选人完成面试' })) }))] })));
|
|
29
|
+
}
|
|
30
|
+
return _jsx(PrintScreen, { screenSwitchCount: screenSwitchCount });
|
|
31
|
+
};
|
|
32
|
+
export default NotFinish;
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
import { memo, useCallback, useEffect, useState } from 'react';
|
|
30
|
+
import { Box, CloseIcon, IconButton, Typography } from 'fbm-ui';
|
|
31
|
+
import { RangeInput, RangeTypography } from './styled';
|
|
32
|
+
var RankingRangeItem = function (props) {
|
|
33
|
+
var item = props.item, disabled = props.disabled, index = props.index, onChange = props.onChange, onDelete = props.onDelete;
|
|
34
|
+
var _a = __read(useState('0'), 2), endRankProportion = _a[0], setEndRankProportion = _a[1];
|
|
35
|
+
useEffect(function () {
|
|
36
|
+
setEndRankProportion(item.scoreRankIntervals.endRankProportion.toString());
|
|
37
|
+
}, [item]);
|
|
38
|
+
var handleChange = useCallback(function (value) {
|
|
39
|
+
var isIntegerReg = /^[1-9]\d*$/;
|
|
40
|
+
if (isIntegerReg.test(value) || !value) {
|
|
41
|
+
setEndRankProportion(value);
|
|
42
|
+
}
|
|
43
|
+
}, []);
|
|
44
|
+
return (_jsxs(Box, __assign({ display: "flex", sx: { mb: 1 } }, { children: [_jsx(Box, __assign({ flex: "1 0" }, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(RangeInput, { size: "small", disabled: true, value: item.scoreRankIntervals.startRankProportion, endAdornment: "%" }), _jsx(Typography, __assign({ sx: { pl: 1, pr: 1 } }, { children: "-" })), _jsx(RangeInput, { size: "small", disabled: disabled, endAdornment: "%", value: endRankProportion, onChange: function (e) { return handleChange(e.target.value); }, onBlur: function () { return onChange(endRankProportion ? Number(endRankProportion) : 1, index); } }), index !== 0 && (_jsx(IconButton, __assign({ sx: { ml: 1 }, onClick: function () { return onDelete(index); } }, { children: _jsx(CloseIcon, {}) })))] })) })), _jsxs(Box, __assign({ display: "flex", flex: "1 0" }, { children: [_jsx(RangeTypography, __assign({ variant: "body1" }, { children: item.score.startScore.toFixed(2) })), _jsx(RangeTypography, __assign({ variant: "body1", sx: { pl: 1, pr: 1 } }, { children: "-" })), _jsx(RangeTypography, __assign({ variant: "body1" }, { children: item.score.endScore.toFixed(2) })), _jsx(RangeTypography, __assign({ variant: "body1", sx: { pl: 1 } }, { children: "\u5206" }))] }))] })));
|
|
45
|
+
};
|
|
46
|
+
export default memo(RankingRangeItem);
|
|
@@ -0,0 +1,187 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
49
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
50
|
+
if (!m) return o;
|
|
51
|
+
var i = m.call(o), r, ar = [], e;
|
|
52
|
+
try {
|
|
53
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
54
|
+
}
|
|
55
|
+
catch (error) { e = { error: error }; }
|
|
56
|
+
finally {
|
|
57
|
+
try {
|
|
58
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
59
|
+
}
|
|
60
|
+
finally { if (e) throw e.error; }
|
|
61
|
+
}
|
|
62
|
+
return ar;
|
|
63
|
+
};
|
|
64
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
65
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
66
|
+
import { AddIcon, Box, Button, Dialog, Message, Typography } from 'fbm-ui';
|
|
67
|
+
import { useImmer } from 'use-immer';
|
|
68
|
+
import ScrollDialogContent from "../../../../components/ScrollDialogContent";
|
|
69
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
70
|
+
import RankingRangeItem from './Item';
|
|
71
|
+
var RankingRange = function (_a) {
|
|
72
|
+
var open = _a.open, onClose = _a.onClose;
|
|
73
|
+
var isCall = useRef(false);
|
|
74
|
+
var _b = __read(useState(false), 2), loading = _b[0], setLoading = _b[1];
|
|
75
|
+
var _c = __read(useImmer([]), 2), interval = _c[0], updateInterval = _c[1];
|
|
76
|
+
var _d = useAiReportStore(function (store) { return [store.scoreRankIntervals]; }), scoreRankIntervals = _d.scoreRankIntervals, onScoreRankIntervalsChange = _d.onScoreRankIntervalsChange, onScoreRankIntervalsSubmit = _d.onScoreRankIntervalsSubmit;
|
|
77
|
+
var formatScoreRankIntervals = useCallback(function (scoreRankIntervals) {
|
|
78
|
+
isCall.current = false;
|
|
79
|
+
updateInterval(scoreRankIntervals.map(function (item) { return (__assign(__assign({}, item), { scoreRankIntervals: {
|
|
80
|
+
startRankProportion: item.scoreRankIntervals.startRankProportion * 100,
|
|
81
|
+
endRankProportion: item.scoreRankIntervals.endRankProportion * 100,
|
|
82
|
+
} })); }));
|
|
83
|
+
}, [updateInterval]);
|
|
84
|
+
useEffect(function () {
|
|
85
|
+
formatScoreRankIntervals(scoreRankIntervals || []);
|
|
86
|
+
}, [scoreRankIntervals, formatScoreRankIntervals]);
|
|
87
|
+
useEffect(function () {
|
|
88
|
+
var rankIntervals = interval.map(function (_a) {
|
|
89
|
+
var _b = _a.scoreRankIntervals, startRankProportion = _b.startRankProportion, endRankProportion = _b.endRankProportion;
|
|
90
|
+
return ({
|
|
91
|
+
startRankProportion: startRankProportion / 100,
|
|
92
|
+
endRankProportion: endRankProportion / 100,
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
if (isCall.current) {
|
|
96
|
+
onScoreRankIntervalsChange && onScoreRankIntervalsChange(rankIntervals);
|
|
97
|
+
}
|
|
98
|
+
}, [interval, onScoreRankIntervalsChange]);
|
|
99
|
+
var handleAdd = useCallback(function () {
|
|
100
|
+
var lastItem = interval[interval.length - 1];
|
|
101
|
+
var lastStartRankProportion = lastItem === null || lastItem === void 0 ? void 0 : lastItem.scoreRankIntervals.startRankProportion;
|
|
102
|
+
if (interval.length === 5) {
|
|
103
|
+
Message.error('最多添加5条记录');
|
|
104
|
+
}
|
|
105
|
+
else if (lastStartRankProportion === 99) {
|
|
106
|
+
Message.error('最后一条记录起始值为99无法分割');
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
updateInterval(function (draft) {
|
|
110
|
+
var insertStartRank = lastItem ? Math.ceil(lastStartRankProportion + (99 - lastStartRankProportion) / 2) : 100;
|
|
111
|
+
draft.splice(interval.length - 1, 0, {
|
|
112
|
+
rank: interval.length,
|
|
113
|
+
score: {
|
|
114
|
+
startScore: 0,
|
|
115
|
+
endScore: 0,
|
|
116
|
+
isFloat: false,
|
|
117
|
+
isInInterval: false,
|
|
118
|
+
},
|
|
119
|
+
scoreRankIntervals: {
|
|
120
|
+
startRankProportion: lastItem ? lastStartRankProportion : 0,
|
|
121
|
+
endRankProportion: insertStartRank,
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
draft[interval.length].scoreRankIntervals.startRankProportion = lastItem ? insertStartRank : 0;
|
|
125
|
+
});
|
|
126
|
+
isCall.current = true;
|
|
127
|
+
}
|
|
128
|
+
}, [interval, updateInterval]);
|
|
129
|
+
var handleChange = useCallback(function (value, index) {
|
|
130
|
+
var prevValue = index === 0 ? 1 : interval[index - 1].scoreRankIntervals.endRankProportion + 1;
|
|
131
|
+
var nextValue = index === interval.length - 1 ? 100 : interval[index + 1].scoreRankIntervals.endRankProportion;
|
|
132
|
+
var canChange = value >= prevValue && value <= nextValue && value !== interval[index].scoreRankIntervals.endRankProportion;
|
|
133
|
+
if (canChange) {
|
|
134
|
+
updateInterval(function (draft) {
|
|
135
|
+
draft[index].scoreRankIntervals.endRankProportion = value;
|
|
136
|
+
draft[index + 1].scoreRankIntervals.startRankProportion = value;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
updateInterval(function (draft) {
|
|
141
|
+
draft[index] = __assign({}, interval[index]);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
isCall.current = true;
|
|
145
|
+
}, [interval, updateInterval]);
|
|
146
|
+
var handleDelete = useCallback(function (index) {
|
|
147
|
+
updateInterval(function (draft) {
|
|
148
|
+
var deleteItem = interval[index];
|
|
149
|
+
draft.splice(index, 1);
|
|
150
|
+
draft[index - 1].scoreRankIntervals.endRankProportion = deleteItem.scoreRankIntervals.endRankProportion;
|
|
151
|
+
});
|
|
152
|
+
isCall.current = true;
|
|
153
|
+
}, [interval, updateInterval]);
|
|
154
|
+
var handleOk = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
155
|
+
var rankIntervals, error_1;
|
|
156
|
+
return __generator(this, function (_a) {
|
|
157
|
+
switch (_a.label) {
|
|
158
|
+
case 0:
|
|
159
|
+
if (!onScoreRankIntervalsSubmit) return [3 /*break*/, 4];
|
|
160
|
+
rankIntervals = interval.map(function (_a) {
|
|
161
|
+
var _b = _a.scoreRankIntervals, startRankProportion = _b.startRankProportion, endRankProportion = _b.endRankProportion;
|
|
162
|
+
return ({
|
|
163
|
+
startRankProportion: startRankProportion / 100,
|
|
164
|
+
endRankProportion: endRankProportion / 100,
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
setLoading(true);
|
|
168
|
+
_a.label = 1;
|
|
169
|
+
case 1:
|
|
170
|
+
_a.trys.push([1, 3, , 4]);
|
|
171
|
+
return [4 /*yield*/, onScoreRankIntervalsSubmit(rankIntervals)];
|
|
172
|
+
case 2:
|
|
173
|
+
_a.sent();
|
|
174
|
+
setLoading(false);
|
|
175
|
+
onClose();
|
|
176
|
+
return [3 /*break*/, 4];
|
|
177
|
+
case 3:
|
|
178
|
+
error_1 = _a.sent();
|
|
179
|
+
setLoading(false);
|
|
180
|
+
return [3 /*break*/, 4];
|
|
181
|
+
case 4: return [2 /*return*/];
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}); };
|
|
185
|
+
return (_jsx(Dialog, __assign({ open: open, title: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E", size: "sm", okProps: { loading: loading }, onClose: onClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: _jsxs(Box, __assign({ sx: { padding: 3 } }, { children: [_jsxs(Box, __assign({ display: "flex", sx: { mb: 2 } }, { children: [_jsx(Typography, __assign({ flex: "1 0", variant: "body1" }, { children: "\u6392\u540D\u524D" })), _jsx(Typography, __assign({ flex: "1 0", variant: "body1" }, { children: "\u5206\u6570" }))] })), interval.map(function (item, index) { return (_jsx(RankingRangeItem, { item: item, index: index, disabled: index === interval.length - 1, onChange: handleChange, onDelete: handleDelete }, item.rank)); }), _jsx(Button, __assign({ icon: _jsx(AddIcon, {}), sx: { mt: 2 }, variant: "outlined", color: "inherit", onClick: handleAdd }, { children: "\u6DFB\u52A0\u6392\u540D\u533A\u95F4" }))] })) }) })));
|
|
186
|
+
};
|
|
187
|
+
export default RankingRange;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ScoreRankIntervals {
|
|
2
|
+
startRankProportion: number;
|
|
3
|
+
endRankProportion: number;
|
|
4
|
+
}
|
|
5
|
+
export interface Score {
|
|
6
|
+
startScore: number;
|
|
7
|
+
endScore: number;
|
|
8
|
+
isFloat: boolean;
|
|
9
|
+
isInInterval: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ScoreRankInterval {
|
|
12
|
+
rank: number;
|
|
13
|
+
scoreRankIntervals: ScoreRankIntervals;
|
|
14
|
+
score: Score;
|
|
15
|
+
}
|
|
16
|
+
export interface RankingRangeItemProps {
|
|
17
|
+
index: number;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
item: ScoreRankInterval;
|
|
20
|
+
onChange: (value: number, index: number) => void;
|
|
21
|
+
onDelete: (index: number) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface RankingRangeProps {
|
|
24
|
+
open: boolean;
|
|
25
|
+
onClose: () => void;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const RangeInput: import("@emotion/styled").StyledComponent<import("fbm-ui").BaseInputProps & import("@mui/material").OutlinedInputProps & import("@mui/material").InputProps & {
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
+
export declare const RangeTypography: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Typography").TypographyProps & {
|
|
6
|
+
children?: import("react").ReactNode;
|
|
7
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Input, styled, Typography } from 'fbm-ui';
|
|
2
|
+
export var RangeInput = styled(Input)({
|
|
3
|
+
width: 82,
|
|
4
|
+
});
|
|
5
|
+
export var RangeTypography = styled(Typography)(function (_a) {
|
|
6
|
+
var theme = _a.theme;
|
|
7
|
+
return ({
|
|
8
|
+
color: "".concat(theme.palette.primary.main, " !important"),
|
|
9
|
+
lineHeight: '38px !important',
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AiReportUrl, CandidateInfo } from '../Candidate/Interface';
|
|
3
|
+
export interface ReportHeaderProps {
|
|
4
|
+
status: number;
|
|
5
|
+
customScore?: number;
|
|
6
|
+
onRefreshSuccess: () => void;
|
|
7
|
+
fetchCandidateInfo: () => Promise<CandidateInfo>;
|
|
8
|
+
fetchReportUrl: () => Promise<AiReportUrl>;
|
|
9
|
+
}
|
|
10
|
+
declare const ReportHeader: ({ customScore, onRefreshSuccess, fetchCandidateInfo, status, fetchReportUrl }: {
|
|
11
|
+
customScore: any;
|
|
12
|
+
onRefreshSuccess: any;
|
|
13
|
+
fetchCandidateInfo: any;
|
|
14
|
+
status: any;
|
|
15
|
+
fetchReportUrl: any;
|
|
16
|
+
}) => JSX.Element;
|
|
17
|
+
export default ReportHeader;
|
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
import AIEvaluate from '../AIEvaluate';
|
|
30
|
+
import { CandidateReport, PodiumReport } from '../Candidate';
|
|
31
|
+
import { DinTypography, ReportBadge, ReportLabel } from '../styled';
|
|
32
|
+
import { INTERVIEW_STATUS } from "../../../../enum/ai-report";
|
|
33
|
+
import { PostAiInterviewRefresh } from "../../../../services/ai-report";
|
|
34
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
35
|
+
import { formatScore } from "../../../../utils/utils";
|
|
36
|
+
import { useRequest } from 'ahooks';
|
|
37
|
+
import dayjs from 'dayjs';
|
|
38
|
+
import { RefreshIcon, ShareIcon } from 'fbm-icons';
|
|
39
|
+
import { Box, Button, IconButton, Message, Popover, Typography } from 'fbm-ui';
|
|
40
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
41
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
42
|
+
var ReportHeader = function (_a) {
|
|
43
|
+
var customScore = _a.customScore, onRefreshSuccess = _a.onRefreshSuccess, fetchCandidateInfo = _a.fetchCandidateInfo, status = _a.status, fetchReportUrl = _a.fetchReportUrl;
|
|
44
|
+
var _b = __read(useState(false), 2), openRefresh = _b[0], setOpenRefresh = _b[1];
|
|
45
|
+
var _c = __read(useState(null), 2), reportUrl = _c[0], setReportUrl = _c[1];
|
|
46
|
+
var _d = useAiReportStore(function (store) { return [
|
|
47
|
+
store.token,
|
|
48
|
+
store.reportResult,
|
|
49
|
+
store.operableButtons,
|
|
50
|
+
]; }), token = _d.token, reportResult = _d.reportResult, operableButtons = _d.operableButtons, onExportReportClick = _d.onExportReportClick;
|
|
51
|
+
var _e = reportResult || {}, score = _e.score, createTime = _e.createTime, model = _e.model;
|
|
52
|
+
var _f = __read(useState(score || 0), 2), feScore = _f[0], setScore = _f[1];
|
|
53
|
+
var _g = useRequest(function () { return PostAiInterviewRefresh(token); }, {
|
|
54
|
+
manual: true,
|
|
55
|
+
onSuccess: function () {
|
|
56
|
+
onRefreshSuccess();
|
|
57
|
+
Message.success('刷新成功');
|
|
58
|
+
},
|
|
59
|
+
}), run = _g.run, loading = _g.loading;
|
|
60
|
+
var level = useMemo(function () {
|
|
61
|
+
if (feScore >= 80)
|
|
62
|
+
return 'high';
|
|
63
|
+
if (feScore >= 60)
|
|
64
|
+
return 'middle';
|
|
65
|
+
return 'low';
|
|
66
|
+
}, [feScore]);
|
|
67
|
+
useEffect(function () {
|
|
68
|
+
if (!fetchReportUrl)
|
|
69
|
+
return;
|
|
70
|
+
fetchReportUrl()
|
|
71
|
+
.then(function (_a) {
|
|
72
|
+
var url = _a.url;
|
|
73
|
+
setReportUrl(url);
|
|
74
|
+
})
|
|
75
|
+
.catch(function () { return Message.error('获取报告链接失败'); });
|
|
76
|
+
}, [fetchReportUrl]);
|
|
77
|
+
var content = (_jsxs(Box, __assign({ padding: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", color: "secondary" }, { children: "\u5237\u65B0\u540E\u5C06\u6309\u6700\u65B0\u7B97\u5206\u89C4\u5219\u8BA1\u7B97\uFF0C\u662F\u5426\u786E\u8BA4\u5237\u65B0" })), _jsx(Box, __assign({ paddingTop: 1, textAlign: "right" }, { children: _jsx(Button, __assign({ loading: loading, onClick: run }, { children: "\u5237\u65B0" })) }))] })));
|
|
78
|
+
useEffect(function () {
|
|
79
|
+
if (typeof customScore === 'number' && customScore > -1) {
|
|
80
|
+
setScore(customScore);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
setScore(score || 0);
|
|
84
|
+
}
|
|
85
|
+
if (!loading)
|
|
86
|
+
setOpenRefresh(false);
|
|
87
|
+
}, [loading, customScore, score]);
|
|
88
|
+
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: {
|
|
89
|
+
width: 'calc(100% - 180px)',
|
|
90
|
+
position: 'absolute',
|
|
91
|
+
top: 0,
|
|
92
|
+
zIndex: 2,
|
|
93
|
+
} }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", pl: 3, py: 3 }, { children: [_jsxs(Typography, __assign({ variant: "caption", sx: {
|
|
94
|
+
color: 'rgba(74, 74, 74, 0.86)',
|
|
95
|
+
} }, { 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({ onClick: function () { return setOpenRefresh(true); } }, { children: _jsx(RefreshIcon, { sx: {
|
|
96
|
+
color: '#009908',
|
|
97
|
+
} }) })) })))] })), _jsx(DinTypography, __assign({ variant: "h5", textAlign: "center", color: "#009D56", sx: { 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: "text", onClick: onExportReportClick, sx: { borderRadius: 18, border: '1px solid #4caf50' } }, { children: "\u5BFC\u51FA\u62A5\u544A" }))) : reportUrl ? (_jsx("a", __assign({ href: reportUrl, title: "\u67E5\u770B\u5728\u7EBF\u62A5\u544A", style: {
|
|
98
|
+
textDecoration: 'none',
|
|
99
|
+
} }, { children: _jsx(Button, __assign({ endIcon: _jsx(ShareIcon, {}), variant: "text", sx: { borderRadius: 18, border: '1px solid #4caf50' } }, { children: "\u67E5\u770B\u5728\u7EBF\u62A5\u544A" })) }))) : (_jsx(Box, {}))] })), _jsxs(Stack, { children: [fetchCandidateInfo && status === INTERVIEW_STATUS.COMPLETED && _jsx(CandidateReport, { fetchCandidateInfo: fetchCandidateInfo }), !fetchCandidateInfo && status === INTERVIEW_STATUS.COMPLETED && _jsx(PodiumReport, { score: formatScore(feScore || 0) }), status !== INTERVIEW_STATUS.COMPLETED && (_jsx(Box, { sx: {
|
|
100
|
+
position: 'relative',
|
|
101
|
+
width: 541,
|
|
102
|
+
height: 342,
|
|
103
|
+
} }))] }), status === INTERVIEW_STATUS.COMPLETED && (_jsx(Stack, __assign({ width: 1, direction: "row" }, { children: _jsx(AIEvaluate, {}) })))] })));
|
|
104
|
+
};
|
|
105
|
+
export default ReportHeader;
|