import request from '@/utils/request'
// 获取设备型号
export default {
    xinhao(data) {
        return request({
            url: '/system-boot/dicData/getDicDataByTypeName',
            method: 'get',
            params: data,
        })
    },
    chanjia(data) {
        return request({
            url: '/system-boot/dicData/getDicDataByTypeName',
            method: 'get',
            params: data,
        })
    },
    nodelist() {
        return request({
            url: '/device-boot/node/nodeAllList',
            method: 'get'
        })
    },
    dydj(data) {
        return request({
            url: '/system-boot/dicData/getDicDataByTypeName',
            method: 'get',
            params: data,
        })
    },
    fhlx(data) {
        return request({
            url: '/system-boot/dicData/getDicDataByTypeName',
            method: 'get',
            params: data,
        })
    },
    hylx(data) {
        return request({
            url: '/system-boot/dicData/getDicDataByTypeName',
            method: 'get',
            params: data,
        })
    },
    city(data) {
        return request({
            url: '/system-boot/dicData/getAllProvince',
            method: 'get',
            params: data,
        })
    },
    tree() {
        return request({
            url: '/device-boot/terminalTree/getTerminalTree',
            // url:'/device-boot/terminalTree/getTerminalTreeForFive',
            method: 'get',
        })
    },
    add(query) {
        return request({
            url: '/device-boot/device/addTerminal',
            method: 'post',
            data: { // {name:'前端', status:1,current:current.size:size}
                ...query,
            }
        })
    },
    query(data) {
        return request({
            url: `/device-boot/device/queryTerminal`,
            method: 'get',
            params: data,
        })
    },
    deleteById(data) {
        return request({
            url: `/device-boot/device/delTerminal`,
            method: 'delete',
            params: data,
        })
    },
    dept(data) {
        return request({
            url: `/user-boot/depts/getDeptByProvinceId`,
            method: 'get',
            params: data,
        })
    },
    updateTerminal(query) {
        return request({
            url: `/device-boot/device/updateTerminal`,
            method: 'put',
            data: {
                ...query,
            }
        })
    },
    getTypeIdData(data) {
        return request({
            url: '/system-boot/dictData/getTypeIdData',
            method: 'post',
            data: data
        })
    },
    areaTree(data) {
        return request({
            url: '/system-boot/area/areaTree',
            method: 'post',
            params: data,
        })
    },
    getTerminalLedger(data) {
        return request({
            url: '/device-boot/runManage/getTerminalLedger',
            method: 'post',
            data: data,
        })
    },

    //导出台账信息
    exportData() {
        return request({
            url: '/device-boot/device/exportTerminalBase',
            method: 'get',
            responseType: 'blob'
        })
    }

    //导出

}