LR 3 years ago
parent
commit
7c496753fd
1 changed files with 61 additions and 0 deletions
  1. 61 0
      src/views/spectrum/monitorWarning/alarmHistory/api.ts

+ 61 - 0
src/views/spectrum/monitorWarning/alarmHistory/api.ts

@@ -0,0 +1,61 @@
+import { ICreator, IFile, IQueryCommon, IRes, IUpdater } from '@/api/common'
+import axios from '@/utils/request'
+
+export interface IWarningInfo {
+  id: number
+  sid: string
+  checkDataId: number
+  scheckDataId: string
+  /** 类型:0 告警, 1 预警   */
+  type: number
+  deviceName: string
+  deviceType: number
+  deviceTypeName: string
+  deviceCode: string
+  siteName: string
+  longitude: number
+  latitude: number
+  collectionDate: string
+  targetName: string
+  checkValue: number
+  targetUnit: string
+  /** 告警处理状态 0 未读;1 已读;2 不告警 */
+  handleState: number
+  handleStateName: string
+  handleUser: number
+  handleUserName: string
+  handleTime: string
+  upperLimit: number
+  upTolerance: number
+  lowerLimit: number
+  lowTolerance: number
+  biginTime: string
+  endTime: string
+  warningName: string
+  icon: string
+  groupById: number
+  groupByName: string
+  partitionId: number
+  partitionName: string
+  iconFiles: IFile[]
+}
+
+export interface IDeviceType extends ICreator, IUpdater {
+  id?: number
+  dataUploadTime: number
+  dictionaryId: number
+  fileTypeID: number
+  projectId: number
+  deviceTypeName: string
+  file: string
+  projectName: string
+
+  icon?: string
+  iconFiles?: IFile[]
+}
+
+export const historyPage = (params: Partial<IWarningInfo & IQueryCommon>) =>
+  axios.request<IRes<IWarningInfo[]>>({ url: `/survey/warninginfo/list`, method: 'get', params })
+
+export const deviceTypePage = (params: Partial<IDeviceType & IQueryCommon>) =>
+  axios.request<IRes<IDeviceType[]>>({ url: `/survey/devicetypep/page`, method: 'get', params })