moc变更管理系统框架
This commit is contained in:
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
declare namespace Api {
|
||||
/**
|
||||
* namespace Auth
|
||||
*
|
||||
* backend api module: "auth"
|
||||
*/
|
||||
namespace Auth {
|
||||
interface LoginToken {
|
||||
token: string;
|
||||
refreshToken: string;
|
||||
}
|
||||
|
||||
interface UserInfo {
|
||||
userId: string;
|
||||
userName: string;
|
||||
roles: string[];
|
||||
buttons: string[];
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+50
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* Namespace Api
|
||||
*
|
||||
* All backend api type
|
||||
*/
|
||||
declare namespace Api {
|
||||
namespace Common {
|
||||
/** common params of paginating */
|
||||
interface PaginatingCommonParams {
|
||||
/** current page number */
|
||||
current: number;
|
||||
/** page size */
|
||||
size: number;
|
||||
/** total count */
|
||||
total: number;
|
||||
}
|
||||
|
||||
/** common params of paginating query list data */
|
||||
interface PaginatingQueryRecord<T = any> extends PaginatingCommonParams {
|
||||
records: T[];
|
||||
}
|
||||
|
||||
/** common search params of table */
|
||||
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>;
|
||||
|
||||
/**
|
||||
* enable status
|
||||
*
|
||||
* - "1": enabled
|
||||
* - "2": disabled
|
||||
*/
|
||||
type EnableStatus = '1' | '2';
|
||||
|
||||
/** common record */
|
||||
type CommonRecord<T = any> = {
|
||||
/** record id */
|
||||
id: number;
|
||||
/** record creator */
|
||||
createBy: string;
|
||||
/** record create time */
|
||||
createTime: string;
|
||||
/** record updater */
|
||||
updateBy: string;
|
||||
/** record update time */
|
||||
updateTime: string;
|
||||
/** record status */
|
||||
status: EnableStatus | null;
|
||||
} & T;
|
||||
}
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
declare namespace Api {
|
||||
/**
|
||||
* namespace Route
|
||||
*
|
||||
* backend api module: "route"
|
||||
*/
|
||||
namespace Route {
|
||||
type ElegantConstRoute = import('@elegant-router/types').ElegantConstRoute;
|
||||
|
||||
interface MenuRoute extends ElegantConstRoute {
|
||||
id: string;
|
||||
}
|
||||
|
||||
interface UserRoute {
|
||||
routes: MenuRoute[];
|
||||
home: import('@elegant-router/types').LastLevelRouteKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+139
@@ -0,0 +1,139 @@
|
||||
declare namespace Api {
|
||||
/**
|
||||
* namespace SystemManage
|
||||
*
|
||||
* backend api module: "systemManage"
|
||||
*/
|
||||
namespace SystemManage {
|
||||
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>;
|
||||
|
||||
/** role */
|
||||
type Role = Common.CommonRecord<{
|
||||
/** role name */
|
||||
roleName: string;
|
||||
/** role code */
|
||||
roleCode: string;
|
||||
/** role description */
|
||||
roleDesc: string;
|
||||
}>;
|
||||
|
||||
/** role search params */
|
||||
type RoleSearchParams = CommonType.RecordNullable<
|
||||
Pick<Api.SystemManage.Role, 'roleName' | 'roleCode' | 'status'> & CommonSearchParams
|
||||
>;
|
||||
|
||||
/** role list */
|
||||
type RoleList = Common.PaginatingQueryRecord<Role>;
|
||||
|
||||
/** all role */
|
||||
type AllRole = Pick<Role, 'id' | 'roleName' | 'roleCode'>;
|
||||
|
||||
/**
|
||||
* user gender
|
||||
*
|
||||
* - "1": "male"
|
||||
* - "2": "female"
|
||||
*/
|
||||
type UserGender = '1' | '2';
|
||||
|
||||
/** user */
|
||||
type User = Common.CommonRecord<{
|
||||
/** user name */
|
||||
userName: string;
|
||||
/** user gender */
|
||||
userGender: UserGender | null;
|
||||
/** user nick name */
|
||||
nickName: string;
|
||||
/** user phone */
|
||||
userPhone: string;
|
||||
/** user email */
|
||||
userEmail: string;
|
||||
/** user role code collection */
|
||||
userRoles: string[];
|
||||
}>;
|
||||
|
||||
/** user search params */
|
||||
type UserSearchParams = CommonType.RecordNullable<
|
||||
Pick<Api.SystemManage.User, 'userName' | 'userGender' | 'nickName' | 'userPhone' | 'userEmail' | 'status'> &
|
||||
CommonSearchParams
|
||||
>;
|
||||
|
||||
/** user list */
|
||||
type UserList = Common.PaginatingQueryRecord<User>;
|
||||
|
||||
/**
|
||||
* menu type
|
||||
*
|
||||
* - "1": directory
|
||||
* - "2": menu
|
||||
*/
|
||||
type MenuType = '1' | '2';
|
||||
|
||||
type MenuButton = {
|
||||
/**
|
||||
* button code
|
||||
*
|
||||
* it can be used to control the button permission
|
||||
*/
|
||||
code: string;
|
||||
/** button description */
|
||||
desc: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* icon type
|
||||
*
|
||||
* - "1": iconify icon
|
||||
* - "2": local icon
|
||||
*/
|
||||
type IconType = '1' | '2';
|
||||
|
||||
type MenuPropsOfRoute = Pick<
|
||||
import('vue-router').RouteMeta,
|
||||
| 'i18nKey'
|
||||
| 'keepAlive'
|
||||
| 'constant'
|
||||
| 'order'
|
||||
| 'href'
|
||||
| 'hideInMenu'
|
||||
| 'activeMenu'
|
||||
| 'multiTab'
|
||||
| 'fixedIndexInTab'
|
||||
| 'query'
|
||||
>;
|
||||
|
||||
type Menu = Common.CommonRecord<{
|
||||
/** parent menu id */
|
||||
parentId: number;
|
||||
/** menu type */
|
||||
menuType: MenuType;
|
||||
/** menu name */
|
||||
menuName: string;
|
||||
/** route name */
|
||||
routeName: string;
|
||||
/** route path */
|
||||
routePath: string;
|
||||
/** component */
|
||||
component?: string;
|
||||
/** iconify icon name or local icon name */
|
||||
icon: string;
|
||||
/** icon type */
|
||||
iconType: IconType;
|
||||
/** buttons */
|
||||
buttons?: MenuButton[] | null;
|
||||
/** children menu */
|
||||
children?: Menu[] | null;
|
||||
}> &
|
||||
MenuPropsOfRoute;
|
||||
|
||||
/** menu list */
|
||||
type MenuList = Common.PaginatingQueryRecord<Menu>;
|
||||
|
||||
type MenuTree = {
|
||||
id: number;
|
||||
label: string;
|
||||
pId: number;
|
||||
children?: MenuTree[];
|
||||
};
|
||||
}
|
||||
}
|
||||
Vendored
+918
@@ -0,0 +1,918 @@
|
||||
/** The global namespace for the app */
|
||||
declare namespace App {
|
||||
/** Theme namespace */
|
||||
namespace Theme {
|
||||
type ColorPaletteNumber = import('@sa/color').ColorPaletteNumber;
|
||||
|
||||
/** NaiveUI theme overrides that can be specified in preset */
|
||||
type NaiveUIThemeOverride = import('naive-ui').GlobalThemeOverrides;
|
||||
|
||||
/** Theme setting */
|
||||
interface ThemeSetting {
|
||||
/** Theme scheme */
|
||||
themeScheme: UnionKey.ThemeScheme;
|
||||
/** grayscale mode */
|
||||
grayscale: boolean;
|
||||
/** colour weakness mode */
|
||||
colourWeakness: boolean;
|
||||
/** Whether to recommend color */
|
||||
recommendColor: boolean;
|
||||
/** Theme color */
|
||||
themeColor: string;
|
||||
/** Theme radius */
|
||||
themeRadius: number;
|
||||
/** Other color */
|
||||
otherColor: OtherColor;
|
||||
/** Whether info color is followed by the primary color */
|
||||
isInfoFollowPrimary: boolean;
|
||||
/** Layout */
|
||||
layout: {
|
||||
/** Layout mode */
|
||||
mode: UnionKey.ThemeLayoutMode;
|
||||
/** Scroll mode */
|
||||
scrollMode: UnionKey.ThemeScrollMode;
|
||||
};
|
||||
/** Page */
|
||||
page: {
|
||||
/** Whether to show the page transition */
|
||||
animate: boolean;
|
||||
/** Page animate mode */
|
||||
animateMode: UnionKey.ThemePageAnimateMode;
|
||||
};
|
||||
/** Header */
|
||||
header: {
|
||||
/** Header height */
|
||||
height: number;
|
||||
/** Header breadcrumb */
|
||||
breadcrumb: {
|
||||
/** Whether to show the breadcrumb */
|
||||
visible: boolean;
|
||||
/** Whether to show the breadcrumb icon */
|
||||
showIcon: boolean;
|
||||
};
|
||||
/** Multilingual */
|
||||
multilingual: {
|
||||
/** Whether to show the multilingual */
|
||||
visible: boolean;
|
||||
};
|
||||
globalSearch: {
|
||||
/** Whether to show the GlobalSearch */
|
||||
visible: boolean;
|
||||
};
|
||||
};
|
||||
/** Tab */
|
||||
tab: {
|
||||
/** Whether to show the tab */
|
||||
visible: boolean;
|
||||
/**
|
||||
* Whether to cache the tab
|
||||
*
|
||||
* If cache, the tabs will get from the local storage when the page is refreshed
|
||||
*/
|
||||
cache: boolean;
|
||||
/** Tab height */
|
||||
height: number;
|
||||
/** Tab mode */
|
||||
mode: UnionKey.ThemeTabMode;
|
||||
/** Whether to close tab by middle click */
|
||||
closeTabByMiddleClick: boolean;
|
||||
};
|
||||
/** Fixed header and tab */
|
||||
fixedHeaderAndTab: boolean;
|
||||
/** Sider */
|
||||
sider: {
|
||||
/** Inverted sider */
|
||||
inverted: boolean;
|
||||
/** Sider width */
|
||||
width: number;
|
||||
/** Collapsed sider width */
|
||||
collapsedWidth: number;
|
||||
/** Sider width when the layout is 'vertical-mix', 'top-hybrid-sidebar-first', or 'top-hybrid-header-first' */
|
||||
mixWidth: number;
|
||||
/**
|
||||
* Collapsed sider width when the layout is 'vertical-mix', 'top-hybrid-sidebar-first', or
|
||||
* 'top-hybrid-header-first'
|
||||
*/
|
||||
mixCollapsedWidth: number;
|
||||
/** Child menu width when the layout is 'vertical-mix', 'top-hybrid-sidebar-first', or 'top-hybrid-header-first' */
|
||||
mixChildMenuWidth: number;
|
||||
/** Whether to auto select the first submenu */
|
||||
autoSelectFirstMenu: boolean;
|
||||
};
|
||||
/** Footer */
|
||||
footer: {
|
||||
/** Whether to show the footer */
|
||||
visible: boolean;
|
||||
/** Whether fixed the footer */
|
||||
fixed: boolean;
|
||||
/** Footer height */
|
||||
height: number;
|
||||
/**
|
||||
* Whether float the footer to the right when the layout is 'top-hybrid-sidebar-first' or
|
||||
* 'top-hybrid-header-first'
|
||||
*/
|
||||
right: boolean;
|
||||
};
|
||||
/** Watermark */
|
||||
watermark: {
|
||||
/** Whether to show the watermark */
|
||||
visible: boolean;
|
||||
/** Watermark text */
|
||||
text: string;
|
||||
/** Whether to use user name as watermark text */
|
||||
enableUserName: boolean;
|
||||
/** Whether to use current time as watermark text */
|
||||
enableTime: boolean;
|
||||
/** Time format for watermark text */
|
||||
timeFormat: string;
|
||||
};
|
||||
/** define some theme settings tokens, will transform to css variables */
|
||||
tokens: {
|
||||
light: ThemeSettingToken;
|
||||
dark?: {
|
||||
[K in keyof ThemeSettingToken]?: Partial<ThemeSettingToken[K]>;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
interface OtherColor {
|
||||
info: string;
|
||||
success: string;
|
||||
warning: string;
|
||||
error: string;
|
||||
}
|
||||
|
||||
interface ThemeColor extends OtherColor {
|
||||
primary: string;
|
||||
}
|
||||
|
||||
type ThemeColorKey = keyof ThemeColor;
|
||||
|
||||
type ThemePaletteColor = {
|
||||
[key in ThemeColorKey | `${ThemeColorKey}-${ColorPaletteNumber}`]: string;
|
||||
};
|
||||
|
||||
type BaseToken = Record<string, Record<string, string>>;
|
||||
|
||||
interface ThemeSettingTokenColor {
|
||||
/** the progress bar color, if not set, will use the primary color */
|
||||
nprogress?: string;
|
||||
container: string;
|
||||
layout: string;
|
||||
inverted: string;
|
||||
'base-text': string;
|
||||
}
|
||||
|
||||
interface ThemeSettingTokenBoxShadow {
|
||||
header: string;
|
||||
sider: string;
|
||||
tab: string;
|
||||
}
|
||||
|
||||
interface ThemeSettingToken {
|
||||
colors: ThemeSettingTokenColor;
|
||||
boxShadow: ThemeSettingTokenBoxShadow;
|
||||
}
|
||||
|
||||
type ThemeTokenColor = ThemePaletteColor & ThemeSettingTokenColor;
|
||||
|
||||
/** Theme token CSS variables */
|
||||
type ThemeTokenCSSVars = {
|
||||
colors: ThemeTokenColor & { [key: string]: string };
|
||||
boxShadow: ThemeSettingTokenBoxShadow & { [key: string]: string };
|
||||
};
|
||||
}
|
||||
|
||||
/** Global namespace */
|
||||
namespace Global {
|
||||
type VNode = import('vue').VNode;
|
||||
type RouteLocationNormalizedLoaded = import('vue-router').RouteLocationNormalizedLoaded;
|
||||
type RouteKey = import('@elegant-router/types').RouteKey;
|
||||
type RouteMap = import('@elegant-router/types').RouteMap;
|
||||
type RoutePath = import('@elegant-router/types').RoutePath;
|
||||
type LastLevelRouteKey = import('@elegant-router/types').LastLevelRouteKey;
|
||||
|
||||
/** The router push options */
|
||||
type RouterPushOptions = {
|
||||
query?: Record<string, string>;
|
||||
params?: Record<string, string>;
|
||||
force?: boolean;
|
||||
};
|
||||
|
||||
/** The global header props */
|
||||
interface HeaderProps {
|
||||
/** Whether to show the logo */
|
||||
showLogo?: boolean;
|
||||
/** Whether to show the menu toggler */
|
||||
showMenuToggler?: boolean;
|
||||
/** Whether to show the menu */
|
||||
showMenu?: boolean;
|
||||
}
|
||||
|
||||
/** The global menu */
|
||||
type Menu = {
|
||||
/**
|
||||
* The menu key
|
||||
*
|
||||
* Equal to the route key
|
||||
*/
|
||||
key: string;
|
||||
/** The menu label */
|
||||
label: string;
|
||||
/** The menu i18n key */
|
||||
i18nKey?: I18n.I18nKey | null;
|
||||
/** The route key */
|
||||
routeKey: RouteKey;
|
||||
/** The route path */
|
||||
routePath: RoutePath;
|
||||
/** The menu icon */
|
||||
icon?: () => VNode;
|
||||
/** The menu children */
|
||||
children?: Menu[];
|
||||
};
|
||||
|
||||
type Breadcrumb = Omit<Menu, 'children'> & {
|
||||
options?: Breadcrumb[];
|
||||
};
|
||||
|
||||
/** Tab route */
|
||||
type TabRoute = Pick<RouteLocationNormalizedLoaded, 'name' | 'path' | 'meta'> &
|
||||
Partial<Pick<RouteLocationNormalizedLoaded, 'fullPath' | 'query' | 'matched'>>;
|
||||
|
||||
/** The global tab */
|
||||
type Tab = {
|
||||
/** The tab id */
|
||||
id: string;
|
||||
/** The tab label */
|
||||
label: string;
|
||||
/**
|
||||
* The new tab label
|
||||
*
|
||||
* If set, the tab label will be replaced by this value
|
||||
*/
|
||||
newLabel?: string;
|
||||
/**
|
||||
* The old tab label
|
||||
*
|
||||
* when reset the tab label, the tab label will be replaced by this value
|
||||
*/
|
||||
oldLabel?: string;
|
||||
/** The tab route key */
|
||||
routeKey: LastLevelRouteKey;
|
||||
/** The tab route path */
|
||||
routePath: RouteMap[LastLevelRouteKey];
|
||||
/** The tab route full path */
|
||||
fullPath: string;
|
||||
/** The tab fixed index */
|
||||
fixedIndex?: number | null;
|
||||
/**
|
||||
* Tab icon
|
||||
*
|
||||
* Iconify icon
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* Tab local icon
|
||||
*
|
||||
* Local icon
|
||||
*/
|
||||
localIcon?: string;
|
||||
/** I18n key */
|
||||
i18nKey?: I18n.I18nKey | null;
|
||||
};
|
||||
|
||||
/** Form rule */
|
||||
type FormRule = import('naive-ui').FormItemRule;
|
||||
|
||||
/** The global dropdown key */
|
||||
type DropdownKey = 'closeCurrent' | 'closeOther' | 'closeLeft' | 'closeRight' | 'closeAll' | 'pin' | 'unpin';
|
||||
}
|
||||
|
||||
/**
|
||||
* I18n namespace
|
||||
*
|
||||
* Locales type
|
||||
*/
|
||||
namespace I18n {
|
||||
type RouteKey = import('@elegant-router/types').RouteKey;
|
||||
|
||||
type LangType = 'en-US' | 'zh-CN';
|
||||
|
||||
type LangOption = {
|
||||
label: string;
|
||||
key: LangType;
|
||||
};
|
||||
|
||||
type I18nRouteKey = Exclude<RouteKey, 'root' | 'not-found'>;
|
||||
|
||||
type FormMsg = {
|
||||
required: string;
|
||||
invalid: string;
|
||||
};
|
||||
|
||||
type Schema = {
|
||||
system: {
|
||||
title: string;
|
||||
updateTitle: string;
|
||||
updateContent: string;
|
||||
updateConfirm: string;
|
||||
updateCancel: string;
|
||||
};
|
||||
common: {
|
||||
action: string;
|
||||
add: string;
|
||||
addSuccess: string;
|
||||
backToHome: string;
|
||||
batchDelete: string;
|
||||
cancel: string;
|
||||
close: string;
|
||||
check: string;
|
||||
selectAll: string;
|
||||
expandColumn: string;
|
||||
columnSetting: string;
|
||||
config: string;
|
||||
confirm: string;
|
||||
delete: string;
|
||||
deleteSuccess: string;
|
||||
confirmDelete: string;
|
||||
edit: string;
|
||||
warning: string;
|
||||
error: string;
|
||||
index: string;
|
||||
keywordSearch: string;
|
||||
logout: string;
|
||||
logoutConfirm: string;
|
||||
lookForward: string;
|
||||
modify: string;
|
||||
modifySuccess: string;
|
||||
noData: string;
|
||||
operate: string;
|
||||
pleaseCheckValue: string;
|
||||
refresh: string;
|
||||
reset: string;
|
||||
search: string;
|
||||
switch: string;
|
||||
tip: string;
|
||||
trigger: string;
|
||||
update: string;
|
||||
updateSuccess: string;
|
||||
userCenter: string;
|
||||
yesOrNo: {
|
||||
yes: string;
|
||||
no: string;
|
||||
};
|
||||
};
|
||||
request: {
|
||||
logout: string;
|
||||
logoutMsg: string;
|
||||
logoutWithModal: string;
|
||||
logoutWithModalMsg: string;
|
||||
refreshToken: string;
|
||||
tokenExpired: string;
|
||||
};
|
||||
theme: {
|
||||
themeDrawerTitle: string;
|
||||
tabs: {
|
||||
appearance: string;
|
||||
layout: string;
|
||||
general: string;
|
||||
preset: string;
|
||||
};
|
||||
appearance: {
|
||||
themeSchema: { title: string } & Record<UnionKey.ThemeScheme, string>;
|
||||
grayscale: string;
|
||||
colourWeakness: string;
|
||||
themeColor: {
|
||||
title: string;
|
||||
followPrimary: string;
|
||||
} & Record<Theme.ThemeColorKey, string>;
|
||||
recommendColor: string;
|
||||
recommendColorDesc: string;
|
||||
themeRadius: {
|
||||
title: string;
|
||||
};
|
||||
preset: {
|
||||
title: string;
|
||||
apply: string;
|
||||
applySuccess: string;
|
||||
[key: string]:
|
||||
| {
|
||||
name: string;
|
||||
desc: string;
|
||||
}
|
||||
| string;
|
||||
};
|
||||
};
|
||||
layout: {
|
||||
layoutMode: { title: string } & Record<UnionKey.ThemeLayoutMode, string> & {
|
||||
[K in `${UnionKey.ThemeLayoutMode}_detail`]: string;
|
||||
};
|
||||
tab: {
|
||||
title: string;
|
||||
visible: string;
|
||||
cache: string;
|
||||
cacheTip: string;
|
||||
height: string;
|
||||
mode: { title: string } & Record<UnionKey.ThemeTabMode, string>;
|
||||
closeByMiddleClick: string;
|
||||
closeByMiddleClickTip: string;
|
||||
};
|
||||
header: {
|
||||
title: string;
|
||||
height: string;
|
||||
breadcrumb: {
|
||||
visible: string;
|
||||
showIcon: string;
|
||||
};
|
||||
};
|
||||
sider: {
|
||||
title: string;
|
||||
inverted: string;
|
||||
width: string;
|
||||
collapsedWidth: string;
|
||||
mixWidth: string;
|
||||
mixCollapsedWidth: string;
|
||||
mixChildMenuWidth: string;
|
||||
autoSelectFirstMenu: string;
|
||||
autoSelectFirstMenuTip: string;
|
||||
};
|
||||
footer: {
|
||||
title: string;
|
||||
visible: string;
|
||||
fixed: string;
|
||||
height: string;
|
||||
right: string;
|
||||
};
|
||||
content: {
|
||||
title: string;
|
||||
scrollMode: { title: string; tip: string } & Record<UnionKey.ThemeScrollMode, string>;
|
||||
page: {
|
||||
animate: string;
|
||||
mode: { title: string } & Record<UnionKey.ThemePageAnimateMode, string>;
|
||||
};
|
||||
fixedHeaderAndTab: string;
|
||||
};
|
||||
};
|
||||
general: {
|
||||
title: string;
|
||||
watermark: {
|
||||
title: string;
|
||||
visible: string;
|
||||
text: string;
|
||||
enableUserName: string;
|
||||
enableTime: string;
|
||||
timeFormat: string;
|
||||
};
|
||||
multilingual: {
|
||||
title: string;
|
||||
visible: string;
|
||||
};
|
||||
globalSearch: {
|
||||
title: string;
|
||||
visible: string;
|
||||
};
|
||||
};
|
||||
configOperation: {
|
||||
copyConfig: string;
|
||||
copySuccessMsg: string;
|
||||
resetConfig: string;
|
||||
resetSuccessMsg: string;
|
||||
};
|
||||
};
|
||||
route: Record<I18nRouteKey, string>;
|
||||
page: {
|
||||
login: {
|
||||
common: {
|
||||
loginOrRegister: string;
|
||||
userNamePlaceholder: string;
|
||||
phonePlaceholder: string;
|
||||
codePlaceholder: string;
|
||||
passwordPlaceholder: string;
|
||||
confirmPasswordPlaceholder: string;
|
||||
codeLogin: string;
|
||||
confirm: string;
|
||||
back: string;
|
||||
validateSuccess: string;
|
||||
loginSuccess: string;
|
||||
welcomeBack: string;
|
||||
};
|
||||
pwdLogin: {
|
||||
title: string;
|
||||
rememberMe: string;
|
||||
forgetPassword: string;
|
||||
register: string;
|
||||
otherAccountLogin: string;
|
||||
otherLoginMode: string;
|
||||
superAdmin: string;
|
||||
admin: string;
|
||||
user: string;
|
||||
};
|
||||
codeLogin: {
|
||||
title: string;
|
||||
getCode: string;
|
||||
reGetCode: string;
|
||||
sendCodeSuccess: string;
|
||||
imageCodePlaceholder: string;
|
||||
};
|
||||
register: {
|
||||
title: string;
|
||||
agreement: string;
|
||||
protocol: string;
|
||||
policy: string;
|
||||
};
|
||||
resetPwd: {
|
||||
title: string;
|
||||
};
|
||||
bindWeChat: {
|
||||
title: string;
|
||||
};
|
||||
};
|
||||
about: {
|
||||
title: string;
|
||||
introduction: string;
|
||||
projectInfo: {
|
||||
title: string;
|
||||
version: string;
|
||||
latestBuildTime: string;
|
||||
githubLink: string;
|
||||
previewLink: string;
|
||||
};
|
||||
prdDep: string;
|
||||
devDep: string;
|
||||
};
|
||||
home: {
|
||||
branchDesc: string;
|
||||
projectCount: string;
|
||||
todo: string;
|
||||
message: string;
|
||||
downloadCount: string;
|
||||
registerCount: string;
|
||||
schedule: string;
|
||||
study: string;
|
||||
work: string;
|
||||
rest: string;
|
||||
entertainment: string;
|
||||
visitCount: string;
|
||||
turnover: string;
|
||||
dealCount: string;
|
||||
projectNews: {
|
||||
title: string;
|
||||
moreNews: string;
|
||||
desc1: string;
|
||||
desc2: string;
|
||||
desc3: string;
|
||||
desc4: string;
|
||||
desc5: string;
|
||||
};
|
||||
creativity: string;
|
||||
};
|
||||
function: {
|
||||
tab: {
|
||||
tabOperate: {
|
||||
title: string;
|
||||
addTab: string;
|
||||
addTabDesc: string;
|
||||
closeTab: string;
|
||||
closeCurrentTab: string;
|
||||
closeAboutTab: string;
|
||||
addMultiTab: string;
|
||||
addMultiTabDesc1: string;
|
||||
addMultiTabDesc2: string;
|
||||
};
|
||||
tabTitle: {
|
||||
title: string;
|
||||
changeTitle: string;
|
||||
change: string;
|
||||
resetTitle: string;
|
||||
reset: string;
|
||||
};
|
||||
};
|
||||
multiTab: {
|
||||
routeParam: string;
|
||||
backTab: string;
|
||||
};
|
||||
toggleAuth: {
|
||||
toggleAccount: string;
|
||||
authHook: string;
|
||||
superAdminVisible: string;
|
||||
adminVisible: string;
|
||||
adminOrUserVisible: string;
|
||||
};
|
||||
request: {
|
||||
repeatedErrorOccurOnce: string;
|
||||
repeatedError: string;
|
||||
repeatedErrorMsg1: string;
|
||||
repeatedErrorMsg2: string;
|
||||
};
|
||||
};
|
||||
alova: {
|
||||
scenes: {
|
||||
captchaSend: string;
|
||||
autoRequest: string;
|
||||
visibilityRequestTips: string;
|
||||
pollingRequestTips: string;
|
||||
networkRequestTips: string;
|
||||
refreshTime: string;
|
||||
startRequest: string;
|
||||
stopRequest: string;
|
||||
requestCrossComponent: string;
|
||||
triggerAllRequest: string;
|
||||
};
|
||||
};
|
||||
proNaive: {
|
||||
form: {
|
||||
basic: {
|
||||
title: string;
|
||||
appName: string;
|
||||
appStatus: string;
|
||||
createTime: string;
|
||||
responseDate: string;
|
||||
specificationInfo: string;
|
||||
specificate: string;
|
||||
specificationName: string;
|
||||
specificationValue: string;
|
||||
specificationColorRed: string;
|
||||
specificationColorOrange: string;
|
||||
addSpecificateItem: string;
|
||||
fillValue: string;
|
||||
reset: string;
|
||||
submit: string;
|
||||
add: string;
|
||||
delete: string;
|
||||
color: string;
|
||||
normal: string;
|
||||
anomaly: string;
|
||||
};
|
||||
query: {
|
||||
title1: string;
|
||||
title2: string;
|
||||
appName: string;
|
||||
appStatus: string;
|
||||
createTime: string;
|
||||
responseDate: string;
|
||||
endDate: string;
|
||||
field: string;
|
||||
};
|
||||
step: {
|
||||
title: string;
|
||||
step1: {
|
||||
title: string;
|
||||
field: string;
|
||||
nextStep: string;
|
||||
};
|
||||
step2: {
|
||||
title: string;
|
||||
field: string;
|
||||
prevStep: string;
|
||||
submit: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
table: {
|
||||
remote: {
|
||||
filterCondition: string;
|
||||
name: string;
|
||||
createTime: string;
|
||||
responseTime: string;
|
||||
title: string;
|
||||
replicableText: string;
|
||||
tags: string;
|
||||
dateFormatting: string;
|
||||
image: string;
|
||||
};
|
||||
rowEdit: {
|
||||
title: string;
|
||||
reset: string;
|
||||
submit: string;
|
||||
edit: string;
|
||||
delete: string;
|
||||
save: string;
|
||||
task: string;
|
||||
score: string;
|
||||
time: string;
|
||||
name: string;
|
||||
action: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
manage: {
|
||||
common: {
|
||||
status: {
|
||||
enable: string;
|
||||
disable: string;
|
||||
};
|
||||
};
|
||||
role: {
|
||||
title: string;
|
||||
roleName: string;
|
||||
roleCode: string;
|
||||
roleStatus: string;
|
||||
roleDesc: string;
|
||||
form: {
|
||||
roleName: string;
|
||||
roleCode: string;
|
||||
roleStatus: string;
|
||||
roleDesc: string;
|
||||
};
|
||||
addRole: string;
|
||||
editRole: string;
|
||||
menuAuth: string;
|
||||
buttonAuth: string;
|
||||
};
|
||||
user: {
|
||||
title: string;
|
||||
userName: string;
|
||||
userGender: string;
|
||||
nickName: string;
|
||||
userPhone: string;
|
||||
userEmail: string;
|
||||
userStatus: string;
|
||||
userRole: string;
|
||||
form: {
|
||||
userName: string;
|
||||
userGender: string;
|
||||
nickName: string;
|
||||
userPhone: string;
|
||||
userEmail: string;
|
||||
userStatus: string;
|
||||
userRole: string;
|
||||
};
|
||||
addUser: string;
|
||||
editUser: string;
|
||||
gender: {
|
||||
male: string;
|
||||
female: string;
|
||||
};
|
||||
};
|
||||
menu: {
|
||||
home: string;
|
||||
title: string;
|
||||
id: string;
|
||||
parentId: string;
|
||||
menuType: string;
|
||||
menuName: string;
|
||||
routeName: string;
|
||||
routePath: string;
|
||||
pathParam: string;
|
||||
layout: string;
|
||||
page: string;
|
||||
i18nKey: string;
|
||||
icon: string;
|
||||
localIcon: string;
|
||||
iconTypeTitle: string;
|
||||
order: string;
|
||||
constant: string;
|
||||
keepAlive: string;
|
||||
href: string;
|
||||
hideInMenu: string;
|
||||
activeMenu: string;
|
||||
multiTab: string;
|
||||
fixedIndexInTab: string;
|
||||
query: string;
|
||||
button: string;
|
||||
buttonCode: string;
|
||||
buttonDesc: string;
|
||||
menuStatus: string;
|
||||
form: {
|
||||
home: string;
|
||||
menuType: string;
|
||||
menuName: string;
|
||||
routeName: string;
|
||||
routePath: string;
|
||||
pathParam: string;
|
||||
layout: string;
|
||||
page: string;
|
||||
i18nKey: string;
|
||||
icon: string;
|
||||
localIcon: string;
|
||||
order: string;
|
||||
keepAlive: string;
|
||||
href: string;
|
||||
hideInMenu: string;
|
||||
activeMenu: string;
|
||||
multiTab: string;
|
||||
fixedInTab: string;
|
||||
fixedIndexInTab: string;
|
||||
queryKey: string;
|
||||
queryValue: string;
|
||||
button: string;
|
||||
buttonCode: string;
|
||||
buttonDesc: string;
|
||||
menuStatus: string;
|
||||
};
|
||||
addMenu: string;
|
||||
editMenu: string;
|
||||
addChildMenu: string;
|
||||
type: {
|
||||
directory: string;
|
||||
menu: string;
|
||||
};
|
||||
iconType: {
|
||||
iconify: string;
|
||||
local: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
form: {
|
||||
required: string;
|
||||
userName: FormMsg;
|
||||
phone: FormMsg;
|
||||
pwd: FormMsg;
|
||||
confirmPwd: FormMsg;
|
||||
code: FormMsg;
|
||||
email: FormMsg;
|
||||
};
|
||||
dropdown: Record<Global.DropdownKey, string>;
|
||||
icon: {
|
||||
themeConfig: string;
|
||||
themeSchema: string;
|
||||
lang: string;
|
||||
fullscreen: string;
|
||||
fullscreenExit: string;
|
||||
reload: string;
|
||||
collapse: string;
|
||||
expand: string;
|
||||
pin: string;
|
||||
unpin: string;
|
||||
};
|
||||
datatable: {
|
||||
itemCount: string;
|
||||
fixed: {
|
||||
left: string;
|
||||
right: string;
|
||||
unFixed: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
type GetI18nKey<T extends Record<string, unknown>, K extends keyof T = keyof T> = K extends string
|
||||
? T[K] extends Record<string, unknown>
|
||||
? `${K}.${GetI18nKey<T[K]>}`
|
||||
: K
|
||||
: never;
|
||||
|
||||
type I18nKey = GetI18nKey<Schema>;
|
||||
|
||||
type TranslateOptions<Locales extends string> = import('vue-i18n').TranslateOptions<Locales>;
|
||||
|
||||
interface $T {
|
||||
(key: I18nKey): string;
|
||||
(key: I18nKey, plural: number, options?: TranslateOptions<LangType>): string;
|
||||
(key: I18nKey, defaultMsg: string, options?: TranslateOptions<I18nKey>): string;
|
||||
(key: I18nKey, list: unknown[], options?: TranslateOptions<I18nKey>): string;
|
||||
(key: I18nKey, list: unknown[], plural: number): string;
|
||||
(key: I18nKey, list: unknown[], defaultMsg: string): string;
|
||||
(key: I18nKey, named: Record<string, unknown>, options?: TranslateOptions<LangType>): string;
|
||||
(key: I18nKey, named: Record<string, unknown>, plural: number): string;
|
||||
(key: I18nKey, named: Record<string, unknown>, defaultMsg: string): string;
|
||||
}
|
||||
}
|
||||
|
||||
/** Service namespace */
|
||||
namespace Service {
|
||||
/** Other baseURL key */
|
||||
type OtherBaseURLKey = 'demo';
|
||||
|
||||
interface ServiceConfigItem {
|
||||
/** The backend service base url */
|
||||
baseURL: string;
|
||||
/** The proxy pattern of the backend service base url */
|
||||
proxyPattern: string;
|
||||
}
|
||||
|
||||
interface OtherServiceConfigItem extends ServiceConfigItem {
|
||||
key: OtherBaseURLKey;
|
||||
}
|
||||
|
||||
/** The backend service config */
|
||||
interface ServiceConfig extends ServiceConfigItem {
|
||||
/** Other backend service config */
|
||||
other: OtherServiceConfigItem[];
|
||||
}
|
||||
|
||||
interface SimpleServiceConfig extends Pick<ServiceConfigItem, 'baseURL'> {
|
||||
other: Record<OtherBaseURLKey, string>;
|
||||
}
|
||||
|
||||
/** The backend service response data */
|
||||
type Response<T = unknown> = {
|
||||
/** The backend service response code */
|
||||
code: string;
|
||||
/** The backend service response message */
|
||||
msg: string;
|
||||
/** The backend service response data */
|
||||
data: T;
|
||||
};
|
||||
|
||||
/** The demo backend service response data */
|
||||
type DemoResponse<T = unknown> = {
|
||||
/** The backend service response code */
|
||||
status: string;
|
||||
/** The backend service response message */
|
||||
message: string;
|
||||
/** The backend service response data */
|
||||
result: T;
|
||||
};
|
||||
}
|
||||
}
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
/** The common type namespace */
|
||||
declare namespace CommonType {
|
||||
/** The strategic pattern */
|
||||
interface StrategicPattern {
|
||||
/** The condition */
|
||||
condition: boolean;
|
||||
/** If the condition is true, then call the action function */
|
||||
callback: () => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* The option type
|
||||
*
|
||||
* @property value: The option value
|
||||
* @property label: The option label
|
||||
*/
|
||||
type Option<K = string, M = string> = { value: K; label: M };
|
||||
|
||||
type YesOrNo = 'Y' | 'N';
|
||||
|
||||
/** add null to all properties */
|
||||
type RecordNullable<T> = {
|
||||
[K in keyof T]?: T[K] | null;
|
||||
};
|
||||
}
|
||||
Vendored
+286
@@ -0,0 +1,286 @@
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
// biome-ignore lint: disable
|
||||
// oxlint-disable
|
||||
// ------
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import { GlobalComponents } from 'vue'
|
||||
|
||||
export {}
|
||||
|
||||
/* prettier-ignore */
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
AppProvider: typeof import('./../components/common/app-provider.vue')['default']
|
||||
BetterScroll: typeof import('./../components/custom/better-scroll.vue')['default']
|
||||
ButtonIcon: typeof import('./../components/custom/button-icon.vue')['default']
|
||||
CountTo: typeof import('./../components/custom/count-to.vue')['default']
|
||||
CustomIconSelect: typeof import('./../components/custom/custom-icon-select.vue')['default']
|
||||
DarkModeContainer: typeof import('./../components/common/dark-mode-container.vue')['default']
|
||||
ExceptionBase: typeof import('./../components/common/exception-base.vue')['default']
|
||||
FullScreen: typeof import('./../components/common/full-screen.vue')['default']
|
||||
GithubLink: typeof import('./../components/custom/github-link.vue')['default']
|
||||
IconAntDesignEnterOutlined: typeof import('~icons/ant-design/enter-outlined')['default']
|
||||
IconAntDesignReloadOutlined: typeof import('~icons/ant-design/reload-outlined')['default']
|
||||
IconAntDesignSettingOutlined: typeof import('~icons/ant-design/setting-outlined')['default']
|
||||
IconCarbonPlay: typeof import('~icons/carbon/play')['default']
|
||||
IconCarbonStop: typeof import('~icons/carbon/stop')['default']
|
||||
IconCharmDownload: typeof import('~icons/charm/download')['default']
|
||||
IconF7CircleFill: typeof import('~icons/f7/circle-fill')['default']
|
||||
IconF7FlagCircleFill: typeof import('~icons/f7/flag-circle-fill')['default']
|
||||
IconFeQuestion: typeof import('~icons/fe/question')['default']
|
||||
IconFileIconsMicrosoftExcel: typeof import('~icons/file-icons/microsoft-excel')['default']
|
||||
IconGgRatio: typeof import('~icons/gg/ratio')['default']
|
||||
IconGridiconsFullscreen: typeof import('~icons/gridicons/fullscreen')['default']
|
||||
IconGridiconsFullscreenExit: typeof import('~icons/gridicons/fullscreen-exit')['default']
|
||||
IconIconParkOutlineEqualRatio: typeof import('~icons/icon-park-outline/equal-ratio')['default']
|
||||
IconIcRoundDelete: typeof import('~icons/ic/round-delete')['default']
|
||||
IconIcRoundPlus: typeof import('~icons/ic/round-plus')['default']
|
||||
IconIcRoundRefresh: typeof import('~icons/ic/round-refresh')['default']
|
||||
IconIcRoundRemove: typeof import('~icons/ic/round-remove')['default']
|
||||
IconIcRoundSearch: typeof import('~icons/ic/round-search')['default']
|
||||
IconLocalActivity: typeof import('~icons/local/activity')['default']
|
||||
IconLocalBanner: typeof import('~icons/local/banner')['default']
|
||||
IconLocalCast: typeof import('~icons/local/cast')['default']
|
||||
IconMaterialSymbolsLightRotate90DegreesCcwOutlineRounded: typeof import('~icons/material-symbols-light/rotate90-degrees-ccw-outline-rounded')['default']
|
||||
IconMdiArrowDownThin: typeof import('~icons/mdi/arrow-down-thin')['default']
|
||||
IconMdiArrowUpThin: typeof import('~icons/mdi/arrow-up-thin')['default']
|
||||
IconMdiDrag: typeof import('~icons/mdi/drag')['default']
|
||||
IconMdiKeyboardEsc: typeof import('~icons/mdi/keyboard-esc')['default']
|
||||
IconMdiKeyboardReturn: typeof import('~icons/mdi/keyboard-return')['default']
|
||||
IconMdiPrinter: typeof import('~icons/mdi/printer')['default']
|
||||
IconMdiRefresh: typeof import('~icons/mdi/refresh')['default']
|
||||
IconMingcuteZoomInLine: typeof import('~icons/mingcute/zoom-in-line')['default']
|
||||
IconMingcuteZoomOutLine: typeof import('~icons/mingcute/zoom-out-line')['default']
|
||||
IconOcticonPin16: typeof import('~icons/octicon/pin16')['default']
|
||||
IconOcticonPinSlash16: typeof import('~icons/octicon/pin-slash16')['default']
|
||||
IconTooltip: typeof import('./../components/common/icon-tooltip.vue')['default']
|
||||
IconUilSearch: typeof import('~icons/uil/search')['default']
|
||||
LangSwitch: typeof import('./../components/common/lang-switch.vue')['default']
|
||||
LookForward: typeof import('./../components/custom/look-forward.vue')['default']
|
||||
MenuToggler: typeof import('./../components/common/menu-toggler.vue')['default']
|
||||
NAlert: typeof import('naive-ui')['NAlert']
|
||||
NBadge: typeof import('naive-ui')['NBadge']
|
||||
NBreadcrumb: typeof import('naive-ui')['NBreadcrumb']
|
||||
NBreadcrumbItem: typeof import('naive-ui')['NBreadcrumbItem']
|
||||
NButton: typeof import('naive-ui')['NButton']
|
||||
NButtonGroup: typeof import('naive-ui')['NButtonGroup']
|
||||
NCard: typeof import('naive-ui')['NCard']
|
||||
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||
NCollapse: typeof import('naive-ui')['NCollapse']
|
||||
NCollapseItem: typeof import('naive-ui')['NCollapseItem']
|
||||
NColorPicker: typeof import('naive-ui')['NColorPicker']
|
||||
NDataTable: typeof import('naive-ui')['NDataTable']
|
||||
NDatePicker: typeof import('naive-ui')['NDatePicker']
|
||||
NDescriptions: typeof import('naive-ui')['NDescriptions']
|
||||
NDescriptionsItem: typeof import('naive-ui')['NDescriptionsItem']
|
||||
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
|
||||
NDivider: typeof import('naive-ui')['NDivider']
|
||||
NDrawer: typeof import('naive-ui')['NDrawer']
|
||||
NDrawerContent: typeof import('naive-ui')['NDrawerContent']
|
||||
NDropdown: typeof import('naive-ui')['NDropdown']
|
||||
NDynamicInput: typeof import('naive-ui')['NDynamicInput']
|
||||
NEmpty: typeof import('naive-ui')['NEmpty']
|
||||
NFlex: typeof import('naive-ui')['NFlex']
|
||||
NForm: typeof import('naive-ui')['NForm']
|
||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||
NFormItemGi: typeof import('naive-ui')['NFormItemGi']
|
||||
NGi: typeof import('naive-ui')['NGi']
|
||||
NGrid: typeof import('naive-ui')['NGrid']
|
||||
NIcon: typeof import('naive-ui')['NIcon']
|
||||
NInput: typeof import('naive-ui')['NInput']
|
||||
NInputGroup: typeof import('naive-ui')['NInputGroup']
|
||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||
NIput: typeof import('naive-ui')['NIput']
|
||||
NList: typeof import('naive-ui')['NList']
|
||||
NListItem: typeof import('naive-ui')['NListItem']
|
||||
NLoadingBarProvider: typeof import('naive-ui')['NLoadingBarProvider']
|
||||
NMenu: typeof import('naive-ui')['NMenu']
|
||||
NMessageProvider: typeof import('naive-ui')['NMessageProvider']
|
||||
NModal: typeof import('naive-ui')['NModal']
|
||||
NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
|
||||
NPagination: typeof import('naive-ui')['NPagination']
|
||||
NPopconfirm: typeof import('naive-ui')['NPopconfirm']
|
||||
NPopover: typeof import('naive-ui')['NPopover']
|
||||
NProgress: typeof import('naive-ui')['NProgress']
|
||||
NRadio: typeof import('naive-ui')['NRadio']
|
||||
NRadioGroup: typeof import('naive-ui')['NRadioGroup']
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NSelect: typeof import('naive-ui')['NSelect']
|
||||
NSkeleton: typeof import('naive-ui')['NSkeleton']
|
||||
NSpace: typeof import('naive-ui')['NSpace']
|
||||
NSpin: typeof import('naive-ui')['NSpin']
|
||||
NStatistic: typeof import('naive-ui')['NStatistic']
|
||||
NStep: typeof import('naive-ui')['NStep']
|
||||
NSteps: typeof import('naive-ui')['NSteps']
|
||||
NSwitch: typeof import('naive-ui')['NSwitch']
|
||||
NTab: typeof import('naive-ui')['NTab']
|
||||
NTabPane: typeof import('naive-ui')['NTabPane']
|
||||
NTabs: typeof import('naive-ui')['NTabs']
|
||||
NTag: typeof import('naive-ui')['NTag']
|
||||
NThing: typeof import('naive-ui')['NThing']
|
||||
NTooltip: typeof import('naive-ui')['NTooltip']
|
||||
NTree: typeof import('naive-ui')['NTree']
|
||||
NWatermark: typeof import('naive-ui')['NWatermark']
|
||||
PinToggler: typeof import('./../components/common/pin-toggler.vue')['default']
|
||||
ProCard: typeof import('pro-naive-ui')['ProCard']
|
||||
ProConfigProvider: typeof import('pro-naive-ui')['ProConfigProvider']
|
||||
ProDataTable: typeof import('pro-naive-ui')['ProDataTable']
|
||||
ProDate: typeof import('pro-naive-ui')['ProDate']
|
||||
ProEditDataTable: typeof import('pro-naive-ui')['ProEditDataTable']
|
||||
ProForm: typeof import('pro-naive-ui')['ProForm']
|
||||
ProFormList: typeof import('pro-naive-ui')['ProFormList']
|
||||
ProInput: typeof import('pro-naive-ui')['ProInput']
|
||||
ProSearchForm: typeof import('pro-naive-ui')['ProSearchForm']
|
||||
ProSelect: typeof import('pro-naive-ui')['ProSelect']
|
||||
ReloadButton: typeof import('./../components/common/reload-button.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SoybeanAvatar: typeof import('./../components/custom/soybean-avatar.vue')['default']
|
||||
SvgIcon: typeof import('./../components/custom/svg-icon.vue')['default']
|
||||
SystemLogo: typeof import('./../components/common/system-logo.vue')['default']
|
||||
TableColumnSetting: typeof import('./../components/advanced/table-column-setting.vue')['default']
|
||||
TableHeaderOperation: typeof import('./../components/advanced/table-header-operation.vue')['default']
|
||||
ThemeSchemaSwitch: typeof import('./../components/common/theme-schema-switch.vue')['default']
|
||||
WaveBg: typeof import('./../components/custom/wave-bg.vue')['default']
|
||||
WebSiteLink: typeof import('./../components/custom/web-site-link.vue')['default']
|
||||
}
|
||||
}
|
||||
|
||||
// For TSX support
|
||||
declare global {
|
||||
const AppProvider: typeof import('./../components/common/app-provider.vue')['default']
|
||||
const BetterScroll: typeof import('./../components/custom/better-scroll.vue')['default']
|
||||
const ButtonIcon: typeof import('./../components/custom/button-icon.vue')['default']
|
||||
const CountTo: typeof import('./../components/custom/count-to.vue')['default']
|
||||
const CustomIconSelect: typeof import('./../components/custom/custom-icon-select.vue')['default']
|
||||
const DarkModeContainer: typeof import('./../components/common/dark-mode-container.vue')['default']
|
||||
const ExceptionBase: typeof import('./../components/common/exception-base.vue')['default']
|
||||
const FullScreen: typeof import('./../components/common/full-screen.vue')['default']
|
||||
const GithubLink: typeof import('./../components/custom/github-link.vue')['default']
|
||||
const IconAntDesignEnterOutlined: typeof import('~icons/ant-design/enter-outlined')['default']
|
||||
const IconAntDesignReloadOutlined: typeof import('~icons/ant-design/reload-outlined')['default']
|
||||
const IconAntDesignSettingOutlined: typeof import('~icons/ant-design/setting-outlined')['default']
|
||||
const IconCarbonPlay: typeof import('~icons/carbon/play')['default']
|
||||
const IconCarbonStop: typeof import('~icons/carbon/stop')['default']
|
||||
const IconCharmDownload: typeof import('~icons/charm/download')['default']
|
||||
const IconF7CircleFill: typeof import('~icons/f7/circle-fill')['default']
|
||||
const IconF7FlagCircleFill: typeof import('~icons/f7/flag-circle-fill')['default']
|
||||
const IconFeQuestion: typeof import('~icons/fe/question')['default']
|
||||
const IconFileIconsMicrosoftExcel: typeof import('~icons/file-icons/microsoft-excel')['default']
|
||||
const IconGgRatio: typeof import('~icons/gg/ratio')['default']
|
||||
const IconGridiconsFullscreen: typeof import('~icons/gridicons/fullscreen')['default']
|
||||
const IconGridiconsFullscreenExit: typeof import('~icons/gridicons/fullscreen-exit')['default']
|
||||
const IconIconParkOutlineEqualRatio: typeof import('~icons/icon-park-outline/equal-ratio')['default']
|
||||
const IconIcRoundDelete: typeof import('~icons/ic/round-delete')['default']
|
||||
const IconIcRoundPlus: typeof import('~icons/ic/round-plus')['default']
|
||||
const IconIcRoundRefresh: typeof import('~icons/ic/round-refresh')['default']
|
||||
const IconIcRoundRemove: typeof import('~icons/ic/round-remove')['default']
|
||||
const IconIcRoundSearch: typeof import('~icons/ic/round-search')['default']
|
||||
const IconLocalActivity: typeof import('~icons/local/activity')['default']
|
||||
const IconLocalBanner: typeof import('~icons/local/banner')['default']
|
||||
const IconLocalCast: typeof import('~icons/local/cast')['default']
|
||||
const IconMaterialSymbolsLightRotate90DegreesCcwOutlineRounded: typeof import('~icons/material-symbols-light/rotate90-degrees-ccw-outline-rounded')['default']
|
||||
const IconMdiArrowDownThin: typeof import('~icons/mdi/arrow-down-thin')['default']
|
||||
const IconMdiArrowUpThin: typeof import('~icons/mdi/arrow-up-thin')['default']
|
||||
const IconMdiDrag: typeof import('~icons/mdi/drag')['default']
|
||||
const IconMdiKeyboardEsc: typeof import('~icons/mdi/keyboard-esc')['default']
|
||||
const IconMdiKeyboardReturn: typeof import('~icons/mdi/keyboard-return')['default']
|
||||
const IconMdiPrinter: typeof import('~icons/mdi/printer')['default']
|
||||
const IconMdiRefresh: typeof import('~icons/mdi/refresh')['default']
|
||||
const IconMingcuteZoomInLine: typeof import('~icons/mingcute/zoom-in-line')['default']
|
||||
const IconMingcuteZoomOutLine: typeof import('~icons/mingcute/zoom-out-line')['default']
|
||||
const IconOcticonPin16: typeof import('~icons/octicon/pin16')['default']
|
||||
const IconOcticonPinSlash16: typeof import('~icons/octicon/pin-slash16')['default']
|
||||
const IconTooltip: typeof import('./../components/common/icon-tooltip.vue')['default']
|
||||
const IconUilSearch: typeof import('~icons/uil/search')['default']
|
||||
const LangSwitch: typeof import('./../components/common/lang-switch.vue')['default']
|
||||
const LookForward: typeof import('./../components/custom/look-forward.vue')['default']
|
||||
const MenuToggler: typeof import('./../components/common/menu-toggler.vue')['default']
|
||||
const NAlert: typeof import('naive-ui')['NAlert']
|
||||
const NBadge: typeof import('naive-ui')['NBadge']
|
||||
const NBreadcrumb: typeof import('naive-ui')['NBreadcrumb']
|
||||
const NBreadcrumbItem: typeof import('naive-ui')['NBreadcrumbItem']
|
||||
const NButton: typeof import('naive-ui')['NButton']
|
||||
const NButtonGroup: typeof import('naive-ui')['NButtonGroup']
|
||||
const NCard: typeof import('naive-ui')['NCard']
|
||||
const NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||
const NCollapse: typeof import('naive-ui')['NCollapse']
|
||||
const NCollapseItem: typeof import('naive-ui')['NCollapseItem']
|
||||
const NColorPicker: typeof import('naive-ui')['NColorPicker']
|
||||
const NDataTable: typeof import('naive-ui')['NDataTable']
|
||||
const NDatePicker: typeof import('naive-ui')['NDatePicker']
|
||||
const NDescriptions: typeof import('naive-ui')['NDescriptions']
|
||||
const NDescriptionsItem: typeof import('naive-ui')['NDescriptionsItem']
|
||||
const NDialogProvider: typeof import('naive-ui')['NDialogProvider']
|
||||
const NDivider: typeof import('naive-ui')['NDivider']
|
||||
const NDrawer: typeof import('naive-ui')['NDrawer']
|
||||
const NDrawerContent: typeof import('naive-ui')['NDrawerContent']
|
||||
const NDropdown: typeof import('naive-ui')['NDropdown']
|
||||
const NDynamicInput: typeof import('naive-ui')['NDynamicInput']
|
||||
const NEmpty: typeof import('naive-ui')['NEmpty']
|
||||
const NFlex: typeof import('naive-ui')['NFlex']
|
||||
const NForm: typeof import('naive-ui')['NForm']
|
||||
const NFormItem: typeof import('naive-ui')['NFormItem']
|
||||
const NFormItemGi: typeof import('naive-ui')['NFormItemGi']
|
||||
const NGi: typeof import('naive-ui')['NGi']
|
||||
const NGrid: typeof import('naive-ui')['NGrid']
|
||||
const NIcon: typeof import('naive-ui')['NIcon']
|
||||
const NInput: typeof import('naive-ui')['NInput']
|
||||
const NInputGroup: typeof import('naive-ui')['NInputGroup']
|
||||
const NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||
const NIput: typeof import('naive-ui')['NIput']
|
||||
const NList: typeof import('naive-ui')['NList']
|
||||
const NListItem: typeof import('naive-ui')['NListItem']
|
||||
const NLoadingBarProvider: typeof import('naive-ui')['NLoadingBarProvider']
|
||||
const NMenu: typeof import('naive-ui')['NMenu']
|
||||
const NMessageProvider: typeof import('naive-ui')['NMessageProvider']
|
||||
const NModal: typeof import('naive-ui')['NModal']
|
||||
const NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
|
||||
const NPagination: typeof import('naive-ui')['NPagination']
|
||||
const NPopconfirm: typeof import('naive-ui')['NPopconfirm']
|
||||
const NPopover: typeof import('naive-ui')['NPopover']
|
||||
const NProgress: typeof import('naive-ui')['NProgress']
|
||||
const NRadio: typeof import('naive-ui')['NRadio']
|
||||
const NRadioGroup: typeof import('naive-ui')['NRadioGroup']
|
||||
const NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
const NSelect: typeof import('naive-ui')['NSelect']
|
||||
const NSkeleton: typeof import('naive-ui')['NSkeleton']
|
||||
const NSpace: typeof import('naive-ui')['NSpace']
|
||||
const NSpin: typeof import('naive-ui')['NSpin']
|
||||
const NStatistic: typeof import('naive-ui')['NStatistic']
|
||||
const NStep: typeof import('naive-ui')['NStep']
|
||||
const NSteps: typeof import('naive-ui')['NSteps']
|
||||
const NSwitch: typeof import('naive-ui')['NSwitch']
|
||||
const NTab: typeof import('naive-ui')['NTab']
|
||||
const NTabPane: typeof import('naive-ui')['NTabPane']
|
||||
const NTabs: typeof import('naive-ui')['NTabs']
|
||||
const NTag: typeof import('naive-ui')['NTag']
|
||||
const NThing: typeof import('naive-ui')['NThing']
|
||||
const NTooltip: typeof import('naive-ui')['NTooltip']
|
||||
const NTree: typeof import('naive-ui')['NTree']
|
||||
const NWatermark: typeof import('naive-ui')['NWatermark']
|
||||
const PinToggler: typeof import('./../components/common/pin-toggler.vue')['default']
|
||||
const ProCard: typeof import('pro-naive-ui')['ProCard']
|
||||
const ProConfigProvider: typeof import('pro-naive-ui')['ProConfigProvider']
|
||||
const ProDataTable: typeof import('pro-naive-ui')['ProDataTable']
|
||||
const ProDate: typeof import('pro-naive-ui')['ProDate']
|
||||
const ProEditDataTable: typeof import('pro-naive-ui')['ProEditDataTable']
|
||||
const ProForm: typeof import('pro-naive-ui')['ProForm']
|
||||
const ProFormList: typeof import('pro-naive-ui')['ProFormList']
|
||||
const ProInput: typeof import('pro-naive-ui')['ProInput']
|
||||
const ProSearchForm: typeof import('pro-naive-ui')['ProSearchForm']
|
||||
const ProSelect: typeof import('pro-naive-ui')['ProSelect']
|
||||
const ReloadButton: typeof import('./../components/common/reload-button.vue')['default']
|
||||
const RouterLink: typeof import('vue-router')['RouterLink']
|
||||
const RouterView: typeof import('vue-router')['RouterView']
|
||||
const SoybeanAvatar: typeof import('./../components/custom/soybean-avatar.vue')['default']
|
||||
const SvgIcon: typeof import('./../components/custom/svg-icon.vue')['default']
|
||||
const SystemLogo: typeof import('./../components/common/system-logo.vue')['default']
|
||||
const TableColumnSetting: typeof import('./../components/advanced/table-column-setting.vue')['default']
|
||||
const TableHeaderOperation: typeof import('./../components/advanced/table-header-operation.vue')['default']
|
||||
const ThemeSchemaSwitch: typeof import('./../components/common/theme-schema-switch.vue')['default']
|
||||
const WaveBg: typeof import('./../components/custom/wave-bg.vue')['default']
|
||||
const WebSiteLink: typeof import('./../components/custom/web-site-link.vue')['default']
|
||||
}
|
||||
Vendored
+260
@@ -0,0 +1,260 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// Generated by elegant-router
|
||||
// Read more: https://github.com/soybeanjs/elegant-router
|
||||
|
||||
declare module "@elegant-router/types" {
|
||||
type ElegantConstRoute = import('@elegant-router/vue').ElegantConstRoute;
|
||||
|
||||
/**
|
||||
* route layout
|
||||
*/
|
||||
export type RouteLayout = "base" | "blank";
|
||||
|
||||
/**
|
||||
* route map
|
||||
*/
|
||||
export type RouteMap = {
|
||||
"root": "/";
|
||||
"not-found": "/:pathMatch(.*)*";
|
||||
"403": "/403";
|
||||
"404": "/404";
|
||||
"500": "/500";
|
||||
"changeledger": "/changeledger";
|
||||
"changeledger_mychanges": "/changeledger/mychanges";
|
||||
"changeledger_workshopchanges": "/changeledger/workshopchanges";
|
||||
"changestatistics": "/changestatistics";
|
||||
"home": "/home";
|
||||
"home_index": "/home/index";
|
||||
"home_initiatechange": "/home/initiatechange";
|
||||
"home_mydraft": "/home/mydraft";
|
||||
"home_pending": "/home/pending";
|
||||
"home_process": "/home/process";
|
||||
"home_processdetail": "/home/processdetail";
|
||||
"login": "/login/:module(pwd-login)?";
|
||||
"user-center": "/user-center";
|
||||
};
|
||||
|
||||
/**
|
||||
* route key
|
||||
*/
|
||||
export type RouteKey = keyof RouteMap;
|
||||
|
||||
/**
|
||||
* route path
|
||||
*/
|
||||
export type RoutePath = RouteMap[RouteKey];
|
||||
|
||||
/**
|
||||
* custom route key
|
||||
*/
|
||||
export type CustomRouteKey = Extract<
|
||||
RouteKey,
|
||||
| "root"
|
||||
| "not-found"
|
||||
>;
|
||||
|
||||
/**
|
||||
* the generated route key
|
||||
*/
|
||||
export type GeneratedRouteKey = Exclude<RouteKey, CustomRouteKey>;
|
||||
|
||||
/**
|
||||
* the first level route key, which contain the layout of the route
|
||||
*/
|
||||
export type FirstLevelRouteKey = Extract<
|
||||
RouteKey,
|
||||
| "403"
|
||||
| "404"
|
||||
| "500"
|
||||
| "changeledger"
|
||||
| "changestatistics"
|
||||
| "home"
|
||||
| "login"
|
||||
| "user-center"
|
||||
>;
|
||||
|
||||
/**
|
||||
* the custom first level route key
|
||||
*/
|
||||
export type CustomFirstLevelRouteKey = Extract<
|
||||
CustomRouteKey,
|
||||
| "root"
|
||||
| "not-found"
|
||||
>;
|
||||
|
||||
/**
|
||||
* the last level route key, which has the page file
|
||||
*/
|
||||
export type LastLevelRouteKey = Extract<
|
||||
RouteKey,
|
||||
| "403"
|
||||
| "404"
|
||||
| "500"
|
||||
| "changeledger_mychanges"
|
||||
| "changeledger_workshopchanges"
|
||||
| "changestatistics"
|
||||
| "home_index"
|
||||
| "home_initiatechange"
|
||||
| "home_mydraft"
|
||||
| "home_pending"
|
||||
| "home_process"
|
||||
| "home_processdetail"
|
||||
| "login"
|
||||
| "user-center"
|
||||
>;
|
||||
|
||||
/**
|
||||
* the custom last level route key
|
||||
*/
|
||||
export type CustomLastLevelRouteKey = Extract<
|
||||
CustomRouteKey,
|
||||
| "root"
|
||||
| "not-found"
|
||||
>;
|
||||
|
||||
/**
|
||||
* the single level route key
|
||||
*/
|
||||
export type SingleLevelRouteKey = FirstLevelRouteKey & LastLevelRouteKey;
|
||||
|
||||
/**
|
||||
* the custom single level route key
|
||||
*/
|
||||
export type CustomSingleLevelRouteKey = CustomFirstLevelRouteKey & CustomLastLevelRouteKey;
|
||||
|
||||
/**
|
||||
* the first level route key, but not the single level
|
||||
*/
|
||||
export type FirstLevelRouteNotSingleKey = Exclude<FirstLevelRouteKey, SingleLevelRouteKey>;
|
||||
|
||||
/**
|
||||
* the custom first level route key, but not the single level
|
||||
*/
|
||||
export type CustomFirstLevelRouteNotSingleKey = Exclude<CustomFirstLevelRouteKey, CustomSingleLevelRouteKey>;
|
||||
|
||||
/**
|
||||
* the center level route key
|
||||
*/
|
||||
export type CenterLevelRouteKey = Exclude<GeneratedRouteKey, FirstLevelRouteKey | LastLevelRouteKey>;
|
||||
|
||||
/**
|
||||
* the custom center level route key
|
||||
*/
|
||||
export type CustomCenterLevelRouteKey = Exclude<CustomRouteKey, CustomFirstLevelRouteKey | CustomLastLevelRouteKey>;
|
||||
|
||||
/**
|
||||
* the center level route key
|
||||
*/
|
||||
type GetChildRouteKey<K extends RouteKey, T extends RouteKey = RouteKey> = T extends `${K}_${infer R}`
|
||||
? R extends `${string}_${string}`
|
||||
? never
|
||||
: T
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the single level route
|
||||
*/
|
||||
type SingleLevelRoute<K extends SingleLevelRouteKey = SingleLevelRouteKey> = K extends string
|
||||
? Omit<ElegantConstRoute, 'children'> & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
component: `layout.${RouteLayout}$view.${K}`;
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the last level route
|
||||
*/
|
||||
type LastLevelRoute<K extends GeneratedRouteKey> = K extends LastLevelRouteKey
|
||||
? Omit<ElegantConstRoute, 'children'> & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
component: `view.${K}`;
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the center level route
|
||||
*/
|
||||
type CenterLevelRoute<K extends GeneratedRouteKey> = K extends CenterLevelRouteKey
|
||||
? Omit<ElegantConstRoute, 'component'> & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
children: (CenterLevelRoute<GetChildRouteKey<K>> | LastLevelRoute<GetChildRouteKey<K>>)[];
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the multi level route
|
||||
*/
|
||||
type MultiLevelRoute<K extends FirstLevelRouteNotSingleKey = FirstLevelRouteNotSingleKey> = K extends string
|
||||
? ElegantConstRoute & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
component: `layout.${RouteLayout}`;
|
||||
children: (CenterLevelRoute<GetChildRouteKey<K>> | LastLevelRoute<GetChildRouteKey<K>>)[];
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the custom first level route
|
||||
*/
|
||||
type CustomSingleLevelRoute<K extends CustomFirstLevelRouteKey = CustomFirstLevelRouteKey> = K extends string
|
||||
? Omit<ElegantConstRoute, 'children'> & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
component?: `layout.${RouteLayout}$view.${LastLevelRouteKey}`;
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the custom last level route
|
||||
*/
|
||||
type CustomLastLevelRoute<K extends CustomRouteKey> = K extends CustomLastLevelRouteKey
|
||||
? Omit<ElegantConstRoute, 'children'> & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
component?: `view.${LastLevelRouteKey}`;
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the custom center level route
|
||||
*/
|
||||
type CustomCenterLevelRoute<K extends CustomRouteKey> = K extends CustomCenterLevelRouteKey
|
||||
? Omit<ElegantConstRoute, 'component'> & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
children: (CustomCenterLevelRoute<GetChildRouteKey<K>> | CustomLastLevelRoute<GetChildRouteKey<K>>)[];
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the custom multi level route
|
||||
*/
|
||||
type CustomMultiLevelRoute<K extends CustomFirstLevelRouteNotSingleKey = CustomFirstLevelRouteNotSingleKey> =
|
||||
K extends string
|
||||
? ElegantConstRoute & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
component: `layout.${RouteLayout}`;
|
||||
children: (CustomCenterLevelRoute<GetChildRouteKey<K>> | CustomLastLevelRoute<GetChildRouteKey<K>>)[];
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the custom route
|
||||
*/
|
||||
type CustomRoute = CustomSingleLevelRoute | CustomMultiLevelRoute;
|
||||
|
||||
/**
|
||||
* the generated route
|
||||
*/
|
||||
type GeneratedRoute = SingleLevelRoute | MultiLevelRoute;
|
||||
|
||||
/**
|
||||
* the elegant route
|
||||
*/
|
||||
type ElegantRoute = GeneratedRoute | CustomRoute;
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
export {};
|
||||
|
||||
declare global {
|
||||
export interface Window {
|
||||
/** NProgress instance */
|
||||
NProgress?: import('nprogress').NProgress;
|
||||
/** Loading bar instance */
|
||||
$loadingBar?: import('naive-ui').LoadingBarProviderInst;
|
||||
/** Dialog instance */
|
||||
$dialog?: import('naive-ui').DialogProviderInst;
|
||||
/** Message instance */
|
||||
$message?: import('naive-ui').MessageProviderInst;
|
||||
/** Notification instance */
|
||||
$notification?: import('naive-ui').NotificationProviderInst;
|
||||
}
|
||||
|
||||
/** Build time of the project */
|
||||
export const BUILD_TIME: string;
|
||||
}
|
||||
@@ -0,0 +1,688 @@
|
||||
// ===================== 数据模型与 Mock 数据 =====================
|
||||
|
||||
export type RoleId = "applicant" | "process" | "process2" | "safety" | "quality" | "dept" | "vp" | "admin" | "viewer";
|
||||
|
||||
export interface Role {
|
||||
id: RoleId;
|
||||
name: string;
|
||||
person: string;
|
||||
org: string;
|
||||
desc: string;
|
||||
}
|
||||
|
||||
export const ROLES: Role[] = [
|
||||
{ id: "applicant", name: "申请人", person: "张工艺", org: "一车间 · 工艺组", desc: "发起变更申请、AI 辅助判定、跟踪进度" },
|
||||
{ id: "process", name: "专业会签(仪表)", person: "王仪表", org: "技术部 · 仪表科", desc: "专业会签、HAZOP 分析、确认连带变更" },
|
||||
{ id: "process2", name: "专业会签(设备)", person: "周设备", org: "设备管理部 · 设备科", desc: "专业会签、设备完整性检查、行动项落实" },
|
||||
{ id: "safety", name: "安全工程师", person: "王海燕", org: "安全环保部", desc: "安全审查、PSSR 检查表确认、风险分析组织" },
|
||||
{ id: "dept", name: "车间主任", person: "李主任", org: "一车间", desc: "部门审核、现场验收、变更关闭确认" },
|
||||
{ id: "vp", name: "分管领导", person: "刘副总", org: "公司领导", desc: "重要变更最终批准、移动端审批" },
|
||||
{ id: "admin", name: "系统管理员", person: "刘敏", org: "信息化部", desc: "流程配置、字典维护、权限分配" },
|
||||
{ id: "quality", name: "质量工程师", person: "陈质量", org: "质量部", desc: "质量会签、产品合格判定、检验方案确认" },
|
||||
{ id: "viewer", name: "非审批人员", person: "吴新", org: "相关部门", desc: "以信息查看为主,不参与变更流程" },
|
||||
];
|
||||
|
||||
export type ChangeType = "工艺" | "设备" | "管理";
|
||||
export type ChangeLevel = "重要" | "一般";
|
||||
export type ChangeStatus =
|
||||
| "审批中"
|
||||
| "已批准"
|
||||
| "实施中"
|
||||
| "待PSSR"
|
||||
| "待验收"
|
||||
| "待关闭"
|
||||
| "已关闭";
|
||||
|
||||
export interface FlowNode {
|
||||
name: string;
|
||||
kind: "审批" | "会签" | "最终批准";
|
||||
roles: RoleId[];
|
||||
members?: { name: string; done: boolean }[];
|
||||
status: "done" | "current" | "todo";
|
||||
locked?: boolean;
|
||||
}
|
||||
|
||||
export interface ChangeOrder {
|
||||
id: string;
|
||||
title: string;
|
||||
type: ChangeType;
|
||||
level: ChangeLevel;
|
||||
duration: "永久" | "临时";
|
||||
urgent: boolean;
|
||||
status: ChangeStatus;
|
||||
applicant: string;
|
||||
org: string;
|
||||
device: string;
|
||||
date: string;
|
||||
purpose: string;
|
||||
effect: string;
|
||||
before: string;
|
||||
after: string;
|
||||
related: string[];
|
||||
materials: string[];
|
||||
riskTools: string[];
|
||||
flow: FlowNode[];
|
||||
overdueDays?: number;
|
||||
}
|
||||
|
||||
export const FLOW_IMPORTANT: FlowNode[] = [
|
||||
{ name: "部门审核", kind: "审批", roles: ["dept"], status: "done" },
|
||||
{
|
||||
name: "专业会签",
|
||||
kind: "会签",
|
||||
roles: ["process", "process2", "quality"],
|
||||
status: "current",
|
||||
members: [
|
||||
{ name: "王仪表(仪表)", done: true },
|
||||
{ name: "周设备(设备)", done: false },
|
||||
{ name: "陈质量(质量)", done: false },
|
||||
],
|
||||
},
|
||||
{ name: "安全审查", kind: "审批", roles: ["safety"], status: "todo", locked: true },
|
||||
{ name: "分管领导最终批准", kind: "最终批准", roles: ["vp"], status: "todo", locked: true },
|
||||
];
|
||||
|
||||
export const FLOW_SIMPLE: FlowNode[] = [
|
||||
{ name: "部门审核", kind: "审批", roles: ["dept"], status: "done" },
|
||||
{ name: "专业审批", kind: "审批", roles: ["process"], status: "current" },
|
||||
{ name: "部门负责人批准", kind: "最终批准", roles: ["dept"], status: "todo", locked: true },
|
||||
];
|
||||
|
||||
export const CHANGES: ChangeOrder[] = [
|
||||
{
|
||||
id: "MOC-2026-R01-0035",
|
||||
title: "R-201 反应釜搅拌器电机更换(55kW→75kW 防爆电机)",
|
||||
type: "设备",
|
||||
level: "重要",
|
||||
duration: "永久",
|
||||
urgent: false,
|
||||
status: "审批中",
|
||||
applicant: "张工艺",
|
||||
org: "一车间 · 工艺组",
|
||||
device: "R-201 反应釜 / M-201A 搅拌电机",
|
||||
date: "2026-07-28",
|
||||
purpose: "原 55kW 电机在高粘度工况下频繁过载跳闸,影响反应均匀性与产品质量,需更换为 75kW 防爆电机。",
|
||||
effect: "消除过载跳闸(月均 3 次降至 0),搅拌电流裕量提升至 25%,产品批次合格率预计提升 1.5%。",
|
||||
before: "M-201A 搅拌电机:55kW,ExdⅡBT4,额定电流 102A,原设计工况粘度 ≤3000cP。",
|
||||
after: "更换为 75kW 防爆电机:ExdⅡCT4,额定电流 138A,适配粘度 ≤6000cP;电缆与开关容量同步校核升级。",
|
||||
related: ["更新 P&ID(图号 PID-R201-03)", "修订电气图纸与电缆清册", "校核联锁跳车电流设定", "更新设备台账与备件清单", "操作人员培训"],
|
||||
materials: ["设备数据表", "防爆合格证与材质证明", "电气负荷校核计算书", "更新后的 P&ID", "制造商安装维护手册"],
|
||||
riskTools: ["AI 分析", "JSA", "检查表法"],
|
||||
flow: FLOW_IMPORTANT,
|
||||
},
|
||||
{
|
||||
id: "MOC-2026-R01-0036",
|
||||
title: "聚合反应温度控制上限调整(78℃→82℃)",
|
||||
type: "工艺",
|
||||
level: "重要",
|
||||
duration: "永久",
|
||||
urgent: false,
|
||||
status: "审批中",
|
||||
applicant: "孙丽",
|
||||
org: "一车间 · 工艺组",
|
||||
device: "R-101 聚合釜 / TIC-101",
|
||||
date: "2026-07-25",
|
||||
purpose: "提高反应温度上限以缩短聚合时间、提升装置产能,满足新增订单需求。",
|
||||
effect: "单釜反应周期缩短约 40 分钟,年产能预计提升 8%。",
|
||||
before: "聚合反应温度控制范围 65–78℃,TIC-101 高报 78℃、联锁 80℃。",
|
||||
after: "控制范围调整为 65–82℃,TIC-101 高报 82℃、联锁值维持 85℃ 安全边界不变。",
|
||||
related: ["修订工艺卡片与操作规程", "DCS 参数与报警值修改", "更新 HAZOP 分析报告", "岗位人员再培训"],
|
||||
materials: ["工艺计算书", "热平衡与飞温风险分析", "HAZOP 分析报告", "更新后的工艺卡片"],
|
||||
riskTools: ["AI 分析", "HAZOP"],
|
||||
flow: [
|
||||
{ name: "部门审核", kind: "审批", roles: ["dept"], status: "done" },
|
||||
{
|
||||
name: "专业会签",
|
||||
kind: "会签",
|
||||
roles: ["process", "quality"],
|
||||
status: "done",
|
||||
members: [
|
||||
{ name: "王仪表(仪表)", done: true },
|
||||
{ name: "陈质量(质量)", done: true },
|
||||
],
|
||||
},
|
||||
{ name: "安全审查", kind: "审批", roles: ["safety"], status: "current", locked: true },
|
||||
{ name: "分管领导最终批准", kind: "最终批准", roles: ["vp"], status: "todo", locked: true },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "MOC-2026-R02-0038",
|
||||
title: "DCS 罐区液位报警值 LIA-301 调整",
|
||||
type: "工艺",
|
||||
level: "一般",
|
||||
duration: "永久",
|
||||
urgent: false,
|
||||
status: "待PSSR",
|
||||
applicant: "吴强",
|
||||
org: "一车间 · 罐区",
|
||||
device: "V-301 储罐 / LIA-301",
|
||||
date: "2026-07-20",
|
||||
purpose: "原高报值偏保守,频繁误报导致操作疲劳,按最新容积表校准报警值。",
|
||||
effect: "误报次数由每周 5 次降至 0,报警响应有效性提升。",
|
||||
before: "LIA-301 高报 80%(对应 7.2m)。",
|
||||
after: "高报调整为 85%(对应 7.65m),联锁值 90% 不变。",
|
||||
related: ["DCS 组态修改", "更新报警台账", "岗位告知培训"],
|
||||
materials: ["储罐容积表", "DCS 组态修改记录", "报警台账"],
|
||||
riskTools: ["AI 分析", "检查表法"],
|
||||
flow: FLOW_SIMPLE.map((n) => ({ ...n, status: "done" as const })),
|
||||
},
|
||||
{
|
||||
id: "MOC-2026-R01-0039",
|
||||
title: "紧急变更:V-102 安全阀起跳压力临时调整(补办手续)",
|
||||
type: "设备",
|
||||
level: "一般",
|
||||
duration: "临时",
|
||||
urgent: true,
|
||||
status: "待关闭",
|
||||
applicant: "张工艺",
|
||||
org: "一车间 · 工艺组",
|
||||
device: "V-102 缓冲罐 / PSV-102",
|
||||
date: "2026-07-15",
|
||||
purpose: "上游工况波动导致安全阀频繁起跳,经紧急批准临时调整起跳压力并限期恢复原设定。",
|
||||
effect: "装置维持连续运行,临时期限内风险受控。",
|
||||
before: "PSV-102 起跳压力 0.8MPa。",
|
||||
after: "临时调整为 0.88MPa(不超过设计压力 1.0MPa 的 90%),期限 30 天,到期恢复 0.8MPa。",
|
||||
related: ["恢复性检查", "更新安全阀台账", "事后风险分析补办"],
|
||||
materials: ["安全阀校验报告", "紧急变更审批单", "事后 JSA 分析"],
|
||||
riskTools: ["AI 分析", "JSA"],
|
||||
flow: FLOW_SIMPLE.map((n) => ({ ...n, status: "done" as const })),
|
||||
overdueDays: 4,
|
||||
},
|
||||
{
|
||||
id: "MOC-2026-R03-0040",
|
||||
title: "原料环己烷供应商变更(新增 B 供应商)",
|
||||
type: "管理",
|
||||
level: "重要",
|
||||
duration: "永久",
|
||||
urgent: false,
|
||||
status: "实施中",
|
||||
applicant: "刘芳",
|
||||
org: "供应部",
|
||||
device: "原料罐区 / TK-201",
|
||||
date: "2026-07-18",
|
||||
purpose: "引入第二供应商保障原料供应安全,降低单一来源断供风险。",
|
||||
effect: "供应保障能力提升,采购成本预计下降 3%。",
|
||||
before: "环己烷单一供应商 A,纯度 ≥99.5%。",
|
||||
after: "新增供应商 B(纯度 ≥99.8%,已提供 MSDS 与质检报告),双源供应。",
|
||||
related: ["更新合格供应商名录", "修订进厂检验规程", "更新 MSDS 档案", "卸料操作培训"],
|
||||
materials: ["新供应商资质文件", "产品质检报告与 MSDS", "进厂检验规程"],
|
||||
riskTools: ["AI 分析", "检查表法"],
|
||||
flow: FLOW_IMPORTANT.map((n) => ({ ...n, status: "done" as const })),
|
||||
},
|
||||
{
|
||||
id: "MOC-2026-R01-0029",
|
||||
title: "操作规程修订(夏季工况)",
|
||||
type: "管理",
|
||||
level: "一般",
|
||||
duration: "临时",
|
||||
urgent: false,
|
||||
status: "审批中",
|
||||
applicant: "张工艺",
|
||||
org: "一车间 · 工艺组",
|
||||
device: "全装置",
|
||||
date: "2026-06-20",
|
||||
purpose: "夏季高温工况下循环水温度升高,原操作规程冷却参数不适用,需修订夏季操作参数与巡检频次。",
|
||||
effect: "夏季工况下装置运行参数受控,避免超温降负荷,预计减少非计划降量 2 次/年。",
|
||||
before: "操作规程(2025 版)未区分冬夏季工况,冷却参数单一。",
|
||||
after: "增加夏季工况章节:循环水温度 >28℃ 时启用备用冷却塔,巡检频次由 4h 调整为 2h。",
|
||||
related: ["操作规程升版发布", "岗位人员培训"],
|
||||
materials: ["修订后操作规程", "参数核算表"],
|
||||
riskTools: ["AI 分析", "检查表法"],
|
||||
flow: [
|
||||
{ name: "部门审核", kind: "审批", roles: ["dept"], status: "current" },
|
||||
{ name: "专业审批", kind: "审批", roles: ["process"], status: "todo", locked: true },
|
||||
{ name: "部门负责人批准", kind: "最终批准", roles: ["dept"], status: "todo", locked: true },
|
||||
],
|
||||
overdueDays: 3,
|
||||
},
|
||||
{
|
||||
id: "MOC-2026-R02-0041",
|
||||
title: "公用工程氮气减压阀组改造",
|
||||
type: "设备",
|
||||
level: "一般",
|
||||
duration: "永久",
|
||||
urgent: false,
|
||||
status: "审批中",
|
||||
applicant: "周涛",
|
||||
org: "公用工程车间",
|
||||
device: "氮气总管 / PV-208 减压阀组",
|
||||
date: "2026-07-29",
|
||||
purpose: "氮气减压阀组单路运行,检修时需停氮气,影响装置密封气供应,需改造为双路并联。",
|
||||
effect: "减压阀组可在线切换检修,氮气供应连续性提升至 100%。",
|
||||
before: "PV-208 单路减压,无备用回路。",
|
||||
after: "新增并联减压回路 PV-208B,双路一用一备,可在线切换。",
|
||||
related: ["更新 P&ID", "修订氮气系统操作规程", "更新设备台账"],
|
||||
materials: ["阀门数据表", "管道单线图", "施工方案"],
|
||||
riskTools: ["AI 分析", "JSA"],
|
||||
flow: [
|
||||
{ name: "部门审核", kind: "审批", roles: ["dept"], status: "done" },
|
||||
{ name: "专业审批", kind: "审批", roles: ["process"], status: "current" },
|
||||
{ name: "部门负责人批准", kind: "最终批准", roles: ["dept"], status: "todo", locked: true },
|
||||
],
|
||||
overdueDays: 3,
|
||||
},
|
||||
{
|
||||
id: "MOC-2026-R03-0042",
|
||||
title: "三车间自动化和安全隐患整改项目变更",
|
||||
type: "管理",
|
||||
level: "重要",
|
||||
duration: "永久",
|
||||
urgent: false,
|
||||
status: "审批中",
|
||||
applicant: "刘芳",
|
||||
org: "三车间",
|
||||
device: "三车间装置区",
|
||||
date: "2026-07-31",
|
||||
purpose: "落实安全隐患整改要求,对三车间自动化控制系统升级改造,消除加料互串与超温隐患。",
|
||||
effect: "隐患整改闭环率 100%,自动化水平提升,误操作风险显著降低。",
|
||||
before: "加料系统手动控制,存在互串与超温隐患(隐患编号 YH-2026-017)。",
|
||||
after: "改为 DCS 自动控制 + 加料顺序联锁,增设独立超温切断。",
|
||||
related: ["修订操作规程", "DCS 组态修改", "更新 HAZOP 分析", "岗位再培训"],
|
||||
materials: ["隐患整改方案", "HAZOP 分析报告", "联锁因果表"],
|
||||
riskTools: ["AI 分析", "HAZOP"],
|
||||
flow: [
|
||||
{ name: "部门审核", kind: "审批", roles: ["dept"], status: "done" },
|
||||
{
|
||||
name: "专业会签",
|
||||
kind: "会签",
|
||||
roles: ["process", "process2", "quality"],
|
||||
status: "done",
|
||||
members: [
|
||||
{ name: "王仪表(仪表)", done: true },
|
||||
{ name: "周设备(设备)", done: true },
|
||||
{ name: "陈质量(质量)", done: true },
|
||||
],
|
||||
},
|
||||
{ name: "安全审查", kind: "审批", roles: ["safety"], status: "done" },
|
||||
{ name: "分管领导最终批准", kind: "最终批准", roles: ["vp"], status: "current" },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
// ===================== PSSR / 验收 =====================
|
||||
export interface PssrItem {
|
||||
id: number;
|
||||
category: string;
|
||||
content: string;
|
||||
owner: string;
|
||||
status: "待确认" | "已确认" | "不适用" | "整改中";
|
||||
photo?: boolean;
|
||||
/** 完成时点:投用前(未完成禁止投用)/ 关闭前(未完成禁止关闭) */
|
||||
phase?: "投用前" | "关闭前";
|
||||
}
|
||||
|
||||
export const PSSR_ITEMS: PssrItem[] = [
|
||||
{ id: 1, category: "设备完整性", content: "搅拌电机安装就位,联轴器对中合格,地脚螺栓紧固", owner: "周设备", status: "已确认", photo: true, phase: "投用前" },
|
||||
{ id: 2, category: "设备完整性", content: "电机空载/负载试车合格,轴承温度、振动值在正常范围", owner: "周设备", status: "已确认", photo: true, phase: "投用前" },
|
||||
{ id: 3, category: "仪表联锁", content: "电机过载保护定值按 75kW 重新整定并传动试验合格", owner: "王仪表", status: "待确认", phase: "投用前" },
|
||||
{ id: 4, category: "图纸规程", content: "P&ID(PID-R201-03)与电气图纸已更新发布", owner: "王仪表", status: "已确认", phase: "关闭前" },
|
||||
{ id: 5, category: "人员培训", content: "相关岗位 12 人完成新设备操作培训并考核合格", owner: "李主任", status: "待确认", phase: "投用前" },
|
||||
{ id: 6, category: "应急消防", content: "现场消防器材完好,应急通道畅通", owner: "王海燕", status: "待确认", phase: "投用前" },
|
||||
{ id: 7, category: "施工确认", content: "施工遗留物清理完毕,临时用电已拆除", owner: "周设备", status: "整改中", phase: "投用前" },
|
||||
];
|
||||
|
||||
export const ACCEPT_ITEMS: PssrItem[] = [
|
||||
{ id: 1, category: "一致性", content: "实施结果与批准的变更内容一致(电机型号、参数符合批准方案)", owner: "李主任", status: "待确认" },
|
||||
{ id: 2, category: "连带变更", content: "5 项连带变更全部完成(图纸、台账、联锁、备件、培训)", owner: "李主任", status: "待确认" },
|
||||
{ id: 3, category: "资料更新", content: "P&ID、电气图纸、设备台账已归档最新版本", owner: "王仪表", status: "待确认" },
|
||||
{ id: 4, category: "运行验证", content: "连续运行 72 小时无异常,搅拌电流稳定在 118A±5%", owner: "张工艺", status: "待确认" },
|
||||
];
|
||||
|
||||
// ===================== 关闭校验 =====================
|
||||
export interface ClosureCheck {
|
||||
item: string;
|
||||
done: boolean;
|
||||
note?: string;
|
||||
}
|
||||
export const CLOSURE_CHECKS: ClosureCheck[] = [
|
||||
{ item: "变更验收完成(结论:基本达到 · 遗留项 2 项已登记跟踪)", done: true },
|
||||
{ item: "资料上传齐全(验收报告、运行记录、恢复确认记录)", done: false, note: "缺:更新后的安全阀台账" },
|
||||
{ item: "行动项全部关闭(4/4,含「关闭前完成」标记项)", done: true },
|
||||
{ item: "受控文件已更新至生效版(P&ID Rev.4、操作规程)", done: false, note: "安全阀台账待更新发布" },
|
||||
{ item: "培训考核完成(12/12 人),签到与成绩已归档", done: true },
|
||||
];
|
||||
|
||||
// ===================== 风险分析 =====================
|
||||
export const HAZOP_ROWS = [
|
||||
{ node: "R-101 聚合釜", guide: "过高(温度)", dev: "反应温度超过 82℃", cause: "冷却水中断;TIC-101 故障;进料配比失调", cons: "飞温、冲料、超压破裂", l: 2, s: 5, measures: "增设独立高温联锁;冷却水低流量报警;HAZOP 建议 2 项已落实" },
|
||||
{ node: "R-101 聚合釜", guide: "过低(温度)", dev: "温度低于 65℃", cause: "引发剂不足;夹套加热故障", cons: "反应中止、物料积压,恢复时剧烈反应", l: 3, s: 3, measures: "低温度报警;恢复升温操作程序" },
|
||||
{ node: "进料系统", guide: "无(流量)", dev: "单体进料中断", cause: "进料泵故障;过滤器堵塞", cons: "釜内配比失衡,产品质量事故", l: 2, s: 3, measures: "泵一用一备;压差报警" },
|
||||
{ node: "进料系统", guide: "反向", dev: "物料反向流动", cause: "停泵时止回阀失效", cons: "串料污染、计量错误", l: 2, s: 2, measures: "止回阀定期校验(检查表项)" },
|
||||
];
|
||||
|
||||
export const JSA_ROWS = [
|
||||
{ step: "1. 停机断电隔离", hazard: "残余电能、机械能意外释放", measure: "执行上锁挂牌(LOTO),验电确认", owner: "周设备" },
|
||||
{ step: "2. 拆卸旧电机", hazard: "吊装伤害、挤压", measure: "持证起重工指挥,吊具检查,警戒区隔离", owner: "吊装班" },
|
||||
{ step: "3. 新电机安装对中", hazard: "对中误差导致振动超标", measure: "激光对中仪,偏差 ≤0.05mm", owner: "周设备" },
|
||||
{ step: "4. 接线与送电", hazard: "触电、相序错误反转", measure: "双人复核相序,点动确认转向", owner: "电气班" },
|
||||
{ step: "5. 试车", hazard: "机械伤害、异常振动", measure: "空载→负载分级试车,振动在线监测", owner: "周设备" },
|
||||
];
|
||||
|
||||
export const SCL_ROWS = [
|
||||
{ item: "新电机防爆等级不低于区域要求(ExdⅡCT4)", std: "GB 50058", result: "符合" },
|
||||
{ item: "电缆载流量与开关容量匹配 75kW 负荷", std: "GB 50217", result: "符合" },
|
||||
{ item: "电机接地电阻 ≤4Ω", std: "GB 50169", result: "符合" },
|
||||
{ item: "防护罩、联轴器护罩安装齐全", std: "企业设备规程", result: "整改后符合" },
|
||||
{ item: "润滑油牌号与加注量符合制造商要求", std: "制造商手册", result: "符合" },
|
||||
];
|
||||
|
||||
// ===================== 资料库 =====================
|
||||
export const KNOWLEDGE_DOCS = [
|
||||
{ name: "PID-R201-03 反应釜工艺流程图(Rev C)", cat: "工艺技术资料", device: "一车间", ver: "Rev C", date: "2026-07-29" },
|
||||
{ name: "聚合岗位操作规程(2026 版)", cat: "工艺技术资料", device: "一车间", ver: "V2026", date: "2026-07-26" },
|
||||
{ name: "M-201A 搅拌电机设备台账", cat: "设备资料", device: "一车间", ver: "V3.2", date: "2026-07-28" },
|
||||
{ name: "环己烷 MSDS(供应商 B)", cat: "化学品资料", device: "原料罐区", ver: "V1.0", date: "2026-07-18" },
|
||||
{ name: "AQ/T 3034 化工企业工艺安全管理实施导则", cat: "法规标准库", device: "全厂", ver: "2013 版", date: "2025-12-01" },
|
||||
{ name: "PSSR 检查表模板(设备类)", cat: "检查表模板库", device: "全厂", ver: "V2.1", date: "2026-05-10" },
|
||||
{ name: "2025 年度典型变更案例汇编", cat: "历史变更案例库", device: "全厂", ver: "2025 版", date: "2026-01-15" },
|
||||
{ name: "HAZOP 分析报告(R-101 温度变更)", cat: "历史变更案例库", device: "一车间", ver: "V1.0", date: "2026-07-26" },
|
||||
];
|
||||
|
||||
// ===================== 报表数据 =====================
|
||||
export const MONTHLY_COUNTS = [
|
||||
{ m: "2月", count: 4 }, { m: "3月", count: 6 }, { m: "4月", count: 5 },
|
||||
{ m: "5月", count: 8 }, { m: "6月", count: 7 }, { m: "7月", count: 9 },
|
||||
];
|
||||
export const TYPE_DIST = [
|
||||
{ name: "工艺", value: 16 }, { name: "设备", value: 14 }, { name: "管理", value: 9 },
|
||||
];
|
||||
export const CYCLE_TREND = [
|
||||
{ m: "2月", days: 12.5 }, { m: "3月", days: 11.2 }, { m: "4月", days: 10.8 },
|
||||
{ m: "5月", days: 9.6 }, { m: "6月", days: 8.9 }, { m: "7月", days: 8.2 },
|
||||
];
|
||||
export const OVERDUE_LIST = [
|
||||
{ id: "MOC-2026-R01-0039", title: "V-102 安全阀起跳压力临时调整", stage: "待关闭", days: 4 },
|
||||
{ id: "MOC-2026-R02-0031", title: "冷冻盐水泵 P-103 叶轮材质变更", stage: "待验收", days: 7 },
|
||||
{ id: "MOC-2026-R01-0029", title: "操作规程修订(夏季工况)", stage: "审批中", days: 3 },
|
||||
];
|
||||
|
||||
// 状态色阶梯:全站状态标签唯一来源(工作台 / 台账 / 我的任务 / 审批中心共用),
|
||||
// 色相全部取自品牌色板——amber=进行中提醒,品牌蓝=审批通过/执行,violet=投用前检查,emerald=验收/完成(浅→深递进),品牌红=待关闭关闸提醒
|
||||
export const STATUS_COLOR: Record<ChangeStatus, string> = {
|
||||
审批中: "bg-amber-100 text-amber-700 border-amber-200",
|
||||
已批准: "bg-[#DFE9F6] text-[#17407F] border-[#ACC6E5]",
|
||||
实施中: "bg-[#1D4E9C]/10 text-[#1D4E9C] border-[#1D4E9C]/30",
|
||||
待PSSR: "bg-violet-100 text-violet-700 border-violet-200",
|
||||
待验收: "bg-emerald-50 text-emerald-600 border-emerald-200",
|
||||
待关闭: "bg-[#E15555]/10 text-[#E15555] border-[#E15555]/30",
|
||||
已关闭: "bg-emerald-100 text-emerald-700 border-emerald-200",
|
||||
};
|
||||
|
||||
export const LEVEL_COLOR: Record<ChangeLevel, string> = {
|
||||
重要: "bg-red-100 text-red-700 border-red-200",
|
||||
一般: "bg-slate-100 text-slate-600 border-slate-200",
|
||||
};
|
||||
|
||||
// ===================== 变更台账 =====================
|
||||
export interface LedgerRow {
|
||||
id: string;
|
||||
changeId?: string; // 关联 CHANGES,可打开完整详情
|
||||
title: string;
|
||||
type: ChangeType;
|
||||
level: ChangeLevel;
|
||||
duration: "永久" | "临时";
|
||||
urgent?: boolean;
|
||||
applyTime: string; // 申请时间
|
||||
dept: string; // 申请部门
|
||||
applicant: string; // 申请人
|
||||
planUse: string; // 计划投用时间
|
||||
status: ChangeStatus;
|
||||
statusDetail: string; // 当前环节说明
|
||||
statusTime: string; // 状态更新时间
|
||||
overdueDays?: number;
|
||||
approveTime?: string; // 审批通过时间
|
||||
useTime?: string; // 实际投用时间
|
||||
handlers: { name: string; done: boolean }[]; // 接班人(当前待办/已办)
|
||||
}
|
||||
|
||||
export const LEDGER_ROWS: LedgerRow[] = [
|
||||
{ id: "MOC-2026-R01-0035", changeId: "MOC-2026-R01-0035", title: "R-201 反应釜搅拌器电机更换(55kW→75kW 防爆电机)", type: "设备", level: "重要", duration: "永久", applyTime: "2026-07-28 09:12", dept: "一车间", applicant: "张工艺", planUse: "2026-08-10", status: "审批中", statusDetail: "专业会签中(周设备、王仪表待签)", statusTime: "2026-07-30 14:20", handlers: [{ name: "王仪表", done: true }, { name: "周设备", done: false }, { name: "王仪表", done: false }] },
|
||||
{ id: "MOC-2026-R01-0036", changeId: "MOC-2026-R01-0036", title: "聚合反应温度控制上限调整(78℃→82℃)", type: "工艺", level: "重要", duration: "永久", applyTime: "2026-07-25 10:05", dept: "一车间", applicant: "孙丽", planUse: "2026-08-05", status: "审批中", statusDetail: "安全审查(王海燕)", statusTime: "2026-07-29 16:40", handlers: [{ name: "王海燕", done: false }] },
|
||||
{ id: "MOC-2026-R02-0038", changeId: "MOC-2026-R02-0038", title: "DCS 罐区液位报警值 LIA-301 调整", type: "工艺", level: "一般", duration: "永久", applyTime: "2026-07-20 08:30", dept: "一车间", applicant: "吴强", planUse: "2026-07-31", status: "待PSSR", statusDetail: "培训 / PSSR 资料已传 · 待确认投用", statusTime: "2026-07-27 11:15", approveTime: "2026-07-26 16:40", handlers: [{ name: "吴强", done: false }] },
|
||||
{ id: "MOC-2026-R01-0039", changeId: "MOC-2026-R01-0039", title: "V-102 安全阀起跳压力临时调整(紧急补办)", type: "设备", level: "一般", duration: "临时", urgent: true, applyTime: "2026-07-15 19:40", dept: "一车间", applicant: "张工艺", planUse: "2026-07-16(已投用)", status: "待关闭", statusDetail: "待关闭确认(资料更新核查中)", statusTime: "2026-07-27 09:02", approveTime: "2026-07-15 21:05", useTime: "2026-07-16 06:30", overdueDays: 4, handlers: [{ name: "李主任", done: false }] },
|
||||
{ id: "MOC-2026-R03-0040", changeId: "MOC-2026-R03-0040", title: "原料环己烷供应商变更(新增 B 供应商)", type: "管理", level: "重要", duration: "永久", applyTime: "2026-07-18 14:22", dept: "供应部", applicant: "刘芳", planUse: "2026-08-01", status: "实施中", statusDetail: "实施准备中 · 培训 / PSSR 资料待上传", statusTime: "2026-07-26 10:30", handlers: [{ name: "刘芳", done: false }] },
|
||||
{ id: "MOC-2026-R02-0031", title: "冷冻盐水泵 P-103 叶轮材质变更", type: "设备", level: "一般", duration: "永久", applyTime: "2026-06-28 09:50", dept: "二车间", applicant: "周涛", planUse: "2026-07-15", status: "待验收", statusDetail: "变更验收(72h 运行验证)", statusTime: "2026-07-24 15:44", overdueDays: 7, handlers: [{ name: "李主任", done: false }] },
|
||||
{ id: "MOC-2026-R01-0029", title: "操作规程修订(夏季工况)", type: "管理", level: "一般", duration: "临时", applyTime: "2026-06-20 11:26", dept: "一车间", applicant: "张工艺", planUse: "2026-07-01", status: "审批中", statusDetail: "部门审核(李主任)", statusTime: "2026-06-21 08:40", handlers: [{ name: "李主任", done: false }] },
|
||||
{ id: "MOC-2026-R02-0033", title: "包装线贴标机控制程序升级", type: "设备", level: "一般", duration: "永久", applyTime: "2026-07-08 13:35", dept: "二车间", applicant: "吴强", planUse: "2026-08-02", status: "已批准", statusDetail: "待实施(计划 8 月 2 日投用)", statusTime: "2026-07-22 09:12", handlers: [{ name: "周设备", done: false }] },
|
||||
{ id: "MOC-2026-R03-0027", title: "化验室通风橱整体更换", type: "设备", level: "一般", duration: "永久", applyTime: "2026-06-12 15:10", dept: "质量部", applicant: "陈静", planUse: "2026-06-25", status: "已关闭", statusDetail: "关闭确认完成,已归档", statusTime: "2026-07-02 10:18", handlers: [{ name: "钱峰", done: true }] },
|
||||
{ id: "MOC-2026-R01-0024", title: "氮气管网压力分级调整", type: "工艺", level: "重要", duration: "永久", applyTime: "2026-05-30 09:00", dept: "一车间", applicant: "孙丽", planUse: "2026-06-20", status: "已关闭", statusDetail: "关闭确认完成,已归档", statusTime: "2026-06-28 16:30", handlers: [{ name: "李主任", done: true }, { name: "刘副总", done: true }] },
|
||||
];
|
||||
|
||||
// 演示数据:执行阶段变更的培训签到表 / PSSR 签字版上传状态(上传即视为完成确认并随单归档,系统不做内容识别)
|
||||
export const PSSR_UPLOADS: Record<string, { train?: string; pssr?: string }> = {
|
||||
"MOC-2026-R02-0038": { train: "培训签到表-照片.jpg", pssr: "PSSR 检查确认表-签字版.pdf" },
|
||||
"MOC-2026-R02-0031": { train: "培训签到表-照片.jpg", pssr: "PSSR 检查确认表-签字版.pdf" },
|
||||
"MOC-2026-R03-0027": { train: "培训签到表-归档.pdf", pssr: "PSSR 检查确认表-归档版.pdf" },
|
||||
"MOC-2026-R01-0024": { train: "培训签到表-归档.pdf", pssr: "PSSR 检查确认表-归档版.pdf" },
|
||||
};
|
||||
|
||||
// ===================== 演示用轻量全局状态(提交 / 审批真实推进,全站联动) =====================
|
||||
type DemoListener = () => void;
|
||||
const demoListeners = new Set<DemoListener>();
|
||||
export function subscribeDemo(fn: DemoListener) {
|
||||
demoListeners.add(fn);
|
||||
return () => { demoListeners.delete(fn); };
|
||||
}
|
||||
function emitDemo() { demoListeners.forEach((f) => f()); }
|
||||
|
||||
// ===================== 催办记录(车间主任催办 → 申请人操作台实时提示,全站同源) =====================
|
||||
export interface UrgeRecord { id: string; changeId: string; title: string; applicant: string; by: string; time: string; }
|
||||
export const URGE_RECORDS: UrgeRecord[] = [];
|
||||
let urgeSeq = 1;
|
||||
/** 车间主任催办:写入同源记录并广播,申请人操作台即时出现催办提示 */
|
||||
export function urgeChange(changeId: string, byRole: RoleId) {
|
||||
const row = LEDGER_ROWS.find((r) => r.id === changeId || r.changeId === changeId);
|
||||
const c = CHANGES.find((x) => x.id === changeId);
|
||||
const by = ROLES.find((r) => r.id === byRole)?.person ?? byRole;
|
||||
URGE_RECORDS.unshift({
|
||||
id: `URGE-${urgeSeq++}`,
|
||||
changeId,
|
||||
title: row?.title ?? c?.title ?? changeId,
|
||||
applicant: row?.applicant ?? c?.applicant ?? "",
|
||||
by,
|
||||
time: nowStr(),
|
||||
});
|
||||
emitDemo();
|
||||
}
|
||||
|
||||
let demoSeq = 43;
|
||||
export function nextChangeId() {
|
||||
return `MOC-2026-R01-${String(demoSeq++).padStart(4, "0")}`;
|
||||
}
|
||||
|
||||
function nowStr() {
|
||||
const d = new Date();
|
||||
const p = (n: number) => String(n).padStart(2, "0");
|
||||
return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}`;
|
||||
}
|
||||
|
||||
/** 申请页提交:生成真实变更单,台账 / 审批中心 / 我的任务 / 角标联动 */
|
||||
export function submitChange(c: ChangeOrder) {
|
||||
CHANGES.unshift(c);
|
||||
const cur = c.flow.find((n) => n.status === "current");
|
||||
LEDGER_ROWS.unshift({
|
||||
id: c.id,
|
||||
changeId: c.id,
|
||||
title: c.title,
|
||||
type: c.type,
|
||||
level: c.level,
|
||||
duration: c.duration,
|
||||
urgent: c.urgent || undefined,
|
||||
applyTime: nowStr(),
|
||||
dept: c.org.split("·")[0].trim(),
|
||||
applicant: c.applicant,
|
||||
planUse: c.date || "待定",
|
||||
status: c.status,
|
||||
statusDetail: cur ? `${cur.name}(待处理)` : "审批中",
|
||||
statusTime: nowStr(),
|
||||
handlers: (cur?.roles ?? []).map((rid) => ({ name: ROLES.find((r) => r.id === rid)?.person ?? rid, done: false })),
|
||||
});
|
||||
emitDemo();
|
||||
}
|
||||
|
||||
/** 详情页同意:真实推进流程节点(会签按人标记,全签通过才流转;末节点后进入待PSSR) */
|
||||
export function advanceFlow(id: string, role: RoleId) {
|
||||
const c = CHANGES.find((x) => x.id === id);
|
||||
if (!c) return;
|
||||
const idx = c.flow.findIndex((n) => n.status === "current");
|
||||
if (idx < 0) return;
|
||||
const node = c.flow[idx];
|
||||
if (node.kind === "会签" && node.members) {
|
||||
const person = ROLES.find((r) => r.id === role)?.person;
|
||||
const m = node.members.find((x) => x.name.startsWith(person ?? ""));
|
||||
if (m) m.done = true;
|
||||
if (!node.members.every((x) => x.done)) { emitDemo(); return; }
|
||||
}
|
||||
node.status = "done";
|
||||
const next = c.flow[idx + 1];
|
||||
if (next) {
|
||||
next.status = "current";
|
||||
next.locked = false;
|
||||
} else {
|
||||
c.status = "待PSSR";
|
||||
}
|
||||
const row = LEDGER_ROWS.find((r) => r.changeId === id || r.id === id);
|
||||
if (row) {
|
||||
const cur = c.flow.find((n) => n.status === "current");
|
||||
row.status = c.status;
|
||||
row.statusTime = nowStr();
|
||||
row.statusDetail = cur ? `${cur.name}(待处理)` : "审批完成,进入投用前确认";
|
||||
row.handlers = cur
|
||||
? cur.roles.map((rid) => ({ name: ROLES.find((r) => r.id === rid)?.person ?? rid, done: false }))
|
||||
: [{ name: c.applicant, done: false }];
|
||||
}
|
||||
emitDemo();
|
||||
}
|
||||
|
||||
// ===================== 延期 / 转永久子单(申请人提交 → 属地 / 安全 / 公司领导审批 → 回写原单,全站联动) =====================
|
||||
export interface SubOrder {
|
||||
id: string; // 子单号:原单号-Y1(延期)/ -Z1(转永久)
|
||||
parentId: string; // 原变更单号
|
||||
parentTitle: string;
|
||||
kind: "extend" | "permanent";
|
||||
applicant: string;
|
||||
reason: string;
|
||||
newDeadline?: string; // 延期子单:申请延期至
|
||||
status: "审批中" | "已通过" | "已驳回";
|
||||
submitTime: string;
|
||||
steps: { role: RoleId; name: string; done: boolean }[]; // 会签:全员同意即通过
|
||||
rejectNote?: string;
|
||||
}
|
||||
export const SUB_ORDERS: SubOrder[] = [];
|
||||
|
||||
/** 申请人提交延期 / 转永久子单:延期走简化审批(属地负责人 + 变更主管部门);转永久按永久变更审批链(属地 → 安全 → 公司领导) */
|
||||
export function submitSubOrder(o: { parentId: string; parentTitle: string; kind: "extend" | "permanent"; applicant: string; reason: string; newDeadline?: string }) {
|
||||
const steps: SubOrder["steps"] = o.kind === "extend"
|
||||
? [{ role: "dept", name: "李主任", done: false }, { role: "safety", name: "王海燕", done: false }]
|
||||
: [{ role: "dept", name: "李主任", done: false }, { role: "safety", name: "王海燕", done: false }, { role: "vp", name: "刘副总", done: false }];
|
||||
SUB_ORDERS.unshift({
|
||||
id: `${o.parentId}-${o.kind === "extend" ? "Y1" : "Z1"}`,
|
||||
...o,
|
||||
status: "审批中",
|
||||
submitTime: nowStr(),
|
||||
steps,
|
||||
});
|
||||
emitDemo();
|
||||
return SUB_ORDERS[0];
|
||||
}
|
||||
|
||||
/** 子单审批(同意 / 驳回):全员同意 → 已通过并回写原单;任一驳回 → 已驳回,申请人可修改后重新提交 */
|
||||
export function decideSubOrder(id: string, role: RoleId, approve: boolean, note?: string) {
|
||||
const s = SUB_ORDERS.find((x) => x.id === id);
|
||||
if (!s || s.status !== "审批中") return;
|
||||
const st = s.steps.find((x) => x.role === role);
|
||||
if (!st || st.done) return;
|
||||
st.done = true;
|
||||
if (!approve) {
|
||||
s.status = "已驳回";
|
||||
s.rejectNote = note || "";
|
||||
} else if (s.steps.every((x) => x.done)) {
|
||||
s.status = "已通过";
|
||||
}
|
||||
emitDemo();
|
||||
}
|
||||
|
||||
// ===================== 工作台 / 个人统计共享数据源(唯一口径,避免双写漂移) =====================
|
||||
/** 临时变更到期监视(申请人工作台「临时变更到期提醒情况」与个人统计报表共用同一来源) */
|
||||
export const TEMP_WATCH = [
|
||||
{ label: "正常(到期 > 7 天)", n: 1, c: "#7CC242", note: "循环水加药泵冲程临时调整 · 剩 17 天" },
|
||||
{ label: "临期(到期 ≤ 7 天)", n: 1, c: "#F5A623", note: "循环水旁滤器临时绕流运行 · 剩 6 天,已触发提醒" },
|
||||
{ label: "已超期", n: 1, c: "#E15555", note: "V-102 安全阀起跳压力临时调整 · 超期 4 天(已延期 1 次)" },
|
||||
];
|
||||
|
||||
/** 培训确认待办(工作台「待确认培训」卡片与「我的任务 · 培训确认」同源) */
|
||||
export const TRAIN_TODO = [
|
||||
{ id: "MOC-2026-R01-0035", title: "搅拌电机更换操作培训", target: "R-201 岗位操作人员(4 人)、维修班(2 人)" },
|
||||
];
|
||||
|
||||
/** 资料归档待办(工作台「待上传资料」卡片与「待我处理 · 资料关闭」同源:验收 / 归档材料补交) */
|
||||
export const DOC_TODO = [
|
||||
{ id: "MOC-2026-R02-0038", title: "DCS 罐区液位报警值 LIA-301 调整", missing: "验收报告与运行数据" },
|
||||
{ id: "MOC-2026-R01-0039", title: "紧急变更:V-102 安全阀起跳压力临时调整(补办手续)", missing: "更新后的 P&ID / 操作规程(受控最新版)、设备 / 联锁台账更新记录" },
|
||||
];
|
||||
|
||||
/** 尚未关闭变更状态分布:四段口径固定,数量从 CHANGES 实时推导(0 项也保留展示,保证口径稳定)
|
||||
* 对应三大流转阶段:① 申请提交后 / 会签中 / 审批中;② 审批通过后 → 变更关闭前(含投用、验收);③ 变更关闭 */
|
||||
export const OPEN_STAGES: { name: string; match: ChangeStatus[]; c: string }[] = [
|
||||
{ name: "审批中(含会签)", match: ["审批中"], c: "#F5A623" },
|
||||
{ name: "已批准待投用", match: ["已批准", "待PSSR", "实施中"], c: "#1D4E9C" },
|
||||
{ name: "待验收", match: ["待验收"], c: "#7CC242" },
|
||||
{ name: "待关闭", match: ["待关闭"], c: "#E15555" },
|
||||
];
|
||||
export function countOpenStatus(list: { status: ChangeStatus }[]) {
|
||||
return OPEN_STAGES.map((s) => ({ name: s.name, c: s.c, n: list.filter((x) => s.match.includes(x.status)).length }));
|
||||
}
|
||||
|
||||
// ===================== 统一待办推导(全站同源:工作台卡片 / 侧边栏角标 / 我的任务 / 审批中心) =====================
|
||||
/** 判断变更是否停在当前角色的待办节点。
|
||||
* 会签节点按成员粒度判定:已签署的成员(按角色对应人员姓名匹配)不再计入其待办。 */
|
||||
export function isPendingFor(c: ChangeOrder, role: RoleId): boolean {
|
||||
if (c.status !== "审批中") return false;
|
||||
const node = c.flow.find((n) => n.status === "current");
|
||||
if (!node) return false;
|
||||
if (node.kind === "会签" && node.members && node.members.length > 0) {
|
||||
const person = ROLES.find((r) => r.id === role)?.person;
|
||||
const me = person ? node.members.find((m) => m.name.startsWith(person)) : undefined;
|
||||
if (me) return !me.done;
|
||||
}
|
||||
return node.roles.includes(role);
|
||||
}
|
||||
|
||||
/** 当前角色的实时待审批变更列表(唯一数据源) */
|
||||
export function pendingApprovals(role: RoleId): ChangeOrder[] {
|
||||
return CHANGES.filter((c) => isPendingFor(c, role));
|
||||
}
|
||||
|
||||
/** 执行阶段(审批通过后 → 关闭前)的变更:投用准备与验收跟踪 */
|
||||
export function executionStage(list: ChangeOrder[] = CHANGES): ChangeOrder[] {
|
||||
return list.filter((c) => c.status === "待PSSR" || c.status === "待验收");
|
||||
}
|
||||
|
||||
/** 超期未关闭变更(待关闭且已超期) */
|
||||
export function overdueClosing(list: ChangeOrder[] = CHANGES): ChangeOrder[] {
|
||||
return list.filter((c) => c.status === "待关闭" && (c.overdueDays ?? 0) > 0);
|
||||
}
|
||||
|
||||
|
||||
/** 专业人员「技术把关工作记录」:从 CHANGES 实时推导(与台账 / 待办同源,演示数据范围内统计)
|
||||
* - signed:已完成的会签 / 审批签署次数(会签按成员粒度、审批节点按角色判定)
|
||||
* - involved:涉及本专业的在办变更数(未关闭且流程中含本角色节点)
|
||||
* - 驳回次数暂无结构化记录字段,演示版不展示;参与风险分析次数来自分析组成员(选择式)记录 */
|
||||
export function profWorkStats(role: RoleId) {
|
||||
const person = ROLES.find((r) => r.id === role)?.person ?? "";
|
||||
let signed = 0;
|
||||
for (const c of CHANGES) {
|
||||
for (const n of c.flow) {
|
||||
if (n.kind === "会签" && n.members?.length) {
|
||||
const me = n.members.find((m) => m.name.startsWith(person));
|
||||
if (me?.done) signed += 1;
|
||||
} else if (n.status === "done" && n.roles.includes(role)) {
|
||||
signed += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
const involved = CHANGES.filter(
|
||||
(c) => c.status !== "已关闭" && c.flow.some((n) => n.roles.includes(role))
|
||||
).length;
|
||||
return { signed, involved };
|
||||
}
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
declare namespace NaiveUI {
|
||||
type ThemeColor = 'default' | 'error' | 'primary' | 'info' | 'success' | 'warning';
|
||||
type Align = 'stretch' | 'baseline' | 'start' | 'end' | 'center' | 'flex-end' | 'flex-start';
|
||||
|
||||
type DataTableBaseColumn<T> = import('naive-ui').DataTableBaseColumn<T>;
|
||||
type DataTableExpandColumn<T> = import('naive-ui').DataTableExpandColumn<T>;
|
||||
type DataTableSelectionColumn<T> = import('naive-ui').DataTableSelectionColumn<T>;
|
||||
type TableColumnGroup<T> = import('naive-ui/es/data-table/src/interface').TableColumnGroup<T>;
|
||||
type TableColumnCheck = import('@sa/hooks').TableColumnCheck;
|
||||
type TableColumnFixed = import('@sa/hooks').TableColumnCheck['fixed'];
|
||||
|
||||
type SetTableColumnKey<C, T> = Omit<C, 'key'> & { key: keyof T | (string & {}) };
|
||||
|
||||
type TableColumnWithKey<T> = SetTableColumnKey<DataTableBaseColumn<T>, T> | SetTableColumnKey<TableColumnGroup<T>, T>;
|
||||
|
||||
type TableColumn<T> = TableColumnWithKey<T> | DataTableSelectionColumn<T> | DataTableExpandColumn<T>;
|
||||
|
||||
/**
|
||||
* the type of table operation
|
||||
*
|
||||
* - add: add table item
|
||||
* - edit: edit table item
|
||||
*/
|
||||
type TableOperateType = 'add' | 'edit';
|
||||
}
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
/// <reference types="@amap/amap-jsapi-types" />
|
||||
/// <reference types="bmapgl" />
|
||||
|
||||
declare namespace BMap {
|
||||
class Map extends BMapGL.Map {}
|
||||
class Point extends BMapGL.Point {}
|
||||
}
|
||||
|
||||
declare const TMap: any;
|
||||
|
||||
interface Window {
|
||||
/**
|
||||
* make baidu map request under https protocol
|
||||
*
|
||||
* - 0: http
|
||||
* - 1: https
|
||||
* - 2: https
|
||||
*/
|
||||
HOST_TYPE: '0' | '1' | '2';
|
||||
}
|
||||
Vendored
+72
@@ -0,0 +1,72 @@
|
||||
import 'vue-router';
|
||||
|
||||
declare module 'vue-router' {
|
||||
interface RouteMeta {
|
||||
/**
|
||||
* Title of the route
|
||||
*
|
||||
* It can be used in document title
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* I18n key of the route
|
||||
*
|
||||
* It's used in i18n, if it is set, the title will be ignored
|
||||
*/
|
||||
i18nKey?: App.I18n.I18nKey | null;
|
||||
/**
|
||||
* Roles of the route
|
||||
*
|
||||
* Route can be accessed if the current user has at least one of the roles
|
||||
*
|
||||
* It only works when the route mode is "static", if the route mode is "dynamic", it will be ignored
|
||||
*/
|
||||
roles?: string[];
|
||||
/** Whether to cache the route */
|
||||
keepAlive?: boolean | null;
|
||||
/**
|
||||
* Is constant route
|
||||
*
|
||||
* when it is set to true, there will be no login verification and no permission verification to access the route
|
||||
*/
|
||||
constant?: boolean | null;
|
||||
/**
|
||||
* Iconify icon
|
||||
*
|
||||
* It can be used in the menu or breadcrumb
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* Local icon
|
||||
*
|
||||
* In "src/assets/svg-icon", if it is set, the icon will be ignored
|
||||
*/
|
||||
localIcon?: string;
|
||||
/** Icon size. width and height are the same. */
|
||||
iconFontSize?: number;
|
||||
/** Router order */
|
||||
order?: number | null;
|
||||
/** The outer link of the route */
|
||||
href?: string | null;
|
||||
/** Whether to hide the route in the menu */
|
||||
hideInMenu?: boolean | null;
|
||||
/**
|
||||
* The menu key will be activated when entering the route
|
||||
*
|
||||
* The route is not in the menu
|
||||
*
|
||||
* @example
|
||||
* the route is "user_detail", if it is set to "user_list", the menu "user_list" will be activated
|
||||
*/
|
||||
activeMenu?: import('@elegant-router/types').RouteKey | null;
|
||||
/**
|
||||
* By default, the same route path will use one tab, even with different query, if set true, the route with
|
||||
* different query will use different tabs
|
||||
*/
|
||||
multiTab?: boolean | null;
|
||||
/** If set, the route will be fixed in tabs, and the value is the order of fixed tabs */
|
||||
fixedIndexInTab?: number | null;
|
||||
/** if set query parameters, it will be automatically carried when entering the route */
|
||||
query?: { key: string; value: string }[] | null;
|
||||
}
|
||||
}
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
/** The storage namespace */
|
||||
declare namespace StorageType {
|
||||
interface Session {
|
||||
/** The theme color */
|
||||
themeColor: string;
|
||||
// /**
|
||||
// * the theme settings
|
||||
// */
|
||||
// themeSettings: App.Theme.ThemeSetting;
|
||||
}
|
||||
|
||||
interface Local {
|
||||
/** The i18n language */
|
||||
lang: App.I18n.LangType;
|
||||
/** The token */
|
||||
token: string;
|
||||
/** Fixed sider with mix-menu */
|
||||
mixSiderFixed: CommonType.YesOrNo;
|
||||
/** The refresh token */
|
||||
refreshToken: string;
|
||||
/** The theme color */
|
||||
themeColor: string;
|
||||
/** The dark mode */
|
||||
darkMode: boolean;
|
||||
/** The theme settings */
|
||||
themeSettings: App.Theme.ThemeSetting;
|
||||
/**
|
||||
* The override theme flags
|
||||
*
|
||||
* The value is the build time of the project
|
||||
*/
|
||||
overrideThemeFlag: string;
|
||||
/** The global tabs */
|
||||
globalTabs: App.Global.Tab[];
|
||||
/** The backup theme setting before is mobile */
|
||||
backupThemeSettingBeforeIsMobile: {
|
||||
layout: UnionKey.ThemeLayoutMode;
|
||||
siderCollapse: boolean;
|
||||
};
|
||||
/** The last login user id */
|
||||
lastLoginUserId: string;
|
||||
}
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
declare module 'swiper/css';
|
||||
declare module 'swiper/css/navigation';
|
||||
declare module 'swiper/css/pagination';
|
||||
Vendored
+152
@@ -0,0 +1,152 @@
|
||||
/** The union key namespace */
|
||||
declare namespace UnionKey {
|
||||
/**
|
||||
* The login module
|
||||
*
|
||||
* - pwd-login: password login
|
||||
*/
|
||||
type LoginModule = 'pwd-login';
|
||||
|
||||
/** Theme scheme */
|
||||
type ThemeScheme = 'light' | 'dark' | 'auto';
|
||||
|
||||
/**
|
||||
* The layout mode
|
||||
*
|
||||
* - vertical: the vertical menu in left
|
||||
* - horizontal: the horizontal menu in top
|
||||
* - vertical-mix: two vertical mixed menus in left
|
||||
* - top-hybrid-sidebar-first: the vertical first level menus in left and horizontal child level menus in top
|
||||
* - top-hybrid-header-first: the horizontal first level menus in top and vertical child level menus in left
|
||||
*/
|
||||
type ThemeLayoutMode =
|
||||
| 'vertical'
|
||||
| 'horizontal'
|
||||
| 'vertical-mix'
|
||||
| 'vertical-hybrid-header-first'
|
||||
| 'top-hybrid-sidebar-first'
|
||||
| 'top-hybrid-header-first';
|
||||
|
||||
/**
|
||||
* The scroll mode when content overflow
|
||||
*
|
||||
* - wrapper: the wrapper component's root element overflow
|
||||
* - content: the content component overflow
|
||||
*/
|
||||
type ThemeScrollMode = import('@sa/materials').LayoutScrollMode;
|
||||
|
||||
/** Page animate mode */
|
||||
type ThemePageAnimateMode = 'fade' | 'fade-slide' | 'fade-bottom' | 'fade-scale' | 'zoom-fade' | 'zoom-out' | 'none';
|
||||
|
||||
/**
|
||||
* Tab mode
|
||||
*
|
||||
* - chrome: chrome style
|
||||
* - button: button style
|
||||
*/
|
||||
type ThemeTabMode = import('@sa/materials').PageTabMode;
|
||||
|
||||
/** Unocss animate key */
|
||||
type UnoCssAnimateKey =
|
||||
| 'pulse'
|
||||
| 'bounce'
|
||||
| 'spin'
|
||||
| 'ping'
|
||||
| 'bounce-alt'
|
||||
| 'flash'
|
||||
| 'pulse-alt'
|
||||
| 'rubber-band'
|
||||
| 'shake-x'
|
||||
| 'shake-y'
|
||||
| 'head-shake'
|
||||
| 'swing'
|
||||
| 'tada'
|
||||
| 'wobble'
|
||||
| 'jello'
|
||||
| 'heart-beat'
|
||||
| 'hinge'
|
||||
| 'jack-in-the-box'
|
||||
| 'light-speed-in-left'
|
||||
| 'light-speed-in-right'
|
||||
| 'light-speed-out-left'
|
||||
| 'light-speed-out-right'
|
||||
| 'flip'
|
||||
| 'flip-in-x'
|
||||
| 'flip-in-y'
|
||||
| 'flip-out-x'
|
||||
| 'flip-out-y'
|
||||
| 'rotate-in'
|
||||
| 'rotate-in-down-left'
|
||||
| 'rotate-in-down-right'
|
||||
| 'rotate-in-up-left'
|
||||
| 'rotate-in-up-right'
|
||||
| 'rotate-out'
|
||||
| 'rotate-out-down-left'
|
||||
| 'rotate-out-down-right'
|
||||
| 'rotate-out-up-left'
|
||||
| 'rotate-out-up-right'
|
||||
| 'roll-in'
|
||||
| 'roll-out'
|
||||
| 'zoom-in'
|
||||
| 'zoom-in-down'
|
||||
| 'zoom-in-left'
|
||||
| 'zoom-in-right'
|
||||
| 'zoom-in-up'
|
||||
| 'zoom-out'
|
||||
| 'zoom-out-down'
|
||||
| 'zoom-out-left'
|
||||
| 'zoom-out-right'
|
||||
| 'zoom-out-up'
|
||||
| 'bounce-in'
|
||||
| 'bounce-in-down'
|
||||
| 'bounce-in-left'
|
||||
| 'bounce-in-right'
|
||||
| 'bounce-in-up'
|
||||
| 'bounce-out'
|
||||
| 'bounce-out-down'
|
||||
| 'bounce-out-left'
|
||||
| 'bounce-out-right'
|
||||
| 'bounce-out-up'
|
||||
| 'slide-in-down'
|
||||
| 'slide-in-left'
|
||||
| 'slide-in-right'
|
||||
| 'slide-in-up'
|
||||
| 'slide-out-down'
|
||||
| 'slide-out-left'
|
||||
| 'slide-out-right'
|
||||
| 'slide-out-up'
|
||||
| 'fade-in'
|
||||
| 'fade-in-down'
|
||||
| 'fade-in-down-big'
|
||||
| 'fade-in-left'
|
||||
| 'fade-in-left-big'
|
||||
| 'fade-in-right'
|
||||
| 'fade-in-right-big'
|
||||
| 'fade-in-up'
|
||||
| 'fade-in-up-big'
|
||||
| 'fade-in-top-left'
|
||||
| 'fade-in-top-right'
|
||||
| 'fade-in-bottom-left'
|
||||
| 'fade-in-bottom-right'
|
||||
| 'fade-out'
|
||||
| 'fade-out-down'
|
||||
| 'fade-out-down-big'
|
||||
| 'fade-out-left'
|
||||
| 'fade-out-left-big'
|
||||
| 'fade-out-right'
|
||||
| 'fade-out-right-big'
|
||||
| 'fade-out-up'
|
||||
| 'fade-out-up-big'
|
||||
| 'fade-out-top-left'
|
||||
| 'fade-out-top-right'
|
||||
| 'fade-out-bottom-left'
|
||||
| 'fade-out-bottom-right'
|
||||
| 'back-in-up'
|
||||
| 'back-in-down'
|
||||
| 'back-in-right'
|
||||
| 'back-in-left'
|
||||
| 'back-out-up'
|
||||
| 'back-out-down'
|
||||
| 'back-out-right'
|
||||
| 'back-out-left';
|
||||
}
|
||||
Vendored
+118
@@ -0,0 +1,118 @@
|
||||
/**
|
||||
* Namespace Env
|
||||
*
|
||||
* It is used to declare the type of the import.meta object
|
||||
*/
|
||||
declare namespace Env {
|
||||
/** The router history mode */
|
||||
type RouterHistoryMode = 'hash' | 'history' | 'memory';
|
||||
|
||||
/** Interface for import.meta */
|
||||
// eslint-disable-next-line @typescript-eslint/no-shadow
|
||||
interface ImportMeta extends ImportMetaEnv {
|
||||
/** The base url of the application */
|
||||
readonly VITE_BASE_URL: string;
|
||||
/** The title of the application */
|
||||
readonly VITE_APP_TITLE: string;
|
||||
/** The description of the application */
|
||||
readonly VITE_APP_DESC: string;
|
||||
/** The router history mode */
|
||||
readonly VITE_ROUTER_HISTORY_MODE?: RouterHistoryMode;
|
||||
/** The prefix of the iconify icon */
|
||||
readonly VITE_ICON_PREFIX: 'icon';
|
||||
/**
|
||||
* The prefix of the local icon
|
||||
*
|
||||
* This prefix is start with the icon prefix
|
||||
*/
|
||||
readonly VITE_ICON_LOCAL_PREFIX: 'icon-local';
|
||||
/** backend service base url */
|
||||
readonly VITE_SERVICE_BASE_URL: string;
|
||||
/**
|
||||
* success code of backend service
|
||||
*
|
||||
* when the code is received, the request is successful
|
||||
*/
|
||||
readonly VITE_SERVICE_SUCCESS_CODE: string;
|
||||
/**
|
||||
* logout codes of backend service
|
||||
*
|
||||
* when the code is received, the user will be logged out and redirected to login page
|
||||
*
|
||||
* use "," to separate multiple codes
|
||||
*/
|
||||
readonly VITE_SERVICE_LOGOUT_CODES: string;
|
||||
/**
|
||||
* modal logout codes of backend service
|
||||
*
|
||||
* when the code is received, the user will be logged out by displaying a modal
|
||||
*
|
||||
* use "," to separate multiple codes
|
||||
*/
|
||||
readonly VITE_SERVICE_MODAL_LOGOUT_CODES: string;
|
||||
/**
|
||||
* token expired codes of backend service
|
||||
*
|
||||
* when the code is received, it will refresh the token and resend the request
|
||||
*
|
||||
* use "," to separate multiple codes
|
||||
*/
|
||||
readonly VITE_SERVICE_EXPIRED_TOKEN_CODES: string;
|
||||
/** when the route mode is static, the defined super role */
|
||||
readonly VITE_STATIC_SUPER_ROLE: string;
|
||||
/**
|
||||
* other backend service base url
|
||||
*
|
||||
* the value is a json
|
||||
*/
|
||||
readonly VITE_OTHER_SERVICE_BASE_URL: string;
|
||||
/**
|
||||
* Whether to enable the http proxy
|
||||
*
|
||||
* Only valid in the development environment
|
||||
*/
|
||||
readonly VITE_HTTP_PROXY?: CommonType.YesOrNo;
|
||||
/**
|
||||
* The auth route mode
|
||||
*
|
||||
* - Static: the auth routes is generated in front-end
|
||||
* - Dynamic: the auth routes is generated in back-end
|
||||
*/
|
||||
readonly VITE_AUTH_ROUTE_MODE: 'static' | 'dynamic';
|
||||
/**
|
||||
* The home route key
|
||||
*
|
||||
* It only has effect when the auth route mode is static, if the route mode is dynamic, the home route key is
|
||||
* defined in the back-end
|
||||
*/
|
||||
readonly VITE_ROUTE_HOME: import('@elegant-router/types').LastLevelRouteKey;
|
||||
/**
|
||||
* Default menu icon if menu icon is not set
|
||||
*
|
||||
* Iconify icon name
|
||||
*/
|
||||
readonly VITE_MENU_ICON: string;
|
||||
/** Whether to build with sourcemap */
|
||||
readonly VITE_SOURCE_MAP?: CommonType.YesOrNo;
|
||||
/**
|
||||
* Iconify api provider url
|
||||
*
|
||||
* If the project is deployed in intranet, you can set the api provider url to the local iconify server
|
||||
*
|
||||
* @link https://docs.iconify.design/api/providers.html
|
||||
*/
|
||||
readonly VITE_ICONIFY_URL?: string;
|
||||
/** Used to differentiate storage across different domains */
|
||||
readonly VITE_STORAGE_PREFIX?: string;
|
||||
/** Whether to automatically detect updates after configuring application packaging */
|
||||
readonly VITE_AUTOMATICALLY_DETECT_UPDATE?: CommonType.YesOrNo;
|
||||
/** show proxy url log in terminal */
|
||||
readonly VITE_PROXY_LOG?: CommonType.YesOrNo;
|
||||
/** The launch editor */
|
||||
readonly VITE_DEVTOOLS_LAUNCH_EDITOR?: import('vite-plugin-vue-devtools').VitePluginVueDevToolsOptions['launchEditor'];
|
||||
}
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: Env.ImportMeta;
|
||||
}
|
||||
Reference in New Issue
Block a user