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

export default {
    async page(form) {
        return HcApi({
            url: '/api/blade-manager/wbsInfo/page',
            method: 'get',
            params: form,
        })
    },
    async detail(id) {
        return HcApi({
            url: '/api/blade-manager/wbsInfo/detail',
            method: 'get',
            params: { id },
        })
    },
    async submit(form) {
        return HcApi({
            url: '/api/blade-manager/wbsInfo/submit',
            method: 'post',
            data: form,
        })
    },
    async del(ids) {
        return HcApi({
            url: '/api/blade-manager/wbsInfo/remove',
            method: 'post',
            params: { ids },
        })
    },
    //元素库树
    async tabTypeLazyTreeAll(form) {
        return HcApi({
            url: '/api/blade-manager/wbsPrivate/tab-Type-lazy-tree-all',
            method: 'get',
            params: form,
        })
    },
    //元素库、独立库节点排序
    async wbsInfotabSort(primaryKeyIds) {
        return HcApi({
            url: '/api/blade-manager/wbsInfo/tab-sort',
            method: 'post',
            params: { primaryKeyIds },
        })
    },
    //获取1质检 2实验公有树列表
    async getWbsList(type) {
        return HcApi({
            url: '/api/blade-manager/wbsInfo/get-wbs-type',
            method: 'get',
            params: { type },
        })
    },
}
