ren
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" title="编辑学历学位" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||
<el-dialog v-model="dialogVisible" title="编辑学历学位" width="600px" append-to-body :close-on-click-modal="false" destroy-on-close>
|
||||
<div v-if="showForm">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
@@ -14,7 +14,6 @@
|
||||
placeholder="请选择毕业时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -24,7 +23,6 @@
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择教育类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in educationTypeList"
|
||||
@@ -41,7 +39,7 @@
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择学历"
|
||||
style="width: 100%"
|
||||
@change="handleQualificationChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in qualificationList"
|
||||
@@ -58,7 +56,7 @@
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择学位"
|
||||
style="width: 100%"
|
||||
@change="handleDegreeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in degreeList"
|
||||
@@ -96,40 +94,40 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="学历证书" prop="materialA">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
:file-list="fileList"
|
||||
:on-success="materiaUploadSuccess"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<el-form-item v-if="needQualificationImg" label="学历证书" prop="qualificationImg" required>
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
:file-list="fileList"
|
||||
:on-success="materiaUploadSuccess"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<template #tip>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="学位证书" prop="materialB">
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
<el-form-item v-if="needDegreeImg" label="学位证书" prop="degreeImg" required>
|
||||
<el-upload
|
||||
:headers="headers"
|
||||
:limit="1"
|
||||
:action="url"
|
||||
:file-list="fileListB"
|
||||
:on-success="materiaUploadSuccessB"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
:on-success="materiaUploadSuccessB"
|
||||
:accept="'.jpg,.jpeg,.png,.pdf'"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<template #tip>
|
||||
<div style="margin-top: 8px;">
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
<el-tag>仅支持jpg,jpeg,png,pdf后缀的文件上传</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -144,10 +142,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { ref, reactive, computed, nextTick } from 'vue'
|
||||
import { Session } from '/@/utils/storage'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getMyTeacherNo } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { addObj } from '/@/api/professional/professionaluser/professionalteacheracademicrelation'
|
||||
import { getAllTypeList } from '/@/api/professional/rsbase/professionalacademiceducationtypeconfig'
|
||||
import { getQualificationList } from '/@/api/professional/rsbase/academicqualificationsconfig'
|
||||
@@ -178,34 +175,66 @@ const dataForm = reactive({
|
||||
graduateSchool: '',
|
||||
major: '',
|
||||
certificateNumber: '',
|
||||
materialA: '',
|
||||
materialB: '',
|
||||
qualificationImg: '',
|
||||
degreeImg: '',
|
||||
state: '',
|
||||
teacherNo: '',
|
||||
id: ''
|
||||
})
|
||||
|
||||
// 表单验证规则
|
||||
const formRules = {
|
||||
graduateTime: [
|
||||
{ required: true, message: '请选择毕业时间', trigger: 'change' }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: '请选择教育类型', trigger: 'change' }
|
||||
],
|
||||
graduateSchool: [
|
||||
{ required: true, message: '请输入毕业学校', trigger: 'blur' }
|
||||
],
|
||||
major: [
|
||||
{ required: true, message: '请输入所学专业', trigger: 'blur' }
|
||||
],
|
||||
certificateNumber: [
|
||||
{ required: true, message: '请输入证书编码', trigger: 'blur' },
|
||||
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编码只能包含英文和数字', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
// 计算属性:是否需要学历证书(选择了学历)
|
||||
const needQualificationImg = computed(() => {
|
||||
return !!dataForm.qualificationConfigId
|
||||
})
|
||||
|
||||
// 计算属性:是否需要学位证书(选择了学位且不等于 -1 或"无")
|
||||
const needDegreeImg = computed(() => {
|
||||
if (!dataForm.degreeConfigId) return false
|
||||
// 检查是否为 -1 或"无"(处理类型转换)
|
||||
const degreeId = String(dataForm.degreeConfigId)
|
||||
if (degreeId === '-1') return false
|
||||
// 检查学位列表中是否有名称为"无"的选项
|
||||
const degreeItem = degreeList.value.find(item => String(item.id) === degreeId)
|
||||
if (degreeItem && degreeItem.degreeName === '无') return false
|
||||
return true
|
||||
})
|
||||
|
||||
// 动态验证规则
|
||||
const formRules = computed(() => {
|
||||
const rules: any = {
|
||||
graduateTime: [
|
||||
{ required: true, message: '请选择毕业时间', trigger: 'change' }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: '请选择教育类型', trigger: 'change' }
|
||||
],
|
||||
graduateSchool: [
|
||||
{ required: true, message: '请输入毕业学校', trigger: 'blur' }
|
||||
],
|
||||
major: [
|
||||
{ required: true, message: '请输入所学专业', trigger: 'blur' }
|
||||
],
|
||||
certificateNumber: [
|
||||
{ required: true, message: '请输入证书编码', trigger: 'blur' },
|
||||
{ pattern: /^[A-Za-z0-9]+$/, message: '证书编码只能包含英文和数字', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
// 只有当需要学历证书时才添加验证规则
|
||||
if (needQualificationImg.value) {
|
||||
rules.qualificationImg = [
|
||||
{ required: true, message: '请上传学历证书', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
|
||||
// 只有当需要学位证书时才添加验证规则
|
||||
if (needDegreeImg.value) {
|
||||
rules.degreeImg = [
|
||||
{ required: true, message: '请上传学位证书', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
|
||||
return rules
|
||||
})
|
||||
|
||||
// 下拉列表数据
|
||||
const educationTypeList = ref<any[]>([])
|
||||
@@ -241,23 +270,17 @@ const initDicData = async () => {
|
||||
|
||||
// 获取教育类型列表
|
||||
if (eduRes && eduRes.data) {
|
||||
educationTypeList.value = Array.isArray(eduRes.data)
|
||||
? eduRes.data
|
||||
: (eduRes.data.records || eduRes.data.list || [])
|
||||
educationTypeList.value = eduRes.data
|
||||
}
|
||||
|
||||
// 获取学历列表
|
||||
if (quaRes && quaRes.data) {
|
||||
qualificationList.value = Array.isArray(quaRes.data)
|
||||
? quaRes.data
|
||||
: (quaRes.data.records || quaRes.data.list || [])
|
||||
qualificationList.value = quaRes.data
|
||||
}
|
||||
|
||||
// 获取学位列表
|
||||
if (degRes && degRes.data) {
|
||||
degreeList.value = Array.isArray(degRes.data)
|
||||
? degRes.data
|
||||
: (degRes.data.records || degRes.data.list || [])
|
||||
degreeList.value = degRes.data
|
||||
}
|
||||
} catch (error) {
|
||||
// 获取字典数据失败
|
||||
@@ -269,6 +292,26 @@ const handleCertificateNumberInput = (value: string) => {
|
||||
dataForm.certificateNumber = value.replace(/[^A-Za-z0-9]/g, '')
|
||||
}
|
||||
|
||||
// 学历改变时的处理
|
||||
const handleQualificationChange = () => {
|
||||
// 如果不需要学历证书,清除学历证书字段、文件列表和验证错误
|
||||
if (!needQualificationImg.value) {
|
||||
dataForm.qualificationImg = ''
|
||||
fileList.value = []
|
||||
formRef.value?.clearValidate('qualificationImg')
|
||||
}
|
||||
}
|
||||
|
||||
// 学位改变时的处理
|
||||
const handleDegreeChange = () => {
|
||||
// 如果不需要学位证书,清除学位证书字段、文件列表和验证错误
|
||||
if (!needDegreeImg.value) {
|
||||
dataForm.degreeImg = ''
|
||||
fileListB.value = []
|
||||
formRef.value?.clearValidate('degreeImg')
|
||||
}
|
||||
}
|
||||
|
||||
// 文件上传成功 - 学历证书
|
||||
const materiaUploadSuccess = (response: any) => {
|
||||
if (response.data && response.data.code === "-1") {
|
||||
@@ -276,120 +319,113 @@ const materiaUploadSuccess = (response: any) => {
|
||||
return
|
||||
}
|
||||
dataForm.qualificationImg = response.data.url
|
||||
// 清除验证错误
|
||||
formRef.value?.clearValidate('qualificationImg')
|
||||
}
|
||||
|
||||
// 文件上传成功 - 学位证书
|
||||
const materiaUploadSuccessB = (response: any) => {
|
||||
if (response.data && response.data.code === "-1") {
|
||||
message.error("当前不允许上传文件")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
dataForm.degreeImg = response.data.url
|
||||
// 清除验证错误
|
||||
formRef.value?.clearValidate('degreeImg')
|
||||
}
|
||||
|
||||
// 打开对话框
|
||||
const openDialog = async (row?: any) => {
|
||||
if (row && row.id) {
|
||||
// 编辑模式
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${row.teacherNo}&type=1`
|
||||
fileList.value = []
|
||||
fileListB.value = []
|
||||
Object.assign(dataForm, {
|
||||
graduateTime: row.graduateTime || '',
|
||||
type: row.type || '',
|
||||
qualificationConfigId: row.qualificationConfigId || '',
|
||||
degreeConfigId: row.degreeConfigId || '',
|
||||
graduateSchool: row.graduateSchool || '',
|
||||
major: row.major || '',
|
||||
certificateNumber: row.certificateNumber || '',
|
||||
materialA: row.materialA || '',
|
||||
materialB: row.materialB || '',
|
||||
qualificationImg: row.qualificationImg || '',
|
||||
degreeImg: row.degreeImg || '',
|
||||
state: row.state || '',
|
||||
teacherNo: row.teacherNo || '',
|
||||
id: row.id || ''
|
||||
})
|
||||
showForm.value = true
|
||||
await initDicData()
|
||||
dialogVisible.value = true
|
||||
} else {
|
||||
// 新增模式:先检查是否锁定,再获取当前用户的 teacherNo
|
||||
// 新增模式:先检查是否锁定
|
||||
if (!row || !row.id) {
|
||||
try {
|
||||
const lockResponse = await checkLocked('acade')
|
||||
if (lockResponse.data) {
|
||||
// 已锁定
|
||||
message.warning("新增功能已锁定,暂不允许操作")
|
||||
return
|
||||
}
|
||||
|
||||
// 未锁定,继续获取 teacherNo
|
||||
const response = await getMyTeacherNo()
|
||||
const teacherNo = response.data
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?teacherNo=${teacherNo}&type=1`
|
||||
Object.assign(dataForm, {
|
||||
graduateTime: '',
|
||||
type: '',
|
||||
qualificationConfigId: '',
|
||||
degreeConfigId: '',
|
||||
graduateSchool: '',
|
||||
major: '',
|
||||
certificateNumber: '',
|
||||
materialA: '',
|
||||
materialB: '',
|
||||
qualificationImg: '',
|
||||
degreeImg: '',
|
||||
state: '',
|
||||
teacherNo: teacherNo,
|
||||
id: ''
|
||||
})
|
||||
fileList.value = []
|
||||
fileListB.value = []
|
||||
// 先加载字典数据,再显示表单
|
||||
await initDicData()
|
||||
showForm.value = true
|
||||
dialogVisible.value = true
|
||||
} catch (error) {
|
||||
message.error('获取教师编号失败')
|
||||
// 错误处理已在数据请求层统一处理,此处不需要提示
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 公共设置
|
||||
url.value = `/professional/file/teacherAboutInfoUpload?type=1`
|
||||
fileList.value = []
|
||||
fileListB.value = []
|
||||
|
||||
// 根据是否有 row 设置不同的表单数据
|
||||
if (row && row.id) {
|
||||
// 编辑模式:使用传入的数据
|
||||
// 确保类型匹配(将 id 转换为字符串或数字,与选项列表保持一致)
|
||||
Object.assign(dataForm, {
|
||||
graduateTime: row.graduateTime || '',
|
||||
type: row.type !== null && row.type !== undefined ? String(row.type) : '',
|
||||
qualificationConfigId: row.qualificationConfigId !== null && row.qualificationConfigId !== undefined ? String(row.qualificationConfigId) : '',
|
||||
degreeConfigId: row.degreeConfigId !== null && row.degreeConfigId !== undefined ? String(row.degreeConfigId) : '',
|
||||
graduateSchool: row.graduateSchool || '',
|
||||
major: row.major || '',
|
||||
certificateNumber: row.certificateNumber || '',
|
||||
qualificationImg: row.qualificationImg || '',
|
||||
degreeImg: row.degreeImg || '',
|
||||
state: row.state || '',
|
||||
id: row.id || ''
|
||||
})
|
||||
} else {
|
||||
// 新增模式:重置为空
|
||||
Object.assign(dataForm, {
|
||||
graduateTime: '',
|
||||
type: '',
|
||||
qualificationConfigId: '',
|
||||
degreeConfigId: '',
|
||||
graduateSchool: '',
|
||||
major: '',
|
||||
certificateNumber: '',
|
||||
qualificationImg: '',
|
||||
degreeImg: '',
|
||||
state: '',
|
||||
id: ''
|
||||
})
|
||||
}
|
||||
|
||||
// 公共操作:先加载字典数据,再显示对话框
|
||||
await initDicData()
|
||||
// 等待字典数据加载完成后再显示表单,确保选项列表已准备好
|
||||
await nextTick()
|
||||
showForm.value = true
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const dialogSubmit = async () => {
|
||||
if (!formRef.value) return
|
||||
|
||||
// 验证证明材料是否上传(与 MultiDialog 保持一致:mateA 或 mateB 至少有一个)
|
||||
if (!dataForm.qualificationImg && !dataForm.degreeImg && !dataForm.materialA && !dataForm.materialB) {
|
||||
message.warning("请上传学历或学位证书")
|
||||
return
|
||||
}
|
||||
|
||||
await formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
submitLoading.value = true
|
||||
try {
|
||||
// 统一使用 addObj 接口(新增和编辑都使用同一个接口)
|
||||
// 确保 qualificationImg 或 materialA 有值
|
||||
if (!dataForm.qualificationImg && dataForm.materialA) {
|
||||
dataForm.qualificationImg = dataForm.materialA
|
||||
}
|
||||
// 确保 degreeImg 或 materialB 有值
|
||||
if (!dataForm.degreeImg && dataForm.materialB) {
|
||||
dataForm.degreeImg = dataForm.materialB
|
||||
// 统一使用 addObj 接口(新增和编辑都使用)
|
||||
const submitData: any = {
|
||||
graduateTime: dataForm.graduateTime,
|
||||
type: dataForm.type,
|
||||
qualificationConfigId: dataForm.qualificationConfigId,
|
||||
degreeConfigId: dataForm.degreeConfigId,
|
||||
graduateSchool: dataForm.graduateSchool,
|
||||
major: dataForm.major,
|
||||
certificateNumber: dataForm.certificateNumber,
|
||||
qualificationImg: dataForm.qualificationImg,
|
||||
degreeImg: dataForm.degreeImg,
|
||||
state: '' // 待审核
|
||||
}
|
||||
|
||||
// 编辑时需要传递 id
|
||||
if (dataForm.id) {
|
||||
// 编辑模式
|
||||
dataForm.state = '0'
|
||||
await addObj(dataForm)
|
||||
message.success("修改成功")
|
||||
} else {
|
||||
// 新增模式
|
||||
await addObj(dataForm)
|
||||
message.success("提交成功")
|
||||
submitData.id = dataForm.id
|
||||
}
|
||||
|
||||
await addObj(submitData)
|
||||
message.success(dataForm.id ? "修改成功" : "提交成功")
|
||||
dialogVisible.value = false
|
||||
emit('refreshData')
|
||||
} catch (error: any) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user