import request from '@/utils/request'

// 查询三务公开列表
export function listAffairs(query) {
  return request({
    url: '/service/affairs/list',
    method: 'get',
    params: query
  })
}

// 查询三务公开详细
export function getAffairs(id) {
  return request({
    url: '/service/affairs/get/' + id,
    method: 'get'
  })
}

// 新增三务公开
export function addAffairs(data) {
  return request({
    url: '/service/affairs/add',
    method: 'post',
    data: data
  })
}

// 修改三务公开
export function updateAffairs(data) {
  return request({
    url: '/service/affairs/edit',
    method: 'post',
    data: data
  })
}

// 删除三务公开
export function delAffairs(id) {
  return request({
    url: '/service/affairs/remove/' + id,
    method: 'get'
  })
}

// 导出三务公开
export function exportAffairs(query) {
  return request({
    url: '/service/affairs/export',
    method: 'get',
    params: query
  })
}

// 查询村务公开详细
export function getVillageAffairs(id) {
  return request({
    url: '/service/villageAffairs/get/' + id,
    method: 'get'
  })
}

//查询已上传附件
export const attachmentList = (data) => {
  return request({
    url: '/system/attachment/query',
    method: 'get',
    params: data
  })
}
