import { request } from '@/api/request2.js'
//获取检查记录列表
export function listRecords(params) {
    return request({
        url: '/mudu/records/list',
        method: 'get',
        params
    })
}
//获取单个检查记录详情
export function getInfoRecords(id) {
    return request({
        url: `/mudu/records/${id}`,
        method: 'get'
    })
}
//添加检查记录
export function addRecords(data) {
    return request({
        url: '/mudu/records',
        method: 'post',
        data
    })
}
//删除检查记录
export function deleteRecords(id) {
    return request({
        url: `/mudu/records/${id}`,
        method: 'delete'
    })
}
//修改检查记录
export function updateRecords(data) {
    return request({
        url: '/mudu/records',
        method: 'put',
        data
    })
}
//获取点位列表
export function pointList(params) {
    return request({
        url: '/mudu/point/list',
        method: 'get',
        params
    })
}
//获取单个点位详情
export function getInfoPoint(id) {
    return request({
        url: `/mudu/point/${id}`,
        method: 'get',
    })
}
//单个文件上传
export function toFile(data) {
    return request({
        url: '/mudu/common/upload',
        method: 'post',
        header: {
            'Content-Type': 'multipart/form-data'
        },
        data
    })
}
