import {httpApi} from "../../request/httpApi";
import {useAppStore} from "~src/store";
const useAppState = useAppStore();

export default {
    //列表数据
    async deptList() {
        return httpApi({
            url: '/api/blade-system/dept/tree',
            method: 'get',
            params: {
                tenantId: useAppState.tenantId,
            }
        }, false);
    },
    //删除
    async remove(ids) {
        return httpApi({
            url: '/api/blade-system/dept/remove',
            method: 'post',
            params: {
                ids,
            }
        }, false);
    },
    //提交
    async submit(form) {
        return httpApi({
            url: '/api/blade-system/dept/submit',
            method: 'post',
            data: form
        }, false);
    },
    //获取相关数据
    async getList(form) {
        return httpApi({
            url: '/api/blade-system/dept/list',
            method: 'get',
            params: form
        }, false);
    },
}
