mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): 精简版+动态路由权限初步
This commit is contained in:
@ -1,17 +0,0 @@
|
||||
/** 登录token */
|
||||
export interface LoginToken {
|
||||
/** token */
|
||||
token: string;
|
||||
/** 刷新token(用户token到期后换取新的token) */
|
||||
refreshToken: string;
|
||||
}
|
||||
|
||||
/** 用户信息 */
|
||||
export interface UserInfo {
|
||||
/** 用户id */
|
||||
userId: string;
|
||||
/** 用户名 */
|
||||
userName: string;
|
||||
/** 用户手机号 */
|
||||
userPhone: string;
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
/** 数据字典 */
|
||||
export interface Dictionary {
|
||||
/** 字典名字 */
|
||||
label: string;
|
||||
/** 要素名字(一级指标) */
|
||||
charactorLabel: string;
|
||||
/** 要素下的指标key(二级指标) */
|
||||
indicatorKey: string;
|
||||
/** 要素下的指标名字(二级指标) */
|
||||
indicatorLabel: string;
|
||||
/** 备注 */
|
||||
remark: string;
|
||||
/** 指标公式 */
|
||||
formula: string;
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
export * from './auth';
|
||||
export * from './demo';
|
||||
export * from './website';
|
||||
export * from './s-graph';
|
@ -1,53 +0,0 @@
|
||||
/** 缩放比例取值范围 */
|
||||
export type SScaleRange = [number, number];
|
||||
|
||||
/** 偏移量 */
|
||||
export interface STranslate {
|
||||
/** X偏移量 */
|
||||
x: number;
|
||||
/** Y偏移量 */
|
||||
y: number;
|
||||
}
|
||||
|
||||
/** 位置 */
|
||||
export interface SPosition {
|
||||
/** x坐标 */
|
||||
x: number;
|
||||
/** y坐标 */
|
||||
y: number;
|
||||
}
|
||||
|
||||
/** 坐标 */
|
||||
export interface SCoord {
|
||||
/** x坐标 */
|
||||
x: number;
|
||||
/** y坐标 */
|
||||
y: number;
|
||||
}
|
||||
|
||||
/** 节点尺寸 */
|
||||
export interface SNodeSize {
|
||||
/** 节点宽 */
|
||||
w: number;
|
||||
/** 节点高 */
|
||||
h: number;
|
||||
}
|
||||
|
||||
/** 图的节点 */
|
||||
export interface SGraphNode extends SCoord {
|
||||
/** 节点id */
|
||||
id: string;
|
||||
/** 节点名称 */
|
||||
label: string;
|
||||
}
|
||||
|
||||
/** 图的关系线 */
|
||||
export interface SGraphEdge {
|
||||
sourceCoord: SCoord;
|
||||
targetCoord: SCoord;
|
||||
}
|
||||
|
||||
export interface SGraphData {
|
||||
nodes: SGraphNode[];
|
||||
edges: SGraphEdge[];
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
/** 网址导航 */
|
||||
export interface Website {
|
||||
/** 网址名称 */
|
||||
title: string;
|
||||
/** 网址简称 */
|
||||
abbr: string;
|
||||
/** 网址图标(网络地址,形状为正方形) */
|
||||
logo: string;
|
||||
/** 描述 */
|
||||
desc: string;
|
||||
}
|
||||
|
||||
/** 网址导航 分类 */
|
||||
export interface WebsiteCategory {
|
||||
/** 分类名称 */
|
||||
title: string;
|
||||
children: WebsiteCategory[] | Website[];
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
/** 数据字典 */
|
||||
export interface ResponseDictionary {
|
||||
/** 字典名字 */
|
||||
modelName: string;
|
||||
/** 要素名字(一级指标) */
|
||||
modelCharactorName: string;
|
||||
/** 要素下的指标key(二级指标) */
|
||||
modelIndicator: string;
|
||||
/** 要素下的指标名字(二级指标) */
|
||||
modelIndicatorName: string;
|
||||
/** 备注 */
|
||||
remarks: string;
|
||||
/** 指标公式 */
|
||||
formula: string;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
import type { Ref } from 'vue';
|
||||
import BScroll from '@better-scroll/core';
|
||||
|
||||
/** BetterScroll暴露出的数据的类型 */
|
||||
export interface ExposeBetterScroll {
|
||||
bsInstance: Ref<BScroll>;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
export * from './theme';
|
||||
export * from './system';
|
||||
export * from './route';
|
||||
export * from './expose';
|
||||
export * from './service';
|
||||
export * from './api';
|
@ -1,44 +0,0 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
/** 导入的路由模块 */
|
||||
export type ImportedRouteModules = Record<string, { default: RouteRecordRaw; [key: string]: any }>;
|
||||
|
||||
/** 路由声明的key */
|
||||
export type RouteKey =
|
||||
| 'root'
|
||||
| 'login'
|
||||
| 'not-found'
|
||||
| 'no-permission'
|
||||
| 'service-error'
|
||||
// 自定义路由
|
||||
| 'dashboard'
|
||||
| 'dashboard_analysis'
|
||||
| 'dashboard_workbench'
|
||||
| 'document'
|
||||
| 'document_vue'
|
||||
| 'document_vite'
|
||||
| 'document_naive'
|
||||
| 'document_project'
|
||||
| 'plugin'
|
||||
| 'plugin_map'
|
||||
| 'plugin_video'
|
||||
| 'plugin_editor'
|
||||
| 'plugin_editor_quill'
|
||||
| 'plugin_editor_markdown'
|
||||
| 'plugin_copy'
|
||||
| 'plugin_icon'
|
||||
| 'plugin_print'
|
||||
| 'plugin_swiper'
|
||||
| 'component'
|
||||
| 'component_button'
|
||||
| 'component_card'
|
||||
| 'component_table'
|
||||
| 'multi-menu'
|
||||
| 'multi-menu_first'
|
||||
| 'multi-menu_first_second'
|
||||
| 'exception'
|
||||
| 'exception_403'
|
||||
| 'exception_404'
|
||||
| 'exception_500'
|
||||
| 'about'
|
||||
| 'website';
|
@ -1,46 +0,0 @@
|
||||
/**
|
||||
* 请求服务的错误类型:
|
||||
* - axios: axios错误:网络错误, 请求超时, 默认的兜底错误
|
||||
* - http: 请求成功,响应的状态码非200的错误
|
||||
* - backend: 请求成功,响应的状态码为200,由后端定义的业务错误
|
||||
*/
|
||||
export type RequestServiceErrorType = 'axios' | 'http' | 'backend';
|
||||
|
||||
/** 请求服务的错误 */
|
||||
export interface RequestServiceError {
|
||||
/** 请求服务的错误类型 */
|
||||
type: RequestServiceErrorType;
|
||||
/** 错误码 */
|
||||
code: string | number;
|
||||
/** 错误信息 */
|
||||
msg: string;
|
||||
}
|
||||
|
||||
/** 后端接口返回的类型结构 */
|
||||
export interface BackendServiceResult {
|
||||
/** 状态码 */
|
||||
code: number;
|
||||
/** 接口数据 */
|
||||
data: any;
|
||||
/** 接口消息 */
|
||||
message: string;
|
||||
}
|
||||
|
||||
/** 自定义的请求成功结果 */
|
||||
export interface CustomSuccessRequestResult<ResponseData> {
|
||||
/** 请求错误 */
|
||||
error: null;
|
||||
/** 请求数据 */
|
||||
data: ResponseData;
|
||||
}
|
||||
|
||||
/** 自定义的请求失败结果 */
|
||||
export interface CustomFailRequestResult {
|
||||
/** 请求错误 */
|
||||
error: RequestServiceError;
|
||||
/** 请求数据 */
|
||||
data: null;
|
||||
}
|
||||
|
||||
/** 自定义的请求结果 */
|
||||
export type CustomRequestResult<ResponseData> = CustomSuccessRequestResult<ResponseData> | CustomFailRequestResult;
|
@ -1,28 +0,0 @@
|
||||
import type { RouteLocationNormalizedLoaded } from 'vue-router';
|
||||
import type { MenuOption } from 'naive-ui';
|
||||
import { EnumLoginModule } from '@/enum';
|
||||
|
||||
/** 菜单项配置 */
|
||||
export type GlobalMenuOption = MenuOption & {
|
||||
routeName: string;
|
||||
routePath: string;
|
||||
};
|
||||
|
||||
/** 多页签 */
|
||||
export interface MultiTab {
|
||||
routes: MultiTabRoute[];
|
||||
activeRoute: string;
|
||||
}
|
||||
export type MultiTabRoute = Partial<RouteLocationNormalizedLoaded> & {
|
||||
path: string;
|
||||
fullPath: string;
|
||||
};
|
||||
|
||||
/** 登录模块 */
|
||||
export type LoginModuleType = keyof typeof EnumLoginModule;
|
||||
|
||||
/** npm依赖包版本信息 */
|
||||
export interface VersionInfo {
|
||||
name: string;
|
||||
version: string;
|
||||
}
|
@ -1,131 +0,0 @@
|
||||
import { EnumAnimate, EnumNavMode, EnumNavTheme, EnumMultiTabMode, EnumHorizontalMenuPosition } from '@/enum';
|
||||
|
||||
export interface ThemeSettings {
|
||||
/** 深色模式 */
|
||||
darkMode: boolean;
|
||||
/** 主题颜色 */
|
||||
themeColor: string;
|
||||
/** 主题颜色列表 */
|
||||
themeColorList: string[];
|
||||
/** 其他颜色 */
|
||||
otherColor: OtherColor;
|
||||
/** 导航样式 */
|
||||
navStyle: NavStyle;
|
||||
/** 菜单样式 */
|
||||
menuStyle: MenuStyle;
|
||||
/** 头部样式 */
|
||||
headerStyle: HeaderStyle;
|
||||
/** 多页签样式 */
|
||||
multiTabStyle: MultiTabStyle;
|
||||
/** 面包屑样式 */
|
||||
crumbsStyle: CrumbsStyle;
|
||||
/** 底部样式 */
|
||||
footerStyle: FooterStyle;
|
||||
/** 页面样式 */
|
||||
pageStyle: PageStyle;
|
||||
/** 固定头部和多页签 */
|
||||
fixedHeaderAndTab: boolean;
|
||||
/** 显示重载按钮 */
|
||||
showReload: boolean;
|
||||
}
|
||||
|
||||
interface OtherColor {
|
||||
/** 信息 */
|
||||
info: string;
|
||||
/** 成功 */
|
||||
success: string;
|
||||
/** 警告 */
|
||||
warning: string;
|
||||
/** 错误 */
|
||||
error: string;
|
||||
}
|
||||
|
||||
export type NavMode = keyof typeof EnumNavMode;
|
||||
|
||||
type NavTheme = keyof typeof EnumNavTheme;
|
||||
|
||||
interface NavStyle {
|
||||
/** 导航模式 */
|
||||
mode: NavMode;
|
||||
/** 导航主题 */
|
||||
theme: NavTheme;
|
||||
}
|
||||
|
||||
interface HeaderStyle {
|
||||
/** 顶部高度 */
|
||||
height: number;
|
||||
/** 背景颜色 */
|
||||
bgColor: string;
|
||||
}
|
||||
|
||||
export type HorizontalMenuPosition = keyof typeof EnumHorizontalMenuPosition;
|
||||
|
||||
interface HorizontalMenuPositionList {
|
||||
value: HorizontalMenuPosition;
|
||||
label: EnumHorizontalMenuPosition;
|
||||
}
|
||||
|
||||
interface MenuStyle {
|
||||
/** 菜单宽度 */
|
||||
width: number;
|
||||
/** 菜单折叠时的宽度 */
|
||||
collapsedWidth: number;
|
||||
/** 混合菜单的宽度 */
|
||||
mixWidth: number;
|
||||
/** 混合菜单折叠时的宽度 */
|
||||
mixCollapsedWidth: number;
|
||||
/** 水平模式的菜单的位置 */
|
||||
horizontalPosition: HorizontalMenuPosition;
|
||||
/** 水平模式的菜单的位置列表 */
|
||||
horizontalPositionList: HorizontalMenuPositionList[];
|
||||
}
|
||||
|
||||
export type MultiTabMode = keyof typeof EnumMultiTabMode;
|
||||
|
||||
interface MultiTabModeList {
|
||||
value: MultiTabMode;
|
||||
label: EnumMultiTabMode;
|
||||
}
|
||||
|
||||
interface MultiTabStyle {
|
||||
/** 多页签高度 */
|
||||
height: number;
|
||||
/** 多页签可见 */
|
||||
visible: boolean;
|
||||
/** 背景颜色 */
|
||||
bgColor: string;
|
||||
/** 多页签模式 */
|
||||
mode: MultiTabMode;
|
||||
/** 开启多页签缓存 */
|
||||
isCache: boolean;
|
||||
/** 多页签模式列表 */
|
||||
modeList: MultiTabModeList[];
|
||||
}
|
||||
|
||||
interface CrumbsStyle {
|
||||
/** 面包屑可见 */
|
||||
visible: boolean;
|
||||
/** 显示图标 */
|
||||
showIcon: boolean;
|
||||
}
|
||||
|
||||
interface FooterStyle {
|
||||
/** 底部高度 */
|
||||
height: number;
|
||||
}
|
||||
|
||||
export type AnimateType = keyof typeof EnumAnimate;
|
||||
|
||||
interface AnimateTypeList {
|
||||
value: AnimateType;
|
||||
label: EnumAnimate;
|
||||
}
|
||||
|
||||
interface PageStyle {
|
||||
/** 页面是否开启动画 */
|
||||
animate: boolean;
|
||||
/** 动画类型 */
|
||||
animateType: AnimateType;
|
||||
/** 动画类型列表 */
|
||||
animateTypeList: AnimateTypeList[];
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
export * from './common';
|
||||
export * from './business';
|
||||
export interface TestType {
|
||||
name: string;
|
||||
}
|
||||
|
Reference in New Issue
Block a user