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
        })
    },

    // 获取视屏监控
    getMonitoring(data) {
        return request({
            url: `/video/VideoCollectionUrl`,
            method: 'post',
            data: data
        })
    },

    // 获取视屏监控
    getMonitoring1(data1) {
        return request({
            url: `/video/VideoCollectionUrl`,
            method: 'post',
            data: data1
        })
    },
    //获取通道信息
    getLocalDeviceList(data) {
        return request({
            url: `/dhController/getLocalDeviceList`,
            method: 'post',
            data: data
        })
    },
    //获取实时视频地址
    getVideoLiveUrl(data) {
        return request({
            url: `/dhController/getVideoLiveUrl`,
            method: 'post',
            data: data
        })
    },

    //获取视频数组参数
    getVideoUrl(query) {
        return request({
            url: `/system/config/configKey/` + query,
            method: 'get',
        })
    },
    //增加视频数组参数
    addVideoUrl(query) {
        return request({
            url: `/system/config`,
            method: 'post',
            data: query

        })
    },
    //增加视频数组参数
    updateVideoUrl(data) {
        return request({
            url: `/system/config`,
            method: 'put',
            data
        })
    },


}