eli-video-interview 1.2.3-5.alpha.7 → 1.2.3-5.alpha.8
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/constants/ai-question.js +1 -1
- package/esm/modules/ai-question/components/BootVideo/index.js +2 -2
- package/esm/modules/ai-question/components/QuestionModel/Item.js +1 -1
- package/esm/modules/ai-question/components/QuestionModel/List.js +1 -1
- package/esm/store/ai-ability-select/question-ability-store.js +5 -1
- package/esm/store/ai-question/question-model-store.js +3 -3
- package/lib/constants/ai-question.js +1 -1
- package/lib/modules/ai-question/components/BootVideo/index.js +1 -1
- package/lib/modules/ai-question/components/QuestionModel/Item.js +1 -1
- package/lib/modules/ai-question/components/QuestionModel/List.js +1 -1
- package/lib/store/ai-ability-select/question-ability-store.js +5 -1
- package/lib/store/ai-question/question-model-store.js +3 -3
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ import { PostCommonUpload } from "../../../../services/ai-question";
|
|
|
27
27
|
import { useBootVideoStore } from "../../../../store/ai-question/boot-video-store";
|
|
28
28
|
import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
|
|
29
29
|
import { useRequest, useSetState } from 'ahooks';
|
|
30
|
-
import { AddIcon, Box, Button, Checkbox, Dialog,
|
|
30
|
+
import { AddIcon, Box, Button, Checkbox, Dialog, Message, Radio, RadioGroup, Typography, Upload } from 'fbm-ui';
|
|
31
31
|
import { Stack } from 'fbm-ui/lib/mui';
|
|
32
32
|
import { useCallback, useEffect, useState } from 'react';
|
|
33
33
|
var BootVideo = function (props) {
|
|
@@ -108,6 +108,6 @@ var BootVideo = function (props) {
|
|
|
108
108
|
return (_jsx(Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", onClose: onClose, onOk: handleOk, width: 768 }, { children: _jsx(ScrollDialogContent, { children: _jsxs(Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between' } }, { children: [_jsxs(Stack, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), _jsx(RadioGroup, __assign({ defaultValue: "outlined", value: 1 }, { children: _jsx(Radio, { value: "1", label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }) })), _jsx(Typography, __assign({ variant: "body1", fontWeight: 500, mt: 3, mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), _jsx(CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
|
|
109
109
|
var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
|
|
110
110
|
return (_jsx("img", { src: frameUrl, style: { borderColor: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
|
|
111
|
-
}) }), _jsx(Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 344, color: "text.disabled", mb: 2, mt: 1 }, { children: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm" })), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [
|
|
111
|
+
}) }), _jsx(Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 344, color: "text.disabled", mb: 2, mt: 1 }, { children: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm" })), _jsxs(Stack, __assign({ direction: "row", alignItems: "center" }, { children: [_jsx(CustomUploadButtonRoot, { children: _jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })) }), _jsx(Box, __assign({ ml: 2 }, { children: _jsx(Checkbox, { checked: mediaState.appliedAllPosition, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5E94\u7528\u5230\u6240\u6709AI\u89C6\u9891" })), onChange: function (e, checked) { return setMediaState({ appliedAllPosition: checked }); } }) }))] }))] }), _jsx(Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? (_jsx(Box, __assign({ loading: loading, sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: _jsx("video", { width: 160, height: 286, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : (_jsx(Upload, __assign({}, uploadProps, { children: _jsxs(CustomUploadCardRoot, { children: [_jsxs(CustomUploadCardTitle, { children: [_jsx(SvgIcon, { name: "video" }), _jsx(Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), _jsx(Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))) }))] })) }) })));
|
|
112
112
|
};
|
|
113
113
|
export default BootVideo;
|
|
@@ -74,6 +74,6 @@ var QuestionModelListItem = function (props) {
|
|
|
74
74
|
}, [questions]);
|
|
75
75
|
return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsxs(Box, __assign({ display: "flex", borderBottom: "1px solid rgba(0, 0, 0, 0.08)" }, { children: [_jsx(Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: _jsx(DragIndicatorIcon, { className: "dragHandle" }) })), _jsxs(Box, __assign({ flex: "1 0", padding: "16px 0" }, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [_jsxs(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
|
|
76
76
|
return label && (_jsx(Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: _jsx(Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
|
|
77
|
-
}), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } })
|
|
77
|
+
}), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } })] })), _jsxs(Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!TEST_TYPE_READONLY.includes(type) && (_jsx(IconButton, __assign({ size: "small", onClick: handleEdit }, { children: _jsx(EditIcon, {}) }))), _jsx(IconButton, __assign({ size: "small", onClick: handleRemove }, { children: _jsx(DeleteIcon, {}) }))] }))] })), _jsxs(Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), _jsxs(Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", getSecondToTime(Number(duration))] }))] }))] }))] })), _jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 40px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 82 }, size: "small", value: weight, endAdornment: "%", disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), _jsx(Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsx(Stack, __assign({ direction: "row" }, { children: _jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }) })))] }))] })));
|
|
78
78
|
};
|
|
79
79
|
export default memo(QuestionModelListItem);
|
|
@@ -47,7 +47,7 @@ var QuestionModelList = function () {
|
|
|
47
47
|
var combineTokens = selctedAbilitys.length > 0 ? selctedAbilitys : aiAbilityList.filter(function (v) { return v.isAI; }).map(function (item) { return item.token; });
|
|
48
48
|
console.log(combineTokens);
|
|
49
49
|
var random = aiEvaluationData[0].list.filter(function (item) { return combineTokens === null || combineTokens === void 0 ? void 0 : combineTokens.includes(item === null || item === void 0 ? void 0 : item.token); }).map(function (v) { return v.list; }) || [];
|
|
50
|
-
handleUseQuestion(random.map(function (item) { return item[Math.floor(Math.random() * item.length)]; }));
|
|
50
|
+
handleUseQuestion(random.map(function (item) { return (__assign(__assign({}, item[Math.floor(Math.random() * item.length)]), { weight: (100 / combineTokens.length).toFixed(2) })); }));
|
|
51
51
|
}, [aiAbilityList, aiEvaluationData, handleUseQuestion, selctedAbilitys]);
|
|
52
52
|
useEffect(function () {
|
|
53
53
|
if (steps) {
|
|
@@ -3,7 +3,11 @@ import { createGlobalStore } from 'hox';
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
export var useAiAbilityListStore = (_a = createGlobalStore(function () {
|
|
5
5
|
var _a = useState([]), aiAbilityList = _a[0], setAiAbilityList = _a[1];
|
|
6
|
-
var _b = useState([
|
|
6
|
+
var _b = useState([
|
|
7
|
+
'5j7aylYmY1b2syzKbal3RS0P80',
|
|
8
|
+
'V8aFzLMHHw3j3bNyAgiDRS0P80',
|
|
9
|
+
'c3RANdCHEAP597Gzf0OWRS0P80',
|
|
10
|
+
]), selctedAbilitys = _b[0], setSelctedAbilitys = _b[1];
|
|
7
11
|
return {
|
|
8
12
|
selctedAbilitys: selctedAbilitys,
|
|
9
13
|
setSelctedAbilitys: setSelctedAbilitys,
|
|
@@ -10,11 +10,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
var _a;
|
|
13
|
-
import { useCallback, useState } from 'react';
|
|
14
|
-
import { createGlobalStore } from 'hox';
|
|
15
|
-
import update from 'immutability-helper';
|
|
16
13
|
import { IS_AI_ANALYSIS } from "../../constants/ai-question";
|
|
17
14
|
import { computeDecimalValue, formatNumberDecimal, uniqueId } from "../../utils/utils";
|
|
15
|
+
import { createGlobalStore } from 'hox';
|
|
16
|
+
import update from 'immutability-helper';
|
|
17
|
+
import { useCallback, useState } from 'react';
|
|
18
18
|
export var useQuestionModelStore = (_a = createGlobalStore(function () {
|
|
19
19
|
var _a = useState(), questionModelData = _a[0], updateModel = _a[1];
|
|
20
20
|
var _b = (questionModelData || {}).steps, steps = _b === void 0 ? [] : _b;
|
|
@@ -113,6 +113,6 @@ var BootVideo = function (props) {
|
|
|
113
113
|
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", onClose: onClose, onOk: handleOk, width: 768 }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between' } }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.RadioGroup, __assign({ defaultValue: "outlined", value: 1 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: "1", label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500, mt: 3, mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
|
|
114
114
|
var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
|
|
115
115
|
return ((0, jsx_runtime_1.jsx)("img", { src: frameUrl, style: { borderColor: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
|
|
116
|
-
}) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 344, color: "text.disabled", mb: 2, mt: 1 }, { children: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm" })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.
|
|
116
|
+
}) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", width: 344, color: "text.disabled", mb: 2, mt: 1 }, { children: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm" })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(styled_1.CustomUploadButtonRoot, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ ml: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: mediaState.appliedAllPosition, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u5E94\u7528\u5230\u6240\u6709AI\u89C6\u9891" })), onChange: function (e, checked) { return setMediaState({ appliedAllPosition: checked }); } }) }))] }))] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto', flexGrow: 1 } }, { children: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: loading, sx: { width: 160, height: 286, margin: 'auto', cursor: 'pointer' } }, { children: (0, jsx_runtime_1.jsx)("video", { width: 160, height: 286, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsxs)(styled_1.CustomUploadCardRoot, { children: [(0, jsx_runtime_1.jsxs)(styled_1.CustomUploadCardTitle, { children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.default, { name: "video" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))) }))] })) }) })));
|
|
117
117
|
};
|
|
118
118
|
exports.default = BootVideo;
|
|
@@ -76,6 +76,6 @@ var QuestionModelListItem = function (props) {
|
|
|
76
76
|
}, [questions]);
|
|
77
77
|
return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", borderBottom: "1px solid rgba(0, 0, 0, 0.08)" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DragIndicatorIcon, { className: "dragHandle" }) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", padding: "16px 0" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
|
|
78
78
|
return label && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
|
|
79
|
-
}), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } })
|
|
79
|
+
}), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } })] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!ai_question_1.TEST_TYPE_READONLY.includes(type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleEdit }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))] }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", (0, utils_1.getSecondToTime)(Number(duration))] }))] }))] }))] })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 40px" }, { children: isAiAnalysis && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 82 }, size: "small", value: weight, endAdornment: "%", disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) && ((0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }) })))] }))] })));
|
|
80
80
|
};
|
|
81
81
|
exports.default = (0, react_1.memo)(QuestionModelListItem);
|
|
@@ -52,7 +52,7 @@ var QuestionModelList = function () {
|
|
|
52
52
|
var combineTokens = selctedAbilitys.length > 0 ? selctedAbilitys : aiAbilityList.filter(function (v) { return v.isAI; }).map(function (item) { return item.token; });
|
|
53
53
|
console.log(combineTokens);
|
|
54
54
|
var random = aiEvaluationData[0].list.filter(function (item) { return combineTokens === null || combineTokens === void 0 ? void 0 : combineTokens.includes(item === null || item === void 0 ? void 0 : item.token); }).map(function (v) { return v.list; }) || [];
|
|
55
|
-
handleUseQuestion(random.map(function (item) { return item[Math.floor(Math.random() * item.length)]; }));
|
|
55
|
+
handleUseQuestion(random.map(function (item) { return (__assign(__assign({}, item[Math.floor(Math.random() * item.length)]), { weight: (100 / combineTokens.length).toFixed(2) })); }));
|
|
56
56
|
}, [aiAbilityList, aiEvaluationData, handleUseQuestion, selctedAbilitys]);
|
|
57
57
|
(0, react_1.useEffect)(function () {
|
|
58
58
|
if (steps) {
|
|
@@ -6,7 +6,11 @@ var hox_1 = require("hox");
|
|
|
6
6
|
var react_1 = require("react");
|
|
7
7
|
exports.useAiAbilityListStore = (_a = (0, hox_1.createGlobalStore)(function () {
|
|
8
8
|
var _a = (0, react_1.useState)([]), aiAbilityList = _a[0], setAiAbilityList = _a[1];
|
|
9
|
-
var _b = (0, react_1.useState)([
|
|
9
|
+
var _b = (0, react_1.useState)([
|
|
10
|
+
'5j7aylYmY1b2syzKbal3RS0P80',
|
|
11
|
+
'V8aFzLMHHw3j3bNyAgiDRS0P80',
|
|
12
|
+
'c3RANdCHEAP597Gzf0OWRS0P80',
|
|
13
|
+
]), selctedAbilitys = _b[0], setSelctedAbilitys = _b[1];
|
|
10
14
|
return {
|
|
11
15
|
selctedAbilitys: selctedAbilitys,
|
|
12
16
|
setSelctedAbilitys: setSelctedAbilitys,
|
|
@@ -16,11 +16,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
var _a;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.getQuestionModelStore = exports.useQuestionModelStore = void 0;
|
|
19
|
-
var react_1 = require("react");
|
|
20
|
-
var hox_1 = require("hox");
|
|
21
|
-
var immutability_helper_1 = __importDefault(require("immutability-helper"));
|
|
22
19
|
var ai_question_1 = require("../../constants/ai-question");
|
|
23
20
|
var utils_1 = require("../../utils/utils");
|
|
21
|
+
var hox_1 = require("hox");
|
|
22
|
+
var immutability_helper_1 = __importDefault(require("immutability-helper"));
|
|
23
|
+
var react_1 = require("react");
|
|
24
24
|
exports.useQuestionModelStore = (_a = (0, hox_1.createGlobalStore)(function () {
|
|
25
25
|
var _a = (0, react_1.useState)(), questionModelData = _a[0], updateModel = _a[1];
|
|
26
26
|
var _b = (questionModelData || {}).steps, steps = _b === void 0 ? [] : _b;
|