// 登录校验接口
import httputils from '@/api/httputils'
const baseApi = '/graph/drafts/';

//创建拓扑图
export function creatTopo(postParams: any): any {
    return httputils.postJson(`/labsl${baseApi}create`, postParams)
}

// 查询系统图分类
export function queryCategoryGraph(postParams: any): any {
    return httputils.postJson(`/labsl/graph-category/query`, postParams)
}

// 查询未发布的图
export function queryDraftsGraph(postParams: any): any {
    return httputils.postJson(`/labsl/graph/drafts/query`, postParams)
}

// 查询已发布的图
export function queryPubGraph(postParams: any): any {
    return httputils.postJson(`/labsl/graph/pub/query`, postParams)
}

// 发布
export function publishGraph(postParams: any): any {
    return httputils.postJson(`/labsl/graph/drafts/publish`, postParams)
}

// 删除未发布
export function deleteDraftsGraph(postParams: any): any {
    return httputils.postJson(`/labsl/graph/drafts/recycle`, postParams)
}

// 删除已发布
export function deletePubGraph(postParams: any): any {
    return httputils.postJson(`/labsl/graph/pub/recycle`, postParams)
}

// 更新未发布
export function updateDraftsGraph(postParams: any): any {
    return httputils.postJson(`/labsl/graph/drafts/update`, postParams)
}

// 更新已发布
export function updatePubGraph(postParams: any): any {
    return httputils.postJson(`/labsl/graph/pub/update`, postParams)
}

// 回收站恢复
export function recoveryGraph(postParams: any): any {
    return httputils.postJson(`/labsl/graph/recycle/recovery`, postParams)
}

// 新建拓扑图
export function createGraph(postParams: any): any {
    return httputils.postJson(`/labsl/graph/drafts/create`, postParams)
}