This commit is contained in:
guochunsi
2026-01-27 13:48:18 +08:00
parent c5eea52c46
commit b3ea5ee1ee
25 changed files with 192 additions and 428 deletions

View File

@@ -1,5 +1,5 @@
<template>
<el-dialog v-model="dialogVisible" title="编辑学历学位" width="600px" 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"

View File

@@ -59,13 +59,13 @@
type="primary"
icon="FolderAdd"
@click="handleAdd"
v-if="permissions.professional_professionalteacheracademicrelation_add">
v-auth="'professional_professionalteacheracademicrelation_add'">
</el-button>
<el-button
type="warning"
plain
icon="Download"
v-if="permissions.professional_teacherbase_export"
v-auth="'professional_teacherbase_export'"
@click="handleDownLoadWord"
:loading="exportLoading">导出信息
</el-button>
@@ -153,31 +153,34 @@
<el-table-column label="操作" width="280" align="center" fixed="right">
<template #default="scope">
<el-button
v-auth="'professional_professionalteacheracademicrelation_edit'"
v-if="scope.row.state === '0' || scope.row.state === '-2'"
type="primary"
link
icon="edit-pen"
v-if="permissions.professional_professionalteacheracademicrelation_edit && (scope.row.state === '0' || scope.row.state === '-2')"
@click="handleEdit(scope.row)">编辑
</el-button>
<el-button
v-auth="'professional_professionalteacheracademicrelation_exam'"
v-if="scope.row.state === '0'"
type="success"
link
icon="CircleCheck"
v-if="permissions.professional_professionalteacheracademicrelation_exam && scope.row.state === '0'"
@click="changeState(scope.row, 1)">通过
</el-button>
<el-button
v-auth="'professional_professionalteacheracademicrelation_exam'"
v-if="scope.row.state === '0' || scope.row.state === '1'"
type="danger"
link
icon="CircleClose"
v-if="permissions.professional_professionalteacheracademicrelation_exam && (scope.row.state === '0' || scope.row.state === '1')"
@click="changeState(scope.row, -2)">驳回
</el-button>
<el-button
v-auth="'professional_professionalteacheracademicrelation_del'"
type="danger"
link
icon="delete"
v-if="permissions.professional_professionalteacheracademicrelation_del"
style="margin-left: 12px"
@click="handleDel(scope.row)">删除
</el-button>
@@ -208,9 +211,7 @@
</template>
<script setup lang="ts">
import { ref, reactive, computed, onMounted, nextTick } from 'vue'
import { storeToRefs } from 'pinia'
import { useUserInfo } from '/@/stores/userInfo'
import { ref, reactive, onMounted, nextTick } from 'vue'
import { BasicTableProps, useTable } from '/@/hooks/table'
import { useMessage } from '/@/hooks/message'
import { useMessageBox } from '/@/hooks/message'
@@ -224,6 +225,7 @@ import {
import { getDegreeList } from '/@/api/professional/rsbase/professionalacademicdegreeconfig'
import { getQualificationList } from '/@/api/professional/rsbase/academicqualificationsconfig'
import { getAllTypeList } from '/@/api/professional/rsbase/professionalacademiceducationtypeconfig'
import { PROFESSIONAL_AUDIT_STATE_OPTIONS } from '/@/config/global'
import { defineAsyncComponent } from 'vue'
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
@@ -231,26 +233,9 @@ const DataForm = defineAsyncComponent(() => import('./form.vue'))
const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/professional/common/professional-back-resaon.vue'))
const previewFile = defineAsyncComponent(() => import('/@/components/tools/preview-file.vue'))
// 审核状态选项(独立定义,防止其他页面修改时被波及)
import type { StateOption } from '/@/components/AuditState/index.vue'
const auditStateOptions: StateOption[] = [
{ value: '1', label: '已通过', type: 'success', icon: 'fa-solid fa-circle-check', effect: 'dark' },
{ value: '-2', label: '已驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark', effect: 'dark' },
{ value: '0', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock', effect: 'light' }
]
// 审核状态选项
const auditStateOptions = PROFESSIONAL_AUDIT_STATE_OPTIONS
// 使用 Pinia store
const userInfoStore = useUserInfo()
const { userInfos } = storeToRefs(userInfoStore)
// 创建权限对象
const permissions = computed(() => {
const perms: Record<string, boolean> = {}
userInfos.value.authBtnList.forEach((perm: string) => {
perms[perm] = true
})
return perms
})
// 消息提示 hooks
const message = useMessage()
@@ -349,7 +334,6 @@ const changeState = (row: any, val: number) => {
getDataList()
} catch (error: any) {
// 处理业务错误
message.error(error.msg)
}
}).catch(() => {})
} else if (val === -2) {
@@ -396,7 +380,6 @@ const handleDel = (row: any) => {
getDataList()
} catch (error: any) {
// 处理业务错误
message.error(error.msg)
}
}).catch(() => {})
}