import {httpApi} from "../request/httpApi";

//用户配置保存
export const userConfigSave = (form, msg = true) => httpApi({
    url: '/api/blade-business/defaultConfig/saveOrUpdate',
    method: 'post',
    data: form
}, msg);

//用户配置详情
export const userConfigInfo = (form, msg = true) => httpApi({
    url: '/api/blade-business/defaultConfig/detail',
    method: 'get',
    params: form
}, msg);

//获取类型
export const getDictionary = (form, msg = true) => httpApi({
    url: '/api/blade-system/dict/dictionary',
    method: 'get',
    params: form
}, msg);

//获取用户列表
export const getContractUserList = (form, msg = true) => httpApi({
    url: '/api/blade-manager/contractInfo/get-contract-userList',
    method: 'get',
    params: form
}, msg);

//获取档案的树
export const getArchiveTreeLazyTree = (form, msg = true) => httpApi({
    url: '/api/blade-manager/archiveTreeContract/lazy-tree',
    method: 'get',
    params: form
}, msg);

//初始化档案的树
export const initTree = (form, msg = true) => httpApi({
    url: '/api/blade-manager/archiveTreeContract/initTree',
    method: 'post',
    params: form
}, msg);

//删除
export const remove = (form, msg = true) => httpApi({
    url: '/api/blade-manager/archiveTreeContract/remove',
    method: 'post',
    params: form
}, msg);

//新增
export const archiveTreeSave = (form, msg = true) => httpApi({
    url: '/api/blade-manager/archiveTreeContract/save',
    method: 'post',
    data: form
}, msg);

//编辑
export const archiveTreeDetail = (form, msg = true) => httpApi({
    url: '/api/blade-manager/archiveTreeContract/detail',
    method: 'get',
    params: form
}, msg);

//更新
export const archiveTreeUpdate = (form, msg = true) => httpApi({
    url: '/api/blade-manager/archiveTreeContract/update',
    method: 'post',
    data: form
}, msg);

//获取归档树同级节点
export const getSameGradeNode = (form, msg = true) => httpApi({
    url: '/api/blade-manager/archiveTreeContract/get-same-grade-node',
    method: 'post',
    params: form
}, msg);



//排序
export const submitArchiveTreeSort = (form, msg = true) => httpApi({
    url: '/api/blade-manager/archiveTreeContract/submit-tree-sort',
    method: 'post',
    data: form
}, msg);

//同步
export const syncProjectTree = (form, msg = true) => httpApi({
    url: '/api/blade-manager/archiveTreeContract/syncProjectTree',
    method: 'post',
    params: form
}, msg);


//所属角色
export const roletree = (form, msg = true) => httpApi({
    url: '/api/blade-system/role/tree',
      method: 'get',
      params: {
        tenantId: ''
      }
}, msg);


