2
0

feat:套餐管理界面(已联调)

This commit is contained in:
zhongzm
2024-12-24 16:51:41 +08:00
parent f98fdf7e27
commit 756f42a92f
4 changed files with 688 additions and 0 deletions

57
src/typings/api.d.ts vendored
View File

@@ -157,6 +157,62 @@ declare namespace Api {
phonenumber?:string;
authType: string;
}
interface RateLimit {
id: number;
rateLimitName: string;
upLimit: number;
downLimit: number;
upLimitEnable: boolean;
downLimitEnable: boolean;
createBy: number;
createTime: string;
updateBy: number;
updateTime: string;
delFlag: boolean;
}
interface RateLimitAdd {
rateLimitName: string;
upLimitEnable: boolean;
downLimitEnable: boolean;
upLimit: number;
downLimit: number;
}
interface Package {
id: string;
packageName: string;
periodNum: number;
periodType: number;
price: number;
trafficEnable: boolean;
traffic: number;
rateLimitEnable: boolean;
rateLimitId?: number;
durationEnable: boolean;
duration: number;
clientNumEnable: boolean;
clientNum: number;
packageEnable: boolean;
createBy: number;
createTime: string;
updateBy: number;
updateTime: string;
delFlag: boolean;
}
interface PackageAdd {
packageName: string;
periodNum: number;
periodType: number;
price: number;
trafficEnable: boolean;
traffic: number;
rateLimitEnable: boolean;
rateLimitId?: number;
durationEnable: boolean;
duration: number;
clientNumEnable: boolean;
clientNum: number;
packageEnable: boolean;
}
}
/**
@@ -422,5 +478,6 @@ declare namespace Api {
type DictSearchParams = Partial<Pick<Dict, 'dictName' | 'dictType' | 'status'> & CommonSearchParams>;
type DictList = Common.PaginatingQueryRecord<Dict>;
}
}

View File

@@ -10,6 +10,8 @@ declare global {
const $notification: typeof import('ant-design-vue')['notification']
const EffectScope: typeof import('vue')['EffectScope']
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
const addPackage: typeof import('../service/api/auth')['addPackage']
const addRateLimit: typeof import('../service/api/auth')['addRateLimit']
const addThemeVarsToHtml: typeof import('../store/modules/theme/shared')['addThemeVarsToHtml']
const afterAll: typeof import('vitest')['afterAll']
const afterEach: typeof import('vitest')['afterEach']
@@ -17,6 +19,8 @@ declare global {
const assign: typeof import('lodash-es')['assign']
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
const bandwidthFactors: typeof import('../utils/units')['bandwidthFactors']
const bandwidthUnits: typeof import('../utils/units')['bandwidthUnits']
const beforeAll: typeof import('vitest')['beforeAll']
const beforeEach: typeof import('vitest')['beforeEach']
const chai: typeof import('vitest')['chai']
@@ -30,6 +34,9 @@ declare global {
const computedWithControl: typeof import('@vueuse/core')['computedWithControl']
const controlledComputed: typeof import('@vueuse/core')['controlledComputed']
const controlledRef: typeof import('@vueuse/core')['controlledRef']
const convertBandwidth: typeof import('../utils/units')['convertBandwidth']
const convertStorage: typeof import('../utils/units')['convertStorage']
const convertTime: typeof import('../utils/units')['convertTime']
const createApp: typeof import('vue')['createApp']
const createEventHook: typeof import('@vueuse/core')['createEventHook']
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
@@ -48,6 +55,7 @@ declare global {
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const defineStore: typeof import('pinia')['defineStore']
const deletePackage: typeof import('../service/api/auth')['deletePackage']
const describe: typeof import('vitest')['describe']
const doAddDept: typeof import('../service/api/dept')['doAddDept']
const doAddDict: typeof import('../service/api/dict')['doAddDict']
@@ -90,6 +98,7 @@ declare global {
const doPutRole: typeof import('../service/api/role')['doPutRole']
const doPutUser: typeof import('../service/api/user')['doPutUser']
const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
const editRateLimit: typeof import('../service/api/auth')['editRateLimit']
const effectScope: typeof import('vue')['effectScope']
const emptyInfo: typeof import('../store/modules/auth/shared')['emptyInfo']
const expect: typeof import('vitest')['expect']
@@ -101,12 +110,17 @@ declare global {
const fetchGetMenuTree: typeof import('../service/api/menu')['fetchGetMenuTree']
const fetchIsRouteExist: typeof import('../service/api/route')['fetchIsRouteExist']
const fetchLogin: typeof import('../service/api/auth')['fetchLogin']
const fetchPackageList: typeof import('../service/api/auth')['fetchPackageList']
const fetchRateLimitList: typeof import('../service/api/auth')['fetchRateLimitList']
const fetchRefreshToken: typeof import('../service/api/auth')['fetchRefreshToken']
const fetchRegister: typeof import('../service/api/auth')['fetchRegister']
const filterAuthRoutesByRoles: typeof import('../store/modules/route/shared')['filterAuthRoutesByRoles']
const filterTabsById: typeof import('../store/modules/tab/shared')['filterTabsById']
const filterTabsByIds: typeof import('../store/modules/tab/shared')['filterTabsByIds']
const findTabByRouteName: typeof import('../store/modules/tab/shared')['findTabByRouteName']
const formatBandwidth: typeof import('../utils/units')['formatBandwidth']
const formatStorage: typeof import('../utils/units')['formatStorage']
const formatTime: typeof import('../utils/units')['formatTime']
const getActivePinia: typeof import('pinia')['getActivePinia']
const getAllTabs: typeof import('../store/modules/tab/shared')['getAllTabs']
const getAntdTheme: typeof import('../store/modules/theme/shared')['getAntdTheme']
@@ -186,6 +200,7 @@ declare global {
const refThrottled: typeof import('@vueuse/core')['refThrottled']
const refWithControl: typeof import('@vueuse/core')['refWithControl']
const removeEmptyChildren: typeof import('../utils/menu')['removeEmptyChildren']
const removeRateLimit: typeof import('../service/api/auth')['removeRateLimit']
const resolveComponent: typeof import('vue')['resolveComponent']
const resolveRef: typeof import('@vueuse/core')['resolveRef']
const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
@@ -197,6 +212,8 @@ declare global {
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const sortRoutesByOrder: typeof import('../store/modules/route/shared')['sortRoutesByOrder']
const storageFactors: typeof import('../utils/units')['storageFactors']
const storageUnits: typeof import('../utils/units')['storageUnits']
const storeToRefs: typeof import('pinia')['storeToRefs']
const suite: typeof import('vitest')['suite']
const syncRef: typeof import('@vueuse/core')['syncRef']
@@ -205,6 +222,8 @@ declare global {
const test: typeof import('vitest')['test']
const throttledRef: typeof import('@vueuse/core')['throttledRef']
const throttledWatch: typeof import('@vueuse/core')['throttledWatch']
const timeFactors: typeof import('../utils/units')['timeFactors']
const timeUnits: typeof import('../utils/units')['timeUnits']
const toRaw: typeof import('vue')['toRaw']
const toReactive: typeof import('@vueuse/core')['toReactive']
const toRef: typeof import('vue')['toRef']
@@ -222,10 +241,12 @@ declare global {
const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted']
const tryOnScopeDispose: typeof import('@vueuse/core')['tryOnScopeDispose']
const tryOnUnmounted: typeof import('@vueuse/core')['tryOnUnmounted']
const unitFactors: typeof import('../utils/bandwidth')['unitFactors']
const unref: typeof import('vue')['unref']
const unrefElement: typeof import('@vueuse/core')['unrefElement']
const until: typeof import('@vueuse/core')['until']
const updateLocaleOfGlobalMenus: typeof import('../store/modules/route/shared')['updateLocaleOfGlobalMenus']
const updatePackage: typeof import('../service/api/auth')['updatePackage']
const updateTabByI18nKey: typeof import('../store/modules/tab/shared')['updateTabByI18nKey']
const updateTabsByI18nKey: typeof import('../store/modules/tab/shared')['updateTabsByI18nKey']
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']