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

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