import request from '@/router/axios';
//获取规范文件夹分页
export const getPage = (params) => {
    return request({
        url: '/api/blade-business/PrivateStandard/page',
        method: 'get',
        params
    })
}
//获取规范文件夹详情
export const getById = (params) => {
    return request({
        url: '/api/blade-business/PrivateStandard/getById',
        method: 'get',
        params
    })
}
//新增数据
export const add = (data) => {
    return request({
        url: '/api/blade-business/PrivateStandard/add',
        method: 'post',
    
        data,
         headers: {
        'Content-Type': 'multipart/form-data'
        },
    });
}
export const edit = (data) => {
    return request({
        url: '/api/blade-business/PrivateStandard/edit',
        method: 'post',
        data,
    });
}

export const deleteItem = (data) => {
    return request({
        url: '/api/blade-business/PrivateStandard/delete',
        method: 'get',
        params:data
    });
}

//规范参数

export const getInfoPage = (params) => {
    return request({
        url: '/api/blade-business/uStandardInfo/page',
        method: 'get',
        params
    })
}

export const getInfoById = (params) => {
    return request({
        url: '/api/blade-business/uStandardInfo/getById',
        method: 'get',
        params
    })
}


//新增数据
export const addInfo = (data) => {
    return request({
        url: '/api/blade-business/uStandardInfo/add',
        method: 'post',
        data
    });
}
export const editInfo = (data) => {
    return request({
        url: '/api/blade-business/uStandardInfo/edit',
        method: 'post',
        data
    });
}

export const deleteItemInfo = (data) => {
    return request({
        url: '/api/blade-business/uStandardInfo/delete',
        method: 'get',
        params:data
    });
}
//条件设置
export const saveConditionSet = (data,id) => {
    return request({
        url: '/api/blade-business/uStandardInfo/saveConditionSet'+'?id='+id,
        method: 'post',
        data
    });
}
//关联元素
export const saveElementJoin = (data,id) => {
    return request({
        url: '/api/blade-business/uStandardInfo/saveElementJoin'+'?id='+id,
        method: 'post',
        data
    });
}

//删除条件设置
export const deleteConditionSet = (data) => {
    return request({
        url: '/api/blade-business/uStandardInfo/deleteConditionSet',
        method: 'get',
        params:data
    });
}
//删除关联元素
export const deleteElementJoin = (data) => {
    return request({
        url: '/api/blade-business/uStandardInfo/deleteElementJoin',
        method: 'get',
        params:data
    });
}
//查询条件设置
export const getConditionSet = (params) => {
    return request({
        url: '/api/blade-business/uStandardInfo/getConditionSet',
        method: 'get',
        params
    })
}
//查询关联元素
export const getElementJoin = (params) => {
    return request({
        url: '/api/blade-business/uStandardInfo/getElementJoin',
        method: 'get',
        params
    })
}

//效果预览
//查询关联元素
export const effectPreview = (params) => {
    return request({
        url: '/api/blade-business/uStandardInfo/effectPreview',
        method: 'get',
        params
    })
}

//新增数据
export const updateTypeByTwo = (data) => {
    return request({
        url: '/api/blade-business/PrivateStandard/updateTypeByTwo',
        method: 'post',
    
        data,
         headers: {
        'Content-Type': 'multipart/form-data'
        },
    });
}

export const standardUpdate = (params) => {
    return request({
        url: '/api/blade-business/PrivateStandard/standardUpdate',
        method: 'get',
        params
    })
}