import axios from '@/common/services/axios-instance'

class TrackService {
  getTotalCostTime() {
    return axios({
      url: 'api/framework/v1/operate-monitor/today-count-totalCostTime',
      method: 'get',
    })
  }

  getResponseTime(params) {
    return axios({
      url: 'api/framework/v1/operate-monitor/count-heretoforedays-limit',
      method: 'get',
      params,
    })
  }

  getOpenTime(params) {
    return axios({
      url: 'api/framework/v1/operate-monitor/open-time-comparison-users',
      method: 'get',
      params,
    })
  }

  getOpenfenbu(params) {
    return axios({
      url: 'api/framework/v1/operate-monitor/per-minute-count',
      method: 'get',
      params,
    })
  }

  getUserTodo(params) {
    return axios({
      url: 'api/framework/v1/operate-monitor/user-todo-statistics',
      method: 'get',
      params,
    })
  }

  getMonitorConfig() {
    return axios({
      url:
        'api/framework/v1/sys-manage-config/page-details/wp/base/sysmanage/weTodoDoneMonitorConfig',
      method: 'get',
    })
  }

  saveMonitorConfig(params) {
    return axios({
      url: 'api/framework/v1/page/handleData',
      method: 'post',
      data: params,
    })
  }
}

export default new TrackService()
