diff --git a/src/api/ne/neHost.ts b/src/api/ne/neHost.ts new file mode 100644 index 00000000..51f22bc5 --- /dev/null +++ b/src/api/ne/neHost.ts @@ -0,0 +1,77 @@ +import { request } from '@/plugins/http-fetch'; + +/** + * 查询网元主机列表 + * @param query 查询参数 + * @returns object + */ +export function listNeHost(query: Record) { + return request({ + url: '/ne/host/list', + method: 'get', + params: query, + }); +} + +/** + * 查询网元主机详细 + * @param hostId 网元主机ID + * @returns object + */ +export function getNeHost(hostId: string | number) { + return request({ + url: `/ne/host/${hostId}`, + method: 'get', + }); +} + +/** + * 新增网元主机 + * @param data 网元主机对象 + * @returns object + */ +export function addNeHost(data: Record) { + return request({ + url: '/ne/host', + method: 'post', + data: data, + }); +} + +/** + * 修改网元主机 + * @param data 网元主机对象 + * @returns object + */ +export function updateNeHost(data: Record) { + return request({ + url: '/ne/host', + method: 'put', + data: data, + }); +} + +/** + * 删除网元主机 + * @param hostId 网元主机ID + * @returns object + */ +export function delNeHost(hostId: string | number) { + return request({ + url: `/ne/host/${hostId}`, + method: 'delete', + }); +} + +/** + * 测试连接网元主机 + * @param data 网元主机对象 + * @returns object + */ +export function testNeHost(data: Record) { + return request({ + url: '/ne/host/test', + method: 'post', + data: data, + }); +} \ No newline at end of file diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 2e89e821..2c3bcb3a 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -542,6 +542,31 @@ export default { }, }, }, + ne: { + neHost: { + hostType: "Type", + groupId: "Group", + title: "Host Name", + titlePlease: "Please fill in the host name correctly", + addr: "IP Addr", + addrPlease: "Please fill in the host IP address correctly", + port: "Port", + user: "Login User", + userPlease: "Please fill in the host login user correctly", + authMode: "Auth Mode", + password: "Password", + privateKey: "Private Key", + passPhrase: "Private Key Cipher", + remark: "Remark", + createTime: "Time", + delTip: "Confirm that you want to delete the host number [{num}]?", + ok: "Successful Operation", + addTitle: "Add Host Connection", + editTitle: "Edit Host Connection", + test: "Test Connection To Host", + testOk: "Test Connection Successful", + }, + }, neUser: { auth: { authInfo:'Authentication Info', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index c0a227be..a1f4d9d4 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -542,6 +542,31 @@ export default { }, } }, + ne: { + neHost: { + hostType: "主机类型", + groupId: "分组", + title: "主机名称", + titlePlease: "请正确填写主机名称", + addr: "IP地址", + addrPlease: "请正确填写主机IP地址", + port: "端口", + user: "用户名", + userPlease: "请正确填写主机登录用户", + authMode: "认证模式", + password: "密码", + privateKey: "私钥", + passPhrase: "私钥密码", + remark: "备注信息", + createTime: "创建时间", + delTip: "确认要删除主机编号为【{num}】的信息吗?", + ok: "操作成功", + addTitle: "新增主机连接", + editTitle: "编辑主机连接", + test: "测试连接", + testOk: "测试连接成功", + }, + }, neUser: { auth: { authInfo:'鉴权信息', diff --git a/src/views/ne/neHost/index.vue b/src/views/ne/neHost/index.vue new file mode 100644 index 00000000..58010df8 --- /dev/null +++ b/src/views/ne/neHost/index.vue @@ -0,0 +1,783 @@ + + + + +