incident.js 595 B

1234567891011121314151617
  1. import service from '@/utils/request'
  2. export const getIncidentList = (params) => {
  3. return service({ url: '/incident/list', method: 'get', params })
  4. }
  5. export const getIncidentDetail = (id) => {
  6. return service({ url: `/incident/${id}`, method: 'get' })
  7. }
  8. export const createIncident = (data) => {
  9. return service({ url: '/incident', method: 'post', data })
  10. }
  11. export const transitionIncident = (id, data) => {
  12. return service({ url: `/incident/${id}/transition`, method: 'post', data })
  13. }
  14. export const getIncidentStats = () => {
  15. return service({ url: '/incident/stats', method: 'get' })
  16. }