eli-video-interview 1.2.42-alpha.9 → 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/AiHeaderTitle/index.js +2 -10
- package/esm/components/AiHeaderTitleV2/index.d.ts +4 -0
- package/esm/components/AiHeaderTitleV2/index.js +39 -0
- package/esm/components/AiHeaderTitleV2/interface.d.ts +4 -0
- package/esm/components/AiHeaderTitleV2/interface.js +1 -0
- package/esm/components/Charts/ReportPie.js +13 -3
- package/esm/components/Charts/const.js +3 -3
- package/esm/components/ScoreBigBall/index.js +1 -1
- package/esm/constants/ai-question.d.ts +1 -1
- package/esm/constants/ai-question.js +3 -3
- package/esm/enum/ai-question.d.ts +11 -1
- package/esm/enum/ai-question.js +10 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/index.js +11 -46
- package/esm/modules/ai-ability/components/AddAbility/index.js +2 -20
- package/esm/modules/ai-ability/components/UpdateAbility/index.js +6 -37
- package/esm/modules/ai-ability-select/Root.js +4 -2
- package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +2 -2
- package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +2 -1
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +2 -2
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +4 -4
- package/esm/modules/ai-ability-select/components/AiAbilityList/index.js +14 -2
- package/esm/modules/ai-ability-select/interface.d.ts +1 -0
- package/esm/modules/ai-question/Root.js +1 -1
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +13 -4
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +39 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +41 -2
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +42 -42
- package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +1 -0
- package/esm/modules/ai-question/components/BaseAccordion/index.js +4 -4
- package/esm/modules/ai-question/components/BaseAccordion/interface.d.ts +3 -0
- package/esm/modules/ai-question/components/BootVideo/index.js +12 -5
- package/esm/modules/ai-question/components/QuestionImport/index.js +2 -2
- package/esm/modules/ai-question/components/QuestionModel/Item.js +3 -3
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +6 -2
- package/esm/modules/ai-question/components/QuestionTemplate/index.js +1 -1
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +4 -3
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +13 -3
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +2 -2
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +4 -4
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +2 -0
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +3 -2
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +3 -0
- package/esm/modules/ai-report/Root.js +6 -3
- package/esm/modules/ai-report/components/VideoQuestion/Video.d.ts +27 -0
- package/esm/modules/ai-report/components/VideoQuestion/Video.js +208 -0
- package/esm/modules/ai-report/interface.d.ts +2 -0
- package/esm/modules/ai-report/useAiReport.d.ts +2 -0
- package/esm/modules/ai-report/useAiReport.js +3 -1
- package/esm/modules/ai-report-v2/Root.d.ts +2 -2
- package/esm/modules/ai-report-v2/Root.js +18 -11
- package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.d.ts +2 -4
- package/esm/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +20 -20
- package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.d.ts +13 -0
- package/esm/modules/ai-report-v2/components/AIEvaluate/Graph.js +86 -24
- package/esm/modules/ai-report-v2/components/AIEvaluate/index.d.ts +2 -2
- package/esm/modules/ai-report-v2/components/AIEvaluate/index.js +11 -7
- package/esm/modules/ai-report-v2/components/Candidate/Interface.d.ts +3 -0
- package/esm/modules/ai-report-v2/components/Candidate/Podium.js +2 -2
- package/esm/modules/ai-report-v2/components/Form/Form.js +34 -13
- package/esm/modules/ai-report-v2/components/Form/Nps.d.ts +1 -1
- package/esm/modules/ai-report-v2/components/Form/Nps.js +2 -0
- package/esm/modules/ai-report-v2/components/NotFinish/index.js +13 -5
- package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.d.ts +4 -2
- package/esm/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +28 -10
- package/esm/modules/ai-report-v2/components/Suggestion/index.js +1 -1
- package/esm/modules/ai-report-v2/components/VideoQuestion/Evaluate.d.ts +11 -0
- package/esm/modules/ai-report-v2/components/VideoQuestion/Evaluate.js +79 -0
- package/esm/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +49 -32
- package/esm/modules/ai-report-v2/components/VideoQuestion/Workplaces.d.ts +9 -5
- package/esm/modules/ai-report-v2/components/VideoQuestion/Workplaces.js +71 -6
- package/esm/modules/ai-report-v2/components/VideoQuestion/index.d.ts +6 -3
- package/esm/modules/ai-report-v2/components/VideoQuestion/index.js +6 -4
- package/esm/modules/ai-report-v2/components/VideoQuestion/interface.d.ts +1 -0
- package/esm/modules/ai-report-v2/components/VideoQuestion/styled.js +2 -2
- package/esm/modules/ai-report-v2/components/WorkPlaces/index.js +1 -1
- package/esm/modules/ai-report-v2/components/styled.d.ts +4 -1
- package/esm/modules/ai-report-v2/components/styled.js +14 -3
- package/esm/modules/ai-report-v2/interface.d.ts +4 -1
- package/esm/modules/ai-report-v2/useAiReport.d.ts +4 -0
- package/esm/modules/ai-report-v2/useAiReport.js +3 -1
- package/esm/modules/ai-report-v2/useAiReportVersion.d.ts +5 -0
- package/esm/modules/ai-report-v2/useAiReportVersion.js +37 -0
- package/esm/services/ai-report.d.ts +10 -0
- package/esm/services/ai-report.js +2 -0
- package/esm/store/ai-question/ai-analysis-store.d.ts +3 -1
- package/esm/store/ai-question/ai-analysis-store.js +26 -1
- package/esm/store/ai-report/global-store.d.ts +3 -0
- package/lib/components/AiHeaderTitle/index.js +1 -9
- package/lib/components/AiHeaderTitleV2/index.d.ts +4 -0
- package/lib/components/AiHeaderTitleV2/index.js +41 -0
- package/lib/components/AiHeaderTitleV2/interface.d.ts +4 -0
- package/lib/components/AiHeaderTitleV2/interface.js +2 -0
- package/lib/components/Charts/ReportPie.js +13 -3
- package/lib/components/Charts/const.js +3 -3
- package/lib/components/ScoreBigBall/index.js +1 -1
- package/lib/constants/ai-question.d.ts +1 -1
- package/lib/constants/ai-question.js +3 -3
- package/lib/enum/ai-question.d.ts +11 -1
- package/lib/enum/ai-question.js +10 -0
- package/lib/modules/ai-ability/components/AbilityFormItem/index.js +13 -45
- package/lib/modules/ai-ability/components/AddAbility/index.js +2 -20
- package/lib/modules/ai-ability/components/UpdateAbility/index.js +6 -37
- package/lib/modules/ai-ability-select/Root.js +4 -2
- package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +2 -2
- package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +2 -1
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +2 -2
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +4 -4
- package/lib/modules/ai-ability-select/components/AiAbilityList/index.js +14 -2
- package/lib/modules/ai-ability-select/interface.d.ts +1 -0
- package/lib/modules/ai-question/Root.js +1 -1
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +12 -3
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +39 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +42 -3
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +39 -39
- package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +1 -0
- package/lib/modules/ai-question/components/BaseAccordion/index.js +4 -4
- package/lib/modules/ai-question/components/BaseAccordion/interface.d.ts +3 -0
- package/lib/modules/ai-question/components/BootVideo/index.js +12 -5
- package/lib/modules/ai-question/components/QuestionImport/index.js +2 -2
- package/lib/modules/ai-question/components/QuestionModel/Item.js +3 -3
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +5 -1
- package/lib/modules/ai-question/components/QuestionTemplate/index.js +1 -1
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +4 -3
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +12 -2
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +2 -2
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +4 -4
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +2 -0
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +3 -2
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +3 -0
- package/lib/modules/ai-report/Root.js +6 -3
- package/lib/modules/ai-report/components/VideoQuestion/Video.d.ts +27 -0
- package/lib/modules/ai-report/components/VideoQuestion/Video.js +213 -0
- package/lib/modules/ai-report/interface.d.ts +2 -0
- package/lib/modules/ai-report/useAiReport.d.ts +2 -0
- package/lib/modules/ai-report/useAiReport.js +6 -1
- package/lib/modules/ai-report-v2/Root.d.ts +2 -2
- package/lib/modules/ai-report-v2/Root.js +16 -9
- package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.d.ts +2 -4
- package/lib/modules/ai-report-v2/components/AIEvaluate/Evaluate.js +17 -17
- package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.d.ts +13 -0
- package/lib/modules/ai-report-v2/components/AIEvaluate/Graph.js +88 -23
- package/lib/modules/ai-report-v2/components/AIEvaluate/index.d.ts +2 -2
- package/lib/modules/ai-report-v2/components/AIEvaluate/index.js +11 -7
- package/lib/modules/ai-report-v2/components/Candidate/Interface.d.ts +3 -0
- package/lib/modules/ai-report-v2/components/Candidate/Podium.js +1 -1
- package/lib/modules/ai-report-v2/components/Form/Form.js +34 -13
- package/lib/modules/ai-report-v2/components/Form/Nps.d.ts +1 -1
- package/lib/modules/ai-report-v2/components/Form/Nps.js +2 -0
- package/lib/modules/ai-report-v2/components/NotFinish/index.js +12 -4
- package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.d.ts +4 -2
- package/lib/modules/ai-report-v2/components/ReportHeader/ReportHeader.js +27 -9
- package/lib/modules/ai-report-v2/components/Suggestion/index.js +2 -2
- package/lib/modules/ai-report-v2/components/VideoQuestion/Evaluate.d.ts +11 -0
- package/lib/modules/ai-report-v2/components/VideoQuestion/Evaluate.js +81 -0
- package/lib/modules/ai-report-v2/components/VideoQuestion/QuestionItem.js +46 -29
- package/lib/modules/ai-report-v2/components/VideoQuestion/Workplaces.d.ts +9 -5
- package/lib/modules/ai-report-v2/components/VideoQuestion/Workplaces.js +69 -4
- package/lib/modules/ai-report-v2/components/VideoQuestion/index.d.ts +6 -3
- package/lib/modules/ai-report-v2/components/VideoQuestion/index.js +6 -4
- package/lib/modules/ai-report-v2/components/VideoQuestion/interface.d.ts +1 -0
- package/lib/modules/ai-report-v2/components/VideoQuestion/styled.js +2 -2
- package/lib/modules/ai-report-v2/components/WorkPlaces/index.js +2 -2
- package/lib/modules/ai-report-v2/components/styled.d.ts +4 -1
- package/lib/modules/ai-report-v2/components/styled.js +18 -4
- package/lib/modules/ai-report-v2/interface.d.ts +4 -1
- package/lib/modules/ai-report-v2/useAiReport.d.ts +4 -0
- package/lib/modules/ai-report-v2/useAiReport.js +6 -1
- package/lib/modules/ai-report-v2/useAiReportVersion.d.ts +5 -0
- package/lib/modules/ai-report-v2/useAiReportVersion.js +41 -0
- package/lib/services/ai-report.d.ts +10 -0
- package/lib/services/ai-report.js +5 -1
- package/lib/store/ai-question/ai-analysis-store.d.ts +3 -1
- package/lib/store/ai-question/ai-analysis-store.js +26 -1
- package/lib/store/ai-report/global-store.d.ts +3 -0
- package/package.json +4 -2
|
@@ -10,18 +10,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { DinTypography } from "../../modules/ai-report-v2/components/styled";
|
|
14
13
|
import SvgIcon from "../SvgIcon";
|
|
15
|
-
import { Box } from 'fbm-ui';
|
|
14
|
+
import { Box, Typography } from 'fbm-ui';
|
|
16
15
|
var AiHeaderTitle = function (_a) {
|
|
17
16
|
var name = _a.name;
|
|
18
|
-
return (_jsxs(Box, __assign({ display: "inline-flex", sx: {
|
|
19
|
-
pl: 3,
|
|
20
|
-
color: '#009D56',
|
|
21
|
-
pt: 0.5,
|
|
22
|
-
background: 'url(//webcdn.fbmms.cn/assets/yt-b/yf2BqqIlr8Xtb8N2o44t1) no-repeat center center',
|
|
23
|
-
backgroundSize: 'contain',
|
|
24
|
-
width: 24 + (56 / 4) * name.length + 84,
|
|
25
|
-
} }, { children: [_jsx(SvgIcon, { name: "AI" }), _jsx(DinTypography, __assign({ variant: "h6", color: "inherit" }, { children: name }))] })));
|
|
17
|
+
return (_jsxs(Box, __assign({ display: "inline-flex" }, { children: [_jsx(SvgIcon, { name: "AI" }), _jsx(Typography, __assign({ variant: "h6", fontWeight: "medium", sx: { fontWeight: 500 }, ml: 1 }, { children: name }))] })));
|
|
26
18
|
};
|
|
27
19
|
export default AiHeaderTitle;
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { DinTypography } from "../../modules/ai-report-v2/components/styled";
|
|
14
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
15
|
+
var AiHeaderTitle = function (_a) {
|
|
16
|
+
var name = _a.name;
|
|
17
|
+
return (_jsxs(Stack, __assign({ display: "inline-flex", direction: "row", spacing: 1, sx: {
|
|
18
|
+
left: -12,
|
|
19
|
+
top: -8,
|
|
20
|
+
height: 48,
|
|
21
|
+
position: 'relative',
|
|
22
|
+
color: '#009D56',
|
|
23
|
+
borderRadius: '8px 0px 8px 8px',
|
|
24
|
+
background: 'linear-gradient( 360deg, #98F79C 0%, #C2FCC4 100%)',
|
|
25
|
+
width: 155,
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
'&:after': {
|
|
28
|
+
content: "''",
|
|
29
|
+
position: 'absolute',
|
|
30
|
+
top: 0,
|
|
31
|
+
right: -5,
|
|
32
|
+
width: 0,
|
|
33
|
+
height: 0,
|
|
34
|
+
borderTop: '8px solid transparent',
|
|
35
|
+
borderLeft: '5px solid #6CD970',
|
|
36
|
+
},
|
|
37
|
+
} }, { children: [_jsx("img", { src: "//webcdn.fbmms.cn/assets/H4yH/zOBWGb2Np_QoyQk_EH_eZ", alt: "", style: { marginLeft: 16, width: 32, height: 20 } }), _jsx(DinTypography, __assign({ variant: "h6", color: "inherit" }, { children: name }))] })));
|
|
38
|
+
};
|
|
39
|
+
export default AiHeaderTitle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -50,6 +50,16 @@ var formateTitle = function (originalTitle) {
|
|
|
50
50
|
var _a = __read(originalTitle.match(regex), 2), no = _a[1];
|
|
51
51
|
return "\u7B2C".concat(no, "\u9898");
|
|
52
52
|
};
|
|
53
|
+
var getLevel = function (score) {
|
|
54
|
+
switch (true) {
|
|
55
|
+
case score >= 80:
|
|
56
|
+
return 3;
|
|
57
|
+
case score >= 60:
|
|
58
|
+
return 2;
|
|
59
|
+
default:
|
|
60
|
+
return 1;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
53
63
|
var ReportPie = function (props) {
|
|
54
64
|
var id = props.id, _a = props.source, source = _a === void 0 ? [] : _a;
|
|
55
65
|
var scores = source.map(function (_a) {
|
|
@@ -125,15 +135,15 @@ var ReportPie = function (props) {
|
|
|
125
135
|
formatter: function (_a) {
|
|
126
136
|
var _b;
|
|
127
137
|
var value = _a.value, dataIndex = _a.dataIndex;
|
|
128
|
-
return ((_b = data[dataIndex]) === null || _b === void 0 ? void 0 : _b.weight) || 0;
|
|
138
|
+
return "".concat(((_b = data[dataIndex]) === null || _b === void 0 ? void 0 : _b.weight.toFixed(2).replace(/\.00$/, '')) || 0, "%");
|
|
129
139
|
},
|
|
130
140
|
fontSize: 14,
|
|
131
141
|
},
|
|
132
142
|
itemStyle: {
|
|
133
143
|
color: function (_a) {
|
|
134
144
|
var _b;
|
|
135
|
-
var
|
|
136
|
-
return (_b = levelMapping[
|
|
145
|
+
var avgScore = _a.data.avgScore;
|
|
146
|
+
return (_b = levelMapping[getLevel(avgScore)]) === null || _b === void 0 ? void 0 : _b.itemColor;
|
|
137
147
|
},
|
|
138
148
|
shadowBlur: 4,
|
|
139
149
|
shadowColor: 'rgba(0, 0, 0, 0.16)',
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export var levelMapping = {
|
|
2
2
|
3: {
|
|
3
3
|
text: '优秀',
|
|
4
|
-
itemColor: '
|
|
4
|
+
itemColor: 'rgba(255, 153,2)',
|
|
5
5
|
color: 'rgb(255, 153, 3)',
|
|
6
6
|
},
|
|
7
7
|
2: {
|
|
8
8
|
text: '适中',
|
|
9
|
-
itemColor: '
|
|
9
|
+
itemColor: 'rgba(0, 217,157)',
|
|
10
10
|
color: 'rgba(0, 217, 157)',
|
|
11
11
|
},
|
|
12
12
|
1: {
|
|
13
13
|
text: '欠佳',
|
|
14
|
-
itemColor: '
|
|
14
|
+
itemColor: 'rgba(99, 156,255)',
|
|
15
15
|
color: 'rgb(98, 156, 255)',
|
|
16
16
|
},
|
|
17
17
|
};
|
|
@@ -15,7 +15,7 @@ import BigBallSvg from "../BigBallSvg";
|
|
|
15
15
|
import { formatScore } from "../../utils/utils";
|
|
16
16
|
var ScoreBigBall = function (_a) {
|
|
17
17
|
var score = _a.score, status = _a.status, _b = _a.width, width = _b === void 0 ? 80 : _b, _c = _a.height, height = _c === void 0 ? 80 : _c, _d = _a.fontSize, fontSize = _d === void 0 ? 20 : _d;
|
|
18
|
-
return (_jsxs(_Fragment, { children: [_jsxs(ScoreBigBallRoot, __assign({ width: width, height: height, sx: { backgroundColor: status === 1 ? '#fbfbfb' : 'rgba(59, 203, 120, 0.1)' } }, { children: [status !== 1 && _jsx(BigBallSvg, {}), status === 1 && (_jsx("div", __assign({ style: { color: 'rgba(0,0,0,0.26)', fontSize: '12px' } }, { children: _jsx("span", { children: "\u5019\u9009\u4EBA\u672A\u4F5C\u7B54" }) }))), status === 2 && (_jsx("div", __assign({ style: { color: '#40be47' } }, { children: _jsx("span", { children: "\u8BA1\u7B97\u4E2D..." }) }))), status === 3 && (_jsxs("div", __assign({ style: { color: '#40be47' } }, { children: [_jsx("span", __assign({ style: { fontFamily: '
|
|
18
|
+
return (_jsxs(_Fragment, { children: [_jsxs(ScoreBigBallRoot, __assign({ width: width, height: height, sx: { backgroundColor: status === 1 ? '#fbfbfb' : 'rgba(59, 203, 120, 0.1)' } }, { children: [status !== 1 && _jsx(BigBallSvg, {}), status === 1 && (_jsx("div", __assign({ style: { color: 'rgba(0,0,0,0.26)', fontSize: '12px' } }, { children: _jsx("span", { children: "\u5019\u9009\u4EBA\u672A\u4F5C\u7B54" }) }))), status === 2 && (_jsx("div", __assign({ style: { color: '#40be47' } }, { children: _jsx("span", { children: "\u8BA1\u7B97\u4E2D..." }) }))), status === 3 && (_jsxs("div", __assign({ style: { color: '#40be47' } }, { children: [_jsx("span", __assign({ style: { fontFamily: 'MiSans TC', fontSize: fontSize, fontWeight: 'bold' } }, { children: formatScore(score) > 100 ? 100 : formatScore(score) })), _jsx("span", __assign({ style: { marginLeft: '2px', fontSize: '12px' } }, { children: "\u5206" }))] })))] })), status === 2 && (_jsx("div", { style: {
|
|
19
19
|
position: 'absolute',
|
|
20
20
|
top: 0,
|
|
21
21
|
right: 0,
|
|
@@ -54,5 +54,5 @@ export declare const TEST_TYPE_READONLY: number[];
|
|
|
54
54
|
export declare const DISABLED_REPEAT_TYPE: number[];
|
|
55
55
|
export declare const DISABLED_COST_TYPE: number[];
|
|
56
56
|
export declare const IS_AI_ANALYSIS: (step: Pick<QuestionParams, 'aiType'>) => boolean;
|
|
57
|
-
export declare const IS_AI_FOLLOW_UP: (step: QuestionParams, interaction: InteractionMethod[]) => boolean;
|
|
57
|
+
export declare const IS_AI_FOLLOW_UP: (step: QuestionParams, interaction: InteractionMethod[], interactType: number) => boolean;
|
|
58
58
|
export declare const MAX_RANDOM_QUESTION_NUM = 50;
|
|
@@ -96,12 +96,12 @@ export var DISABLED_COST_TYPE = [7, 9, 8, 4, 11, 2, 16];
|
|
|
96
96
|
// 是否开启AI分析
|
|
97
97
|
export var IS_AI_ANALYSIS = function (step) { return step.aiType === 2; };
|
|
98
98
|
// 是否可以追问
|
|
99
|
-
export var IS_AI_FOLLOW_UP = function (step, interaction) {
|
|
100
|
-
return step.aiShowType === 1 && (
|
|
99
|
+
export var IS_AI_FOLLOW_UP = function (step, interaction, interactType) {
|
|
100
|
+
return step.aiShowType === 1 && (interactType === 1 || !IS_VIRTUAL_HUMAN(interaction) || step.broadcastType === 2);
|
|
101
101
|
};
|
|
102
102
|
var IS_VIRTUAL_HUMAN = function (interaction) {
|
|
103
103
|
if (interaction.length === 0)
|
|
104
104
|
return false;
|
|
105
|
-
return interaction.some(function (v) { var _a; return v.selected && (v.type === 2 || (v.type === 3 && ((_a = v.detail.interviewerShows) === null || _a === void 0 ? void 0 : _a.some(function (v) { return v.selected && v.humanType === 2; })))
|
|
105
|
+
return interaction.some(function (v) { var _a; return v.selected && (v.type === 2 || (v.type === 3 && ((_a = v.detail.interviewerShows) === null || _a === void 0 ? void 0 : _a.some(function (v) { return v.selected && v.humanType === 2; })))); });
|
|
106
106
|
};
|
|
107
107
|
export var MAX_RANDOM_QUESTION_NUM = 50;
|
|
@@ -24,7 +24,17 @@ export declare enum LANGUAGE_TYPE {
|
|
|
24
24
|
MANDARIN = 2,
|
|
25
25
|
CANTONESE = 13,
|
|
26
26
|
JAPANESE = 12,
|
|
27
|
-
ENGLISH = 11
|
|
27
|
+
ENGLISH = 11,
|
|
28
|
+
KOREAN = 19,
|
|
29
|
+
SPANISH = 20,
|
|
30
|
+
ITALIAN = 21,
|
|
31
|
+
RUSSIAN = 22,
|
|
32
|
+
FRENCH = 23,
|
|
33
|
+
GERMAN = 24,
|
|
34
|
+
THAILAND = 25,
|
|
35
|
+
VIETNAMESE = 26,
|
|
36
|
+
INDONESIAN = 27,
|
|
37
|
+
SWAHILI = 28
|
|
28
38
|
}
|
|
29
39
|
/**
|
|
30
40
|
* 题目类型
|
package/esm/enum/ai-question.js
CHANGED
|
@@ -28,6 +28,16 @@ export var LANGUAGE_TYPE;
|
|
|
28
28
|
LANGUAGE_TYPE[LANGUAGE_TYPE["CANTONESE"] = 13] = "CANTONESE";
|
|
29
29
|
LANGUAGE_TYPE[LANGUAGE_TYPE["JAPANESE"] = 12] = "JAPANESE";
|
|
30
30
|
LANGUAGE_TYPE[LANGUAGE_TYPE["ENGLISH"] = 11] = "ENGLISH";
|
|
31
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["KOREAN"] = 19] = "KOREAN";
|
|
32
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["SPANISH"] = 20] = "SPANISH";
|
|
33
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["ITALIAN"] = 21] = "ITALIAN";
|
|
34
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["RUSSIAN"] = 22] = "RUSSIAN";
|
|
35
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["FRENCH"] = 23] = "FRENCH";
|
|
36
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["GERMAN"] = 24] = "GERMAN";
|
|
37
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["THAILAND"] = 25] = "THAILAND";
|
|
38
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["VIETNAMESE"] = 26] = "VIETNAMESE";
|
|
39
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["INDONESIAN"] = 27] = "INDONESIAN";
|
|
40
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["SWAHILI"] = 28] = "SWAHILI";
|
|
31
41
|
})(LANGUAGE_TYPE || (LANGUAGE_TYPE = {}));
|
|
32
42
|
/**
|
|
33
43
|
* 题目类型
|
|
@@ -64,32 +64,31 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
64
64
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
65
65
|
import { GetAiDefine } from "../../../../services/ai-ability";
|
|
66
66
|
import { useRequest } from 'ahooks';
|
|
67
|
-
import { AddIcon, Button, CloseIcon, FormItem, IconButton, RefreshIcon, Typography
|
|
67
|
+
import { AddIcon, Button, CloseIcon, FormItem, IconButton, RefreshIcon, Typography } from 'fbm-ui';
|
|
68
|
+
import messages from 'fbm-ui/lib/components/Message';
|
|
68
69
|
import { Box, Stack } from 'fbm-ui/lib/mui';
|
|
69
70
|
import { FieldArray } from 'formik';
|
|
70
71
|
import { useCallback, useEffect, useState } from 'react';
|
|
71
72
|
var AbilityFormItem = function (_a) {
|
|
72
73
|
var token = _a.token, title = _a.title, name = _a.name, type = _a.type, index = _a.index, _b = _a.items, items = _b === void 0 ? [] : _b, _c = _a.mode, mode = _c === void 0 ? 'show' : _c, _d = _a.canReplace, canReplace = _d === void 0 ? false : _d, _e = _a.maxTextLength, maxTextLength = _e === void 0 ? 100 : _e, item = _a.item, onChange = _a.onChange;
|
|
73
|
-
var _f = __read(useState(
|
|
74
|
-
var _g =
|
|
75
|
-
var _h = useRequest(GetAiDefine, {
|
|
74
|
+
var _f = __read(useState(mode), 2), internalMode = _f[0], setMode = _f[1];
|
|
75
|
+
var _g = useRequest(GetAiDefine, {
|
|
76
76
|
manual: true,
|
|
77
77
|
onSuccess: function (_a) {
|
|
78
78
|
var data = _a.data;
|
|
79
79
|
var _b = data.list, list = _b === void 0 ? [] : _b;
|
|
80
80
|
var defineRes = list[0].items;
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
82
|
+
name: title,
|
|
83
|
+
type: type,
|
|
84
|
+
items: defineRes,
|
|
85
|
+
});
|
|
83
86
|
},
|
|
84
87
|
onError: function (err) {
|
|
88
|
+
messages.error("".concat(title, "\u751F\u6210\u8D85\u65F6"));
|
|
85
89
|
console.log(err);
|
|
86
|
-
nameTextField.setError("".concat(title, "\u751F\u6210\u8D85\u65F6"));
|
|
87
90
|
},
|
|
88
|
-
}), PostAiDefine =
|
|
89
|
-
var handleChange = useCallback(function (e) {
|
|
90
|
-
var value = e.target.value;
|
|
91
|
-
setContent(value);
|
|
92
|
-
}, []);
|
|
91
|
+
}), PostAiDefine = _g.run, loading = _g.loading;
|
|
93
92
|
var handleReplace = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
94
93
|
return __generator(this, function (_a) {
|
|
95
94
|
PostAiDefine({
|
|
@@ -99,38 +98,9 @@ var AbilityFormItem = function (_a) {
|
|
|
99
98
|
return [2 /*return*/];
|
|
100
99
|
});
|
|
101
100
|
}); }, [type, name, PostAiDefine]);
|
|
102
|
-
var nameTextField = useTextField({
|
|
103
|
-
value: content,
|
|
104
|
-
name: type,
|
|
105
|
-
required: true,
|
|
106
|
-
disabled: loading,
|
|
107
|
-
rules: [
|
|
108
|
-
{
|
|
109
|
-
required: true,
|
|
110
|
-
message: "".concat(title, "\u4E0D\u80FD\u4E3A\u7A7A"),
|
|
111
|
-
},
|
|
112
|
-
],
|
|
113
|
-
onChange: handleChange,
|
|
114
|
-
max: maxTextLength,
|
|
115
|
-
rows: 3,
|
|
116
|
-
multiline: true,
|
|
117
|
-
sx: {
|
|
118
|
-
marginBottom: '43px',
|
|
119
|
-
},
|
|
120
|
-
});
|
|
121
101
|
useEffect(function () {
|
|
122
102
|
setMode(mode);
|
|
123
103
|
}, [mode]);
|
|
124
|
-
useEffect(function () {
|
|
125
|
-
var resItems = [4, 5].includes(type) ? content.split('\n') : [content];
|
|
126
|
-
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
127
|
-
name: title,
|
|
128
|
-
type: type,
|
|
129
|
-
items: content ? resItems : [''],
|
|
130
|
-
});
|
|
131
|
-
// nameTextField.handleValidate();
|
|
132
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
133
|
-
}, [content, title, type]);
|
|
134
104
|
useEffect(function () {
|
|
135
105
|
// don't excute when edit detail
|
|
136
106
|
if (token)
|
|
@@ -141,11 +111,6 @@ var AbilityFormItem = function (_a) {
|
|
|
141
111
|
});
|
|
142
112
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
143
113
|
}, [type, name, token]);
|
|
144
|
-
// useEffect(() => {
|
|
145
|
-
// if (item?.items?.length) {
|
|
146
|
-
// setContent(item.items.join('\n'));
|
|
147
|
-
// }
|
|
148
|
-
// }, [item]);
|
|
149
114
|
return (_jsxs(Stack, { children: [_jsxs(Stack, __assign({ style: { marginBottom: '18px' }, direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canReplace && (_jsx(Button, __assign({ loading: loading, onClick: handleReplace, variant: "outlined", color: "inherit", size: "small", icon: _jsx(RefreshIcon, {}) }, { children: loading ? '生成中' : '换一换' })))] })), internalMode === 'edit' && (_jsx(Box, __assign({ width: 1 }, { children: _jsx(FieldArray, __assign({ name: "workPlaceItems[".concat(index, "].items") }, { children: function (_a) {
|
|
150
115
|
var _b, _c;
|
|
151
116
|
var pushItem = _a.push, removeItem = _a.remove;
|
|
@@ -80,31 +80,13 @@ var validationSchema = Yup.object().shape({
|
|
|
80
80
|
var InitialValues = {
|
|
81
81
|
workPlaceItems: [
|
|
82
82
|
{
|
|
83
|
-
name: '
|
|
84
|
-
type: 1,
|
|
85
|
-
items: [],
|
|
86
|
-
maxTextLength: 100,
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
name: '优次表现-优秀表现',
|
|
90
|
-
type: 2,
|
|
91
|
-
items: [],
|
|
92
|
-
maxTextLength: 100,
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: '优次表现-较差表现',
|
|
96
|
-
type: 3,
|
|
97
|
-
items: [],
|
|
98
|
-
maxTextLength: 100,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: '考察建议-评分关键点',
|
|
83
|
+
name: '评分关键点',
|
|
102
84
|
type: 5,
|
|
103
85
|
items: [],
|
|
104
86
|
maxTextLength: 300,
|
|
105
87
|
},
|
|
106
88
|
{
|
|
107
|
-
name: '
|
|
89
|
+
name: '面试题目',
|
|
108
90
|
type: 4,
|
|
109
91
|
items: [],
|
|
110
92
|
maxTextLength: 300,
|
|
@@ -101,43 +101,12 @@ var UpdateAbility = function (props) {
|
|
|
101
101
|
},
|
|
102
102
|
}).run;
|
|
103
103
|
var handleValue = useCallback(function (v) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
// // const error = await nameTextField.handleValidate();
|
|
111
|
-
// const error = false;
|
|
112
|
-
// const workPlaceItemsError = workPlaceItems.some(v => v.items.length === 0);
|
|
113
|
-
// if (!error) {
|
|
114
|
-
// const avocadoConfig = window['AvocadoVideoInterviewConfig'];
|
|
115
|
-
// // 旧自定义能力
|
|
116
|
-
// if (type === 3 && !isWorkplace) {
|
|
117
|
-
// run({
|
|
118
|
-
// name: value,
|
|
119
|
-
// tag: value,
|
|
120
|
-
// token,
|
|
121
|
-
// mateData: {
|
|
122
|
-
// account: avocadoConfig?.account,
|
|
123
|
-
// enterpriseId: avocadoConfig?.enterpriseId,
|
|
124
|
-
// },
|
|
125
|
-
// });
|
|
126
|
-
// } else if (!workPlaceItemsError) {
|
|
127
|
-
// // 职场能力
|
|
128
|
-
// run({
|
|
129
|
-
// name: value,
|
|
130
|
-
// tag: value,
|
|
131
|
-
// token,
|
|
132
|
-
// workPlaceItems,
|
|
133
|
-
// mateData: {
|
|
134
|
-
// account: avocadoConfig?.account,
|
|
135
|
-
// enterpriseId: avocadoConfig?.enterpriseId,
|
|
136
|
-
// },
|
|
137
|
-
// });
|
|
138
|
-
// }
|
|
139
|
-
// }
|
|
140
|
-
// }, [run, token, value, isWorkplace, type, workPlaceItems]);
|
|
104
|
+
var workPlaceItems = formik.values.workPlaceItems;
|
|
105
|
+
var index = workPlaceItems.findIndex(function (ele) { return ele.type === v.type; });
|
|
106
|
+
workPlaceItems.splice(index, 1, v);
|
|
107
|
+
var list = workPlaceItems;
|
|
108
|
+
formik.setFieldValue('workPlaceItems', list);
|
|
109
|
+
}, [formik]);
|
|
141
110
|
var footer = useCallback(function () {
|
|
142
111
|
return step === 1 ? (_jsx(Box, __assign({ display: "flex", padding: "12px 16px" }, { children: type === 1 ? (_jsx(_Fragment, {})) : (_jsx(Button, __assign({ variant: "outlined", color: "inherit", onClick: function () { return setStep(2); } }, { children: "\u7F16\u8F91" }))) }))) : (_jsxs(Box, __assign({ display: "flex", justifyContent: "flex-end", padding: "12px 16px" }, { children: [_jsx(Button, __assign({ sx: { mr: 1, fontWeight: 400 }, variant: "text", color: "inherit", onClick: onClose }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ loading: loading, onClick: formik.submitForm }, { children: "\u4FDD\u5B58" }))] })));
|
|
143
112
|
}, [step, type, onClose, loading, formik]);
|
|
@@ -21,7 +21,9 @@ import { Stack } from 'fbm-ui/lib/mui';
|
|
|
21
21
|
import { forwardRef, memo, useEffect } from 'react';
|
|
22
22
|
var ScrollDialogContent = styled(Box)({
|
|
23
23
|
maxHeight: 'calc(100vh - 192px)',
|
|
24
|
-
|
|
24
|
+
height: 'calc(100vh - 192px)',
|
|
25
|
+
overflow: 'hidden',
|
|
26
|
+
paddingBottom: 80,
|
|
25
27
|
});
|
|
26
28
|
var AiAbilitySelectRoot = forwardRef(function (_a, ref) {
|
|
27
29
|
var jobToken = _a.jobToken, thirdToken = _a.thirdToken, token = _a.token, hiddenTips = _a.hiddenTips;
|
|
@@ -41,7 +43,7 @@ var AiAbilitySelectRoot = forwardRef(function (_a, ref) {
|
|
|
41
43
|
setEnterprise({ jobToken: jobToken, thirdToken: thirdToken });
|
|
42
44
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
43
45
|
}, [jobToken, thirdToken]);
|
|
44
|
-
return (_jsx(ScrollDialogContent, __assign({ ref: ref }, { children: _jsxs(Box, __assign({ display: "flex", flexDirection: "column", width: 760 }, { children: [_jsxs(Stack, __assign({ spacing: 2, mb: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: !hiddenTips ? '请选择要优先使用的考察能力,也可以点击「下一步」直接出题' : '已选择的考察能力会优先在面试题目中展示' })), (aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.some(function (v) { return v.isNew; })) && (_jsxs(Stack, __assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx("img", { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn", alt: "", width: 38, height: 16 }), _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "AI\u6839\u636E\u5C97\u4F4D\u4FE1\u606F\u751F\u6210\u7684\u80FD\u529B\uFF0C\u521B\u5EFA\u5B8C\u6B65\u9AA4\u540E\uFF0C\u4F1A\u81EA\u52A8\u5C06\u9009\u62E9\u7684\u65B0\u589E\u80FD\u529B\u52A0\u5165\u5230\u8BBE\u7F6E\u9875\u7684\u8003\u5BDF\u80FD\u529B\u5217\u8868\u4E2D\u3002" }))] })))] })), _jsx(AiAbilityList, { items: aiAbilityList })] })) })));
|
|
46
|
+
return (_jsx(ScrollDialogContent, __assign({ ref: ref }, { children: _jsxs(Box, __assign({ display: "flex", flexDirection: "column", width: 760, height: 1 }, { children: [_jsxs(Stack, __assign({ spacing: 2, mb: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: !hiddenTips ? '请选择要优先使用的考察能力,也可以点击「下一步」直接出题' : '已选择的考察能力会优先在面试题目中展示' })), (aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.some(function (v) { return v.isNew; })) && (_jsxs(Stack, __assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx("img", { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn", alt: "", width: 38, height: 16 }), _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "AI\u6839\u636E\u5C97\u4F4D\u4FE1\u606F\u751F\u6210\u7684\u80FD\u529B\uFF0C\u521B\u5EFA\u5B8C\u6B65\u9AA4\u540E\uFF0C\u4F1A\u81EA\u52A8\u5C06\u9009\u62E9\u7684\u65B0\u589E\u80FD\u529B\u52A0\u5165\u5230\u8BBE\u7F6E\u9875\u7684\u8003\u5BDF\u80FD\u529B\u5217\u8868\u4E2D\u3002" }))] })))] })), _jsx(AiAbilityList, { items: aiAbilityList })] })) })));
|
|
45
47
|
});
|
|
46
48
|
AiAbilitySelectRoot.displayName = 'AiAbilitySelectRoot';
|
|
47
49
|
export default memo(AiAbilitySelectRoot);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AiAbilityDetailProps } from './interface';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const _default: import("react").NamedExoticComponent<AiAbilityDetailProps>;
|
|
4
|
+
export default _default;
|
|
@@ -12,6 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { Box, Typography } from 'fbm-ui';
|
|
14
14
|
import { Stack } from 'fbm-ui/lib/mui';
|
|
15
|
+
import { memo } from 'react';
|
|
15
16
|
var AiAbilityDetail = function (_a) {
|
|
16
17
|
var detail = _a.detail;
|
|
17
18
|
return (_jsx(Box, __assign({ p: 2, maxHeight: 582, overflow: "scroll" }, { children: detail === null || detail === void 0 ? void 0 : detail.map(function (v) {
|
|
@@ -19,4 +20,4 @@ var AiAbilityDetail = function (_a) {
|
|
|
19
20
|
return (_jsxs(Stack, __assign({ mb: 2, spacing: 1, width: 300 }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: 500 }, { children: v.name })), _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: (_a = v.items) === null || _a === void 0 ? void 0 : _a.join('\n') }))] }), v.name));
|
|
20
21
|
}) })));
|
|
21
22
|
};
|
|
22
|
-
export default AiAbilityDetail;
|
|
23
|
+
export default memo(AiAbilityDetail);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AiAbilityItemProps } from './interface';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const _default: import("react").NamedExoticComponent<AiAbilityItemProps>;
|
|
4
|
+
export default _default;
|
|
@@ -39,15 +39,14 @@ import AiAbilityDetail from './AiAbilityDetail';
|
|
|
39
39
|
import { NewBadge } from './styled';
|
|
40
40
|
import { useAiAbilityListStore } from "../../../../store/ai-ability-select/question-ability-store";
|
|
41
41
|
import { Box, Checkbox, Paper, Popover, Typography } from 'fbm-ui';
|
|
42
|
+
import { memo } from 'react';
|
|
42
43
|
var AiAbilityItem = function (_a) {
|
|
43
44
|
var name = _a.name, isNew = _a.isNew, token = _a.token, detail = _a.detail;
|
|
44
45
|
var _b = useAiAbilityListStore(), selctedAbilitys = _b.selctedAbilitys, setSelctedAbilitys = _b.setSelctedAbilitys;
|
|
45
46
|
var handleChange = function (_, checked) {
|
|
46
47
|
return setSelctedAbilitys(__spreadArray(__spreadArray([], __read(selctedAbilitys.filter(function (v) { return v !== token; })), false), __read((checked ? [token] : [])), false));
|
|
47
48
|
};
|
|
48
|
-
return (_jsx(Paper, __assign({ variant: "outlined" }, { children: _jsxs(Box, __assign({ sx: { pl: 2, width: 240, height: 54, display: 'flex', alignItems: 'center', position: 'relative' } }, { children: [_jsx(Checkbox, { onChange: handleChange, label: _jsx(
|
|
49
|
-
// @ts-ignore
|
|
50
|
-
sx: { width: 1, height: 1 } }), isNew && _jsx(NewBadge, { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn" })] })) })));
|
|
49
|
+
return (_jsx(Paper, __assign({ variant: "outlined" }, { children: _jsxs(Box, __assign({ sx: { pl: 2, width: 240, height: 54, display: 'flex', alignItems: 'center', position: 'relative' } }, { children: [_jsx(Checkbox, { onChange: handleChange, label: _jsx(MemoAiAbilityLable, { name: name, detail: detail }), checked: selctedAbilitys.includes(token), sx: { width: 1, height: 1 } }), isNew && _jsx(NewBadge, { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn" })] })) })));
|
|
51
50
|
};
|
|
52
51
|
var AiAbilityLable = function (_a) {
|
|
53
52
|
var name = _a.name, detail = _a.detail;
|
|
@@ -55,4 +54,5 @@ var AiAbilityLable = function (_a) {
|
|
|
55
54
|
return (_jsx(Popover, __assign({ content: _jsx(AiAbilityDetail, { detail: detail }), trigger: "hover", placement: "right" }, { children: _jsx(Typography, __assign({ noWrap: true, maxWidth: 180, variant: "body2", sx: { mt: 0.5 } }, { children: name })) })));
|
|
56
55
|
return (_jsx(Typography, __assign({ noWrap: true, maxWidth: 180, variant: "body2" }, { children: name })));
|
|
57
56
|
};
|
|
58
|
-
|
|
57
|
+
var MemoAiAbilityLable = memo(AiAbilityLable);
|
|
58
|
+
export default memo(AiAbilityItem);
|
|
@@ -11,9 +11,21 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import AiAbilityItem from '../AiAbilityItem';
|
|
14
|
-
import
|
|
14
|
+
import AutoSizer from 'react-virtualized-auto-sizer';
|
|
15
|
+
import { FixedSizeGrid as Grid } from 'react-window';
|
|
16
|
+
var Cell = function (_a) {
|
|
17
|
+
var data = _a.data, columnIndex = _a.columnIndex, rowIndex = _a.rowIndex, style = _a.style;
|
|
18
|
+
var item = data[rowIndex * 3 + columnIndex];
|
|
19
|
+
if (!item) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return (_jsx("div", __assign({ style: __assign(__assign({}, style), { width: style.width - 8, height: style.height - 8 }) }, { children: _jsx(AiAbilityItem, __assign({}, item)) })));
|
|
23
|
+
};
|
|
15
24
|
var AiAbilityList = function (_a) {
|
|
16
25
|
var items = _a.items;
|
|
17
|
-
return (_jsx(
|
|
26
|
+
return (_jsx(AutoSizer, { children: function (_a) {
|
|
27
|
+
var height = _a.height, width = _a.width;
|
|
28
|
+
return (_jsx(Grid, __assign({ columnCount: 3, columnWidth: 240, overscanRowCount: 10, height: height, rowCount: Math.ceil(items.length / 3), rowHeight: 62, width: width, itemData: items }, { children: Cell })));
|
|
29
|
+
} }));
|
|
18
30
|
};
|
|
19
31
|
export default AiAbilityList;
|
|
@@ -109,7 +109,7 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
|
|
|
109
109
|
_d.label = 2;
|
|
110
110
|
case 2:
|
|
111
111
|
_d.trys.push([2, 4, , 5]);
|
|
112
|
-
return [4 /*yield*/, PostAiModelUpsert(__assign(__assign({ name: name, thirdToken: '', aiModel: (props === null || props === void 0 ? void 0 : props.aiModel) || aiModel }, interviewRoomState), { introductoryVideoSetting: {}, selectAbilities: selctedAbilitys, token: token, questions: questions }))];
|
|
112
|
+
return [4 /*yield*/, PostAiModelUpsert(__assign(__assign({ name: name, thirdToken: '', aiModel: (props === null || props === void 0 ? void 0 : props.aiModel) || aiModel }, interviewRoomState), { introductoryVideoSetting: {}, selectAbilities: selctedAbilitys, token: token, questions: questions.map(function (item, i) { return (__assign(__assign({}, item), { selfIntroOpt: i < 2 ? item.selfIntroOpt : 0 })); }) }))];
|
|
113
113
|
case 3:
|
|
114
114
|
data = (_d.sent()).data;
|
|
115
115
|
return [2 /*return*/, Promise.resolve({
|
|
@@ -14,13 +14,15 @@ import { willOrNotOptions } from './const';
|
|
|
14
14
|
import MainPoints from './MainPoints';
|
|
15
15
|
import { useAiAnalysisStore } from "../../../../store/ai-question/ai-analysis-store";
|
|
16
16
|
import { Box, Chip, CloseIcon, IconButton, InfoIcon, Input, Select, Tooltip, Typography } from 'fbm-ui';
|
|
17
|
-
import { ListItem, ListItemText } from 'fbm-ui/lib/mui';
|
|
17
|
+
import { ListItem, ListItemText, Stack } from 'fbm-ui/lib/mui';
|
|
18
18
|
import update from 'immutability-helper';
|
|
19
19
|
import { useCallback } from 'react';
|
|
20
20
|
var AnalysisItem = function (props) {
|
|
21
21
|
var _a;
|
|
22
|
-
var name = props.name, weight = props.weight, type = props.type, extra = props.extra, index = props.index, _b = props.abilityType, abilityType = _b === void 0 ? 1 : _b, isWorkplace = props.isWorkplace;
|
|
23
|
-
var _c = useAiAnalysisStore(function (store) { return [
|
|
22
|
+
var name = props.name, weight = props.weight, type = props.type, extra = props.extra, index = props.index, _b = props.abilityType, abilityType = _b === void 0 ? 1 : _b, isWorkplace = props.isWorkplace, child = props.child;
|
|
23
|
+
var _c = useAiAnalysisStore(function (store) { return [
|
|
24
|
+
store.aiAbilities,
|
|
25
|
+
]; }), aiAbilities = _c.aiAbilities, updateAiAbilities = _c.updateAiAbilities, updateAiAbilitiesWeight = _c.updateAiAbilitiesWeight, removeAiAbilities = _c.removeAiAbilities, updateAiAbilitiesChildWeight = _c.updateAiAbilitiesChildWeight;
|
|
24
26
|
var desc = props.desc || props.name;
|
|
25
27
|
var NotUsedAilibity = ['英文能力', '游戏测评'];
|
|
26
28
|
if (abilityType === 2 && !isWorkplace) {
|
|
@@ -39,6 +41,13 @@ var AnalysisItem = function (props) {
|
|
|
39
41
|
var value = _a.target.value;
|
|
40
42
|
updateAiAbilitiesWeight(value, index);
|
|
41
43
|
}, [updateAiAbilitiesWeight, index]);
|
|
42
|
-
return (_jsxs(Box, { children: [_jsxs(ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: _jsx(IconButton, __assign({ size: "small", sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: _jsx(CloseIcon, {}) })) }, { children: [_jsx(ListItemText, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: name })), abilityType === 2 && !isWorkplace ? (_jsx(Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : (_jsxs(_Fragment, { children: [abilityType === 2 && isWorkplace && type === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), _jsx(Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && (_jsx(Select, { sx: { width: 150, ml: 1 }, options: willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && (_jsx(Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })),
|
|
44
|
+
return (_jsxs(Box, { children: [_jsxs(ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: _jsx(IconButton, __assign({ size: "small", sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: _jsx(CloseIcon, {}) })) }, { children: [_jsx(ListItemText, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: name })), abilityType === 2 && !isWorkplace ? (_jsx(Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : (_jsxs(_Fragment, { children: [abilityType === 2 && isWorkplace && type === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), _jsx(Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && (_jsx(Select, { sx: { width: 150, ml: 1 }, options: willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && (_jsx(Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), ((child === null || child === void 0 ? void 0 : child.length) || 0) > 0 && (_jsxs(Stack, __assign({ sx: {
|
|
45
|
+
backgroundColor: 'rgba(0, 0, 0, 0.04)',
|
|
46
|
+
pl: 2,
|
|
47
|
+
pt: 1,
|
|
48
|
+
} }, { children: [_jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "\u4E13\u4E1A\u7248\u62A5\u544A\u4E2D\u5F97\u5206\u4F1A\u91C7\u7528AI\u7EFC\u5408\u5206\u6570\u548C\u5F97\u5206\u70B9\u5206\u6570\u7684\u590D\u5408\u5206\uFF0C\u6807\u51C6\u7248\u53EA\u6709AI\u7EFC\u5408\u5206\u3002" })), child === null || child === void 0 ? void 0 : child.map(function (item, index) { return (_jsxs(ListItem, __assign({ sx: { pl: 0, pr: 4, ml: 2 } }, { children: [_jsx(ListItemText, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center" }, { children: _jsx(Typography, __assign({ variant: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: item.name })) })) }), _jsx(Input, { sx: { width: 84, mr: 1 }, value: item.weight, disabled: index === child.length - 1, size: "small", endAdornment: "%", onChange: function (_a) {
|
|
49
|
+
var value = _a.target.value;
|
|
50
|
+
return updateAiAbilitiesChildWeight(value, index, index);
|
|
51
|
+
} })] }), item.token)); })] }))), type === 6 && _jsx(MainPoints, { extra: extra, index: index })] }));
|
|
43
52
|
};
|
|
44
53
|
export default AnalysisItem;
|
|
@@ -3,6 +3,16 @@ export declare const LANGUAGE_NAMES: {
|
|
|
3
3
|
2: string;
|
|
4
4
|
3: string;
|
|
5
5
|
4: string;
|
|
6
|
+
5: string;
|
|
7
|
+
6: string;
|
|
8
|
+
7: string;
|
|
9
|
+
8: string;
|
|
10
|
+
9: string;
|
|
11
|
+
10: string;
|
|
12
|
+
11: string;
|
|
13
|
+
12: string;
|
|
14
|
+
13: string;
|
|
15
|
+
14: string;
|
|
6
16
|
};
|
|
7
17
|
export declare const CATEGORY_NAME: {
|
|
8
18
|
1: string;
|
|
@@ -16,10 +26,39 @@ export declare const SERVER_LANGUAGE_TYPE: {
|
|
|
16
26
|
12: number;
|
|
17
27
|
11: number;
|
|
18
28
|
13: number;
|
|
29
|
+
19: number;
|
|
30
|
+
20: number;
|
|
31
|
+
21: number;
|
|
32
|
+
22: number;
|
|
33
|
+
23: number;
|
|
34
|
+
24: number;
|
|
35
|
+
25: number;
|
|
36
|
+
26: number;
|
|
37
|
+
27: number;
|
|
38
|
+
28: number;
|
|
19
39
|
};
|
|
20
40
|
export declare const LANGUAGE_SHOW_NAME: {
|
|
21
41
|
2: string;
|
|
22
42
|
13: string;
|
|
23
43
|
12: string;
|
|
24
44
|
11: string;
|
|
45
|
+
19: string;
|
|
46
|
+
20: string;
|
|
47
|
+
};
|
|
48
|
+
export declare const LANGUAGE_SHOW_NAMES: {
|
|
49
|
+
1: string;
|
|
50
|
+
2: string;
|
|
51
|
+
3: string;
|
|
52
|
+
4: string;
|
|
53
|
+
5: string;
|
|
54
|
+
6: string;
|
|
55
|
+
7: string;
|
|
56
|
+
8: string;
|
|
57
|
+
9: string;
|
|
58
|
+
10: string;
|
|
59
|
+
11: string;
|
|
60
|
+
12: string;
|
|
61
|
+
13: string;
|
|
62
|
+
14: string;
|
|
25
63
|
};
|
|
64
|
+
export declare const LANGUAGE_SHOW_NAMES_ORDER: number[];
|