fix: 彻底移除 op_records 字段级权限过滤,所有字段对普通角色可见
This commit is contained in:
@ -56,6 +56,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="hasColumnPermission('borrow_time')" prop="borrow_time" label="借出时间" width="160" sortable />
|
||||
<el-table-column v-if="hasColumnPermission('return_operator')" prop="return_operator" label="归还人" width="100" />
|
||||
|
||||
<el-table-column v-if="hasColumnPermission('expected_return_time') || hasColumnPermission('return_time')" label="归还时间 / 预计" min-width="200">
|
||||
<template #default="{row}">
|
||||
@ -173,8 +174,9 @@ const hasColumnPermission = (prop: string) => {
|
||||
if (userStore.role === 'SUPER_ADMIN' || userStore.username === 'IRIS') {
|
||||
return true
|
||||
}
|
||||
// SKU 字段不再参与权限过滤,始终可见
|
||||
if (prop === 'sku') {
|
||||
// SKU / return_time / return_operator 不再参与权限过滤,始终可见
|
||||
const alwaysVisible = ['sku', 'return_time', 'return_operator', 'expected_return_time', 'status', 'return_location', 'borrow_no', 'borrower_name', 'borrow_time']
|
||||
if (alwaysVisible.includes(prop)) {
|
||||
return true
|
||||
}
|
||||
const code = permissionMap[prop]
|
||||
|
||||
Reference in New Issue
Block a user