You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
3.1 KiB
138 lines
3.1 KiB
1 month ago
|
import type { RouteRecordRaw } from 'vue-router';
|
||
|
import { type Viewer } from 'sy-cesium-sdk';
|
||
|
import { type defineComponent } from 'vue';
|
||
|
|
||
|
declare global {
|
||
|
declare interface EventBus {
|
||
|
$emit(eventName: string, ...args: any[]): void;
|
||
|
$on(eventName: string, callback: Fn): void;
|
||
|
$off(eventName: string): void;
|
||
|
$all_off(): void;
|
||
|
}
|
||
|
declare let viewer: Viewer;
|
||
|
declare interface Window {
|
||
|
viewer: Viewer;
|
||
|
createObjectURL: any;
|
||
|
$bus: EventBus;
|
||
|
}
|
||
|
type Fn<T = any> = (...arg: T[]) => T;
|
||
|
|
||
|
declare type Nullable<T> = T | null;
|
||
|
|
||
|
declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>;
|
||
|
|
||
|
declare type Recordable<T = any, K = string> = Record<
|
||
|
K extends null | undefined ? string : K,
|
||
|
T
|
||
|
>;
|
||
|
|
||
|
declare type ComponentRef<T> = InstanceType<T>;
|
||
|
|
||
|
declare type AxiosHeaders =
|
||
|
| 'application/json'
|
||
|
| 'application/x-www-form-urlencoded'
|
||
|
| 'multipart/form-data';
|
||
|
|
||
|
declare type AxiosMethod = 'get' | 'post' | 'delete' | 'put';
|
||
|
|
||
|
declare type AxiosResponseType =
|
||
|
| 'arraybuffer'
|
||
|
| 'blob'
|
||
|
| 'document'
|
||
|
| 'json'
|
||
|
| 'text'
|
||
|
| 'stream';
|
||
|
|
||
|
declare interface AxiosConfig {
|
||
|
params?: any;
|
||
|
data?: any;
|
||
|
url?: string;
|
||
|
method?: AxiosMethod;
|
||
|
headersType?: string;
|
||
|
responseType?: AxiosResponseType;
|
||
|
}
|
||
|
|
||
|
declare interface IResponse<T = any> {
|
||
|
code: string;
|
||
|
data: T extends any ? T : T & any;
|
||
|
}
|
||
|
type Component<T = any> =
|
||
|
| ReturnType<typeof defineComponent>
|
||
|
| (() => Promise<typeof import('*.vue')>)
|
||
|
| (() => Promise<T>);
|
||
|
|
||
|
declare interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
|
||
|
name: string;
|
||
|
component?: Component | string;
|
||
|
children?: AppRouteRecordRaw[];
|
||
|
props?: Recordable;
|
||
|
fullPath?: string;
|
||
|
caseName?: string;
|
||
|
}
|
||
|
declare interface MenuRecordRaw {
|
||
|
code: string;
|
||
|
id: string;
|
||
|
menuVisible: boolean;
|
||
|
name: string;
|
||
|
parentFuncId: string;
|
||
|
type: string;
|
||
|
funcInvokeUrl?: string;
|
||
|
iconClass: ?string;
|
||
|
orderNm: ?number;
|
||
|
widgetType?: string;
|
||
|
smallImgPath?: string;
|
||
|
childrenList?: MenuRecordRaw[];
|
||
|
}
|
||
|
// 通讯事件参数
|
||
|
declare interface PostMessage {
|
||
|
eventName: string;
|
||
|
eventId: string;
|
||
|
argumentType?: string;
|
||
|
arguments?: Record<string, any>;
|
||
|
}
|
||
|
|
||
|
declare interface MarkerRecord {}
|
||
|
|
||
|
declare interface MarkerType {
|
||
|
id: string;
|
||
|
iconcode: string;
|
||
|
name: string;
|
||
|
icons?: any[];
|
||
|
color?: string;
|
||
|
data?: any[];
|
||
|
properties: string[];
|
||
|
}
|
||
|
declare interface FusionVideoOption {
|
||
|
videoSource: string;
|
||
|
videoUrl?: string;
|
||
|
showFrustum: boolean;
|
||
|
heading: number;
|
||
|
pitch: number;
|
||
|
roll: number;
|
||
|
far: number;
|
||
|
near: number;
|
||
|
vertical: number;
|
||
|
horizontal: number;
|
||
|
featherValue?: number;
|
||
|
cameraPosition: {
|
||
|
lat: number;
|
||
|
lng: number;
|
||
|
alt: number;
|
||
|
};
|
||
|
alpha: number;
|
||
|
showTag?: boolean;
|
||
|
deviceIndex?: string;
|
||
|
}
|
||
|
declare interface VideoFusionRecord {
|
||
|
id?: string;
|
||
|
name?: string;
|
||
|
videoPlay?: boolean;
|
||
|
videoOption?: FusionVideoOption;
|
||
|
isDefaultShow?: boolean;
|
||
|
thumbnail?: string;
|
||
|
dirId?: string;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export {};
|