This commit is contained in:
guochunsi
2026-01-30 16:29:15 +08:00
parent 53f71066f3
commit c6da6e286f
70 changed files with 688 additions and 519 deletions

View File

@@ -55,14 +55,14 @@
<!-- 操作按钮 -->
<el-row>
<div class="mb15" style="width: 100%;">
<el-button
v-auth="'professional_professionalteachercertificaterelation_add'"
<el-button
v-if="hasAuth('professional_professionalteachercertificaterelation_add')"
type="primary"
icon="FolderAdd"
@click="handleAdd">
</el-button>
<el-button
v-auth="'professional_teacherbase_export'"
<el-button
v-if="hasAuth('professional_teacherbase_export')"
type="warning"
plain
icon="Download"
@@ -76,6 +76,7 @@
<el-table
ref="tableRef"
:data="state.dataList"
row-key="id"
v-loading="state.loading"
border
:cell-style="tableStyle.cellStyle"
@@ -122,48 +123,43 @@
<el-table-column label="操作" width="280" align="center" fixed="right">
<template #default="scope">
<el-button
v-auth="'professional_professionalteachercertificaterelation_edit'"
v-if="scope.row.state === '0' || scope.row.state === '-2'"
<el-button
v-if="hasAuth('professional_professionalteachercertificaterelation_edit') && (scope.row.state === '0' || scope.row.state === '-2')"
type="primary"
link
icon="edit-pen"
@click="handleEdit(scope.row)">编辑
</el-button>
<el-button
v-auth="'professional_professionalteachercertificaterelation_exam'"
v-if="scope.row.canExam"
<el-button
v-if="hasAuth('professional_professionalteachercertificaterelation_exam') && scope.row.canExam"
type="success"
link
icon="CircleCheck"
@click="changeState(scope.row, 1)">通过
</el-button>
<el-button
type="success"
link
v-auth="'professional_professionalteachercertificaterelation_exam'"
icon="CircleCheck"
v-if="scope.row.canDeptExam"
@click="changeState(scope.row, 1)">部门通过
v-if="hasAuth('professional_professionalteachercertificaterelation_exam') && scope.row.canDeptExam"
type="success"
link
icon="CircleCheck"
@click="changeState(scope.row, 1)">部门通过
</el-button>
<el-button
v-auth="'professional_professionalteachercertificaterelation_exam'"
v-if="scope.row.canBack"
<el-button
v-if="hasAuth('professional_professionalteachercertificaterelation_exam') && scope.row.canBack"
type="danger"
link
icon="CircleClose"
@click="changeState(scope.row, -2)">驳回
</el-button>
<el-button
type="danger"
link
icon="CircleClose"
v-auth="'professional_professionalteachercertificaterelation_exam'"
v-if="scope.row.canDeptBack"
@click="changeState(scope.row, -2)">部门驳回
v-if="hasAuth('professional_professionalteachercertificaterelation_exam') && scope.row.canDeptBack"
type="danger"
link
icon="CircleClose"
@click="changeState(scope.row, -2)">部门驳回
</el-button>
<el-button
v-auth="'professional_professionalteachercertificaterelation_del'"
<el-button
v-if="hasAuth('professional_professionalteachercertificaterelation_del')"
type="danger"
link
icon="delete"
@@ -199,6 +195,7 @@
<script setup lang="ts">
import { ref, reactive, onMounted, nextTick } from 'vue'
import { BasicTableProps, useTable } from '/@/hooks/table'
import { useAuth } from '/@/hooks/auth'
import { useMessage } from '/@/hooks/message'
import { useMessageBox } from '/@/hooks/message'
import { useDict } from '/@/hooks/dict'
@@ -209,6 +206,7 @@ import {
delObj,
exportExcel
} from '/@/api/professional/professionaluser/professionalteachercertificaterelation'
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'))
@@ -218,11 +216,10 @@ const previewFile = defineAsyncComponent(() => import('/@/components/tools/previ
// 审核状态选项(独立定义,防止其他页面修改时被波及)
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: StateOption[] = PROFESSIONAL_AUDIT_STATE_OPTIONS
// 无权限即无节点
const { hasAuth } = useAuth()
// 消息提示 hooks
const message = useMessage()