
import request from '@/assets/js/utils/request'
/*
 * =======================大唐-单点登录==============================
 * */
// 校验用户名密码
export function ssoLogin(code) {
  return request({
    url: '/bidprocurement/datacenter-dangtfz/dtLoginCenterController/ssoLogin?code=' + code,
    method: 'post'
  })
}
// 获取大唐SSO跳转地址
export function ssoRedirectUrl(loginType) {
  return request({
    url: '/bidprocurement/datacenter-dangtfz/dtLoginCenterController/ssoRedirectUrl?loginType=' + loginType,
    method: 'post'
  })
}
/*
 * =======================日志==============================
 * */
// 订单日志
export function queryOrderLog(data) {
  return request({
    url: '/bidprocurement/datacenter-dangtfz/systemBizOperationLog/querysapOrderLog',
    method: 'post',
    data
  })
}
// 采购单日志
export function queryPurchaseOrderLog(data) {
  return request({
    url: '/bidprocurement/datacenter-dangtfz/systemBizOperationLog/queryPurchaseOrderLog',
    method: 'post',
    data
  })
}
// 查询行项目日志
export function queryPlanDetailLog(data) {
  return request({
    url: '/bidprocurement/datacenter-dangtfz/systemBizOperationLog/queryPlanDetailLog',
    method: 'post',
    data
  })
}
/*
 * =======================模板下载==============================
 * */
// 模板下载
// 查询行项目日志
export function downloadTemplate(data) {
  return request({
    url: '/bidprocurement/datacenter-dangtfz/systemDownloadTemplate/downloadTemplate',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
/*
 * =======================模板下载==============================
 * */
// 流程监督 - 删除按钮数据
export function deleteButtonById(data) {
  return request({
    url: '/bidprocurement/datacenter-dangtfz/permissionsButton/deleteButtonById?id=' + data.id,
    method: 'post',
    data
  })
}
// 流程监督 - 查询按钮显示信息列表
export function queryButtonList(data) {
  return request({
    url: '/bidprocurement/datacenter-dangtfz/permissionsButton/queryButtonList',
    method: 'post',
    data
  })
}
// 流程监督 - 增加或修改按钮数据
export function saveOrUpdateButton(data) {
  return request({
    url: '/bidprocurement/datacenter-dangtfz/permissionsButton/saveOrUpdateButton',
    method: 'post',
    data
  })
}

// 流程监督 - 查询按钮显示信息列表
export function getRoleButtonList(data) {
  return request({
    url: '/bidprocurement/datacenter-dangtfz/permissionsRoleButton/getRoleButtonList?roleId=' + data.roleId,
    method: 'post',
    data
  })
}
// 流程监督 - 设置按钮权限
export function setRoleButtonList(data) {
  return request({
    url: '/bidprocurement/datacenter-dangtfz/permissionsRoleButton/setRoleButtonList?roleId=' + data.roleId + '&buttonIds=' + data.buttonIds,
    method: 'post',
    data
  })
}
