This commit is contained in:
guochunsi
2026-01-07 16:17:49 +08:00
parent e1cb334fbf
commit 9490c6670c
21 changed files with 642 additions and 603 deletions

View File

@@ -95,12 +95,16 @@
</template>
</el-table-column>
<el-table-column prop="graduateTime" label="毕业时间" width="180" align="center" />
<el-table-column prop="degreeConfigId" label="学位" min-width="120" align="center" show-overflow-tooltip>
<el-table-column prop="graduateTime" label="毕业时间" width="180" align="center">
<template #default="scope">
{{ getDegreeName(scope.row.degreeConfigId) }}
</template>
{{ scope.row.graduateTime ? scope.row.graduateTime.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column prop="type" label="教育类型" min-width="120" align="center" show-overflow-tooltip>
<template #default="scope">
{{ getEducationTypeName(scope.row.type) }}
</template>
</el-table-column>
<el-table-column prop="qualificationConfigId" label="学历" min-width="120" align="center" show-overflow-tooltip>
@@ -108,8 +112,15 @@
{{ getQualificationName(scope.row.qualificationConfigId) }}
</template>
</el-table-column>
<el-table-column prop="degreeConfigId" label="学位" min-width="120" align="center" show-overflow-tooltip>
<template #default="scope">
{{ getDegreeName(scope.row.degreeConfigId) }}
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="180" align="center" />
<!-- <el-table-column prop="createTime" label="创建时间" width="180" align="center" /> -->
<el-table-column label="学历证书附件" width="130" align="center">
<template #default="scope">
@@ -181,15 +192,13 @@
@size-change="sizeChangeHandle"
/>
<!-- 材料预览对话框 -->
<el-dialog v-model="dialogVisible" :title="dialogTitle" append-to-body width="90%">
<auth-img
v-for="src in imgUrl"
:key="src.title"
:authSrc="src.url"
style="height:1000px;"
/>
</el-dialog>
<!-- 材料预览图片直接显示PDF 在组件内部 dialog 中显示 -->
<auth-img
v-for="src in imgUrl"
:key="src.title"
:authSrc="src.url"
:dialog-title="dialogTitle"
/>
<!-- 子组件 -->
<DataForm ref="dataFormRef" @refreshData="handleFilter" />
@@ -214,6 +223,7 @@ import {
} from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
import { getDegreeList } from '/@/api/professional/rsbase/professionalacademicdegreeconfig'
import { getQualificationList } from '/@/api/professional/rsbase/academicqualificationsconfig'
import { getAllTypeList } from '/@/api/professional/rsbase/professionalacademiceducationtypeconfig'
import { defineAsyncComponent } from 'vue'
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
@@ -264,16 +274,16 @@ const search = reactive({
})
// 材料预览
const dialogVisible = ref(false)
const dialogTitle = ref('')
const imgUrl = ref<Array<{ title: string; url: string }>>([])
// 导出加载状态
const exportLoading = ref(false)
// 学位学历列表
// 学位学历和教育类型列表
const degreeList = ref<any[]>([])
const qualificationList = ref<any[]>([])
const educationTypeList = ref<any[]>([])
// 配置 useTable
const state: BasicTableProps = reactive<BasicTableProps>({
@@ -321,10 +331,6 @@ const handlePreview = (list: string[], type: number) => {
} else if (type === 2) {
dialogTitle.value = '学位证书附件'
}
nextTick(() => {
dialogVisible.value = true
})
})
}
@@ -429,20 +435,37 @@ const getQualificationName = (id: string | number) => {
return item ? item.qualificationName : '-'
}
// 获取教育类型名称
const getEducationTypeName = (id: string | number | undefined) => {
if (!id) return '-'
const item = educationTypeList.value.find((item: any) => item.id === id || String(item.id) === String(id))
return item ? item.name : '-'
}
// 加载字典数据
const loadDictData = async () => {
try {
// 并行加载所有字典数据
const [degreeRes, qualRes, eduTypeRes] = await Promise.all([
getDegreeList(),
getQualificationList(),
getAllTypeList()
])
// 加载学位列表
const degreeRes = await getDegreeList()
if (degreeRes && degreeRes.data) {
degreeList.value = degreeRes.data
}
// 加载学历列表
const qualRes = await getQualificationList()
if (qualRes && qualRes.data) {
qualificationList.value = qualRes.data
}
// 加载教育类型列表
if (eduTypeRes && eduTypeRes.data) {
educationTypeList.value = eduTypeRes.data
}
} catch (error) {
// Failed to load dict data
}