import { ContentType, HttpClient, RequestParams } from "/@/api/admin/http-client";
import { AxiosResponse } from 'axios'

export class OilEngineDetailsApi <SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  timer = 500
  /**
  * No description
  *
  * @tags
  * @name GetBasicInfo
  * @summary 获取油机详情基本信息
  * @request POST:/api/app/fuel-dispenser/get-dispensers
  * @secure
  */
  getBasicInfoDto = (data: any, params: RequestParams = {}) =>
    this.request<AxiosResponse, any>({
      path: `/api/app/fuel-dispenser/get-dispensers`,
      method: 'POST',
      query: data,
      secure: true,
      type: ContentType.Json,
      ...params,
    })


  // getBasicInfoDto = () =>
  //   new Promise(resolve => {
  //     setTimeout(()=>{
  //       resolve({
  //         data:{
  //           oilEngineNumber:"4",
  //           serialNumber:"1904344P",
  //           oilCompanies:"中石化安徽宣城石油分公司深爱的深爱的",
  //           fuelDispenserManufacturer:"托肯恒山科技(广州)有限公司",
  //           gasStation:"中石化安徽宣城金陵加油站",
  //           specifications:"THD2244B2",
  //           measuringRange:"2L-50L",
  //           accuracyLevel:"0.3",
  //           factoryCode:"1904344P",
  //           onlineStatus:"离线",
  //           alarmStatus:"严重报警",
  //           imgUrl:"upload/2023/09/15/65048ee6-9b3f-2234-0097-734b351ca09d.png"
  //         }
  //       })
  //     },this.timer)
  //   })

  /**
  * No description
  *
  * @tags
  * @name GetAlarmHistoryDto
  * @summary 获取油机详情报警历史列表信息
  * @request POST:/api/app/fuel-dispenser/get-alarm-history
  * @secure
  */
  getAlarmHistoryDto = (data: any, params: RequestParams = {}) =>
    this.request<AxiosResponse, any>({
      path: `/api/app/fuel-dispenser/get-alarm-history`,
      method: 'POST',
      body: data,
      secure: true,
      type: ContentType.Json,
      ...params,
    })
  // getAlarmHistoryDto = () =>
  //   new Promise(resolve => {
  //     setTimeout(() => {
  //       resolve({
  //         total:100,
  //         list:[{
  //           time:'2023-07-23 09:36',
  //           gasStation:"中化安徽宣城金陵加油站",
  //           fillingMachine:"4",
  //           fuelDispenserSerialNumber:"1904344P",
  //           alarmSource:"云平台",
  //           alarmType:"加油机离线",
  //           alarmDescription:"加油机(监督装置)长期离线"
  //         },{
  //           time:'2023-07-23 09:36',
  //           gasStation:"中化安徽宣城金陵加油站",
  //           fillingMachine:"4",
  //           fuelDispenserSerialNumber:"1904344P",
  //           alarmSource:"云平台",
  //           alarmType:"加油机离线",
  //           alarmDescription:"加油机(监督装置)长期离线"
  //         },{
  //           time:'2023-07-23 09:36',
  //           gasStation:"中化安徽宣城金陵加油站",
  //           fillingMachine:"4",
  //           fuelDispenserSerialNumber:"1904344P",
  //           alarmSource:"云平台",
  //           alarmType:"加油机离线",
  //           alarmDescription:"加油机(监督装置)长期离线"
  //         },{
  //           time:'2023-07-23 09:36',
  //           gasStation:"中化安徽宣城金陵加油站",
  //           fillingMachine:"4",
  //           fuelDispenserSerialNumber:"1904344P",
  //           alarmSource:"云平台",
  //           alarmType:"加油机离线",
  //           alarmDescription:"加油机(监督装置)长期离线"
  //         }]
  //       })
  //     },this.timer)
  //   })

  /**
  * No description
  *
  * @tags
  * @name GetLifeCycleDto
  * @summary 获取油机详情生命周期列表信息
  * @request POST:/api/app/fuel-dispenser/get-life-cycle
  * @secure
  */
  getLifeCycleDto = (data: any, params: RequestParams = {}) =>
    this.request<AxiosResponse, any>({
      path: `/api/app/fuel-dispenser/get-life-cycle`,
      method: 'POST',
      body: data,
      secure: true,
      type: ContentType.Json,
      ...params,
    })
  // getLifeCycleDto = () =>
  //   new Promise(resolve => {
  //     setTimeout(() => {
  //       resolve({
  //         total:100,
  //         list:[{
  //           time:"2023-07-23 09:36",
  //           operator:"托肯",
  //           operatorID:"123",
  //           operation:"132",
  //         },{
  //           time:"2023-07-23 09:36",
  //           operator:"托肯",
  //           operatorID:"123",
  //           operation:"132",
  //         },{
  //           time:"2023-07-23 09:36",
  //           operator:"托肯",
  //           operatorID:"123",
  //           operation:"132",
  //         },{
  //           time:"2023-07-23 09:36",
  //           operator:"托肯",
  //           operatorID:"123",
  //           operation:"132",
  //         }]
  //       })
  //     },this.timer)
  //   })
}
