import { main, kjjg } from '@/api'
import request from '@/utils/require'

// 分页
export function selectPageByEntity(data) {
    return request({
        url: `${main}/client/off_line/selectPageByEntity?pageNum=${data.pageNum}&pageSize=${data.pageSize}&pageType=${data.pageType}`,
        method: 'post',
        data: data,
    })
}

//详情
export function selectById(fid) {
    return request({
        url: `${main}/client/off_line/selectById/${fid}`,
        method: 'get',
    })
}

//新增

export function insertEntitySelective(data) {
    return request({
        url: `${main}/client/off_line/insertEntitySelective`,
        method: 'post',
        data: data,
    })
}
//更新

export function updateByEntitySelective(data) {
    return request({
        url: `${main}/client/off_line/updateByEntitySelective`,
        method: 'put',
        data: data,
    })
}

//摄像头
////视频new
export function spSelectListNew(kqbm) {
    return request({
        url: `${kjjg}/DXPKQSP/queryTreeByKq?kddm=${kqbm}`,
        method: 'post'
    });
}
//校验是否有运维单
export function check_work_order(fid) {
    return request({
        url: `${main}/client/off_line/check_work_order/${fid}`,
        method: 'get',
    })
}
//
//导出离线备案
export function exportDataOffLineExcel(data) {
    return request({
        url: `${main}/client/off_line/export_data_off_line_excel`,
        method: 'post',
        responseType: "blob",
        data,
    })
}