Răsfoiți Sursa

添加了一些功能

Gqingci 1 săptămână în urmă
părinte
comite
3e61f2719c

+ 7 - 0
src/api/main/evaluation/index.ts

@@ -10,6 +10,13 @@ export function listEvaluation(query: MainExamEvaluationQuery): AxiosPromise<Mai
   });
 }
 
+export function getEvaluation(id: string | number): AxiosPromise<MainExamEvaluationVO> {
+  return request({
+    url: '/main/examEvaluation/' + id,
+    method: 'get'
+  });
+}
+
 export function updateEvaluationStatus(id: string | number, status: string) {
   return request({
     url: `/main/examEvaluation/status/${id}/${status}`,

+ 8 - 0
src/api/main/evaluation/types.ts

@@ -17,6 +17,14 @@ export interface MainExamEvaluationVO extends BaseEntity {
   tenantId?: string;
   remark?: string;
   updateTime?: string;
+  abilityConfigs?: Array<{
+    id?: number | string;
+    abilityName?: string;
+    abilityCode?: string;
+    score?: number | string;
+    passingScore?: number | string;
+    sortOrder?: number;
+  }>;
 }
 
 export interface MainExamEvaluationQuery extends PageQuery {

+ 16 - 0
src/api/system/industry/index.ts

@@ -10,6 +10,14 @@ export function listIndustry(query?: IndustryQuery): AxiosPromise<IndustryVO[]>
   });
 }
 
+export function listIndustryOpen(query?: IndustryQuery): AxiosPromise<IndustryVO[]> {
+  return request({
+    url: '/system/industry/open/list',
+    method: 'get',
+    params: query
+  });
+}
+
 export function listIndustrySkill(query?: IndustrySkillQuery): AxiosPromise<IndustrySkillVO[]> {
   return request({
     url: '/system/industry/skill/list',
@@ -17,3 +25,11 @@ export function listIndustrySkill(query?: IndustrySkillQuery): AxiosPromise<Indu
     params: query
   });
 }
+
+export function listIndustrySkillOpen(query?: IndustrySkillQuery): AxiosPromise<IndustrySkillVO[]> {
+  return request({
+    url: '/system/industry/skill/open/list',
+    method: 'get',
+    params: query
+  });
+}

+ 6 - 0
src/router/index.ts

@@ -133,6 +133,12 @@ export const constantRoutes: RouteRecordRaw[] = [
     component: Layout,
     hidden: true,
     children: [
+      {
+        path: 'evaluation-view',
+        component: () => import('@/views/evaluation/components/evaluation-view.vue'),
+        name: 'EvaluationView',
+        meta: { title: '测评查看', icon: 'post', activeMenu: '/evaluation' }
+      },
       {
         path: 'apply-list',
         component: () => import('@/views/evaluation/apply-list.vue'),

+ 1 - 1
src/views/evaluation/apply-list.vue

@@ -201,7 +201,7 @@ const handleRemove = (row: ApplyRow) => {
 
 const handleOpenDetail = (row: ApplyRow) => {
   router.push({
-    path: '/evaluation/apply-detail',
+    path: '/evaluation/evaluation-view',
     query: {
       applyId: String(row.id),
       name: row.name,

+ 221 - 0
src/views/evaluation/components/evaluation-view.vue

@@ -0,0 +1,221 @@
+<template>
+  <PageShell>
+    <div class="evaluation-view-page">
+      <div class="left-card">
+        <div class="card-title">考生信息</div>
+        <div class="info-list">
+          <div class="info-item"><span>姓名:</span><span>张三</span></div>
+          <div class="info-item"><span>报名岗位:</span><span>审计</span></div>
+          <div class="info-item"><span>开始时间:</span><span>2024-06-13 09:49:47</span></div>
+          <div class="info-item"><span>结束时间:</span><span>2024-06-13 09:50:26</span></div>
+          <div class="info-item"><span>答题时长:</span><span>0分39秒</span></div>
+          <div class="info-item"><span>浏览器:</span><span>unknown Browser</span></div>
+          <div class="info-item"><span>终端设备:</span><span>iPhone iOS 17.5.1</span></div>
+          <div class="info-item"><span>用户IP:</span><span>59.46.39.185</span></div>
+        </div>
+
+        <div class="card-title second">答题信息</div>
+        <div class="answer-list">
+          <div class="answer-item"><span>能力测试:10/30</span><el-tag type="success">通过</el-tag></div>
+          <div class="answer-item"><span>实操能力:20/40</span><el-tag type="success">通过</el-tag></div>
+          <div class="answer-item"><span>性格:12/34</span><el-tag type="danger">未通过</el-tag></div>
+        </div>
+
+        <div class="card-title second">维度分析</div>
+        <div class="chart-placeholder">维度图</div>
+        <div class="footer-btn">
+          <el-button @click="handleBack">返回</el-button>
+          <el-button type="primary">下一份</el-button>
+        </div>
+      </div>
+
+      <div class="right-card">
+        <div v-for="item in questionList" :key="item.id" class="question-block">
+          <div class="question-head">
+            <span>第{{ item.id }}题</span>
+            <div class="question-result">
+              <el-tag :type="item.correct ? 'success' : 'danger'">{{ item.correct ? '正确' : '错误' }}</el-tag>
+              <span>得分</span>
+              <el-input :model-value="String(item.score)" class="score-input" readonly />
+            </div>
+          </div>
+          <div class="question-title">请选择一个选项</div>
+          <div class="question-options">
+            <div v-for="option in item.options" :key="option.label" class="question-option">
+              <el-radio :model-value="item.answer" :label="option.label">{{ option.label }}.{{ option.text }}</el-radio>
+              <span v-if="option.correct" class="correct-text">正确答案</span>
+            </div>
+          </div>
+          <div v-if="item.analysis" class="question-analysis">
+            <div>答案解析:</div>
+            <div>{{ item.analysis }}</div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </PageShell>
+</template>
+
+<script setup name="PostManageEvaluationView" lang="ts">
+import { getCurrentInstance, type ComponentInternalInstance } from 'vue';
+import { useRouter } from 'vue-router';
+import PageShell from '@/components/PageShell/index.vue';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const router = useRouter();
+
+const questionList = [
+  {
+    id: 1,
+    correct: true,
+    score: 5,
+    answer: 'A',
+    options: [
+      { label: 'A', text: '选项1', correct: true },
+      { label: 'B', text: '选项2', correct: false },
+      { label: 'C', text: '选项3', correct: false },
+      { label: 'D', text: '选项4', correct: false }
+    ],
+    analysis: ''
+  },
+  {
+    id: 2,
+    correct: true,
+    score: 5,
+    answer: 'A',
+    options: [
+      { label: 'A', text: '选项1', correct: true },
+      { label: 'B', text: '选项2', correct: false },
+      { label: 'C', text: '选项3', correct: false },
+      { label: 'D', text: '选项4', correct: false }
+    ],
+    analysis: ''
+  },
+  {
+    id: 3,
+    correct: false,
+    score: 0,
+    answer: 'C',
+    options: [
+      { label: 'A', text: '选项1', correct: true },
+      { label: 'B', text: '选项2', correct: false },
+      { label: 'C', text: '选项3', correct: false },
+      { label: 'D', text: '选项4', correct: false }
+    ],
+    analysis: '解析解析解析解析解析解析解析解析'
+  }
+];
+
+const handleBack = () => {
+  proxy?.$tab.closePage();
+  router.back();
+};
+</script>
+
+<style scoped>
+.evaluation-view-page {
+  display: grid;
+  grid-template-columns: 180px 1fr;
+  gap: 16px;
+}
+
+.left-card,
+.right-card {
+  background: #fff;
+  border-radius: 6px;
+  padding: 16px;
+}
+
+.card-title {
+  font-size: 16px;
+  font-weight: 600;
+  margin-bottom: 12px;
+}
+
+.card-title.second {
+  margin-top: 20px;
+}
+
+.info-list,
+.answer-list {
+  display: flex;
+  flex-direction: column;
+  gap: 8px;
+  font-size: 12px;
+  color: #606266;
+}
+
+.info-item,
+.answer-item {
+  display: flex;
+  justify-content: space-between;
+  gap: 8px;
+}
+
+.chart-placeholder {
+  height: 180px;
+  border: 1px dashed #dcdfe6;
+  border-radius: 8px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: #909399;
+}
+
+.footer-btn {
+  margin-top: 16px;
+  display: flex;
+  justify-content: flex-end;
+  gap: 12px;
+}
+
+.question-block {
+  padding-bottom: 18px;
+  margin-bottom: 18px;
+  border-bottom: 1px dashed #ebeef5;
+}
+
+.question-head {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 16px;
+}
+
+.question-result {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+}
+
+.score-input {
+  width: 56px;
+}
+
+.question-title {
+  margin-bottom: 12px;
+}
+
+.question-options {
+  display: flex;
+  flex-direction: column;
+  gap: 10px;
+}
+
+.question-option {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+}
+
+.correct-text {
+  color: #67c23a;
+  font-size: 12px;
+}
+
+.question-analysis {
+  margin-top: 16px;
+  color: #606266;
+  font-size: 13px;
+}
+</style>

+ 1 - 1
src/views/postManage/apply-detail.vue

@@ -204,7 +204,7 @@ const companyRateDialog = reactive({
 
 const handleOpenEvaluation = (row: { name: string }) => {
   router.push({
-    path: '/postManage/evaluation-view',
+    path: '/evaluation/detail',
     query: {
       name: row.name
     }

+ 2 - 2
src/views/postManage/apply-list.vue

@@ -137,7 +137,7 @@ const total = 243;
 
 const applyStatusOptions = [
   { label: '录用', value: 'adopted' },
-  { label: '不用', value: 'rejected' },
+  { label: '不用', value: 'rejected' },
   { label: '待回复', value: 'pending' },
   { label: '学员已拒绝', value: 'closed' }
 ];
@@ -260,7 +260,7 @@ const handleOpenDetail = (row: { id: number; name: string }) => {
   margin-bottom: 0;
 }
 .apply-search-btn-item {
-  margin-left: -80px;
+  margin-left: -82px;
 }
 
 .apply-search-btn-item,

+ 45 - 16
src/views/postManage/create.vue

@@ -89,9 +89,9 @@
                   <el-radio :value="'1'">是</el-radio>
                 </el-radio-group>
               </el-form-item>
-              <el-form-item label="学要求" prop="schoolRequirement">
+              <el-form-item label="学要求" prop="schoolRequirement">
                 <el-select v-model="form.schoolRequirement" placeholder="请选择学校要求" clearable>
-                  <el-option v-for="item in schoolRequirementOptions" :key="item" :label="item" :value="item" />
+                  <el-option v-for="item in schoolRequirementOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
                 </el-select>
               </el-form-item>
               <el-form-item label="性别" prop="genderRequirement">
@@ -101,17 +101,17 @@
               </el-form-item>
               <el-form-item label="年级" prop="gradeRequirement">
                 <el-select v-model="form.gradeRequirement" placeholder="请选择年级" clearable>
-                  <el-option v-for="item in gradeOptions" :key="item" :label="item" :value="item" />
+                  <el-option v-for="item in gradeOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
                 </el-select>
               </el-form-item>
               <el-form-item label="到岗时间" prop="arrivalTime">
                 <el-select v-model="form.arrivalTime" placeholder="请选择到岗时间" clearable>
-                  <el-option v-for="item in arrivalTimeOptions" :key="item" :label="item" :value="item" />
+                  <el-option v-for="item in arrivalTimeOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
                 </el-select>
               </el-form-item>
               <el-form-item label="实习时间" prop="internshipDuration">
                 <el-select v-model="form.internshipDuration" placeholder="请选择实习时间" clearable>
-                  <el-option v-for="item in internshipDurationOptions" :key="item" :label="item" :value="item" />
+                  <el-option v-for="item in internshipDurationOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
                 </el-select>
               </el-form-item>
               <el-form-item label="是否出差" prop="travelRequired">
@@ -152,7 +152,7 @@
             <div v-show="activeStep === 2" class="step-panel finish-panel">
               <div class="finish-icon">✓</div>
               <div class="finish-title">创建成功</div>
-              <div class="finish-subtitle">快去平台审核</div>
+              <div class="finish-subtitle">等待平台审核</div>
             </div>
 
             <div class="post-create-footer">
@@ -180,7 +180,7 @@ import PageShell from '@/components/PageShell/index.vue';
 import { addPostManage, getPostManage, updatePostManage } from '@/api/main/postManage';
 import type { MainPostApplyVO } from '@/api/main/postManage/types';
 import { getDicts } from '@/api/system/dict/data';
-import { listIndustry, listIndustrySkill } from '@/api/system/industry';
+import { listIndustryOpen, listIndustrySkillOpen } from '@/api/system/industry';
 import type { IndustrySkillVO, IndustryVO } from '@/api/system/industry/types';
 import { listTag } from '@/api/system/tag';
 import type { TagVO } from '@/api/system/tag/types';
@@ -238,15 +238,15 @@ const postNameProps = { value: 'value', label: 'label', children: 'children', em
 const jobTypeOptions = ref<DictDataVO[]>([]);
 const postLevelOptions = ref<DictDataVO[]>([]);
 const tagOptions = ref<TagVO[]>([]);
-const schoolRequirementOptions = ['不限', '大专', '本科', '硕士及以上', '双一流优先'];
+const schoolRequirementOptions = ref<DictDataVO[]>([]);
+const gradeOptions = ref<DictDataVO[]>([]);
+const arrivalTimeOptions = ref<DictDataVO[]>([]);
+const internshipDurationOptions = ref<DictDataVO[]>([]);
 const genderOptions = [
-  { label: '不限', value: '0' },
-  { label: '男', value: '1' },
-  { label: '女', value: '2' }
+  { label: '不限', value: '2' },
+  { label: '男', value: '0' },
+  { label: '女', value: '1' }
 ];
-const gradeOptions = ['不限', '大一', '大二', '大三', '大四', '研一', '研二', '研三'];
-const arrivalTimeOptions = ['立即到岗', '3天内', '一周内', '两周内', '一个月内'];
-const internshipDurationOptions = ['不限', '1个月', '3个月', '6个月', '长期'];
 
 const form = reactive<PostCreateFormModel>({
   id: undefined,
@@ -417,7 +417,7 @@ const findRegionPathByLabels = (province?: string, city?: string, district?: str
 };
 
 const loadPostNameOptions = async () => {
-  const [industryRes, skillRes] = await Promise.all([listIndustry({ status: '0' }), listIndustrySkill({ status: '0' })]);
+  const [industryRes, skillRes] = await Promise.all([listIndustryOpen({ status: '0' }), listIndustrySkillOpen({ status: '0' })]);
   buildPostNameOptions(industryRes.data || [], skillRes.data || []);
 };
 
@@ -431,6 +431,26 @@ const loadPostLevelOptions = async () => {
   postLevelOptions.value = res.data || [];
 };
 
+const loadSchoolRequirementOptions = async () => {
+  const res = await getDicts('main_education');
+  schoolRequirementOptions.value = res.data || [];
+};
+
+const loadGradeOptions = async () => {
+  const res = await getDicts('main_experience');
+  gradeOptions.value = res.data || [];
+};
+
+const loadArrivalTimeOptions = async () => {
+  const res = await getDicts('main_arrival_time');
+  arrivalTimeOptions.value = res.data || [];
+};
+
+const loadInternshipDurationOptions = async () => {
+  const res = await getDicts('main_internship_duration');
+  internshipDurationOptions.value = res.data || [];
+};
+
 const loadTagOptions = async () => {
   const res = await listTag({
     pageNum: 1,
@@ -583,7 +603,16 @@ const handleCancel = () => {
 };
 
 onMounted(async () => {
-  await Promise.all([loadPostNameOptions(), loadJobTypeOptions(), loadPostLevelOptions(), loadTagOptions()]);
+  await Promise.all([
+    loadPostNameOptions(),
+    loadJobTypeOptions(),
+    loadPostLevelOptions(),
+    loadSchoolRequirementOptions(),
+    loadGradeOptions(),
+    loadArrivalTimeOptions(),
+    loadInternshipDurationOptions(),
+    loadTagOptions()
+  ]);
   await loadDetail();
 });
 </script>

+ 1 - 1
src/views/postManage/index.vue

@@ -81,7 +81,7 @@
           </el-table-column>
           <el-table-column label="岗位人数" align="center" min-width="100">
             <template #default="scope">
-              <span>{{ scope.row.recruitNum ?? '--' }}</span>
+              <span>{{ scope.row.recruitNum == 99999 ? '不限' : scope.row.recruitNum ?? '--' }}</span>
             </template>
           </el-table-column>
           <el-table-column label="报名人数" align="center" min-width="100">