import request from '@/utils/request'

// 登录
export const login = (data) => {
    return request({
        url: '/frame/optr/login.htm',
        method: 'post',
        data
    })
}

// 获取参数列表
export const getParam = () => {
    return request({
        url: '/param/list.htm',
        method: 'post'
    })
}

// 获取航次列表
export const voyageReg = (data) => {
    return request({
        baseURL: data.baseURL,
        url: '/api/voyage/list.htm',
        method: 'post'
    })
}

// 关联航次
export const sampleAdd = (data) => {
    return request({
        url: '/rescue/reg/sample/add.htm',
        method: 'post',
        data
    })
}

// 获取已关联航次列表
export const sampleList = (data) => {
    return request({
        url: '/rescue/reg/sample/list.htm',
        method: 'post',
        data
    })
}

// 删除已关联航次
export const sampleDelete = (data) => {
    return request({
        url: '/rescue/reg/sample/delete.htm',
        method: 'post',
        data
    })
}

// 获取任务列表
export const regPage = (data) => {
    return request({
        url: '/rescue/reg/page.htm',
        method: 'post',
        data
    })
}

// 查询任务详情
export const regFind = (data) => {
    return request({
        url: '/rescue/reg/find.htm',
        method: 'post',
        data
    })
}

// 新增/编辑任务
export const regEdit = (data) => {
    return request({
        url: '/rescue/reg/edit.htm',
        method: 'post',
        data
    })
}

// 附件列表
export const regFileList = (data) => {
    return request({
        url: '/rescue/reg/file/list.htm',
        method: 'post',
        data
    })
}

// 查看附件接口
export const regFileView = () => {
    return request({
        url: '/rescue/reg/file/view.htm',
        method: 'post'
    })
}

// 附件删除
export const regFileDelete = (data) => {
    return request({
        url: '/rescue/reg/file/delete.htm',
        method: 'post',
        data
    })
}

// 统计接口
export const reportMain = (data) => {
    return request({
        url: '/report/main.htm',
        method: 'post',
        data
    })
}

// 完成任务
export const regComplete = (data) => {
    return request({
        url: '/rescue/reg/complete.htm',
        method: 'post',
        data
    })
}


