1
This commit is contained in:
@@ -88,17 +88,17 @@
|
||||
<el-row>
|
||||
<div class="mb15" style="width: 100%;">
|
||||
<el-button
|
||||
v-auth="'professional_professionaltitlerelation_add'"
|
||||
type="primary"
|
||||
icon="FolderAdd"
|
||||
@click="handleAdd"
|
||||
v-if="permissions.professional_professionaltitlerelation_add">新 增
|
||||
@click="handleAdd">新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-auth="'professional_teacherbase_export'"
|
||||
class="ml10"
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
v-if="permissions.professional_teacherbase_export"
|
||||
@click="handleDownLoadWord"
|
||||
:loading="exportLoading">导出信息
|
||||
</el-button>
|
||||
@@ -162,45 +162,50 @@
|
||||
<el-table-column label="操作" width="280" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-auth="'professional_professionaltitlerelation_edit'"
|
||||
v-if="scope.row.state === '0' || scope.row.state === '-2'"
|
||||
type="primary"
|
||||
link
|
||||
icon="edit-pen"
|
||||
v-if="permissions.professional_professionaltitlerelation_edit && (scope.row.state === '0' || scope.row.state === '-2')"
|
||||
@click="handleEdit(scope.row)">编辑
|
||||
@click="handleEdit(scope.row)">修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-auth="'professional_professionaltitlerelation_exam'"
|
||||
v-if="scope.row.canExam"
|
||||
type="success"
|
||||
link
|
||||
icon="CircleCheck"
|
||||
v-if="permissions.professional_professionaltitlerelation_exam && scope.row.canExam"
|
||||
@click="changeState(scope.row, 1)">通过
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
link
|
||||
icon="CircleCheck"
|
||||
v-if="permissions.professional_professionaltitlerelation_exam && scope.row.canDeptExam"
|
||||
v-auth="'professional_professionaltitlerelation_exam'"
|
||||
v-if="scope.row.canDeptExam"
|
||||
@click="changeState(scope.row, 1)">部门通过
|
||||
</el-button>
|
||||
<el-button
|
||||
v-auth="'professional_professionaltitlerelation_exam'"
|
||||
v-if="scope.row.canBack"
|
||||
type="danger"
|
||||
link
|
||||
icon="CircleClose"
|
||||
v-if="permissions.professional_professionaltitlerelation_exam && scope.row.canBack"
|
||||
@click="changeState(scope.row, -2)">驳回
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
v-auth="'professional_professionaltitlerelation_exam'"
|
||||
icon="CircleClose"
|
||||
v-if="permissions.professional_professionaltitlerelation_exam && scope.row.canDeptBack"
|
||||
v-if="scope.row.canDeptBack"
|
||||
@click="changeState(scope.row, -2)">部门驳回
|
||||
</el-button>
|
||||
<el-button
|
||||
v-auth="'professional_professionaltitlerelation_del'"
|
||||
type="danger"
|
||||
link
|
||||
icon="delete"
|
||||
v-if="permissions.professional_professionaltitlerelation_del"
|
||||
style="margin-left: 12px"
|
||||
@click="handleDel(scope.row)">删除
|
||||
</el-button>
|
||||
@@ -232,9 +237,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'
|
||||
@@ -258,18 +261,6 @@ const ProfessionalBackResaon = defineAsyncComponent(() => import('/@/views/profe
|
||||
const previewFile = defineAsyncComponent(() => import('/@/components/tools/preview-file.vue'))
|
||||
|
||||
// 使用 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()
|
||||
const messageBox = useMessageBox()
|
||||
@@ -466,11 +457,9 @@ const loadDictData = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化
|
||||
// 初始化:仅加载下拉字典,表格数据由 useTable 在 createdIsNeed: true 时自动请求
|
||||
onMounted(async () => {
|
||||
await loadDictData()
|
||||
dataFormRef.value?.init()
|
||||
getDataList()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user