eli-video-interview 1.2.34-beta.1 → 1.2.34-beta.2
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/modules/ai-question/components/AiAnalysis/AnalysisItem.js +2 -2
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +15 -4
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +1 -0
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +0 -6
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +2 -2
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +15 -4
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +1 -0
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +0 -6
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ import update from 'immutability-helper';
|
|
|
19
19
|
import { useCallback } from 'react';
|
|
20
20
|
var AnalysisItem = function (props) {
|
|
21
21
|
var _a;
|
|
22
|
-
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
|
|
22
|
+
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;
|
|
23
23
|
var _c = useAiAnalysisStore(function (store) { return [store.aiAbilities]; }), aiAbilities = _c.aiAbilities, updateAiAbilities = _c.updateAiAbilities, updateAiAbilitiesWeight = _c.updateAiAbilitiesWeight, removeAiAbilities = _c.removeAiAbilities;
|
|
24
24
|
var desc = props.desc || props.name;
|
|
25
25
|
var NotUsedAilibity = ['英文能力', '游戏测评'];
|
|
@@ -39,6 +39,6 @@ var AnalysisItem = function (props) {
|
|
|
39
39
|
var value = _a.target.value;
|
|
40
40
|
updateAiAbilitiesWeight(value, index);
|
|
41
41
|
}, [updateAiAbilitiesWeight, index]);
|
|
42
|
-
return (_jsxs(Box, { children: [_jsxs(ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: _jsx(IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: _jsx(CloseIcon, {}) })) }, { children: [_jsx(ListItemText, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: name })), abilityType === 2 && !isWorkplace ? (_jsx(Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : (_jsxs(_Fragment, { children: [abilityType === 2 && isWorkplace &&
|
|
42
|
+
return (_jsxs(Box, { children: [_jsxs(ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: _jsx(IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: _jsx(CloseIcon, {}) })) }, { children: [_jsx(ListItemText, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: name })), abilityType === 2 && !isWorkplace ? (_jsx(Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : (_jsxs(_Fragment, { children: [abilityType === 2 && isWorkplace && type === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), _jsx(Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && (_jsx(Select, { sx: { width: 150, ml: 1 }, options: willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && (_jsx(Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), type === 6 && _jsx(MainPoints, { extra: extra, index: index })] }));
|
|
43
43
|
};
|
|
44
44
|
export default AnalysisItem;
|
|
@@ -44,6 +44,17 @@ var AiAssessmentCriteria = function (props) {
|
|
|
44
44
|
setGroupData(ret);
|
|
45
45
|
},
|
|
46
46
|
}).loading;
|
|
47
|
+
// fix: type = 3 是考察能力的type, 与AI维度中语义流畅的type 重复了, 会引起默认选中
|
|
48
|
+
var fixSetCheckAbilities = useCallback(function (p) {
|
|
49
|
+
for (var key in p) {
|
|
50
|
+
if (Object.prototype.hasOwnProperty.call(p, key)) {
|
|
51
|
+
var element = p[key];
|
|
52
|
+
if (element && element.abilityType === 2)
|
|
53
|
+
return;
|
|
54
|
+
setCheckAbilities(p);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, [setCheckAbilities]);
|
|
47
58
|
var onLanguageChange = function (_a, list) {
|
|
48
59
|
var value = _a.target.value;
|
|
49
60
|
var language = Number(value === '0' ? MANDARIN : value);
|
|
@@ -54,7 +65,7 @@ var AiAssessmentCriteria = function (props) {
|
|
|
54
65
|
Object.keys(checkAbilities).forEach(function (key) {
|
|
55
66
|
var _a;
|
|
56
67
|
if (!(item === null || item === void 0 ? void 0 : item.relatedAbilities.includes(Number(key)))) {
|
|
57
|
-
|
|
68
|
+
fixSetCheckAbilities((_a = {}, _a[key] = undefined, _a));
|
|
58
69
|
}
|
|
59
70
|
});
|
|
60
71
|
console.log(language);
|
|
@@ -72,9 +83,9 @@ var AiAssessmentCriteria = function (props) {
|
|
|
72
83
|
useEffect(function () {
|
|
73
84
|
aiAbilities.forEach(function (item) {
|
|
74
85
|
var _a;
|
|
75
|
-
return
|
|
86
|
+
return fixSetCheckAbilities((_a = {}, _a[item.type] = item, _a));
|
|
76
87
|
});
|
|
77
|
-
}, [aiAbilities,
|
|
88
|
+
}, [aiAbilities, fixSetCheckAbilities]);
|
|
78
89
|
return (_jsx(Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u6807\u51C6", size: "sm", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: loading ? (_jsx(Box, __assign({ height: 400 }, { children: _jsx(Loading, { size: 40 }) }))) : (groupData.map(function (_a) {
|
|
79
90
|
var name = _a.name, type = _a.type, list = _a.list;
|
|
80
91
|
return (_jsxs(Box, { children: [(list.filter(function (_a) {
|
|
@@ -102,7 +113,7 @@ var AiAssessmentCriteria = function (props) {
|
|
|
102
113
|
var isLanguageAbility = [14, 15].includes(type);
|
|
103
114
|
return (_jsxs(Box, __assign({ padding: "4px 0 4px 4px", display: "flex", flexDirection: "column" }, { children: [_jsx(Checkbox, { checked: !!checkAbilities[type], label: isLanguageAbility ? desc : name, onChange: function (e, checked) {
|
|
104
115
|
var _a;
|
|
105
|
-
return
|
|
116
|
+
return fixSetCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
|
|
106
117
|
} }), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: "26px" }, { children: isLanguageAbility ? '' : desc }))] }), token));
|
|
107
118
|
}
|
|
108
119
|
return null;
|
|
@@ -130,9 +130,6 @@ var QuestionUpdate = function () {
|
|
|
130
130
|
}
|
|
131
131
|
return __assign(__assign({}, i), { extra: JSON.stringify(extra_1) });
|
|
132
132
|
}
|
|
133
|
-
if (i.type === 103) {
|
|
134
|
-
i.type = 3;
|
|
135
|
-
}
|
|
136
133
|
return i;
|
|
137
134
|
})
|
|
138
135
|
.filter(function (v) { return v.abilityType === 1 || (v.abilityType === 2 && v.isWorkplace); });
|
|
@@ -218,9 +215,6 @@ var QuestionUpdate = function () {
|
|
|
218
215
|
var CurWorkPlaceAiAbility = __assign(__assign(__assign({}, curSelectWorkPlace), CurWorkplace), { abilityType: 2, weight: 0, sort: 0 });
|
|
219
216
|
inInit = workplaceTypeIndex === -1;
|
|
220
217
|
CurWorkPlaceAiAbility.desc = CurWorkPlaceAiAbility.define ? CurWorkPlaceAiAbility.define : CurWorkPlaceAiAbility.name;
|
|
221
|
-
if (CurWorkPlaceAiAbility.type === 3 && CurWorkPlaceAiAbility.isWorkplace) {
|
|
222
|
-
CurWorkPlaceAiAbility.type = 103;
|
|
223
|
-
}
|
|
224
218
|
// console.log('CurWorkPlaceAiAbility', CurWorkPlaceAiAbility);
|
|
225
219
|
// 添加和修改
|
|
226
220
|
if (workplaceTypeIndex > -1) {
|
|
@@ -24,7 +24,7 @@ var immutability_helper_1 = __importDefault(require("immutability-helper"));
|
|
|
24
24
|
var react_1 = require("react");
|
|
25
25
|
var AnalysisItem = function (props) {
|
|
26
26
|
var _a;
|
|
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
|
|
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
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
29
|
var desc = props.desc || props.name;
|
|
30
30
|
var NotUsedAilibity = ['英文能力', '游戏测评'];
|
|
@@ -44,6 +44,6 @@ var AnalysisItem = function (props) {
|
|
|
44
44
|
var value = _a.target.value;
|
|
45
45
|
updateAiAbilitiesWeight(value, index);
|
|
46
46
|
}, [updateAiAbilitiesWeight, 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", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { 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.jsxs)(jsx_runtime_1.Fragment, { children: [abilityType === 2 && isWorkplace &&
|
|
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", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { 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.jsxs)(jsx_runtime_1.Fragment, { children: [abilityType === 2 && isWorkplace && type === 3 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { 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 })] }));
|
|
48
48
|
};
|
|
49
49
|
exports.default = AnalysisItem;
|
|
@@ -49,6 +49,17 @@ var AiAssessmentCriteria = function (props) {
|
|
|
49
49
|
setGroupData(ret);
|
|
50
50
|
},
|
|
51
51
|
}).loading;
|
|
52
|
+
// fix: type = 3 是考察能力的type, 与AI维度中语义流畅的type 重复了, 会引起默认选中
|
|
53
|
+
var fixSetCheckAbilities = (0, react_1.useCallback)(function (p) {
|
|
54
|
+
for (var key in p) {
|
|
55
|
+
if (Object.prototype.hasOwnProperty.call(p, key)) {
|
|
56
|
+
var element = p[key];
|
|
57
|
+
if (element && element.abilityType === 2)
|
|
58
|
+
return;
|
|
59
|
+
setCheckAbilities(p);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}, [setCheckAbilities]);
|
|
52
63
|
var onLanguageChange = function (_a, list) {
|
|
53
64
|
var value = _a.target.value;
|
|
54
65
|
var language = Number(value === '0' ? MANDARIN : value);
|
|
@@ -59,7 +70,7 @@ var AiAssessmentCriteria = function (props) {
|
|
|
59
70
|
Object.keys(checkAbilities).forEach(function (key) {
|
|
60
71
|
var _a;
|
|
61
72
|
if (!(item === null || item === void 0 ? void 0 : item.relatedAbilities.includes(Number(key)))) {
|
|
62
|
-
|
|
73
|
+
fixSetCheckAbilities((_a = {}, _a[key] = undefined, _a));
|
|
63
74
|
}
|
|
64
75
|
});
|
|
65
76
|
console.log(language);
|
|
@@ -77,9 +88,9 @@ var AiAssessmentCriteria = function (props) {
|
|
|
77
88
|
(0, react_1.useEffect)(function () {
|
|
78
89
|
aiAbilities.forEach(function (item) {
|
|
79
90
|
var _a;
|
|
80
|
-
return
|
|
91
|
+
return fixSetCheckAbilities((_a = {}, _a[item.type] = item, _a));
|
|
81
92
|
});
|
|
82
|
-
}, [aiAbilities,
|
|
93
|
+
}, [aiAbilities, fixSetCheckAbilities]);
|
|
83
94
|
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u6807\u51C6", size: "sm", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: loading ? ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ height: 400 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Loading, { size: 40 }) }))) : (groupData.map(function (_a) {
|
|
84
95
|
var name = _a.name, type = _a.type, list = _a.list;
|
|
85
96
|
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, { children: [(list.filter(function (_a) {
|
|
@@ -107,7 +118,7 @@ var AiAssessmentCriteria = function (props) {
|
|
|
107
118
|
var isLanguageAbility = [14, 15].includes(type);
|
|
108
119
|
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ padding: "4px 0 4px 4px", display: "flex", flexDirection: "column" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: !!checkAbilities[type], label: isLanguageAbility ? desc : name, onChange: function (e, checked) {
|
|
109
120
|
var _a;
|
|
110
|
-
return
|
|
121
|
+
return fixSetCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
|
|
111
122
|
} }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: "26px" }, { children: isLanguageAbility ? '' : desc }))] }), token));
|
|
112
123
|
}
|
|
113
124
|
return null;
|
|
@@ -135,9 +135,6 @@ var QuestionUpdate = function () {
|
|
|
135
135
|
}
|
|
136
136
|
return __assign(__assign({}, i), { extra: JSON.stringify(extra_1) });
|
|
137
137
|
}
|
|
138
|
-
if (i.type === 103) {
|
|
139
|
-
i.type = 3;
|
|
140
|
-
}
|
|
141
138
|
return i;
|
|
142
139
|
})
|
|
143
140
|
.filter(function (v) { return v.abilityType === 1 || (v.abilityType === 2 && v.isWorkplace); });
|
|
@@ -223,9 +220,6 @@ var QuestionUpdate = function () {
|
|
|
223
220
|
var CurWorkPlaceAiAbility = __assign(__assign(__assign({}, curSelectWorkPlace), CurWorkplace), { abilityType: 2, weight: 0, sort: 0 });
|
|
224
221
|
inInit = workplaceTypeIndex === -1;
|
|
225
222
|
CurWorkPlaceAiAbility.desc = CurWorkPlaceAiAbility.define ? CurWorkPlaceAiAbility.define : CurWorkPlaceAiAbility.name;
|
|
226
|
-
if (CurWorkPlaceAiAbility.type === 3 && CurWorkPlaceAiAbility.isWorkplace) {
|
|
227
|
-
CurWorkPlaceAiAbility.type = 103;
|
|
228
|
-
}
|
|
229
223
|
// console.log('CurWorkPlaceAiAbility', CurWorkPlaceAiAbility);
|
|
230
224
|
// 添加和修改
|
|
231
225
|
if (workplaceTypeIndex > -1) {
|