eli-video-interview 1.2.41-alpha.3 → 1.2.41-alpha.30
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/react-photo-view/hooks/useAnimationPosition.d.ts +1 -1
- package/esm/constants/ai-question.d.ts +3 -0
- package/esm/constants/ai-question.js +10 -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 +17 -6
- package/esm/modules/ai-ability/components/AddAbility/index.js +131 -101
- package/esm/modules/ai-ability/components/UpdateAbility/index.js +81 -106
- package/esm/modules/ai-question/Root.js +3 -3
- package/esm/modules/ai-question/components/BootVideo/CustomVideos.js +1 -1
- package/esm/modules/ai-question/components/BootVideo/UploadPreview.js +9 -1
- package/esm/modules/ai-question/components/BootVideo/index.js +13 -3
- package/esm/modules/ai-question/components/QuestionImport/index.d.ts +4 -0
- package/esm/modules/ai-question/components/QuestionImport/index.js +109 -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/QuestionPreview/styled.d.ts +2 -2
- 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 +9 -8
- 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/interface.d.ts +1 -0
- package/esm/modules/ai-question/useAiQuestion.d.ts +1 -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/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 +3 -3
- 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 +2 -2
- 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 +2 -2
- package/esm/modules/ai-report/interface.d.ts +6 -0
- package/esm/modules/ai-template/components/TemplateList/styled.d.ts +3 -3
- package/esm/modules/ai-template/components/TemplateMenu/styled.d.ts +1 -1
- 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/global-store.d.ts +3 -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/react-photo-view/hooks/useAnimationPosition.d.ts +1 -1
- package/lib/constants/ai-question.d.ts +3 -0
- package/lib/constants/ai-question.js +12 -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 +15 -4
- package/lib/modules/ai-ability/components/AddAbility/index.js +153 -100
- package/lib/modules/ai-ability/components/UpdateAbility/index.js +101 -103
- package/lib/modules/ai-question/Root.js +3 -3
- package/lib/modules/ai-question/components/BootVideo/CustomVideos.js +1 -1
- package/lib/modules/ai-question/components/BootVideo/UploadPreview.js +9 -1
- package/lib/modules/ai-question/components/BootVideo/index.js +13 -3
- package/lib/modules/ai-question/components/QuestionImport/index.d.ts +4 -0
- package/lib/modules/ai-question/components/QuestionImport/index.js +114 -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/QuestionPreview/styled.d.ts +2 -2
- 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 +9 -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/interface.d.ts +1 -0
- package/lib/modules/ai-question/useAiQuestion.d.ts +1 -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/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 +3 -3
- 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/index.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +2 -2
- 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/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 +2 -2
- package/lib/modules/ai-report/interface.d.ts +6 -0
- package/lib/modules/ai-template/components/TemplateList/styled.d.ts +3 -3
- package/lib/modules/ai-template/components/TemplateMenu/styled.d.ts +1 -1
- 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/global-store.d.ts +3 -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
|
@@ -47,7 +47,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
47
47
|
};
|
|
48
48
|
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
49
49
|
import { useInterviewRoomStore } from "../../../../store/ai-question/interview-room-store";
|
|
50
|
-
import { DISABLED_REPEAT_TYPE, IS_AI_ANALYSIS, QUESTION_TYPE_TITLE_MAP, TEST_TYPE_READONLY } from "../../../../constants/ai-question";
|
|
50
|
+
import { DISABLED_REPEAT_TYPE, IS_AI_ANALYSIS, IS_AI_FOLLOW_UP, QUESTION_TYPE_TITLE_MAP, TEST_TYPE_READONLY } from "../../../../constants/ai-question";
|
|
51
51
|
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
52
52
|
import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
|
|
53
53
|
import { getSecondToTime } from "../../../../utils/utils";
|
|
@@ -60,11 +60,11 @@ var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Ar
|
|
|
60
60
|
{ label: '直到充分为止', value: -1 },
|
|
61
61
|
], false);
|
|
62
62
|
var QuestionModelListItem = function (props) {
|
|
63
|
-
var
|
|
63
|
+
var interactionMethods = useInterviewRoomStore().interactionMethods;
|
|
64
64
|
var index = props.index, disabledWeight = props.disabledWeight, steps = props.steps, step = __rest(props, ["index", "disabledWeight", "steps"]);
|
|
65
65
|
var token = step.token, name = step.name, questions = step.questions, duration = step.duration, weight = step.weight, type = step.type, aiShowType = step.aiShowType, aiType = step.aiType, answerStatus = step.answerStatus, category = step.category, isOpenAIFollowUp = step.isOpenAIFollowUp, followUpMaximum = step.followUpMaximum;
|
|
66
66
|
var isAiAnalysis = IS_AI_ANALYSIS(step);
|
|
67
|
-
var
|
|
67
|
+
var _a = useQuestionModelStore(), editModel = _a.editModel, removeModel = _a.removeModel, updateModelWeight = _a.updateModelWeight;
|
|
68
68
|
var updateQuestionState = useUpdateQuestionStore().updateQuestionState;
|
|
69
69
|
var handleEdit = useCallback(function () {
|
|
70
70
|
updateQuestionState({ open: true, token: token, index: index, aiShowType: aiShowType, item: step });
|
|
@@ -113,6 +113,6 @@ var QuestionModelListItem = function (props) {
|
|
|
113
113
|
}, [questions]);
|
|
114
114
|
return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsx(Box, __assign({ display: "flex", borderBottom: !DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: _jsxs(Box, __assign({ flex: "1 0", padding: "8px 0px 16px 16px" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsxs(Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium" }, { children: ["\u9898\u76EE", index + 1] })), _jsx(Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: _jsx(DragHandleIcon, { className: "dragHandle" }) })), _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, {}) }))] }))] })), _jsx(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: _jsxs(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [_jsxs(Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium", mr: 0.5 }, { children: ["[", QUESTION_TYPE_TITLE_MAP[aiShowType], "]"] })), _jsx(Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
|
|
115
115
|
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) })));
|
|
116
|
-
}), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && _jsx(Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), _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))] }))] }))] })) })), (!DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), 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) && (_jsxs(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 }),
|
|
116
|
+
}), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && _jsx(Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), _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))] }))] }))] })) })), (!DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), 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) && (_jsxs(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 }), IS_AI_FOLLOW_UP(step, interactionMethods) && (_jsx(Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: _jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [_jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), isOpenAIFollowUp && (_jsx(Select, { sx: { height: 'auto', width: 134 }, size: "small", value: followUpMaximum, options: options, onChange: handleOpenAIFollowUpMaximum }))] })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
|
|
117
117
|
};
|
|
118
118
|
export default memo(QuestionModelListItem);
|
|
@@ -52,7 +52,7 @@ var Question = function () {
|
|
|
52
52
|
postAiModelDetails();
|
|
53
53
|
}
|
|
54
54
|
else {
|
|
55
|
-
updateModel({ name: name || '暂无名称', token: '', duration: 0, steps: [], interactionMethods: [] });
|
|
55
|
+
updateModel({ name: name || '暂无名称', token: '', aiModel: '', duration: 0, steps: [], interactionMethods: [] });
|
|
56
56
|
}
|
|
57
57
|
}, [name, token, postAiModelDetails, updateModel]);
|
|
58
58
|
useEffect(function () {
|
|
@@ -5,7 +5,7 @@ export declare const PreviewRoot: import("@emotion/styled").StyledComponent<{
|
|
|
5
5
|
elevation?: number | undefined;
|
|
6
6
|
square?: boolean | undefined;
|
|
7
7
|
sx?: import("@mui/system/styleFunctionSx").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
|
|
8
|
-
variant?: "
|
|
8
|
+
variant?: "outlined" | "elevation" | undefined;
|
|
9
9
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
10
10
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
11
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "
|
|
11
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "elevation" | "square"> & import("@mui/system/createStyled").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
@@ -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';
|
|
@@ -53,14 +54,14 @@ var VideoVoice = function () {
|
|
|
53
54
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(questons), false) }));
|
|
54
55
|
}, videoUrl: q.videoUrl })), _jsx(VideoVoiceUploader, { index: index, questions: form.values.questions, setQuestions: function (qs) {
|
|
55
56
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(qs), false) }));
|
|
56
|
-
} })] })), _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: {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
} })] })), _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: {
|
|
58
|
+
rows: 3,
|
|
59
|
+
multiline: true,
|
|
60
|
+
placeholder: '面试内容(系统将根据此内容向候选人进行语音播报)',
|
|
61
|
+
sx: { padding: 0 },
|
|
62
|
+
}, sx: { flexGrow: 1 } }), form.values.questions.length > 1 && (_jsx(Box, __assign({ height: 84, pt: 1 }, { children: _jsx(IconButton, __assign({ size: "small", onClick: function () {
|
|
63
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions.filter(function (_, i) { return i !== index; })), false) }));
|
|
64
|
+
} }, { children: _jsx(CloseIcon, {}) })) })))] })), _jsx(FllowupSetting, { index: index, form: form })] }))] }), index)); });
|
|
64
65
|
} }));
|
|
65
66
|
};
|
|
66
67
|
export default VideoVoice;
|
|
@@ -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
|
+
}
|
|
@@ -7,6 +7,7 @@ export declare const useAiQuestion: (props: AiQuestionProps) => {
|
|
|
7
7
|
handleTemplate: ((steps: import("./components/QuestionModel/interface").QuestionModelStep[]) => void) | undefined;
|
|
8
8
|
token: string;
|
|
9
9
|
name?: string | undefined;
|
|
10
|
+
aiModel?: string | undefined;
|
|
10
11
|
extraAbilityTokens?: string[] | undefined;
|
|
11
12
|
templateList?: import("./components/QuestionModel/interface").QuestionModelStep[] | undefined;
|
|
12
13
|
mediaList?: {
|