eli-video-interview 1.2.23 → 1.2.26
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/CHANGELOG.md +30 -0
- package/esm/assets/icons/AI.svg +1 -0
- package/esm/components/AiHeaderTitle/index.d.ts +4 -0
- package/esm/components/AiHeaderTitle/index.js +19 -0
- package/esm/components/AiHeaderTitle/interface.d.ts +4 -0
- package/esm/components/AiHeaderTitle/interface.js +1 -0
- package/esm/components/Charts/Chart.d.ts +1 -1
- package/esm/components/Charts/Chart.js +8 -8
- package/esm/components/Charts/ReportPie.js +1 -1
- package/esm/modules/ai-ability/interface.d.ts +1 -0
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +1 -1
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +12 -7
- package/esm/modules/ai-question/components/AiAnalysis/index.js +9 -17
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +6 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +7 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +1 -1
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +27 -26
- package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +6 -0
- package/esm/modules/ai-question/components/QuestionModel/index.js +6 -6
- package/esm/modules/ai-question/components/QuestionUpdate/Form.d.ts +1 -1
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +19 -10
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +60 -11
- package/esm/modules/ai-question/interface.d.ts +2 -0
- package/esm/modules/ai-report/Root.js +7 -5
- package/esm/modules/ai-report/components/AIEvaluate/index.js +10 -9
- package/esm/modules/ai-report/components/ScoreReport/Bar.js +3 -3
- package/esm/modules/ai-report/components/ScoreReport/Report.js +13 -5
- package/esm/modules/ai-report/components/Suggestion/Suggestion.d.ts +4 -0
- package/esm/modules/ai-report/components/Suggestion/Suggestion.js +29 -0
- package/esm/modules/ai-report/components/Suggestion/index.d.ts +2 -0
- package/esm/modules/ai-report/components/Suggestion/index.js +27 -0
- package/esm/modules/ai-report/components/VideoQuestion/Abilities.d.ts +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +5 -5
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.d.ts +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +9 -9
- package/esm/modules/ai-report/components/VideoQuestion/index.js +4 -3
- package/esm/modules/ai-report/components/WorkPlaces/ScoreSlider.d.ts +4 -0
- package/esm/modules/ai-report/components/WorkPlaces/ScoreSlider.js +24 -0
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +11 -0
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.js +55 -0
- package/esm/modules/ai-report/components/WorkPlaces/index.d.ts +2 -0
- package/esm/modules/ai-report/components/WorkPlaces/index.js +67 -0
- package/esm/modules/ai-report/components/WorkPlaces/interface.d.ts +7 -0
- package/esm/modules/ai-report/components/WorkPlaces/interface.js +1 -0
- package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +62 -0
- package/esm/modules/ai-report/components/WorkPlaces/styled.js +27 -0
- package/esm/modules/ai-report/interface.d.ts +38 -0
- package/esm/services/ai-ability.d.ts +1 -0
- package/esm/services/ai-report.d.ts +5 -0
- package/esm/services/ai-report.js +4 -0
- package/esm/store/ai-ability/question-ability-store.d.ts +12 -0
- package/esm/store/ai-ability/question-ability-store.js +10 -0
- package/esm/store/ai-question/ai-analysis-store.d.ts +5 -1
- package/esm/store/ai-question/ai-analysis-store.js +36 -11
- package/lib/assets/icons/AI.svg +1 -0
- package/lib/components/AiHeaderTitle/index.d.ts +4 -0
- package/lib/components/AiHeaderTitle/index.js +24 -0
- package/lib/components/AiHeaderTitle/interface.d.ts +4 -0
- package/lib/components/AiHeaderTitle/interface.js +2 -0
- package/lib/components/Charts/Chart.d.ts +1 -1
- package/lib/components/Charts/Chart.js +8 -8
- package/lib/components/Charts/ReportPie.js +1 -1
- package/lib/modules/ai-ability/interface.d.ts +1 -0
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +1 -1
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +12 -7
- package/lib/modules/ai-question/components/AiAnalysis/index.js +8 -16
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +6 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +8 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +1 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +27 -26
- package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +6 -0
- package/lib/modules/ai-question/components/QuestionModel/index.js +6 -6
- package/lib/modules/ai-question/components/QuestionUpdate/Form.d.ts +1 -1
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +19 -10
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +60 -11
- package/lib/modules/ai-question/interface.d.ts +2 -0
- package/lib/modules/ai-report/Root.js +7 -5
- package/lib/modules/ai-report/components/AIEvaluate/index.js +9 -8
- package/lib/modules/ai-report/components/ScoreReport/Bar.js +3 -3
- package/lib/modules/ai-report/components/ScoreReport/Report.js +13 -5
- package/lib/modules/ai-report/components/Suggestion/Suggestion.d.ts +4 -0
- package/lib/modules/ai-report/components/Suggestion/Suggestion.js +31 -0
- package/lib/modules/ai-report/components/Suggestion/index.d.ts +2 -0
- package/lib/modules/ai-report/components/Suggestion/index.js +32 -0
- package/lib/modules/ai-report/components/VideoQuestion/Abilities.d.ts +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +5 -5
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.d.ts +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +9 -9
- package/lib/modules/ai-report/components/VideoQuestion/index.js +4 -3
- package/lib/modules/ai-report/components/WorkPlaces/ScoreSlider.d.ts +4 -0
- package/lib/modules/ai-report/components/WorkPlaces/ScoreSlider.js +26 -0
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +11 -0
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.js +57 -0
- package/lib/modules/ai-report/components/WorkPlaces/index.d.ts +2 -0
- package/lib/modules/ai-report/components/WorkPlaces/index.js +72 -0
- package/lib/modules/ai-report/components/WorkPlaces/interface.d.ts +7 -0
- package/lib/modules/ai-report/components/WorkPlaces/interface.js +2 -0
- package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +62 -0
- package/lib/modules/ai-report/components/WorkPlaces/styled.js +30 -0
- package/lib/modules/ai-report/interface.d.ts +38 -0
- package/lib/services/ai-ability.d.ts +1 -0
- package/lib/services/ai-report.d.ts +5 -0
- package/lib/services/ai-report.js +6 -1
- package/lib/store/ai-ability/question-ability-store.d.ts +12 -0
- package/lib/store/ai-ability/question-ability-store.js +13 -0
- package/lib/store/ai-question/ai-analysis-store.d.ts +5 -1
- package/lib/store/ai-question/ai-analysis-store.js +36 -11
- package/package.json +1 -7
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Box, styled } from 'fbm-ui';
|
|
2
|
+
import { Slider } from 'fbm-ui/lib/mui';
|
|
3
|
+
export var WorkplaceStyledSlider = styled(Slider)(function () { return ({
|
|
4
|
+
color: 'transparent',
|
|
5
|
+
height: 8,
|
|
6
|
+
'& .MuiSlider-rail': {
|
|
7
|
+
// backgroundColor: '#ECEFF1',
|
|
8
|
+
opacity: 1,
|
|
9
|
+
background: 'linear-gradient(90deg, RGB(229, 115, 115), RGB(255, 183, 77) 50%, RGB(0, 217, 157))',
|
|
10
|
+
},
|
|
11
|
+
'& .MuiSlider-track': {
|
|
12
|
+
border: 'none',
|
|
13
|
+
background: 'transparent',
|
|
14
|
+
},
|
|
15
|
+
'& .MuiSlider-thumb': {
|
|
16
|
+
height: 16,
|
|
17
|
+
width: 16,
|
|
18
|
+
backgroundColor: '#fff',
|
|
19
|
+
zIndex: 2,
|
|
20
|
+
boxShadow: '0 4px 8px RGBA(0, 0, 0, 0.16)',
|
|
21
|
+
},
|
|
22
|
+
}); });
|
|
23
|
+
export var ScoreSliderRoot = styled(Box)({
|
|
24
|
+
display: 'flex',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
flexDirection: 'column',
|
|
27
|
+
});
|
|
@@ -51,6 +51,7 @@ export interface ScoreInfo {
|
|
|
51
51
|
finalScore: number;
|
|
52
52
|
score: number;
|
|
53
53
|
abilities: Ability[];
|
|
54
|
+
workplaces: Ability[];
|
|
54
55
|
}
|
|
55
56
|
export interface AiEvaluation {
|
|
56
57
|
assessmentPoint: string[];
|
|
@@ -58,6 +59,36 @@ export interface AiEvaluation {
|
|
|
58
59
|
increasePoint: any[];
|
|
59
60
|
decreasePoint: any[];
|
|
60
61
|
}
|
|
62
|
+
export interface AbilityExpression {
|
|
63
|
+
bad: string;
|
|
64
|
+
good: string;
|
|
65
|
+
}
|
|
66
|
+
export interface WorkPlaceAbility {
|
|
67
|
+
abilityExpression: AbilityExpression;
|
|
68
|
+
answer: string;
|
|
69
|
+
define: string;
|
|
70
|
+
dimensionName: string;
|
|
71
|
+
dimensionType: number;
|
|
72
|
+
score: number;
|
|
73
|
+
scoreLevel: number;
|
|
74
|
+
scoreText: string;
|
|
75
|
+
token: string;
|
|
76
|
+
}
|
|
77
|
+
export interface WorkPlaceScoreInfo {
|
|
78
|
+
score: number;
|
|
79
|
+
scoreText: string;
|
|
80
|
+
scoreLevel: number;
|
|
81
|
+
}
|
|
82
|
+
export interface SuggestionAbility {
|
|
83
|
+
abilityName: string;
|
|
84
|
+
interviewQuestion: Array<string>;
|
|
85
|
+
keyPoints: Array<string>;
|
|
86
|
+
}
|
|
87
|
+
export interface Suggestion {
|
|
88
|
+
text: string;
|
|
89
|
+
show: boolean;
|
|
90
|
+
abilitys: SuggestionAbility[];
|
|
91
|
+
}
|
|
61
92
|
export interface AiInterviewReportStep {
|
|
62
93
|
token: string;
|
|
63
94
|
status: number;
|
|
@@ -70,6 +101,10 @@ export interface FaceAnalysis {
|
|
|
70
101
|
age: number;
|
|
71
102
|
beauty: number;
|
|
72
103
|
}
|
|
104
|
+
export interface SummaryText {
|
|
105
|
+
sprintf: string;
|
|
106
|
+
variables: Array<string>;
|
|
107
|
+
}
|
|
73
108
|
export interface AiInterviewReportList {
|
|
74
109
|
orderToken: string;
|
|
75
110
|
aiModel: AiModel;
|
|
@@ -77,6 +112,9 @@ export interface AiInterviewReportList {
|
|
|
77
112
|
faceUrl: string;
|
|
78
113
|
faceAnalysis: FaceAnalysis;
|
|
79
114
|
evaluations: Array<any>;
|
|
115
|
+
workplaces: WorkPlaceAbility[];
|
|
116
|
+
suggestion: Suggestion;
|
|
117
|
+
summaryText: SummaryText;
|
|
80
118
|
score: number;
|
|
81
119
|
status: number;
|
|
82
120
|
completedStatus: number;
|
|
@@ -6,4 +6,9 @@ interface PostAiInterviewEvaluationData {
|
|
|
6
6
|
manualSuggestions?: Array<string>;
|
|
7
7
|
}
|
|
8
8
|
export declare const PostAiInterviewEvaluation: <R>(data: PostAiInterviewEvaluationData) => import("axios").AxiosPromise<R>;
|
|
9
|
+
interface PostAiInterviewWorkplaceData {
|
|
10
|
+
token: string;
|
|
11
|
+
answer?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const PostAiInterviewWorkplace: <R>(data: PostAiInterviewWorkplaceData) => import("axios").AxiosPromise<R>;
|
|
9
14
|
export {};
|
|
@@ -7,3 +7,7 @@ export var PostAiInterviewRefresh = function (orderID) { return POST({ url: "/st
|
|
|
7
7
|
export var PostAiInterviewEvaluation = function (data) {
|
|
8
8
|
return POST({ url: "/standard/b/aiInterview/aiEvaluation/modify", data: data });
|
|
9
9
|
};
|
|
10
|
+
// 更新职场能力回答
|
|
11
|
+
export var PostAiInterviewWorkplace = function (data) {
|
|
12
|
+
return POST({ url: "/standard/b/aiInterview/workplace/answer/modify", data: data });
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { QuestionCollectionList } from '@/modules/ai-ability/interface';
|
|
3
|
+
export declare const useQuestionCollectionListStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
4
|
+
questionCollectionList: QuestionCollectionList[];
|
|
5
|
+
updateQuestionCollectionList: import("react").Dispatch<import("react").SetStateAction<QuestionCollectionList[]>>;
|
|
6
|
+
}> | undefined) => {
|
|
7
|
+
questionCollectionList: QuestionCollectionList[];
|
|
8
|
+
updateQuestionCollectionList: import("react").Dispatch<import("react").SetStateAction<QuestionCollectionList[]>>;
|
|
9
|
+
}, getQuestionCollectionListStore: () => {
|
|
10
|
+
questionCollectionList: QuestionCollectionList[];
|
|
11
|
+
updateQuestionCollectionList: import("react").Dispatch<import("react").SetStateAction<QuestionCollectionList[]>>;
|
|
12
|
+
} | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { createGlobalStore } from 'hox';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
export var useQuestionCollectionListStore = (_a = createGlobalStore(function () {
|
|
5
|
+
var _a = useState([]), questionCollectionList = _a[0], updateQuestionCollectionList = _a[1];
|
|
6
|
+
return {
|
|
7
|
+
questionCollectionList: questionCollectionList,
|
|
8
|
+
updateQuestionCollectionList: updateQuestionCollectionList,
|
|
9
|
+
};
|
|
10
|
+
}), _a[0]), getQuestionCollectionListStore = _a[1];
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AiAbilityItem } from '@/modules/ai-question/components/AiAssessmentCriteria/interface';
|
|
2
|
+
import { AiAbilityItem, WorkplaceItem } from '@/modules/ai-question/components/AiAssessmentCriteria/interface';
|
|
3
3
|
import { QuestionParams } from '@/modules/ai-question/components/QuestionUpdate/interface';
|
|
4
4
|
interface AnalysisStateParams extends Pick<QuestionParams, 'aiSwitch' | 'language'> {
|
|
5
5
|
}
|
|
6
6
|
export declare const useAiAnalysisStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
7
7
|
aiAbilities: AiAbilityItem[];
|
|
8
|
+
workplaces: WorkplaceItem[];
|
|
8
9
|
analysisState: AnalysisStateParams;
|
|
9
10
|
keyPointAnalysisError: number[];
|
|
10
11
|
updateState: (params: Partial<AnalysisStateParams>) => void;
|
|
11
12
|
updateAiAbilities: (data: AiAbilityItem[], inInit?: any) => void;
|
|
12
13
|
updateAiAbilitiesWeight: (value: string, index: number) => void;
|
|
13
14
|
removeAiAbilities: (index: number) => void;
|
|
15
|
+
updateWorkplaces: (data: WorkplaceItem[]) => void;
|
|
14
16
|
setKeyPointAnalysisError: import("react").Dispatch<import("react").SetStateAction<number[]>>;
|
|
15
17
|
}> | undefined) => {
|
|
16
18
|
aiAbilities: AiAbilityItem[];
|
|
19
|
+
workplaces: WorkplaceItem[];
|
|
17
20
|
analysisState: AnalysisStateParams;
|
|
18
21
|
keyPointAnalysisError: number[];
|
|
19
22
|
updateState: (params: Partial<AnalysisStateParams>) => void;
|
|
20
23
|
updateAiAbilities: (data: AiAbilityItem[], inInit?: any) => void;
|
|
21
24
|
updateAiAbilitiesWeight: (value: string, index: number) => void;
|
|
22
25
|
removeAiAbilities: (index: number) => void;
|
|
26
|
+
updateWorkplaces: (data: WorkplaceItem[]) => void;
|
|
23
27
|
setKeyPointAnalysisError: import("react").Dispatch<import("react").SetStateAction<number[]>>;
|
|
24
28
|
}, AiAnalysisStoreProvider: import("react").FC<{
|
|
25
29
|
children?: import("react").ReactNode;
|
|
@@ -10,18 +10,19 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
var _a;
|
|
13
|
-
import {
|
|
13
|
+
import { useUpdateQuestionStore } from "./question-update-store";
|
|
14
|
+
import { computeDecimalValue, formatNumberDecimal, uniqueId } from "../../utils/utils";
|
|
14
15
|
import { useSetState } from 'ahooks';
|
|
15
16
|
import { createStore } from 'hox';
|
|
16
17
|
import update from 'immutability-helper';
|
|
17
|
-
import {
|
|
18
|
-
import { computeDecimalValue, formatNumberDecimal, uniqueId } from "../../utils/utils";
|
|
18
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
19
19
|
var defaultAnalysisState = { aiSwitch: 2, language: 1 };
|
|
20
20
|
export var useAiAnalysisStore = (_a = createStore(function () {
|
|
21
21
|
var questionState = useUpdateQuestionStore(function (store) { return [store.questionState]; }).questionState;
|
|
22
22
|
var _a = useState([]), aiAbilities = _a[0], setAiAbilities = _a[1];
|
|
23
|
-
var _b =
|
|
24
|
-
var _c =
|
|
23
|
+
var _b = useState([]), workplaces = _b[0], setWorkplaces = _b[1];
|
|
24
|
+
var _c = useSetState(defaultAnalysisState), analysisState = _c[0], setState = _c[1];
|
|
25
|
+
var _d = useState([]), keyPointAnalysisError = _d[0], setKeyPointAnalysisError = _d[1];
|
|
25
26
|
var updateState = function (params) { return setState(params); };
|
|
26
27
|
/**
|
|
27
28
|
* 权重值计算
|
|
@@ -29,6 +30,8 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
29
30
|
*/
|
|
30
31
|
var computeWeight = useCallback(function (data, inInit) {
|
|
31
32
|
if (inInit === void 0) { inInit = false; }
|
|
33
|
+
// isNotCompute 不能计算,不能修改的意思
|
|
34
|
+
console.log('computeWeight AiAbility list', data, inInit);
|
|
32
35
|
var weightList = data.filter(function (_a) {
|
|
33
36
|
var isNotCompute = _a.isNotCompute;
|
|
34
37
|
return !isNotCompute;
|
|
@@ -45,21 +48,27 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
45
48
|
var getWeight = function (_a) {
|
|
46
49
|
var token = _a.token, weight = _a.weight;
|
|
47
50
|
if (weightsLen <= 1 && !inInit) {
|
|
48
|
-
var dataLength = data.
|
|
51
|
+
var dataLength = data.filter(function (_a) {
|
|
52
|
+
var abilityType = _a.abilityType, isWorkplace = _a.isWorkplace;
|
|
53
|
+
return abilityType === 1 || (abilityType === 2 && isWorkplace);
|
|
54
|
+
}).length;
|
|
49
55
|
var averageWeight = Math.floor((100 / dataLength) * 100) / 100;
|
|
50
56
|
var disableWeight = 100 - Math.floor(averageWeight * (dataLength - 1) * 100) / 100;
|
|
51
|
-
|
|
57
|
+
var resWeight = token === data[dataLength - 1].token ? computeDecimalValue(disableWeight.toString()) : computeDecimalValue(averageWeight.toString());
|
|
58
|
+
return resWeight;
|
|
52
59
|
}
|
|
53
60
|
else {
|
|
54
|
-
|
|
55
|
-
return
|
|
61
|
+
var resWeight = lastToken !== token ? weight : computeDecimalValue((100 - beforeTotalWeight).toString());
|
|
62
|
+
return resWeight;
|
|
56
63
|
}
|
|
57
64
|
};
|
|
58
65
|
var $splice = data.map(function (item, i) {
|
|
66
|
+
var weight = item.abilityType === 2 && item.isWorkplace === false ? 0 : getWeight(item);
|
|
67
|
+
console.log('computeWeight', item.name, __assign(__assign({}, item), { weight: weight }));
|
|
59
68
|
return [
|
|
60
69
|
i,
|
|
61
70
|
1,
|
|
62
|
-
__assign(__assign({}, item), { isNotCompute: false, weight:
|
|
71
|
+
__assign(__assign({}, item), { isNotCompute: false, weight: weight }),
|
|
63
72
|
];
|
|
64
73
|
});
|
|
65
74
|
setAiAbilities(update(data, { $splice: $splice }));
|
|
@@ -69,7 +78,6 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
69
78
|
*/
|
|
70
79
|
var updateAiAbilities = useCallback(function (data, inInit) {
|
|
71
80
|
if (inInit === void 0) { inInit = false; }
|
|
72
|
-
console.log(data);
|
|
73
81
|
data.forEach(function (item) {
|
|
74
82
|
if (item.isNotCompute === undefined) {
|
|
75
83
|
item.isNotCompute = true;
|
|
@@ -82,6 +90,9 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
82
90
|
item.extra = JSON.stringify({ expect: 'positive' });
|
|
83
91
|
}
|
|
84
92
|
}
|
|
93
|
+
if (item.abilityType === 2) {
|
|
94
|
+
setWorkplaces([item]);
|
|
95
|
+
}
|
|
85
96
|
});
|
|
86
97
|
computeWeight(data, inInit);
|
|
87
98
|
}, [computeWeight]);
|
|
@@ -90,6 +101,7 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
90
101
|
*/
|
|
91
102
|
var updateAiAbilitiesWeight = useCallback(function (value, index) {
|
|
92
103
|
var _a;
|
|
104
|
+
console.log(value);
|
|
93
105
|
var formatValue = formatNumberDecimal(value);
|
|
94
106
|
var curOriginalWeight = Number(aiAbilities[index].weight);
|
|
95
107
|
var disabledWeight = Number(aiAbilities[aiAbilities.length - 1].weight);
|
|
@@ -104,6 +116,11 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
104
116
|
*/
|
|
105
117
|
var removeAiAbilities = useCallback(function (index) {
|
|
106
118
|
var newAiAbilities = update(aiAbilities, { $splice: [[index, 1]] });
|
|
119
|
+
var WorkplaceLength = newAiAbilities.filter(function (v) { return v.abilityType === 2; }).length;
|
|
120
|
+
if (WorkplaceLength === 0) {
|
|
121
|
+
setWorkplaces([]);
|
|
122
|
+
console.log('222');
|
|
123
|
+
}
|
|
107
124
|
if (newAiAbilities.length) {
|
|
108
125
|
computeWeight(newAiAbilities);
|
|
109
126
|
}
|
|
@@ -111,6 +128,12 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
111
128
|
setAiAbilities(newAiAbilities);
|
|
112
129
|
}
|
|
113
130
|
}, [aiAbilities, computeWeight]);
|
|
131
|
+
/**
|
|
132
|
+
* 更新考察能力分析维度
|
|
133
|
+
*/
|
|
134
|
+
var updateWorkplaces = useCallback(function (data) {
|
|
135
|
+
setWorkplaces(data);
|
|
136
|
+
}, [setWorkplaces]);
|
|
114
137
|
useEffect(function () {
|
|
115
138
|
if (!questionState.open) {
|
|
116
139
|
setTimeout(function () {
|
|
@@ -122,12 +145,14 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
122
145
|
}, [questionState.open, setState]);
|
|
123
146
|
return {
|
|
124
147
|
aiAbilities: aiAbilities,
|
|
148
|
+
workplaces: workplaces,
|
|
125
149
|
analysisState: analysisState,
|
|
126
150
|
keyPointAnalysisError: keyPointAnalysisError,
|
|
127
151
|
updateState: updateState,
|
|
128
152
|
updateAiAbilities: updateAiAbilities,
|
|
129
153
|
updateAiAbilitiesWeight: updateAiAbilitiesWeight,
|
|
130
154
|
removeAiAbilities: removeAiAbilities,
|
|
155
|
+
updateWorkplaces: updateWorkplaces,
|
|
131
156
|
setKeyPointAnalysisError: setKeyPointAnalysisError,
|
|
132
157
|
};
|
|
133
158
|
}), _a[0]), AiAnalysisStoreProvider = _a[1];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28"><defs><linearGradient id="a" x1="36.62%" x2="71.052%" y1="76.01%" y2="4.425%"><stop offset="0%" stop-color="#00B768"/><stop offset="39%" stop-color="#00AF62"/><stop offset="100%" stop-color="#009953"/><stop offset="100%" stop-color="#009953"/></linearGradient></defs><g fill="none" transform="translate(3 7.16)"><rect width="3.109" height="8.176" x="18.116" y="4.824" fill="#00D97C" rx="1.554"/><path fill="#00D97C" d="M21.4330891 1.95993177 21.4367129 1.93267091C21.4403366 1.90483003 21.4433564 1.87466908 21.4457722 1.84798824L21.4457722 1.82072738C21.4457722 1.78476624 21.4500001 1.74822509 21.4500001 1.71168394L21.4500001 1.71168394C21.4502442 1.01957447 21.0163106.395484118 20.3505677.130462712 19.6848249-.134558695 18.9184003.0116886167 18.4087228.50100097 17.8990452.990313327 17.7465029 1.72631363 18.0222352 2.36576189 18.2979675 3.00521015 18.947665 3.42215785 19.6683358 3.42215789L19.6683358 3.42215789 19.6683358 4.1645813C19.8960264 4.05611788 21.1945274 3.17855021 21.4167824 2.03997429 21.4236272 2.01329345 21.4290628 1.98661261 21.4330891 1.95993177ZM15.4605889 10.719948 9.60706759.98260094C9.24145617.374932483 8.56614784.000646522375 7.83536873.000646522375 7.10458966.000646522375 6.42928134.374932483 6.06366994.98260094L5.39026133 2.1037763 5.39026133 2.1037763 4.64920987 3.33515515C4.92547127 2.86174873 5.4452855 2.56740188 6.01035444 2.56440169 6.57542336 2.5614015 7.09859463 2.8502107 7.3802895 3.32065469L7.3802895 3.32065469 12.7367568 12.2303157C13.0172603 12.6974945 13.5359784 12.9854694 14.0975151 12.9857635 14.6590517 12.9860566 15.178096 12.6986244 15.4591292 12.2317392 15.7401622 11.7648541 15.7404885 11.1894469 15.4599849 10.7222681L15.4605889 10.719948Z"/><path fill="url(#a)" d="M7.37968551,3.32065469 C7.09841787,2.85095068 6.57638695,2.56226386 6.01219476,2.56439864 C5.44800258,2.56658124 4.92838341,2.85925359 4.65102173,3.33109501 L1.83840835,8.01126263 C1.83808295,8.0127936 1.83808295,8.01437187 1.83840835,8.01590276 L0.210148599,10.719948 C-0.0703549557,11.1871269 -0.0700287417,11.762534 0.21100436,12.2294192 C0.49203746,12.6963044 1.01108183,12.9837366 1.57261848,12.9834434 C2.13415513,12.9831493 2.65287327,12.6951745 2.9333768,12.2279956 L7.83506677,4.07409845 L7.38089343,3.32007467 L7.37968551,3.32065469 Z"/></g></svg>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
var SvgIcon_1 = __importDefault(require("../SvgIcon"));
|
|
19
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
20
|
+
var AiHeaderTitle = function (_a) {
|
|
21
|
+
var name = _a.name;
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "inline-flex" }, { children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.default, { name: "AI" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "h6", fontWeight: "medium", sx: { fontWeight: 500 }, ml: 1 }, { children: name }))] })));
|
|
23
|
+
};
|
|
24
|
+
exports.default = AiHeaderTitle;
|
|
@@ -24,20 +24,20 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
|
-
var echarts = __importStar(require("echarts"));
|
|
28
27
|
var react_1 = require("react");
|
|
28
|
+
var echarts = __importStar(require("echarts"));
|
|
29
29
|
var charts = {};
|
|
30
30
|
var Chart = function (_a) {
|
|
31
31
|
var _b = _a.id, id = _b === void 0 ? '' : _b, options = _a.options;
|
|
32
32
|
var currentId = (0, react_1.useRef)('');
|
|
33
33
|
var target = (0, react_1.useRef)(null);
|
|
34
34
|
(0, react_1.useEffect)(function () {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
if (id && !charts[id] && options) {
|
|
36
|
+
currentId.current = id;
|
|
37
|
+
charts[id] = echarts.init(target.current);
|
|
38
|
+
charts[id].resize();
|
|
39
|
+
charts[id].setOption(options, true);
|
|
40
|
+
}
|
|
41
41
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
42
42
|
}, [id, options]);
|
|
43
43
|
(0, react_1.useEffect)(function () {
|
|
@@ -49,7 +49,7 @@ var Chart = function (_a) {
|
|
|
49
49
|
};
|
|
50
50
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
51
51
|
}, []);
|
|
52
|
-
return ((0, jsx_runtime_1.jsx)("div", {
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: target, style: {
|
|
53
53
|
width: '100%',
|
|
54
54
|
height: '100%',
|
|
55
55
|
} }));
|
|
@@ -26,8 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
29
|
-
var const_1 = require("./const");
|
|
30
29
|
var Chart_1 = __importDefault(require("./Chart"));
|
|
30
|
+
var const_1 = require("./const");
|
|
31
31
|
var formateTitle = function (originalTitle) {
|
|
32
32
|
var regex = /(\d+?)[.](.+)/;
|
|
33
33
|
if (!regex.test(originalTitle))
|
|
@@ -15,17 +15,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
-
var
|
|
18
|
+
var const_1 = require("./const");
|
|
19
|
+
var MainPoints_1 = __importDefault(require("./MainPoints"));
|
|
20
|
+
var ai_analysis_store_1 = require("../../../../store/ai-question/ai-analysis-store");
|
|
19
21
|
var fbm_ui_1 = require("fbm-ui");
|
|
20
22
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
21
23
|
var immutability_helper_1 = __importDefault(require("immutability-helper"));
|
|
22
|
-
var
|
|
23
|
-
var const_1 = require("./const");
|
|
24
|
-
var MainPoints_1 = __importDefault(require("./MainPoints"));
|
|
24
|
+
var react_1 = require("react");
|
|
25
25
|
var AnalysisItem = function (props) {
|
|
26
26
|
var _a;
|
|
27
|
-
var name = props.name,
|
|
28
|
-
var
|
|
27
|
+
var name = props.name, weight = props.weight, type = props.type, extra = props.extra, index = props.index, _b = props.abilityType, abilityType = _b === void 0 ? 1 : _b, isWorkplace = props.isWorkplace;
|
|
28
|
+
var _c = (0, ai_analysis_store_1.useAiAnalysisStore)(function (store) { return [store.aiAbilities]; }), aiAbilities = _c.aiAbilities, updateAiAbilities = _c.updateAiAbilities, updateAiAbilitiesWeight = _c.updateAiAbilitiesWeight, removeAiAbilities = _c.removeAiAbilities;
|
|
29
|
+
var desc = props.desc || props.name;
|
|
30
|
+
var NotUsedAilibity = ['英文能力', '游戏测评'];
|
|
31
|
+
if (abilityType === 2 && !isWorkplace) {
|
|
32
|
+
desc = "".concat(NotUsedAilibity.includes(name) ? name : '自定义能力', "\u4E0D\u80FD\u53C2\u4E0EAI\u5206\u6790");
|
|
33
|
+
}
|
|
29
34
|
var handleRemove = (0, react_1.useCallback)(function () {
|
|
30
35
|
removeAiAbilities(index);
|
|
31
36
|
}, [index, removeAiAbilities]);
|
|
@@ -39,6 +44,6 @@ var AnalysisItem = function (props) {
|
|
|
39
44
|
var value = _a.target.value;
|
|
40
45
|
updateAiAbilitiesWeight(value, index);
|
|
41
46
|
}, [updateAiAbilitiesWeight, index]);
|
|
42
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsxs)(mui_1.ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) })) }, { children: [(0, jsx_runtime_1.jsx)(mui_1.ListItemText, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle2" }, { children: name })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(desc) }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) })), type === 8 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { sx: { width: 150, ml: 1 }, options: const_1.willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange })] })), type === 6 && (0, jsx_runtime_1.jsx)(MainPoints_1.default, { extra: extra, index: index })] }));
|
|
47
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsxs)(mui_1.ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) })) }, { children: [(0, jsx_runtime_1.jsx)(mui_1.ListItemText, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle2" }, { children: name })), abilityType === 2 && !isWorkplace ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(desc) }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))), type === 8 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { sx: { width: 150, ml: 1 }, options: const_1.willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), type === 6 && (0, jsx_runtime_1.jsx)(MainPoints_1.default, { extra: extra, index: index })] }));
|
|
43
48
|
};
|
|
44
49
|
exports.default = AnalysisItem;
|
|
@@ -15,26 +15,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
-
var react_1 = require("react");
|
|
19
|
-
var fbm_ui_1 = require("fbm-ui");
|
|
20
|
-
var mui_1 = require("fbm-ui/lib/mui");
|
|
21
|
-
var ai_analysis_store_1 = require("../../../../store/ai-question/ai-analysis-store");
|
|
22
18
|
var AiAssessmentCriteria_1 = __importDefault(require("../AiAssessmentCriteria"));
|
|
23
19
|
var const_1 = require("../AiAssessmentCriteria/const");
|
|
24
20
|
var AnalysisItem_1 = __importDefault(require("./AnalysisItem"));
|
|
21
|
+
var ai_analysis_store_1 = require("../../../../store/ai-question/ai-analysis-store");
|
|
22
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
23
|
+
var mui_1 = require("fbm-ui/lib/mui");
|
|
24
|
+
var react_1 = require("react");
|
|
25
25
|
var AiAnalysis = function () {
|
|
26
|
-
var _a = (0, ai_analysis_store_1.useAiAnalysisStore)(function (store) { return [store.aiAbilities, store.analysisState]; }), aiAbilities = _a.aiAbilities, analysisState = _a.analysisState
|
|
26
|
+
var _a = (0, ai_analysis_store_1.useAiAnalysisStore)(function (store) { return [store.aiAbilities, store.analysisState]; }), aiAbilities = _a.aiAbilities, analysisState = _a.analysisState;
|
|
27
27
|
var _b = (0, react_1.useState)(false), aiAnalysisOpen = _b[0], setAiAnalysisOpen = _b[1];
|
|
28
|
-
var
|
|
29
|
-
var isOpenAiAnalysis =
|
|
30
|
-
|
|
31
|
-
if (language !== undefined) {
|
|
32
|
-
updateState({ aiSwitch: checked ? 1 : 2 });
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
setAiAnalysisOpen(true);
|
|
36
|
-
}
|
|
37
|
-
}, [language, updateState]);
|
|
38
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [aiAnalysisOpen && (0, jsx_runtime_1.jsx)(AiAssessmentCriteria_1.default, { open: aiAnalysisOpen, onClose: function () { return setAiAnalysisOpen(false); } }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", ml: "1px" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: isOpenAiAnalysis, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u5F00\u542FAI\u5206\u6790" })), onChange: handleAiSwitch }), isOpenAiAnalysis && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: ["\u8BED\u79CD\uFF1A", language && const_1.LANGUAGE_NAMES[language]] })))] })), isOpenAiAnalysis && aiAbilities.length > 0 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", display: "block", width: 122 }, { children: "\u6743\u91CD\uFF1A" })))] })), isOpenAiAnalysis && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [aiAbilities.length ? ((0, jsx_runtime_1.jsx)(mui_1.List, { children: aiAbilities.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(AnalysisItem_1.default, __assign({ index: index }, item), item.token)); }) })) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", sx: { mt: 1, mb: 1 } }, { children: "\u672A\u9009\u62E9 AI \u8BC4\u5206\u7EF4\u5EA6,\u6D4B\u8BD5\u62A5\u544A\u4E0D\u4F1A\u5BF9\u5019\u9009\u4EBA\u8FDB\u884C\u8BC4\u5206" }))), (0, jsx_runtime_1.jsx)(mui_1.Divider, { sx: { mb: 1 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: function () { return setAiAnalysisOpen(true); } }, { children: "\u6DFB\u52A0AI\u5206\u6790\u7EF4\u5EA6" }))] }))] }));
|
|
28
|
+
var language = analysisState.language;
|
|
29
|
+
var isOpenAiAnalysis = aiAbilities.length > 0;
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [aiAnalysisOpen && (0, jsx_runtime_1.jsx)(AiAssessmentCriteria_1.default, { open: aiAnalysisOpen, onClose: function () { return setAiAnalysisOpen(false); } }), isOpenAiAnalysis && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: "\u6743\u91CD\u8BBE\u7F6E" })), language && const_1.LANGUAGE_NAMES[language] && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: "8px" }, { children: ["\u8BED\u79CD\uFF1A", language && const_1.LANGUAGE_NAMES[language]] })))] })) }))), aiAbilities.length > 0 && ((0, jsx_runtime_1.jsx)(mui_1.List, { children: aiAbilities.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(AnalysisItem_1.default, __assign({ index: index }, item), item.token)); }) })), (0, jsx_runtime_1.jsx)(mui_1.Divider, { sx: { mb: 1 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: function () { return setAiAnalysisOpen(true); } }, { children: "\u6DFB\u52A0AI\u5206\u6790\u7EF4\u5EA6" }))] }));
|
|
39
31
|
};
|
|
40
32
|
exports.default = AiAnalysis;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a, _b;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.SERVER_LANGUAGE_TYPE = exports.CATEGORY_NAME = exports.LANGUAGE_NAMES = void 0;
|
|
4
|
+
exports.LANGUAGE_SHOW_NAME = exports.SERVER_LANGUAGE_TYPE = exports.CATEGORY_NAME = exports.LANGUAGE_NAMES = void 0;
|
|
5
5
|
var ai_question_1 = require("../../../../enum/ai-question");
|
|
6
6
|
var MANDARIN = ai_question_1.LANGUAGE_TYPE.MANDARIN, CANTONESE = ai_question_1.LANGUAGE_TYPE.CANTONESE, JAPANESE = ai_question_1.LANGUAGE_TYPE.JAPANESE, ENGLISH = ai_question_1.LANGUAGE_TYPE.ENGLISH;
|
|
7
7
|
var LANGUAGE = ai_question_1.CATEGORY_TYPE.LANGUAGE, SEMANTICS = ai_question_1.CATEGORY_TYPE.SEMANTICS, EXPRESSION = ai_question_1.CATEGORY_TYPE.EXPRESSION, FORM = ai_question_1.CATEGORY_TYPE.FORM, LANGUAGE_ABILITY = ai_question_1.CATEGORY_TYPE.LANGUAGE_ABILITY;
|
|
@@ -24,3 +24,10 @@ exports.SERVER_LANGUAGE_TYPE = (_b = {},
|
|
|
24
24
|
_b[ENGLISH] = 3,
|
|
25
25
|
_b[CANTONESE] = 4,
|
|
26
26
|
_b);
|
|
27
|
+
// 由于语种value 和 name的映射不对应,这里用于前端显示 AI基础能力 中文|英文表达
|
|
28
|
+
exports.LANGUAGE_SHOW_NAME = {
|
|
29
|
+
2: '中文',
|
|
30
|
+
13: '中文',
|
|
31
|
+
12: '日语',
|
|
32
|
+
11: '英文',
|
|
33
|
+
};
|