1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- 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<ConfigVO>(`/system/config/configKey/${configKey}`)
- }
- /**
- * @name 查询参数配置列表
- * @param query 参数
- * @returns 返回列表
- */
- export const listConfigApi = (query: any) => {
- return http.get<any>('/system/config/list', query, { loading: true })
- }
- /**
- * @name 查询参数配置详细
- * @param configId configId
- * @returns returns
- */
- export const getConfigApi = (configId: any) => {
- return http.get<any>(`/system/config/${configId}`)
- }
- /**
- * @name 新增参数配置
- * @param data data
- * @returns returns
- */
- export const addConfigApi = (data: any) => {
- return http.post<any>('/system/config', data, { loading: false })
- }
- /**
- * @name 修改参数配置
- * @param data data
- * @returns returns
- */
- export const updateConfigApi = (data: any) => {
- return http.put<any>('/system/config', data, { loading: false })
- }
- /**
- * @name 修改参数配置
- * @param data data
- * @returns returns
- */
- export const updateConfigByKeyApi = (data: any) => {
- return http.put<any>('/system/config/updateByKey', data, { loading: false })
- }
- /**
- * @name 删除参数配置
- * @param configId configId
- * @returns returns
- */
- export const delConfigApi = (configId: any) => {
- return http.delete<any>(`/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)
- }
|