This commit is contained in:
@@ -77,8 +77,8 @@ export interface AgentRechargeQueryParams {
|
||||
shop_id?: number
|
||||
status?: AgentRechargeStatus
|
||||
recharge_source?: AgentRechargeSource
|
||||
start_date?: string
|
||||
end_date?: string
|
||||
start_time?: string
|
||||
end_time?: string
|
||||
dateRange?: string[] // For date range picker in UI
|
||||
}
|
||||
|
||||
|
||||
@@ -120,8 +120,8 @@ export interface ExpiringAssetQueryParams {
|
||||
package_id?: number
|
||||
days_min?: number
|
||||
days_max?: number
|
||||
expires_from?: string
|
||||
expires_to?: string
|
||||
start_time?: string
|
||||
end_time?: string
|
||||
page?: number
|
||||
page_size?: number
|
||||
}
|
||||
|
||||
@@ -507,8 +507,8 @@ export interface AssetAllocationRecordQueryParams extends PaginationParams {
|
||||
from_shop_id?: number // 来源店铺ID
|
||||
to_shop_id?: number // 目标店铺ID
|
||||
operator_id?: number // 操作人ID
|
||||
created_at_start?: string // 创建时间起始
|
||||
created_at_end?: string // 创建时间结束
|
||||
start_time?: string // 创建时间起始
|
||||
end_time?: string // 创建时间结束
|
||||
}
|
||||
|
||||
// 资产分配记录
|
||||
|
||||
@@ -11,6 +11,9 @@ export type ExportTaskScene =
|
||||
| 'exchange'
|
||||
| 'commission_record'
|
||||
| 'package_traffic_alert'
|
||||
| 'expiring_asset'
|
||||
| 'operations_activation'
|
||||
| 'operations_renewal'
|
||||
|
||||
export type ExportTaskFormat = 'xlsx' | 'csv'
|
||||
|
||||
|
||||
@@ -153,3 +153,6 @@ export * from './pollingPriorityQueue'
|
||||
|
||||
// 资产钱包自动续费相关
|
||||
export * from './assetWallet'
|
||||
|
||||
// 运营报表相关
|
||||
export * from './operationsReport'
|
||||
|
||||
131
src/types/api/operationsReport.ts
Normal file
131
src/types/api/operationsReport.ts
Normal file
@@ -0,0 +1,131 @@
|
||||
import type { BaseResponse } from './common'
|
||||
|
||||
export type OperationsActivationGroupBy =
|
||||
| 'device_name'
|
||||
| 'device_model'
|
||||
| 'manufacturer'
|
||||
| 'business_user_group'
|
||||
| 'agent'
|
||||
| 'shop'
|
||||
| 'business_owner'
|
||||
|
||||
export type OperationsRenewalGroupBy =
|
||||
| 'package_series'
|
||||
| 'package_name'
|
||||
| 'business_user_group'
|
||||
| 'agent'
|
||||
| 'shop'
|
||||
| 'business_owner'
|
||||
|
||||
export type OperationsGroupBy = OperationsActivationGroupBy | OperationsRenewalGroupBy | ''
|
||||
|
||||
export type OperationsTrendGranularity = 'day' | 'month'
|
||||
|
||||
export interface OperationsReportQueryParams {
|
||||
start_time?: string
|
||||
end_time?: string
|
||||
group_by?: string
|
||||
}
|
||||
|
||||
export interface OperationsTrendQueryParams extends OperationsReportQueryParams {
|
||||
granularity?: OperationsTrendGranularity
|
||||
}
|
||||
|
||||
export interface OperationsExportParams extends OperationsReportQueryParams {
|
||||
format: 'xlsx' | 'csv'
|
||||
}
|
||||
|
||||
export interface OperationsExportTaskInfo {
|
||||
task_id: number
|
||||
task_no: string
|
||||
status: number
|
||||
status_name: string
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface ActivationSummaryItem {
|
||||
group_key?: string
|
||||
group_name?: string
|
||||
purchase_count?: number
|
||||
activated_count?: number
|
||||
activation_rate?: number | null
|
||||
new_activated_count?: number
|
||||
online_count?: number
|
||||
active_user_count?: number
|
||||
cumulative_usage_mb?: number
|
||||
avg_usage_per_card_mb?: number | null
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface ActivationSummaryTotals extends Partial<ActivationSummaryItem> {}
|
||||
|
||||
export interface ActivationSummaryData {
|
||||
group_by: string | null
|
||||
group_name: string
|
||||
has_snapshot: boolean
|
||||
snapshot_dates: string[]
|
||||
items: ActivationSummaryItem[]
|
||||
totals: ActivationSummaryTotals | null
|
||||
}
|
||||
|
||||
export interface ActivationTrendPoint {
|
||||
period: string
|
||||
purchase_count?: number
|
||||
activated_count?: number
|
||||
activation_rate?: number | null
|
||||
new_activated_count?: number
|
||||
online_count?: number
|
||||
active_user_count?: number
|
||||
cumulative_usage_mb?: number
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface ActivationTrendData {
|
||||
granularity: string
|
||||
group_by: string | null
|
||||
group_name: string
|
||||
points: ActivationTrendPoint[]
|
||||
}
|
||||
|
||||
export interface RenewalSummaryItem {
|
||||
group_key?: string
|
||||
group_name?: string
|
||||
expiring_asset_count?: number
|
||||
renewed_asset_count?: number
|
||||
renewal_rate?: number | null
|
||||
new_unrenewed_count?: number
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface RenewalSummaryTotals extends Partial<RenewalSummaryItem> {}
|
||||
|
||||
export interface RenewalSummaryData {
|
||||
group_by: string | null
|
||||
group_name: string
|
||||
has_snapshot: boolean
|
||||
snapshot_dates: string[]
|
||||
items: RenewalSummaryItem[]
|
||||
totals: RenewalSummaryTotals | null
|
||||
}
|
||||
|
||||
export interface RenewalTrendPoint {
|
||||
period: string
|
||||
expiring_asset_count?: number
|
||||
renewed_asset_count?: number
|
||||
renewal_rate?: number | null
|
||||
new_unrenewed_count?: number
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface RenewalTrendData {
|
||||
granularity: string
|
||||
group_by: string | null
|
||||
group_name: string
|
||||
points: RenewalTrendPoint[]
|
||||
}
|
||||
|
||||
export type ActivationSummaryApiResponse = BaseResponse<ActivationSummaryData>
|
||||
export type ActivationTrendApiResponse = BaseResponse<ActivationTrendData>
|
||||
export type RenewalSummaryApiResponse = BaseResponse<RenewalSummaryData>
|
||||
export type RenewalTrendApiResponse = BaseResponse<RenewalTrendData>
|
||||
export type OperationsExportTaskApiResponse = BaseResponse<OperationsExportTaskInfo>
|
||||
1
src/types/components.d.ts
vendored
1
src/types/components.d.ts
vendored
@@ -116,6 +116,7 @@ declare module 'vue' {
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
|
||||
Reference in New Issue
Block a user