// 申明外部 npm 插件模块
|
declare module 'vue-grid-layout';
|
declare module 'qrcodejs2-fixes';
|
declare module 'splitpanes';
|
declare module 'js-cookie';
|
declare module '@wangeditor/editor-for-vue';
|
declare module 'js-table2excel';
|
declare module 'qs';
|
declare module 'sortablejs';
|
|
// 声明一个模块,防止引入文件时报错
|
declare module '*.json';
|
declare module '*.png';
|
declare module '*.jpg';
|
declare module '*.scss';
|
declare module '*.ts';
|
declare module '*.js';
|
|
// 声明文件,*.vue 后缀的文件交给 vue 模块来处理
|
declare module '*.vue' {
|
import type { DefineComponent } from 'vue';
|
const component: DefineComponent<{}, {}, any>;
|
export default component;
|
}
|
|
declare module 'deepmerge' {
|
const deepmerge: (target, source, options?) => any;
|
export default deepmerge;
|
}
|
|
// 声明文件,定义全局变量
|
/* eslint-disable */
|
declare interface Window {
|
openPage: any;
|
nextLoading: boolean;
|
route: {
|
name: String;
|
isKeepAlive: Boolean;
|
isAffix: Boolean;
|
path: String;
|
component: String;
|
redirect?: String;
|
}[];
|
globalConfig: {
|
OutLinkUrl?:string;
|
Name?: string;
|
Version?: string;
|
ICPLicense?: string;
|
/** @description 前端部署服务 */
|
Serve?: {
|
/** @description 前端部署地址 */
|
Url: string;
|
};
|
/** @description 使用到的后端 url */
|
WebApiUrl: {
|
/** @description 主 url */
|
MainUrl: string;
|
/** @description 副 url */
|
SecondaryUrl?: string;
|
/** @description 副副... url */
|
TertiaryUrl?: string;
|
|
/** @description 权限 url */
|
AuthUrl: string;
|
};
|
SoftWareInfo: {
|
/** @description 网站主标题(菜单导航、浏览器当前网页标题)*/
|
globalTitle: string;
|
/** @description 网站副标题(登录页顶部文字) */
|
globalViceTitle: string;
|
/** @description 网站副标题(登录页顶部文字)*/
|
globalViceTitleMsg: string;
|
/** @description tab 页 icon*/
|
favicon: string;
|
[key: string]: any;
|
};
|
/** @description 对接权限系统相关 */
|
Auth: {
|
/** @description 登录软件编码 */
|
SoftWareCode: string;
|
/** @description 登录信息 */
|
Message: string;
|
};
|
};
|
moduleConfig: {
|
_self: {
|
code: string;
|
[key: string]: any;
|
type: {
|
code: string;
|
[key: string]: any;
|
};
|
};
|
basic: {
|
code: string;
|
[key: string]: any;
|
};
|
assets: {
|
code: string;
|
[key: string]: any;
|
|
equipmentGroup: {
|
code: string;
|
[key: string]: any;
|
};
|
equipment: {
|
code: string;
|
[key: string]: any;
|
|
enginePump: {
|
code: string;
|
[key: string]: any;
|
};
|
pump: {
|
code: string;
|
[key: string]: any;
|
};
|
motor: {
|
code: string;
|
[key: string]: any;
|
};
|
};
|
equipmentDirectory: {
|
code: string;
|
[key: string]: any;
|
};
|
};
|
monitor: {
|
code: string;
|
[key: string]: any;
|
|
monitorPointGroup: {
|
code: string;
|
[key: string]: any;
|
};
|
monitorPoint: {
|
code: string;
|
[key: string]: any;
|
};
|
signal: {
|
code: string;
|
[key: string]: any;
|
};
|
formula: {
|
code: string;
|
[key: string]: any;
|
};
|
};
|
health: {
|
code: string;
|
[key: string]: any;
|
};
|
trend: {
|
code: string;
|
[key: string]: any;
|
};
|
fault: {
|
code: string;
|
[key: string]: any;
|
};
|
comprehensive: {
|
code: string;
|
[key: string]: any;
|
|
logicSite: {
|
code: string;
|
[key: string]: any;
|
};
|
logicPolicy: {
|
code: string;
|
[key: string]: any;
|
};
|
logicArea: {
|
code: string;
|
[key: string]: any;
|
};
|
workInfo: {
|
code: string;
|
[key: string]: any;
|
};
|
};
|
[key: string]: any;
|
};
|
pageConfig: {};
|
featureConfig: {
|
[key: string]: any;
|
};
|
}
|
|
// 声明路由当前项类型
|
declare type RouteItem<T = any> = {
|
path: string;
|
name?: string | symbol | undefined | null;
|
redirect?: string;
|
k?: T;
|
meta?: {
|
title?: string;
|
isLink?: string;
|
isHide?: boolean;
|
isKeepAlive?: boolean;
|
isAffix?: boolean;
|
isIframe?: boolean;
|
roles?: string[];
|
icon?: string;
|
isDynamic?: boolean;
|
isDynamicPath?: string;
|
isIframeOpen?: string;
|
loading?: boolean;
|
};
|
children: T[];
|
query?: { [key: string]: T };
|
params?: { [key: string]: T };
|
contextMenuClickId?: string | number;
|
commonUrl?: string;
|
isFnClick?: boolean;
|
url?: string;
|
transUrl?: string;
|
title?: string;
|
id?: string | number;
|
};
|
|
// 声明路由 to from
|
declare interface RouteToFrom<T = any> extends RouteItem {
|
path?: string;
|
children?: T[];
|
}
|
|
// 声明路由当前项类型集合
|
declare type RouteItems<T extends RouteItem = any> = T[];
|
|
// 声明 ref
|
declare type RefType<T = any> = T | null;
|
|
// 声明 HTMLElement
|
declare type HtmlType = HTMLElement | string | undefined | null;
|
|
// 申明 children 可选
|
declare type ChilType<T = any> = {
|
children?: T[];
|
};
|
|
// 申明 数组
|
declare type EmptyArrayType<T = any> = T[];
|
|
// 申明 对象
|
declare type EmptyObjectType<T = any> = {
|
[key: string]: T;
|
};
|
|
// 申明 select option
|
declare type SelectOptionType = {
|
value: string | number;
|
label: string | number;
|
};
|
|
// 鼠标滚轮滚动类型
|
declare interface WheelEventType extends WheelEvent {
|
wheelDelta: number;
|
}
|
|
// table 数据格式公共类型
|
declare interface TableType<T = any> {
|
total: number;
|
loading: boolean;
|
param: {
|
pageNum: number;
|
pageSize: number;
|
[key: string]: T;
|
};
|
}
|