import request from '@/utils/request'

export function getUnitList(params) { return request({ url: '/slgc/water-unit/list', method: 'get', params }) }
export function getUnit(id) { return request({ url: '/slgc/water-unit/' + id, method: 'get' }) }
export function saveUnit(data) { return data.id ? request({ url: '/slgc/water-unit', method: 'put', data }) : request({ url: '/slgc/water-unit', method: 'post', data }) }
export function delUnit(ids) { return request({ url: '/slgc/water-unit/' + ids, method: 'delete' }) }

export function getRecordList(params) { return request({ url: '/slgc/water-unit/record/list', method: 'get', params }) }
export function getRecord(id) { return request({ url: '/slgc/water-unit/record/' + id, method: 'get' }) }
export function saveRecord(data) { return data.id ? request({ url: '/slgc/water-unit/record', method: 'put', data }) : request({ url: '/slgc/water-unit/record', method: 'post', data }) }
export function delRecord(ids) { return request({ url: '/slgc/water-unit/record/' + ids, method: 'delete' }) }
