eli-video-interview 1.2.39 → 1.2.40-alpha.10
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/Photo.css +14 -0
- package/esm/components/react-photo-view/Photo.d.ts +18 -0
- package/esm/components/react-photo-view/Photo.js +54 -0
- package/esm/components/react-photo-view/PhotoBox.css +18 -0
- package/esm/components/react-photo-view/PhotoBox.d.ts +22 -0
- package/esm/components/react-photo-view/PhotoBox.js +302 -0
- package/esm/components/react-photo-view/PhotoPage.d.ts +9 -0
- package/esm/components/react-photo-view/PhotoPage.js +77 -0
- package/esm/components/react-photo-view/PhotoProvider.d.ts +14 -0
- package/esm/components/react-photo-view/PhotoProvider.js +98 -0
- package/esm/components/react-photo-view/PhotoSlider.css +125 -0
- package/esm/components/react-photo-view/PhotoSlider.d.ts +12 -0
- package/esm/components/react-photo-view/PhotoSlider.js +262 -0
- package/esm/components/react-photo-view/PhotoView.d.ts +30 -0
- package/esm/components/react-photo-view/PhotoView.js +48 -0
- package/esm/components/react-photo-view/components/ArrowLeft.d.ts +3 -0
- package/esm/components/react-photo-view/components/ArrowLeft.js +18 -0
- package/esm/components/react-photo-view/components/ArrowRight.d.ts +3 -0
- package/esm/components/react-photo-view/components/ArrowRight.js +18 -0
- package/esm/components/react-photo-view/components/CloseIcon.d.ts +3 -0
- package/esm/components/react-photo-view/components/CloseIcon.js +16 -0
- package/esm/components/react-photo-view/components/PreventScroll.d.ts +1 -0
- package/esm/components/react-photo-view/components/PreventScroll.js +12 -0
- package/esm/components/react-photo-view/components/SlidePortal.css +10 -0
- package/esm/components/react-photo-view/components/SlidePortal.d.ts +7 -0
- package/esm/components/react-photo-view/components/SlidePortal.js +30 -0
- package/esm/components/react-photo-view/components/Spinner.css +23 -0
- package/esm/components/react-photo-view/components/Spinner.d.ts +4 -0
- package/esm/components/react-photo-view/components/Spinner.js +29 -0
- package/esm/components/react-photo-view/hooks/useAdjacentImages.d.ts +5 -0
- package/esm/components/react-photo-view/hooks/useAdjacentImages.js +14 -0
- package/esm/components/react-photo-view/hooks/useAnimationOrigin.d.ts +6 -0
- package/esm/components/react-photo-view/hooks/useAnimationOrigin.js +72 -0
- package/esm/components/react-photo-view/hooks/useAnimationPosition.d.ts +2 -0
- package/esm/components/react-photo-view/hooks/useAnimationPosition.js +28 -0
- package/esm/components/react-photo-view/hooks/useAnimationVisible.d.ts +6 -0
- package/esm/components/react-photo-view/hooks/useAnimationVisible.js +49 -0
- package/esm/components/react-photo-view/hooks/useContinuousTap.d.ts +8 -0
- package/esm/components/react-photo-view/hooks/useContinuousTap.js +36 -0
- package/esm/components/react-photo-view/hooks/useDebounceCallback.d.ts +10 -0
- package/esm/components/react-photo-view/hooks/useDebounceCallback.js +48 -0
- package/esm/components/react-photo-view/hooks/useEventListener.d.ts +1 -0
- package/esm/components/react-photo-view/hooks/useEventListener.js +18 -0
- package/esm/components/react-photo-view/hooks/useForkedVariable.d.ts +5 -0
- package/esm/components/react-photo-view/hooks/useForkedVariable.js +17 -0
- package/esm/components/react-photo-view/hooks/useInitial.d.ts +1 -0
- package/esm/components/react-photo-view/hooks/useInitial.js +9 -0
- package/esm/components/react-photo-view/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/esm/components/react-photo-view/hooks/useIsomorphicLayoutEffect.js +3 -0
- package/esm/components/react-photo-view/hooks/useMethods.d.ts +4 -0
- package/esm/components/react-photo-view/hooks/useMethods.js +35 -0
- package/esm/components/react-photo-view/hooks/useMountedRef.d.ts +3 -0
- package/esm/components/react-photo-view/hooks/useMountedRef.js +12 -0
- package/esm/components/react-photo-view/hooks/useScrollPosition.d.ts +4 -0
- package/esm/components/react-photo-view/hooks/useScrollPosition.js +157 -0
- package/esm/components/react-photo-view/hooks/useSetState.d.ts +2 -0
- package/esm/components/react-photo-view/hooks/useSetState.js +15 -0
- package/esm/components/react-photo-view/hooks/useTargetScale.d.ts +4 -0
- package/esm/components/react-photo-view/hooks/useTargetScale.js +70 -0
- package/esm/components/react-photo-view/index.d.ts +4 -0
- package/esm/components/react-photo-view/index.js +4 -0
- package/esm/components/react-photo-view/photo-context.d.ts +11 -0
- package/esm/components/react-photo-view/photo-context.js +2 -0
- package/esm/components/react-photo-view/types.d.ts +196 -0
- package/esm/components/react-photo-view/types.js +1 -0
- package/esm/components/react-photo-view/utils/edgeHandle.d.ts +15 -0
- package/esm/components/react-photo-view/utils/edgeHandle.js +40 -0
- package/esm/components/react-photo-view/utils/getMultipleTouchPosition.d.ts +5 -0
- package/esm/components/react-photo-view/utils/getMultipleTouchPosition.js +11 -0
- package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.d.ts +9 -0
- package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.js +31 -0
- package/esm/components/react-photo-view/utils/getRotateSize.d.ts +4 -0
- package/esm/components/react-photo-view/utils/getRotateSize.js +11 -0
- package/esm/components/react-photo-view/utils/getSuitableImageSize.d.ts +10 -0
- package/esm/components/react-photo-view/utils/getSuitableImageSize.js +42 -0
- package/esm/components/react-photo-view/utils/isTouchDevice.d.ts +5 -0
- package/esm/components/react-photo-view/utils/isTouchDevice.js +5 -0
- package/esm/components/react-photo-view/utils/limitTarget.d.ts +5 -0
- package/esm/components/react-photo-view/utils/limitTarget.js +12 -0
- package/esm/components/react-photo-view/variables.d.ts +48 -0
- package/esm/components/react-photo-view/variables.js +48 -0
- package/esm/constants/ai-question.d.ts +9 -0
- package/esm/constants/ai-question.js +33 -4
- package/esm/enum/ai-question.d.ts +5 -2
- package/esm/enum/ai-question.js +3 -0
- package/esm/modules/ai-ability/Root.js +15 -4
- package/esm/modules/ai-ability-select/Root.js +2 -2
- package/esm/modules/ai-ability-select/interface.d.ts +1 -0
- package/esm/modules/ai-question/components/AiAnalysis/index.js +4 -1
- package/esm/modules/ai-question/components/BootVideo/index.js +1 -1
- package/esm/modules/ai-question/components/QuestionModel/Item.js +14 -9
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +17 -6
- package/esm/modules/ai-question/components/QuestionUpdate/Chioce.d.ts +17 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Chioce.js +97 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +37 -12
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +14 -4
- package/esm/modules/ai-question/components/QuestionUpdate/Score.d.ts +15 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Score.js +53 -0
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +4 -0
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +35 -17
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +10 -0
- package/esm/modules/ai-question/components/QuestionUpdate/styled.d.ts +15 -0
- package/esm/modules/ai-question/components/QuestionUpdate/styled.js +56 -1
- package/esm/modules/ai-report/Root.js +1 -1
- package/esm/modules/ai-report/components/ScoreReport/Score.js +4 -1
- package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +5 -3
- package/esm/modules/ai-report/components/VideoQuestion/BodyImages.d.ts +7 -0
- package/esm/modules/ai-report/components/VideoQuestion/BodyImages.js +40 -0
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +9 -4
- package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.js +4 -4
- package/esm/modules/ai-report/components/VideoQuestion/SingleChoice.d.ts +8 -0
- package/esm/modules/ai-report/components/VideoQuestion/SingleChoice.js +31 -0
- package/esm/modules/ai-report/components/VideoQuestion/index.js +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/interface.d.ts +2 -0
- package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -0
- package/esm/modules/ai-report/components/VideoQuestion/styled.js +7 -1
- package/esm/modules/ai-report/interface.d.ts +19 -0
- package/esm/services/ai-ability.d.ts +1 -1
- package/esm/services/ai-ability.js +1 -1
- package/esm/store/ai-question/ai-analysis-store.js +0 -1
- package/lib/components/react-photo-view/Photo.css +14 -0
- package/lib/components/react-photo-view/Photo.d.ts +18 -0
- package/lib/components/react-photo-view/Photo.js +60 -0
- package/lib/components/react-photo-view/PhotoBox.css +18 -0
- package/lib/components/react-photo-view/PhotoBox.d.ts +22 -0
- package/lib/components/react-photo-view/PhotoBox.js +308 -0
- package/lib/components/react-photo-view/PhotoPage.d.ts +9 -0
- package/lib/components/react-photo-view/PhotoPage.js +79 -0
- package/lib/components/react-photo-view/PhotoProvider.d.ts +14 -0
- package/lib/components/react-photo-view/PhotoProvider.js +104 -0
- package/lib/components/react-photo-view/PhotoSlider.css +125 -0
- package/lib/components/react-photo-view/PhotoSlider.d.ts +12 -0
- package/lib/components/react-photo-view/PhotoSlider.js +268 -0
- package/lib/components/react-photo-view/PhotoView.d.ts +30 -0
- package/lib/components/react-photo-view/PhotoView.js +53 -0
- package/lib/components/react-photo-view/components/ArrowLeft.d.ts +3 -0
- package/lib/components/react-photo-view/components/ArrowLeft.js +20 -0
- package/lib/components/react-photo-view/components/ArrowRight.d.ts +3 -0
- package/lib/components/react-photo-view/components/ArrowRight.js +20 -0
- package/lib/components/react-photo-view/components/CloseIcon.d.ts +3 -0
- package/lib/components/react-photo-view/components/CloseIcon.js +18 -0
- package/lib/components/react-photo-view/components/PreventScroll.d.ts +1 -0
- package/lib/components/react-photo-view/components/PreventScroll.js +15 -0
- package/lib/components/react-photo-view/components/SlidePortal.css +10 -0
- package/lib/components/react-photo-view/components/SlidePortal.d.ts +7 -0
- package/lib/components/react-photo-view/components/SlidePortal.js +32 -0
- package/lib/components/react-photo-view/components/Spinner.css +23 -0
- package/lib/components/react-photo-view/components/Spinner.d.ts +4 -0
- package/lib/components/react-photo-view/components/Spinner.js +31 -0
- package/lib/components/react-photo-view/hooks/useAdjacentImages.d.ts +5 -0
- package/lib/components/react-photo-view/hooks/useAdjacentImages.js +17 -0
- package/lib/components/react-photo-view/hooks/useAnimationOrigin.d.ts +6 -0
- package/lib/components/react-photo-view/hooks/useAnimationOrigin.js +78 -0
- package/lib/components/react-photo-view/hooks/useAnimationPosition.d.ts +2 -0
- package/lib/components/react-photo-view/hooks/useAnimationPosition.js +34 -0
- package/lib/components/react-photo-view/hooks/useAnimationVisible.d.ts +6 -0
- package/lib/components/react-photo-view/hooks/useAnimationVisible.js +55 -0
- package/lib/components/react-photo-view/hooks/useContinuousTap.d.ts +8 -0
- package/lib/components/react-photo-view/hooks/useContinuousTap.js +42 -0
- package/lib/components/react-photo-view/hooks/useDebounceCallback.d.ts +10 -0
- package/lib/components/react-photo-view/hooks/useDebounceCallback.js +51 -0
- package/lib/components/react-photo-view/hooks/useEventListener.d.ts +1 -0
- package/lib/components/react-photo-view/hooks/useEventListener.js +21 -0
- package/lib/components/react-photo-view/hooks/useForkedVariable.d.ts +5 -0
- package/lib/components/react-photo-view/hooks/useForkedVariable.js +20 -0
- package/lib/components/react-photo-view/hooks/useInitial.d.ts +1 -0
- package/lib/components/react-photo-view/hooks/useInitial.js +12 -0
- package/lib/components/react-photo-view/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/lib/components/react-photo-view/hooks/useIsomorphicLayoutEffect.js +5 -0
- package/lib/components/react-photo-view/hooks/useMethods.d.ts +4 -0
- package/lib/components/react-photo-view/hooks/useMethods.js +38 -0
- package/lib/components/react-photo-view/hooks/useMountedRef.d.ts +3 -0
- package/lib/components/react-photo-view/hooks/useMountedRef.js +14 -0
- package/lib/components/react-photo-view/hooks/useScrollPosition.d.ts +4 -0
- package/lib/components/react-photo-view/hooks/useScrollPosition.js +163 -0
- package/lib/components/react-photo-view/hooks/useSetState.d.ts +2 -0
- package/lib/components/react-photo-view/hooks/useSetState.js +18 -0
- package/lib/components/react-photo-view/hooks/useTargetScale.d.ts +4 -0
- package/lib/components/react-photo-view/hooks/useTargetScale.js +76 -0
- package/lib/components/react-photo-view/index.d.ts +4 -0
- package/lib/components/react-photo-view/index.js +12 -0
- package/lib/components/react-photo-view/photo-context.d.ts +11 -0
- package/lib/components/react-photo-view/photo-context.js +4 -0
- package/lib/components/react-photo-view/types.d.ts +196 -0
- package/lib/components/react-photo-view/types.js +2 -0
- package/lib/components/react-photo-view/utils/edgeHandle.d.ts +15 -0
- package/lib/components/react-photo-view/utils/edgeHandle.js +45 -0
- package/lib/components/react-photo-view/utils/getMultipleTouchPosition.d.ts +5 -0
- package/lib/components/react-photo-view/utils/getMultipleTouchPosition.js +14 -0
- package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.d.ts +9 -0
- package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.js +34 -0
- package/lib/components/react-photo-view/utils/getRotateSize.d.ts +4 -0
- package/lib/components/react-photo-view/utils/getRotateSize.js +14 -0
- package/lib/components/react-photo-view/utils/getSuitableImageSize.d.ts +10 -0
- package/lib/components/react-photo-view/utils/getSuitableImageSize.js +48 -0
- package/lib/components/react-photo-view/utils/isTouchDevice.d.ts +5 -0
- package/lib/components/react-photo-view/utils/isTouchDevice.js +7 -0
- package/lib/components/react-photo-view/utils/limitTarget.d.ts +5 -0
- package/lib/components/react-photo-view/utils/limitTarget.js +17 -0
- package/lib/components/react-photo-view/variables.d.ts +48 -0
- package/lib/components/react-photo-view/variables.js +51 -0
- package/lib/constants/ai-question.d.ts +9 -0
- package/lib/constants/ai-question.js +34 -5
- package/lib/enum/ai-question.d.ts +5 -2
- package/lib/enum/ai-question.js +3 -0
- package/lib/modules/ai-ability/Root.js +15 -4
- package/lib/modules/ai-ability-select/Root.js +2 -2
- package/lib/modules/ai-ability-select/interface.d.ts +1 -0
- package/lib/modules/ai-question/components/AiAnalysis/index.js +4 -1
- package/lib/modules/ai-question/components/BootVideo/index.js +1 -1
- package/lib/modules/ai-question/components/QuestionModel/Item.js +11 -6
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +15 -4
- package/lib/modules/ai-question/components/QuestionUpdate/Chioce.d.ts +17 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Chioce.js +104 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +35 -10
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +12 -2
- package/lib/modules/ai-question/components/QuestionUpdate/Score.d.ts +15 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Score.js +57 -0
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +4 -0
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +34 -16
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +10 -0
- package/lib/modules/ai-question/components/QuestionUpdate/styled.d.ts +15 -0
- package/lib/modules/ai-question/components/QuestionUpdate/styled.js +56 -1
- package/lib/modules/ai-report/Root.js +1 -1
- package/lib/modules/ai-report/components/ScoreReport/Score.js +4 -1
- package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +5 -3
- package/lib/modules/ai-report/components/VideoQuestion/BodyImages.d.ts +7 -0
- package/lib/modules/ai-report/components/VideoQuestion/BodyImages.js +45 -0
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +8 -3
- package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.js +4 -4
- package/lib/modules/ai-report/components/VideoQuestion/SingleChoice.d.ts +8 -0
- package/lib/modules/ai-report/components/VideoQuestion/SingleChoice.js +33 -0
- package/lib/modules/ai-report/components/VideoQuestion/index.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/interface.d.ts +2 -0
- package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -0
- package/lib/modules/ai-report/components/VideoQuestion/styled.js +8 -2
- package/lib/modules/ai-report/interface.d.ts +19 -0
- package/lib/services/ai-ability.d.ts +1 -1
- package/lib/services/ai-ability.js +1 -1
- package/lib/store/ai-question/ai-analysis-store.js +0 -1
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
import { ScoreInput } from './styled';
|
|
25
|
+
import { Typography } from 'fbm-ui';
|
|
26
|
+
import { useField } from 'formik';
|
|
27
|
+
/**
|
|
28
|
+
* 验证0-9的整数
|
|
29
|
+
*/
|
|
30
|
+
export var IS_INTEGER_REG = /^[0-9]\d*$/;
|
|
31
|
+
/**
|
|
32
|
+
* 可输入最大分值
|
|
33
|
+
*/
|
|
34
|
+
export var MAX_SCORE_VALUE = 100;
|
|
35
|
+
// rules={[({ value }) => VERIFICATION_SCORE(value as string)]}
|
|
36
|
+
// sx={{ height: 'auto', widht: 84 }}
|
|
37
|
+
// onChange={e => {
|
|
38
|
+
// const value = e.target.value;
|
|
39
|
+
// if (VERIFICATION_SCORE(value) || Number(value) > MAX_SCORE_VALUE || Number(value) < 1) {
|
|
40
|
+
// console.log('>>>>>>');
|
|
41
|
+
// return;
|
|
42
|
+
// }
|
|
43
|
+
// // onChange('options', [...(item?.options || []).map((v, index) => (i === index ? { ...v, score: Number(value) } : v))], index);
|
|
44
|
+
// }}
|
|
45
|
+
export var VERIFICATION_SCORE = function (value) { return (value ? !IS_INTEGER_REG.test(value) || Number(value) > MAX_SCORE_VALUE : false); };
|
|
46
|
+
var Score = function (_a) {
|
|
47
|
+
var label = _a.label, props = __rest(_a, ["label"]);
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
var _b = useField(props), field = _b[0], meta = _b[1], helpers = _b[2];
|
|
50
|
+
console.log(field, meta, helpers);
|
|
51
|
+
return (_jsx(_Fragment, { children: _jsx(ScoreInput, __assign({}, field, props, { size: "small", placeholder: "\u5206\u503C", endAdornment: _jsx(Typography, __assign({ variant: "caption" }, { children: "\u5206" })) })) }));
|
|
52
|
+
};
|
|
53
|
+
export default Score;
|
|
@@ -27,6 +27,8 @@ export var defaultQuestionParams = {
|
|
|
27
27
|
weight: 0,
|
|
28
28
|
token: '',
|
|
29
29
|
originToken: '',
|
|
30
|
+
isOpenAIFollowUp: false,
|
|
31
|
+
enableScoreOptimization: false,
|
|
30
32
|
};
|
|
31
33
|
// 播报方式
|
|
32
34
|
export var broadcastModeOptions = [
|
|
@@ -52,5 +54,7 @@ export var durationOptions = [
|
|
|
52
54
|
{ value: 30, label: '30s' },
|
|
53
55
|
{ value: 60, label: '1m' },
|
|
54
56
|
{ value: 180, label: '3m' },
|
|
57
|
+
{ value: 300, label: '5m' },
|
|
58
|
+
{ value: 600, label: '10m' },
|
|
55
59
|
{ value: 1200, label: '20m' },
|
|
56
60
|
];
|
|
@@ -56,12 +56,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
56
56
|
}
|
|
57
57
|
return t;
|
|
58
58
|
};
|
|
59
|
-
import { jsx as _jsx,
|
|
59
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
60
60
|
import { defaultQuestionParams } from './const';
|
|
61
61
|
import Form from './Form';
|
|
62
|
+
import { ADD_QUESTION_TYPE_SHOW_LIST, QUESTION_TYPE_TITLE_MAP } from "../../../../constants/ai-question";
|
|
63
|
+
import { ADD_QUESTION_TYPE, QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
62
64
|
import { useQuestionCollectionListStore } from "../../../../store/ai-ability/question-ability-store";
|
|
63
65
|
import ScrollDialogContent from "../../../../components/ScrollDialogContent";
|
|
64
|
-
import { ADD_QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
65
66
|
import { useAiAnalysisStore } from "../../../../store/ai-question/ai-analysis-store";
|
|
66
67
|
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
67
68
|
import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
|
|
@@ -93,18 +94,21 @@ var QuestionUpdate = function () {
|
|
|
93
94
|
category: (item === null || item === void 0 ? void 0 : item.category) ? { label: (item === null || item === void 0 ? void 0 : item.category[0]) || '', value: (item === null || item === void 0 ? void 0 : item.category[0]) || '' } : { label: '', value: '' },
|
|
94
95
|
};
|
|
95
96
|
var CustomHeader = function () {
|
|
96
|
-
var content =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
97
|
+
var content = ADD_QUESTION_TYPE_SHOW_LIST.map(function (_a) {
|
|
98
|
+
var title = _a.title, type = _a.type;
|
|
99
|
+
return (_jsx(MenuItem, __assign({ sx: { backgroundColor: aiShowType === type ? 'rgba(76, 175, 80, 0.08)' : 'rgba(255, 255, 255, 1)' }, onClick: function () {
|
|
100
|
+
var _a;
|
|
101
|
+
setSwitchTypeOpen(false);
|
|
102
|
+
(_a = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _a === void 0 ? void 0 : _a.setFormValues({ broadcastType: defaultQuestionParams.broadcastType });
|
|
103
|
+
if (type === ADD_QUESTION_TYPE.SINGLECHIOCE) {
|
|
104
|
+
updateQuestionState({ aiShowType: type, item: __assign(__assign({}, item), { type: QUESTION_TYPE.SINGLECHIOCE }) });
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
updateQuestionState({ aiShowType: type });
|
|
108
|
+
}
|
|
109
|
+
} }, { children: _jsx(Typography, __assign({ variant: "body2" }, { children: title })) }), "question_type_".concat(type)));
|
|
110
|
+
});
|
|
111
|
+
return (_jsxs(Box, __assign({ display: "flex", alignItems: "center", height: 56 }, { children: [_jsx(Typography, __assign({ ml: 3, variant: "subtitle1" }, { children: QUESTION_TYPE_TITLE_MAP[aiShowType] })), _jsx(Popover, __assign({ open: switchTypeOpen, content: content, onClickAway: function () { return setSwitchTypeOpen(false); } }, { children: _jsx(Button, __assign({ variant: "text", size: "small", sx: { fontSize: 12, color: 'rgb(87, 107, 149)' }, onClick: function () { return setSwitchTypeOpen(true); } }, { children: "\u5207\u6362\u9898\u578B" })) }))] })));
|
|
108
112
|
};
|
|
109
113
|
var getModelParams = useCallback(function (values, isSubmit) {
|
|
110
114
|
return new Promise(function (resolve, reject) {
|
|
@@ -184,9 +188,23 @@ var QuestionUpdate = function () {
|
|
|
184
188
|
}
|
|
185
189
|
});
|
|
186
190
|
}); }, [getModelParams, item, updateQuestionState]);
|
|
187
|
-
var handleOk = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
188
|
-
|
|
189
|
-
|
|
191
|
+
var handleOk = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
192
|
+
var _a;
|
|
193
|
+
return __generator(this, function (_b) {
|
|
194
|
+
switch (_b.label) {
|
|
195
|
+
case 0: return [4 /*yield*/, ((_a = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _a === void 0 ? void 0 : _a.handleSubmit())];
|
|
196
|
+
case 1:
|
|
197
|
+
_b.sent();
|
|
198
|
+
setTimeout(function () {
|
|
199
|
+
var _a;
|
|
200
|
+
if (Object.keys(((_a = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _a === void 0 ? void 0 : _a.errors()) || {}).length > 0) {
|
|
201
|
+
Message.error('有必填项未填');
|
|
202
|
+
}
|
|
203
|
+
}, 200);
|
|
204
|
+
return [2 /*return*/];
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}); };
|
|
190
208
|
var handleSubmit = useCallback(function (values) { return __awaiter(void 0, void 0, void 0, function () {
|
|
191
209
|
var _a, errorIndexes, params, _b, minResponseDuration, duration;
|
|
192
210
|
return __generator(this, function (_c) {
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { BaseAiAbilityParams, BaseExtraParams } from '@/modules/ai-question/interface';
|
|
2
|
+
import type { FormikErrors } from 'formik';
|
|
2
3
|
export interface VideoBroadcastParams {
|
|
3
4
|
videoRetry?: number;
|
|
4
5
|
videoUrl?: string;
|
|
5
6
|
videoSkip?: number;
|
|
6
7
|
}
|
|
8
|
+
export interface Option {
|
|
9
|
+
content: string;
|
|
10
|
+
score: number;
|
|
11
|
+
}
|
|
7
12
|
export interface Question {
|
|
8
13
|
content: string;
|
|
9
14
|
videoUrl: string;
|
|
15
|
+
options?: Option[];
|
|
10
16
|
}
|
|
11
17
|
export interface QuestionParams {
|
|
12
18
|
name: string;
|
|
@@ -20,6 +26,8 @@ export interface QuestionParams {
|
|
|
20
26
|
minResponseDuration?: number;
|
|
21
27
|
category?: string[];
|
|
22
28
|
extra: BaseExtraParams;
|
|
29
|
+
isOpenAIFollowUp: boolean;
|
|
30
|
+
enableScoreOptimization: boolean;
|
|
23
31
|
broadcastType: number;
|
|
24
32
|
aiSwitch?: number;
|
|
25
33
|
aiType: number;
|
|
@@ -67,11 +75,13 @@ export interface UpdateQuestionState {
|
|
|
67
75
|
export interface FormRef {
|
|
68
76
|
handleValues: () => QuestionFormValues;
|
|
69
77
|
handleSubmit: () => void;
|
|
78
|
+
errors: () => FormikErrors<QuestionFormValues>;
|
|
70
79
|
setFormValues: (values: Partial<QuestionFormValues>) => void;
|
|
71
80
|
}
|
|
72
81
|
export interface RandomQuestionProps {
|
|
73
82
|
broadcastType: number;
|
|
74
83
|
category: any;
|
|
84
|
+
aiShowType: number;
|
|
75
85
|
onAddCustonQuestion?: () => void;
|
|
76
86
|
onAddRandomQuestion?: (qs: string[]) => void;
|
|
77
87
|
}
|
|
@@ -4,3 +4,18 @@ export declare const VideoPreviewWrapper: import("@emotion/styled").StyledCompon
|
|
|
4
4
|
export declare const VideoPreviewMask: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
5
|
export declare const VideoPreviewMaskContent: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
6
|
export declare const VideoPreviewMaskIcon: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
+
export declare const SmallSelect: import("@emotion/styled").StyledComponent<import("fbm-ui").SelectProps & {
|
|
8
|
+
children?: import("react").ReactNode;
|
|
9
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
10
|
+
export declare const ScoreInput: import("@emotion/styled").StyledComponent<import("fbm-ui").BaseInputProps & import("@mui/material").OutlinedInputProps & import("@mui/material").InputProps & {
|
|
11
|
+
children?: import("react").ReactNode;
|
|
12
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
13
|
+
export declare const ChoiceIcon: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
14
|
+
children?: import("react").ReactNode;
|
|
15
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
16
|
+
export declare const ChoiceItem: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
19
|
+
export declare const ChoiceItemInput: import("@emotion/styled").StyledComponent<import("fbm-ui").BaseInputProps & import("@mui/material").OutlinedInputProps & import("@mui/material").InputProps & {
|
|
20
|
+
children?: import("react").ReactNode;
|
|
21
|
+
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { styled } from 'fbm-ui';
|
|
1
|
+
import { Box, Input, Select, styled } from 'fbm-ui';
|
|
2
2
|
export var VideoPreview = styled('video')({
|
|
3
3
|
width: '100%',
|
|
4
4
|
height: '100%',
|
|
@@ -50,3 +50,58 @@ export var VideoPreviewMaskIcon = styled('div')({
|
|
|
50
50
|
backgroundColor: 'rgba(0, 0, 0, 0.8)',
|
|
51
51
|
},
|
|
52
52
|
});
|
|
53
|
+
export var SmallSelect = styled(Select)({
|
|
54
|
+
width: 62,
|
|
55
|
+
height: 32,
|
|
56
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
57
|
+
border: 'none',
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
export var ScoreInput = styled(Input)({
|
|
61
|
+
width: 84,
|
|
62
|
+
flexShrink: 0,
|
|
63
|
+
});
|
|
64
|
+
export var ChoiceIcon = styled(Box)({
|
|
65
|
+
width: 16,
|
|
66
|
+
height: 16,
|
|
67
|
+
border: '1px solid rgba(0, 0, 0, 0.08)',
|
|
68
|
+
flexShrink: 0,
|
|
69
|
+
});
|
|
70
|
+
export var ChoiceItem = styled(Box)({
|
|
71
|
+
minHeight: 40,
|
|
72
|
+
display: 'flex',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
paddingLeft: 16,
|
|
75
|
+
'& .choice-item-delete-icon': {
|
|
76
|
+
display: 'none',
|
|
77
|
+
},
|
|
78
|
+
'& .optionItemDragHandle': {
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
left: -8,
|
|
81
|
+
cursor: 'move',
|
|
82
|
+
display: 'none',
|
|
83
|
+
},
|
|
84
|
+
'& .MuiFormHelperText-root': {
|
|
85
|
+
display: 'none',
|
|
86
|
+
},
|
|
87
|
+
'&:hover': {
|
|
88
|
+
'& .choice-item-delete-icon': {
|
|
89
|
+
display: 'inline-flex',
|
|
90
|
+
},
|
|
91
|
+
'& .optionItemDragHandle': {
|
|
92
|
+
display: 'block',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
export var ChoiceItemInput = styled(Input)({
|
|
97
|
+
margin: '0 16px 0 12px',
|
|
98
|
+
fontSize: 14,
|
|
99
|
+
position: 'relative',
|
|
100
|
+
top: 0.5,
|
|
101
|
+
'&::after': {
|
|
102
|
+
bottom: '1px',
|
|
103
|
+
},
|
|
104
|
+
'&::before': {
|
|
105
|
+
display: 'none',
|
|
106
|
+
},
|
|
107
|
+
});
|
|
@@ -70,7 +70,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
70
70
|
else {
|
|
71
71
|
return (_jsxs(Box, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(ScoreReport, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess }), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && _jsx(WorkPlaces, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(AIEvaluate, {}), _jsx(Suggestion, {}), _jsx(VideoQuestion, {})] }));
|
|
72
72
|
}
|
|
73
|
-
}, [handleRefreshSuccess, onSendReminderClick, reminderSent, status, operableButtons, collection, workplaces]);
|
|
73
|
+
}, [handleRefreshSuccess, onSendReminderClick, customScore, reminderSent, status, operableButtons, collection, workplaces]);
|
|
74
74
|
return (_jsx(Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '584px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
75
75
|
});
|
|
76
76
|
AiReportRoot.displayName = 'AiReportRoot';
|
|
@@ -29,9 +29,12 @@ var Score = function (_a) {
|
|
|
29
29
|
if (typeof customScore === 'number' && customScore > -1) {
|
|
30
30
|
setScore(customScore);
|
|
31
31
|
}
|
|
32
|
+
else {
|
|
33
|
+
setScore(score || 0);
|
|
34
|
+
}
|
|
32
35
|
if (!loading)
|
|
33
36
|
setOpenRefresh(false);
|
|
34
|
-
}, [loading, customScore]);
|
|
37
|
+
}, [loading, customScore, score]);
|
|
35
38
|
var content = (_jsxs(Box, __assign({ padding: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", color: "secondary" }, { children: "\u5237\u65B0\u540E\u5C06\u6309\u6700\u65B0\u7B97\u5206\u89C4\u5219\u8BA1\u7B97\uFF0C\u662F\u5426\u786E\u8BA4\u5237\u65B0" })), _jsx(Box, __assign({ paddingTop: 1, textAlign: "right" }, { children: _jsx(Button, __assign({ loading: loading, onClick: onRefresh }, { children: "\u5237\u65B0" })) }))] })));
|
|
36
39
|
return (_jsxs(Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [_jsx(RankingRange, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), _jsxs(Box, __assign({ flex: "1 0" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsxs(ScoreTypography, { children: [formatScore(feScore || 0), _jsx(ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), _jsx(Box, __assign({ width: 50, height: 50 }, { children: !!feScore && feScore >= 80 && _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && (_jsx(Button, __assign({ variant: "outlined", size: "small", icon: _jsx(DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), _jsxs(Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", dayjs(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && (_jsx(Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), _jsx(Box, __assign({ width: 200 }, { children: _jsx(Bar, {}) }))] })));
|
|
37
40
|
};
|
|
@@ -16,11 +16,13 @@ import { Box, Typography } from 'fbm-ui';
|
|
|
16
16
|
import update from 'immutability-helper';
|
|
17
17
|
import { useCallback } from 'react';
|
|
18
18
|
var Abilities = function (_a) {
|
|
19
|
-
var stepIndex = _a.stepIndex;
|
|
19
|
+
var stepIndex = _a.stepIndex, disabledScore = _a.disabledScore;
|
|
20
20
|
var _b = useAiReportStore(function (store) { return [store.reportResult]; }), reportResult = _b.reportResult, updateReportResult = _b.updateReportResult, onScoreChange = _b.onScoreChange;
|
|
21
21
|
var steps = (reportResult || {}).steps;
|
|
22
22
|
var handleChangeCommitted = useCallback(function (score, index, type) {
|
|
23
23
|
var _a, _b;
|
|
24
|
+
if (disabledScore)
|
|
25
|
+
return;
|
|
24
26
|
var newSteps = update(steps, (_a = {}, _a[stepIndex] = { scoreInfo: { abilities: (_b = {}, _b[index] = { finalScore: { $set: score } }, _b) } }, _a));
|
|
25
27
|
updateReportResult(__assign(__assign({}, reportResult), { steps: newSteps }));
|
|
26
28
|
onScoreChange &&
|
|
@@ -30,11 +32,11 @@ var Abilities = function (_a) {
|
|
|
30
32
|
type: 2,
|
|
31
33
|
score: score,
|
|
32
34
|
});
|
|
33
|
-
}, [stepIndex, reportResult, steps, updateReportResult, onScoreChange]);
|
|
35
|
+
}, [stepIndex, reportResult, steps, updateReportResult, onScoreChange, disabledScore]);
|
|
34
36
|
return (_jsxs(Box, __assign({ mt: 1 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary", mb: 1 }, { children: "\u5206\u503C\u8BA1\u7B97\u89C4\u5219\uFF1A\u7EFC\u5408\u8BC4\u5206=AI\u8BC4\u5206*\u5355\u9898\u6743\u91CD" })), _jsx(Box, __assign({ mt: 3 }, { children: steps &&
|
|
35
37
|
steps[stepIndex].scoreInfo.abilities.map(function (_a, index) {
|
|
36
38
|
var name = _a.name, originScore = _a.originScore, finalScore = _a.finalScore;
|
|
37
|
-
return (_jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: name })), _jsx(ScoreSlider, { width: 420, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "auto
|
|
39
|
+
return (_jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: name })), _jsx(ScoreSlider, { width: 420, disabledScore: disabledScore, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "".concat(disabledScore ? 'off' : 'auto'), onChangeCommitted: function (score) { return handleChangeCommitted(score, index, 'ability'); } })] }, name));
|
|
38
40
|
}) }))] })));
|
|
39
41
|
};
|
|
40
42
|
export default Abilities;
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import { Image } from './styled';
|
|
14
|
+
import { PhotoSlider } from "../../../../components/react-photo-view";
|
|
15
|
+
import "../../../../components/react-photo-view/Photo";
|
|
16
|
+
import PhotoPage from "../../../../components/react-photo-view/PhotoPage";
|
|
17
|
+
import "../../../../components/react-photo-view/PhotoSlider";
|
|
18
|
+
import { Box, Typography } from 'fbm-ui';
|
|
19
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
20
|
+
import { useCallback, useState } from 'react';
|
|
21
|
+
var BodyImages = function (_a) {
|
|
22
|
+
var reviewImgs = _a.reviewImgs;
|
|
23
|
+
var _b = useState(false), visible = _b[0], setVisible = _b[1];
|
|
24
|
+
var _c = useState(0), index = _c[0], setIndex = _c[1];
|
|
25
|
+
var handleSelected = useCallback(function (_, i) {
|
|
26
|
+
setIndex(i);
|
|
27
|
+
setVisible(true);
|
|
28
|
+
}, []);
|
|
29
|
+
return (_jsxs(_Fragment, { children: [_jsx(Stack, __assign({ spacing: 2, direction: "row" }, { children: reviewImgs === null || reviewImgs === void 0 ? void 0 : reviewImgs.map(function (_a, i) {
|
|
30
|
+
var url = _a.url, title = _a.title;
|
|
31
|
+
return (_jsxs(Stack, __assign({ spacing: 0.5, onClick: function () {
|
|
32
|
+
setIndex(i);
|
|
33
|
+
setVisible(true);
|
|
34
|
+
} }, { children: [_jsx(Image, { src: url, alt: "" }), _jsx(Typography, __assign({ variant: "caption", color: "textSecondary", textAlign: "center" }, { children: title }))] }), url));
|
|
35
|
+
}) })), _jsx(PhotoSlider, { maskOpacity: 0.56, visible: visible, onClose: function () { return setVisible(false); }, index: index, onIndexChange: setIndex, images: reviewImgs === null || reviewImgs === void 0 ? void 0 : reviewImgs.map(function (item) { return ({ src: item.url, key: item.url, title: item === null || item === void 0 ? void 0 : item.title }); }), overlayRender: function (_a) {
|
|
36
|
+
var images = _a.images, index = _a.index;
|
|
37
|
+
return (_jsx(Box, __assign({ sx: { width: 1, position: 'absolute', bottom: 0, zIndex: 50 } }, { children: _jsx(PhotoPage, { onSelected: handleSelected, images: images, index: index }) })));
|
|
38
|
+
} })] }));
|
|
39
|
+
};
|
|
40
|
+
export default BodyImages;
|
|
@@ -11,9 +11,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import Abilities from './Abilities';
|
|
14
|
+
import BodyImages from './BodyImages';
|
|
14
15
|
import ScoreSlider from './ScoreSlider';
|
|
16
|
+
import SingleChoice from './SingleChoice';
|
|
15
17
|
import { QuestionDesc } from './styled';
|
|
16
|
-
import { QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
18
|
+
import { ADD_QUESTION_TYPE, QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
17
19
|
import { INTERVIEW_STEP_STATUS } from "../../../../enum/ai-report";
|
|
18
20
|
import FormatQuoteIcon from '@mui/icons-material/FormatQuote';
|
|
19
21
|
import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
@@ -25,7 +27,7 @@ import update from 'immutability-helper';
|
|
|
25
27
|
import { useCallback, useMemo, useState } from 'react';
|
|
26
28
|
var STEP_NO_ANSWER = INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
|
|
27
29
|
var QuestionItem = function (props) {
|
|
28
|
-
var token = props.token, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
|
|
30
|
+
var token = props.token, reviewImgs = props.reviewImgs, followupQuestion = props.followupQuestion, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
|
|
29
31
|
var _d = useState(false), showAbilities = _d[0], setShowAbilities = _d[1];
|
|
30
32
|
var _e = useAiReportStore(function (store) { return [store.reportResult, store.stepToken, store.operableButtons, store.showAbilitiesDetails]; }), reportResult = _e.reportResult, stepToken = _e.stepToken, operableButtons = _e.operableButtons, showAbilitiesDetails = _e.showAbilitiesDetails, updateState = _e.updateState, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange, onStepChange = _e.onStepChange;
|
|
31
33
|
var steps = (reportResult || {}).steps;
|
|
@@ -34,6 +36,7 @@ var QuestionItem = function (props) {
|
|
|
34
36
|
var isShowAbilitiesButton = abilities.length > 0 && isAbilities && !showAbilitiesDetails;
|
|
35
37
|
var isShowWeight = abilities.length === 0 || showAbilities || !isAbilities || showAbilitiesDetails;
|
|
36
38
|
var isShowAbilitiesDetails = abilities.length > 0 && (showAbilities || showAbilitiesDetails);
|
|
39
|
+
var isSingleChoice = aiShowType === ADD_QUESTION_TYPE.SINGLECHIOCE;
|
|
37
40
|
var comprehensiveScore = useMemo(function () {
|
|
38
41
|
if (status === STEP_COMPLETED) {
|
|
39
42
|
return (_jsx(Typography, __assign({ variant: "caption", color: theme.palette.primary.main, fontSize: 16, fontWeight: 500 }, { children: formatScore(score) })));
|
|
@@ -65,6 +68,8 @@ var QuestionItem = function (props) {
|
|
|
65
68
|
}, [analysisResult]);
|
|
66
69
|
var handleChangeCommitted = useCallback(function (score) {
|
|
67
70
|
var _a;
|
|
71
|
+
if (isSingleChoice)
|
|
72
|
+
return;
|
|
68
73
|
var newSteps = update(steps, (_a = {}, _a[index] = { scoreInfo: { finalScore: { $set: score } } }, _a));
|
|
69
74
|
updateReportResult(__assign(__assign({}, reportResult), { steps: newSteps }));
|
|
70
75
|
onScoreChange &&
|
|
@@ -73,7 +78,7 @@ var QuestionItem = function (props) {
|
|
|
73
78
|
type: 1,
|
|
74
79
|
score: score,
|
|
75
80
|
});
|
|
76
|
-
}, [index, reportResult, steps, updateReportResult, onScoreChange]);
|
|
81
|
+
}, [index, reportResult, steps, updateReportResult, onScoreChange, isSingleChoice]);
|
|
77
82
|
var handleClickItem = useCallback(function (e) {
|
|
78
83
|
e.stopPropagation();
|
|
79
84
|
if (videoUrl) {
|
|
@@ -86,6 +91,6 @@ var QuestionItem = function (props) {
|
|
|
86
91
|
mt: 2,
|
|
87
92
|
cursor: videoUrl ? 'pointer' : 'inherit',
|
|
88
93
|
borderColor: token === stepToken ? theme.palette.primary.main : '',
|
|
89
|
-
}, variant: "outlined", onClick: handleClickItem }, { children: [_jsxs(Typography, __assign({ fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: [index + 1, ".", desc] })), _jsxs(QuestionDesc, { children: [_jsx(FormatQuoteIcon, {}), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [_jsx(Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && (_jsxs(Box, { children: [_jsx("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), isExistWeight && status === STEP_COMPLETED && (_jsxs(Box, __assign({ mt: 2, display: "flex" }, { children: [_jsxs(Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { originScore: originScore, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index })] }), token));
|
|
94
|
+
}, variant: "outlined", onClick: handleClickItem }, { children: [_jsxs(Typography, __assign({ fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: [index + 1, ".", desc] })), _jsxs(QuestionDesc, { children: [_jsx(BodyImages, { reviewImgs: reviewImgs }), _jsx(FormatQuoteIcon, {}), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [isSingleChoice && _jsx(SingleChoice, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), _jsx(Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && (_jsxs(Box, { children: [_jsx("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestion && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(followupQuestion === null || followupQuestion === void 0 ? void 0 : followupQuestion.desc) })), _jsxs(QuestionDesc, { children: [_jsx(FormatQuoteIcon, {}), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: followupQuestion === null || followupQuestion === void 0 ? void 0 : followupQuestion.answer }))] })] })), isExistWeight && status === STEP_COMPLETED && (_jsxs(Box, __assign({ mt: 2, display: "flex" }, { children: [_jsxs(Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice })] }), token));
|
|
90
95
|
};
|
|
91
96
|
export default QuestionItem;
|
|
@@ -16,13 +16,13 @@ import { useAiReportStore } from "../../../../store/ai-report/global-store";
|
|
|
16
16
|
import { Tooltip, Typography } from 'fbm-ui';
|
|
17
17
|
import { useCallback, useEffect, useState } from 'react';
|
|
18
18
|
var ScoreSlider = function (props) {
|
|
19
|
-
var _a = props.width, width = _a === void 0 ? 320 : _a, originScore = props.originScore, finalScore = props.finalScore, _b = props.valueLabelDisplay, valueLabelDisplay = _b === void 0 ? 'on' : _b, _c = props.isShowLabel, isShowLabel = _c === void 0 ? false : _c, _d = props.isShowScoreRank, isShowScoreRank = _d === void 0 ? false : _d, onChangeCommitted = props.onChangeCommitted;
|
|
19
|
+
var _a = props.width, width = _a === void 0 ? 320 : _a, originScore = props.originScore, finalScore = props.finalScore, _b = props.valueLabelDisplay, valueLabelDisplay = _b === void 0 ? 'on' : _b, _c = props.isShowLabel, isShowLabel = _c === void 0 ? false : _c, _d = props.isShowScoreRank, isShowScoreRank = _d === void 0 ? false : _d, onChangeCommitted = props.onChangeCommitted, _e = props.disabledScore, sliderDisabledScore = _e === void 0 ? false : _e;
|
|
20
20
|
var aiScore = originScore.toFixed(0);
|
|
21
|
-
var
|
|
21
|
+
var _f = useState(0), score = _f[0], setScore = _f[1];
|
|
22
22
|
var disabledScore = useAiReportStore(function (store) { return [store.disabledScore, store.scoreRankIntervals]; }).disabledScore;
|
|
23
23
|
var handleScoreChange = useCallback(function (e, v) {
|
|
24
|
-
!disabledScore && setScore(v);
|
|
25
|
-
}, [disabledScore]);
|
|
24
|
+
!disabledScore && !sliderDisabledScore && setScore(v);
|
|
25
|
+
}, [disabledScore, sliderDisabledScore]);
|
|
26
26
|
useEffect(function () {
|
|
27
27
|
setScore(Number(finalScore.toFixed(0)));
|
|
28
28
|
}, [finalScore]);
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Layout, Radio, RadioGroup, Typography } from 'fbm-ui';
|
|
14
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
15
|
+
var SingleChoice = function (_a) {
|
|
16
|
+
var options = _a.options, selected = _a.selected;
|
|
17
|
+
return (_jsx(Layout, { children: _jsx(RadioGroup, __assign({ row: false, value: selected === null || selected === void 0 ? void 0 : selected[0], color: "primary", sx: {
|
|
18
|
+
'& .MuiFormControlLabel-label': {
|
|
19
|
+
width: '100%',
|
|
20
|
+
},
|
|
21
|
+
} }, { children: options.map(function (v, i) {
|
|
22
|
+
return (_jsx(Radio
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
, {
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
FormControlLabelProps: {
|
|
27
|
+
sx: { pointerEvents: 'none' },
|
|
28
|
+
}, value: i, label: _jsxs(Stack, __assign({ color: "".concat(i === selected[0] ? '#4caf50' : 'rgba(0,0,0,.56)'), fontWeight: "".concat(i === selected[0] ? 'medium' : 'normal'), width: "100%", direction: "row", spacing: 1, alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ color: "inherit", fontWeight: "inherit", variant: "caption", flexWrap: "wrap", sx: { wordBreak: 'break-all' } }, { children: v.content })), _jsxs(Typography, __assign({ color: "inherit", fontWeight: "inherit", variant: "caption", flexShrink: 0 }, { children: [v.score, "\u5206"] }))] })) }, i));
|
|
29
|
+
}) })) }));
|
|
30
|
+
};
|
|
31
|
+
export default SingleChoice;
|
|
@@ -17,6 +17,6 @@ import { Box, Empty, Paper } from 'fbm-ui';
|
|
|
17
17
|
var VideoQuestion = function () {
|
|
18
18
|
var reportResult = useAiReportStore(function (store) { return [store.reportResult, store.operableButtons]; }).reportResult;
|
|
19
19
|
var steps = (reportResult || {}).steps;
|
|
20
|
-
return (_jsxs(Box, __assign({ id: "report-question", component: Paper,
|
|
20
|
+
return (_jsxs(Box, __assign({ id: "report-question", component: Paper, p: 2, style: { background: '#fff', border: '1px solid rgb(244, 244, 244)' }, mt: 2 }, { children: [_jsx(AiHeaderTitle, { name: "\u89C6\u9891\u9898" }), _jsx(Box, __assign({ mt: 3 }, { children: steps && steps.length > 0 ? (steps === null || steps === void 0 ? void 0 : steps.map(function (item, index) { return _jsx(QuestionItem, __assign({ index: index }, item), item.token); })) : (_jsx(Empty, { src: "//public-static-assets.oss-cn-beijing.aliyuncs.com/img/empty.png", desc: "\u6682\u65E0\u9898\u76EE" })) }))] })));
|
|
21
21
|
};
|
|
22
22
|
export default VideoQuestion;
|
|
@@ -4,6 +4,7 @@ export interface ScoreSliderProps extends Pick<ScoreInfo, 'originScore' | 'final
|
|
|
4
4
|
valueLabelDisplay?: 'on' | 'off' | 'auto';
|
|
5
5
|
isShowLabel?: boolean;
|
|
6
6
|
isShowScoreRank?: boolean;
|
|
7
|
+
disabledScore?: boolean;
|
|
7
8
|
onChangeCommitted: (score: number) => void;
|
|
8
9
|
}
|
|
9
10
|
export interface QuestionItemProps extends AiInterviewReportStep {
|
|
@@ -11,4 +12,5 @@ export interface QuestionItemProps extends AiInterviewReportStep {
|
|
|
11
12
|
}
|
|
12
13
|
export interface AbilitiesProps {
|
|
13
14
|
stepIndex: number;
|
|
15
|
+
disabledScore?: boolean;
|
|
14
16
|
}
|
|
@@ -69,3 +69,4 @@ export declare const AiScoreRoot: import("@emotion/styled").StyledComponent<impo
|
|
|
69
69
|
export declare const RankingRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
70
70
|
children?: import("react").ReactNode;
|
|
71
71
|
} & import("@mui/system/createStyled").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
72
|
+
export declare const Image: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
@@ -57,7 +57,7 @@ export var QuestionDesc = styled(Box)({
|
|
|
57
57
|
position: 'relative',
|
|
58
58
|
borderRadius: 2,
|
|
59
59
|
marginTop: 16,
|
|
60
|
-
'&
|
|
60
|
+
'& >.MuiSvgIcon-root': {
|
|
61
61
|
position: 'absolute',
|
|
62
62
|
left: 8,
|
|
63
63
|
top: -12,
|
|
@@ -89,3 +89,9 @@ export var RankingRoot = styled(Box)({
|
|
|
89
89
|
boxShadow: '0px 0px 4px 0px rgba(0 0 0 / 50%)',
|
|
90
90
|
},
|
|
91
91
|
});
|
|
92
|
+
export var Image = styled('img')({
|
|
93
|
+
width: 48,
|
|
94
|
+
height: 84,
|
|
95
|
+
borderRadius: 4,
|
|
96
|
+
objectFit: 'contain',
|
|
97
|
+
});
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { ScoreRankInterval, ScoreRankIntervals } from './components/RankingRange/interface';
|
|
2
|
+
import { ADD_QUESTION_TYPE } from '@@/src/enum/ai-question';
|
|
2
3
|
export interface AiModel {
|
|
3
4
|
token: string;
|
|
4
5
|
name: string;
|
|
5
6
|
}
|
|
7
|
+
export interface Option {
|
|
8
|
+
content: string;
|
|
9
|
+
score: string;
|
|
10
|
+
}
|
|
6
11
|
export interface Question {
|
|
7
12
|
token: string;
|
|
8
13
|
name: string;
|
|
9
14
|
desc: string;
|
|
10
15
|
duration: number;
|
|
11
16
|
type: number;
|
|
17
|
+
aiShowType: ADD_QUESTION_TYPE;
|
|
12
18
|
category: string[];
|
|
19
|
+
options?: Option[];
|
|
13
20
|
}
|
|
14
21
|
export interface Collection {
|
|
15
22
|
name: string;
|
|
@@ -33,6 +40,7 @@ export interface AnalysisResult {
|
|
|
33
40
|
words?: any;
|
|
34
41
|
score1?: number;
|
|
35
42
|
score2?: number;
|
|
43
|
+
selected?: number[];
|
|
36
44
|
}
|
|
37
45
|
export interface Answer {
|
|
38
46
|
videoUrl: string;
|
|
@@ -89,6 +97,15 @@ export interface Suggestion {
|
|
|
89
97
|
show: boolean;
|
|
90
98
|
abilitys: SuggestionAbility[];
|
|
91
99
|
}
|
|
100
|
+
export interface ReviewImg {
|
|
101
|
+
url: string;
|
|
102
|
+
step: number;
|
|
103
|
+
title: string;
|
|
104
|
+
}
|
|
105
|
+
export interface FollowupQuestion {
|
|
106
|
+
desc: string;
|
|
107
|
+
answer: string;
|
|
108
|
+
}
|
|
92
109
|
export interface AiInterviewReportStep {
|
|
93
110
|
token: string;
|
|
94
111
|
status: number;
|
|
@@ -96,6 +113,8 @@ export interface AiInterviewReportStep {
|
|
|
96
113
|
answer: Answer;
|
|
97
114
|
scoreInfo: ScoreInfo;
|
|
98
115
|
aiEvaluation: AiEvaluation;
|
|
116
|
+
reviewImgs: ReviewImg[];
|
|
117
|
+
followupQuestion?: FollowupQuestion;
|
|
99
118
|
}
|
|
100
119
|
export interface FaceAnalysis {
|
|
101
120
|
age: number;
|