eli-video-interview 1.2.3-5.alpha.6 → 1.2.3-5.alpha.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/modules/ai-ability-select/Root.js +8 -3
- package/esm/modules/ai-question/components/QuestionModel/Item.js +3 -3
- package/esm/modules/ai-question/components/QuestionTemplate/index.js +4 -2
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +1 -1
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +3 -5
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +2 -2
- package/esm/store/enterprise/enterprise-store.d.ts +29 -0
- package/esm/store/enterprise/enterprise-store.js +13 -0
- package/lib/modules/ai-ability-select/Root.js +8 -3
- package/lib/modules/ai-question/components/QuestionModel/Item.js +2 -2
- package/lib/modules/ai-question/components/QuestionTemplate/index.js +4 -2
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +1 -1
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +2 -4
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +2 -2
- package/lib/store/enterprise/enterprise-store.d.ts +29 -0
- package/lib/store/enterprise/enterprise-store.js +16 -0
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import AiAbilityList from './components/AiAbilityList';
|
|
14
14
|
import { GetAiAbilityList } from "../../services/ai-ability";
|
|
15
15
|
import { useAiAbilityListStore } from "../../store/ai-ability-select/question-ability-store";
|
|
16
|
+
import { useEnterpriseStore } from "../../store/enterprise/enterprise-store";
|
|
16
17
|
import ScrollDialogContent from "../../components/ScrollDialogContent";
|
|
17
18
|
import { useRequest } from 'ahooks';
|
|
18
19
|
import { Box, Typography } from 'fbm-ui';
|
|
@@ -20,7 +21,8 @@ import { Stack } from 'fbm-ui/lib/mui';
|
|
|
20
21
|
import { forwardRef, memo, useEffect } from 'react';
|
|
21
22
|
var AiAbilitySelectRoot = forwardRef(function (_a, ref) {
|
|
22
23
|
var jobToken = _a.jobToken, thirdToken = _a.thirdToken;
|
|
23
|
-
var _b = useAiAbilityListStore(), aiAbilityList = _b.aiAbilityList, setAiAbilityList = _b.setAiAbilityList
|
|
24
|
+
var _b = useAiAbilityListStore(), aiAbilityList = _b.aiAbilityList, setAiAbilityList = _b.setAiAbilityList;
|
|
25
|
+
var setEnterprise = useEnterpriseStore().setEnterprise;
|
|
24
26
|
var data = useRequest(function () { return GetAiAbilityList({ jobToken: jobToken, thirdToken: thirdToken }); }, {
|
|
25
27
|
refreshDeps: [jobToken, thirdToken],
|
|
26
28
|
}).data;
|
|
@@ -28,8 +30,11 @@ var AiAbilitySelectRoot = forwardRef(function (_a, ref) {
|
|
|
28
30
|
setAiAbilityList((data === null || data === void 0 ? void 0 : data.data.list) || []);
|
|
29
31
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
30
32
|
}, [data]);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
useEffect(function () {
|
|
34
|
+
setEnterprise({ jobToken: jobToken, thirdToken: thirdToken });
|
|
35
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
|
+
}, [jobToken, thirdToken]);
|
|
37
|
+
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: "\u8BF7\u9009\u62E9\u8981\u4F18\u5148\u4F7F\u7528\u7684\u8003\u5BDF\u80FD\u529B\uFF0C\u4E5F\u53EF\u4EE5\u70B9\u51FB\u300C\u4E0B\u4E00\u6B65\u300D\u76F4\u63A5\u51FA\u9898" })), (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 })] })) })));
|
|
33
38
|
});
|
|
34
39
|
AiAbilitySelectRoot.displayName = 'AiAbilitySelectRoot';
|
|
35
40
|
export default memo(AiAbilitySelectRoot);
|
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
24
|
import { DISABLED_REPEAT_TYPE, IS_AI_ANALYSIS, TEST_TYPE_READONLY } from "../../../../constants/ai-question";
|
|
25
25
|
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
26
26
|
import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
|
|
@@ -72,8 +72,8 @@ var QuestionModelListItem = function (props) {
|
|
|
72
72
|
}
|
|
73
73
|
return questions.map(function (v) { return v.content; }).join('\n');
|
|
74
74
|
}, [questions]);
|
|
75
|
-
return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsxs(Box, __assign({ display: "flex", borderBottom:
|
|
75
|
+
return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsxs(Box, __assign({ display: "flex", borderBottom: "1px solid rgba(0, 0, 0, 0.08)" }, { children: [_jsx(Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: _jsx(DragIndicatorIcon, { className: "dragHandle" }) })), _jsxs(Box, __assign({ flex: "1 0", padding: "16px 0" }, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [_jsxs(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
|
|
76
76
|
return label && (_jsx(Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: _jsx(Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
|
|
77
|
-
}), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), _jsx(Typography, __assign({ sx: { ml: 2 }, variant: "body2", color: "secondary" }, { children: getSecondToTime(Number(duration)) }))] })), _jsxs(Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!TEST_TYPE_READONLY.includes(type) && (_jsx(IconButton, __assign({ size: "small", onClick: handleEdit }, { children: _jsx(EditIcon, {}) }))), _jsx(IconButton, __assign({ size: "small", onClick: handleRemove }, { children: _jsx(DeleteIcon, {}) }))] }))] })), _jsxs(Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), _jsxs(Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", getSecondToTime(Number(duration))] }))] }))] }))] })),
|
|
77
|
+
}), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), _jsx(Typography, __assign({ sx: { ml: 2 }, variant: "body2", color: "secondary" }, { children: getSecondToTime(Number(duration)) }))] })), _jsxs(Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!TEST_TYPE_READONLY.includes(type) && (_jsx(IconButton, __assign({ size: "small", onClick: handleEdit }, { children: _jsx(EditIcon, {}) }))), _jsx(IconButton, __assign({ size: "small", onClick: handleRemove }, { children: _jsx(DeleteIcon, {}) }))] }))] })), _jsxs(Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), _jsxs(Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", getSecondToTime(Number(duration))] }))] }))] }))] })), _jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 40px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 82 }, size: "small", value: weight, endAdornment: "%", disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), _jsx(Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsx(Stack, __assign({ direction: "row" }, { children: _jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }) })))] }))] })));
|
|
78
78
|
};
|
|
79
79
|
export default memo(QuestionModelListItem);
|
|
@@ -13,6 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import AiEvaluation from './AiEvaluation';
|
|
14
14
|
import Skeleton from './Skeleton';
|
|
15
15
|
import { useAiAbilityListStore } from "../../../../store/ai-ability-select/question-ability-store";
|
|
16
|
+
import { useEnterpriseStore } from "../../../../store/enterprise/enterprise-store";
|
|
16
17
|
import { PostAiModelQuestions } from "../../../../services/ai-question";
|
|
17
18
|
import { useQuestionTemplateStore } from "../../../../store/ai-question/question-template-store";
|
|
18
19
|
import { useRequest } from 'ahooks';
|
|
@@ -20,9 +21,10 @@ import { Box } from 'fbm-ui';
|
|
|
20
21
|
var QuestionTemplate = function () {
|
|
21
22
|
var updateAiEvaluationData = useQuestionTemplateStore().updateAiEvaluationData;
|
|
22
23
|
var selctedAbilitys = useAiAbilityListStore().selctedAbilitys;
|
|
23
|
-
var
|
|
24
|
+
var enterprise = useEnterpriseStore().enterprise;
|
|
25
|
+
var loading = useRequest(function () { return PostAiModelQuestions(__assign({ extraAbilityTokens: selctedAbilitys }, enterprise)); }, {
|
|
24
26
|
manual: false,
|
|
25
|
-
refreshDeps: [selctedAbilitys],
|
|
27
|
+
refreshDeps: [selctedAbilitys, enterprise],
|
|
26
28
|
onSuccess: function (_a) {
|
|
27
29
|
var data = _a.data;
|
|
28
30
|
return updateAiEvaluationData(data);
|
|
@@ -135,7 +135,7 @@ var QuestionForm = forwardRef(function (props, ref) {
|
|
|
135
135
|
return (_a = form.values.questions) === null || _a === void 0 ? void 0 : _a.map(function (_, index) { return (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [_jsx(FormItem, { required: true, name: "questions.".concat(index, ".content"), label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09", sx: { flexGrow: 1 } }, index), form.values.questions.length > 1 && (_jsx(Box, __assign({ height: 84, pt: 1 }, { children: _jsx(IconButton, __assign({ size: "small", onClick: function () {
|
|
136
136
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions.filter(function (_, i) { return i !== index; }), true) }));
|
|
137
137
|
} }, { children: _jsx(CloseIcon, {}) })) })))] }), index)); });
|
|
138
|
-
} })) : (_jsx(VideoVoice, {})), !preview && aiShowType === ADD_QUESTION_TYPE.FREE && (_jsx(RandomQuestion, { category: form.values.category, broadcastType: form.values.broadcastType, onAddCustonQuestion: function () {
|
|
138
|
+
} })) : (_jsx(VideoVoice, {})), !preview && aiShowType === ADD_QUESTION_TYPE.FREE && (_jsx(RandomQuestion, { category: questionCollectionList === null || questionCollectionList === void 0 ? void 0 : questionCollectionList.find(function (v) { var _a; return v.name === ((_a = form.values.category) === null || _a === void 0 ? void 0 : _a.value); }), broadcastType: form.values.broadcastType, onAddCustonQuestion: function () {
|
|
139
139
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], form.values.questions, true), [{ content: '', videoUrl: '' }], false) }));
|
|
140
140
|
}, onAddRandomQuestion: function (qs) {
|
|
141
141
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], form.values.questions, true), qs.map(function (v) { return ({ content: v, videoUrl: '' }); }), true) }));
|
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import SelectQuestion from './SelectQuestion';
|
|
14
14
|
import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
|
|
15
15
|
import { AddIcon, Box, Button, InfoIcon, Layout, Message, Popactions, Tooltip } from 'fbm-ui';
|
|
@@ -46,15 +46,13 @@ var RandomQuestion = function (_a) {
|
|
|
46
46
|
},
|
|
47
47
|
];
|
|
48
48
|
var isVideoBroadcast = broadcastType === 2;
|
|
49
|
-
var desc = isVideoBroadcast
|
|
50
|
-
? "1. \u89C6\u9891\u5EFA\u8BAE\u7AD6\u7248\uFF0C\u6BD4\u4F8B9\uFF1A16\uFF0C\u683C\u5F0F.mp4\uFF1B\u5019\u9009\u4EBA\u53EF\u91CD\u590D\u542C\u9898\uFF0C\u4F46\u5355\u9898\n \u6700\u591A\u91CD\u590D3\u6B21\u3002\n 2. \u5F53\u9762\u8BD5\u95F4\u4EA4\u4E92\u65B9\u5F0F\u662FAI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F\u65F6\uFF0C\u5019\u9009\u4EBA\u9762\u8BD5\u65F6\u5C06\u81EA\u52A8\u628A\n \u9898\u76EE\u7684\u64AD\u62A5\u65B9\u5F0F\u53D8\u6362\u4E3AAI\u8BED\u97F3\u64AD\u62A5\u65B9\u5F0F\n 3.\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A5\u4E2A\u9009\u9879\u3002"
|
|
51
|
-
: '每位候选人随机1题,最多5个选项。';
|
|
49
|
+
var desc = isVideoBroadcast ? (_jsxs(_Fragment, { children: ["1. \u89C6\u9891\u5EFA\u8BAE\u7AD6\u7248\uFF0C\u6BD4\u4F8B9\uFF1A16\uFF0C\u683C\u5F0F.mp4\uFF1B\u5019\u9009\u4EBA\u53EF\u91CD\u590D\u542C\u9898\uFF0C\u4F46\u5355\u9898 \u6700\u591A\u91CD\u590D3\u6B21\u3002", _jsx("br", {}), "2. \u5F53\u9762\u8BD5\u95F4\u4EA4\u4E92\u65B9\u5F0F\u662FAI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F\u65F6\uFF0C\u5019\u9009\u4EBA\u9762\u8BD5\u65F6\u5C06\u81EA\u52A8\u628A \u9898\u76EE\u7684\u64AD\u62A5\u65B9\u5F0F\u53D8\u6362\u4E3AAI\u8BED\u97F3\u64AD\u62A5\u65B9\u5F0F", _jsx("br", {}), "3.\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A5\u4E2A\u9009\u9879\u3002"] })) : ('每位候选人随机1题,最多5个选项。');
|
|
52
50
|
var handleVideoBroadcastChange = function (key, checked) {
|
|
53
51
|
var _a;
|
|
54
52
|
updateQuestionState({
|
|
55
53
|
item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), (_a = {}, _a[key] = checked ? 1 : 2, _a)) }),
|
|
56
54
|
});
|
|
57
55
|
};
|
|
58
|
-
return (_jsxs(Layout, { children: [_jsxs(Stack, __assign({ spacing: 2, mb: 1, direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Popactions, __assign({ actions: actions, trigger: "click", isClickAway: true }, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u968F\u673A\u9762\u8BD5\u5185\u5BB9" })) })), _jsx(Tooltip, __assign({ title:
|
|
56
|
+
return (_jsxs(Layout, { children: [_jsxs(Stack, __assign({ spacing: 2, mb: 1, direction: "row", alignItems: "center", justifyContent: "space-between", mt: 0.375 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Popactions, __assign({ actions: actions, trigger: "click", isClickAway: true }, { 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 } }) })) }))] })), _jsx(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: isVideoBroadcast && (_jsx(FormGroup, { children: _jsxs(Box, __assign({ display: "flex" }, { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { 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(FormControlLabel, { control: _jsx(Checkbox, { 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); } })] })) })) }))] })), _jsx(SelectQuestion, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
|
|
59
57
|
};
|
|
60
58
|
export default RandomQuestion;
|
|
@@ -103,8 +103,8 @@ var QuestionUpdate = function () {
|
|
|
103
103
|
setSwitchTypeOpen(false);
|
|
104
104
|
(_a = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _a === void 0 ? void 0 : _a.setFormValues({ broadcastType: defaultQuestionParams.broadcastType });
|
|
105
105
|
updateQuestionState({ aiShowType: ADD_QUESTION_TYPE.LANGUAGE });
|
|
106
|
-
} }, { children: _jsx(Typography, __assign({ variant: "body2" }, { children: "\
|
|
107
|
-
return (_jsxs(Box, __assign({ display: "flex", alignItems: "center", height: 56 }, { children: [_jsx(Typography, __assign({ ml: 3, variant: "subtitle1" }, { children: aiShowType === ADD_QUESTION_TYPE.FREE ? '自由作答' : '
|
|
106
|
+
} }, { children: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u6717\u8BFB\u9898" })) }))] }));
|
|
107
|
+
return (_jsxs(Box, __assign({ display: "flex", alignItems: "center", height: 56 }, { children: [_jsx(Typography, __assign({ ml: 3, variant: "subtitle1" }, { children: aiShowType === ADD_QUESTION_TYPE.FREE ? '自由作答' : '朗读题' })), _jsx(Popover, __assign({ open: switchTypeOpen, content: content, onClickAway: function () { return setSwitchTypeOpen(false); } }, { children: _jsx(Button, __assign({ variant: "text", size: "small", sx: { fontSize: 12, color: 'rgb(87, 107, 149)' }, onClick: function () { return setSwitchTypeOpen(true); } }, { children: "\u5207\u6362\u9898\u578B" })) }))] })));
|
|
108
108
|
};
|
|
109
109
|
var getModelParams = useCallback(function (values, isSubmit) {
|
|
110
110
|
return new Promise(function (resolve, reject) {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const useEnterpriseStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
3
|
+
enterprise: {
|
|
4
|
+
jobToken?: string | undefined;
|
|
5
|
+
thirdToken?: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
setEnterprise: import("react").Dispatch<import("react").SetStateAction<{
|
|
8
|
+
jobToken?: string | undefined;
|
|
9
|
+
thirdToken?: string | undefined;
|
|
10
|
+
}>>;
|
|
11
|
+
}> | undefined) => {
|
|
12
|
+
enterprise: {
|
|
13
|
+
jobToken?: string | undefined;
|
|
14
|
+
thirdToken?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
setEnterprise: import("react").Dispatch<import("react").SetStateAction<{
|
|
17
|
+
jobToken?: string | undefined;
|
|
18
|
+
thirdToken?: string | undefined;
|
|
19
|
+
}>>;
|
|
20
|
+
}, getEnterpriseStore: () => {
|
|
21
|
+
enterprise: {
|
|
22
|
+
jobToken?: string | undefined;
|
|
23
|
+
thirdToken?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
setEnterprise: import("react").Dispatch<import("react").SetStateAction<{
|
|
26
|
+
jobToken?: string | undefined;
|
|
27
|
+
thirdToken?: string | undefined;
|
|
28
|
+
}>>;
|
|
29
|
+
} | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { createGlobalStore } from 'hox';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
export var useEnterpriseStore = (_a = createGlobalStore(function () {
|
|
5
|
+
var _a = useState({
|
|
6
|
+
jobToken: '',
|
|
7
|
+
thirdToken: '',
|
|
8
|
+
}), enterprise = _a[0], setEnterprise = _a[1];
|
|
9
|
+
return {
|
|
10
|
+
enterprise: enterprise,
|
|
11
|
+
setEnterprise: setEnterprise,
|
|
12
|
+
};
|
|
13
|
+
}), _a[0]), getEnterpriseStore = _a[1];
|
|
@@ -18,6 +18,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
18
18
|
var AiAbilityList_1 = __importDefault(require("./components/AiAbilityList"));
|
|
19
19
|
var ai_ability_1 = require("../../services/ai-ability");
|
|
20
20
|
var question_ability_store_1 = require("../../store/ai-ability-select/question-ability-store");
|
|
21
|
+
var enterprise_store_1 = require("../../store/enterprise/enterprise-store");
|
|
21
22
|
var ScrollDialogContent_1 = __importDefault(require("../../components/ScrollDialogContent"));
|
|
22
23
|
var ahooks_1 = require("ahooks");
|
|
23
24
|
var fbm_ui_1 = require("fbm-ui");
|
|
@@ -25,7 +26,8 @@ var mui_1 = require("fbm-ui/lib/mui");
|
|
|
25
26
|
var react_1 = require("react");
|
|
26
27
|
var AiAbilitySelectRoot = (0, react_1.forwardRef)(function (_a, ref) {
|
|
27
28
|
var jobToken = _a.jobToken, thirdToken = _a.thirdToken;
|
|
28
|
-
var _b = (0, question_ability_store_1.useAiAbilityListStore)(), aiAbilityList = _b.aiAbilityList, setAiAbilityList = _b.setAiAbilityList
|
|
29
|
+
var _b = (0, question_ability_store_1.useAiAbilityListStore)(), aiAbilityList = _b.aiAbilityList, setAiAbilityList = _b.setAiAbilityList;
|
|
30
|
+
var setEnterprise = (0, enterprise_store_1.useEnterpriseStore)().setEnterprise;
|
|
29
31
|
var data = (0, ahooks_1.useRequest)(function () { return (0, ai_ability_1.GetAiAbilityList)({ jobToken: jobToken, thirdToken: thirdToken }); }, {
|
|
30
32
|
refreshDeps: [jobToken, thirdToken],
|
|
31
33
|
}).data;
|
|
@@ -33,8 +35,11 @@ var AiAbilitySelectRoot = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
33
35
|
setAiAbilityList((data === null || data === void 0 ? void 0 : data.data.list) || []);
|
|
34
36
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35
37
|
}, [data]);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
(0, react_1.useEffect)(function () {
|
|
39
|
+
setEnterprise({ jobToken: jobToken, thirdToken: thirdToken });
|
|
40
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
41
|
+
}, [jobToken, thirdToken]);
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, __assign({ ref: ref }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", flexDirection: "column", width: 760 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 2, mb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u8BF7\u9009\u62E9\u8981\u4F18\u5148\u4F7F\u7528\u7684\u8003\u5BDF\u80FD\u529B\uFF0C\u4E5F\u53EF\u4EE5\u70B9\u51FB\u300C\u4E0B\u4E00\u6B65\u300D\u76F4\u63A5\u51FA\u9898" })), (aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.some(function (v) { return v.isNew; })) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn", alt: "", width: 38, height: 16 }), (0, jsx_runtime_1.jsx)(fbm_ui_1.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" }))] })))] })), (0, jsx_runtime_1.jsx)(AiAbilityList_1.default, { items: aiAbilityList })] })) })));
|
|
38
43
|
});
|
|
39
44
|
AiAbilitySelectRoot.displayName = 'AiAbilitySelectRoot';
|
|
40
45
|
exports.default = (0, react_1.memo)(AiAbilitySelectRoot);
|
|
@@ -74,8 +74,8 @@ var QuestionModelListItem = function (props) {
|
|
|
74
74
|
}
|
|
75
75
|
return questions.map(function (v) { return v.content; }).join('\n');
|
|
76
76
|
}, [questions]);
|
|
77
|
-
return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", borderBottom:
|
|
77
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", borderBottom: "1px solid rgba(0, 0, 0, 0.08)" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DragIndicatorIcon, { className: "dragHandle" }) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", padding: "16px 0" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
|
|
78
78
|
return label && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
|
|
79
|
-
}), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { ml: 2 }, variant: "body2", color: "secondary" }, { children: (0, utils_1.getSecondToTime)(Number(duration)) }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!ai_question_1.TEST_TYPE_READONLY.includes(type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleEdit }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))] }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", (0, utils_1.getSecondToTime)(Number(duration))] }))] }))] }))] })),
|
|
79
|
+
}), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { ml: 2 }, variant: "body2", color: "secondary" }, { children: (0, utils_1.getSecondToTime)(Number(duration)) }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!ai_question_1.TEST_TYPE_READONLY.includes(type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleEdit }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))] }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", (0, utils_1.getSecondToTime)(Number(duration))] }))] }))] }))] })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 40px" }, { children: isAiAnalysis && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 82 }, size: "small", value: weight, endAdornment: "%", disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { 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)' } }) })) }))] })) })), !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) && ((0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }) })))] }))] })));
|
|
80
80
|
};
|
|
81
81
|
exports.default = (0, react_1.memo)(QuestionModelListItem);
|
|
@@ -18,6 +18,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
18
18
|
var AiEvaluation_1 = __importDefault(require("./AiEvaluation"));
|
|
19
19
|
var Skeleton_1 = __importDefault(require("./Skeleton"));
|
|
20
20
|
var question_ability_store_1 = require("../../../../store/ai-ability-select/question-ability-store");
|
|
21
|
+
var enterprise_store_1 = require("../../../../store/enterprise/enterprise-store");
|
|
21
22
|
var ai_question_1 = require("../../../../services/ai-question");
|
|
22
23
|
var question_template_store_1 = require("../../../../store/ai-question/question-template-store");
|
|
23
24
|
var ahooks_1 = require("ahooks");
|
|
@@ -25,9 +26,10 @@ var fbm_ui_1 = require("fbm-ui");
|
|
|
25
26
|
var QuestionTemplate = function () {
|
|
26
27
|
var updateAiEvaluationData = (0, question_template_store_1.useQuestionTemplateStore)().updateAiEvaluationData;
|
|
27
28
|
var selctedAbilitys = (0, question_ability_store_1.useAiAbilityListStore)().selctedAbilitys;
|
|
28
|
-
var
|
|
29
|
+
var enterprise = (0, enterprise_store_1.useEnterpriseStore)().enterprise;
|
|
30
|
+
var loading = (0, ahooks_1.useRequest)(function () { return (0, ai_question_1.PostAiModelQuestions)(__assign({ extraAbilityTokens: selctedAbilitys }, enterprise)); }, {
|
|
29
31
|
manual: false,
|
|
30
|
-
refreshDeps: [selctedAbilitys],
|
|
32
|
+
refreshDeps: [selctedAbilitys, enterprise],
|
|
31
33
|
onSuccess: function (_a) {
|
|
32
34
|
var data = _a.data;
|
|
33
35
|
return updateAiEvaluationData(data);
|
|
@@ -140,7 +140,7 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
140
140
|
return (_a = form.values.questions) === null || _a === void 0 ? void 0 : _a.map(function (_, index) { return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { required: true, name: "questions.".concat(index, ".content"), label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09", sx: { flexGrow: 1 } }, index), form.values.questions.length > 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ height: 84, pt: 1 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: function () {
|
|
141
141
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions.filter(function (_, i) { return i !== index; }), true) }));
|
|
142
142
|
} }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) })) })))] }), index)); });
|
|
143
|
-
} })) : ((0, jsx_runtime_1.jsx)(VideoVoice_1.default, {})), !preview && aiShowType === ai_question_1.ADD_QUESTION_TYPE.FREE && ((0, jsx_runtime_1.jsx)(RandomQuestion_1.default, { category: form.values.category, broadcastType: form.values.broadcastType, onAddCustonQuestion: function () {
|
|
143
|
+
} })) : ((0, jsx_runtime_1.jsx)(VideoVoice_1.default, {})), !preview && aiShowType === ai_question_1.ADD_QUESTION_TYPE.FREE && ((0, jsx_runtime_1.jsx)(RandomQuestion_1.default, { category: questionCollectionList === null || questionCollectionList === void 0 ? void 0 : questionCollectionList.find(function (v) { var _a; return v.name === ((_a = form.values.category) === null || _a === void 0 ? void 0 : _a.value); }), broadcastType: form.values.broadcastType, onAddCustonQuestion: function () {
|
|
144
144
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], form.values.questions, true), [{ content: '', videoUrl: '' }], false) }));
|
|
145
145
|
}, onAddRandomQuestion: function (qs) {
|
|
146
146
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], form.values.questions, true), qs.map(function (v) { return ({ content: v, videoUrl: '' }); }), true) }));
|
|
@@ -51,15 +51,13 @@ var RandomQuestion = function (_a) {
|
|
|
51
51
|
},
|
|
52
52
|
];
|
|
53
53
|
var isVideoBroadcast = broadcastType === 2;
|
|
54
|
-
var desc = isVideoBroadcast
|
|
55
|
-
? "1. \u89C6\u9891\u5EFA\u8BAE\u7AD6\u7248\uFF0C\u6BD4\u4F8B9\uFF1A16\uFF0C\u683C\u5F0F.mp4\uFF1B\u5019\u9009\u4EBA\u53EF\u91CD\u590D\u542C\u9898\uFF0C\u4F46\u5355\u9898\n \u6700\u591A\u91CD\u590D3\u6B21\u3002\n 2. \u5F53\u9762\u8BD5\u95F4\u4EA4\u4E92\u65B9\u5F0F\u662FAI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F\u65F6\uFF0C\u5019\u9009\u4EBA\u9762\u8BD5\u65F6\u5C06\u81EA\u52A8\u628A\n \u9898\u76EE\u7684\u64AD\u62A5\u65B9\u5F0F\u53D8\u6362\u4E3AAI\u8BED\u97F3\u64AD\u62A5\u65B9\u5F0F\n 3.\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A5\u4E2A\u9009\u9879\u3002"
|
|
56
|
-
: '每位候选人随机1题,最多5个选项。';
|
|
54
|
+
var desc = isVideoBroadcast ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["1. \u89C6\u9891\u5EFA\u8BAE\u7AD6\u7248\uFF0C\u6BD4\u4F8B9\uFF1A16\uFF0C\u683C\u5F0F.mp4\uFF1B\u5019\u9009\u4EBA\u53EF\u91CD\u590D\u542C\u9898\uFF0C\u4F46\u5355\u9898 \u6700\u591A\u91CD\u590D3\u6B21\u3002", (0, jsx_runtime_1.jsx)("br", {}), "2. \u5F53\u9762\u8BD5\u95F4\u4EA4\u4E92\u65B9\u5F0F\u662FAI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F\u65F6\uFF0C\u5019\u9009\u4EBA\u9762\u8BD5\u65F6\u5C06\u81EA\u52A8\u628A \u9898\u76EE\u7684\u64AD\u62A5\u65B9\u5F0F\u53D8\u6362\u4E3AAI\u8BED\u97F3\u64AD\u62A5\u65B9\u5F0F", (0, jsx_runtime_1.jsx)("br", {}), "3.\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A5\u4E2A\u9009\u9879\u3002"] })) : ('每位候选人随机1题,最多5个选项。');
|
|
57
55
|
var handleVideoBroadcastChange = function (key, checked) {
|
|
58
56
|
var _a;
|
|
59
57
|
updateQuestionState({
|
|
60
58
|
item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), (_a = {}, _a[key] = checked ? 1 : 2, _a)) }),
|
|
61
59
|
});
|
|
62
60
|
};
|
|
63
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Layout, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 2, mb: 1, direction: "row", alignItems: "center", justifyContent: "space-between" }, { 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: actions, trigger: "click", isClickAway: true }, { 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:
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Layout, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 2, mb: 1, direction: "row", alignItems: "center", 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: actions, trigger: "click", isClickAway: true }, { 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.jsx)(mui_2.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: isVideoBroadcast && ((0, jsx_runtime_1.jsx)(mui_1.FormGroup, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex" }, { children: [(0, jsx_runtime_1.jsx)(mui_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(mui_1.Checkbox, { 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)(mui_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(mui_1.Checkbox, { 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); } })] })) })) }))] })), (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 })] }));
|
|
64
62
|
};
|
|
65
63
|
exports.default = RandomQuestion;
|
|
@@ -108,8 +108,8 @@ var QuestionUpdate = function () {
|
|
|
108
108
|
setSwitchTypeOpen(false);
|
|
109
109
|
(_a = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _a === void 0 ? void 0 : _a.setFormValues({ broadcastType: const_1.defaultQuestionParams.broadcastType });
|
|
110
110
|
updateQuestionState({ aiShowType: ai_question_1.ADD_QUESTION_TYPE.LANGUAGE });
|
|
111
|
-
} }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\
|
|
112
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", height: 56 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ ml: 3, variant: "subtitle1" }, { children: aiShowType === ai_question_1.ADD_QUESTION_TYPE.FREE ? '自由作答' : '
|
|
111
|
+
} }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u6717\u8BFB\u9898" })) }))] }));
|
|
112
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", height: 56 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ ml: 3, variant: "subtitle1" }, { children: aiShowType === ai_question_1.ADD_QUESTION_TYPE.FREE ? '自由作答' : '朗读题' })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ open: switchTypeOpen, content: content, onClickAway: function () { return setSwitchTypeOpen(false); } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", size: "small", sx: { fontSize: 12, color: 'rgb(87, 107, 149)' }, onClick: function () { return setSwitchTypeOpen(true); } }, { children: "\u5207\u6362\u9898\u578B" })) }))] })));
|
|
113
113
|
};
|
|
114
114
|
var getModelParams = (0, react_1.useCallback)(function (values, isSubmit) {
|
|
115
115
|
return new Promise(function (resolve, reject) {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const useEnterpriseStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
3
|
+
enterprise: {
|
|
4
|
+
jobToken?: string | undefined;
|
|
5
|
+
thirdToken?: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
setEnterprise: import("react").Dispatch<import("react").SetStateAction<{
|
|
8
|
+
jobToken?: string | undefined;
|
|
9
|
+
thirdToken?: string | undefined;
|
|
10
|
+
}>>;
|
|
11
|
+
}> | undefined) => {
|
|
12
|
+
enterprise: {
|
|
13
|
+
jobToken?: string | undefined;
|
|
14
|
+
thirdToken?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
setEnterprise: import("react").Dispatch<import("react").SetStateAction<{
|
|
17
|
+
jobToken?: string | undefined;
|
|
18
|
+
thirdToken?: string | undefined;
|
|
19
|
+
}>>;
|
|
20
|
+
}, getEnterpriseStore: () => {
|
|
21
|
+
enterprise: {
|
|
22
|
+
jobToken?: string | undefined;
|
|
23
|
+
thirdToken?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
setEnterprise: import("react").Dispatch<import("react").SetStateAction<{
|
|
26
|
+
jobToken?: string | undefined;
|
|
27
|
+
thirdToken?: string | undefined;
|
|
28
|
+
}>>;
|
|
29
|
+
} | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getEnterpriseStore = exports.useEnterpriseStore = void 0;
|
|
5
|
+
var hox_1 = require("hox");
|
|
6
|
+
var react_1 = require("react");
|
|
7
|
+
exports.useEnterpriseStore = (_a = (0, hox_1.createGlobalStore)(function () {
|
|
8
|
+
var _a = (0, react_1.useState)({
|
|
9
|
+
jobToken: '',
|
|
10
|
+
thirdToken: '',
|
|
11
|
+
}), enterprise = _a[0], setEnterprise = _a[1];
|
|
12
|
+
return {
|
|
13
|
+
enterprise: enterprise,
|
|
14
|
+
setEnterprise: setEnterprise,
|
|
15
|
+
};
|
|
16
|
+
}), _a[0]), exports.getEnterpriseStore = _a[1];
|