import request from '@/utils/request'


export default {

    // 分页条件查询分类列表 
    getList(query, pageNo = 1, pageSize = 20) {
        return request({ // Promise
            url: '/electronic_patrol/getElectronicPatrolList',
            method: 'post',
            data: {
                ...query, //查询条件
                pageNo, //当前页
                pageSize //每页多少条
            }
        })
    },

    //新增
    add(data) {
        return request({
            url: '/electronic_patrol/appendElectronicPatrol',
            method: 'post',
            data: data
        })
    },

    // 更新
    update(data) {
        return request({
            url: '/electronic_patrol/updateElectronicPatrol',
            method: 'post',
            data: data
        })
    },

    // 删除
    deleteById(data) {
        return request({
            url: `/electronic_patrol/deleteElectronicPatrol`,
            method: 'post',
            data: data
        })
    },

    // 设备列表
    getDeviceList(data) {
        return request({
            url: '/device/getDeviceExportList',
            method: 'post',
        })
    },


}