import request from "@/utils/request"

/** 分页列表 */
export function listEquipmentWorkStandard(query) {
  return request({
    url: "/equipment/workStandard/list",
    method: "get",
    params: query
  })
}

/** 详情 */
export function getEquipmentWorkStandard(id) {
  return request({
    url: "/equipment/workStandard/" + id,
    method: "get"
  })
}

/** 新增 */
export function addEquipmentWorkStandard(data) {
  return request({
    url: "/equipment/workStandard",
    method: "post",
    data
  })
}

/** 修改 */
export function updateEquipmentWorkStandard(data) {
  return request({
    url: "/equipment/workStandard",
    method: "put",
    data
  })
}

/** 删除 */
export function delEquipmentWorkStandard(ids) {
  return request({
    url: "/equipment/workStandard/" + ids,
    method: "delete"
  })
}

/** 同步知识库 */
export function syncKbEquipmentWorkStandard(id) {
  return request({
    url: "/equipment/workStandard/syncKb/" + id,
    method: "post"
  })
}

/** 移出知识库 */
export function removeKbEquipmentWorkStandard(id) {
  return request({
    url: "/equipment/workStandard/removeKb/" + id,
    method: "post"
  })
}

/** 发布 */
export function publishEquipmentWorkStandard(id) {
  return request({
    url: "/equipment/workStandard/publish/" + id,
    method: "post"
  })
}

/** 下架 */
export function offlineEquipmentWorkStandard(id) {
  return request({
    url: "/equipment/workStandard/offline/" + id,
    method: "post"
  })
}
