yangg 2 dni temu
rodzic
commit
d68afe1d3b

+ 2 - 2
.env.development

@@ -6,8 +6,8 @@ ENV = 'development'
 # 本地环境接口地址 121.36.251.245
 
 
-#VITE_API_URL = 'https://backend.qicai321.com'
-VITE_API_URL = 'http://192.168.100.115:8083'
+VITE_API_URL = 'https://backend.qicai321.com'
+#VITE_API_URL = 'http://192.168.100.115:8083'
 VITE_API_WX_URL='https://api.weixin.qq.com/'
 VITE_API_URL_MINLONG='http://117.185.80.170:7861'
 # 是否启用按钮权限

+ 3 - 1
src/views/JobApplication/report/report.vue

@@ -1389,12 +1389,14 @@ export default {
     },
 
     async fetchApplicationDetail() {
+       console.log(Session.get('tenant_id'))
       try {
         const application_id = this.$route.query.id || this.$route.params.id
+        const tenant_id =this.$route.query.tenant_id || this.$route.params.tenant_id
         console.log(application_id)
         this.loading = true
         const response = await fetch(
-          `${import.meta.env.VITE_API_URL}/api/job/application_detail?tenant_id=${Session.get('tenant_id')}&application_id=${application_id}`
+          `${import.meta.env.VITE_API_URL}/api/job/application_detail?tenant_id=${Session.get('tenant_id')||tenant_id}&application_id=${application_id}`
         )
 
         if (!response.ok) {

+ 70 - 38
src/views/position/detail/index.vue

@@ -1429,7 +1429,10 @@
         </div>
         <div class="form-item">
           <div class="form-label">分类</div>
-          <el-select
+           <el-input v-model="questionForm.category_name"  
+          :disabled="true"
+          placeholder="暂无分类" />
+         <!--  <el-select
             v-model="questionForm.category"
             placeholder="请选择题目分类"
             class="full-width"
@@ -1441,24 +1444,24 @@
               :label="cat.label"
               :value="cat.value"
             />
-          </el-select>
+          </el-select> -->
           <div class="form-tip">选择题目所属分类</div>
         </div>
 
         <div class="form-item">
           <div class="form-label">标签</div>
           <el-select
-            v-model="questionForm.tags"
-            placeholder="请选择标签"
+            v-model="questionForm.tag_ids"
+            placeholder="暂无标签"
             class="full-width"
             multiple
             :disabled="true"
           >
             <el-option 
-              v-for="tag in tagOptions" 
+              v-for="tag in questionForm.tags" 
               :key="tag.value"
-              :label="tag.label"
-              :value="tag.value"
+              :label="tag.name"
+              :value="tag.id"
             />
           </el-select>
           <div class="form-tip">选择题目相关标签,可多选</div>
@@ -2994,12 +2997,13 @@ const questionForm = reactive({
   question_form: 0, // 题目类型:0-开放问题,1-单选题,2-多选题
   options: [], // 选项列表
   position: [], // 适用职位
-  category: '', // 分类
+  category_name: '', // 分类
   tags: [], // 标签
   suggestedDuration: 60, // 建议时长,默认60秒
   scoring_reference: '', // 评分标准
   question_image_url: '', // 题目图片
-  blank_answer_template: []
+  blank_answer_template: [],
+  tag_ids:[]
 });
 
 // 定义胜任力标签类型
@@ -3030,13 +3034,7 @@ const categoryOptions = ref([
 ]);
 
 // 标签选项
-const tagOptions = ref([
-  { label: '时间管理', value: 'time_management' },
-  { label: '压力处理', value: 'pressure_handling' },
-  { label: '团队合作', value: 'team_cooperation' },
-  { label: '问题分析', value: 'problem_analysis' },
-  { label: '创新思维', value: 'innovative_thinking' }
-]);
+const tagOptions = ref([]);
 
 // 重置问题表单
 const resetQuestionForm = () => {
@@ -3050,12 +3048,13 @@ const resetQuestionForm = () => {
     question_form: 0,
     options: [],
     position: [],
-    category: '',
+    category_name: '',
     tags: [],
     suggestedDuration: 60,
     scoring_reference: '',
     question_image_url: '',
-    blank_answer_template: []
+    blank_answer_template: [],
+    tag_ids:[]
   });
 };
 
@@ -3399,7 +3398,12 @@ const deleteProcessStep = (step: any,index: number) => {
           DeleteSelectedApplications({
             position_id: route.query.id,
             question_id: psychologicalTestIds
-          });
+          }).then((respones:any)=>{
+            console.log(respones);
+            if(respones.code==2000){
+              ApplicationsList.value=[]
+            }
+          })
         }
         ElMessage.success('删除成功');
       } else {
@@ -3427,7 +3431,11 @@ const deleteProcessStep = (step: any,index: number) => {
           DeleteSelectedApplications({
             position_id: route.query.id,
             question_id: psychoTestIds
-          });
+          }).then((respones:any)=>{
+            if(respones.code==2000){
+              ApplicationsList.value=[]
+            }
+          })
         }
       } else {
         ElMessage.error('删除失败');
@@ -4300,7 +4308,10 @@ const editQuestion = (index: number) => {
             maxAnswers:res.data.maxAnswers,
             weight:res.data.weight,
             question_image_url:res.data.question_image_url,
-            blank_answer_template: res.data.blank_answer_template || []
+            blank_answer_template: res.data.blank_answer_template || [],
+            tags:res.data.tags,
+            category_name:res.data.category_name,
+            tag_ids:res.data.tag_ids,
           }
           Object.assign(questionForm, data);
         }
@@ -6186,7 +6197,8 @@ const defaultConfig = {
       company_size: { visible: true, label: '单位人数', required: true },
       department: { visible: true, label: '任职部门', required: true },
       position: { visible: true, label: '担任职务', required: true },
-      monthly_income: { visible: true, label: '月总收入', required: true },
+      monthly_salary: { visible: true, label: '月总收入', required: true },
+      /* monthly_income:{visible: true, label: '月总收入', required: true}, */
       direct_supervisor: { visible: true, label: '直接领导', required: true },
       supervisor_phone: { visible: true, label: '领导电话', required: true }
     }
@@ -6268,7 +6280,7 @@ const saveFieldConfig = async () => {
         achievements: { required: false, visible: true },
         resignation_reason: { required: false, visible: true },
         company_size:{required: fieldConfig.work_experience.fields.company_size.required, visible: fieldConfig.work_experience.fields.company_size.visible},
-        monthly_income:{required: fieldConfig.work_experience.fields.monthly_income.required, visible: fieldConfig.work_experience.fields.monthly_income.visible},
+        monthly_salary:{required: fieldConfig.work_experience.fields.monthly_salary.required, visible: fieldConfig.work_experience.fields.monthly_salary.visible},
         supervisor_phone:{required: fieldConfig.work_experience.fields.supervisor_phone.required, visible: fieldConfig.work_experience.fields.supervisor_phone.visible}
       },
       
@@ -6420,26 +6432,20 @@ const editingDisclaimerText = ref('');
 
 // 取消面试设置
 const cancelInterviewSettings = () => {
+  // 恢复原始配置
+  if (originalInterviewSettings.value && Object.keys(originalInterviewSettings.value).length > 0) {
+    Object.assign(interviewSettings, originalInterviewSettings.value);
+    console.log('已恢复原始配置:', originalInterviewSettings.value);
+  }
+  
   showInterviewSettingsDialog.value = false;
   // 重置编辑状态
   isEditingBeforeStart.value = false;
   isEditingAfterStart.value = false;
   isEditingDisclaimer.value = false;
-  // 重置表单
-  Object.assign(interviewSettings, {
-    faceConsistency: true,
-    preventScreenshot: true,
-    screenSwitchAlert: true,
-    positionDetection: true,
-    eyeMovementDetection: true,
-    reviewInterview: false,
-    beforeStart: true,
-    beforeStartText: '你好,我想咨询其间的面试,欢迎来到大面试',
-    afterStartReminder: false,
-    afterStartText: '本次面试如有15分钟,高效调前后流程,安静好心理',
-    disclaimer: false,
-    disclaimerText: '本次面试已全部流程拍摄,面试者同意可为今后资讯调研'
-  });
+  
+  // 清空备份
+  originalInterviewSettings.value = {};
   refreshPage()
 };
 /* 眼动情绪 */
@@ -6463,12 +6469,38 @@ const confirmInterviewSettings = () => {
   // console.log('保存面试设置:', interviewSettings);
   handlePositionDetectionChange()
   ElMessage.success('面试设置已保存');
+  
+  // 按职位ID区分保存到 sessionStorage
+  const positionId = route.query.id as string;
+  const storageKey = `reviewInterview_${positionId}`;
+  sessionStorage.setItem(storageKey, String(interviewSettings.reviewInterview));
+  console.log(`职位 ${positionId} 的 reviewInterview 已保存:`, interviewSettings.reviewInterview);
+  
   showInterviewSettingsDialog.value = false;
+  
+  // 清空备份
+  originalInterviewSettings.value = {};
 };
 
+// 备份原始配置
+const originalInterviewSettings = ref({});
+
 // 编辑面试设置
 const handleEditInterview = () => {
   GetConfig(route.query.id).then((res:any)=>{
+    nextTick(()=>{
+      // 备份当前配置
+      originalInterviewSettings.value = { ...interviewSettings };
+      
+      // 按职位ID区分存储和读取 reviewInterview 配置
+      const positionId = route.query.id as string;
+      const storageKey = `reviewInterview_${positionId}`;
+      const storedReviewInterview = sessionStorage.getItem(storageKey);
+      
+      // 如果当前职位没有设置过,则使用默认值 false
+      interviewSettings.reviewInterview = storedReviewInterview === 'true';
+      console.log(`职位 ${positionId} 的 reviewInterview 配置:`, storedReviewInterview, '转换后:', interviewSettings.reviewInterview);
+    })
     showInterviewSettingsDialog.value = true;
     getConfigId.value=res.data.id;
     interviewSettings.beforeStartText = res.data.digital_human_opening_speech;