// 申明外部 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 {
|
WxLogin: {
|
/**
|
* 微信扫码登录构造函数
|
* @param options 配置选项
|
* @param options.self_redirect 手机点击确认登录后是否在iframe内跳转,默认false在top window跳转
|
* @param options.id 必填,第三方页面显示二维码的容器id
|
* @param options.appid 必填,应用唯一标识
|
* @param options.scope 必填,授权作用域,网页应用填写snsapi_login
|
* @param options.redirect_uri 必填,重定向地址(需UrlEncode)
|
* @param options.state 用于保持请求和回调状态,防csrf攻击
|
* @param options.style 二维码文字颜色样式,可选"black"、"white"
|
* @param options.href 自定义样式链接
|
* @param options.stylelite 是否使用新样式二维码登录,值为1时启用
|
* @param options.fast_login 是否启用快速登录,值为0时禁用
|
*/
|
new (options: {
|
/** @description 手机点击确认登录后是否在iframe内跳转,默认false在top window跳转 */
|
self_redirect?: boolean;
|
/** @description 必填,第三方页面显示二维码的容器id */
|
id: string;
|
/** @description 必填,应用唯一标识 */
|
appid: string;
|
/** @description 必填,授权作用域,网页应用填写snsapi_login */
|
scope: string;
|
/** @description 必填,重定向地址(需UrlEncode) */
|
redirect_uri: string;
|
/** @description 用于保持请求和回调状态,防csrf攻击 */
|
state?: string;
|
/** @description 二维码文字颜色样式,可选"black"、"white" */
|
style?: 'black' | 'white';
|
/** @description 自定义样式链接 */
|
href?: string;
|
/** @description 是否使用新样式二维码登录,值为1时启用 */
|
stylelite?: 0 | 1;
|
/** @description 是否启用快速登录,值为0时禁用 */
|
fast_login?: 0 | 1;
|
}): void;
|
};
|
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 sse url */
|
SSEUrl: string;
|
/** @description 权限 url */
|
AuthUrl: string;
|
/** @description 分享 url */
|
ShareUrl: 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;
|
};
|
}
|