CI / build-and-test (push) Canceled after 0s
以 ckcloudManage a44810c 为基础,只保留资产页面(台账、单据、基础数据、同步任务)、 登录/错误/个人资料等公共页面,以及资产单据“查看流程”用到的流程详情页; 统一登录应用编码默认 CK_ASSET,标题“资产管理”,本地端口 9090。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
60 lines
1.5 KiB
TypeScript
60 lines
1.5 KiB
TypeScript
import request from '@/config/axios'
|
|
|
|
export interface ConfigVO {
|
|
id: number | undefined
|
|
category: string
|
|
name: string
|
|
key: string
|
|
value: string
|
|
valueType: 'string' | 'number' | 'boolean' | 'json' | 'userGroup'
|
|
status: number
|
|
type: number
|
|
visible: boolean
|
|
remark: string
|
|
createTime: Date
|
|
}
|
|
|
|
export const BREADCRUMB_ENABLED_CONFIG_KEY = 'system.ui.breadcrumb.enabled'
|
|
|
|
// 查询参数列表
|
|
export const getConfigPage = (params: PageParam) => {
|
|
return request.get({ url: '/infra/config/page', params })
|
|
}
|
|
|
|
// 查询参数详情
|
|
export const getConfig = (id: number) => {
|
|
return request.get({ url: '/infra/config/get?id=' + id })
|
|
}
|
|
|
|
// 根据参数键名查询参数值
|
|
export const getConfigKey = (configKey: string) => {
|
|
return request.get<string | null>({
|
|
url: '/infra/config/get-value-by-key?key=' + encodeURIComponent(configKey)
|
|
})
|
|
}
|
|
|
|
// 新增参数
|
|
export const createConfig = (data: ConfigVO) => {
|
|
return request.post({ url: '/infra/config/create', data })
|
|
}
|
|
|
|
// 修改参数
|
|
export const updateConfig = (data: ConfigVO) => {
|
|
return request.post({ url: '/infra/config/update', data })
|
|
}
|
|
|
|
// 删除参数
|
|
export const deleteConfig = (id: number) => {
|
|
return request.post({ url: '/infra/config/delete?id=' + id })
|
|
}
|
|
|
|
// 批量删除参数
|
|
export const deleteConfigList = (ids: number[]) => {
|
|
return request.post({ url: '/infra/config/delete-list', params: { ids: ids.join(',') } })
|
|
}
|
|
|
|
// 导出参数
|
|
export const exportConfig = (params) => {
|
|
return request.download({ url: '/infra/config/export-excel', params })
|
|
}
|