From 975c781be8543fc5dc75ce8631f77cc0f0479b1d Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Mon, 27 Oct 2025 10:33:20 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1perf=EF=BC=9A=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=80=9A=E7=94=A8=E6=9D=83=E9=99=90=20PERM=5FAGENCY=5FALL=20?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=20PERM=5FRESERVATION=5FMOST?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/RBAC 权限.sql | 6 +++--- src/config.js | 4 ++-- src/views/reservation/Newest.jsx | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) 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() {