eli-video-interview 1.2.42-alpha.42 → 1.2.42-alpha.44
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/enum/ai-question.d.ts +5 -1
- package/esm/enum/ai-question.js +4 -0
- package/esm/modules/ai-question/Root.js +1 -1
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +12 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +14 -2
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +12 -18
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +8 -3
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +1 -0
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
- package/lib/enum/ai-question.d.ts +5 -1
- package/lib/enum/ai-question.js +4 -0
- package/lib/modules/ai-question/Root.js +1 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +12 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +14 -2
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +11 -17
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +7 -2
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +1 -0
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
- package/package.json +1 -1
package/esm/enum/ai-question.js
CHANGED
|
@@ -30,6 +30,10 @@ export var LANGUAGE_TYPE;
|
|
|
30
30
|
LANGUAGE_TYPE[LANGUAGE_TYPE["ENGLISH"] = 11] = "ENGLISH";
|
|
31
31
|
LANGUAGE_TYPE[LANGUAGE_TYPE["KOREAN"] = 19] = "KOREAN";
|
|
32
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";
|
|
33
37
|
})(LANGUAGE_TYPE || (LANGUAGE_TYPE = {}));
|
|
34
38
|
/**
|
|
35
39
|
* 题目类型
|
|
@@ -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({
|
|
@@ -5,6 +5,10 @@ export declare const LANGUAGE_NAMES: {
|
|
|
5
5
|
4: string;
|
|
6
6
|
5: string;
|
|
7
7
|
6: string;
|
|
8
|
+
7: string;
|
|
9
|
+
8: string;
|
|
10
|
+
9: string;
|
|
11
|
+
10: string;
|
|
8
12
|
};
|
|
9
13
|
export declare const CATEGORY_NAME: {
|
|
10
14
|
1: string;
|
|
@@ -20,6 +24,10 @@ export declare const SERVER_LANGUAGE_TYPE: {
|
|
|
20
24
|
13: number;
|
|
21
25
|
19: number;
|
|
22
26
|
20: number;
|
|
27
|
+
21: number;
|
|
28
|
+
22: number;
|
|
29
|
+
23: number;
|
|
30
|
+
24: number;
|
|
23
31
|
};
|
|
24
32
|
export declare const LANGUAGE_SHOW_NAME: {
|
|
25
33
|
2: string;
|
|
@@ -36,5 +44,9 @@ export declare const LANGUAGE_SHOW_NAMES: {
|
|
|
36
44
|
4: string;
|
|
37
45
|
5: string;
|
|
38
46
|
6: string;
|
|
47
|
+
7: string;
|
|
48
|
+
8: string;
|
|
49
|
+
9: string;
|
|
50
|
+
10: string;
|
|
39
51
|
};
|
|
40
52
|
export declare const LANGUAGE_SHOW_NAMES_ORDER: number[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _a, _b;
|
|
2
2
|
import { CATEGORY_TYPE, LANGUAGE_TYPE } from "../../../../enum/ai-question";
|
|
3
|
-
var MANDARIN = LANGUAGE_TYPE.MANDARIN, CANTONESE = LANGUAGE_TYPE.CANTONESE, JAPANESE = LANGUAGE_TYPE.JAPANESE, ENGLISH = LANGUAGE_TYPE.ENGLISH, KOREAN = LANGUAGE_TYPE.KOREAN, SPANISH = LANGUAGE_TYPE.SPANISH;
|
|
3
|
+
var MANDARIN = LANGUAGE_TYPE.MANDARIN, CANTONESE = LANGUAGE_TYPE.CANTONESE, JAPANESE = LANGUAGE_TYPE.JAPANESE, ENGLISH = LANGUAGE_TYPE.ENGLISH, KOREAN = LANGUAGE_TYPE.KOREAN, SPANISH = LANGUAGE_TYPE.SPANISH, ITALIAN = LANGUAGE_TYPE.ITALIAN, RUSSIAN = LANGUAGE_TYPE.RUSSIAN, FRENCH = LANGUAGE_TYPE.FRENCH, GERMAN = LANGUAGE_TYPE.GERMAN;
|
|
4
4
|
var LANGUAGE = CATEGORY_TYPE.LANGUAGE, SEMANTICS = CATEGORY_TYPE.SEMANTICS, EXPRESSION = CATEGORY_TYPE.EXPRESSION, FORM = CATEGORY_TYPE.FORM, LANGUAGE_ABILITY = CATEGORY_TYPE.LANGUAGE_ABILITY;
|
|
5
5
|
export var LANGUAGE_NAMES = {
|
|
6
6
|
1: '中文-普通话',
|
|
@@ -9,6 +9,10 @@ export var LANGUAGE_NAMES = {
|
|
|
9
9
|
4: '中文-粤语',
|
|
10
10
|
5: '韩语',
|
|
11
11
|
6: '西班牙语',
|
|
12
|
+
7: '意大利语',
|
|
13
|
+
8: '俄语',
|
|
14
|
+
9: '法语',
|
|
15
|
+
10: '德语',
|
|
12
16
|
};
|
|
13
17
|
export var CATEGORY_NAME = (_a = {},
|
|
14
18
|
_a[LANGUAGE] = '候选人语种',
|
|
@@ -24,6 +28,10 @@ export var SERVER_LANGUAGE_TYPE = (_b = {},
|
|
|
24
28
|
_b[CANTONESE] = 4,
|
|
25
29
|
_b[KOREAN] = 5,
|
|
26
30
|
_b[SPANISH] = 6,
|
|
31
|
+
_b[ITALIAN] = 7,
|
|
32
|
+
_b[RUSSIAN] = 8,
|
|
33
|
+
_b[FRENCH] = 9,
|
|
34
|
+
_b[GERMAN] = 10,
|
|
27
35
|
_b);
|
|
28
36
|
// 由于语种value 和 name的映射不对应,这里用于前端显示 AI基础能力 中文|英文表达
|
|
29
37
|
export var LANGUAGE_SHOW_NAME = {
|
|
@@ -41,5 +49,9 @@ export var LANGUAGE_SHOW_NAMES = {
|
|
|
41
49
|
4: '粤语',
|
|
42
50
|
5: '韩语',
|
|
43
51
|
6: '西班牙语',
|
|
52
|
+
7: '意大利语',
|
|
53
|
+
8: '俄语',
|
|
54
|
+
9: '法语',
|
|
55
|
+
10: '德语',
|
|
44
56
|
};
|
|
45
|
-
export var LANGUAGE_SHOW_NAMES_ORDER = [1, 4, 2, 3, 5, 6];
|
|
57
|
+
export var LANGUAGE_SHOW_NAMES_ORDER = [1, 4, 2, 3, 5, 6, 7, 8, 9, 10];
|
|
@@ -42,7 +42,7 @@ import { CATEGORY_TYPE, LANGUAGE_TYPE } from "../../../../enum/ai-question";
|
|
|
42
42
|
import { PostAiAbilities } from "../../../../services/ai-question";
|
|
43
43
|
import { useAiAnalysisStore } from "../../../../store/ai-question/ai-analysis-store";
|
|
44
44
|
import { useRequest, useSetState } from 'ahooks';
|
|
45
|
-
import { Checkbox, Dialog, Loading,
|
|
45
|
+
import { Checkbox, Dialog, Loading, Select, Typography } from 'fbm-ui';
|
|
46
46
|
import { Box, Divider, FormControl, FormLabel, Stack } from 'fbm-ui/lib/mui';
|
|
47
47
|
import { useCallback, useEffect, useState } from 'react';
|
|
48
48
|
var MANDARIN = LANGUAGE_TYPE.MANDARIN, CANTONESE = LANGUAGE_TYPE.CANTONESE;
|
|
@@ -84,6 +84,7 @@ var AiAssessmentCriteria = function (props) {
|
|
|
84
84
|
}, [setCheckAbilities]);
|
|
85
85
|
var onLanguageChange = function (_a, list) {
|
|
86
86
|
var value = _a.target.value;
|
|
87
|
+
console.log('value', value, list);
|
|
87
88
|
var language = Number(value === '0' ? MANDARIN : value);
|
|
88
89
|
var item = list.find(function (_a) {
|
|
89
90
|
var type = _a.type;
|
|
@@ -122,23 +123,16 @@ var AiAssessmentCriteria = function (props) {
|
|
|
122
123
|
return (_jsxs(Box, { children: [(list.filter(function (_a) {
|
|
123
124
|
var type = _a.type;
|
|
124
125
|
return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
|
|
125
|
-
}).length > 0 || type === CATEGORY_TYPE.LANGUAGE) && (_jsx(FormControl, { children: _jsx(FormLabel, __assign({ component: "legend", style: { fontSize: 14, fontWeight: 400, color: 'rgba(0,0,0,0.86)' } }, { children: _jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [type === CATEGORY_TYPE.LANGUAGE ? (_jsx(Typography, __assign({ style: { fontSize: 16, fontWeight: 500 } }, { children: name }))) : (_jsx(Typography, { children: type === CATEGORY_TYPE.EXPRESSION ? LANGUAGE_SHOW_NAME[language] + name : name })), type === CATEGORY_TYPE.LANGUAGE && (_jsx(Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })) })), type === CATEGORY_TYPE.LANGUAGE ? (_jsxs(Box, { children: [
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
var type = _a.type;
|
|
136
|
-
return ![MANDARIN, CANTONESE].includes(type);
|
|
137
|
-
})
|
|
138
|
-
.map(function (_a) {
|
|
139
|
-
var name = _a.name, type = _a.type, token = _a.token;
|
|
140
|
-
return (_jsx(Radio, { value: type, label: name }, token));
|
|
141
|
-
})] })), _jsx(Divider, { sx: { mb: 1 } }), _jsx(FormControl, { children: _jsx(FormLabel, __assign({ component: "legend", style: { fontSize: 16, color: 'rgba(0,0,0,0.86)', fontWeight: 500, marginBottom: 16 } }, { children: "AI\u57FA\u7840\u80FD\u529B" })) })] })) : (_jsx(_Fragment, { children: list.map(function (item) {
|
|
126
|
+
}).length > 0 || type === CATEGORY_TYPE.LANGUAGE) && (_jsx(FormControl, { children: _jsx(FormLabel, __assign({ component: "legend", style: { fontSize: 14, fontWeight: 400, color: 'rgba(0,0,0,0.86)' } }, { children: _jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [type === CATEGORY_TYPE.LANGUAGE ? (_jsx(Typography, __assign({ style: { fontSize: 16, fontWeight: 500 } }, { children: name }))) : (_jsx(Typography, { children: type === CATEGORY_TYPE.EXPRESSION ? LANGUAGE_SHOW_NAME[language] + name : name })), type === CATEGORY_TYPE.LANGUAGE && (_jsx(Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })) })), type === CATEGORY_TYPE.LANGUAGE ? (_jsxs(Box, { children: [_jsx(Select, { onChange: function (e) { return onLanguageChange(e, list); }, value: language, options: list.map(function (_a) {
|
|
127
|
+
var type = _a.type, name = _a.name;
|
|
128
|
+
return ({
|
|
129
|
+
value: type,
|
|
130
|
+
label: name,
|
|
131
|
+
});
|
|
132
|
+
}), sx: {
|
|
133
|
+
width: 240,
|
|
134
|
+
mt: 1,
|
|
135
|
+
} }), _jsx(Divider, { sx: { mb: 1 } }), _jsx(FormControl, { children: _jsx(FormLabel, __assign({ component: "legend", style: { fontSize: 16, color: 'rgba(0,0,0,0.86)', fontWeight: 500, marginBottom: 16 } }, { children: "AI\u57FA\u7840\u80FD\u529B" })) })] })) : (_jsx(_Fragment, { children: list.map(function (item) {
|
|
142
136
|
var name = item.name, desc = item.desc, type = item.type, token = item.token;
|
|
143
137
|
if (relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type)) {
|
|
144
138
|
var isLanguageAbility = [14, 15].includes(type);
|
|
@@ -33,7 +33,7 @@ import { useUpdateQuestionStore } from "../../../../store/ai-question/question-u
|
|
|
33
33
|
import { AddIcon, Box, Button, Checkbox, InfoIcon, Layout, Message, Popactions, Tooltip } from 'fbm-ui';
|
|
34
34
|
import { Typography } from 'fbm-ui/lib/mui';
|
|
35
35
|
import { Stack } from 'fbm-ui/lib/mui';
|
|
36
|
-
import { useState } from 'react';
|
|
36
|
+
import { useCallback, useState } from 'react';
|
|
37
37
|
var RandomQuestion = function (_a) {
|
|
38
38
|
var _b, _c;
|
|
39
39
|
var broadcastType = _a.broadcastType, onAddCustonQuestion = _a.onAddCustonQuestion, onAddRandomQuestion = _a.onAddRandomQuestion, category = _a.category, aiShowType = _a.aiShowType;
|
|
@@ -76,10 +76,15 @@ var RandomQuestion = function (_a) {
|
|
|
76
76
|
item: __assign(__assign({}, item), { enableScoreOptimization: !item.enableScoreOptimization }),
|
|
77
77
|
});
|
|
78
78
|
};
|
|
79
|
-
|
|
79
|
+
var handleSelfIntrosChange = useCallback(function () {
|
|
80
|
+
updateQuestionState({
|
|
81
|
+
item: __assign(__assign({}, item), { selfIntroOpt: item.selfIntroOpt ? 0 : 1 }),
|
|
82
|
+
});
|
|
83
|
+
}, [item, updateQuestionState]);
|
|
84
|
+
return (_jsxs(Layout, { children: [_jsxs(Stack, __assign({ mb: 1, justifyContent: "space-between", mt: 0.375 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Popactions, __assign({ actions: aiShowType === ADD_QUESTION_TYPE.SINGLECHIOCE ? [actions[1]] : actions, trigger: "click", isClickAway: true, sx: { height: 1 } }, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u968F\u673A\u9762\u8BD5\u5185\u5BB9" })) })), _jsx(Tooltip, __assign({ title: desc, placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1, height: 48 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), _jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: [isVideoBroadcast && (_jsxs(Stack, __assign({ spacing: 1, direction: "row" }, { children: [_jsx(Checkbox, { sx: {
|
|
80
85
|
mr: 0,
|
|
81
86
|
}, checked: ((_b = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _b === void 0 ? void 0 : _b.videoRetry) === 1, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), _jsx(Checkbox, { sx: {
|
|
82
87
|
mr: 0,
|
|
83
|
-
}, checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] }))), item.type === 1 && item.aiShowType === 1 && (_jsx(Checkbox, { checked: item === null || item === void 0 ? void 0 : item.enableScoreOptimization, label: _jsxs(Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u56DE\u7B54\u8FC7\u77ED\u6263\u5206", _jsx(Tooltip, __assign({ title: "\u82E5\u5B57\u6570\u5C0F\u4E8E\u7B49\u4E8E80\u65F6\uFF0C\u5BF9AI\u5206\u6570\u8FDB\u884C\u4E00\u5B9A\u7684\u51CF\u5C11\uFF0C\u6700\u5C11\n\u51CF10\u5206\uFF0C\u6700\u9AD8\u51CF40\u5206\uFF0C\u6309\u7167\u5B57\u6570\u9010\u51CF\u3002" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleEnableScoreOptimizationStatus }))] }))] })), open && _jsx(SelectQuestion, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
|
|
88
|
+
}, checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] }))), item.type === 1 && item.aiShowType === 1 && (_jsx(Checkbox, { checked: item === null || item === void 0 ? void 0 : item.enableScoreOptimization, label: _jsxs(Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u56DE\u7B54\u8FC7\u77ED\u6263\u5206", _jsx(Tooltip, __assign({ title: "\u82E5\u5B57\u6570\u5C0F\u4E8E\u7B49\u4E8E80\u65F6\uFF0C\u5BF9AI\u5206\u6570\u8FDB\u884C\u4E00\u5B9A\u7684\u51CF\u5C11\uFF0C\u6700\u5C11\n\u51CF10\u5206\uFF0C\u6700\u9AD8\u51CF40\u5206\uFF0C\u6309\u7167\u5B57\u6570\u9010\u51CF\u3002" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleEnableScoreOptimizationStatus })), questionState.aiShowType === 1 && questionState.index < 2 && (_jsx(Checkbox, { checked: !!item.selfIntroOpt, label: _jsxs(Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u81EA\u6211\u4ECB\u7ECD", _jsx(Tooltip, __assign({ title: "\u52FE\u9009\u4E3A\u81EA\u6211\u4ECB\u7ECD\u9898\u540E,\u5C06\u5BF9\u5019\u9009\u4EBA\u56DE\u7B54\u4E2D\u7684\u59D3\u540D\u8FDB\u884C\u4FEE\u6B63\u3002" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleSelfIntrosChange }))] }))] })), open && _jsx(SelectQuestion, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
|
|
84
89
|
};
|
|
85
90
|
export default RandomQuestion;
|
package/lib/enum/ai-question.js
CHANGED
|
@@ -33,6 +33,10 @@ var LANGUAGE_TYPE;
|
|
|
33
33
|
LANGUAGE_TYPE[LANGUAGE_TYPE["ENGLISH"] = 11] = "ENGLISH";
|
|
34
34
|
LANGUAGE_TYPE[LANGUAGE_TYPE["KOREAN"] = 19] = "KOREAN";
|
|
35
35
|
LANGUAGE_TYPE[LANGUAGE_TYPE["SPANISH"] = 20] = "SPANISH";
|
|
36
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["ITALIAN"] = 21] = "ITALIAN";
|
|
37
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["RUSSIAN"] = 22] = "RUSSIAN";
|
|
38
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["FRENCH"] = 23] = "FRENCH";
|
|
39
|
+
LANGUAGE_TYPE[LANGUAGE_TYPE["GERMAN"] = 24] = "GERMAN";
|
|
36
40
|
})(LANGUAGE_TYPE = exports.LANGUAGE_TYPE || (exports.LANGUAGE_TYPE = {}));
|
|
37
41
|
/**
|
|
38
42
|
* 题目类型
|
|
@@ -114,7 +114,7 @@ var AiQuestionRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
114
114
|
_d.label = 2;
|
|
115
115
|
case 2:
|
|
116
116
|
_d.trys.push([2, 4, , 5]);
|
|
117
|
-
return [4 /*yield*/, (0, ai_question_1.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 }))];
|
|
117
|
+
return [4 /*yield*/, (0, ai_question_1.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 })); }) }))];
|
|
118
118
|
case 3:
|
|
119
119
|
data = (_d.sent()).data;
|
|
120
120
|
return [2 /*return*/, Promise.resolve({
|
|
@@ -5,6 +5,10 @@ export declare const LANGUAGE_NAMES: {
|
|
|
5
5
|
4: string;
|
|
6
6
|
5: string;
|
|
7
7
|
6: string;
|
|
8
|
+
7: string;
|
|
9
|
+
8: string;
|
|
10
|
+
9: string;
|
|
11
|
+
10: string;
|
|
8
12
|
};
|
|
9
13
|
export declare const CATEGORY_NAME: {
|
|
10
14
|
1: string;
|
|
@@ -20,6 +24,10 @@ export declare const SERVER_LANGUAGE_TYPE: {
|
|
|
20
24
|
13: number;
|
|
21
25
|
19: number;
|
|
22
26
|
20: number;
|
|
27
|
+
21: number;
|
|
28
|
+
22: number;
|
|
29
|
+
23: number;
|
|
30
|
+
24: number;
|
|
23
31
|
};
|
|
24
32
|
export declare const LANGUAGE_SHOW_NAME: {
|
|
25
33
|
2: string;
|
|
@@ -36,5 +44,9 @@ export declare const LANGUAGE_SHOW_NAMES: {
|
|
|
36
44
|
4: string;
|
|
37
45
|
5: string;
|
|
38
46
|
6: string;
|
|
47
|
+
7: string;
|
|
48
|
+
8: string;
|
|
49
|
+
9: string;
|
|
50
|
+
10: string;
|
|
39
51
|
};
|
|
40
52
|
export declare const LANGUAGE_SHOW_NAMES_ORDER: number[];
|
|
@@ -3,7 +3,7 @@ var _a, _b;
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.LANGUAGE_SHOW_NAMES_ORDER = exports.LANGUAGE_SHOW_NAMES = exports.LANGUAGE_SHOW_NAME = exports.SERVER_LANGUAGE_TYPE = exports.CATEGORY_NAME = exports.LANGUAGE_NAMES = void 0;
|
|
5
5
|
var ai_question_1 = require("../../../../enum/ai-question");
|
|
6
|
-
var MANDARIN = ai_question_1.LANGUAGE_TYPE.MANDARIN, CANTONESE = ai_question_1.LANGUAGE_TYPE.CANTONESE, JAPANESE = ai_question_1.LANGUAGE_TYPE.JAPANESE, ENGLISH = ai_question_1.LANGUAGE_TYPE.ENGLISH, KOREAN = ai_question_1.LANGUAGE_TYPE.KOREAN, SPANISH = ai_question_1.LANGUAGE_TYPE.SPANISH;
|
|
6
|
+
var MANDARIN = ai_question_1.LANGUAGE_TYPE.MANDARIN, CANTONESE = ai_question_1.LANGUAGE_TYPE.CANTONESE, JAPANESE = ai_question_1.LANGUAGE_TYPE.JAPANESE, ENGLISH = ai_question_1.LANGUAGE_TYPE.ENGLISH, KOREAN = ai_question_1.LANGUAGE_TYPE.KOREAN, SPANISH = ai_question_1.LANGUAGE_TYPE.SPANISH, ITALIAN = ai_question_1.LANGUAGE_TYPE.ITALIAN, RUSSIAN = ai_question_1.LANGUAGE_TYPE.RUSSIAN, FRENCH = ai_question_1.LANGUAGE_TYPE.FRENCH, GERMAN = ai_question_1.LANGUAGE_TYPE.GERMAN;
|
|
7
7
|
var LANGUAGE = ai_question_1.CATEGORY_TYPE.LANGUAGE, SEMANTICS = ai_question_1.CATEGORY_TYPE.SEMANTICS, EXPRESSION = ai_question_1.CATEGORY_TYPE.EXPRESSION, FORM = ai_question_1.CATEGORY_TYPE.FORM, LANGUAGE_ABILITY = ai_question_1.CATEGORY_TYPE.LANGUAGE_ABILITY;
|
|
8
8
|
exports.LANGUAGE_NAMES = {
|
|
9
9
|
1: '中文-普通话',
|
|
@@ -12,6 +12,10 @@ exports.LANGUAGE_NAMES = {
|
|
|
12
12
|
4: '中文-粤语',
|
|
13
13
|
5: '韩语',
|
|
14
14
|
6: '西班牙语',
|
|
15
|
+
7: '意大利语',
|
|
16
|
+
8: '俄语',
|
|
17
|
+
9: '法语',
|
|
18
|
+
10: '德语',
|
|
15
19
|
};
|
|
16
20
|
exports.CATEGORY_NAME = (_a = {},
|
|
17
21
|
_a[LANGUAGE] = '候选人语种',
|
|
@@ -27,6 +31,10 @@ exports.SERVER_LANGUAGE_TYPE = (_b = {},
|
|
|
27
31
|
_b[CANTONESE] = 4,
|
|
28
32
|
_b[KOREAN] = 5,
|
|
29
33
|
_b[SPANISH] = 6,
|
|
34
|
+
_b[ITALIAN] = 7,
|
|
35
|
+
_b[RUSSIAN] = 8,
|
|
36
|
+
_b[FRENCH] = 9,
|
|
37
|
+
_b[GERMAN] = 10,
|
|
30
38
|
_b);
|
|
31
39
|
// 由于语种value 和 name的映射不对应,这里用于前端显示 AI基础能力 中文|英文表达
|
|
32
40
|
exports.LANGUAGE_SHOW_NAME = {
|
|
@@ -44,5 +52,9 @@ exports.LANGUAGE_SHOW_NAMES = {
|
|
|
44
52
|
4: '粤语',
|
|
45
53
|
5: '韩语',
|
|
46
54
|
6: '西班牙语',
|
|
55
|
+
7: '意大利语',
|
|
56
|
+
8: '俄语',
|
|
57
|
+
9: '法语',
|
|
58
|
+
10: '德语',
|
|
47
59
|
};
|
|
48
|
-
exports.LANGUAGE_SHOW_NAMES_ORDER = [1, 4, 2, 3, 5, 6];
|
|
60
|
+
exports.LANGUAGE_SHOW_NAMES_ORDER = [1, 4, 2, 3, 5, 6, 7, 8, 9, 10];
|
|
@@ -89,6 +89,7 @@ var AiAssessmentCriteria = function (props) {
|
|
|
89
89
|
}, [setCheckAbilities]);
|
|
90
90
|
var onLanguageChange = function (_a, list) {
|
|
91
91
|
var value = _a.target.value;
|
|
92
|
+
console.log('value', value, list);
|
|
92
93
|
var language = Number(value === '0' ? MANDARIN : value);
|
|
93
94
|
var item = list.find(function (_a) {
|
|
94
95
|
var type = _a.type;
|
|
@@ -127,23 +128,16 @@ var AiAssessmentCriteria = function (props) {
|
|
|
127
128
|
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, { children: [(list.filter(function (_a) {
|
|
128
129
|
var type = _a.type;
|
|
129
130
|
return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
|
|
130
|
-
}).length > 0 || type === ai_question_1.CATEGORY_TYPE.LANGUAGE) && ((0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsx)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 14, fontWeight: 400, color: 'rgba(0,0,0,0.86)' } }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ style: { fontSize: 16, fontWeight: 500 } }, { children: name }))) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { children: type === ai_question_1.CATEGORY_TYPE.EXPRESSION ? const_1.LANGUAGE_SHOW_NAME[language] + name : name })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })) })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsxs)(mui_1.Box, { children: [(0, jsx_runtime_1.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
var type = _a.type;
|
|
141
|
-
return ![MANDARIN, CANTONESE].includes(type);
|
|
142
|
-
})
|
|
143
|
-
.map(function (_a) {
|
|
144
|
-
var name = _a.name, type = _a.type, token = _a.token;
|
|
145
|
-
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: type, label: name }, token));
|
|
146
|
-
})] })), (0, jsx_runtime_1.jsx)(mui_1.Divider, { sx: { mb: 1 } }), (0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsx)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 16, color: 'rgba(0,0,0,0.86)', fontWeight: 500, marginBottom: 16 } }, { children: "AI\u57FA\u7840\u80FD\u529B" })) })] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: list.map(function (item) {
|
|
131
|
+
}).length > 0 || type === ai_question_1.CATEGORY_TYPE.LANGUAGE) && ((0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsx)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 14, fontWeight: 400, color: 'rgba(0,0,0,0.86)' } }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ style: { fontSize: 16, fontWeight: 500 } }, { children: name }))) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { children: type === ai_question_1.CATEGORY_TYPE.EXPRESSION ? const_1.LANGUAGE_SHOW_NAME[language] + name : name })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })) })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsxs)(mui_1.Box, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { onChange: function (e) { return onLanguageChange(e, list); }, value: language, options: list.map(function (_a) {
|
|
132
|
+
var type = _a.type, name = _a.name;
|
|
133
|
+
return ({
|
|
134
|
+
value: type,
|
|
135
|
+
label: name,
|
|
136
|
+
});
|
|
137
|
+
}), sx: {
|
|
138
|
+
width: 240,
|
|
139
|
+
mt: 1,
|
|
140
|
+
} }), (0, jsx_runtime_1.jsx)(mui_1.Divider, { sx: { mb: 1 } }), (0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsx)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 16, color: 'rgba(0,0,0,0.86)', fontWeight: 500, marginBottom: 16 } }, { children: "AI\u57FA\u7840\u80FD\u529B" })) })] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: list.map(function (item) {
|
|
147
141
|
var name = item.name, desc = item.desc, type = item.type, token = item.token;
|
|
148
142
|
if (relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type)) {
|
|
149
143
|
var isLanguageAbility = [14, 15].includes(type);
|
|
@@ -81,10 +81,15 @@ var RandomQuestion = function (_a) {
|
|
|
81
81
|
item: __assign(__assign({}, item), { enableScoreOptimization: !item.enableScoreOptimization }),
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
|
-
|
|
84
|
+
var handleSelfIntrosChange = (0, react_1.useCallback)(function () {
|
|
85
|
+
updateQuestionState({
|
|
86
|
+
item: __assign(__assign({}, item), { selfIntroOpt: item.selfIntroOpt ? 0 : 1 }),
|
|
87
|
+
});
|
|
88
|
+
}, [item, updateQuestionState]);
|
|
89
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Layout, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ mb: 1, justifyContent: "space-between", mt: 0.375 }, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Popactions, __assign({ actions: aiShowType === ai_question_2.ADD_QUESTION_TYPE.SINGLECHIOCE ? [actions[1]] : actions, trigger: "click", isClickAway: true, sx: { height: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u968F\u673A\u9762\u8BD5\u5185\u5BB9" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: desc, placement: "bottom-start" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1, height: 48 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), (0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: [isVideoBroadcast && ((0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { sx: {
|
|
85
90
|
mr: 0,
|
|
86
91
|
}, checked: ((_b = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _b === void 0 ? void 0 : _b.videoRetry) === 1, label: (0, jsx_runtime_1.jsx)(mui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { sx: {
|
|
87
92
|
mr: 0,
|
|
88
|
-
}, checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1, label: (0, jsx_runtime_1.jsx)(mui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] }))), item.type === 1 && item.aiShowType === 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: item === null || item === void 0 ? void 0 : item.enableScoreOptimization, label: (0, jsx_runtime_1.jsxs)(mui_1.Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u56DE\u7B54\u8FC7\u77ED\u6263\u5206", (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u82E5\u5B57\u6570\u5C0F\u4E8E\u7B49\u4E8E80\u65F6\uFF0C\u5BF9AI\u5206\u6570\u8FDB\u884C\u4E00\u5B9A\u7684\u51CF\u5C11\uFF0C\u6700\u5C11\n\u51CF10\u5206\uFF0C\u6700\u9AD8\u51CF40\u5206\uFF0C\u6309\u7167\u5B57\u6570\u9010\u51CF\u3002" }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleEnableScoreOptimizationStatus }))] }))] })), open && (0, jsx_runtime_1.jsx)(SelectQuestion_1.default, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
|
|
93
|
+
}, checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1, label: (0, jsx_runtime_1.jsx)(mui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] }))), item.type === 1 && item.aiShowType === 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: item === null || item === void 0 ? void 0 : item.enableScoreOptimization, label: (0, jsx_runtime_1.jsxs)(mui_1.Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u56DE\u7B54\u8FC7\u77ED\u6263\u5206", (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u82E5\u5B57\u6570\u5C0F\u4E8E\u7B49\u4E8E80\u65F6\uFF0C\u5BF9AI\u5206\u6570\u8FDB\u884C\u4E00\u5B9A\u7684\u51CF\u5C11\uFF0C\u6700\u5C11\n\u51CF10\u5206\uFF0C\u6700\u9AD8\u51CF40\u5206\uFF0C\u6309\u7167\u5B57\u6570\u9010\u51CF\u3002" }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleEnableScoreOptimizationStatus })), questionState.aiShowType === 1 && questionState.index < 2 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: !!item.selfIntroOpt, label: (0, jsx_runtime_1.jsxs)(mui_1.Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u81EA\u6211\u4ECB\u7ECD", (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u52FE\u9009\u4E3A\u81EA\u6211\u4ECB\u7ECD\u9898\u540E,\u5C06\u5BF9\u5019\u9009\u4EBA\u56DE\u7B54\u4E2D\u7684\u59D3\u540D\u8FDB\u884C\u4FEE\u6B63\u3002" }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleSelfIntrosChange }))] }))] })), open && (0, jsx_runtime_1.jsx)(SelectQuestion_1.default, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
|
|
89
94
|
};
|
|
90
95
|
exports.default = RandomQuestion;
|