eli-video-interview 1.2.26 → 1.2.27
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/AiAssessmentCriteria/index.js +3 -3
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +6 -2
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +3 -3
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +6 -2
- package/package.json +1 -1
|
@@ -63,9 +63,9 @@ var AiAssessmentCriteria = function (props) {
|
|
|
63
63
|
setRelatedAbilities(item === null || item === void 0 ? void 0 : item.relatedAbilities);
|
|
64
64
|
};
|
|
65
65
|
var handleOk = useCallback(function () {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
updateAiAbilities(Object.values(checkAbilities)
|
|
67
|
+
.filter(function (item) { return item; })
|
|
68
|
+
.sort(function (a, b) { return ((a === null || a === void 0 ? void 0 : a.sort) && (b === null || b === void 0 ? void 0 : b.sort) ? (a === null || a === void 0 ? void 0 : a.sort) - (b === null || b === void 0 ? void 0 : b.sort) : 0); }));
|
|
69
69
|
updateState({ language: SERVER_LANGUAGE_TYPE[language], aiSwitch: 1 });
|
|
70
70
|
onClose();
|
|
71
71
|
}, [checkAbilities, language, onClose, updateAiAbilities, updateState]);
|
|
@@ -207,7 +207,7 @@ var QuestionUpdate = function () {
|
|
|
207
207
|
// 考察能力是否包含在AI能力
|
|
208
208
|
var workplaceTypeIndex = curAiAbilities.findIndex(function (v) { return v.abilityType === 2; });
|
|
209
209
|
var CurWorkplace = questionCollectionList.find(function (v) { return v.name === curSelectWorkPlace.label; }) || {};
|
|
210
|
-
var CurWorkPlaceAiAbility = __assign(__assign(__assign({}, curSelectWorkPlace), CurWorkplace), { abilityType: 2, weight: 0 });
|
|
210
|
+
var CurWorkPlaceAiAbility = __assign(__assign(__assign({}, curSelectWorkPlace), CurWorkplace), { abilityType: 2, weight: 0, sort: 0 });
|
|
211
211
|
inInit = workplaceTypeIndex === -1;
|
|
212
212
|
// 是否可修改
|
|
213
213
|
// CurWorkPlaceAiAbility.isNotCompute = !CurWorkPlaceAiAbility.isWorkplace;
|
|
@@ -230,10 +230,14 @@ var QuestionUpdate = function () {
|
|
|
230
230
|
handleWorkplaceData(value.category);
|
|
231
231
|
}
|
|
232
232
|
else if (!value.category || !value.category.label) {
|
|
233
|
+
var curAiAbilities = item.aiAbilities.filter(function (v) { return v.abilityType === 1; });
|
|
234
|
+
updateAiAbilities(curAiAbilities);
|
|
233
235
|
// 考察能力删除
|
|
234
236
|
console.log('考察能力删除');
|
|
235
237
|
}
|
|
236
|
-
},
|
|
238
|
+
},
|
|
239
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
240
|
+
[item.aiAbilities, handleWorkplaceData]);
|
|
237
241
|
useEffect(function () {
|
|
238
242
|
if (open) {
|
|
239
243
|
updateState({ language: item.language, aiSwitch: item.aiSwitch });
|
|
@@ -68,9 +68,9 @@ var AiAssessmentCriteria = function (props) {
|
|
|
68
68
|
setRelatedAbilities(item === null || item === void 0 ? void 0 : item.relatedAbilities);
|
|
69
69
|
};
|
|
70
70
|
var handleOk = (0, react_1.useCallback)(function () {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
updateAiAbilities(Object.values(checkAbilities)
|
|
72
|
+
.filter(function (item) { return item; })
|
|
73
|
+
.sort(function (a, b) { return ((a === null || a === void 0 ? void 0 : a.sort) && (b === null || b === void 0 ? void 0 : b.sort) ? (a === null || a === void 0 ? void 0 : a.sort) - (b === null || b === void 0 ? void 0 : b.sort) : 0); }));
|
|
74
74
|
updateState({ language: const_1.SERVER_LANGUAGE_TYPE[language], aiSwitch: 1 });
|
|
75
75
|
onClose();
|
|
76
76
|
}, [checkAbilities, language, onClose, updateAiAbilities, updateState]);
|
|
@@ -212,7 +212,7 @@ var QuestionUpdate = function () {
|
|
|
212
212
|
// 考察能力是否包含在AI能力
|
|
213
213
|
var workplaceTypeIndex = curAiAbilities.findIndex(function (v) { return v.abilityType === 2; });
|
|
214
214
|
var CurWorkplace = questionCollectionList.find(function (v) { return v.name === curSelectWorkPlace.label; }) || {};
|
|
215
|
-
var CurWorkPlaceAiAbility = __assign(__assign(__assign({}, curSelectWorkPlace), CurWorkplace), { abilityType: 2, weight: 0 });
|
|
215
|
+
var CurWorkPlaceAiAbility = __assign(__assign(__assign({}, curSelectWorkPlace), CurWorkplace), { abilityType: 2, weight: 0, sort: 0 });
|
|
216
216
|
inInit = workplaceTypeIndex === -1;
|
|
217
217
|
// 是否可修改
|
|
218
218
|
// CurWorkPlaceAiAbility.isNotCompute = !CurWorkPlaceAiAbility.isWorkplace;
|
|
@@ -235,10 +235,14 @@ var QuestionUpdate = function () {
|
|
|
235
235
|
handleWorkplaceData(value.category);
|
|
236
236
|
}
|
|
237
237
|
else if (!value.category || !value.category.label) {
|
|
238
|
+
var curAiAbilities = item.aiAbilities.filter(function (v) { return v.abilityType === 1; });
|
|
239
|
+
updateAiAbilities(curAiAbilities);
|
|
238
240
|
// 考察能力删除
|
|
239
241
|
console.log('考察能力删除');
|
|
240
242
|
}
|
|
241
|
-
},
|
|
243
|
+
},
|
|
244
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
245
|
+
[item.aiAbilities, handleWorkplaceData]);
|
|
242
246
|
(0, react_1.useEffect)(function () {
|
|
243
247
|
if (open) {
|
|
244
248
|
updateState({ language: item.language, aiSwitch: item.aiSwitch });
|