import request from '@/utils/request' import qs from 'qs' export const getCoopCustomServices = (params) => { return new request({ url: './project/coopCustomServices/', method: 'get', params: params }); } export const get = (id) => { return new request({ url: './project/coopCustomServices/' + id, method: 'get', }); } export function saveOrUpdate(coopCustomService,attachmentIds,statements,dataSource,token) { return new request({ url: './project/coopCustomServices', method: (coopCustomService.id ? 'put' : 'post'), headers: { token }, data: { coopCustomService, attachmentIds, statements, dataSource, } }); } export function del(id) { return new request({ url: './project/coopCustomServices/' + id, method: 'delete', }); } export const getByUnitId = (unitId) => { return new request({ url: './project/coopCustomServices/getCoopCustomByUnitId/' + unitId, method: 'get', }); } export function downloadCoopCustom(params){ return new request({ url: './project/coopCustomServices/batchDownloadCoopCustom', method: 'get', params: params, responseType: 'blob', }); } export const getCustomServiceNameMapByIds = (id) => { return new request({ url: './project/coopCustomServices/getCustomServiceNameMapByIds/' + id, method: 'get', }); } export const getBaseUnitViews = (language) => { return new request({ url: './project/coopCustomServices/getUnitViews', method: 'get', params: { language } }); } export const getFiles = (params) => { return new request({ url: './file/sysAttachmentInfos', method: 'get', params: params }); }