This commit is contained in:
@@ -25,8 +25,18 @@ export const AUGUST_PERMISSIONS = {
|
||||
unbindImportCreate: 'phone_asset_association:unbind_import_create',
|
||||
unbindImportDetail: 'phone_asset_association:unbind_import_detail'
|
||||
},
|
||||
shop: {
|
||||
listView: 'shop:list_view',
|
||||
detailView: 'shop:detail_view'
|
||||
},
|
||||
agentDistributionRegistration: {
|
||||
list: 'agent_distribution_registration:list',
|
||||
detail: 'agent_distribution_registration:detail',
|
||||
recoverApproval: 'agent_distribution_registration:recover_approval'
|
||||
},
|
||||
h5PopupConfiguration: {
|
||||
list: 'h5_popup_configuration:list',
|
||||
detail: 'h5_popup_configuration:detail',
|
||||
create: 'h5_popup_configuration:create',
|
||||
update: 'h5_popup_configuration:update',
|
||||
enable: 'h5_popup_configuration:enable',
|
||||
@@ -36,9 +46,39 @@ export const AUGUST_PERMISSIONS = {
|
||||
rulesView: 'package_traffic_alert:rules_view',
|
||||
ruleCreate: 'package_traffic_alert:rule_create',
|
||||
ruleUpdate: 'package_traffic_alert:rule_update',
|
||||
ruleEnable: 'package_traffic_alert:rule_enable',
|
||||
ruleDisable: 'package_traffic_alert:rule_disable',
|
||||
recordsView: 'package_traffic_alert:records_view',
|
||||
recordDetail: 'package_traffic_alert:record_detail',
|
||||
export: 'package_traffic_alert:export'
|
||||
},
|
||||
expiringAsset: {
|
||||
page: 'expiring_asset:page',
|
||||
export: 'expiring_asset:export'
|
||||
},
|
||||
refund: {
|
||||
page: 'refund:page',
|
||||
detailPage: 'refund:detail_page',
|
||||
recoverApproval: 'refund:recover_approval'
|
||||
},
|
||||
agentFundOverview: {
|
||||
page: 'agent_fund_overview:page',
|
||||
commissionExport: 'agent_fund_overview:commission_export'
|
||||
},
|
||||
assetWalletAutoRenewal: {
|
||||
page: 'asset_wallet_auto_renewal:page',
|
||||
update: 'asset_wallet_auto_renewal:update'
|
||||
},
|
||||
pollingPriorityQueue: {
|
||||
page: 'polling_priority_queue:page',
|
||||
create: 'polling_priority_queue:create',
|
||||
detail: 'polling_priority_queue:detail'
|
||||
},
|
||||
operationsReports: {
|
||||
activationPage: 'operations_reports:activation_page',
|
||||
activationExport: 'operations_reports:activation_export',
|
||||
renewalPage: 'operations_reports:renewal_page',
|
||||
renewalExport: 'operations_reports:renewal_export'
|
||||
}
|
||||
} as const
|
||||
|
||||
|
||||
@@ -16,19 +16,25 @@ export const BUSINESS_USER_GROUP_BUSINESS_LINE_OPTIONS: Array<{
|
||||
]
|
||||
|
||||
/** 业务线文案映射 */
|
||||
export const BUSINESS_USER_GROUP_BUSINESS_LINE_MAP = BUSINESS_USER_GROUP_BUSINESS_LINE_OPTIONS.reduce(
|
||||
(map, item) => {
|
||||
map[item.value] = item
|
||||
return map
|
||||
},
|
||||
{} as Record<BusinessUserGroupBusinessLine, (typeof BUSINESS_USER_GROUP_BUSINESS_LINE_OPTIONS)[number]>
|
||||
)
|
||||
export const BUSINESS_USER_GROUP_BUSINESS_LINE_MAP =
|
||||
BUSINESS_USER_GROUP_BUSINESS_LINE_OPTIONS.reduce(
|
||||
(map, item) => {
|
||||
map[item.value] = item
|
||||
return map
|
||||
},
|
||||
{} as Record<
|
||||
BusinessUserGroupBusinessLine,
|
||||
(typeof BUSINESS_USER_GROUP_BUSINESS_LINE_OPTIONS)[number]
|
||||
>
|
||||
)
|
||||
|
||||
/** 获取业务线标签 */
|
||||
export function getBusinessUserGroupBusinessLineLabel(businessLine?: string | null): string {
|
||||
if (!businessLine) return '-'
|
||||
return BUSINESS_USER_GROUP_BUSINESS_LINE_MAP[businessLine as BusinessUserGroupBusinessLine]
|
||||
?.label ?? businessLine
|
||||
return (
|
||||
BUSINESS_USER_GROUP_BUSINESS_LINE_MAP[businessLine as BusinessUserGroupBusinessLine]?.label ??
|
||||
businessLine
|
||||
)
|
||||
}
|
||||
|
||||
/** 业务用户组页面与按钮权限编码 */
|
||||
@@ -43,6 +49,7 @@ export const BUSINESS_USER_GROUP_PERMISSIONS = {
|
||||
/** 店铺业务负责人运营权限编码 */
|
||||
export const SHOP_BUSINESS_OWNER_PERMISSIONS = {
|
||||
batch: 'shop:business_owner_batch',
|
||||
importPage: 'shop:business_owner_import',
|
||||
importCreate: 'shop:business_owner_import'
|
||||
}
|
||||
importPage: 'shop:business_owner_import_view',
|
||||
importCreate: 'shop:business_owner_import_create',
|
||||
importDetail: 'shop:business_owner_import_detail'
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import type { ExportTaskScene } from '@/types/api'
|
||||
|
||||
export interface ExportTaskScenePermissions {
|
||||
page: string
|
||||
detail: string
|
||||
download: string
|
||||
}
|
||||
|
||||
export const EXPORT_TASK_DETAIL_PAGE_PERMISSION = 'export_task:detail_page'
|
||||
|
||||
export interface ExportTaskSceneConfig {
|
||||
scene: ExportTaskScene
|
||||
sceneName: string
|
||||
@@ -18,6 +21,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '设备管理',
|
||||
pageTitle: '导出设备',
|
||||
permissions: {
|
||||
page: 'export_task:device_page',
|
||||
detail: 'export_task:device_detail',
|
||||
download: 'export_task:device_download'
|
||||
}
|
||||
@@ -27,6 +31,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: 'IOT卡管理',
|
||||
pageTitle: '导出IOT卡',
|
||||
permissions: {
|
||||
page: 'export_task:iot_card_page',
|
||||
detail: 'export_task:iot_card_detail',
|
||||
download: 'export_task:iot_card_download'
|
||||
}
|
||||
@@ -36,6 +41,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '订单管理',
|
||||
pageTitle: '导出订单',
|
||||
permissions: {
|
||||
page: 'export_task:order_page',
|
||||
detail: 'export_task:order_detail',
|
||||
download: 'export_task:order_download'
|
||||
}
|
||||
@@ -45,6 +51,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '套餐管理',
|
||||
pageTitle: '导出套餐',
|
||||
permissions: {
|
||||
page: 'export_task:package_page',
|
||||
detail: 'export_task:package_detail',
|
||||
download: 'export_task:package_download'
|
||||
}
|
||||
@@ -54,6 +61,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '代理主钱包流水',
|
||||
pageTitle: '导出代理主钱包流水',
|
||||
permissions: {
|
||||
page: 'export_task:agent_wallet_transaction_page',
|
||||
detail: 'export_task:agent_wallet_transaction_detail',
|
||||
download: 'export_task:agent_wallet_transaction_download'
|
||||
}
|
||||
@@ -63,6 +71,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '代理充值',
|
||||
pageTitle: '导出代理充值',
|
||||
permissions: {
|
||||
page: 'export_task:agent_recharge_page',
|
||||
detail: 'export_task:agent_recharge_detail',
|
||||
download: 'export_task:agent_recharge_download'
|
||||
}
|
||||
@@ -72,6 +81,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '退款',
|
||||
pageTitle: '导出退款',
|
||||
permissions: {
|
||||
page: 'export_task:refund_page',
|
||||
detail: 'export_task:refund_detail',
|
||||
download: 'export_task:refund_download'
|
||||
}
|
||||
@@ -81,6 +91,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '换货',
|
||||
pageTitle: '导出换货',
|
||||
permissions: {
|
||||
page: 'export_task:exchange_page',
|
||||
detail: 'export_task:exchange_detail',
|
||||
download: 'export_task:exchange_download'
|
||||
}
|
||||
@@ -90,6 +101,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '佣金明细',
|
||||
pageTitle: '导出佣金明细',
|
||||
permissions: {
|
||||
page: 'export_task:commission_record_page',
|
||||
detail: 'export_task:commission_record_detail',
|
||||
download: 'export_task:commission_record_download'
|
||||
}
|
||||
@@ -99,6 +111,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '套餐真流量达量预警',
|
||||
pageTitle: '导出套餐真流量达量预警',
|
||||
permissions: {
|
||||
page: 'export_task:package_traffic_alert_page',
|
||||
detail: 'export_task:package_traffic_alert_detail',
|
||||
download: 'export_task:package_traffic_alert_download'
|
||||
}
|
||||
@@ -108,6 +121,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '临期资产',
|
||||
pageTitle: '导出临期资产',
|
||||
permissions: {
|
||||
page: 'export_task:expiring_asset_page',
|
||||
detail: 'export_task:expiring_asset_detail',
|
||||
download: 'export_task:expiring_asset_download'
|
||||
}
|
||||
@@ -117,6 +131,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '设备激活情况报表',
|
||||
pageTitle: '导出设备激活情况报表',
|
||||
permissions: {
|
||||
page: 'export_task:operations_activation_page',
|
||||
detail: 'export_task:operations_activation_detail',
|
||||
download: 'export_task:operations_activation_download'
|
||||
}
|
||||
@@ -126,6 +141,7 @@ export const EXPORT_TASK_SCENE_CONFIG: Record<ExportTaskScene, ExportTaskSceneCo
|
||||
sceneName: '套餐续费情况报表',
|
||||
pageTitle: '导出套餐续费情况报表',
|
||||
permissions: {
|
||||
page: 'export_task:operations_renewal_page',
|
||||
detail: 'export_task:operations_renewal_detail',
|
||||
download: 'export_task:operations_renewal_download'
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ export const JULY_PERMISSIONS = {
|
||||
updateExpiryBase: 'series_grants:update_expiry_base'
|
||||
},
|
||||
batchPurchase: {
|
||||
page: 'bulk_purchase:view',
|
||||
create: 'bulk_purchase:create',
|
||||
detail: 'bulk_purchase:detail'
|
||||
page: 'july_bulk_purchase:view',
|
||||
create: 'july_bulk_purchase:create',
|
||||
detail: 'july_bulk_purchase:detail'
|
||||
}
|
||||
} as const
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* 编码命名参考代理充值页 agent_recharge:<action> 风格。
|
||||
*/
|
||||
export const PAYMENT_MERCHANT_POOL_PERMISSIONS = {
|
||||
page: 'payment_merchant_pool:page',
|
||||
merchantCreate: 'payment_merchant_pool:merchant_create',
|
||||
merchantEdit: 'payment_merchant_pool:merchant_edit',
|
||||
merchantToggle: 'payment_merchant_pool:merchant_toggle',
|
||||
|
||||
Reference in New Issue
Block a user