import { HcApi } from '../../request/index'

export default {
    async page(form) {
        return HcApi({
            url: '/api/blade-system/dict-biz/parent-list',
            method: 'get',
            params: form,
        }, false)
    },
    async detail(id) {
        return HcApi({
            url: '/api/blade-system/dict-biz/detail',
            method: 'get',
            params: {
                id,
            },
        }, false)
    },
    async submit(form) {
        return HcApi({
            url: '/api/blade-system/dict-biz/submit',
            method: 'post',
            data: form,
        }, false)
    },
    async del(ids) {
        return HcApi({
            url: '/api/blade-system/dict-biz/remove',
            method: 'post',
            params: {
                ids,
            },
        }, false)
    },
    async getList(form) {
        return HcApi({
            url: '/api/blade-system/dict-biz/list',
            method: 'get',
            params: form,
        }, false)
    },
    async getChildList(form) {
        return HcApi({
            url: '/api/blade-system/dict-biz/child-list',
            method: 'get',
            params: form,
        }, false)
    },
    async getDictTree() {
        return HcApi({
            url: '/api/blade-system/dict-biz/tree?code=DICT',
            method: 'get',
            params: {},
        }, false)
    },
    async getDictionary(code) {
        return HcApi({
            url: '/api/blade-system/dict-biz/dictionary',
            method: 'get',
            params: {
                code,
            },
        }, false)
    },
}
