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,55 @@
|
|
|
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 { DinTypography, ReportAvatar, ReportTag } from '../styled';
|
|
30
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
31
|
+
import { getSecondToTime } from "../../../../utils/utils";
|
|
32
|
+
import { Box, Message, Typography } from 'fbm-ui';
|
|
33
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
34
|
+
import { memo, useEffect, useMemo, useState } from 'react';
|
|
35
|
+
var Form = function (_a) {
|
|
36
|
+
var fetchCandidateInfo = _a.fetchCandidateInfo;
|
|
37
|
+
var reportResult = useAiReportStore(function (store) { return [store.reportResult]; }).reportResult;
|
|
38
|
+
var steps = (reportResult || {}).steps;
|
|
39
|
+
var duration = useMemo(function () { return getSecondToTime((steps === null || steps === void 0 ? void 0 : steps.reduce(function (acc, cur) { return acc + cur.answer.media.durationTime; }, 0)) || 0); }, [steps]);
|
|
40
|
+
var _b = __read(useState({ name: '', mobile: '', processName: '', positionName: '', avatar: '', tags: [] }), 2), data = _b[0], setData = _b[1];
|
|
41
|
+
useEffect(function () {
|
|
42
|
+
if (fetchCandidateInfo) {
|
|
43
|
+
fetchCandidateInfo().then(setData).catch(Message.error);
|
|
44
|
+
}
|
|
45
|
+
}, [fetchCandidateInfo]);
|
|
46
|
+
var name = data.name, mobile = data.mobile, positionName = data.positionName, avatar = data.avatar, tags = data.tags;
|
|
47
|
+
return (_jsxs(Stack, __assign({ direction: "row", minHeight: 221, mt: 13.25 }, { children: [_jsx(ReportAvatar, { sx: { mx: 3 }, avatar: avatar }), _jsxs(Stack, __assign({ spacing: 1 }, { children: [_jsx(DinTypography, __assign({ sx: { fontSize: 18 } }, { children: positionName })), _jsxs(Typography, __assign({ variant: "body1" }, { children: [name, " ", mobile] })), _jsx(Box, __assign({ sx: {
|
|
48
|
+
display: 'flex',
|
|
49
|
+
flexWrap: 'wrap',
|
|
50
|
+
gap: '8px',
|
|
51
|
+
alignItems: 'flex-start',
|
|
52
|
+
width: '450px',
|
|
53
|
+
} }, { children: tags === null || tags === void 0 ? void 0 : tags.map(function (tag) { return (_jsx(ReportTag, { children: tag.name }, tag.token)); }) })), _jsxs(Typography, { children: ["\u9762\u8BD5\u65F6\u957F\uFF1A", duration] })] }))] })));
|
|
54
|
+
};
|
|
55
|
+
export default memo(Form);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface CandidateInfo {
|
|
2
|
+
avatar: string;
|
|
3
|
+
name: string;
|
|
4
|
+
mobile: string;
|
|
5
|
+
processName: string;
|
|
6
|
+
positionName: string;
|
|
7
|
+
tags: Tag[];
|
|
8
|
+
}
|
|
9
|
+
interface Tag {
|
|
10
|
+
name: string;
|
|
11
|
+
token: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AiReportUrl {
|
|
14
|
+
url: string;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { rankPercent } from '../../utils';
|
|
30
|
+
import { BeatProgressBar, DinTypography, Podium } from '../styled';
|
|
31
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
32
|
+
import { Typography } from 'fbm-ui';
|
|
33
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
34
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
35
|
+
var Form = function () {
|
|
36
|
+
var _a = __read(useState(''), 2), text = _a[0], setText = _a[1];
|
|
37
|
+
var _b = useAiReportStore(function (store) { return [store.reportResult, store.scoreRankIntervals]; }), reportResult = _b.reportResult, scoreRankIntervals = _b.scoreRankIntervals, reportRank = _b.reportRank;
|
|
38
|
+
var _c = (reportResult || {}).score, score = _c === void 0 ? 0 : _c;
|
|
39
|
+
var progress = useMemo(function () { return rankPercent((reportRank === null || reportRank === void 0 ? void 0 : reportRank.rank) || 0, (reportRank === null || reportRank === void 0 ? void 0 : reportRank.total) || 0); }, [reportRank]);
|
|
40
|
+
useEffect(function () {
|
|
41
|
+
if (reportRank === null || reportRank === void 0 ? void 0 : reportRank.total) {
|
|
42
|
+
setText("\u51FB\u8D25\u4E86".concat(progress.toFixed(0), "%\u5019\u9009\u4EBA"));
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
setText('');
|
|
46
|
+
}
|
|
47
|
+
}, [score, reportRank, scoreRankIntervals, progress]);
|
|
48
|
+
return (_jsx(Podium, { children: _jsxs(Stack, __assign({ direction: "row", position: "relative", bottom: -146, left: 88, spacing: 1.5 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", justifyContent: "center", width: 300 }, { children: [_jsx(DinTypography, __assign({ sx: { fontSize: 100, fontWeight: 'bold', lineHeight: 1 }, color: "inherit" }, { children: score })), _jsx(DinTypography, __assign({ variant: "h5", color: "inherit", sx: { fontSize: 30, fontWeight: 'bold', alignSelf: 'flex-end', mb: '12px !important' } }, { children: "\u5206" }))] })), (reportRank === null || reportRank === void 0 ? void 0 : reportRank.total) !== 0 && (_jsxs(Stack, __assign({ spacing: 1, mt: 6.25 }, { children: [_jsxs(Typography, __assign({ color: "inherit", fontWeight: 500, mt: 5 }, { children: [text, "\u00A0"] })), _jsx(BeatProgressBar, { children: _jsx("div", { className: "progress-bar-fill", style: { width: "".concat(progress, "%") } }) })] })))] })) }));
|
|
49
|
+
};
|
|
50
|
+
export default Form;
|
|
@@ -0,0 +1,62 @@
|
|
|
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, Stack } from 'fbm-ui/lib/mui';
|
|
14
|
+
import { Typography } from 'fbm-ui';
|
|
15
|
+
import { useMemo } from 'react';
|
|
16
|
+
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
17
|
+
import { formatScore } from "../../../../utils/utils";
|
|
18
|
+
var HeaderCell = function (_a) {
|
|
19
|
+
var children = _a.children, _b = _a.width, width = _b === void 0 ? 'auto' : _b;
|
|
20
|
+
return (_jsx(Box, __assign({ width: width, flexShrink: 0, py: 1, px: 1.5, bgcolor: "#EBFCF7" }, { children: _jsx(Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#00996B', fontSize: 13, lineHeight: '20px' } }, { children: children })) })));
|
|
21
|
+
};
|
|
22
|
+
var CapabilityTable = function () {
|
|
23
|
+
var reportResult = useAiReportStore(function (store) { return [store.reportResult]; }).reportResult;
|
|
24
|
+
var steps = (reportResult || {}).steps || [];
|
|
25
|
+
var rows = useMemo(function () {
|
|
26
|
+
return steps
|
|
27
|
+
.map(function (step, index) {
|
|
28
|
+
var _a, _b, _c, _d, _e, _f;
|
|
29
|
+
var name = ((_a = step.questionCollection) === null || _a === void 0 ? void 0 : _a.name) || ((_b = step.scoreInfo) === null || _b === void 0 ? void 0 : _b.workplaceName) || '';
|
|
30
|
+
return {
|
|
31
|
+
index: index,
|
|
32
|
+
step: step,
|
|
33
|
+
name: name,
|
|
34
|
+
collectionToken: ((_c = step.questionCollection) === null || _c === void 0 ? void 0 : _c.token) || '',
|
|
35
|
+
keyPoints: ((_d = step.questionCollection) === null || _d === void 0 ? void 0 : _d.keyPoints) || [],
|
|
36
|
+
evaluation: ((_e = step.scoreInfo) === null || _e === void 0 ? void 0 : _e.workplaceEvaluation) || '',
|
|
37
|
+
finalScore: (_f = step.scoreInfo) === null || _f === void 0 ? void 0 : _f.finalScore,
|
|
38
|
+
followupCount: (step.followupQuestions || []).length,
|
|
39
|
+
};
|
|
40
|
+
})
|
|
41
|
+
.filter(function (row) { return row.name || row.evaluation; });
|
|
42
|
+
}, [steps]);
|
|
43
|
+
var groupCounts = useMemo(function () {
|
|
44
|
+
var map = {};
|
|
45
|
+
rows.forEach(function (row) {
|
|
46
|
+
if (!row.collectionToken)
|
|
47
|
+
return;
|
|
48
|
+
map[row.collectionToken] = map[row.collectionToken] || { main: 0, followups: 0 };
|
|
49
|
+
map[row.collectionToken].main += 1;
|
|
50
|
+
map[row.collectionToken].followups += row.followupCount;
|
|
51
|
+
});
|
|
52
|
+
return map;
|
|
53
|
+
}, [rows]);
|
|
54
|
+
if (rows.length === 0)
|
|
55
|
+
return null;
|
|
56
|
+
return (_jsx(Box, __assign({ id: "report-capability", px: 2, mt: 3 }, { children: _jsxs(Box, __assign({ mt: 0.5, border: "1px solid #E7F4EC", borderRadius: 2, overflow: "hidden" }, { children: [_jsxs(Stack, __assign({ direction: "row" }, { children: [_jsx(HeaderCell, __assign({ width: "160px" }, { children: "\u80DC\u4EFB\u529B" })), _jsx(Box, __assign({ flex: "1", minWidth: 0 }, { children: _jsx(HeaderCell, { children: "\u5C97\u4F4D\u91CD\u70B9\u8003\u5BDF" }) })), _jsx(Box, __assign({ flex: "1", minWidth: 0 }, { children: _jsx(HeaderCell, { children: "\u9762\u8BD5\u8BC4\u4EF7" }) })), _jsx(HeaderCell, __assign({ width: "90px" }, { children: "\u5F97\u5206" }))] })), rows.map(function (row) {
|
|
57
|
+
var count = row.collectionToken ? groupCounts[row.collectionToken] : undefined;
|
|
58
|
+
var score = typeof row.finalScore === 'number' && row.finalScore > 0 ? "".concat(formatScore(row.finalScore), "\u5206") : '-';
|
|
59
|
+
return (_jsx(Box, __assign({ borderTop: "1px solid #F0F6F2" }, { children: _jsxs(Stack, __assign({ direction: "row", alignItems: "stretch" }, { children: [_jsxs(Box, __assign({ width: "160px", flexShrink: 0, p: 1.5 }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: 500, sx: { color: 'rgba(0,0,0,0.6)', fontSize: 14 } }, { children: row.name })), count && (_jsx(Box, __assign({ sx: { display: 'inline-flex', alignItems: 'center', bgcolor: '#E8F3FF', color: '#007CFD', borderRadius: '999px', px: 1, py: 0.25, mt: 0.5 } }, { children: _jsxs(Typography, __assign({ variant: "caption", sx: { color: '#007CFD', fontSize: 12, lineHeight: 1 } }, { children: [count.main, "\u4E3B\u95EE\u9898+", count.followups, "\u8FFD\u95EE"] })) })))] })), _jsx(Box, __assign({ flex: "1", minWidth: 0, p: 1.5 }, { children: (row.keyPoints.length > 0 ? row.keyPoints : ['-']).map(function (point, i) { return (_jsx(Typography, __assign({ variant: "body2", sx: { color: 'rgba(0,0,0,0.6)', fontSize: 13 }, display: "block" }, { children: point }), i)); }) })), _jsx(Box, __assign({ flex: "1", minWidth: 0, p: 1.5 }, { children: row.evaluation ? (_jsx(Typography, __assign({ variant: "body2", sx: { color: 'rgba(0,0,0,0.6)', fontSize: 13 } }, { children: row.evaluation }))) : (_jsx(Typography, __assign({ variant: "body2", color: "rgba(0,0,0,0.26)" }, { children: "-" }))) })), _jsx(Box, __assign({ width: "90px", flexShrink: 0, p: 1.5, textAlign: "right" }, { children: _jsx(Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#03BA4C' } }, { children: score })) }))] })) }), row.step.token));
|
|
60
|
+
})] })) })));
|
|
61
|
+
};
|
|
62
|
+
export default CapabilityTable;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { Box, Stack } from 'fbm-ui/lib/mui';
|
|
30
|
+
import { Typography } from 'fbm-ui';
|
|
31
|
+
import { useState } from 'react';
|
|
32
|
+
// 作弊风险模块:产品逻辑未确认前仅保留样式与收起交互,不渲染任何未确认数据。
|
|
33
|
+
var CheatRisk = function () {
|
|
34
|
+
var _a = __read(useState(true), 2), open = _a[0], setOpen = _a[1];
|
|
35
|
+
return (_jsxs(Box, __assign({ id: "report-risk", px: 2, mt: 3 }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [_jsx(Box, { sx: {
|
|
36
|
+
width: 16,
|
|
37
|
+
height: 16,
|
|
38
|
+
borderRadius: '50%',
|
|
39
|
+
background: 'linear-gradient(158deg, #5EE2B8 2.38%, #41C446 97.38%)',
|
|
40
|
+
} }), _jsx(Typography, __assign({ variant: "subtitle1", fontWeight: "bold", sx: { fontSize: 16 } }, { children: "\u4F5C\u5F0A\u98CE\u9669" })), _jsx(Box, { flex: 1 }), _jsx(Typography, __assign({ variant: "body2", sx: { cursor: 'pointer', color: '#00996B', userSelect: 'none' }, onClick: function () { return setOpen(!open); } }, { children: open ? '收起' : '展开' }))] })), open && (_jsx(Box, __assign({ mt: 1.5, border: "1px solid #E7F4EC", borderRadius: 2, p: 3, textAlign: "center" }, { children: _jsx(Typography, __assign({ variant: "body2", color: "rgba(0,0,0,0.26)" }, { children: "\u4F5C\u5F0A\u98CE\u9669\u8BC4\u4F30 / \u9632\u4F5C\u5F0A\u68C0\u6D4B\u660E\u7EC6\uFF1A\u5F85\u4EA7\u54C1\u786E\u8BA4\u6570\u636E\u4E0E\u4EA4\u4E92\u540E\u63A5\u5165" })) })))] })));
|
|
41
|
+
};
|
|
42
|
+
export default CheatRisk;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export declare enum QUESTION_TYPE {
|
|
3
|
+
IMAGE_UPLOAD = 1,
|
|
4
|
+
ESSAY_QUESTION = 2,
|
|
5
|
+
RADIO = 3,
|
|
6
|
+
CHECKBOX = 3.2,
|
|
7
|
+
TIME = 4,
|
|
8
|
+
SCHOOL = 7,
|
|
9
|
+
FILL_BLANKS = 8,
|
|
10
|
+
NPS = 9
|
|
11
|
+
}
|
|
12
|
+
export interface Answer {
|
|
13
|
+
formTypeId: number;
|
|
14
|
+
formTypeKey: string;
|
|
15
|
+
formAnswer: any;
|
|
16
|
+
formItemOption: any;
|
|
17
|
+
}
|
|
18
|
+
interface FormProps {
|
|
19
|
+
answers: Answer[];
|
|
20
|
+
customProcessName?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const Form: FC<FormProps>;
|
|
23
|
+
export default Form;
|
|
@@ -0,0 +1,67 @@
|
|
|
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 _a;
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import Nps from './Nps';
|
|
15
|
+
import { PhotoProvider, PhotoView } from "../../../../components/react-photo-view";
|
|
16
|
+
import dayjs from 'dayjs';
|
|
17
|
+
import { Box, Typography } from 'fbm-ui';
|
|
18
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
19
|
+
import { ModuleTitle } from '../ModuleTitle';
|
|
20
|
+
export var QUESTION_TYPE;
|
|
21
|
+
(function (QUESTION_TYPE) {
|
|
22
|
+
QUESTION_TYPE[QUESTION_TYPE["IMAGE_UPLOAD"] = 1] = "IMAGE_UPLOAD";
|
|
23
|
+
QUESTION_TYPE[QUESTION_TYPE["ESSAY_QUESTION"] = 2] = "ESSAY_QUESTION";
|
|
24
|
+
QUESTION_TYPE[QUESTION_TYPE["RADIO"] = 3] = "RADIO";
|
|
25
|
+
QUESTION_TYPE[QUESTION_TYPE["CHECKBOX"] = 3.2] = "CHECKBOX";
|
|
26
|
+
QUESTION_TYPE[QUESTION_TYPE["TIME"] = 4] = "TIME";
|
|
27
|
+
QUESTION_TYPE[QUESTION_TYPE["SCHOOL"] = 7] = "SCHOOL";
|
|
28
|
+
QUESTION_TYPE[QUESTION_TYPE["FILL_BLANKS"] = 8] = "FILL_BLANKS";
|
|
29
|
+
QUESTION_TYPE[QUESTION_TYPE["NPS"] = 9] = "NPS";
|
|
30
|
+
})(QUESTION_TYPE || (QUESTION_TYPE = {}));
|
|
31
|
+
var Image = function (answer) {
|
|
32
|
+
var _a, _b, _c;
|
|
33
|
+
return (_jsx(PhotoProvider, __assign({ maskOpacity: 0.5 }, { children: (_c = (_b = (_a = answer.formAnswer) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.filter(function (v) { return v; })) === null || _c === void 0 ? void 0 : _c.map(function (url) { return (_jsx(PhotoView, __assign({ src: url }, { children: _jsx("img", { src: url, alt: url, width: 48, height: 32 }) }), url)); }) })));
|
|
34
|
+
};
|
|
35
|
+
var fillBlanks = function (answer) { var _a, _b; return _jsx(Typography, __assign({ variant: "body2" }, { children: (_b = (_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.answer) === null || _b === void 0 ? void 0 : _b.join(',') })); };
|
|
36
|
+
var Choice = function (answer) {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
var keys = ((_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.choiceOptions) || [];
|
|
39
|
+
var options = ((_b = answer === null || answer === void 0 ? void 0 : answer.formItemOption) === null || _b === void 0 ? void 0 : _b.alternatives) || [];
|
|
40
|
+
return options
|
|
41
|
+
.filter(function (v) { return keys.includes(v.key); })
|
|
42
|
+
.map(function (v) { return v.value; })
|
|
43
|
+
.join(',');
|
|
44
|
+
};
|
|
45
|
+
var template = (_a = {},
|
|
46
|
+
_a[QUESTION_TYPE.RADIO] = Choice,
|
|
47
|
+
_a[QUESTION_TYPE.CHECKBOX] = Choice,
|
|
48
|
+
_a[QUESTION_TYPE.ESSAY_QUESTION] = function (answer) { var _a; return (_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.answer; },
|
|
49
|
+
_a[QUESTION_TYPE.TIME] = function (answer) {
|
|
50
|
+
var _a, _b, _c;
|
|
51
|
+
return ((_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.dateTime) &&
|
|
52
|
+
!isNaN((_b = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _b === void 0 ? void 0 : _b.dateTime) &&
|
|
53
|
+
dayjs(Number((_c = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _c === void 0 ? void 0 : _c.dateTime) * 1000).format('YYYY年MM月DD日');
|
|
54
|
+
},
|
|
55
|
+
_a[QUESTION_TYPE.SCHOOL] = function (answer) { var _a; return (_a = answer === null || answer === void 0 ? void 0 : answer.formAnswer) === null || _a === void 0 ? void 0 : _a.answer; },
|
|
56
|
+
_a[QUESTION_TYPE.FILL_BLANKS] = fillBlanks,
|
|
57
|
+
_a[QUESTION_TYPE.NPS] = Nps,
|
|
58
|
+
_a[QUESTION_TYPE.IMAGE_UPLOAD] = Image,
|
|
59
|
+
_a);
|
|
60
|
+
var Form = function (_a) {
|
|
61
|
+
var answers = _a.answers, _b = _a.customProcessName, customProcessName = _b === void 0 ? '资料收集' : _b;
|
|
62
|
+
return (_jsxs(Box, __assign({ px: 2, mt: 3 }, { children: [_jsx(ModuleTitle, { title: customProcessName }), _jsxs(Box, __assign({ mt: 1.5, border: "1px solid #E7F4EC", borderRadius: 2, overflow: "hidden" }, { children: [_jsxs(Stack, __assign({ direction: "row", sx: { background: '#EBFCF7' } }, { children: [_jsx(Box, __assign({ width: 52, flexShrink: 0, py: 1, px: 1.5 }, { children: _jsx(Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#00996B', fontSize: 14, lineHeight: '22px' } }, { children: "\u5E8F\u53F7" })) })), _jsx(Box, __assign({ flex: 1, minWidth: 0, py: 1, px: 1.5 }, { children: _jsx(Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#00996B', fontSize: 14, lineHeight: '22px' } }, { children: "\u9898\u76EE" })) })), _jsx(Box, __assign({ flex: 1, minWidth: 0, py: 1, px: 1.5 }, { children: _jsx(Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#00996B', fontSize: 14, lineHeight: '22px' } }, { children: "\u56DE\u7B54" })) }))] })), answers === null || answers === void 0 ? void 0 : answers.map(function (answer, index) {
|
|
63
|
+
var _a;
|
|
64
|
+
return (_jsxs(Stack, __assign({ direction: "row", borderTop: "1px solid #F0F6F2" }, { children: [_jsx(Box, __assign({ width: 52, flexShrink: 0, p: 1.5 }, { children: _jsx(Typography, __assign({ variant: "body2", sx: { color: 'rgba(0,0,0,0.6)', fontSize: 14 } }, { children: index + 1 })) })), _jsx(Box, __assign({ flex: 1, minWidth: 0, p: 1.5 }, { children: _jsx(Typography, __assign({ variant: "body2", sx: { color: 'rgba(0,0,0,0.6)', fontSize: 14 } }, { children: answer.formTypeKey })) })), _jsx(Box, __assign({ flex: 1, minWidth: 0, p: 1.5 }, { children: _jsx(Typography, __assign({ variant: "body2", sx: { color: 'rgba(0,0,0,0.6)', fontSize: 14 } }, { children: (_a = template[answer.formTypeId]) === null || _a === void 0 ? void 0 : _a.call(template, answer) })) }))] }), index));
|
|
65
|
+
})] }))] })));
|
|
66
|
+
};
|
|
67
|
+
export default Form;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormReports } from './interface';
|
|
3
|
+
export interface FormsProps {
|
|
4
|
+
fetchFormResult: () => Promise<FormReports>;
|
|
5
|
+
}
|
|
6
|
+
declare const Forms: ({ fetchFormResult }: {
|
|
7
|
+
fetchFormResult: any;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export default Forms;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
29
|
+
import Form from './Form';
|
|
30
|
+
import { useEffect, useState } from 'react';
|
|
31
|
+
var Forms = function (_a) {
|
|
32
|
+
var fetchFormResult = _a.fetchFormResult;
|
|
33
|
+
var _b = __read(useState([]), 2), data = _b[0], setData = _b[1];
|
|
34
|
+
useEffect(function () {
|
|
35
|
+
if (fetchFormResult) {
|
|
36
|
+
fetchFormResult()
|
|
37
|
+
.then(function (res) {
|
|
38
|
+
setData(res);
|
|
39
|
+
})
|
|
40
|
+
.catch(console);
|
|
41
|
+
}
|
|
42
|
+
}, [fetchFormResult]);
|
|
43
|
+
return (_jsx(_Fragment, { children: data.map(function (item, index) { return (_jsx(Form, __assign({}, item), index)); }) }));
|
|
44
|
+
};
|
|
45
|
+
export default Forms;
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
+
if (ar || !(i in from)) {
|
|
31
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
+
ar[i] = from[i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
|
+
};
|
|
37
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
38
|
+
import { Box, Typography } from 'fbm-ui';
|
|
39
|
+
import { theme } from 'fbm-ui/lib/components';
|
|
40
|
+
var Nps = function (_a) {
|
|
41
|
+
var formAnswer = _a.formAnswer, formItemOption = _a.formItemOption;
|
|
42
|
+
var answer = (formAnswer || {
|
|
43
|
+
answer: '',
|
|
44
|
+
}).answer;
|
|
45
|
+
var from = formItemOption.from, to = formItemOption.to;
|
|
46
|
+
var fromScore = (from === null || from === void 0 ? void 0 : from.score) || 0;
|
|
47
|
+
var toScore = (to === null || to === void 0 ? void 0 : to.score) || 0;
|
|
48
|
+
var npsData = __spreadArray([], __read(Array.from(new Array(toScore + 1 - fromScore).keys())), false).map(function (i) { return i + fromScore; });
|
|
49
|
+
if (!answer)
|
|
50
|
+
return null;
|
|
51
|
+
return (_jsxs(Box, { children: [_jsx(Box, __assign({ display: "flex" }, { children: typeof answer === 'string' &&
|
|
52
|
+
npsData.map(function (value) {
|
|
53
|
+
var isSelect = value <= Number(answer);
|
|
54
|
+
return (_jsx(Box, __assign({ height: 30, flex: "1 0", lineHeight: "30px", textAlign: "center", margin: "0 2px", fontSize: 14, fontWeight: 500, color: isSelect ? '#fff' : '', bgcolor: isSelect ? theme.palette.primary.main : '#eceff1' }, { children: value }), value));
|
|
55
|
+
}) })), _jsxs(Box, __assign({ display: "flex", justifyContent: "space-between", mt: 1 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: from === null || from === void 0 ? void 0 : from.remark })), _jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: to === null || to === void 0 ? void 0 : to.remark }))] }))] }));
|
|
56
|
+
};
|
|
57
|
+
export default Nps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as FormReport } from './Forms';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as FormReport } from './Forms';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare type FormReports = FormReport[];
|
|
2
|
+
export interface FormReport {
|
|
3
|
+
total: number;
|
|
4
|
+
score: number;
|
|
5
|
+
isRandomOrder: boolean;
|
|
6
|
+
hasVideoMonitor: boolean;
|
|
7
|
+
videoUrl: string;
|
|
8
|
+
answers: Answer[];
|
|
9
|
+
formScore: number;
|
|
10
|
+
originFormScore: number;
|
|
11
|
+
customProcessName: string;
|
|
12
|
+
}
|
|
13
|
+
export interface Answer {
|
|
14
|
+
formItemToken: string;
|
|
15
|
+
formTypeId: number;
|
|
16
|
+
formTypeKey: string;
|
|
17
|
+
isNecessary: boolean;
|
|
18
|
+
formItemOption: FormItemOption;
|
|
19
|
+
originFormItemAnswer: string;
|
|
20
|
+
formAnswer: FormAnswer;
|
|
21
|
+
total: number;
|
|
22
|
+
score: number;
|
|
23
|
+
isScoreOpen: number;
|
|
24
|
+
formOrder: number;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
isRandomOrder: boolean;
|
|
27
|
+
isHiddenForCandidate: boolean;
|
|
28
|
+
media: any[];
|
|
29
|
+
}
|
|
30
|
+
export interface FormItemOption {
|
|
31
|
+
score: string;
|
|
32
|
+
maximumNum?: number;
|
|
33
|
+
allowMultiple?: boolean;
|
|
34
|
+
alternatives?: Alterna[];
|
|
35
|
+
from?: From;
|
|
36
|
+
to?: To;
|
|
37
|
+
}
|
|
38
|
+
export interface Alterna {
|
|
39
|
+
key: string;
|
|
40
|
+
score: string;
|
|
41
|
+
value: string;
|
|
42
|
+
operator?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface From {
|
|
45
|
+
remark: string;
|
|
46
|
+
score: number;
|
|
47
|
+
}
|
|
48
|
+
export interface To {
|
|
49
|
+
remark: string;
|
|
50
|
+
score: number;
|
|
51
|
+
}
|
|
52
|
+
export interface FormAnswer {
|
|
53
|
+
answer: any;
|
|
54
|
+
files?: string[];
|
|
55
|
+
choiceOptions?: string[];
|
|
56
|
+
dateTime?: string;
|
|
57
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|