import { ConfigVO } from '@/api/interface/system/config' import http from '@/api' /** * @name 根据参数键名查询参数值 * @param ossConfigId ossConfigId * @returns returns */ export const getConfigKeyApi = (configKey: string) => { return http.get(`/system/config/configKey/${configKey}`) } /** * @name 查询参数配置列表 * @param query 参数 * @returns 返回列表 */ export const listConfigApi = (query: any) => { return http.get('/system/config/list', query, { loading: true }) } /** * @name 查询参数配置详细 * @param configId configId * @returns returns */ export const getConfigApi = (configId: any) => { return http.get(`/system/config/${configId}`) } /** * @name 新增参数配置 * @param data data * @returns returns */ export const addConfigApi = (data: any) => { return http.post('/system/config', data, { loading: false }) } /** * @name 修改参数配置 * @param data data * @returns returns */ export const updateConfigApi = (data: any) => { return http.put('/system/config', data, { loading: false }) } /** * @name 修改参数配置 * @param data data * @returns returns */ export const updateConfigByKeyApi = (data: any) => { return http.put('/system/config/updateByKey', data, { loading: false }) } /** * @name 删除参数配置 * @param configId configId * @returns returns */ export const delConfigApi = (configId: any) => { return http.delete(`/system/config/${configId}`) } /** * @name 下载模板 * @returns returns */ export const importTemplateApi = () => { return http.downloadPost('/system/config/importTemplate', {}) } /** * @name 导入数据 * @returns returns */ export const importConfigDataApi = (data: any) => { return http.post('/system/config/importData', data) } /** * @name 导出数据 * @returns returns */ export const exportConfigApi = (data: any) => { return http.downloadPost('/system/config/export', data) }