import request from '@/router/axios';

//初始化根节点
export const archiveTreeInit = (data) => {
    return request({
        url: '/api/blade-manager/archiveTree/init',
        method: 'post',
        params: data
    })
}


//树节点懒加载
export const lazyTree = (params) => {
    return request({
        url: '/api/blade-manager/archiveTree/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/archiveTree/remove',
        method: 'post',
        params
    })
}

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

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

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

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


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

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

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

//设置立卷规则保存接口
export const saveArchiveAutoRule = (params) => {
    return request({
      url: '/api/blade-manager/archiveTree/saveArchiveAutoRule',
      method: 'post',
      params
    })
  }

  //删除立卷规则接口
export const removeArchiveAutoRule = (params) => {
    return request({
      url: '/api/blade-manager/archiveTree/removeArchiveAutoRule',
      method: 'post',
      params
    })
  }

  //查看立卷规则接口
export const getArchiveAutoRule = (params) => {
    return request({
      url: '/api/blade-manager/archiveTree/getArchiveAutoRule',
      method: 'post',
      params
    })
  }

//修改立卷规则接口
export const updateArchiveAutoRule = (params) => {
  return request({
    url: '/api/blade-manager/archiveTree/updateArchiveAutoRule',
    method: 'post',
    params
  })
}

//同步节点
export const syncProjectTree = (params) => {
    return request({
      url: '/api/blade-manager/archiveTree/syncProjectTree',
      method: 'post',
      params
    })
  }

  