增加主机信息功能
This commit is contained in:
22
web-vue/packages/biz/api/biz/mySftpAccounts.ts
Normal file
22
web-vue/packages/biz/api/biz/mySftpAccounts.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now https://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
* @author gaoxq
|
||||
*/
|
||||
import { BasicModel } from '@jeesite/core/api/model/baseModel';
|
||||
import { MySftpHosts } from '@jeesite/biz/api/biz/mySftpHosts';
|
||||
|
||||
export interface MySftpAccounts extends BasicModel<MySftpAccounts> {
|
||||
createTime?: string; // 记录时间
|
||||
accountId?: string; // 账号标识
|
||||
hostId: MySftpHosts; // 主机名称 父类
|
||||
username: string; // 登录账号
|
||||
password: string; // 登录密码
|
||||
rootPath: string; // 初始目录
|
||||
authType: string; // 认证方式
|
||||
privateKey?: string; // 密钥内容
|
||||
expireTime?: string; // 过期时间
|
||||
accountRemark?: string; // 账号备注
|
||||
updateTime?: string; // 更新时间
|
||||
ustatus: string; // 状态
|
||||
}
|
||||
53
web-vue/packages/biz/api/biz/mySftpHosts.ts
Normal file
53
web-vue/packages/biz/api/biz/mySftpHosts.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now https://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 { MySftpAccounts } from '@jeesite/biz/api/biz/mySftpAccounts';
|
||||
import { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
||||
import { UploadFileParams } from '@jeesite/types/axios';
|
||||
import { AxiosProgressEvent } from 'axios';
|
||||
|
||||
const { ctxPath, adminPath } = useGlobSetting();
|
||||
|
||||
export interface MySftpHosts extends BasicModel<MySftpHosts> {
|
||||
createTime?: string; // 记录时间
|
||||
hostId?: string; // 主机主键
|
||||
hostIp: string; // 主机域名
|
||||
hostPort: number; // 主机端口
|
||||
hostName: string; // 主机名称
|
||||
hostRemark?: string; // 备注说明
|
||||
updateTime?: string; // 更新时间
|
||||
ustatus: string; // 状态
|
||||
mySftpAccountsList?: MySftpAccounts[]; // 子表列表
|
||||
}
|
||||
|
||||
export const mySftpHostsList = (params?: MySftpHosts | any) =>
|
||||
defHttp.get<MySftpHosts>({ url: adminPath + '/biz/mySftpHosts/list', params });
|
||||
|
||||
export const mySftpHostsListData = (params?: MySftpHosts | any) =>
|
||||
defHttp.post<Page<MySftpHosts>>({ url: adminPath + '/biz/mySftpHosts/listData', params });
|
||||
|
||||
export const mySftpHostsForm = (params?: MySftpHosts | any) =>
|
||||
defHttp.get<MySftpHosts>({ url: adminPath + '/biz/mySftpHosts/form', params });
|
||||
|
||||
export const mySftpHostsSave = (params?: any, data?: MySftpHosts | any) =>
|
||||
defHttp.postJson<MySftpHosts>({ url: adminPath + '/biz/mySftpHosts/save', params, data });
|
||||
|
||||
export const mySftpHostsImportData = (
|
||||
params: UploadFileParams,
|
||||
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
||||
) =>
|
||||
defHttp.uploadFile<UploadApiResult>(
|
||||
{
|
||||
url: ctxPath + adminPath + '/biz/mySftpHosts/importData',
|
||||
onUploadProgress,
|
||||
},
|
||||
params,
|
||||
);
|
||||
|
||||
export const mySftpHostsDelete = (params?: MySftpHosts | any) =>
|
||||
defHttp.get<MySftpHosts>({ url: adminPath + '/biz/mySftpHosts/delete', params });
|
||||
Reference in New Issue
Block a user