import { IQueryCommon, IRes, IResult } from '@/api/common'
import axios from '@/utils/request'
import { base, IDataQuery } from './common'

const uris = {
  // base: `${base}/indicate`,
  page: `${base}/indicate/page`
  // del: `${base}/indicate/deleteByIds`
}

// export const addDataQuery = (data: Omit<IDataQuery, 'id'>) =>
//   axios.request<IRes<boolean>>({ url: uris.base, method: 'post', data })

// export const deleteDataQuery = (id: string) =>
//   axios.request<IRes<boolean>>({ url: `${uris.base}/${id}`, method: 'delete' })

// export const updateDataQuery = (data: IDataQuery) =>
//   axios.request<IRes<boolean>>({ url: uris.base, method: 'put', data })

// export const getDataQuery = (id: string) =>
//   axios.request<IResult<IDataQuery>>({ url: `${uris.base}/${id}`, method: 'get' })

export const dataQueryPage = (params: Partial<IDataQuery & IQueryCommon>) =>
  axios.request<IRes<IDataQuery[]>>({ url: uris.page, method: 'get', params })

// export const deleteDataQueryBatch = (ids: string) =>
//   axios.request<IRes<boolean>>({ url: uris.del, method: 'delete', params: { ids } })
