import createAxios from '@/utils/request'
// 查询指标
export const queryStatistical = (id:string) => {
    let form = new FormData()
    form.append('id', id)
    return createAxios({
        url: '/system-boot/csstatisticalset/queryStatistical',
        method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        data: form
    })
}

// 绑定指标
export const addStatistical = (params:any) => {
    return createAxios({
        url: '/system-boot/csstatisticalset/addStatistical',
        method: 'post',
        data: params
    })
}

// 新增驾驶舱页面
export const addDashboard = (data: any) => {
    return createAxios({
        url: '/system-boot/dashboard/addDashboard',
        method: 'post',
        data: data
    })
}
// 修改驾驶舱页面
export const updateDashboard = (data: any) => {
    return createAxios({
        url: '/system-boot/dashboard/updateDashboard',
        method: 'post',
        data: data
    })
}
// 删除驾驶舱页面
export const deleteDashboard = (params: any) => {
    return createAxios({
        url: '/system-boot/dashboard/deleteDashboard',
        method: 'post',
        params
    })
}
// 激活的驾驶舱页面
export const activatePage = (params: any) => {
    return createAxios({
        url: '/system-boot/dashboard/activatePage',
        method: 'post',
        params
    })
}
// 查询激活的驾驶舱页面
export const queryActivatePage = () => {
    return createAxios({
        url: '/system-boot/dashboard/queryActivatePage',
        method: 'post'
    })
}
// 更具id 查询驾驶舱页面
export const queryById = (params: any) => {
    return createAxios({
        url: '/system-boot/dashboard/queryById',
        method: 'post',
        params
    })
}
// 更具id 查询驾驶舱页面
export const queryByPagePath = (params: any) => {
    return createAxios({
        url: '/system-boot/dashboard/queryByPagePath',
        method: 'post',
        params
    })
}
// 根据用户id查询用户驾驶舱
export const getDashboardPageByUserId = (params: any) => {
    return createAxios({
        url: '/system-boot/dashboard/getDashboardPageByUserId',
        method: 'post',
        params
    })
}
