59 lines
2.2 KiB
TypeScript
59 lines
2.2 KiB
TypeScript
/**
|
|
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
|
* No deletion without permission, or be held responsible to law.
|
|
* @author gaoxq
|
|
*/
|
|
import { defHttp } from '@jeesite/core/utils/http/axios';
|
|
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
|
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
|
import { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
|
import { UploadFileParams } from '@jeesite/types/axios';
|
|
import { AxiosProgressEvent } from 'axios';
|
|
|
|
const { ctxPath, adminPath } = useGlobSetting();
|
|
|
|
export interface BizDbConfig extends BasicModel<BizDbConfig> {
|
|
createTime?: string; // 创建时间
|
|
dbType: string; // 数据库类型
|
|
dbName: string; // 数据库名称
|
|
dbIp: string; // 数据库IP
|
|
dbPort: number; // 数据库端口
|
|
dbUsername: string; // 数据库账号
|
|
dbPassword: string; // 数据库密码
|
|
description?: string; // 数据库描述
|
|
isEnabled: string; // 是否启用
|
|
dbSchemaName?: string; // schema名称
|
|
updateTime?: string; // 更新时间
|
|
ftenantId?: string; // 租户id
|
|
fflowId?: string; // 流程id
|
|
fflowTaskId?: string; // 流程任务主键
|
|
fflowState?: number; // 流程任务状态
|
|
}
|
|
|
|
export const bizDbConfigList = (params?: BizDbConfig | any) =>
|
|
defHttp.get<BizDbConfig>({ url: adminPath + '/biz/dbConfig/list', params });
|
|
|
|
export const bizDbConfigListData = (params?: BizDbConfig | any) =>
|
|
defHttp.post<Page<BizDbConfig>>({ url: adminPath + '/biz/dbConfig/listData', params });
|
|
|
|
export const bizDbConfigForm = (params?: BizDbConfig | any) =>
|
|
defHttp.get<BizDbConfig>({ url: adminPath + '/biz/dbConfig/form', params });
|
|
|
|
export const bizDbConfigSave = (params?: any, data?: BizDbConfig | any) =>
|
|
defHttp.postJson<BizDbConfig>({ url: adminPath + '/biz/dbConfig/save', params, data });
|
|
|
|
export const bizDbConfigImportData = (
|
|
params: UploadFileParams,
|
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
|
) =>
|
|
defHttp.uploadFile<UploadApiResult>(
|
|
{
|
|
url: ctxPath + adminPath + '/biz/dbConfig/importData',
|
|
onUploadProgress,
|
|
},
|
|
params,
|
|
);
|
|
|
|
export const bizDbConfigDelete = (params?: BizDbConfig | any) =>
|
|
defHttp.get<BizDbConfig>({ url: adminPath + '/biz/dbConfig/delete', params });
|