import request from '@/utils/request'
// 新增字典数据
export const addCsDictData = (data: any) => {
    return request({
        url: '/system-boot/csDictData/add',
        method: 'post',
        data: data
    })
}

// 查询字典数据
export const queryCsDictDataPage = (data: any) => {
    return request({
        url: '/system-boot/csDictData/list',
        method: 'post',
        data: Object.assign(
            {
                orderBy: '',
                pageNum: 0,
                pageSize: 0,
                searchBeginTime: '',
                searchEndTime: '',
                searchState: 0,
                searchValue: '',
                dataType: '',
                sortBy: ''
            },
            data
        )
    })
}

//删除字典数据
export const delCsDictData = (id: string) => {
    let form = new FormData()
    form.append('id', id)
    return request({
        url: '/system-boot/csDictData/delete',
        method: 'post',
        data: form,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    })
}

// 修改字典数据
export const updateCsDictData = (data: any) => {
    return request({
        url: '/system-boot/csDictData/update',
        method: 'post',
        data: data
    })
}

