yangg 3 дней назад
Родитель
Сommit
6d89f7d96a

+ 1 - 1
.env.development

@@ -6,7 +6,7 @@ ENV = 'development'
 # 本地环境接口地址 121.36.251.245
 
 
-VITE_API_URL = 'http://192.168.100.101:8083'
+VITE_API_URL = 'https://backend.qicai321.com'
 # VITE_API_URL = 'https://backend.qicai321.com'
 VITE_API_WX_URL='https://api.weixin.qq.com/'
 VITE_API_URL_MINLONG='http://117.185.80.170:7861'

+ 2 - 2
src/views/digitalHuman/list/index.vue

@@ -364,7 +364,7 @@ const fetchData = () => {
 	crudExpose.doRefresh();
 };
 const voiceList = ref([
-	{ label: '龙小夏-女', value: 'longxiaoxia' },
+	{ label: '龙小夏', value: 'longxiaoxia' },
 	/* { label: '龙小春', value: 'longxiaochun' },
 	{ label: '龙小瑶', value: 'longxiaoyao' },
 	{ label: '龙小婧', value: 'longxiaojing' },
@@ -374,7 +374,7 @@ const voiceList = ref([
 	{ label: '男声清新风格', value: 'male1' },
 	{ label: '男声稳重风格', value: 'male2' }, */
 /* 	{ label: '女声中英文', value: 'loongstella' }, */
-	{ label: '男声中文', value: 'longxiang' },
+	{ label: '龙翔', value: 'longxiang' },
 /* 	{ label: '男童声中英文', value: 'longjielidou' }, */
 ]);
 /* 获取语音列表 */

+ 9 - 0
src/views/position/detail/api.ts

@@ -223,3 +223,12 @@ export function CheckQuestionVideosStatus(data:any) {
 		params: data,
 	});
 }
+
+/* 查看问题详情 */
+
+export function GetQuestionDetail(id:any) {
+	return request({
+		url: `/api/system/interview_question/detail?question_id=${id}&tenant_id=${Session.get('tenant_id')}`,
+		method: 'get'
+	});
+}

+ 21 - 8
src/views/position/detail/index.vue

@@ -2389,7 +2389,7 @@ import { GetCompetencyList,GetQuestionList,GenerateQuestions,
   GetOpeningSpeech,GetVideo,BatchBind,BatchUnbind,UpdateObj,
   GenerateCompetency,SaveCompetency,GetPositionTags,
   UpdateQuestion,GetPositionQuestions,CreateCompetency,
-  BatchUpdateTags} from './api';
+  BatchUpdateTags,GetQuestionDetail} from './api';
 import draggable from 'vuedraggable';
 import { updateFieldConfig } from './utils';
 import type { ProfileFieldsConfig } from './types';
@@ -3941,7 +3941,7 @@ const handleImportQuestion = () => {
   isEditingQuestion.value = false;
   showQuestionBankFormDialog.value = true;
 };
-
+ 
 // QuestionBankForm 提交处理
 const handleQuestionBankFormSubmit = async (formData: any) => {
   try {
@@ -3950,7 +3950,7 @@ const handleQuestionBankFormSubmit = async (formData: any) => {
       ...formData,
       tenant_id: Session.get('tenant_id')
     });
-    
+    console.log(formData);
     if (response && response.code === 2000) {
       ElMessage.success('题目创建成功');
       console.log(response);
@@ -3959,9 +3959,11 @@ const handleQuestionBankFormSubmit = async (formData: any) => {
         const newQuestion = {
           id: response.data.id || response.data,
           title: formData.question,
+          content: formData.question,
           question_form: formData.question_form,
           question_form_name: getQuestionFormName(formData.question_form),
           scoring_reference: formData.scoring_reference || '',
+          competency_tag_info: formData.competency_tags || [],
           competency_tags: formData.competency_tags || [],
           options: formData.options || [],
           enable_follow_up: false,
@@ -4008,11 +4010,22 @@ const getQuestionFormName = (questionForm: number) => {
 
 // 在 script setup 中添加
 const editQuestion = (index: number) => {
-  // 编辑问题的逻辑
-  const question = chatQuestions.value[index];
-  console.log(question);
-  Object.assign(questionForm, question);
-  console.log(chatQuestions);
+   if(chatQuestions.value[index].source!=='ai_generated'){
+      console.log(chatQuestions.value[index].id);
+      GetQuestionDetail(chatQuestions.value[index].id).then((res:any)=>{
+        console.log(res);
+        if(res.code===2000){
+          Object.assign(questionForm, res.data);
+        }
+      })
+  }else{
+        // 编辑问题的逻辑
+    const question = chatQuestions.value[index];
+    console.log(question);
+    Object.assign(questionForm, question);
+    console.log(chatQuestions);
+  }
+  
   showQuestionDialog.value = true;
   distributeWeightsEvenly()
 };

+ 8 - 1
src/views/talent/list/api.ts

@@ -87,4 +87,11 @@ export function getApplicationStatusSummary() {
 		method: 'get',
 	});
 }
-	
+
+export function exportData(query:any) {
+	return request({
+		url: `/api/system/talent_pool/export_data_minio_sync/?status=${query.status}&tenant_id=${Session.get('tenant_id')}`,
+		method: 'get',
+	
+	});
+}

+ 32 - 1
src/views/talent/list/crud.tsx

@@ -205,7 +205,38 @@ export const createCrudOptions = function ({ crudExpose, context}: CreateCrudOpt
 						icon: 'upload',
 						circle: false,
 						display: true,
-						show:false
+						show: true,
+						click: async () => {
+							try {
+								const response = await api.exportData({
+									tenant_id: Session.get('tenant_id'),
+									status: '1,2,3,4,5',
+								});
+								console.log(response);
+								if (response.code === 2000 ) {
+									// 从响应中获取下载链接和文件名
+									const downloadUrl = response.data.minio_url;
+									const fileName = response.data.file_name;
+									
+									// 创建一个隐藏的a标签来触发下载
+									const link = document.createElement('a');
+									link.href = downloadUrl;
+									link.download = fileName; // 设置下载文件名
+									link.target = '_blank';
+									link.style.display = 'none';
+									document.body.appendChild(link);
+									link.click();
+									document.body.removeChild(link);
+									
+									successMessage('导出成功,文件开始下载');
+								} else {
+									warningMessage('导出失败:' + (response.msg || '未知错误'));
+								}
+							} catch (error) {
+								console.error('导出失败:', error);
+								warningMessage('导出失败,请稍后重试');
+							}
+						}
 					},
 					// 列设置按钮
 					columns:{

+ 8 - 1
src/views/talent/overseas/api.ts

@@ -86,4 +86,11 @@ export function getApplicationStatusSummary() {
 		method: 'get',
 	});
 }
-	
+	
+export function exportData(query:any) {
+	return request({
+		url: `/api/system/talent_pool/export_data_minio_sync/?status=${query.status}&tenant_id=${Session.get('tenant_id')}`,
+		method: 'get',
+	
+	});
+}

+ 32 - 1
src/views/talent/overseas/crud.tsx

@@ -208,7 +208,38 @@ export const createCrudOptions = function ({ crudExpose, context}: CreateCrudOpt
 						icon: 'upload',
 						circle: false,
 						display: true,
-						show:false
+						show:true,
+						click: async () => {
+							try {
+								const response = await api.exportData({
+									tenant_id: Session.get('tenant_id'),
+									status: '6,7',
+								});
+								console.log(response);
+								if (response.code === 2000 ) {
+									// 从响应中获取下载链接和文件名
+									const downloadUrl = response.data.minio_url;
+									const fileName = response.data.file_name;
+									
+									// 创建一个隐藏的a标签来触发下载
+									const link = document.createElement('a');
+									link.href = downloadUrl;
+									link.download = fileName; // 设置下载文件名
+									link.target = '_blank';
+									link.style.display = 'none';
+									document.body.appendChild(link);
+									link.click();
+									document.body.removeChild(link);
+									
+									successMessage('导出成功,文件开始下载');
+								} else {
+									warningMessage('导出失败:' + (response.msg || '未知错误'));
+								}
+							} catch (error) {
+								console.error('导出失败:', error);
+								warningMessage('导出失败,请稍后重试');
+							}
+						}
 					},
 					// 列设置按钮
 					columns:{