import request from '@/utils/request'


//组织详情-支部信息

export function organizaDetail(params) {
    return request({
      url: '/organizations/' + params,
      method: 'get',
    })
}
//组织换届记录列表
export function changeRecords(params){
    return request({
        url:'/organizations/'+ params + '/records',
        method: 'get'
    })
}
//搜索换届记录
export function searchRecords(params){
    return request({
        url:'/organizations/'+ params.id + '/records',
        method: 'get',
        params
    })
}
//换届记录详情
export function recordDetails(params){
    return request({
        url:'/organization-records/'+ params,
        method: 'get'
    })
}
//创建换届记录
export function setupRecord(data){
    return request({
        url:'/organization-records',
        method: 'post',
        data
    })
}
//更新换届记录
export function updateRecord(data){
    return request({
        url:'/organization-records/'+ data.id,
        method: 'put',
        data
    })
}
//删除换届记录
export function deleteRecord(data){
    return request({
        url:'/organization-records/'+ data,
        method: 'delete',
    })
}
//换届文档列表
export function danganList(params){
    return request({
        url:'/organization-records/'+ params + '/logs',
        method: 'get'
    })
}
//搜索换届文档
export function searchDangan(params){
    return request({
        url:'/organization-records/'+ params.id + '/logs',
        method: 'get',
        params
    })
}
//新建换届文档
export function creatDocument(data){
    return request({
        url:'/organization-record-logs',
        method: 'post',
        data
    })
}
//查看文档详情
export function lookUpDetail(params){
    return request({
        url:'/organization-record-logs/' + params,
        method: 'get'
    })
}

//删除换届文档

export function deleteFile(data){
    return request({
        url:'/organization-record-logs/'+ data,
        method: 'delete',
    })
}