import request from '@/utils/request'

// 获取资源总览统计
export function getResourceStats() {
  return request({
    url: '/resources/dashboard/stats',
    method: 'get'
  })
}

// 获取库存预警列表
export function getInventoryAlerts() {
  return request({
    url: '/resources/dashboard/inventory-alerts',
    method: 'get'
  })
}

// 获取采购状态统计
export function getProcurementStatus() {
  return request({
    url: '/resources/dashboard/procurement-status',
    method: 'get'
  })
}

// 获取征用状态统计
export function getRequisitionStatus() {
  return request({
    url: '/resources/dashboard/requisition-status',
    method: 'get'
  })
}

// 获取资源状态分布
export function getResourceDistribution() {
  return request({
    url: '/resources/dashboard/resource-distribution',
    method: 'get'
  })
}

// 获取资源使用趋势
export function getUsageTrends(days) {
  return request({
    url: '/resources/dashboard/usage-trends',
    method: 'get',
    params: { days }
  })
}

// 刷新看板缓存
export function refreshDashboard() {
  return request({
    url: '/resources/dashboard/refresh',
    method: 'post'
  })
}

