eli-video-interview 1.2.41-alpha.2 → 1.2.41-alpha.21
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/constants/ai-question.d.ts +3 -0
- package/esm/constants/ai-question.js +10 -0
- package/esm/constants/ai-report.d.ts +5 -0
- package/esm/constants/ai-report.js +5 -0
- package/esm/enum/ai-report.d.ts +12 -0
- package/esm/enum/ai-report.js +12 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/AbilityFormItem.d.ts +14 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/AbilityFormItem.js +145 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/index.d.ts +2 -0
- package/esm/modules/ai-ability/components/AbilityFormItem/index.js +17 -6
- package/esm/modules/ai-ability/components/AddAbility/index.js +131 -101
- package/esm/modules/ai-ability/components/UpdateAbility/index.js +81 -106
- package/esm/modules/ai-question/components/BootVideo/CustomVideos.js +1 -1
- package/esm/modules/ai-question/components/BootVideo/UploadPreview.js +9 -1
- package/esm/modules/ai-question/components/BootVideo/index.js +16 -7
- package/esm/modules/ai-question/components/QuestionModel/Item.js +4 -4
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +2 -1
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +3 -3
- package/esm/modules/ai-report/Root.js +54 -10
- package/esm/modules/ai-report/components/AIEvaluate/index.js +1 -1
- package/esm/modules/ai-report/components/ScoreReport/Bar.d.ts +4 -1
- package/esm/modules/ai-report/components/ScoreReport/Bar.js +12 -10
- package/esm/modules/ai-report/components/ScoreReport/Failed.d.ts +1 -1
- package/esm/modules/ai-report/components/ScoreReport/Failed.js +18 -5
- package/esm/modules/ai-report/components/ScoreReport/RecommendIcon.d.ts +3 -0
- package/esm/modules/ai-report/components/ScoreReport/RecommendIcon.js +17 -0
- package/esm/modules/ai-report/components/ScoreReport/Score.js +38 -9
- package/esm/modules/ai-report/components/ScoreReport/Tips.d.ts +3 -0
- package/esm/modules/ai-report/components/ScoreReport/Tips.js +18 -0
- package/esm/modules/ai-report/components/ScoreReport/index.js +8 -10
- package/esm/modules/ai-report/components/ScoreReport/interface.d.ts +5 -0
- package/esm/modules/ai-report/components/ScoreReport/styled.js +2 -4
- package/esm/modules/ai-report/components/Suggestion/index.js +2 -2
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/index.js +2 -2
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +1 -0
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.js +2 -1
- package/esm/modules/ai-report/components/WorkPlaces/index.js +4 -3
- package/esm/modules/ai-report/interface.d.ts +2 -0
- package/esm/services/ai-report.d.ts +6 -0
- package/esm/services/ai-report.js +1 -0
- package/esm/store/enterprise/enterprise-store.js +2 -2
- package/lib/constants/ai-question.d.ts +3 -0
- package/lib/constants/ai-question.js +12 -1
- package/lib/constants/ai-report.d.ts +5 -0
- package/lib/constants/ai-report.js +6 -1
- package/lib/enum/ai-report.d.ts +12 -0
- package/lib/enum/ai-report.js +13 -1
- package/lib/modules/ai-ability/components/AbilityFormItem/AbilityFormItem.d.ts +14 -0
- package/lib/modules/ai-ability/components/AbilityFormItem/AbilityFormItem.js +147 -0
- package/lib/modules/ai-ability/components/AbilityFormItem/index.d.ts +2 -0
- package/lib/modules/ai-ability/components/AbilityFormItem/index.js +15 -4
- package/lib/modules/ai-ability/components/AddAbility/index.js +153 -100
- package/lib/modules/ai-ability/components/UpdateAbility/index.js +101 -103
- package/lib/modules/ai-question/components/BootVideo/CustomVideos.js +1 -1
- package/lib/modules/ai-question/components/BootVideo/UploadPreview.js +9 -1
- package/lib/modules/ai-question/components/BootVideo/index.js +16 -7
- package/lib/modules/ai-question/components/QuestionModel/Item.js +3 -3
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +4 -3
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +2 -2
- package/lib/modules/ai-report/Root.js +51 -7
- package/lib/modules/ai-report/components/AIEvaluate/index.js +1 -1
- package/lib/modules/ai-report/components/ScoreReport/Bar.d.ts +4 -1
- package/lib/modules/ai-report/components/ScoreReport/Bar.js +11 -9
- package/lib/modules/ai-report/components/ScoreReport/Failed.d.ts +1 -1
- package/lib/modules/ai-report/components/ScoreReport/Failed.js +19 -6
- package/lib/modules/ai-report/components/ScoreReport/RecommendIcon.d.ts +3 -0
- package/lib/modules/ai-report/components/ScoreReport/RecommendIcon.js +22 -0
- package/lib/modules/ai-report/components/ScoreReport/Score.js +36 -7
- package/lib/modules/ai-report/components/ScoreReport/Tips.d.ts +3 -0
- package/lib/modules/ai-report/components/ScoreReport/Tips.js +20 -0
- package/lib/modules/ai-report/components/ScoreReport/index.js +6 -8
- package/lib/modules/ai-report/components/ScoreReport/interface.d.ts +5 -0
- package/lib/modules/ai-report/components/ScoreReport/styled.js +2 -4
- package/lib/modules/ai-report/components/Suggestion/index.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/index.js +1 -1
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +1 -0
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.js +2 -1
- package/lib/modules/ai-report/components/WorkPlaces/index.js +3 -2
- package/lib/modules/ai-report/interface.d.ts +2 -0
- package/lib/services/ai-report.d.ts +6 -0
- package/lib/services/ai-report.js +3 -1
- package/lib/store/enterprise/enterprise-store.js +2 -2
- package/package.json +5 -3
|
@@ -10,41 +10,28 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
47
18
|
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
48
35
|
};
|
|
49
36
|
var __read = (this && this.__read) || function (o, n) {
|
|
50
37
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -67,12 +54,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
67
54
|
};
|
|
68
55
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69
56
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
57
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
58
|
+
var Yup = __importStar(require("yup"));
|
|
70
59
|
var const_1 = require("../../const");
|
|
71
60
|
var AbilityFormItem_1 = __importDefault(require("../AbilityFormItem"));
|
|
72
61
|
var ai_ability_1 = require("../../../../services/ai-ability");
|
|
73
62
|
var ahooks_1 = require("ahooks");
|
|
74
63
|
var fbm_ui_1 = require("fbm-ui");
|
|
64
|
+
var mui_1 = require("fbm-ui/lib/mui");
|
|
65
|
+
var formik_1 = require("formik");
|
|
75
66
|
var react_1 = require("react");
|
|
67
|
+
var validationSchema = Yup.object().shape({
|
|
68
|
+
name: Yup.string().required('能力名称不能为空'),
|
|
69
|
+
workPlaceItems: Yup.array().of(Yup.object().shape({
|
|
70
|
+
name: Yup.string().required(''),
|
|
71
|
+
items: Yup.array().of(Yup.string().required('')),
|
|
72
|
+
})),
|
|
73
|
+
});
|
|
76
74
|
var UpdateAbility = function (props) {
|
|
77
75
|
var open = props.open, _a = props.type, type = _a === void 0 ? 1 : _a, isWorkplace = props.isWorkplace, _b = props.name, name = _b === void 0 ? '' : _b, ablilityNameLength = props.ablilityNameLength, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
|
|
78
76
|
var _c = __read((0, react_1.useState)(''), 2), value = _c[0], setValue = _c[1];
|
|
@@ -80,8 +78,27 @@ var UpdateAbility = function (props) {
|
|
|
80
78
|
var _e = __read((0, react_1.useState)('show'), 2), mode = _e[0], setMode = _e[1];
|
|
81
79
|
var firstLoad = (0, react_1.useRef)(true);
|
|
82
80
|
var _f = __read((0, react_1.useState)(false), 2), showAiDefineDetail = _f[0], setShowAiDefineDetail = _f[1];
|
|
83
|
-
// const [submitDisabled, setSubmitDisabled] = useState<boolean>(true);
|
|
84
81
|
var _g = __read((0, react_1.useState)(const_1.InitialValues.workPlaceItems), 2), workPlaceItems = _g[0], setWorkPlaceItems = _g[1];
|
|
82
|
+
var formik = (0, fbm_ui_1.useForm)({
|
|
83
|
+
initialValues: { name: '', workPlaceItems: [] },
|
|
84
|
+
validationSchema: validationSchema,
|
|
85
|
+
validateOnChange: true,
|
|
86
|
+
onSubmit: function (values) {
|
|
87
|
+
// 处理表单提交逻辑
|
|
88
|
+
console.log(values);
|
|
89
|
+
var avocadoConfig = window['AvocadoVideoInterviewConfig'];
|
|
90
|
+
run({
|
|
91
|
+
name: values.name,
|
|
92
|
+
tag: values.name,
|
|
93
|
+
token: token,
|
|
94
|
+
workPlaceItems: values.workPlaceItems,
|
|
95
|
+
mateData: {
|
|
96
|
+
account: avocadoConfig === null || avocadoConfig === void 0 ? void 0 : avocadoConfig.account,
|
|
97
|
+
enterpriseId: avocadoConfig === null || avocadoConfig === void 0 ? void 0 : avocadoConfig.enterpriseId,
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
});
|
|
85
102
|
var _h = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionUpsert, {
|
|
86
103
|
manual: true,
|
|
87
104
|
onSuccess: function () {
|
|
@@ -92,7 +109,7 @@ var UpdateAbility = function (props) {
|
|
|
92
109
|
onError: function (err) {
|
|
93
110
|
console.log(err);
|
|
94
111
|
if ((err === null || err === void 0 ? void 0 : err.code) === -1211) {
|
|
95
|
-
|
|
112
|
+
formik.errors.name = '能力名称不能重复';
|
|
96
113
|
}
|
|
97
114
|
},
|
|
98
115
|
}), run = _h.run, loading = _h.loading;
|
|
@@ -111,82 +128,60 @@ var UpdateAbility = function (props) {
|
|
|
111
128
|
}
|
|
112
129
|
},
|
|
113
130
|
}).run;
|
|
114
|
-
var nameTextField = (0, fbm_ui_1.useTextField)({
|
|
115
|
-
value: value,
|
|
116
|
-
label: '能力名称',
|
|
117
|
-
required: true,
|
|
118
|
-
rules: [
|
|
119
|
-
{
|
|
120
|
-
required: true,
|
|
121
|
-
message: '能力名称不能为空',
|
|
122
|
-
},
|
|
123
|
-
],
|
|
124
|
-
onChange: function (e) { return setValue(e.target.value); },
|
|
125
|
-
max: ablilityNameLength,
|
|
126
|
-
sx: {
|
|
127
|
-
height: '48px',
|
|
128
|
-
width: '100%',
|
|
129
|
-
marginTop: '16px',
|
|
130
|
-
},
|
|
131
|
-
});
|
|
132
131
|
var handleValue = (0, react_1.useCallback)(function (v) {
|
|
133
|
-
|
|
134
|
-
workPlaceItems.splice(index, 1, v);
|
|
135
|
-
|
|
136
|
-
setWorkPlaceItems(list);
|
|
132
|
+
// const index = workPlaceItems.findIndex(ele => ele.type === v.type);
|
|
133
|
+
// workPlaceItems.splice(index, 1, v);
|
|
134
|
+
// const list = workPlaceItems;
|
|
135
|
+
// setWorkPlaceItems(list);
|
|
137
136
|
}, [workPlaceItems]);
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
},
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return [2 /*return*/];
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
}); }, [nameTextField, run, token, value, isWorkplace, type, workPlaceItems]);
|
|
137
|
+
// const handleOk = useCallback(async () => {
|
|
138
|
+
// // const error = await nameTextField.handleValidate();
|
|
139
|
+
// const error = false;
|
|
140
|
+
// const workPlaceItemsError = workPlaceItems.some(v => v.items.length === 0);
|
|
141
|
+
// if (!error) {
|
|
142
|
+
// const avocadoConfig = window['AvocadoVideoInterviewConfig'];
|
|
143
|
+
// // 旧自定义能力
|
|
144
|
+
// if (type === 3 && !isWorkplace) {
|
|
145
|
+
// run({
|
|
146
|
+
// name: value,
|
|
147
|
+
// tag: value,
|
|
148
|
+
// token,
|
|
149
|
+
// mateData: {
|
|
150
|
+
// account: avocadoConfig?.account,
|
|
151
|
+
// enterpriseId: avocadoConfig?.enterpriseId,
|
|
152
|
+
// },
|
|
153
|
+
// });
|
|
154
|
+
// } else if (!workPlaceItemsError) {
|
|
155
|
+
// // 职场能力
|
|
156
|
+
// run({
|
|
157
|
+
// name: value,
|
|
158
|
+
// tag: value,
|
|
159
|
+
// token,
|
|
160
|
+
// workPlaceItems,
|
|
161
|
+
// mateData: {
|
|
162
|
+
// account: avocadoConfig?.account,
|
|
163
|
+
// enterpriseId: avocadoConfig?.enterpriseId,
|
|
164
|
+
// },
|
|
165
|
+
// });
|
|
166
|
+
// }
|
|
167
|
+
// }
|
|
168
|
+
// }, [run, token, value, isWorkplace, type, workPlaceItems]);
|
|
178
169
|
var footer = (0, react_1.useCallback)(function () {
|
|
179
|
-
return step === 1 ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", padding: "12px 16px" }, { children: type === 1 ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", onClick: function () { return setStep(2); } }, { children: "\u7F16\u8F91" }))) }))) : ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "flex-end", padding: "12px 16px" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ sx: { mr: 1, fontWeight: 400 }, variant: "text", color: "inherit", onClick: onClose }, { children: "\u53D6\u6D88" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ loading: loading, onClick:
|
|
180
|
-
}, [
|
|
170
|
+
return step === 1 ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", padding: "12px 16px" }, { children: type === 1 ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", onClick: function () { return setStep(2); } }, { children: "\u7F16\u8F91" }))) }))) : ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "flex-end", padding: "12px 16px" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ sx: { mr: 1, fontWeight: 400 }, variant: "text", color: "inherit", onClick: onClose }, { children: "\u53D6\u6D88" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ loading: loading, onClick: formik.submitForm }, { children: "\u4FDD\u5B58" }))] })));
|
|
171
|
+
}, [step, type, onClose, loading, formik]);
|
|
172
|
+
(0, react_1.useEffect)(function () {
|
|
173
|
+
formik.setFieldValue('workPlaceItems', workPlaceItems);
|
|
174
|
+
}, [workPlaceItems]);
|
|
181
175
|
(0, react_1.useEffect)(function () {
|
|
182
176
|
setValue(name);
|
|
177
|
+
formik.setFieldValue('name', name);
|
|
183
178
|
}, [name]);
|
|
184
179
|
(0, react_1.useEffect)(function () {
|
|
185
180
|
if (!open) {
|
|
186
181
|
setValue('');
|
|
187
182
|
setWorkPlaceItems([]);
|
|
188
183
|
setStep(1);
|
|
189
|
-
nameTextField.setError();
|
|
184
|
+
// nameTextField.setError();
|
|
190
185
|
}
|
|
191
186
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
192
187
|
}, [open]);
|
|
@@ -205,7 +200,10 @@ var UpdateAbility = function (props) {
|
|
|
205
200
|
(0, react_1.useEffect)(function () {
|
|
206
201
|
setWorkPlaceItems(workPlaceItems);
|
|
207
202
|
}, [workPlaceItems, setWorkPlaceItems]);
|
|
208
|
-
return ((0, jsx_runtime_1.
|
|
209
|
-
|
|
203
|
+
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Drawer, __assign({ className: "abilityDrawer", title: '能力详情', open: open, footer: footer, onClose: onClose }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Form, __assign({}, formik, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ style: { width: '556px' } }, { children: step === 1 ? ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: "medium" }, { children: ["\u80FD\u529B\u540D\u79F0\uFF1A", value] }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: "\u4F7F\u7528\u901A\u7528\u7684\u80FD\u529B\u540D\u79F0\uFF08\u4F8B\u5982\uFF1A\u9886\u5BFC\u529B\u3001\u5E94\u53D8\u80FD\u529B\u7B49\u5E38\u89C1\u8003\u6838\u9879\uFF09\u547D\u540D\u6709\u52A9\u4E8E\u63D0\u9AD8 AI \u8BC4\u4EF7\u53CA\u8BC4\u5206\u51C6\u786E\u6027\u3002" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { name: "name", label: "\u80FD\u529B\u540D\u79F0", sx: { height: '48px', width: '100%', marginTop: '16px' }, max: ablilityNameLength, onKeyDown: function (event) {
|
|
204
|
+
if (event.key === 'Enter') {
|
|
205
|
+
event.preventDefault();
|
|
206
|
+
}
|
|
207
|
+
} })] })) })), !(type === 3 && !isWorkplace) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ style: { width: '556px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Divider, { style: { margin: '24px 0' } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: "medium", mb: 2 }, { children: "\u80FD\u529B\u6807\u51C6" })), showAiDefineDetail && ((0, jsx_runtime_1.jsx)(formik_1.FieldArray, __assign({ name: "workPlaceItems" }, { children: function () { return ((0, jsx_runtime_1.jsx)(mui_1.Stack, { children: formik.values.workPlaceItems.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(mui_1.Stack, { children: (0, jsx_runtime_1.jsx)(AbilityFormItem_1.default, { token: token, name: value, title: item.name, type: item.type, items: item.items, mode: mode, index: index, item: item, maxTextLength: item.type === 4 || item.type === 5 ? 300 : 100, canReplace: mode === 'edit' ? true : false, onChange: handleValue }, item.type) }, index)); }) })); } })))] })))] })) })));
|
|
210
208
|
};
|
|
211
209
|
exports.default = UpdateAbility;
|
|
@@ -93,6 +93,6 @@ var CustomVideos = function (_a) {
|
|
|
93
93
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", mt: 3 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), (0, jsx_runtime_1.jsxs)(styled_1.CustomUploadedImgRoot, __assign({ sx: { minHeight: 0 } }, { children: [mediaList === null || mediaList === void 0 ? void 0 : mediaList.map(function (_a, i) {
|
|
94
94
|
var url = _a.url, selected = _a.selected;
|
|
95
95
|
return ((0, jsx_runtime_1.jsx)(UploadPreview_1.default, { src: "".concat(url, "?x-oss-process=video/snapshot,t_0,f_jpg"), style: { borderColor: selected ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(i); }, onRemove: function () { return handleRemoveVideo(i); } }, url));
|
|
96
|
-
}), loading && (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { height: 100, loading: { size: 24, loading: true, isMask: true } })] })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.
|
|
96
|
+
}), loading && (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { height: 100, loading: { size: 24, loading: true, isMask: true } })] })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.CustomUploadButtonRoot, { children: [mediaList.length < 5 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) }))), mediaList.length >= 5 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", disabled: true, color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })))] }), (0, jsx_runtime_1.jsx)(mui_1.Tooltip, __assign({ title: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm", 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.InfoOutlineIcon, { sx: { color: 'rgba(0, 0, 0, 0.56)', fontSize: 16 } }) })) }))] })), mediaList.length === 0 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "error" }, { children: "\u4E0A\u4F20\u89C6\u9891\u4E0D\u53EF\u4E3A\u7A7A" })))] }));
|
|
97
97
|
};
|
|
98
98
|
exports.default = CustomVideos;
|
|
@@ -15,6 +15,14 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
15
15
|
var fbm_ui_1 = require("fbm-ui");
|
|
16
16
|
var UploadPreview = function (_a) {
|
|
17
17
|
var src = _a.src, style = _a.style, onClick = _a.onClick, onRemove = _a.onRemove, height = _a.height, alt = _a.alt, _b = _a.disabledRemove, disabledRemove = _b === void 0 ? false : _b;
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box,
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: {
|
|
19
|
+
height: height,
|
|
20
|
+
'& .remove': {
|
|
21
|
+
display: 'none',
|
|
22
|
+
},
|
|
23
|
+
'&:hover .remove': {
|
|
24
|
+
display: 'block',
|
|
25
|
+
},
|
|
26
|
+
} }, { children: [(0, jsx_runtime_1.jsx)("img", { src: src, height: height, style: style, alt: alt, onClick: onClick }), !disabledRemove && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ className: "remove", onClick: onRemove, size: "small", sx: { position: 'absolute', top: -14, right: -16 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CancelIcon, {}) })))] })));
|
|
19
27
|
};
|
|
20
28
|
exports.default = UploadPreview;
|
|
@@ -61,7 +61,6 @@ var BootVideo = function (props) {
|
|
|
61
61
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
62
62
|
var open = props.open, onClose = props.onClose;
|
|
63
63
|
var _k = (0, interview_room_store_1.useInterviewRoomStore)(), interactType = _k.interactType, aiInterviewerProfile = _k.aiInterviewerProfile, updateInterviewRoom = _k.updateInterviewRoom, interactionMethods = _k.interactionMethods;
|
|
64
|
-
console.log(interactionMethods);
|
|
65
64
|
var _l = __read((0, react_1.useState)({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile, interactionMethods: interactionMethods }), 2), interviewRoomState = _l[0], setInterviewRoomState = _l[1];
|
|
66
65
|
var _m = __read((0, react_1.useState)(interactionMethods || ai_question_1.DEFAULT_VITUAL_HUMAN_LIST), 2), virtualManList = _m[0], setVirtualManList = _m[1];
|
|
67
66
|
var _o = (0, boot_video_store_1.useBootVideoStore)(), mediaUrl = _o.mediaUrl, thumbUrl = _o.thumbUrl, updateBootVideo = _o.updateBootVideo;
|
|
@@ -134,11 +133,11 @@ var BootVideo = function (props) {
|
|
|
134
133
|
setInterviewRoomState(__assign(__assign({}, interviewRoomState), { aiInterviewerProfile: __assign(__assign({}, value), { humanType: value.type }) }));
|
|
135
134
|
}, [interviewRoomState, virtualManList]);
|
|
136
135
|
var handleOk = function () {
|
|
137
|
-
var _a, _b;
|
|
136
|
+
var _a, _b, _c;
|
|
138
137
|
if (interviewRoomState.interactType === 2) {
|
|
139
|
-
if (broadcastType === 3 && ((_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail.tutorialVideos) === null || _a === void 0 ? void 0 : _a.length) === 0)
|
|
138
|
+
if (broadcastType === 3 && (((_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail.tutorialVideos) === null || _a === void 0 ? void 0 : _a.length) === 0 || (((_b = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _b === void 0 ? void 0 : _b.length) || 0) > 300))
|
|
140
139
|
return;
|
|
141
|
-
if ([1, 2].includes(broadcastType) && ((
|
|
140
|
+
if ([1, 2].includes(broadcastType) && (((_c = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _c === void 0 ? void 0 : _c.length) || 0) > 300)
|
|
142
141
|
return;
|
|
143
142
|
}
|
|
144
143
|
updateBootVideo(mediaState);
|
|
@@ -190,7 +189,17 @@ var BootVideo = function (props) {
|
|
|
190
189
|
}
|
|
191
190
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
192
191
|
}, [open]);
|
|
193
|
-
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk, width: 588
|
|
192
|
+
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u5B9A\u5236\u9762\u8BD5\u95F4", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk, width: 588,
|
|
193
|
+
// @ts-ignore
|
|
194
|
+
sx: {
|
|
195
|
+
'& .FuiDialog-content': {
|
|
196
|
+
pb: 4.5,
|
|
197
|
+
},
|
|
198
|
+
} }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { display: 'flex', justifyContent: 'space-between', width: '100%' } }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ width: "100%" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500 }, { children: "\u9762\u8BD5\u95F4\u4E92\u52A8\u65B9\u5F0F" })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.RadioGroup, __assign({ sx: {
|
|
199
|
+
'& .MuiFormControlLabel-root': {
|
|
200
|
+
mr: 4.5,
|
|
201
|
+
},
|
|
202
|
+
}, defaultValue: "outlined", onChange: handleInteractTypeChange, value: interviewRoomState.interactType }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: 1, label: "\u4F20\u7EDF\u8BFB\u9898\u6A21\u5F0F" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: 2, label: "AI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F" })] })), interviewRoomState.interactType === 2 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { options: Options, value: broadcastType, onChange: function (e) {
|
|
194
203
|
var _a;
|
|
195
204
|
var value = e.target.value;
|
|
196
205
|
setVirtualManList(__spreadArray([], __read(virtualManList.map(function (v) { return (__assign(__assign({}, v), { selected: v.type === value })); })), false));
|
|
@@ -199,11 +208,11 @@ var BootVideo = function (props) {
|
|
|
199
208
|
// @ts-ignore
|
|
200
209
|
aiInterviewerProfile: (_a = virtualManList.find(function (v) { return v.type === value; })) === null || _a === void 0 ? void 0 : _a.detail }));
|
|
201
210
|
}
|
|
202
|
-
}, sx: { width: 240, height: 'auto', mt: 1 } }), broadcastType === 3 && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(CustomVideos_1.default, { mediaList: (_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _a === void 0 ? void 0 : _a.tutorialVideos, setMediaList: handleSetVideo }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", mt: 3, mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891\u6587\u672C\u6846\u5185\u5BB9" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.TextField, { multiline: true, error: (((_b = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _b === void 0 ? void 0 : _b.length) || 0) > 300, rows: 3, placeholder: "\u8BF7\u8F93\u5165\u6587\u672C\u6846\u5185\u5BB9\uFF0C\u82E5\u4E0D\u586B\uFF0C\u5219\u5728\u9762\u8BD5\u95F4\u4E0D\u5C55\u793A\u8BE5\u6587\u672C\u6846\u3002", value: virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText, sx: { mb: 2 }, onChange: handleGuidanceText })] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 3 }, { children: broadcastType !== 3 ? '面试官形象' : '面试官形象(播报题目)' })), broadcastType !== 3 && ((0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)("img", { src: (_c = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _c === void 0 ? void 0 : _c.virtualHumanAvatar, style: {
|
|
211
|
+
}, sx: { width: 240, height: 'auto', mt: 1 } }), broadcastType === 3 && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(CustomVideos_1.default, { mediaList: (_a = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _a === void 0 ? void 0 : _a.tutorialVideos, setMediaList: handleSetVideo }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", mt: 3, mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891\u6587\u672C\u6846\u5185\u5BB9" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.TextField, { multiline: true, error: (((_b = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _b === void 0 ? void 0 : _b.length) || 0) > 300, rows: 3, placeholder: "\u8BF7\u8F93\u5165\u6587\u672C\u6846\u5185\u5BB9\uFF0C\u82E5\u4E0D\u586B\uFF0C\u5219\u5728\u9762\u8BD5\u95F4\u4E0D\u5C55\u793A\u8BE5\u6587\u672C\u6846\u3002", value: virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText, sx: { mb: 2 }, onChange: handleGuidanceText, max: 300 })] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 3 }, { children: broadcastType !== 3 ? '面试官形象' : '面试官形象(播报题目)' })), broadcastType !== 3 && ((0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)("img", { src: (_c = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _c === void 0 ? void 0 : _c.virtualHumanAvatar, style: {
|
|
203
212
|
borderColor: 'transparent',
|
|
204
213
|
}, height: 100, alt: "" }) }) })), broadcastType === 3 && ((0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: (_e = (_d = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _d === void 0 ? void 0 : _d.interviewerShows) === null || _e === void 0 ? void 0 : _e.map(function (human) { return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { src: human.virtualHumanAvatar, style: {
|
|
205
214
|
borderColor: human.selected ? '#4CAF50' : 'transparent',
|
|
206
|
-
}, height: 100, alt: "", onClick: function () { return handleSelectHumanType(human); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", textAlign: "center" }, { children: human.name }))] }, human.humanToken)); }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", color: "disabled", mb: 3 }, { children: (virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail.desc) || ((_h = (_g = (_f = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _f === void 0 ? void 0 : _f.interviewerShows) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.desc) })), broadcastType !== 3 && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891\u64AD\u62A5\u5185\u5BB9" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.TextField, { multiline: true, error: ((_j = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _j === void 0 ? void 0 : _j.length)
|
|
215
|
+
}, height: 100, alt: "", onClick: function () { return handleSelectHumanType(human); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", textAlign: "center" }, { children: human.name }))] }, human.humanToken)); }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", flexWrap: "wrap", color: "disabled", mb: 3 }, { children: (virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail.desc) || ((_h = (_g = (_f = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.detail) === null || _f === void 0 ? void 0 : _f.interviewerShows) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.desc) })), broadcastType !== 3 && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", mb: 2 }, { children: "\u5F15\u5BFC\u89C6\u9891\u64AD\u62A5\u5185\u5BB9" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.TextField, { multiline: true, error: (((_j = virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText) === null || _j === void 0 ? void 0 : _j.length) || 0) > 300, rows: 3, placeholder: "\u8BF7\u8F93\u5165\u6587\u672C\u6846\u5185\u5BB9\uFF0C\u82E5\u4E0D\u586B\uFF0C\u5219\u5728\u9762\u8BD5\u95F4\u4E0D\u5C55\u793A\u8BE5\u6587\u672C\u6846\u3002", value: virtualMan === null || virtualMan === void 0 ? void 0 : virtualMan.guidanceText, onChange: handleGuidanceText, max: 300 })] }))] })), interviewRoomState.interactType === 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: "14px", variant: "body1", fontWeight: 500, mt: 2, mb: 1 }, { children: "\u5F15\u5BFC\u89C6\u9891" })), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
|
|
207
216
|
var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
|
|
208
217
|
return ((0, jsx_runtime_1.jsx)("img", { src: frameUrl, style: { borderColor: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? '#4CAF50' : 'transparent' }, height: 100, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
|
|
209
218
|
}) }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.CustomUploadButtonRoot, { children: [mediaList.length <= 5 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) }))), mediaList.length > 5 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", disabled: mediaList.length > 5, color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })))] }), (0, jsx_runtime_1.jsx)(mui_1.Tooltip, __assign({ title: "\u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u6700\u591A\u652F\u6301\u4E0A\u4F205\u4E2A\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm", 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.InfoOutlineIcon, { sx: { color: 'rgba(0, 0, 0, 0.56)', fontSize: 16 } }) })) }))] }))] }))] })) })) }) })));
|
|
@@ -62,11 +62,11 @@ var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Ar
|
|
|
62
62
|
{ label: '直到充分为止', value: -1 },
|
|
63
63
|
], false);
|
|
64
64
|
var QuestionModelListItem = function (props) {
|
|
65
|
-
var
|
|
65
|
+
var interactionMethods = (0, interview_room_store_1.useInterviewRoomStore)().interactionMethods;
|
|
66
66
|
var index = props.index, disabledWeight = props.disabledWeight, steps = props.steps, step = __rest(props, ["index", "disabledWeight", "steps"]);
|
|
67
67
|
var token = step.token, name = step.name, questions = step.questions, duration = step.duration, weight = step.weight, type = step.type, aiShowType = step.aiShowType, aiType = step.aiType, answerStatus = step.answerStatus, category = step.category, isOpenAIFollowUp = step.isOpenAIFollowUp, followUpMaximum = step.followUpMaximum;
|
|
68
68
|
var isAiAnalysis = (0, ai_question_1.IS_AI_ANALYSIS)(step);
|
|
69
|
-
var
|
|
69
|
+
var _a = (0, question_model_store_1.useQuestionModelStore)(), editModel = _a.editModel, removeModel = _a.removeModel, updateModelWeight = _a.updateModelWeight;
|
|
70
70
|
var updateQuestionState = (0, question_update_store_1.useUpdateQuestionStore)().updateQuestionState;
|
|
71
71
|
var handleEdit = (0, react_1.useCallback)(function () {
|
|
72
72
|
updateQuestionState({ open: true, token: token, index: index, aiShowType: aiShowType, item: step });
|
|
@@ -115,6 +115,6 @@ var QuestionModelListItem = function (props) {
|
|
|
115
115
|
}, [questions]);
|
|
116
116
|
return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", borderBottom: !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", padding: "8px 0px 16px 16px" }, { children: [(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.Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium" }, { children: ["\u9898\u76EE", index + 1] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DragHandleIcon, { className: "dragHandle" }) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!ai_question_1.TEST_TYPE_READONLY.includes(type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleEdit }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium", mr: 0.5 }, { children: ["[", ai_question_1.QUESTION_TYPE_TITLE_MAP[aiShowType], "]"] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
|
|
117
117
|
return label && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
|
|
118
|
-
}), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", (0, utils_1.getSecondToTime)(Number(duration))] }))] }))] })) })), (!ai_question_1.DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }),
|
|
118
|
+
}), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", (0, utils_1.getSecondToTime)(Number(duration))] }))] }))] })) })), (!ai_question_1.DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }), (0, ai_question_1.IS_AI_FOLLOW_UP)(step, interactionMethods) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), isOpenAIFollowUp && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { sx: { height: 'auto', width: 134 }, size: "small", value: followUpMaximum, options: options, onChange: handleOpenAIFollowUpMaximum }))] })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
|
|
119
119
|
};
|
|
120
120
|
exports.default = (0, react_1.memo)(QuestionModelListItem);
|
|
@@ -32,7 +32,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
33
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
34
34
|
var SelectQuestion_1 = __importDefault(require("./SelectQuestion"));
|
|
35
|
-
var ai_question_1 = require("../../../../
|
|
35
|
+
var ai_question_1 = require("../../../../constants/ai-question");
|
|
36
|
+
var ai_question_2 = require("../../../../enum/ai-question");
|
|
36
37
|
var question_update_store_1 = require("../../../../store/ai-question/question-update-store");
|
|
37
38
|
var fbm_ui_1 = require("fbm-ui");
|
|
38
39
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
@@ -68,7 +69,7 @@ var RandomQuestion = function (_a) {
|
|
|
68
69
|
},
|
|
69
70
|
];
|
|
70
71
|
var isVideoBroadcast = broadcastType === 2;
|
|
71
|
-
var desc = isVideoBroadcast ? ((0, jsx_runtime_1.
|
|
72
|
+
var desc = isVideoBroadcast ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "\n 1. \u89C6\u9891\u5EFA\u8BAE\u7AD6\u7248\uFF0C\u6BD4\u4F8B9\uFF1A16\uFF0C\u683C\u5F0F.mp4\uFF1B\u5019\u9009\u4EBA\u53EF\u91CD\u590D\u542C\u9898\uFF0C\u4F46\u5355\u9898 \u6700\u591A\u91CD\u590D3\u6B21\u3002\n <br />\n 2. \u5F53\u9762\u8BD5\u95F4\u4EA4\u4E92\u65B9\u5F0F\u662FAI\u9762\u8BD5\u5B98\u5BF9\u8BDD\u6A21\u5F0F\u65F6\uFF0C\u5019\u9009\u4EBA\u9762\u8BD5\u65F6\u5C06\u81EA\u52A8\u628A \u9898\u76EE\u7684\u64AD\u62A5\u65B9\u5F0F\u53D8\u6362\u4E3AAI\u8BED\u97F3\u64AD\u62A5\u65B9\u5F0F\n <br />\n 3.\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A".concat(ai_question_1.MAX_RANDOM_QUESTION_NUM, "\u4E2A\u9009\u9879\u3002") })) : ("\u6BCF\u4F4D\u5019\u9009\u4EBA\u968F\u673A1\u9898\uFF0C\u6700\u591A".concat(ai_question_1.MAX_RANDOM_QUESTION_NUM, "\u4E2A\u9009\u9879\u3002"));
|
|
72
73
|
var handleVideoBroadcastChange = function (key, checked) {
|
|
73
74
|
var _a;
|
|
74
75
|
updateQuestionState({
|
|
@@ -80,7 +81,7 @@ var RandomQuestion = function (_a) {
|
|
|
80
81
|
item: __assign(__assign({}, item), { enableScoreOptimization: !item.enableScoreOptimization }),
|
|
81
82
|
});
|
|
82
83
|
};
|
|
83
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Layout, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 2, mb: 1, direction: "row", alignItems: "center", justifyContent: "space-between", mt: 0.375 }, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Popactions, __assign({ actions: aiShowType ===
|
|
84
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Layout, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 2, mb: 1, direction: "row", alignItems: "center", justifyContent: "space-between", mt: 0.375 }, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Popactions, __assign({ actions: aiShowType === ai_question_2.ADD_QUESTION_TYPE.SINGLECHIOCE ? [actions[1]] : actions, trigger: "click", isClickAway: true, sx: { height: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u968F\u673A\u9762\u8BD5\u5185\u5BB9" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: desc, placement: "bottom-start" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1, height: 48 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), (0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: [isVideoBroadcast && ((0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { sx: {
|
|
84
85
|
mr: 0,
|
|
85
86
|
}, checked: ((_b = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _b === void 0 ? void 0 : _b.videoRetry) === 1, label: (0, jsx_runtime_1.jsx)(mui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { sx: {
|
|
86
87
|
mr: 0,
|
|
@@ -233,8 +233,8 @@ var QuestionUpdate = function () {
|
|
|
233
233
|
case 0: return [4 /*yield*/, getModelParams(values, true)];
|
|
234
234
|
case 1:
|
|
235
235
|
_a = _c.sent(), errorIndexes = _a.errorIndexes, params = _a.params;
|
|
236
|
-
if ((values === null || values === void 0 ? void 0 : values.questions.length) >
|
|
237
|
-
fbm_ui_1.Message.error(
|
|
236
|
+
if ((values === null || values === void 0 ? void 0 : values.questions.length) > ai_question_1.MAX_RANDOM_QUESTION_NUM) {
|
|
237
|
+
fbm_ui_1.Message.error("\u6700\u591A\u53EF\u6DFB\u52A0".concat(ai_question_1.MAX_RANDOM_QUESTION_NUM, "\u4E2A\u9762\u8BD5\u5185\u5BB9\u3002"));
|
|
238
238
|
return [2 /*return*/, false];
|
|
239
239
|
}
|
|
240
240
|
if (values.broadcastType === 2 && !(values === null || values === void 0 ? void 0 : values.questions.every(function (v) { return v.videoUrl !== ''; }))) {
|
|
@@ -18,6 +18,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
18
18
|
var AIEvaluate_1 = __importDefault(require("./components/AIEvaluate"));
|
|
19
19
|
var NotFinish_1 = __importDefault(require("./components/NotFinish"));
|
|
20
20
|
var ScoreReport_1 = __importDefault(require("./components/ScoreReport"));
|
|
21
|
+
var Report_1 = __importDefault(require("./components/ScoreReport/Report"));
|
|
21
22
|
var Suggestion_1 = __importDefault(require("./components/Suggestion"));
|
|
22
23
|
var VideoQuestion_1 = __importDefault(require("./components/VideoQuestion"));
|
|
23
24
|
var WorkPlaces_1 = __importDefault(require("./components/WorkPlaces"));
|
|
@@ -27,13 +28,13 @@ var global_store_1 = require("../../store/ai-report/global-store");
|
|
|
27
28
|
var ahooks_1 = require("ahooks");
|
|
28
29
|
var fbm_ui_1 = require("fbm-ui");
|
|
29
30
|
var react_1 = require("react");
|
|
30
|
-
var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER;
|
|
31
|
+
var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER, FAILED = ai_report_1.INTERVIEW_STATUS.FAILED, IN_CALCULATION = ai_report_1.INTERVIEW_STATUS.IN_CALCULATION;
|
|
31
32
|
var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
32
33
|
var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
|
|
33
34
|
var firstLoad = (0, react_1.useRef)(true);
|
|
34
35
|
var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
|
|
35
|
-
var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d;
|
|
36
|
-
var
|
|
36
|
+
var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d, _e = _b.model, model = _e === void 0 ? 'standard' : _e, _f = _b.hasProVersion, hasProVersion = _f === void 0 ? false : _f;
|
|
37
|
+
var _g = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewResult)([token]); }, {
|
|
37
38
|
manual: true,
|
|
38
39
|
onSuccess: function (_a) {
|
|
39
40
|
var list = _a.data.list;
|
|
@@ -51,11 +52,44 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
51
52
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
|
|
52
53
|
}
|
|
53
54
|
},
|
|
54
|
-
}), data =
|
|
55
|
+
}), data = _g.data, loading = _g.loading, postAiInterviewResult = _g.run;
|
|
55
56
|
var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
|
|
56
57
|
var handleRefreshSuccess = (0, react_1.useCallback)(function () {
|
|
57
58
|
postAiInterviewResult();
|
|
58
59
|
}, [postAiInterviewResult]);
|
|
60
|
+
var handleSwitchReportModel = (0, react_1.useCallback)(function () {
|
|
61
|
+
var SwithAction = function () {
|
|
62
|
+
(0, ai_report_2.SwitchReportModel)({
|
|
63
|
+
thirdOrderID: token,
|
|
64
|
+
model: model === 'standard' ? 'pro' : 'standard',
|
|
65
|
+
})
|
|
66
|
+
.then(function () {
|
|
67
|
+
postAiInterviewResult();
|
|
68
|
+
})
|
|
69
|
+
.catch(function () {
|
|
70
|
+
fbm_ui_1.Message.error('升级报告失败,请重试。');
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
if (model === 'standard' && !hasProVersion) {
|
|
74
|
+
(0, fbm_ui_1.confirm)({
|
|
75
|
+
title: '确认使用增值服务',
|
|
76
|
+
content: ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ color: "textSecondary", sx: { display: 'inline' } }, { children: ["\u4E13\u4E1A\u7248\u62A5\u544A\u4EE5\u9AD8\u7EA7AI\u6280\u672F\u63D0\u4F9B\u66F4\u7CBE\u51C6\u8BC4\u4F30\uFF0C\u5C5E\u589E\u503C\u4EA7\u54C1\uFF0C\u6BCF\u4E13\u4E1A\u7248\u62A5\u544A\u6309\u6807\u51C6\u72482\u4EBA\u6B21\u8BA1\u8D39\uFF0C\u4EC5\u9996\u6B21\u5207\u6362\u6536\u8D39\u3002\u9ED8\u8BA4\u63D0\u4F9B\u6807\u51C6\u7248\uFF0C\u54A8\u8BE2\u5BA2\u6237\u987E\u95EE\u4E86\u89E3\u8D44\u8D39\u4F18\u60E0\u3002", (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontWeight: "medium", sx: { display: 'inline' } }, { children: "\u672C\u6B21\u64CD\u4F5C\u5C06\u6D88\u80172\u4EBA \u6B21\uFF0C\u662F\u5426\u786E\u8BA4\uFF1F" }))] }))),
|
|
77
|
+
okText: '确认',
|
|
78
|
+
okProps: {
|
|
79
|
+
color: 'primary',
|
|
80
|
+
variant: 'contained',
|
|
81
|
+
},
|
|
82
|
+
onOk: function (_a) {
|
|
83
|
+
var onClose = _a.onClose;
|
|
84
|
+
SwithAction();
|
|
85
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
SwithAction();
|
|
91
|
+
}
|
|
92
|
+
}, [token, model, postAiInterviewResult]);
|
|
59
93
|
(0, react_1.useImperativeHandle)(ref, function () { return ({
|
|
60
94
|
handleRefresh: function () { return postAiInterviewResult(); },
|
|
61
95
|
}); });
|
|
@@ -73,10 +107,20 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
73
107
|
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ style: { marginTop: '2px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
|
|
74
108
|
}
|
|
75
109
|
else {
|
|
76
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(ScoreReport_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess }), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }));
|
|
110
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ pb: 3 }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ScoreReport_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [![FAILED, IN_CALCULATION].includes(status) && (0, jsx_runtime_1.jsx)(Report_1.default, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }))] })));
|
|
77
111
|
}
|
|
78
|
-
}, [
|
|
79
|
-
|
|
112
|
+
}, [
|
|
113
|
+
status,
|
|
114
|
+
operableButtons,
|
|
115
|
+
reminderSent,
|
|
116
|
+
onSendReminderClick,
|
|
117
|
+
collection,
|
|
118
|
+
customScore,
|
|
119
|
+
handleRefreshSuccess,
|
|
120
|
+
handleSwitchReportModel,
|
|
121
|
+
workplaces,
|
|
122
|
+
]);
|
|
123
|
+
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '618px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
80
124
|
});
|
|
81
125
|
AiReportRoot.displayName = 'AiReportRoot';
|
|
82
126
|
exports.default = (0, react_1.memo)(AiReportRoot);
|
|
@@ -51,7 +51,7 @@ var Index = function () {
|
|
|
51
51
|
// }, [expand]);
|
|
52
52
|
if (!showAiDimension || ((_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _a === void 0 ? void 0 : _a.length) === 0)
|
|
53
53
|
return null;
|
|
54
|
-
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ id: "report-evaluate",
|
|
54
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ id: "report-evaluate", px: 2, mt: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: [(0, jsx_runtime_1.jsx)(AiHeaderTitle_1.default, { name: "AI\u57FA\u7840\u80FD\u529B" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: (0, jsx_runtime_1.jsxs)("span", { children: ["\u7ED3\u679C\u8BF4\u660E\uFF1A", (0, jsx_runtime_1.jsx)("br", {}), "AI\u57FA\u7840\u80FD\u529B\u4ECE\u8BED\u901F\u3001\u666E\u901A\u8BDD\u3001\u8BED\u8A00\u6D41\u7545\u5EA6\u3001\u8981\u70B9\u5206\u6790\u5339\u914D\u5EA6\u3001\u8BED\u8A00\u4E30\u5BCC\u5EA6\u3001\u5F62\u8C61\u516D\u4E2A\u7EF4\u5EA6\u5BF9\u5019\u9009\u4EBA\u5728\u9762\u8BD5\u4E2D\u7684\u56DE\u7B54\u8868\u73B0\u8FDB\u884C\u8BC4\u4EF7\uFF0C\u6BCF\u4E2A\u7EF4\u5EA6\u5206\u4E3A\u4E09\u4E2A\u6863\uFF0C\u5206\u522B\u4E3A\uFF1A\u524D30%\u4EE3\u8868\u4F18\u79C0\u3001\u4E2D\u95F430%~70%\u4EE3\u8868\u9002\u4E2D\u3001\u540E30%\u4EE3\u8868\u6B20\u4F73\u3002", (0, jsx_runtime_1.jsx)("br", {}), "\u6BCF\u4E2A\u80FD\u529B\u7684\u4E09\u6863\u7684\u5206\u6570\u503C\u4F9D\u636E\u5168\u56FD\u5927\u6570\u636E\u7EDF\u8BA1\u800C\u5B9A\u3002\u6839\u636E\u5019\u9009\u4EBA\u5F53\u524DAI\u89C6\u9891\u6B65\u9AA4\u4E0B\u7684\u6BCF\u4E2A\u80FD\u529B\u7684\u5E73\u5747\u5206\u6765\u786E\u5B9A\u6BCF\u4E2A\u80FD\u529B\u7684\u8BC4\u4EF7\u3002\u76F8\u540C\u7684\u5F97\u5206\uFF0C\u6210\u7EE9\u5148\u51FA\u7684\u6392\u540D\u9760\u524D\u3002"] }) }, { children: (0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { fontSize: '16px' } }) })) }))] })), (0, jsx_runtime_1.jsxs)(mui_1.Collapse, __assign({ in: expand }, { children: [(_b = reportResult === null || reportResult === void 0 ? void 0 : reportResult.evaluations) === null || _b === void 0 ? void 0 : _b.map(function (v) {
|
|
55
55
|
var _a;
|
|
56
56
|
var c = customInterviewDimRankMap === null || customInterviewDimRankMap === void 0 ? void 0 : customInterviewDimRankMap[v.evaluationToken];
|
|
57
57
|
var rank = (0, utils_1.rankPercent)((c === null || c === void 0 ? void 0 : c.rank) || (v === null || v === void 0 ? void 0 : v.rank), (c === null || c === void 0 ? void 0 : c.total) || (v === null || v === void 0 ? void 0 : v.total));
|