eli-video-interview 1.2.23 → 1.2.25
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/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 +24 -23
- 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 +41 -8
- 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 +7 -3
- package/esm/store/ai-question/ai-analysis-store.js +24 -10
- 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 +24 -23
- 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 +41 -8
- 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 +7 -3
- package/lib/store/ai-question/ai-analysis-store.js +24 -10
- package/package.json +1 -7
|
@@ -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
|
-
updateAiAbilities: (data: AiAbilityItem[], inInit?: any) => void;
|
|
12
|
+
updateAiAbilities: (data: AiAbilityItem[], inInit?: any, isWorkplaceChange?: 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
|
-
updateAiAbilities: (data: AiAbilityItem[], inInit?: any) => void;
|
|
23
|
+
updateAiAbilities: (data: AiAbilityItem[], inInit?: any, isWorkplaceChange?: 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,25 +10,27 @@ 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
|
* 权重值计算
|
|
28
29
|
* @param steps 模型数据
|
|
29
30
|
*/
|
|
30
|
-
var computeWeight = useCallback(function (data, inInit) {
|
|
31
|
+
var computeWeight = useCallback(function (data, inInit, isWorkplaceChange) {
|
|
31
32
|
if (inInit === void 0) { inInit = false; }
|
|
33
|
+
if (isWorkplaceChange === void 0) { isWorkplaceChange = false; }
|
|
32
34
|
var weightList = data.filter(function (_a) {
|
|
33
35
|
var isNotCompute = _a.isNotCompute;
|
|
34
36
|
return !isNotCompute;
|
|
@@ -44,7 +46,7 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
44
46
|
}).reduce(function (pv, i) { return pv + i; }, 0);
|
|
45
47
|
var getWeight = function (_a) {
|
|
46
48
|
var token = _a.token, weight = _a.weight;
|
|
47
|
-
if (weightsLen <= 1 && !inInit) {
|
|
49
|
+
if (weightsLen <= 1 && !inInit && isWorkplaceChange) {
|
|
48
50
|
var dataLength = data.length;
|
|
49
51
|
var averageWeight = Math.floor((100 / dataLength) * 100) / 100;
|
|
50
52
|
var disableWeight = 100 - Math.floor(averageWeight * (dataLength - 1) * 100) / 100;
|
|
@@ -59,7 +61,7 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
59
61
|
return [
|
|
60
62
|
i,
|
|
61
63
|
1,
|
|
62
|
-
__assign(__assign({}, item), { isNotCompute: false, weight: getWeight(item) }),
|
|
64
|
+
__assign(__assign({}, item), { isNotCompute: false, weight: isWorkplaceChange ? item.weight : getWeight(item) }),
|
|
63
65
|
];
|
|
64
66
|
});
|
|
65
67
|
setAiAbilities(update(data, { $splice: $splice }));
|
|
@@ -67,8 +69,9 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
67
69
|
/**
|
|
68
70
|
* 更新AI分析维度
|
|
69
71
|
*/
|
|
70
|
-
var updateAiAbilities = useCallback(function (data, inInit) {
|
|
72
|
+
var updateAiAbilities = useCallback(function (data, inInit, isWorkplaceChange) {
|
|
71
73
|
if (inInit === void 0) { inInit = false; }
|
|
74
|
+
if (isWorkplaceChange === void 0) { isWorkplaceChange = false; }
|
|
72
75
|
console.log(data);
|
|
73
76
|
data.forEach(function (item) {
|
|
74
77
|
if (item.isNotCompute === undefined) {
|
|
@@ -82,8 +85,11 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
82
85
|
item.extra = JSON.stringify({ expect: 'positive' });
|
|
83
86
|
}
|
|
84
87
|
}
|
|
88
|
+
if (item.abilityType === 2) {
|
|
89
|
+
// setWorkplaces([item]);
|
|
90
|
+
}
|
|
85
91
|
});
|
|
86
|
-
computeWeight(data, inInit);
|
|
92
|
+
computeWeight(data, inInit, isWorkplaceChange);
|
|
87
93
|
}, [computeWeight]);
|
|
88
94
|
/**
|
|
89
95
|
* 更新AI分析维度权重
|
|
@@ -111,6 +117,12 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
111
117
|
setAiAbilities(newAiAbilities);
|
|
112
118
|
}
|
|
113
119
|
}, [aiAbilities, computeWeight]);
|
|
120
|
+
/**
|
|
121
|
+
* 更新考察能力分析维度
|
|
122
|
+
*/
|
|
123
|
+
var updateWorkplaces = useCallback(function (data) {
|
|
124
|
+
setWorkplaces(data);
|
|
125
|
+
}, [setWorkplaces]);
|
|
114
126
|
useEffect(function () {
|
|
115
127
|
if (!questionState.open) {
|
|
116
128
|
setTimeout(function () {
|
|
@@ -122,12 +134,14 @@ export var useAiAnalysisStore = (_a = createStore(function () {
|
|
|
122
134
|
}, [questionState.open, setState]);
|
|
123
135
|
return {
|
|
124
136
|
aiAbilities: aiAbilities,
|
|
137
|
+
workplaces: workplaces,
|
|
125
138
|
analysisState: analysisState,
|
|
126
139
|
keyPointAnalysisError: keyPointAnalysisError,
|
|
127
140
|
updateState: updateState,
|
|
128
141
|
updateAiAbilities: updateAiAbilities,
|
|
129
142
|
updateAiAbilitiesWeight: updateAiAbilitiesWeight,
|
|
130
143
|
removeAiAbilities: removeAiAbilities,
|
|
144
|
+
updateWorkplaces: updateWorkplaces,
|
|
131
145
|
setKeyPointAnalysisError: setKeyPointAnalysisError,
|
|
132
146
|
};
|
|
133
147
|
}), _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
|
+
};
|
|
@@ -15,16 +15,16 @@ 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
|
|
19
|
-
var
|
|
20
|
-
var mui_1 = require("fbm-ui/lib/mui");
|
|
21
|
-
var ahooks_1 = require("ahooks");
|
|
18
|
+
var const_1 = require("./const");
|
|
19
|
+
var utils_1 = require("./utils");
|
|
22
20
|
var ScrollDialogContent_1 = __importDefault(require("../../../../components/ScrollDialogContent"));
|
|
23
21
|
var ai_question_1 = require("../../../../enum/ai-question");
|
|
24
22
|
var ai_question_2 = require("../../../../services/ai-question");
|
|
25
23
|
var ai_analysis_store_1 = require("../../../../store/ai-question/ai-analysis-store");
|
|
26
|
-
var
|
|
27
|
-
var
|
|
24
|
+
var ahooks_1 = require("ahooks");
|
|
25
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
26
|
+
var mui_1 = require("fbm-ui/lib/mui");
|
|
27
|
+
var react_1 = require("react");
|
|
28
28
|
var MANDARIN = ai_question_1.LANGUAGE_TYPE.MANDARIN, CANTONESE = ai_question_1.LANGUAGE_TYPE.CANTONESE;
|
|
29
29
|
var AiAssessmentCriteria = function (props) {
|
|
30
30
|
var open = props.open, onClose = props.onClose;
|
|
@@ -62,6 +62,7 @@ var AiAssessmentCriteria = function (props) {
|
|
|
62
62
|
setCheckAbilities((_a = {}, _a[key] = undefined, _a));
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
+
console.log(language);
|
|
65
66
|
setLanguage(language);
|
|
66
67
|
setCheckedChinese([MANDARIN, CANTONESE].includes(language));
|
|
67
68
|
setRelatedAbilities(item === null || item === void 0 ? void 0 : item.relatedAbilities);
|
|
@@ -84,23 +85,23 @@ var AiAssessmentCriteria = function (props) {
|
|
|
84
85
|
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, { children: [(list.filter(function (_a) {
|
|
85
86
|
var type = _a.type;
|
|
86
87
|
return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
|
|
87
|
-
}).length > 0 || type === ai_question_1.CATEGORY_TYPE.LANGUAGE) && ((0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsxs)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 14, color: 'rgba(0,0,0,0.86)' } }, { children: [name, type === ai_question_1.CATEGORY_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsxs)(fbm_ui_1.RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.RadioGroup, __assign({ value: language, sx: { ml: 3 }, onChange: function (e) { return onLanguageChange(e, list); } }, { children: list
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
88
|
+
}).length > 0 || type === ai_question_1.CATEGORY_TYPE.LANGUAGE) && ((0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsxs)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 14, fontWeight: 400, color: 'rgba(0,0,0,0.86)' } }, { children: [type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ style: { fontSize: 16, fontWeight: 500 } }, { children: name }))) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { children: type === ai_question_1.CATEGORY_TYPE.EXPRESSION ? const_1.LANGUAGE_SHOW_NAME[language] + name : name })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsxs)(mui_1.Box, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.RadioGroup, __assign({ value: language, sx: { ml: 3 }, onChange: function (e) { return onLanguageChange(e, list); } }, { children: list
|
|
89
|
+
.filter(function (_a) {
|
|
90
|
+
var type = _a.type;
|
|
91
|
+
return [MANDARIN, CANTONESE].includes(type);
|
|
92
|
+
})
|
|
93
|
+
.map(function (_a) {
|
|
94
|
+
var name = _a.name, type = _a.type, token = _a.token;
|
|
95
|
+
return checkedChinese && (0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: type, label: name }, token);
|
|
96
|
+
}) })), list
|
|
97
|
+
.filter(function (_a) {
|
|
98
|
+
var type = _a.type;
|
|
99
|
+
return ![MANDARIN, CANTONESE].includes(type);
|
|
100
|
+
})
|
|
101
|
+
.map(function (_a) {
|
|
102
|
+
var name = _a.name, type = _a.type, token = _a.token;
|
|
103
|
+
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: type, label: name }, token));
|
|
104
|
+
})] })), (0, jsx_runtime_1.jsx)(mui_1.Divider, { sx: { mb: 1 } }), (0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsx)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 16, color: 'rgba(0,0,0,0.86)', fontWeight: 500, marginBottom: 16 } }, { children: "AI\u57FA\u7840\u80FD\u529B" })) })] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: list.map(function (item) {
|
|
104
105
|
var name = item.name, desc = item.desc, type = item.type, token = item.token;
|
|
105
106
|
if (relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type)) {
|
|
106
107
|
var isLanguageAbility = [14, 15].includes(type);
|
|
@@ -9,6 +9,12 @@ export interface AiAbilityItem extends BaseAiAbilityParams {
|
|
|
9
9
|
groupName?: string;
|
|
10
10
|
isNotCompute?: boolean;
|
|
11
11
|
}
|
|
12
|
+
export interface WorkplaceItem {
|
|
13
|
+
token: string;
|
|
14
|
+
name: string;
|
|
15
|
+
weight: number | string;
|
|
16
|
+
isWorkplace?: boolean;
|
|
17
|
+
}
|
|
12
18
|
export declare type GroupCategoryRet = Array<{
|
|
13
19
|
name: string;
|
|
14
20
|
type: number;
|
|
@@ -15,17 +15,17 @@ 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 ahooks_1 = require("ahooks");
|
|
20
|
-
var ai_question_1 = require("../../../../services/ai-question");
|
|
21
|
-
var global_store_1 = require("../../../../store/ai-question/global-store");
|
|
22
|
-
var question_model_store_1 = require("../../../../store/ai-question/question-model-store");
|
|
23
|
-
var question_template_store_1 = require("../../../../store/ai-question/question-template-store");
|
|
24
18
|
var const_1 = require("../QuestionUpdate/const");
|
|
25
19
|
var Header_1 = __importDefault(require("./Header"));
|
|
26
20
|
var List_1 = __importDefault(require("./List"));
|
|
27
21
|
var Skeleton_1 = __importDefault(require("./Skeleton"));
|
|
28
22
|
var styled_1 = require("./styled");
|
|
23
|
+
var ai_question_1 = require("../../../../services/ai-question");
|
|
24
|
+
var global_store_1 = require("../../../../store/ai-question/global-store");
|
|
25
|
+
var question_model_store_1 = require("../../../../store/ai-question/question-model-store");
|
|
26
|
+
var question_template_store_1 = require("../../../../store/ai-question/question-template-store");
|
|
27
|
+
var ahooks_1 = require("ahooks");
|
|
28
|
+
var react_1 = require("react");
|
|
29
29
|
var Question = function () {
|
|
30
30
|
var isDefaultAdded = (0, react_1.useRef)(false);
|
|
31
31
|
var _a = (0, global_store_1.useAiQuestionStore)(function (store) { return [store.token, store.name, store.templateList]; }), token = _a.token, name = _a.name, templateList = _a.templateList, onLoad = _a.onLoad;
|