// 公共文件柜
import request from '@/utils/request'

// 导航栏
export function index(params) {
  return request({
    url: '/api/oa/document/index',
    method: 'get',
    params,
  })
}
export function show(params, isLoading = true) {
  return request({
    method: 'get',
    url: '/api/oa/document/show',
    params,
    isLoading
  })
}

export function save(data, isLoading = true) {
  return request({
    method: 'post',
    url: '/api/oa/document/save',
    data,
    isLoading
  })
}

export function destroy(params, isLoading = true) {
  return request({
    method: 'get',
    url: '/api/oa/document/destroy',
    params,
    isLoading
  })
}

// 文件柜
export function menuIndex(params) {
  return request({
    url: '/api/oa/document-menu/index',
    method: 'get',
    params
  })
}
export function menuShow(params, isLoading = true) {
  return request({
    method: 'get',
    url: '/api/oa/document-menu/show',
    params,
    isLoading
  })
}

export function menuSave(data, isLoading = true) {
  return request({
    method: 'post',
    url: '/api/oa/document-menu/save',
    data,
    isLoading
  })
}

export function menuDestroy(params, isLoading = true) {
  return request({
    method: 'get',
    url: '/api/oa/document-menu/destroy',
    params,
    isLoading
  })
}
