a
This commit is contained in:
@@ -48,14 +48,14 @@
|
||||
<!-- <el-table-column label="操作" width="150" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.professional_outercompany_edit"
|
||||
v-auth="'professional_outercompany_edit'"
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
@click="handleEdit(scope.row)">修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.professional_outercompany_del"
|
||||
v-auth="'professional_outercompany_del'"
|
||||
icon="delete"
|
||||
text
|
||||
type="danger"
|
||||
@@ -77,24 +77,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { fetchList } from '/@/api/professional/stayschool/outercompany'
|
||||
|
||||
// 使用 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
|
||||
})
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
|
||||
Reference in New Issue
Block a user