Newer
Older
qd_cnooc_front / src / api / job.js
/**
 * 告警工单管理接口
 */
import request from '@/utils/request'

// 查询工单状态
export function getJobStatus(params) {
  return request({
    url: 'dict/code/jobStatus',
    method: 'get',
    params
  })
}
// 告警工单查询
export function getJobList(params) {
  return request({
    url: 'job/list',
    method: 'get',
    params
  })
}

// 超时未接单告警工单查询
export function getOvertimeGetJobList(params) {
  return request({
    url: 'job/overtimeGetList',
    method: 'get',
    params
  })
}

// 超时未处理告警工单查询
export function getOvertimeHandleJobList(params) {
  return request({
    url: 'job/overtimeHandleList',
    method: 'get',
    params
  })
}
// 处理工单
export function handleJob(id) {
  return request({
    url: 'job/handleJob',
    method: 'post',
    params: {
      id: id
    }
  })
}

// 工单详情
export function getJobInfo(jobId) {
  return request({
    url: 'job/info',
    method: 'get',
    params: {
      id: jobId
    }
  })
}
// 批量导出
export function batchExportJob(params) {
  return request({
    url: 'job/export',
    method: 'get',
    timeout: 120000,
    params,
    responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
  })
}

// 批量导出超时未接单工单
export function exportOvertimeGetJobList(params) {
  return request({
    url: 'job/exportOvertimeGetList',
    method: 'get',
    timeout: 120000,
    params,
    responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
  })
}

// 批量导出超时未处理工单
export function exportOvertimeHandleJobList(params) {
  return request({
    url: 'job/exportOvertimeHandleList',
    method: 'get',
    timeout: 120000,
    params,
    responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
  })
}

// 根据工单状态统计工单数量
export function jobCountByStatus(params) {
  return request({
    url: 'job/countByJobStatus',
    method: 'get',
    params
  })
}