index.js 1.34 KB
/**
 * params ((page,pageSize))
 * data ((deviceProfileIds))
 */

//设备类型
const getDeviceTypeApi = (data) => {
  return uni.$u.http.post(`/yt/deviceCagegory/getAllCagegory`, data)
}

//设备台账列表
const getLedgerListApi = (urlParams, data) => {
  const { page, pageSize } = urlParams
  return uni.$u.http.post(`/yt/da/pageData?page=${page}&pageSize=${pageSize}`, data)
}

// 设备台账列表详情
const getLedgerListDetail = (id) => {
  return uni.$u.http.get(`/yt/da/detail?id=${id}`)
}

//故障原因列表
const getFaultListApi = (urlParams, data) => {
  const { page, pageSize } = urlParams
  return uni.$u.http.post(`/yt/mr/pageData?page=${page}&pageSize=${pageSize}`, data)
}

// 故障原因列表详情
const getFaultListDetail = (id) => {
  return uni.$u.http.get(`/yt/mr/detail?id=${id}`)
}


//巡检/保养方案列表
const getCheckPlanApi = (urlParams) => {
  const { page, pageSize,type='',name='', status=''} = urlParams
  return uni.$u.http.get(`/yt/checkPlan?page=${page}&pageSize=${pageSize}&type=${type}&name=${name}&status=${status}`)
}

//巡检/保养方案列表详情
const getCheckPlanDetail = (id) => {
  return uni.$u.http.get(`/yt/checkPlan/get?id=${id}`)
}


export default {
  getFaultListApi,
  getFaultListDetail,
  getCheckPlanApi,
  getCheckPlanDetail,
  getLedgerListApi,
  getLedgerListDetail,
  getDeviceTypeApi
  
}