diff --git a/doc/RBAC 权限.sql b/doc/RBAC 权限.sql index 5f6befb..dd49453 100644 --- a/doc/RBAC 权限.sql +++ b/doc/RBAC 权限.sql @@ -57,14 +57,14 @@ VALUES ('重置密码', '/account/reset-password', 'system') INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category]) VALUES ('管理角色', '/account/role-new', 'system') +INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category]) +VALUES ('搜索所有地接', '/agency/all', 'system') + INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category]) VALUES ('所有海外功能', '/oversea/all', 'oversea') INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category]) VALUES ('团预订', '/reservation/all', 'oversea') -INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category]) -VALUES ('团预订(客服)', '/reservation/most', 'oversea') - INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category]) VALUES ('账单', '/invoice/all', 'oversea') INSERT INTO [dbo].[auth_resource] ([res_name] ,[res_pattern], [res_category]) diff --git a/src/config.js b/src/config.js index 848b932..3cb105e 100644 --- a/src/config.js +++ b/src/config.js @@ -26,12 +26,12 @@ export const PERM_ACCOUNT_NEW = '/account/new' export const PERM_ACCOUNT_DISABLE = '/account/disable' export const PERM_ACCOUNT_RESET_PASSWORD = '/account/reset-password' export const PERM_ROLE_NEW = '/account/role-new' +export const PERM_AGENCY_ALL = '/agency/all' // 可以搜索所有供应商 // 海外供应商 // category: oversea export const PERM_OVERSEA = '/oversea/all' // @Deprecated 准备作废... -export const PERM_RESERVATION_ALL = '/reservation/all' // 供应商使用,只能搜索自己的数据 -export const PERM_RESERVATION_MOST = '/reservation/most' // 客服使用,可是选择其他供应商搜索 +export const PERM_RESERVATION_ALL = '/reservation/all' export const PERM_INVOICE_ALL = '/invoice/all' export const PERM_FEEDBACK_ALL = '/feedback/all' export const PERM_REPORT_ALL = '/report/all' diff --git a/src/views/reservation/Newest.jsx b/src/views/reservation/Newest.jsx index e2ab78d..3980d29 100644 --- a/src/views/reservation/Newest.jsx +++ b/src/views/reservation/Newest.jsx @@ -9,7 +9,7 @@ import useReservationStore from '@/stores/Reservation' import useAuthStore from '@/stores/Auth' import SearchForm from '@/components/SearchForm' import { usingStorage } from '@/hooks/usingStorage' -import { PERM_RESERVATION_MOST } from '@/config'; +import { PERM_AGENCY_ALL } from '@/config'; const { Title } = Typography @@ -160,7 +160,7 @@ function Newest() { const getSelectedAgencyId = () => { - if (isPermitted(PERM_RESERVATION_MOST)) { + if (isPermitted(PERM_AGENCY_ALL)) { return isEmpty(submitValues.agency) ? travelAgencyId : parseInt(submitValues.agency, 10) } else { return travelAgencyId @@ -231,7 +231,7 @@ function Newest() {