eli-video-interview 1.2.41-alpha.4 → 1.2.41-alpha.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/BigBallSvg/styled.d.ts +2 -2
- package/esm/components/ScoreBigBall/styled.d.ts +1 -1
- package/esm/components/ScrollDialogContent/index.d.ts +1 -1
- package/esm/components/VideoPreview/styled.d.ts +3 -3
- package/esm/components/react-photo-view/hooks/useAnimationPosition.d.ts +1 -1
- package/esm/constants/ai-question.d.ts +4 -0
- package/esm/constants/ai-question.js +11 -0
- package/esm/constants/ai-report.d.ts +5 -0
- package/esm/constants/ai-report.js +5 -0
- package/esm/enum/ai-report.d.ts +12 -0
- package/esm/enum/ai-report.js +12 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/AbilityFormItem.d.ts +14 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/AbilityFormItem.js +145 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/index.d.ts +2 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/index.js +16 -6
- package/esm/modules/ai-ability/components/AddAbility/index.js +88 -103
- package/esm/modules/ai-ability/components/UpdateAbility/index.js +81 -106
- package/esm/modules/ai-ability/styled.d.ts +2 -2
- package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +1 -1
- package/esm/modules/ai-question/Root.js +12 -9
- package/esm/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +1 -1
- package/esm/modules/ai-question/components/BaseAccordion/styled.d.ts +3 -3
- package/esm/modules/ai-question/components/BootVideo/CustomVideos.js +63 -25
- package/esm/modules/ai-question/components/BootVideo/UploadPreview.js +9 -1
- package/esm/modules/ai-question/components/BootVideo/index.js +89 -23
- package/esm/modules/ai-question/components/BootVideo/interface.d.ts +1 -0
- package/esm/modules/ai-question/components/BootVideo/styled.d.ts +6 -4
- package/esm/modules/ai-question/components/BootVideo/styled.js +20 -17
- package/esm/modules/ai-question/components/QuestionImport/index.d.ts +4 -0
- package/esm/modules/ai-question/components/QuestionImport/index.js +117 -0
- package/esm/modules/ai-question/components/QuestionImport/interface.d.ts +8 -0
- package/esm/modules/ai-question/components/QuestionImport/interface.js +1 -0
- package/esm/modules/ai-question/components/QuestionImport/styled.d.ts +13 -0
- package/esm/modules/ai-question/components/QuestionImport/styled.js +49 -0
- package/esm/modules/ai-question/components/QuestionModel/Header.js +23 -2
- package/esm/modules/ai-question/components/QuestionModel/Item.js +4 -4
- package/esm/modules/ai-question/components/QuestionModel/index.js +1 -1
- package/esm/modules/ai-question/components/QuestionModel/interface.d.ts +1 -0
- package/esm/modules/ai-question/components/QuestionModel/styled.d.ts +1 -1
- package/esm/modules/ai-question/components/QuestionPreview/styled.d.ts +3 -3
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.d.ts +3 -1
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +5 -3
- package/esm/modules/ai-question/components/QuestionTemplate/index.js +3 -2
- package/esm/modules/ai-question/components/QuestionTemplate/interface.d.ts +1 -0
- package/esm/modules/ai-question/components/QuestionUpdate/FllowupSetting.d.ts +4 -0
- package/esm/modules/ai-question/components/QuestionUpdate/FllowupSetting.js +86 -0
- package/esm/modules/ai-question/components/QuestionUpdate/FollowupKeyPoints.d.ts +9 -0
- package/esm/modules/ai-question/components/QuestionUpdate/FollowupKeyPoints.js +94 -0
- package/esm/modules/ai-question/components/QuestionUpdate/FollowupTarget.d.ts +9 -0
- package/esm/modules/ai-question/components/QuestionUpdate/FollowupTarget.js +73 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +8 -7
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +2 -1
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +27 -17
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +15 -10
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +3 -3
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +7 -0
- package/esm/modules/ai-question/components/QuestionUpdate/styled.d.ts +10 -10
- package/esm/modules/ai-question/interface.d.ts +7 -0
- package/esm/modules/ai-question/useAiQuestion.d.ts +4 -0
- package/esm/modules/ai-report/Root.js +54 -10
- package/esm/modules/ai-report/components/AIEvaluate/index.js +2 -2
- package/esm/modules/ai-report/components/RankingRange/styled.d.ts +2 -2
- package/esm/modules/ai-report/components/ScoreReport/Bar.d.ts +4 -1
- package/esm/modules/ai-report/components/ScoreReport/Bar.js +12 -10
- package/esm/modules/ai-report/components/ScoreReport/Failed.d.ts +1 -1
- package/esm/modules/ai-report/components/ScoreReport/Failed.js +12 -4
- package/esm/modules/ai-report/components/ScoreReport/RecommendIcon.d.ts +3 -0
- package/esm/modules/ai-report/components/ScoreReport/RecommendIcon.js +17 -0
- package/esm/modules/ai-report/components/ScoreReport/Score.js +35 -9
- package/esm/modules/ai-report/components/ScoreReport/Tips.d.ts +3 -0
- package/esm/modules/ai-report/components/ScoreReport/Tips.js +18 -0
- package/esm/modules/ai-report/components/ScoreReport/index.js +8 -10
- package/esm/modules/ai-report/components/ScoreReport/interface.d.ts +5 -0
- package/esm/modules/ai-report/components/ScoreReport/styled.d.ts +7 -7
- package/esm/modules/ai-report/components/ScoreReport/styled.js +2 -4
- package/esm/modules/ai-report/components/Suggestion/index.js +2 -2
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +3 -1
- package/esm/modules/ai-report/components/VideoQuestion/Workplaces.d.ts +6 -0
- package/esm/modules/ai-report/components/VideoQuestion/Workplaces.js +26 -0
- package/esm/modules/ai-report/components/VideoQuestion/index.js +2 -2
- package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +8 -8
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +1 -0
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.js +2 -1
- package/esm/modules/ai-report/components/WorkPlaces/index.js +4 -3
- package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +4 -4
- package/esm/modules/ai-report/interface.d.ts +6 -0
- package/esm/modules/ai-template/components/TemplateList/styled.d.ts +12 -12
- package/esm/modules/ai-template/components/TemplateMenu/styled.d.ts +4 -4
- package/esm/services/ai-question.d.ts +3 -0
- package/esm/services/ai-question.js +3 -0
- package/esm/services/ai-report.d.ts +6 -0
- package/esm/services/ai-report.js +1 -0
- package/esm/store/ai-question/boot-video-store.d.ts +6 -0
- package/esm/store/ai-question/boot-video-store.js +2 -0
- package/esm/store/ai-question/global-store.d.ts +12 -0
- package/esm/store/ai-question/global-store.js +1 -0
- package/esm/store/enterprise/enterprise-store.js +2 -2
- package/esm/utils/interceptor.js +5 -2
- package/lib/components/BigBallSvg/styled.d.ts +2 -2
- package/lib/components/ScoreBigBall/styled.d.ts +1 -1
- package/lib/components/ScrollDialogContent/index.d.ts +1 -1
- package/lib/components/VideoPreview/styled.d.ts +3 -3
- package/lib/components/react-photo-view/hooks/useAnimationPosition.d.ts +1 -1
- package/lib/constants/ai-question.d.ts +4 -0
- package/lib/constants/ai-question.js +13 -1
- package/lib/constants/ai-report.d.ts +5 -0
- package/lib/constants/ai-report.js +6 -1
- package/lib/enum/ai-report.d.ts +12 -0
- package/lib/enum/ai-report.js +13 -1
- package/lib/modules/ai-ability/components/AbilityFormItem/AbilityFormItem.d.ts +14 -0
- package/lib/modules/ai-ability/components/AbilityFormItem/AbilityFormItem.js +147 -0
- package/lib/modules/ai-ability/components/AbilityFormItem/index.d.ts +2 -0
- package/lib/modules/ai-ability/components/AbilityFormItem/index.js +14 -4
- package/lib/modules/ai-ability/components/AddAbility/index.js +110 -102
- package/lib/modules/ai-ability/components/UpdateAbility/index.js +101 -103
- package/lib/modules/ai-ability/styled.d.ts +2 -2
- package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +1 -1
- package/lib/modules/ai-question/Root.js +12 -9
- package/lib/modules/ai-question/components/AiAssessmentCriteria/styled.d.ts +1 -1
- package/lib/modules/ai-question/components/BaseAccordion/styled.d.ts +3 -3
- package/lib/modules/ai-question/components/BootVideo/CustomVideos.js +62 -24
- package/lib/modules/ai-question/components/BootVideo/UploadPreview.js +9 -1
- package/lib/modules/ai-question/components/BootVideo/index.js +90 -24
- package/lib/modules/ai-question/components/BootVideo/interface.d.ts +1 -0
- package/lib/modules/ai-question/components/BootVideo/styled.d.ts +6 -4
- package/lib/modules/ai-question/components/BootVideo/styled.js +20 -17
- package/lib/modules/ai-question/components/QuestionImport/index.d.ts +4 -0
- package/lib/modules/ai-question/components/QuestionImport/index.js +122 -0
- package/lib/modules/ai-question/components/QuestionImport/interface.d.ts +8 -0
- package/lib/modules/ai-question/components/QuestionImport/interface.js +2 -0
- package/lib/modules/ai-question/components/QuestionImport/styled.d.ts +13 -0
- package/lib/modules/ai-question/components/QuestionImport/styled.js +52 -0
- package/lib/modules/ai-question/components/QuestionModel/Header.js +25 -1
- package/lib/modules/ai-question/components/QuestionModel/Item.js +3 -3
- package/lib/modules/ai-question/components/QuestionModel/index.js +1 -1
- package/lib/modules/ai-question/components/QuestionModel/interface.d.ts +1 -0
- package/lib/modules/ai-question/components/QuestionModel/styled.d.ts +1 -1
- package/lib/modules/ai-question/components/QuestionPreview/styled.d.ts +3 -3
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.d.ts +3 -1
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +5 -3
- package/lib/modules/ai-question/components/QuestionTemplate/index.js +3 -2
- package/lib/modules/ai-question/components/QuestionTemplate/interface.d.ts +1 -0
- package/lib/modules/ai-question/components/QuestionUpdate/FllowupSetting.d.ts +4 -0
- package/lib/modules/ai-question/components/QuestionUpdate/FllowupSetting.js +91 -0
- package/lib/modules/ai-question/components/QuestionUpdate/FollowupKeyPoints.d.ts +9 -0
- package/lib/modules/ai-question/components/QuestionUpdate/FollowupKeyPoints.js +96 -0
- package/lib/modules/ai-question/components/QuestionUpdate/FollowupTarget.d.ts +9 -0
- package/lib/modules/ai-question/components/QuestionUpdate/FollowupTarget.js +75 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +8 -7
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +4 -3
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +27 -17
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +2 -1
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +13 -8
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +2 -2
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +7 -0
- package/lib/modules/ai-question/components/QuestionUpdate/styled.d.ts +10 -10
- package/lib/modules/ai-question/interface.d.ts +7 -0
- package/lib/modules/ai-question/useAiQuestion.d.ts +4 -0
- package/lib/modules/ai-report/Root.js +51 -7
- package/lib/modules/ai-report/components/AIEvaluate/index.js +2 -2
- package/lib/modules/ai-report/components/RankingRange/styled.d.ts +2 -2
- package/lib/modules/ai-report/components/ScoreReport/Bar.d.ts +4 -1
- package/lib/modules/ai-report/components/ScoreReport/Bar.js +11 -9
- package/lib/modules/ai-report/components/ScoreReport/Failed.d.ts +1 -1
- package/lib/modules/ai-report/components/ScoreReport/Failed.js +12 -5
- package/lib/modules/ai-report/components/ScoreReport/RecommendIcon.d.ts +3 -0
- package/lib/modules/ai-report/components/ScoreReport/RecommendIcon.js +22 -0
- package/lib/modules/ai-report/components/ScoreReport/Score.js +31 -7
- package/lib/modules/ai-report/components/ScoreReport/Tips.d.ts +3 -0
- package/lib/modules/ai-report/components/ScoreReport/Tips.js +20 -0
- package/lib/modules/ai-report/components/ScoreReport/index.js +6 -8
- package/lib/modules/ai-report/components/ScoreReport/interface.d.ts +5 -0
- package/lib/modules/ai-report/components/ScoreReport/styled.d.ts +7 -7
- package/lib/modules/ai-report/components/ScoreReport/styled.js +2 -4
- package/lib/modules/ai-report/components/Suggestion/index.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +9 -7
- package/lib/modules/ai-report/components/VideoQuestion/Workplaces.d.ts +6 -0
- package/lib/modules/ai-report/components/VideoQuestion/Workplaces.js +28 -0
- package/lib/modules/ai-report/components/VideoQuestion/index.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +8 -8
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +1 -0
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.js +2 -1
- package/lib/modules/ai-report/components/WorkPlaces/index.js +3 -2
- package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +4 -4
- package/lib/modules/ai-report/interface.d.ts +6 -0
- package/lib/modules/ai-template/components/TemplateList/styled.d.ts +12 -12
- package/lib/modules/ai-template/components/TemplateMenu/styled.d.ts +4 -4
- package/lib/services/ai-question.d.ts +3 -0
- package/lib/services/ai-question.js +7 -1
- package/lib/services/ai-report.d.ts +6 -0
- package/lib/services/ai-report.js +3 -1
- package/lib/store/ai-question/boot-video-store.d.ts +6 -0
- package/lib/store/ai-question/boot-video-store.js +2 -0
- package/lib/store/ai-question/global-store.d.ts +12 -0
- package/lib/store/ai-question/global-store.js +1 -0
- package/lib/store/enterprise/enterprise-store.js +2 -2
- package/lib/utils/interceptor.js +5 -2
- package/package.json +6 -3
|
@@ -46,17 +46,18 @@ var ICONS = (_a = {},
|
|
|
46
46
|
_a[ADD_QUESTION_TYPE.LANGUAGE] = _jsx(MicIcon, { color: "secondary" }),
|
|
47
47
|
_a[ADD_QUESTION_TYPE.SINGLECHIOCE] = _jsx(RadioCheckedIcon, { color: "secondary" }),
|
|
48
48
|
_a);
|
|
49
|
-
var AiEvaluation = function () {
|
|
49
|
+
var AiEvaluation = function (_a) {
|
|
50
|
+
var isOem = _a.isOem;
|
|
50
51
|
var onOpenTemplate = useAiQuestionStore(function (store) { return [store.onOpenTemplate]; }).onOpenTemplate;
|
|
51
52
|
var updateQuestionState = useUpdateQuestionStore(function (store) { return [store.updateQuestionState]; }).updateQuestionState;
|
|
52
53
|
var questionModelData = useQuestionModelStore(function (store) { return [store.questionModelData]; }).questionModelData;
|
|
53
54
|
var isEdit = (getQuestionModelStore() || {}).isEdit;
|
|
54
55
|
var selctedAbilitys = useAiAbilityListStore().selctedAbilitys;
|
|
55
56
|
var aiEvaluationData = useQuestionTemplateStore(function (store) { return [store.aiEvaluationData]; }).aiEvaluationData;
|
|
56
|
-
var
|
|
57
|
+
var _b = __read(useSetState({
|
|
57
58
|
addQuestionOpen: false,
|
|
58
59
|
showOnlyAITest: false,
|
|
59
|
-
}), 2), state =
|
|
60
|
+
}), 2), state = _b[0], setState = _b[1];
|
|
60
61
|
var addQuestionOpen = state.addQuestionOpen, showOnlyAITest = state.showOnlyAITest;
|
|
61
62
|
var handleClickAdd = useCallback(function (aiShowType) {
|
|
62
63
|
setState({ addQuestionOpen: false });
|
|
@@ -75,6 +76,7 @@ var AiEvaluation = function () {
|
|
|
75
76
|
return (_jsxs(Box, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2 }, { children: [_jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(LayerOutlineIcon, {}), onClick: function () { return onOpenTemplate === null || onOpenTemplate === void 0 ? void 0 : onOpenTemplate(questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps); } }, { children: "\u5C97\u4F4D\u6A21\u7248\u5E93" })), _jsx(Popover, __assign({ open: addQuestionOpen, arrow: false, content: content, onClickAway: function () { return setState({ addQuestionOpen: false }); } }, { children: _jsx(Button, __assign({ variant: "outlined", icon: _jsx(AddIcon, {}), onClick: function () { return setState({ addQuestionOpen: true }); } }, { children: "\u81EA\u5B9A\u4E49\u9898\u76EE" })) }))] })), aiEvaluationData.map(function (_a, index) {
|
|
76
77
|
var name = _a.name, list = _a.list;
|
|
77
78
|
return (_jsxs(Box, { children: [_jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, weight: "500", mb: 2 }, { children: name })), list
|
|
79
|
+
.filter(function (v) { return !isOem || v.name !== '游戏测评'; })
|
|
78
80
|
.filter(function (v) { return !isEdit || !v.isNew || selctedAbilitys.includes(v.token); })
|
|
79
81
|
.map(function (item, i) { return (_jsx(BaseAccordion, __assign({ index: i, isShowOnlyAITest: showOnlyAITest, isShowDesc: index !== 0, isShowSummaryAction: index !== 0, isShowConfirm: index !== 0 }, item), item.name + i)); })] }, name));
|
|
80
82
|
})] }));
|
|
@@ -18,7 +18,8 @@ import { PostAiModelQuestions } from "../../../../services/ai-question";
|
|
|
18
18
|
import { useQuestionTemplateStore } from "../../../../store/ai-question/question-template-store";
|
|
19
19
|
import { useRequest } from 'ahooks';
|
|
20
20
|
import { Box } from 'fbm-ui';
|
|
21
|
-
var QuestionTemplate = function () {
|
|
21
|
+
var QuestionTemplate = function (_a) {
|
|
22
|
+
var isOem = _a.isOem;
|
|
22
23
|
var updateAiEvaluationData = useQuestionTemplateStore().updateAiEvaluationData;
|
|
23
24
|
var selctedAbilitys = useAiAbilityListStore().selctedAbilitys;
|
|
24
25
|
var enterprise = useEnterpriseStore().enterprise;
|
|
@@ -30,6 +31,6 @@ var QuestionTemplate = function () {
|
|
|
30
31
|
return updateAiEvaluationData(data);
|
|
31
32
|
},
|
|
32
33
|
}).loading;
|
|
33
|
-
return _jsx(Box, __assign({ sx: { position: 'relative' } }, { children: loading ? _jsx(Skeleton, {}) : _jsx(AiEvaluation, {}) }));
|
|
34
|
+
return _jsx(Box, __assign({ sx: { position: 'relative' } }, { children: loading ? _jsx(Skeleton, {}) : _jsx(AiEvaluation, { isOem: isOem }) }));
|
|
34
35
|
};
|
|
35
36
|
export default QuestionTemplate;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
+
if (ar || !(i in from)) {
|
|
31
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
+
ar[i] = from[i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
|
+
};
|
|
37
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
38
|
+
import FollowupKeyPoints from './FollowupKeyPoints';
|
|
39
|
+
import FollowupTarget from './FollowupTarget';
|
|
40
|
+
import { Chip, Layout, Message, Typography } from 'fbm-ui';
|
|
41
|
+
import { Stack, Tooltip } from 'fbm-ui/lib/mui';
|
|
42
|
+
import { useState } from 'react';
|
|
43
|
+
var formater = function (content, title) {
|
|
44
|
+
if (title === void 0) { title = ''; }
|
|
45
|
+
return (_jsxs(Stack, __assign({ spacing: 1 }, { children: [_jsx(Typography, __assign({ variant: "caption", color: "white" }, { children: "".concat(title, "\uFF1A") })), content === null || content === void 0 ? void 0 : content.map(function (item, index) { return (_jsx(Typography, __assign({ variant: "caption", color: "white" }, { children: "".concat(index + 1, "\u3001").concat(item) }), index)); })] })));
|
|
46
|
+
};
|
|
47
|
+
var FllowupSetting = function (_a) {
|
|
48
|
+
var index = _a.index, form = _a.form;
|
|
49
|
+
var _b = __read(useState(false), 2), openTarget = _b[0], setOpenTarget = _b[1];
|
|
50
|
+
var _c = __read(useState(false), 2), openKeyPoints = _c[0], setOpenKeyPoints = _c[1];
|
|
51
|
+
var _d = form.values.questions[index], _e = _d.followUpGoals, followUpGoals = _e === void 0 ? [] : _e, _f = _d.scorePoints, scorePoints = _f === void 0 ? [] : _f, content = _d.content;
|
|
52
|
+
var handleFollowupGoalsChange = function (followUpGoals) {
|
|
53
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions.map(function (q, i) { return (i === index ? __assign(__assign({}, q), { followUpGoals: followUpGoals }) : q); })), false) }));
|
|
54
|
+
};
|
|
55
|
+
var handleScorePointsChange = function (scorePoints) {
|
|
56
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions.map(function (q, i) { return (i === index ? __assign(__assign({}, q), { scorePoints: scorePoints }) : q); })), false) }));
|
|
57
|
+
};
|
|
58
|
+
var hasFollowUpGoals = (followUpGoals === null || followUpGoals === void 0 ? void 0 : followUpGoals.length) > 0;
|
|
59
|
+
var hasFolllowUpPoints = (scorePoints === null || scorePoints === void 0 ? void 0 : scorePoints.length) > 0;
|
|
60
|
+
return (_jsxs(Layout, { children: [_jsx(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(Tooltip, __assign({ title: hasFolllowUpPoints ? formater(scorePoints, '得分点') : '暂未设置得分点' }, { children: _jsx(Chip, { color: hasFolllowUpPoints ? 'primary' : 'default', style: hasFolllowUpPoints
|
|
61
|
+
? {
|
|
62
|
+
backgroundColor: '#E8F5E9',
|
|
63
|
+
border: '1px solid transparent',
|
|
64
|
+
}
|
|
65
|
+
: {}, label: hasFolllowUpPoints ? "\u542B".concat(scorePoints.length, "\u6761\u9898\u76EE\u5F97\u5206\u70B9") : '添加题目得分点', onClick: function () {
|
|
66
|
+
if (content) {
|
|
67
|
+
setOpenKeyPoints(true);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
Message.error('面试内容为空,不能设置得分点');
|
|
71
|
+
}
|
|
72
|
+
} }) })), _jsx(Tooltip, __assign({ title: hasFollowUpGoals ? formater(followUpGoals, '目标') : '暂未设置追问目标' }, { children: _jsx(Chip, { color: hasFollowUpGoals ? 'primary' : 'default', label: hasFollowUpGoals ? "\u542B".concat(followUpGoals.length, "\u6761\u8FFD\u95EE\u76EE\u6807") : '添加追问目标', style: hasFollowUpGoals
|
|
73
|
+
? {
|
|
74
|
+
backgroundColor: '#E8F5E9',
|
|
75
|
+
border: '1px solid transparent',
|
|
76
|
+
}
|
|
77
|
+
: {}, onClick: function () {
|
|
78
|
+
if (content) {
|
|
79
|
+
setOpenTarget(true);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
Message.error('面试内容为空,不能设置追问目标');
|
|
83
|
+
}
|
|
84
|
+
} }) }))] })) })), openKeyPoints && (_jsx(FollowupKeyPoints, { question: content, followUpGoals: scorePoints, open: openKeyPoints, onClose: function () { return setOpenKeyPoints(false); }, onOk: handleScorePointsChange })), openTarget && (_jsx(FollowupTarget, { question: content, scorePoints: followUpGoals, open: openTarget, onClose: function () { return setOpenTarget(false); }, onOk: handleFollowupGoalsChange }))] }));
|
|
85
|
+
};
|
|
86
|
+
export default FllowupSetting;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
+
if (ar || !(i in from)) {
|
|
31
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
+
ar[i] = from[i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
|
+
};
|
|
37
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
38
|
+
import { PostAiModelGenerateByAI } from "../../../../services/ai-question";
|
|
39
|
+
import { AddIcon, AiIcon, CloseIcon } from 'fbm-icons';
|
|
40
|
+
import { Box, Button, Dialog, IconButton, Message, TextField, Typography } from 'fbm-ui';
|
|
41
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
42
|
+
import { useCallback, useState } from 'react';
|
|
43
|
+
var MAX_TEXT_LENGTH = 100;
|
|
44
|
+
var FollowupKeyPoints = function (_a) {
|
|
45
|
+
var followUpGoals = _a.followUpGoals, question = _a.question, open = _a.open, onClose = _a.onClose, onOk = _a.onOk;
|
|
46
|
+
var _b = __read(useState(followUpGoals || []), 2), values = _b[0], setValues = _b[1];
|
|
47
|
+
var _c = __read(useState(false), 2), loading = _c[0], setLoading = _c[1];
|
|
48
|
+
var handleMakeFromAi = useCallback(function () {
|
|
49
|
+
setLoading(true);
|
|
50
|
+
PostAiModelGenerateByAI({ q: question })
|
|
51
|
+
.then(function (res) {
|
|
52
|
+
var _a = res, code = _a.code, _b = _a.data.list, list = _b === void 0 ? [] : _b, message = _a.message;
|
|
53
|
+
if (code === 0) {
|
|
54
|
+
setValues(__spreadArray(__spreadArray([], __read(values), false), __read(list), false));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
return Promise.reject(message);
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
.catch(function (err) {
|
|
61
|
+
Message.error(err.toString());
|
|
62
|
+
})
|
|
63
|
+
.finally(function () {
|
|
64
|
+
setLoading(false);
|
|
65
|
+
});
|
|
66
|
+
}, [question, values]);
|
|
67
|
+
var handleChange = useCallback(function (index, value) {
|
|
68
|
+
setValues(values.map(function (item, i) { return (i === index ? value : item); }));
|
|
69
|
+
}, [values]);
|
|
70
|
+
var handleAdd = useCallback(function () {
|
|
71
|
+
setValues(__spreadArray(__spreadArray([], __read(values), false), [''], false));
|
|
72
|
+
}, [values]);
|
|
73
|
+
var handleRemove = useCallback(function (index) {
|
|
74
|
+
setValues(values.filter(function (_, i) { return i !== index; }));
|
|
75
|
+
}, [values]);
|
|
76
|
+
return (_jsx(Dialog, __assign({ open: open,
|
|
77
|
+
// @ts-ignore
|
|
78
|
+
title: _jsxs(Stack, __assign({ direction: "row", spacing: 1 }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 700 }, { children: "\u8BBE\u7F6E\u9898\u76EE\u5F97\u5206\u70B9" })), _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\uFF08\u6700\u591A\u6DFB\u52A03\u6761\uFF09" }))] })), size: "sm", onClose: onClose, okText: "\u786E\u8BA4", onOk: function () {
|
|
79
|
+
var filtered = values.filter(function (item) { return item.trim(); });
|
|
80
|
+
if (filtered.length > 3) {
|
|
81
|
+
return Message.error('最多添加3条得分点,请移除多余的得分点。');
|
|
82
|
+
}
|
|
83
|
+
var canUse = filtered.every(function (item) { return item.length <= MAX_TEXT_LENGTH; });
|
|
84
|
+
if (canUse) {
|
|
85
|
+
onOk(filtered);
|
|
86
|
+
onClose();
|
|
87
|
+
}
|
|
88
|
+
} }, { children: _jsxs(Stack, { children: [_jsx(Typography, __assign({ variant: "body2", color: "textSecondary", mb: 4 }, { children: question })), values === null || values === void 0 ? void 0 : values.map(function (item, index) {
|
|
89
|
+
return (_jsxs(Stack, __assign({ direction: "row", spacing: 1 }, { children: [_jsx(TextField, { max: MAX_TEXT_LENGTH, error: item.length > MAX_TEXT_LENGTH, sx: { flexGrow: 1, height: 'auto' }, value: item, onChange: function (e) {
|
|
90
|
+
handleChange(index, e.target.value);
|
|
91
|
+
} }), _jsx(Box, __assign({ height: 84, pt: 1 }, { children: _jsx(IconButton, __assign({ size: "small", onClick: function () { return handleRemove(index); } }, { children: _jsx(CloseIcon, {}) })) }))] }), index));
|
|
92
|
+
}), _jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Button, __assign({ variant: "outlined", color: "inherit", startIcon: _jsx(AddIcon, {}), onClick: handleAdd }, { children: "\u6DFB\u52A0" })), _jsx(Button, __assign({ variant: "outlined", loading: loading, color: "inherit", startIcon: _jsx(AiIcon, {}), onClick: handleMakeFromAi }, { children: "AI\u751F\u6210" }))] }))] }) })));
|
|
93
|
+
};
|
|
94
|
+
export default FollowupKeyPoints;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
+
if (ar || !(i in from)) {
|
|
31
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
+
ar[i] = from[i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
|
+
};
|
|
37
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
38
|
+
import { AddIcon, CloseIcon } from 'fbm-icons';
|
|
39
|
+
import { Box, Button, Dialog, IconButton, Message, TextField, Typography } from 'fbm-ui';
|
|
40
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
41
|
+
import { useCallback, useState } from 'react';
|
|
42
|
+
var MAX_TEXT_LENGTH = 100;
|
|
43
|
+
var FollowupTarget = function (_a) {
|
|
44
|
+
var scorePoints = _a.scorePoints, question = _a.question, open = _a.open, onClose = _a.onClose, onOk = _a.onOk;
|
|
45
|
+
var _b = __read(useState(scorePoints || []), 2), values = _b[0], setValues = _b[1];
|
|
46
|
+
var handleChange = useCallback(function (index, value) {
|
|
47
|
+
setValues(values.map(function (item, i) { return (i === index ? value : item); }));
|
|
48
|
+
}, [values]);
|
|
49
|
+
var handleAdd = useCallback(function () {
|
|
50
|
+
setValues(__spreadArray(__spreadArray([], __read(values), false), [''], false));
|
|
51
|
+
}, [values]);
|
|
52
|
+
var handleRemove = useCallback(function (index) {
|
|
53
|
+
setValues(values.filter(function (_, i) { return i !== index; }));
|
|
54
|
+
}, [values]);
|
|
55
|
+
return (_jsx(Dialog, __assign({ open: open,
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
title: _jsxs(Stack, __assign({ direction: "row", spacing: 1 }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 700 }, { children: "\u8BBE\u7F6E\u8FFD\u95EE\u76EE\u6807" })), _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\uFF08\u6700\u591A\u6DFB\u52A03\u6761\uFF09" }))] })), size: "sm", onClose: onClose, okText: "\u786E\u8BA4", onOk: function () {
|
|
58
|
+
var filtered = values.filter(function (item) { return item.trim(); });
|
|
59
|
+
if (filtered.length > 3) {
|
|
60
|
+
return Message.error('最多添加3条追问目标,请移除多余的目标。');
|
|
61
|
+
}
|
|
62
|
+
var canUse = filtered.every(function (item) { return item.length <= MAX_TEXT_LENGTH; });
|
|
63
|
+
if (canUse) {
|
|
64
|
+
onOk(filtered);
|
|
65
|
+
onClose();
|
|
66
|
+
}
|
|
67
|
+
} }, { children: _jsxs(Stack, { children: [_jsx(Typography, __assign({ variant: "body2", color: "textSecondary", mb: 4 }, { children: question })), values === null || values === void 0 ? void 0 : values.map(function (item, index) {
|
|
68
|
+
return (_jsxs(Stack, __assign({ direction: "row", spacing: 1 }, { children: [_jsx(TextField, { max: MAX_TEXT_LENGTH, error: item.length > MAX_TEXT_LENGTH, sx: { flexGrow: 1, height: 'auto' }, value: item, onChange: function (e) {
|
|
69
|
+
handleChange(index, e.target.value);
|
|
70
|
+
} }), _jsx(Box, __assign({ height: 84, pt: 1 }, { children: _jsx(IconButton, __assign({ size: "small", onClick: function () { return handleRemove(index); } }, { children: _jsx(CloseIcon, {}) })) }))] }), index));
|
|
71
|
+
}), _jsx(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", startIcon: _jsx(AddIcon, {}), onClick: handleAdd }, { children: "\u6DFB\u52A0" })) }))] }) })));
|
|
72
|
+
};
|
|
73
|
+
export default FollowupTarget;
|
|
@@ -74,6 +74,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
74
74
|
import AiAnalysis from '../AiAnalysis';
|
|
75
75
|
import Chioce from './Chioce';
|
|
76
76
|
import { broadcastModeOptions, durationOptions, prepareTimeOptions } from './const';
|
|
77
|
+
import FllowupSetting from './FllowupSetting';
|
|
77
78
|
import RandomQuestion from './RandomQuestion';
|
|
78
79
|
import VideoVoice from './VideoVoice';
|
|
79
80
|
import { useAiAbilityListStore } from "../../../../store/ai-ability-select/question-ability-store";
|
|
@@ -161,13 +162,13 @@ var QuestionForm = forwardRef(function (props, ref) {
|
|
|
161
162
|
}), onChange: handleCategoryChange }) })))] })), aiShowType !== ADD_QUESTION_TYPE.SINGLECHIOCE &&
|
|
162
163
|
((form === null || form === void 0 ? void 0 : form.values.broadcastType) === 1 || preview ? (_jsx(FieldArray, { name: "questions", render: function () {
|
|
163
164
|
var _a;
|
|
164
|
-
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", InputProps: {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
165
|
+
return (_a = form.values.questions) === null || _a === void 0 ? void 0 : _a.map(function (_, index) { return (_jsxs(_Fragment, { children: [_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", InputProps: {
|
|
166
|
+
rows: 3,
|
|
167
|
+
multiline: true,
|
|
168
|
+
sx: { padding: 0 },
|
|
169
|
+
}, sx: { flexGrow: 1, height: 120 } }), form.values.questions.length > 1 && (_jsx(Box, __assign({ height: 84, pt: 1 }, { children: _jsx(IconButton, __assign({ size: "small", onClick: function () {
|
|
170
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions.filter(function (_, i) { return i !== index; })), false) }));
|
|
171
|
+
} }, { children: _jsx(CloseIcon, {}) })) })))] }), index), aiShowType === ADD_QUESTION_TYPE.FREE && _jsx(FllowupSetting, { index: index, form: form })] })); });
|
|
171
172
|
} })) : (_jsx(VideoVoice, {}))), !preview && aiShowType === ADD_QUESTION_TYPE.SINGLECHIOCE && (
|
|
172
173
|
// @ts-ignore
|
|
173
174
|
_jsx(Box, { children: _jsx(FieldArray, { name: "questions", render: function () {
|
|
@@ -27,6 +27,7 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
27
27
|
};
|
|
28
28
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
29
|
import SelectQuestion from './SelectQuestion';
|
|
30
|
+
import { MAX_RANDOM_QUESTION_NUM } from "../../../../constants/ai-question";
|
|
30
31
|
import { ADD_QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
31
32
|
import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
|
|
32
33
|
import { AddIcon, Box, Button, Checkbox, InfoIcon, Layout, Message, Popactions, Tooltip } from 'fbm-ui';
|
|
@@ -63,7 +64,7 @@ var RandomQuestion = function (_a) {
|
|
|
63
64
|
},
|
|
64
65
|
];
|
|
65
66
|
var isVideoBroadcast = broadcastType === 2;
|
|
66
|
-
var desc = isVideoBroadcast ? (
|
|
67
|
+
var desc = isVideoBroadcast ? (_jsx(_Fragment, { children: "\n 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\n <br />\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 \u9898\u76EE\u7684\u64AD\u62A5\u65B9\u5F0F\u53D8\u6362\u4E3AAI\u8BED\u97F3\u64AD\u62A5\u65B9\u5F0F\n <br />\n 3.\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A".concat(MAX_RANDOM_QUESTION_NUM, "\u4E2A\u9009\u9879\u3002") })) : ("\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A".concat(MAX_RANDOM_QUESTION_NUM, "\u4E2A\u9009\u9879\u3002"));
|
|
67
68
|
var handleVideoBroadcastChange = function (key, checked) {
|
|
68
69
|
var _a;
|
|
69
70
|
updateQuestionState({
|
|
@@ -35,6 +35,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
35
35
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
36
|
};
|
|
37
37
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
38
|
+
import FllowupSetting from './FllowupSetting';
|
|
38
39
|
import VideoVoicePreview from './VideoVoicePreview';
|
|
39
40
|
import VideoVoiceUploader from './VideoVoiceUploader';
|
|
40
41
|
import { Box, CloseIcon, FormItem, IconButton } from 'fbm-ui';
|
|
@@ -44,23 +45,32 @@ var VideoVoice = function () {
|
|
|
44
45
|
return (_jsx(FieldArray, { name: "questions", render: function (_a) {
|
|
45
46
|
var _b;
|
|
46
47
|
var form = _a.form;
|
|
47
|
-
return (_b = form.values.questions) === null || _b === void 0 ? void 0 : _b.map(function (q, index) { return (_jsxs(Box, __assign({ display: "flex", mb: 3 }, { children: [_jsxs(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
return (_b = form.values.questions) === null || _b === void 0 ? void 0 : _b.map(function (q, index) { return (_jsxs(Box, __assign({ display: "flex", mb: 3 }, { children: [_jsxs(Stack, __assign({ spacing: 2, width: 96, mr: 2 }, { children: [_jsxs(Box, __assign({ textAlign: "center", overflow: "hidden", height: 57, sx: {
|
|
49
|
+
borderRadius: 2,
|
|
50
|
+
border: '1px dashed rgba(0,0,0, 0.08)',
|
|
51
|
+
} }, { children: [q.videoUrl && (_jsx(VideoVoicePreview, { onDel: function () {
|
|
52
|
+
var questons = __spreadArray([], __read(form.values.questions), false);
|
|
53
|
+
questons[index] = __assign(__assign({}, questons[index]), { videoUrl: '' });
|
|
54
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(questons), false) }));
|
|
55
|
+
}, videoUrl: q.videoUrl })), _jsx(VideoVoiceUploader, { index: index, questions: form.values.questions, setQuestions: function (qs) {
|
|
56
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(qs), false) }));
|
|
57
|
+
} })] })), _jsxs(Box, __assign({ textAlign: "center", overflow: "hidden", height: 57, sx: {
|
|
58
|
+
borderRadius: 2,
|
|
59
|
+
border: '1px dashed rgba(0,0,0, 0.08)',
|
|
60
|
+
} }, { children: [q.videoURLWide && (_jsx(VideoVoicePreview, { onDel: function () {
|
|
61
|
+
var questons = __spreadArray([], __read(form.values.questions), false);
|
|
62
|
+
questons[index] = __assign(__assign({}, questons[index]), { videoURLWide: '' });
|
|
63
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(questons), false) }));
|
|
64
|
+
}, videoUrl: q.videoURLWide })), _jsx(VideoVoiceUploader, { index: index, type: "pc", questions: form.values.questions, setQuestions: function (qs) {
|
|
65
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(qs), false) }));
|
|
66
|
+
} })] }))] })), _jsxs(Stack, __assign({ flexGrow: 1, justifyContent: "space-between", spacing: 3 }, { children: [_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: {
|
|
67
|
+
rows: 3,
|
|
68
|
+
multiline: true,
|
|
69
|
+
placeholder: '面试内容(系统将根据此内容向候选人进行语音播报)',
|
|
70
|
+
sx: { padding: 0 },
|
|
71
|
+
}, sx: { flexGrow: 1 } }), form.values.questions.length > 1 && (_jsx(Box, __assign({ height: 84, pt: 1 }, { children: _jsx(IconButton, __assign({ size: "small", onClick: function () {
|
|
72
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions.filter(function (_, i) { return i !== index; })), false) }));
|
|
73
|
+
} }, { children: _jsx(CloseIcon, {}) })) })))] })), _jsx(FllowupSetting, { index: index, form: form })] }))] }), index)); });
|
|
64
74
|
} }));
|
|
65
75
|
};
|
|
66
76
|
export default VideoVoice;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const VideoVoiceUploader: ({ index, questions, setQuestions }: {
|
|
2
|
+
declare const VideoVoiceUploader: ({ index, questions, setQuestions, type }: {
|
|
3
3
|
index: any;
|
|
4
4
|
questions: any;
|
|
5
5
|
setQuestions: any;
|
|
6
|
+
type?: string | undefined;
|
|
6
7
|
}) => JSX.Element;
|
|
7
8
|
export default VideoVoiceUploader;
|
|
@@ -34,23 +34,23 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
34
34
|
}
|
|
35
35
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
36
|
};
|
|
37
|
-
import { jsx as _jsx,
|
|
37
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
38
38
|
import { PostCommonUpload } from "../../../../services/ai-question";
|
|
39
39
|
import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
|
|
40
40
|
import { useRequest } from 'ahooks';
|
|
41
41
|
import { Message, Typography, Upload, UploadIcon } from 'fbm-ui';
|
|
42
|
-
import { Stack } from 'fbm-ui/lib/mui';
|
|
42
|
+
import { CircularProgress, Stack } from 'fbm-ui/lib/mui';
|
|
43
43
|
var VideoVoiceUploader = function (_a) {
|
|
44
|
-
var index = _a.index, questions = _a.questions, setQuestions = _a.setQuestions;
|
|
45
|
-
var
|
|
44
|
+
var index = _a.index, questions = _a.questions, setQuestions = _a.setQuestions, _b = _a.type, type = _b === void 0 ? 'mobile' : _b;
|
|
45
|
+
var _c = useRequest(PostCommonUpload, {
|
|
46
46
|
manual: true,
|
|
47
47
|
onSuccess: function (_a) {
|
|
48
48
|
var data = _a.data;
|
|
49
49
|
var _b = __read(data, 1), firstData = _b[0];
|
|
50
|
-
questions[index] = __assign(__assign({}, questions[index]), { videoUrl: firstData.url });
|
|
50
|
+
questions[index] = __assign(__assign({}, questions[index]), (type === 'mobile' ? { videoUrl: firstData.url } : { videoURLWide: firstData.url }));
|
|
51
51
|
setQuestions(__spreadArray([], __read(questions), false));
|
|
52
52
|
},
|
|
53
|
-
}), loading =
|
|
53
|
+
}), loading = _c.loading, postCommonUpload = _c.run;
|
|
54
54
|
var uploadProps = {
|
|
55
55
|
type: 'custom',
|
|
56
56
|
showUploadList: false,
|
|
@@ -67,10 +67,15 @@ var VideoVoiceUploader = function (_a) {
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
};
|
|
70
|
-
return (_jsx(Upload, __assign({}, uploadProps, {
|
|
70
|
+
return (_jsx(Upload, __assign({}, uploadProps, {
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
sx: {
|
|
73
|
+
width: '100%',
|
|
74
|
+
height: '100%',
|
|
75
|
+
} }, { children: _jsxs(Stack, __assign({ justifyContent: "center", alignItems: "center", color: "text.secondary", sx: {
|
|
71
76
|
cursor: 'pointer',
|
|
72
|
-
width:
|
|
73
|
-
height:
|
|
74
|
-
} }, { children: [!loading && (_jsxs(
|
|
77
|
+
width: '100%',
|
|
78
|
+
height: '100%',
|
|
79
|
+
} }, { children: [!loading && (_jsxs(Stack, __assign({ justifyContent: "center", alignItems: "center" }, { children: [_jsx(UploadIcon, { color: "inherit" }), _jsx(Typography, __assign({ variant: "caption", color: "inherit" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }))), loading && (_jsxs(Stack, __assign({ justifyContent: "center", alignItems: "center" }, { children: [_jsx(CircularProgress, { size: 24, color: "inherit" }), _jsx(Typography, __assign({ variant: "caption" }, { children: "\u4E0A\u4F20\u4E2D..." }))] })))] })) })));
|
|
75
80
|
};
|
|
76
81
|
export default VideoVoiceUploader;
|
|
@@ -75,7 +75,7 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
75
75
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
76
76
|
import { defaultQuestionParams } from './const';
|
|
77
77
|
import Form from './Form';
|
|
78
|
-
import { ADD_QUESTION_TYPE_SHOW_LIST, QUESTION_TYPE_TITLE_MAP } from "../../../../constants/ai-question";
|
|
78
|
+
import { ADD_QUESTION_TYPE_SHOW_LIST, MAX_RANDOM_QUESTION_NUM, QUESTION_TYPE_TITLE_MAP } from "../../../../constants/ai-question";
|
|
79
79
|
import { ADD_QUESTION_TYPE, QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
80
80
|
import { useQuestionCollectionListStore } from "../../../../store/ai-ability/question-ability-store";
|
|
81
81
|
import ScrollDialogContent from "../../../../components/ScrollDialogContent";
|
|
@@ -228,8 +228,8 @@ var QuestionUpdate = function () {
|
|
|
228
228
|
case 0: return [4 /*yield*/, getModelParams(values, true)];
|
|
229
229
|
case 1:
|
|
230
230
|
_a = _c.sent(), errorIndexes = _a.errorIndexes, params = _a.params;
|
|
231
|
-
if ((values === null || values === void 0 ? void 0 : values.questions.length) >
|
|
232
|
-
Message.error(
|
|
231
|
+
if ((values === null || values === void 0 ? void 0 : values.questions.length) > MAX_RANDOM_QUESTION_NUM) {
|
|
232
|
+
Message.error("\u6700\u591A\u53EF\u6DFB\u52A0".concat(MAX_RANDOM_QUESTION_NUM, "\u4E2A\u9762\u8BD5\u5185\u5BB9\u3002"));
|
|
233
233
|
return [2 /*return*/, false];
|
|
234
234
|
}
|
|
235
235
|
if (values.broadcastType === 2 && !(values === null || values === void 0 ? void 0 : values.questions.every(function (v) { return v.videoUrl !== ''; }))) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseAiAbilityParams, BaseExtraParams } from '@/modules/ai-question/interface';
|
|
2
|
+
import { FormProps } from 'fbm-ui';
|
|
2
3
|
import type { FormikErrors } from 'formik';
|
|
3
4
|
export interface VideoBroadcastParams {
|
|
4
5
|
videoRetry?: number;
|
|
@@ -13,6 +14,8 @@ export interface Question {
|
|
|
13
14
|
content: string;
|
|
14
15
|
videoUrl: string;
|
|
15
16
|
options?: Option[];
|
|
17
|
+
followUpGoals?: string[];
|
|
18
|
+
scorePoints?: string[];
|
|
16
19
|
}
|
|
17
20
|
export interface QuestionParams {
|
|
18
21
|
name: string;
|
|
@@ -86,3 +89,7 @@ export interface RandomQuestionProps {
|
|
|
86
89
|
onAddCustonQuestion?: () => void;
|
|
87
90
|
onAddRandomQuestion?: (qs: string[]) => void;
|
|
88
91
|
}
|
|
92
|
+
export interface QuestionKeyPointsProps {
|
|
93
|
+
index: number;
|
|
94
|
+
form: FormProps<QuestionFormValues>;
|
|
95
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const VideoPreview: import("@emotion/styled").StyledComponent<import("@mui/system
|
|
3
|
-
export declare const VideoPreviewWrapper: import("@emotion/styled").StyledComponent<import("@mui/system
|
|
4
|
-
export declare const VideoPreviewMask: import("@emotion/styled").StyledComponent<import("@mui/system
|
|
5
|
-
export declare const VideoPreviewMaskContent: import("@emotion/styled").StyledComponent<import("@mui/system
|
|
6
|
-
export declare const VideoPreviewMaskIcon: import("@emotion/styled").StyledComponent<import("@mui/system
|
|
2
|
+
export declare const VideoPreview: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, {}>;
|
|
3
|
+
export declare const VideoPreviewWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
|
+
export declare const VideoPreviewMask: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const VideoPreviewMaskContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const VideoPreviewMaskIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
7
|
export declare const SmallSelect: import("@emotion/styled").StyledComponent<import("fbm-ui").SelectProps & {
|
|
8
8
|
children?: import("react").ReactNode;
|
|
9
|
-
} & import("@mui/system
|
|
9
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
10
10
|
export declare const ScoreInput: import("@emotion/styled").StyledComponent<import("fbm-ui").BaseInputProps & import("@mui/material").OutlinedInputProps & import("@mui/material").InputProps & {
|
|
11
11
|
children?: import("react").ReactNode;
|
|
12
|
-
} & import("@mui/system
|
|
12
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
13
13
|
export declare const ChoiceIcon: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
14
14
|
children?: import("react").ReactNode;
|
|
15
|
-
} & import("@mui/system
|
|
15
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
16
16
|
export declare const ChoiceItem: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
17
17
|
children?: import("react").ReactNode;
|
|
18
|
-
} & import("@mui/system
|
|
18
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
19
19
|
export declare const ChoiceItemInput: import("@emotion/styled").StyledComponent<import("fbm-ui").BaseInputProps & import("@mui/material").OutlinedInputProps & import("@mui/material").InputProps & {
|
|
20
20
|
children?: import("react").ReactNode;
|
|
21
|
-
} & import("@mui/system
|
|
21
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|