eli-video-interview 1.2.3-5.alpha → 1.2.3-5.alpha.1
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 +2 -7
- package/esm/modules/ai-question/Root.js +0 -1
- package/esm/modules/ai-question/components/QuestionModel/Item.js +1 -1
- package/esm/modules/ai-question/components/QuestionModel/List.js +0 -1
- package/esm/modules/ai-question/components/QuestionModel/index.js +1 -1
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +6 -16
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +3 -1
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +5 -10
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +1 -1
- package/lib/modules/ai-ability-select/Root.js +2 -7
- package/lib/modules/ai-question/Root.js +0 -1
- package/lib/modules/ai-question/components/QuestionModel/Item.js +1 -1
- package/lib/modules/ai-question/components/QuestionModel/List.js +0 -1
- package/lib/modules/ai-question/components/QuestionModel/index.js +1 -1
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +6 -16
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +3 -1
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +5 -10
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +1 -1
- package/package.json +1 -1
|
@@ -19,9 +19,8 @@ import { Box, Typography } from 'fbm-ui';
|
|
|
19
19
|
import { Stack } from 'fbm-ui/lib/mui';
|
|
20
20
|
import { forwardRef, memo, useEffect } from 'react';
|
|
21
21
|
var AiAbilitySelectRoot = forwardRef(function (_a, ref) {
|
|
22
|
-
var jobToken = _a.jobToken, thirdToken = _a.thirdToken
|
|
23
|
-
var
|
|
24
|
-
var _d = useAiAbilityListStore(), selctedAbilitys = _d.selctedAbilitys, setSelctedAbilitys = _d.setSelctedAbilitys;
|
|
22
|
+
var jobToken = _a.jobToken, thirdToken = _a.thirdToken;
|
|
23
|
+
var _b = useAiAbilityListStore(), aiAbilityList = _b.aiAbilityList, setAiAbilityList = _b.setAiAbilityList, selctedAbilitys = _b.selctedAbilitys;
|
|
25
24
|
var data = useRequest(function () { return GetAiAbilityList({ jobToken: jobToken, thirdToken: thirdToken }); }, {
|
|
26
25
|
refreshDeps: [jobToken, thirdToken],
|
|
27
26
|
}).data;
|
|
@@ -29,10 +28,6 @@ var AiAbilitySelectRoot = forwardRef(function (_a, ref) {
|
|
|
29
28
|
setAiAbilityList((data === null || data === void 0 ? void 0 : data.data.list) || []);
|
|
30
29
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
30
|
}, [data]);
|
|
32
|
-
useEffect(function () {
|
|
33
|
-
setSelctedAbilitys(selectedTokens);
|
|
34
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35
|
-
}, [selectedTokens]);
|
|
36
31
|
console.log(selctedAbilitys);
|
|
37
32
|
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" })), _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 })] })) })));
|
|
38
33
|
});
|
|
@@ -64,7 +64,6 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
|
|
|
64
64
|
var updateBootVideo = useBootVideoStore().updateBootVideo;
|
|
65
65
|
var addModel = useQuestionModelStore(function (store) { return [store.addModel]; }).addModel;
|
|
66
66
|
var selctedAbilitys = useAiAbilityListStore().selctedAbilitys;
|
|
67
|
-
console.log(selctedAbilitys);
|
|
68
67
|
var handleValues = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
69
68
|
var questionModelData, _a, mediaUrl, thumbUrl, appliedAllPosition, steps;
|
|
70
69
|
return __generator(this, function (_b) {
|
|
@@ -68,7 +68,7 @@ var QuestionModelListItem = function (props) {
|
|
|
68
68
|
}, [editModel, answerStatus, step, index]);
|
|
69
69
|
var formatQuestion = useMemo(function () {
|
|
70
70
|
if ((questions === null || questions === void 0 ? void 0 : questions.length) > 1) {
|
|
71
|
-
return (_jsxs(Stack, __assign({ direction: "row", spacing: 1 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "#F5C441" }, { children: "[\u5185\u5BB9\u968F\u673A]" })), _jsx(Stack, __assign({ spacing: 1 }, { children: questions.map(function (v, index) { return (_jsxs(Typography, __assign({ variant: "body2", color: "text.secondary" }, { children: ["\u2022\u00A0", v.content] }), index)); }) }))] })));
|
|
71
|
+
return (_jsxs(Stack, __assign({ direction: "row", spacing: 1 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "#F5C441", flexShrink: 0 }, { children: "[\u5185\u5BB9\u968F\u673A]" })), _jsx(Stack, __assign({ spacing: 1 }, { children: questions.map(function (v, index) { return (_jsxs(Typography, __assign({ variant: "body2", color: "text.secondary" }, { children: ["\u2022\u00A0", v.content] }), index)); }) }))] })));
|
|
72
72
|
}
|
|
73
73
|
return questions.map(function (v) { return v.content; }).join('\n');
|
|
74
74
|
}, [questions]);
|
|
@@ -59,7 +59,6 @@ var QuestionModelList = function () {
|
|
|
59
59
|
return (_jsx(Box, __assign({ width: "100%", sx: steps.length > 0 ? {} : { height: 'calc(100% - 100px)', display: 'flex', alignItems: 'center', justifyContent: 'center' }, ref: ref }, { children: steps.length > 0 ? (steps.map(function (item, index) {
|
|
60
60
|
return (_jsx(QuestionModelListItem, __assign({ steps: steps, index: index, disabledWeight: index === lastAiTestIndex }, item), item.uniqueId || item.token));
|
|
61
61
|
})) : (_jsx(AutoCombine, { onAutoCombine: function () {
|
|
62
|
-
console.log('steps', extraAbilityTokens, aiEvaluationData);
|
|
63
62
|
var random = aiEvaluationData[0].list.filter(function (item) { return extraAbilityTokens === null || extraAbilityTokens === void 0 ? void 0 : extraAbilityTokens.includes(item === null || item === void 0 ? void 0 : item.token); }).map(function (v) { return v.list; }) || [];
|
|
64
63
|
handleUseQuestion(random.map(function (item) { return item[Math.floor(Math.random() * item.length)]; }));
|
|
65
64
|
} })) })));
|
|
@@ -70,6 +70,6 @@ var Question = function () {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}, [token, aiEvaluationData, questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps, templateList, addModel]);
|
|
73
|
-
return (_jsx(QuestionModelRoot, { children: loading ? (_jsx(Skeleton, {})) : (_jsxs(_Fragment, { children: [_jsx(QuestionModelHeader, {}), _jsx(Interactive, { mode: "
|
|
73
|
+
return (_jsx(QuestionModelRoot, { children: loading ? (_jsx(Skeleton, {})) : (_jsxs(_Fragment, { children: [_jsx(QuestionModelHeader, {}), _jsx(Interactive, { mode: "Traditional" }), _jsx(QuestionModelList, {})] })) }));
|
|
74
74
|
};
|
|
75
75
|
export default Question;
|
|
@@ -21,19 +21,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
21
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
import VideoVoicePreview from './VideoVoicePreview';
|
|
23
23
|
import VideoVoiceUploader from './VideoVoiceUploader';
|
|
24
|
-
// import { useUpdateQuestionStore } from '@store/ai-question/question-update-store';
|
|
25
24
|
import { Box, CloseIcon, FormItem, IconButton } from 'fbm-ui';
|
|
26
25
|
import { Stack } from 'fbm-ui/lib/mui';
|
|
27
26
|
import { FieldArray } from 'formik';
|
|
28
27
|
var VideoVoice = function () {
|
|
29
|
-
// const { questionState, updateQuestionState } = useUpdateQuestionStore(store => [store.questionState]);
|
|
30
|
-
// const { item } = questionState;
|
|
31
|
-
// const handleVideoBroadcastChange = (key, checked) => {
|
|
32
|
-
// updateQuestionState({
|
|
33
|
-
// item: { ...item, videoBroadcast: { ...item?.videoBroadcast, [key]: checked ? 1 : 2 } },
|
|
34
|
-
// });
|
|
35
|
-
// };
|
|
36
|
-
// console.log(item);
|
|
37
28
|
return (_jsx(FieldArray, { name: "questions", render: function (_a) {
|
|
38
29
|
var _b;
|
|
39
30
|
var form = _a.form;
|
|
@@ -41,13 +32,12 @@ var VideoVoice = function () {
|
|
|
41
32
|
borderRadius: 2,
|
|
42
33
|
border: '1px dashed rgba(0,0,0, 0.08)',
|
|
43
34
|
} }, { children: [q.videoUrl && (_jsx(VideoVoicePreview, { onDel: function () {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}, videoUrl: q.videoUrl })), _jsx(VideoVoiceUploader, { index: index })] })), _jsxs(Stack, __assign({ flexGrow: 1, 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", InputProps: {
|
|
35
|
+
var questons = __spreadArray([], form.values.questions, true);
|
|
36
|
+
questons[index] = __assign(__assign({}, questons[index]), { videoUrl: '' });
|
|
37
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], questons, true) }));
|
|
38
|
+
}, videoUrl: q.videoUrl })), _jsx(VideoVoiceUploader, { index: index, questions: form.values.questions, setQuestions: function (qs) {
|
|
39
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], qs, true) }));
|
|
40
|
+
} })] })), _jsxs(Stack, __assign({ flexGrow: 1, 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", InputProps: {
|
|
51
41
|
rows: 3,
|
|
52
42
|
multiline: true,
|
|
53
43
|
placeholder: '面试内容(系统将根据此内容向候选人进行语音播报)',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const VideoVoiceUploader: ({ index }: {
|
|
2
|
+
declare const VideoVoiceUploader: ({ index, questions, setQuestions }: {
|
|
3
3
|
index: any;
|
|
4
|
+
questions: any;
|
|
5
|
+
setQuestions: any;
|
|
4
6
|
}) => JSX.Element;
|
|
5
7
|
export default VideoVoiceUploader;
|
|
@@ -20,26 +20,21 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
20
20
|
};
|
|
21
21
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
import { PostCommonUpload } from "../../../../services/ai-question";
|
|
23
|
-
import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
|
|
24
23
|
import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
|
|
25
24
|
import { useRequest } from 'ahooks';
|
|
26
25
|
import { Message, Typography, Upload, UploadIcon } from 'fbm-ui';
|
|
27
26
|
import { Stack } from 'fbm-ui/lib/mui';
|
|
28
27
|
var VideoVoiceUploader = function (_a) {
|
|
29
|
-
var index = _a.index;
|
|
30
|
-
var _b =
|
|
31
|
-
var item = questionState.item;
|
|
32
|
-
var _c = useRequest(PostCommonUpload, {
|
|
28
|
+
var index = _a.index, questions = _a.questions, setQuestions = _a.setQuestions;
|
|
29
|
+
var _b = useRequest(PostCommonUpload, {
|
|
33
30
|
manual: true,
|
|
34
31
|
onSuccess: function (_a) {
|
|
35
32
|
var data = _a.data;
|
|
36
33
|
var firstData = data[0];
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
item: __assign(__assign({}, item), { questions: __spreadArray([], item.questions, true), videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), { videoUrl: firstData.url }) }),
|
|
40
|
-
});
|
|
34
|
+
questions[index] = __assign(__assign({}, questions[index]), { videoUrl: firstData.url });
|
|
35
|
+
setQuestions(__spreadArray([], questions, true));
|
|
41
36
|
},
|
|
42
|
-
}), loading =
|
|
37
|
+
}), loading = _b.loading, postCommonUpload = _b.run;
|
|
43
38
|
var uploadProps = {
|
|
44
39
|
type: 'custom',
|
|
45
40
|
showUploadList: false,
|
|
@@ -193,7 +193,7 @@ var QuestionUpdate = function () {
|
|
|
193
193
|
case 0: return [4 /*yield*/, getModelParams(values, true)];
|
|
194
194
|
case 1:
|
|
195
195
|
_a = _b.sent(), errorIndexes = _a.errorIndexes, params = _a.params;
|
|
196
|
-
if ((values === null || values === void 0 ? void 0 : values.questions.length) >
|
|
196
|
+
if ((values === null || values === void 0 ? void 0 : values.questions.length) > 5) {
|
|
197
197
|
Message.error('最多可添加5个面试内容。');
|
|
198
198
|
return [2 /*return*/, false];
|
|
199
199
|
}
|
|
@@ -24,9 +24,8 @@ var fbm_ui_1 = require("fbm-ui");
|
|
|
24
24
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
25
25
|
var react_1 = require("react");
|
|
26
26
|
var AiAbilitySelectRoot = (0, react_1.forwardRef)(function (_a, ref) {
|
|
27
|
-
var jobToken = _a.jobToken, thirdToken = _a.thirdToken
|
|
28
|
-
var
|
|
29
|
-
var _d = (0, question_ability_store_1.useAiAbilityListStore)(), selctedAbilitys = _d.selctedAbilitys, setSelctedAbilitys = _d.setSelctedAbilitys;
|
|
27
|
+
var jobToken = _a.jobToken, thirdToken = _a.thirdToken;
|
|
28
|
+
var _b = (0, question_ability_store_1.useAiAbilityListStore)(), aiAbilityList = _b.aiAbilityList, setAiAbilityList = _b.setAiAbilityList, selctedAbilitys = _b.selctedAbilitys;
|
|
30
29
|
var data = (0, ahooks_1.useRequest)(function () { return (0, ai_ability_1.GetAiAbilityList)({ jobToken: jobToken, thirdToken: thirdToken }); }, {
|
|
31
30
|
refreshDeps: [jobToken, thirdToken],
|
|
32
31
|
}).data;
|
|
@@ -34,10 +33,6 @@ var AiAbilitySelectRoot = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
34
33
|
setAiAbilityList((data === null || data === void 0 ? void 0 : data.data.list) || []);
|
|
35
34
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
35
|
}, [data]);
|
|
37
|
-
(0, react_1.useEffect)(function () {
|
|
38
|
-
setSelctedAbilitys(selectedTokens);
|
|
39
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
40
|
-
}, [selectedTokens]);
|
|
41
36
|
console.log(selctedAbilitys);
|
|
42
37
|
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" })), (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 })] })) })));
|
|
43
38
|
});
|
|
@@ -69,7 +69,6 @@ var AiQuestionRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
69
69
|
var updateBootVideo = (0, boot_video_store_1.useBootVideoStore)().updateBootVideo;
|
|
70
70
|
var addModel = (0, question_model_store_2.useQuestionModelStore)(function (store) { return [store.addModel]; }).addModel;
|
|
71
71
|
var selctedAbilitys = (0, question_ability_store_1.useAiAbilityListStore)().selctedAbilitys;
|
|
72
|
-
console.log(selctedAbilitys);
|
|
73
72
|
var handleValues = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
74
73
|
var questionModelData, _a, mediaUrl, thumbUrl, appliedAllPosition, steps;
|
|
75
74
|
return __generator(this, function (_b) {
|
|
@@ -70,7 +70,7 @@ var QuestionModelListItem = function (props) {
|
|
|
70
70
|
}, [editModel, answerStatus, step, index]);
|
|
71
71
|
var formatQuestion = (0, react_1.useMemo)(function () {
|
|
72
72
|
if ((questions === null || questions === void 0 ? void 0 : questions.length) > 1) {
|
|
73
|
-
return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "#F5C441" }, { children: "[\u5185\u5BB9\u968F\u673A]" })), (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 1 }, { children: questions.map(function (v, index) { return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "text.secondary" }, { children: ["\u2022\u00A0", v.content] }), index)); }) }))] })));
|
|
73
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "#F5C441", flexShrink: 0 }, { children: "[\u5185\u5BB9\u968F\u673A]" })), (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 1 }, { children: questions.map(function (v, index) { return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "text.secondary" }, { children: ["\u2022\u00A0", v.content] }), index)); }) }))] })));
|
|
74
74
|
}
|
|
75
75
|
return questions.map(function (v) { return v.content; }).join('\n');
|
|
76
76
|
}, [questions]);
|
|
@@ -64,7 +64,6 @@ var QuestionModelList = function () {
|
|
|
64
64
|
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: "100%", sx: steps.length > 0 ? {} : { height: 'calc(100% - 100px)', display: 'flex', alignItems: 'center', justifyContent: 'center' }, ref: ref }, { children: steps.length > 0 ? (steps.map(function (item, index) {
|
|
65
65
|
return ((0, jsx_runtime_1.jsx)(Item_1.default, __assign({ steps: steps, index: index, disabledWeight: index === lastAiTestIndex }, item), item.uniqueId || item.token));
|
|
66
66
|
})) : ((0, jsx_runtime_1.jsx)(AutoCombine_1.default, { onAutoCombine: function () {
|
|
67
|
-
console.log('steps', extraAbilityTokens, aiEvaluationData);
|
|
68
67
|
var random = aiEvaluationData[0].list.filter(function (item) { return extraAbilityTokens === null || extraAbilityTokens === void 0 ? void 0 : extraAbilityTokens.includes(item === null || item === void 0 ? void 0 : item.token); }).map(function (v) { return v.list; }) || [];
|
|
69
68
|
handleUseQuestion(random.map(function (item) { return item[Math.floor(Math.random() * item.length)]; }));
|
|
70
69
|
} })) })));
|
|
@@ -75,6 +75,6 @@ var Question = function () {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}, [token, aiEvaluationData, questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps, templateList, addModel]);
|
|
78
|
-
return ((0, jsx_runtime_1.jsx)(styled_1.QuestionModelRoot, { children: loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Header_1.default, {}), (0, jsx_runtime_1.jsx)(Interactive_1.default, { mode: "
|
|
78
|
+
return ((0, jsx_runtime_1.jsx)(styled_1.QuestionModelRoot, { children: loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Header_1.default, {}), (0, jsx_runtime_1.jsx)(Interactive_1.default, { mode: "Traditional" }), (0, jsx_runtime_1.jsx)(List_1.default, {})] })) }));
|
|
79
79
|
};
|
|
80
80
|
exports.default = Question;
|
|
@@ -26,19 +26,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
27
|
var VideoVoicePreview_1 = __importDefault(require("./VideoVoicePreview"));
|
|
28
28
|
var VideoVoiceUploader_1 = __importDefault(require("./VideoVoiceUploader"));
|
|
29
|
-
// import { useUpdateQuestionStore } from '@store/ai-question/question-update-store';
|
|
30
29
|
var fbm_ui_1 = require("fbm-ui");
|
|
31
30
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
32
31
|
var formik_1 = require("formik");
|
|
33
32
|
var VideoVoice = function () {
|
|
34
|
-
// const { questionState, updateQuestionState } = useUpdateQuestionStore(store => [store.questionState]);
|
|
35
|
-
// const { item } = questionState;
|
|
36
|
-
// const handleVideoBroadcastChange = (key, checked) => {
|
|
37
|
-
// updateQuestionState({
|
|
38
|
-
// item: { ...item, videoBroadcast: { ...item?.videoBroadcast, [key]: checked ? 1 : 2 } },
|
|
39
|
-
// });
|
|
40
|
-
// };
|
|
41
|
-
// console.log(item);
|
|
42
33
|
return ((0, jsx_runtime_1.jsx)(formik_1.FieldArray, { name: "questions", render: function (_a) {
|
|
43
34
|
var _b;
|
|
44
35
|
var form = _a.form;
|
|
@@ -46,13 +37,12 @@ var VideoVoice = function () {
|
|
|
46
37
|
borderRadius: 2,
|
|
47
38
|
border: '1px dashed rgba(0,0,0, 0.08)',
|
|
48
39
|
} }, { children: [q.videoUrl && ((0, jsx_runtime_1.jsx)(VideoVoicePreview_1.default, { onDel: function () {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, videoUrl: q.videoUrl })), (0, jsx_runtime_1.jsx)(VideoVoiceUploader_1.default, { index: index })] })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ flexGrow: 1, 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", InputProps: {
|
|
40
|
+
var questons = __spreadArray([], form.values.questions, true);
|
|
41
|
+
questons[index] = __assign(__assign({}, questons[index]), { videoUrl: '' });
|
|
42
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], questons, true) }));
|
|
43
|
+
}, videoUrl: q.videoUrl })), (0, jsx_runtime_1.jsx)(VideoVoiceUploader_1.default, { index: index, questions: form.values.questions, setQuestions: function (qs) {
|
|
44
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], qs, true) }));
|
|
45
|
+
} })] })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ flexGrow: 1, 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", InputProps: {
|
|
56
46
|
rows: 3,
|
|
57
47
|
multiline: true,
|
|
58
48
|
placeholder: '面试内容(系统将根据此内容向候选人进行语音播报)',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const VideoVoiceUploader: ({ index }: {
|
|
2
|
+
declare const VideoVoiceUploader: ({ index, questions, setQuestions }: {
|
|
3
3
|
index: any;
|
|
4
|
+
questions: any;
|
|
5
|
+
setQuestions: any;
|
|
4
6
|
}) => JSX.Element;
|
|
5
7
|
export default VideoVoiceUploader;
|
|
@@ -22,26 +22,21 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
24
24
|
var ai_question_1 = require("../../../../services/ai-question");
|
|
25
|
-
var question_update_store_1 = require("../../../../store/ai-question/question-update-store");
|
|
26
25
|
var utils_1 = require("../../../../utils/utils");
|
|
27
26
|
var ahooks_1 = require("ahooks");
|
|
28
27
|
var fbm_ui_1 = require("fbm-ui");
|
|
29
28
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
30
29
|
var VideoVoiceUploader = function (_a) {
|
|
31
|
-
var index = _a.index;
|
|
32
|
-
var _b = (0,
|
|
33
|
-
var item = questionState.item;
|
|
34
|
-
var _c = (0, ahooks_1.useRequest)(ai_question_1.PostCommonUpload, {
|
|
30
|
+
var index = _a.index, questions = _a.questions, setQuestions = _a.setQuestions;
|
|
31
|
+
var _b = (0, ahooks_1.useRequest)(ai_question_1.PostCommonUpload, {
|
|
35
32
|
manual: true,
|
|
36
33
|
onSuccess: function (_a) {
|
|
37
34
|
var data = _a.data;
|
|
38
35
|
var firstData = data[0];
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
item: __assign(__assign({}, item), { questions: __spreadArray([], item.questions, true), videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), { videoUrl: firstData.url }) }),
|
|
42
|
-
});
|
|
36
|
+
questions[index] = __assign(__assign({}, questions[index]), { videoUrl: firstData.url });
|
|
37
|
+
setQuestions(__spreadArray([], questions, true));
|
|
43
38
|
},
|
|
44
|
-
}), loading =
|
|
39
|
+
}), loading = _b.loading, postCommonUpload = _b.run;
|
|
45
40
|
var uploadProps = {
|
|
46
41
|
type: 'custom',
|
|
47
42
|
showUploadList: false,
|
|
@@ -198,7 +198,7 @@ var QuestionUpdate = function () {
|
|
|
198
198
|
case 0: return [4 /*yield*/, getModelParams(values, true)];
|
|
199
199
|
case 1:
|
|
200
200
|
_a = _b.sent(), errorIndexes = _a.errorIndexes, params = _a.params;
|
|
201
|
-
if ((values === null || values === void 0 ? void 0 : values.questions.length) >
|
|
201
|
+
if ((values === null || values === void 0 ? void 0 : values.questions.length) > 5) {
|
|
202
202
|
fbm_ui_1.Message.error('最多可添加5个面试内容。');
|
|
203
203
|
return [2 /*return*/, false];
|
|
204
204
|
}
|