|
@@ -1382,6 +1382,14 @@
|
|
|
</div>
|
|
|
<div class="form-tip">添加选项并设置正确答案,单选题只能有一个正确答案,多选题可以有多个正确答案</div>
|
|
|
</div>
|
|
|
+ <div class="form-item" v-if="questionForm.question_form==6">
|
|
|
+ <div class="form-label">填空答案模板</div>
|
|
|
+ <BlankAnswerEditor
|
|
|
+ :model-value="questionForm.blank_answer_template || []"
|
|
|
+ :question="questionForm.content"
|
|
|
+ :readonly="true"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
<div v-if="questionForm.question_form === 3">
|
|
|
<div class="form-label">题目图片</div>
|
|
|
<img :src="questionForm.question_image_url" alt="">
|
|
@@ -2235,7 +2243,7 @@
|
|
|
</div> -->
|
|
|
<span class="dialog-footer">
|
|
|
<el-button @click="handleQuestionSelectPreview">预览已选</el-button>
|
|
|
- <el-button @click="cancelQuestionSelect">取消</el-button>
|
|
|
+ <!-- <el-button @click="cancelQuestionSelect">取消</el-button> -->
|
|
|
<el-button type="primary" @click="confirmSelect" style="background-color: #ed7d31;border-color: #ed7d31;">确定</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
@@ -2456,6 +2464,7 @@ import { updateFieldConfig } from './utils';
|
|
|
import type { ProfileFieldsConfig } from './types';
|
|
|
import { getPCAData } from '../../../utils/pcaData';
|
|
|
import QuestionBankForm from '../../questionBank/list/components/QuestionBankForm.vue';
|
|
|
+import BlankAnswerEditor from '../../questionBank/list/components/BlankAnswerEditor.vue';
|
|
|
import * as questionBankApi from '../../questionBank/list/api';
|
|
|
import TreeList from './treeList.vue';
|
|
|
import { GetDocumentTree, GetCategoryList, GetTagList,DeleteDocumentCategory } from '../../questionBank/positionList/api';
|
|
@@ -2564,7 +2573,8 @@ const recruitmentProcess = reactive([
|
|
|
{ id: 5, name: '资料收集', description: '资料收集', active: true, type: 'data_collection',visible:true },
|
|
|
{ id: 2, name: 'AI考察', description: 'AI考察', active: true, type: 'ai_video',visible:true },
|
|
|
{ id: 8, name: '综合素质考察', description: '综合素质考察', active: true, type: 'common_sense',visible:true },
|
|
|
- { id: 9, name: '心理问题', description: '心理问题', active: true, type: 'psychological_problem',visible:true },
|
|
|
+ { id: 9, name: '心理测试', description: '心理测试', active: true, type: 'psychological_problem',visible:true },
|
|
|
+ { id: 10, name: '肢体检测', description: '肢体检测', active: true, type: 'posture_check', visible: true }, //, enable_posture_check: true
|
|
|
{ id: 7, name: '候选人提问', description: '时长5分钟,最多3个问题', active: true, type: 'candidate_questions', visible:true,
|
|
|
config: {
|
|
|
title: '候选人提问',
|
|
@@ -2580,7 +2590,7 @@ const recruitmentProcess = reactive([
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
|
|
|
/* { id: 1, name: '待核验', description: '待核验', active: true, type: 'pending_verification' }, */
|
|
|
{ id: 3, name: '已通过', description: '已通过', active: true, type: 'passed',visible:true },
|
|
@@ -2598,9 +2608,9 @@ const processStepOptions = [
|
|
|
{ label: '资料收集', value: 'data_collection' },
|
|
|
{ label: 'AI考察', value: 'ai_video' },
|
|
|
{ label: '综合素质考察', value: 'common_sense' },
|
|
|
- { label: '心理问题', value: 'psychological_problem' },
|
|
|
+ { label: '心理测试', value: 'psychological_problem' },
|
|
|
{ label: '候选人提问', value: 'candidate_questions' },
|
|
|
- { label: '肢体检测', value: 'body_detection' }, // 新增肢体检测选项
|
|
|
+ { label: '肢体检测', value: 'posture_check' }, // 新增肢体检测选项
|
|
|
/* { label: 'AI实时对话', value: 'ai_chat' },*/
|
|
|
/* { label: '代码测试', value: 'code_test' },
|
|
|
{ label: '打字测试', value: 'typing_test' } */
|
|
@@ -2742,8 +2752,8 @@ const handleQuestionSelectPreview = async () => {
|
|
|
const response = await GetSelectedApplications({
|
|
|
page: 1,
|
|
|
limit: 100,
|
|
|
- job_id: 22,
|
|
|
- question_form: 0
|
|
|
+ job_id: route.query.id,
|
|
|
+
|
|
|
});
|
|
|
if (response.data && response.data.items) {
|
|
|
selectedApplications.value = response.data.items;
|
|
@@ -2901,7 +2911,8 @@ const questionForm = reactive({
|
|
|
tags: [], // 标签
|
|
|
suggestedDuration: 60, // 建议时长,默认60秒
|
|
|
scoring_reference: '', // 评分标准
|
|
|
- question_image_url: '' // 题目图片
|
|
|
+ question_image_url: '', // 题目图片
|
|
|
+ blank_answer_template: []
|
|
|
});
|
|
|
|
|
|
// 定义胜任力标签类型
|
|
@@ -2956,7 +2967,8 @@ const resetQuestionForm = () => {
|
|
|
tags: [],
|
|
|
suggestedDuration: 60,
|
|
|
scoring_reference: '',
|
|
|
- question_image_url: ''
|
|
|
+ question_image_url: '',
|
|
|
+ blank_answer_template: []
|
|
|
});
|
|
|
};
|
|
|
|
|
@@ -3112,7 +3124,18 @@ const confirmResumeCollection = () => {
|
|
|
|
|
|
// 添加到流程中
|
|
|
recruitmentProcess.splice(currentAddIndex.value, 0, newStep);
|
|
|
- console.log(recruitmentProcess);
|
|
|
+
|
|
|
+ UpdateConfig({
|
|
|
+ id: getConfigId.value,
|
|
|
+ require_resume_upload: true // 删除综合素质考察时,将enable_scoring_questions设置为false
|
|
|
+ }).then((res:any) => {
|
|
|
+ if(res.code == 2000) {
|
|
|
+ recruitmentProcess[0].visible = true;
|
|
|
+ // ElMessage.success('新增成功');
|
|
|
+ } else {
|
|
|
+ ElMessage.error('删除失败');
|
|
|
+ }
|
|
|
+ })
|
|
|
// 关闭弹窗
|
|
|
showResumeCollectionDialog.value = false;
|
|
|
|
|
@@ -3309,7 +3332,21 @@ const deleteProcessStep = (step: any,index: number) => {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ if(step.type=='posture_check'){
|
|
|
+ UpdateConfig({
|
|
|
+ id: getConfigId.value,
|
|
|
+ enable_posture_check: false
|
|
|
+ }).then((res:any) => {
|
|
|
+ if(res.code == 2000) {
|
|
|
+ ElMessage.success('删除成功');
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ ElMessage.error('删除失败');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
recruitmentProcess.splice(index, 1);
|
|
|
+ console.log('recruitmentProcess',recruitmentProcess);
|
|
|
};
|
|
|
|
|
|
// 在特定位置添加流程步骤
|
|
@@ -3434,7 +3471,7 @@ const addSelectedStepType = async (type: string, label: string) => {
|
|
|
|
|
|
}
|
|
|
|
|
|
- // 添加心理问题类型的处理
|
|
|
+ // 添加心理测试类型的处理
|
|
|
if (type === 'psychological_problem') {
|
|
|
UpdateConfig({
|
|
|
id: getConfigId.value,
|
|
@@ -3459,13 +3496,17 @@ const addSelectedStepType = async (type: string, label: string) => {
|
|
|
}
|
|
|
|
|
|
if(type=='resume_collection'){
|
|
|
+
|
|
|
+ }
|
|
|
+//肢体检测
|
|
|
+ if(type==='posture_check'){
|
|
|
UpdateConfig({
|
|
|
id: getConfigId.value,
|
|
|
- require_resume_upload: true // 删除综合素质考察时,将enable_scoring_questions设置为false
|
|
|
+ enable_posture_check: true
|
|
|
}).then((res:any) => {
|
|
|
if(res.code == 2000) {
|
|
|
- recruitmentProcess[0].visible = true;
|
|
|
- // ElMessage.success('新增成功');
|
|
|
+ console.log('recruitmentProcess',recruitmentProcess);
|
|
|
+ recruitmentProcess[5].visible = true;
|
|
|
} else {
|
|
|
ElMessage.error('删除失败');
|
|
|
}
|
|
@@ -3524,6 +3565,12 @@ const addSelectedStepType = async (type: string, label: string) => {
|
|
|
showOptionsMenu.value = false;
|
|
|
return;
|
|
|
}
|
|
|
+ //添加肢体检测
|
|
|
+ if(type==='posture_check'){
|
|
|
+ // showPostureCheckConfig();
|
|
|
+ showOptionsMenu.value = false;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
// 添加代码测试类型的处理
|
|
|
if (type === 'code_test') {
|
|
@@ -4127,7 +4174,7 @@ const editQuestion = (index: number) => {
|
|
|
scoring_reference:res.data.scoring_reference,
|
|
|
competency_tag_info:res.data.competency_tag_info,
|
|
|
competency_tags:res.data.competency_tags,
|
|
|
- options:res.data.options.map((item:any)=>{
|
|
|
+ options:res.data.options?.map((item:any)=>{
|
|
|
return {
|
|
|
text:item.option_text,
|
|
|
is_correct:item.is_correct,
|
|
@@ -4137,7 +4184,8 @@ const editQuestion = (index: number) => {
|
|
|
enable_follow_up:res.data.enable_follow_up,
|
|
|
maxAnswers:res.data.maxAnswers,
|
|
|
weight:res.data.weight,
|
|
|
- question_image_url:res.data.question_image_url
|
|
|
+ question_image_url:res.data.question_image_url,
|
|
|
+ blank_answer_template: res.data.blank_answer_template || []
|
|
|
}
|
|
|
Object.assign(questionForm, data);
|
|
|
}
|
|
@@ -4256,6 +4304,7 @@ const initializeConfigState = async () => {
|
|
|
config.data.question_form_switches.enable_image_choice ||
|
|
|
config.data.question_form_switches.enable_fill_blank;
|
|
|
recruitmentProcess[4].visible = config.data.question_form_switches.enable_scoring_questions;
|
|
|
+ recruitmentProcess[5].visible = config.data.enable_posture_check;
|
|
|
|
|
|
|
|
|
// 可以在这里添加其他配置状态的同步
|
|
@@ -4957,6 +5006,39 @@ const editAIVideo = async (step: AIVideoStep) => {
|
|
|
return item;
|
|
|
});
|
|
|
}
|
|
|
+ // 新增:获取选定的申请数据
|
|
|
+ const selectedApplicationsResponse = await GetSelectedApplications({
|
|
|
+
|
|
|
+ job_id: route.query.id,
|
|
|
+ page: 1,
|
|
|
+ limit: 50
|
|
|
+ });
|
|
|
+ // 处理获取的申请数据并合并到 chatQuestions
|
|
|
+ if (selectedApplicationsResponse && selectedApplicationsResponse.data) {
|
|
|
+ const selectedApplications = selectedApplicationsResponse.data.items
|
|
|
+ .filter((app: any) => app.question_form !== 4 && app.question_form !== 5) // 过滤掉 question_form == 4 的项
|
|
|
+ .map((app: any) => {
|
|
|
+
|
|
|
+ app.content=app.question, // 假设这里是申请内容
|
|
|
+ app.title=app.question, // 假设这里是申请标题
|
|
|
+ app.source='selected_application',
|
|
|
+ app.id=app.question_id
|
|
|
+ return app
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ // 合并数据并过滤掉重复的问题
|
|
|
+ const existingQuestionIds = new Set(chatQuestions.value.map((item: any) => item.content)); // 创建一个集合,存储现有问题的 ID
|
|
|
+
|
|
|
+ const uniqueSelectedApplications = selectedApplications.filter((app: any) => {
|
|
|
+ // 只保留那些不在现有问题集合中的申请
|
|
|
+ return !existingQuestionIds.has(app.content);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 合并数据
|
|
|
+ chatQuestions.value = [...chatQuestions.value, ...uniqueSelectedApplications];
|
|
|
+ console.log('chatQuestions', chatQuestions.value);
|
|
|
+ }
|
|
|
|
|
|
// 首先尝试获取已有的职位标签
|
|
|
const existingTags = await GetPositionTags({position_id:route.query.id,page:1,limit:50});
|
|
@@ -5029,7 +5111,7 @@ const editAIVideo = async (step: AIVideoStep) => {
|
|
|
})
|
|
|
|
|
|
}
|
|
|
- if(step.name === '心理问题'){
|
|
|
+ if(step.name === '心理测试'){
|
|
|
GetQuestionList({page:1,limit:30,question_form:4}).then((res:any)=>{
|
|
|
if(res.data){
|
|
|
questionListQuery.question_form=4
|
|
@@ -5751,8 +5833,9 @@ const fetchQuestionList = async () => {
|
|
|
};
|
|
|
const response = await GetQuestionList(params);
|
|
|
if (response && response.data) {
|
|
|
+ console.log(response.data);
|
|
|
questionList.value = response.data.items;
|
|
|
- totalQuestions.value = response.data.total;
|
|
|
+ totalQuestions2.value = response.data.total;
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error('获取题目列表失败:', error);
|
|
@@ -6704,7 +6787,7 @@ const saveBodyDetectionConfig = async () => {
|
|
|
// TODO: 调用API保存配置
|
|
|
await saveProcessConfig({
|
|
|
position_id: route.params.id,
|
|
|
- process_type: 'body_detection',
|
|
|
+ process_type: 'posture_check',
|
|
|
config: bodyDetectionConfig.value
|
|
|
})
|
|
|
ElMessage.success('配置保存成功')
|
|
@@ -6719,7 +6802,7 @@ const saveBodyDetectionConfig = async () => {
|
|
|
const handleProcessConfig = (type: string) => {
|
|
|
switch (type) {
|
|
|
// ... existing code ...
|
|
|
- case 'body_detection':
|
|
|
+ case 'posture_check':
|
|
|
openBodyDetectionConfig()
|
|
|
break
|
|
|
// ... existing code ...
|