refactor: 系统管理页面重构和ts类型声明优化
Former-commit-id: 40263bbb072596ada41ef33d9170841e7e66cd01
This commit is contained in:
33
src/types/api/sms/coupon.ts
Normal file
33
src/types/api/sms/coupon.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { PageQueryParam ,PageResult} from '../base';
|
||||
|
||||
/**
|
||||
* 优惠券查询参数类型
|
||||
*/
|
||||
export interface CouponQueryParam extends PageQueryParam {
|
||||
status?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 优惠券分页列表项
|
||||
*/
|
||||
export interface CouponItem {
|
||||
id: string;
|
||||
name: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*优惠券分页项类型
|
||||
*/
|
||||
export type CouponPageResult = PageResult<CouponItem[]>;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 广告表单类型声明
|
||||
*/
|
||||
export interface CouponFormData {
|
||||
id?: number;
|
||||
name: string;
|
||||
type: string;
|
||||
}
|
||||
13
src/types/api/system/client.d.ts
vendored
13
src/types/api/system/client.d.ts
vendored
@@ -1,17 +1,14 @@
|
||||
import { PageQueryParam, PageResult } from '../base';
|
||||
|
||||
/**
|
||||
* 客户端查询参数类型声明
|
||||
* 客户端查询参数类型
|
||||
*/
|
||||
export interface ClientQueryParam extends PageQueryParam {
|
||||
/**
|
||||
* 客户端名称
|
||||
*/
|
||||
clientId: string | undefined;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户端分页列表项声明
|
||||
* 客户端分页列表项
|
||||
*/
|
||||
export interface ClientItem {
|
||||
clientId: string;
|
||||
@@ -28,12 +25,12 @@ export interface ClientItem {
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户端分页项类型声明
|
||||
* 客户端分页项类型
|
||||
*/
|
||||
export type ClientPageResult = PageResult<ClientItem[]>;
|
||||
|
||||
/**
|
||||
* 客户端表单类型声明
|
||||
* 客户端表单类型
|
||||
*/
|
||||
export interface ClientFormData {
|
||||
authorizedGrantTypes: string;
|
||||
|
||||
12
src/types/api/system/dict.d.ts
vendored
12
src/types/api/system/dict.d.ts
vendored
@@ -29,7 +29,7 @@ export type DictPageResult = PageResult<Dict[]>;
|
||||
/**
|
||||
* 字典表单类型声明
|
||||
*/
|
||||
export interface DictFormData {
|
||||
export interface DictFormTypeData {
|
||||
id: number | undefined;
|
||||
name: string;
|
||||
code: string;
|
||||
@@ -44,11 +44,11 @@ export interface DictItemQueryParam extends PageQueryParam {
|
||||
/**
|
||||
* 字典项名称
|
||||
*/
|
||||
name: string | undefined;
|
||||
name?: string;
|
||||
/**
|
||||
* 字典编码
|
||||
* 字典类型编码
|
||||
*/
|
||||
dictCode: string | undefined;
|
||||
typeCode?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,8 +75,8 @@ export type DictItemPageResult = PageResult<DictItem[]>;
|
||||
*/
|
||||
export interface DictItemFormData {
|
||||
id?: number;
|
||||
dictCode?: string;
|
||||
dictName?: string;
|
||||
typeCode?: string;
|
||||
typeName?: string;
|
||||
name: string;
|
||||
code: string;
|
||||
value: string;
|
||||
|
||||
18
src/types/api/system/role.d.ts
vendored
18
src/types/api/system/role.d.ts
vendored
@@ -1,14 +1,14 @@
|
||||
import { PageQueryParam, PageResult } from '../base';
|
||||
|
||||
/**
|
||||
* 角色查询参数类型声明
|
||||
* 角色查询参数类型
|
||||
*/
|
||||
export interface RoleQueryParam extends PageQueryParam {
|
||||
name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色分页列表项声明
|
||||
* 角色分页列表项
|
||||
*/
|
||||
export interface RoleItem {
|
||||
id: string;
|
||||
@@ -22,17 +22,25 @@ export interface RoleItem {
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色分页项类型声明
|
||||
* 角色分页项类型
|
||||
*/
|
||||
export type RolePageResult = PageResult<RoleItem[]>;
|
||||
|
||||
/**
|
||||
* 角色表单类型声明
|
||||
* 角色表单类型
|
||||
*/
|
||||
export interface RoleFormData {
|
||||
id: number | undefined;
|
||||
id: string | undefined;
|
||||
name: string;
|
||||
code: string;
|
||||
sort: number;
|
||||
status: number;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export interface RoleResourceData {
|
||||
menuIds: string[];
|
||||
permIds: string[];
|
||||
}
|
||||
|
||||
9
src/types/common.d.ts
vendored
9
src/types/common.d.ts
vendored
@@ -1,9 +1,5 @@
|
||||
/**
|
||||
* 组件类型声明
|
||||
*/
|
||||
|
||||
/**
|
||||
* 弹窗属性类型声明
|
||||
* 弹窗类型
|
||||
*/
|
||||
export interface Dialog {
|
||||
title: string;
|
||||
@@ -11,10 +7,11 @@ export interface Dialog {
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用组件选择项类型声明
|
||||
* 通用组件选择项类型
|
||||
*/
|
||||
export interface Option {
|
||||
value: string;
|
||||
label: string;
|
||||
checked?: boolean;
|
||||
children?: Option[];
|
||||
}
|
||||
|
||||
19
src/types/index.d.ts
vendored
19
src/types/index.d.ts
vendored
@@ -1,19 +0,0 @@
|
||||
export * from './api/system/login';
|
||||
export * from './api/system/user';
|
||||
export * from './api/system/role';
|
||||
export * from './api/system/menu';
|
||||
export * from './api/system/dept';
|
||||
export * from './api/system/dict';
|
||||
export * from './api/system/perm';
|
||||
export * from './api/system/client';
|
||||
|
||||
export * from './api/pms/goods';
|
||||
export * from './api/pms/brand';
|
||||
export * from './api/sms/advert';
|
||||
export * from './api/oms/order';
|
||||
export * from './api/ums/member';
|
||||
export * from './api/lab/seata';
|
||||
|
||||
export * from './store';
|
||||
|
||||
export * from './common';
|
||||
55
src/types/store.d.ts
vendored
55
src/types/store.d.ts
vendored
@@ -1,55 +0,0 @@
|
||||
import { RouteRecordRaw, RouteLocationNormalized } from 'vue-router';
|
||||
/**
|
||||
* 用户状态类型声明
|
||||
*/
|
||||
export interface AppState {
|
||||
device: string;
|
||||
sidebar: {
|
||||
opened: boolean;
|
||||
withoutAnimation: boolean;
|
||||
};
|
||||
language: string;
|
||||
size: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 权限类型声明
|
||||
*/
|
||||
export interface PermissionState {
|
||||
routes: RouteRecordRaw[];
|
||||
addRoutes: RouteRecordRaw[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置状态类型声明
|
||||
*/
|
||||
export interface SettingState {
|
||||
theme: string;
|
||||
tagsView: boolean;
|
||||
fixedHeader: boolean;
|
||||
showSettings: boolean;
|
||||
sidebarLogo: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签状态类型声明
|
||||
*/
|
||||
export interface TagView extends Partial<RouteLocationNormalized> {
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface TagsViewState {
|
||||
visitedViews: TagView[];
|
||||
cachedViews: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户状态类型声明
|
||||
*/
|
||||
export interface UserState {
|
||||
token: string;
|
||||
nickname: string;
|
||||
avatar: string;
|
||||
roles: string[];
|
||||
perms: string[];
|
||||
}
|
||||
12
src/types/store/app.d.ts
vendored
Normal file
12
src/types/store/app.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* 系统类型声明
|
||||
*/
|
||||
export interface AppState {
|
||||
device: string;
|
||||
sidebar: {
|
||||
opened: boolean;
|
||||
withoutAnimation: boolean;
|
||||
};
|
||||
language: string;
|
||||
size: string;
|
||||
}
|
||||
7
src/types/store/permission.d.ts
vendored
Normal file
7
src/types/store/permission.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* 权限类型声明
|
||||
*/
|
||||
export interface PermissionState {
|
||||
routes: RouteRecordRaw[];
|
||||
addRoutes: RouteRecordRaw[];
|
||||
}
|
||||
10
src/types/store/setting.d.ts
vendored
Normal file
10
src/types/store/setting.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* 设置状态类型声明
|
||||
*/
|
||||
export interface SettingState {
|
||||
theme: string;
|
||||
tagsView: boolean;
|
||||
fixedHeader: boolean;
|
||||
showSettings: boolean;
|
||||
sidebarLogo: boolean;
|
||||
}
|
||||
13
src/types/store/tagsview.d.ts
vendored
Normal file
13
src/types/store/tagsview.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { RouteLocationNormalized } from 'vue-router';
|
||||
|
||||
/**
|
||||
* 标签状态类型声明
|
||||
*/
|
||||
export interface TagView extends Partial<RouteLocationNormalized> {
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface TagsViewState {
|
||||
visitedViews: TagView[];
|
||||
cachedViews: string[];
|
||||
}
|
||||
7
src/types/store/user.d.ts
vendored
Normal file
7
src/types/store/user.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export interface UserState {
|
||||
token: string;
|
||||
nickname: string;
|
||||
avatar: string;
|
||||
roles: string[];
|
||||
perms: string[];
|
||||
}
|
||||
Reference in New Issue
Block a user