/**
 * Created by lk on 17/6/4.
 */
import axios from "@/utils/request";

// 获取列表
export function systemPDFTemplateList(query) {
    return axios({
        url: "/system/pdf/template/list",
        method: "get",
        params: query
    });
}
export function systemPDFModuleList(query) {
    return axios({
        url: "/system/pdf/module/list",
        method: "get",
        params: query
    });
}

export function getSystemPDFModules(query) {
    return axios({
        url: "/system/pdf/module/pdfModules",
        method: "get",
        params: query
    });
}

export function getSystemPDFTemplates(query) {
    return axios({
        url: "/system/pdf/template/pdfTemplates",
        method: "get",
        params: query
    });
}

export function systemPDFTemplateSave(data, formName, method = "post") {
    let url = formName === "add" ? "/system/pdf/template/save" : "/system/pdf/template/update";
    return axios({
        url: url,
        method: method,
        data: data
    });
}

export function systemPDFModuleSave(data, formName, method = "post") {
    let url = formName === "add" ? "/system/pdf/module/save" : "/system/pdf/module/update";
    return axios({
        url: url,
        method: method,
        data: data
    });
}

export function systemPDFTemplateDeleteById(query) {
    return axios({
        url: "/system/pdf/template/delete",
        method: "get",
        params: query
    });
}

export function moduleDetail(query) {
    return axios({
        url: "/system/pdf/module/detail",
        method: "get",
        params: query
    });
}


export function updateDetailRel(query) {
    return axios({
        url: "/system/pdf/module/updateRl",
        method: "post",
        data: query
    });
}

