import request from '@/router/axios';


//树节点懒加载
export const lazyTree = (params) => {
    return request({
        url: '/api/blade-manager/archiveTreeContract/lazy-tree',
        method: 'get',
        params
    })
}

//词典接口
export const dictionary = (params) => {
    return request({
        url: '/api/blade-system/dict-biz/dictionary',
        method: 'get',
        params
    })
}

//删除
export const remove = (params) => {
    return request({
        url: '/api/blade-manager/archiveTreeContract/remove',
        method: 'post',
        params
    })
}

//新增
export const archiveTreeSave = (data) => {
    return request({
        url: '/api/blade-manager/archiveTreeContract/save',
        method: 'post',
        data
    })
}

//编辑
export const archiveTreeUpdate = (data) => {
    return request({
        url: '/api/blade-manager/archiveTreeContract/update',
        method: 'post',
        data
    })
}

//编辑
export const archiveTreeDetail = (params) => {
    return request({
        url: '/api/blade-manager/archiveTreeContract/detail',
        method: 'get',
        params
    })
}

//全加载树形结构-显示树
export const archiveTreetree = (params) => {
    return request({
        url: '/api/blade-manager/archiveTreeContract/tree',
        method: 'get',
        params
    })
}


//保存树
export const submitDisplayConfigTree = (params) => {
    return request({
        url: '/api/blade-manager/archiveTreeContract/submit-display-config-tree',
        method: 'post',
        params
    })
}

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

//提交归档树手动排序
export const submitArchiveTreeSort = (data) => {
  return request({
    url: '/api/blade-manager/archiveTreeContract/submit-tree-sort',
    method: 'post',
    data
  })
}
