import request from "@/utils/request";

// 查询文章所属的栏目列表
export function listColumn(query) {
  return request({
    url: "/oa/column/list",
    method: "get",
    params: query,
  });
}
//流程
export function listColumn3(query) {
  return request({
    url: "/oa/column/list/flow",
    method: "get",
    params: query,
  });
}
export function listColumn2(query) {
  return request({
    url: "/oa/column/list/article",
    method: "get",
    params: query,
  });
}

// 查询文章所属的栏目详细
export function getColumn(id) {
  return request({
    url: "/oa/column/" + id,
    method: "get",
  });
}

// 新增文章所属的栏目
export function addColumn(data) {
  return request({
    url: "/oa/column",
    method: "post",
    data: data,
  });
}

// 修改文章所属的栏目
export function updateColumn(data) {
  return request({
    url: "/oa/column",
    method: "put",
    data: data,
  });
}

// 删除文章所属的栏目
export function delColumn(id) {
  return request({
    url: "/oa/column/" + id,
    method: "delete",
  });
}
//查询文章列表
export function listByColumnId(query) {
  return request({
    url: "/oa/article/listByColumnId",
    method: "get",
    params: query,
  });
}
//栏目树
export function columnTree() {
  return request({
    url: "/oa/column/columnTree",
    method: "get",
  });
}
//栏目权限
export function queryRoleColumns() {
  return request({
    url: "oa/column/queryRoleColumns",
    method: "get",
  });
}
