index.ts 2.16 KB
export interface AddDataBoardParams {
  name: string;
  viewType: string;
  remark?: string;
}

export interface UpdateDataBoardParams extends AddDataBoardParams {
  id: string;
}

export interface GetDataBoardParams {
  page?: number;
  pageSize?: number;
  orderFiled?: string;
  orderType?: string;
}

export interface Layout {
  h: number;
  id: string;
  w: number;
  x: number;
  y: number;
}

export interface DataBoardRecord {
  name: string;
  roleIds: string[];
  updater: string;
  description: string;
  remark: string;
  viewType: string;
  enabled: boolean;
  updateTime: string;
  createTime: string;
  tenantProfileId: string;
  id: string;
  tenantExpireTime: string;
  icon: string;
  openUrl: string;
  tenantId: string;
  creator: string;
  layout: Layout[];
  defaultConfig: string;
  tenantStatus: string;
}

export interface DataBoardList {
  items: DataBoardRecord[];
  total: number;
}

export interface GradientInfo {
  value: number;
  key: string;
  color: string;
}

export interface ComponentInfo {
  fontColor: string;
  unit: string;
  gradientInfo: GradientInfo[];
  iconColor: string;
  icon: string;
  value?: string | number;
  updateTime?: number;
}

export interface DataSource {
  attribute: string;
  deviceId: string;
  organizationId: string;
  attributeRename: string;
  deviceRename: string;
  componentInfo: ComponentInfo;
}

export interface DataComponentRecord {
  dataBoardId: string;
  dataSource: DataSource[];
  frontId: string;
  name: string;
  tenantId: string;
  tenantStatus: string;
  description: string;
  roleIds: string[];
  updater: string;
  enabled: boolean;
  id: string;
  defaultConfig: string;
  tenantProfileId: string;
  remark: string;
  icon: string;
  tenantExpireTime: string;
  updateTime: string;
  creator: string;
  createTime: string;
}

export interface AddDataComponentParams {
  boardId: string;
  record: Partial<DataComponentRecord>;
}

export interface Layout {
  id: string;
  w: number;
  h: number;
  x: number;
  y: number;
}

export interface UpdateDataBoardLayoutParams {
  boardId: string;
  layout: Layout[];
}

export interface UpdateDataComponentParams {
  boardId: string;
  record: Partial<DataComponentRecord>;
}