import request from '@/utils/request'


export function searchTemplateCategory(data) {
  return request({
    url: '/template/category/search',
    method: 'post',
    data
  })
}
/* 获取全部分类接口 /template/category/selcetList*/
export function selcetList(data) {
  return request({
    url: '/template/category/selcetList',
    method: 'post',
    data
  })
}



export function getAllCategory(data) {
  return request({
    url: '/template/category/all',
    method: 'post',
    data
  })
}



export function createTemplateCategory(data) {
  return request({
    url: '/template/category/create',
    method: 'post',
    data
  })
}



export function updateTemplateCategory(data) {
  return request({
    url: '/template/category/update',
    method: 'post',
    data
  })
}


export function getTemplateCategoryInfo(data) {
  return request({
    url: '/template/category/info',
    method: 'post',
    data
  })
}



export function deleteTemplateCategory(id) {
  return request({
    url: `/template/category/delete/${id}`,
    method: 'get'
  })
}


/* 模块列表 */
export function pageTemplate(data) {
  return request({
    url: '/document/block/list',
    method: 'post',
    data
  })
}

export function searchTemplate(data) {
  return request({
    url: '/template/search',
    method: 'post',
    data
  })
}



export function getTemplateInfo(id) {
  return request({
    url: `/document/block/info/${id}`,
    method: 'get',
  })
}




export function deleteTemplate(dcbId) {
  return request({
    url: `/document/block/dele/${dcbId}`,
    method: 'get'
  })
}



/* 新增模板块 */
export function createTemplate(data) {
  return request({
    url: '/document/block/add',
    method: 'post',
    data
  })
}




export function updateTemplate(data) {
  return request({
    url: '/document/block/edit',
    method: 'post',
    data
  })
}


/*template/category/allList  */


export function getAllList(data) {
  return request({
    url: '/template/category/allList',
    method: 'post',
    data
  })
}

/* 获取树状分类  /template/category/treeCategory */

export function treeCategory(data) {
  return request({
    url: '/template/category/treeCategory',
    method: 'post',
    data
  })
}