import request from '@/assets/js/utils/request'

// 获取系统来源
export function getSystemSource(requestType) {
  return request({
    url: '/bidprocurement/common-tools/systemConfig/getSystemSource?requestType=' + requestType,
    method: 'post'
  })
}

// 根据键获取正式配置 （直接审核00 工作流审核01 平台审核02）
export function getSystemConfigValueByConfigType(configType) {
  return request({
    url: '/bidprocurement/common-tools/systemConfig/getSystemConfigValueByConfigType?configType=' + configType,
    method: 'post'
  })
}

// 系统配置列表
export function getSystemConfigList(data) {
  return request({
    url: '/bidprocurement/common-tools/systemConfig/getSystemConfigList',
    method: 'post',
    data
  })
}

// 保存系统配置
export function saveSystemConfig(data) {
  return request({
    url: '/bidprocurement/common-tools/systemConfig/saveSystemConfig',
    method: 'post',
    data
  })
}

// 查询系统配置
export function getSystemconfigById(id) {
  return request({
    url: '/bidprocurement/common-tools/systemConfig/getSystemconfigById?id=' + id,
    method: 'post'
  })
}

// 查询系统配置
export function deleteSystemconfigById(id) {
  return request({
    url: '/bidprocurement/common-tools/systemConfig/deleteSystemconfigById?id=' + id,
    method: 'post'
  })
}

// 导出系统配置信息excel
export function exportSystemConfigList(id) {
  return request({
    url: '/bidprocurement/common-tools/systemConfig/exportSystemConfigList',
    method: 'post',
    responseType: 'blob'
  })
}
// 查询系统文档列表
export function listSystemDocZipPages(data) {
  return request({
    url: '/bidprocurement/common-tools/attachmentDoc/listSystemDocZipPages',
    method: 'post',
    data
  })
}

// 查询系统文档详情
export function getSystemDocZipDetailById(id) {
  return request({
    url: '/bidprocurement/common-tools/attachmentDoc/getSystemDocZipDetail?id=' + id,
    method: 'post'
  })
}

export function delSystemZipDocById(id) {
  return request({
    url: '/bidprocurement/common-tools/attachmentDoc/deleteDocById?id=' + id,
    method: 'post'
  })
}

export function saveOrUpdateSystemDocZip(data) {
  return request({
    url: '/bidprocurement/common-tools/attachmentDoc/saveOrUpdateSystemDocZip',
    method: 'post',
    data
  })
}
