|
|
@@ -848,7 +848,7 @@
|
|
|
<div class="question-actions" v-if="element.question_form==1">
|
|
|
<div class="answer-limit">
|
|
|
<span class="answer-label">是否为红线题:</span>
|
|
|
- <el-select v-model="element.is_required_correct" @change="handleIsRequiredCorrectChange(element.id,element.is_required_correct)" size="small" placeholder="请选择">
|
|
|
+ <el-select v-model="element.is_required_correct" :disabled="true" @change="handleIsRequiredCorrectChange(element.id,element.is_required_correct)" size="small" placeholder="请选择">
|
|
|
<el-option label="是" :value="true" />
|
|
|
<el-option label="否" :value="false" />
|
|
|
</el-select>
|
|
|
@@ -1267,9 +1267,10 @@
|
|
|
<el-option label="开放问题" :value="0" />
|
|
|
<el-option label="单选题" :value="1" />
|
|
|
<el-option label="看图选答案" :value="3" />
|
|
|
- <el-option label="多选题" value="multiple" />
|
|
|
- <el-option label="填空题" value="fill" />
|
|
|
- <el-option label="自言语" value="self" />
|
|
|
+ <el-option label="多选题" :value="2" />
|
|
|
+ <el-option label="填空题" :value="6" />
|
|
|
+ <el-option label="得分题" :value="4" />
|
|
|
+ <el-option label="追加型开放问题" :value="5"/>
|
|
|
</el-select>
|
|
|
<div class="form-tip">选择题目的形式:开放问题、单选题、多选题、填空题、自言语</div>
|
|
|
</div>
|
|
|
@@ -2406,27 +2407,32 @@
|
|
|
</el-dialog>
|
|
|
<!-- 查看已选 -->
|
|
|
<el-dialog
|
|
|
- v-model="previewDialog"
|
|
|
- title="预览"
|
|
|
+ v-model="previewDialog"
|
|
|
+ title="职位问题预览"
|
|
|
width="60%"
|
|
|
:close-on-click-modal="false">
|
|
|
- <div class="selected-questions-preview" v-if="selectedQuestions.length > 0">
|
|
|
- <div class="preview-title">已选择的题目({{ selectedQuestions.length }}):</div>
|
|
|
- <div class="preview-list">
|
|
|
- <el-tag
|
|
|
- v-for="(question, index) in selectedQuestions"
|
|
|
- :key="index"
|
|
|
- class="preview-item"
|
|
|
- closable
|
|
|
- style="margin-bottom: 10px;"
|
|
|
- >
|
|
|
- {{ question.question }}
|
|
|
- </el-tag>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="preview-footer">
|
|
|
- <el-button type="primary" @click="previewDialog = false">关闭</el-button>
|
|
|
- </div>
|
|
|
+ <div class="selected-applications-preview">
|
|
|
+ <div class="preview-title">已绑定的问题({{ selectedApplications.length }}):</div>
|
|
|
+ <el-table :data="selectedApplications" style="width: 100%">
|
|
|
+ <el-table-column prop="question" label="问题内容" min-width="300" show-overflow-tooltip />
|
|
|
+ <!-- <el-table-column prop="competency_tag" label="胜任力标签" width="150">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tag size="small" type="info">{{ scope.row.competency_tag }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="is_required_correct" label="是否红线题" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tag :type="scope.row.is_required_correct ? 'danger' : 'info'" size="small">
|
|
|
+ {{ scope.row.is_required_correct ? '是' : '否' }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="score" label="分值" width="80" align="center" /> -->
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div class="preview-footer">
|
|
|
+ <el-button type="primary" @click="previewDialog = false">关闭</el-button>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -2444,7 +2450,7 @@ import { GetCompetencyList,GetQuestionList,GenerateQuestions,
|
|
|
GetOpeningSpeech,GetVideo,BatchBind,BatchUnbind,UpdateObj,
|
|
|
GenerateCompetency,SaveCompetency,GetPositionTags,
|
|
|
UpdateQuestion,GetPositionQuestions,CreateCompetency,
|
|
|
- BatchUpdateTags,GetQuestionDetail} from './api';
|
|
|
+ BatchUpdateTags,GetQuestionDetail,GetSelectedApplications} from './api';
|
|
|
import draggable from 'vuedraggable';
|
|
|
import { updateFieldConfig } from './utils';
|
|
|
import type { ProfileFieldsConfig } from './types';
|
|
|
@@ -2726,10 +2732,26 @@ const handleLocationChange = (value: any) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-const previewDialog=ref(false)
|
|
|
+const previewDialog = ref(false)
|
|
|
+const selectedApplications = ref([])
|
|
|
+
|
|
|
/* 预览已选 */
|
|
|
-const handleQuestionSelectPreview = () => {
|
|
|
+const handleQuestionSelectPreview = async () => {
|
|
|
previewDialog.value = true;
|
|
|
+ try {
|
|
|
+ const response = await GetSelectedApplications({
|
|
|
+ page: 1,
|
|
|
+ limit: 100,
|
|
|
+ job_id: 22,
|
|
|
+ question_form: 0
|
|
|
+ });
|
|
|
+ if (response.data && response.data.items) {
|
|
|
+ selectedApplications.value = response.data.items;
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取职位申请数据失败:', error);
|
|
|
+ ElMessage.error('获取职位申请数据失败');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const handleIsRequiredCorrectChange = (id: number, value: boolean) => {
|
|
|
@@ -3443,7 +3465,7 @@ const addSelectedStepType = async (type: string, label: string) => {
|
|
|
}).then((res:any) => {
|
|
|
if(res.code == 2000) {
|
|
|
recruitmentProcess[0].visible = true;
|
|
|
- ElMessage.success('新增成功');
|
|
|
+ // ElMessage.success('新增成功');
|
|
|
} else {
|
|
|
ElMessage.error('删除失败');
|
|
|
}
|
|
|
@@ -6173,10 +6195,10 @@ const saveBeforeStart = async () => {
|
|
|
if (response.code === 2000) {
|
|
|
// 创建成功后更新getConfigId
|
|
|
getConfigId.value = response.data?.id || response.data;
|
|
|
- ElMessage.success('开始前提示内容已创建');
|
|
|
+ ElMessage.success('开场词提示内容已创建');
|
|
|
isEditingBeforeStart.value = false;
|
|
|
} else {
|
|
|
- ElMessage.error('开始前提示内容创建失败');
|
|
|
+ ElMessage.error('开场词提示内容创建失败');
|
|
|
}
|
|
|
} else {
|
|
|
// getConfigId等于0时,调用UpdateConfig接口
|
|
|
@@ -6186,24 +6208,24 @@ const saveBeforeStart = async () => {
|
|
|
});
|
|
|
|
|
|
if (response.code === 2000) {
|
|
|
- ElMessage.success('开始前提示内容已更新');
|
|
|
+ ElMessage.success('开场词提示内容已更新');
|
|
|
isEditingBeforeStart.value = false;
|
|
|
|
|
|
// 调用GetOpeningSpeech接口
|
|
|
try {
|
|
|
const params = { config_id: getConfigId.value };
|
|
|
await GetOpeningSpeech(params);
|
|
|
- console.log('开场白生成成功');
|
|
|
+ console.log('开场词生成成功');
|
|
|
} catch (error) {
|
|
|
- console.error('获取开场白失败:', error);
|
|
|
- ElMessage.warning('开场白生成中,请稍后');
|
|
|
+ console.error('获取开场词失败:', error);
|
|
|
+ ElMessage.warning('开场词生成中,请稍后');
|
|
|
}
|
|
|
} else {
|
|
|
- ElMessage.error('开始前提示内容更新失败');
|
|
|
+ ElMessage.error('开场词提示内容更新失败');
|
|
|
}
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- console.error('保存开始前提示内容失败:', error);
|
|
|
+ console.error('保存开场词提示内容失败:', error);
|
|
|
ElMessage.error('保存失败,请重试');
|
|
|
}
|
|
|
};
|
|
|
@@ -6757,13 +6779,13 @@ const handleDeleteDocument = (data: any) => {
|
|
|
|
|
|
// 获取文档树数据
|
|
|
const getTreeData = () => {
|
|
|
- GetDocumentTree({}).then((ret: any) => {
|
|
|
+ GetDocumentTree({page:1,limit:100}).then((ret: any) => {
|
|
|
console.log('ret', ret);
|
|
|
const responseData = ret.data;
|
|
|
- GetCategoryList({}).then((res: any) => {
|
|
|
+ GetCategoryList({page:1,limit:100}).then((res: any) => {
|
|
|
console.log('res', res);
|
|
|
const categoryList = res.data.items.filter((item: any) =>
|
|
|
- !['技术能力', '服务意识', '职业素质','基本常识','色盲检测','内容铺垫','心理测试1'].includes(item.name)
|
|
|
+ !['技术能力', '服务意识', '职业素质','基本常识','色盲检测','内容铺垫','心理测试1','心理测试'].includes(item.name)
|
|
|
);
|
|
|
GetTagList({}).then((res: any) => {
|
|
|
console.log('res', res);
|
|
|
@@ -6884,13 +6906,13 @@ const handleNodeClick = async (data: any) => {
|
|
|
}
|
|
|
|
|
|
const getDFTreeData = () => {
|
|
|
- GetDocumentTree({}).then((ret: any) => {
|
|
|
+ GetDocumentTree({page:1,limit:100}).then((ret: any) => {
|
|
|
console.log('ret', ret);
|
|
|
const responseData = ret.data;
|
|
|
- GetCategoryList({}).then((res: any) => {
|
|
|
+ GetCategoryList({page:1,limit:100}).then((res: any) => {
|
|
|
console.log('res', res);
|
|
|
const categoryList = res.data.items.filter((item: any) =>
|
|
|
- !['技术能力', '服务意识', '职业素质','基本常识','色盲检测','内容铺垫','红线题','健康情况','综合素质题'].includes(item.name)
|
|
|
+ ['心理测试'].includes(item.name)
|
|
|
);
|
|
|
GetTagList({}).then((res: any) => {
|
|
|
console.log('res', res);
|
|
|
@@ -6918,6 +6940,34 @@ const getDFTreeData = () => {
|
|
|
<style scoped>
|
|
|
@import './index.css';
|
|
|
|
|
|
+.selected-applications-preview {
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.preview-title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+
|
|
|
+.preview-footer {
|
|
|
+ margin-top: 20px;
|
|
|
+ text-align: right;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-table) {
|
|
|
+ margin-top: 15px;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-table th) {
|
|
|
+ background-color: #f5f7fa;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-tag) {
|
|
|
+ margin-right: 5px;
|
|
|
+}
|
|
|
+
|
|
|
</style>
|
|
|
<style lang="scss" scoped>
|
|
|
/* 修改 checkbox 选中颜色 */
|