diff --git a/src/api/remote/index.ts b/src/api/remote/index.ts index 3ee75a6..84667d4 100644 --- a/src/api/remote/index.ts +++ b/src/api/remote/index.ts @@ -1,14 +1,16 @@ import request from "@/utils/request"; import { AxiosPromise } from "axios"; import { - DeviceMonitorForm, + DeviceMonitorForm, OptionTree, PingForm, RemoteDevInfoVO, - RemoteOperateResult, SpeedInfo, + RemoteOperateResult, + SpeedInfo, UnBindingForm } from "@/api/remote/types"; import { DeviceLinkVO } from "@/api/operate-log/types"; import { FTTRInfoVO, ServiceCompareVO } from "@/api/operate-result-args/types"; +import { string } from "fast-glob/out/utils"; export function remoteDevInfo(devId: number): AxiosPromise { return request({ @@ -170,3 +172,72 @@ export function remoteVendorProfile(devId: number, fileId?: number) { method: "GET", }); } +export function remoteTreeNode( + devId?: number, + nodePath?: string +): AxiosPromise { + return request({ + url: `/api/equipment/v1/remote/tree/infos/${devId}`, + method: "GET", + params: { nodePath }, + }); +} +export function remoteGetParameterValues( + devId?: number, + nodePath?: string +): AxiosPromise { + return request({ + url: `/api/equipment/v1/remote/tree/param-value/${devId}`, + method: "GET", + params: { nodePath }, + }); +} +export function remoteSetParameterValues( + devId?: number, + nodePath?: string, + argValue?: string +) { + return request({ + url: `/api/equipment/v1/remote/tree/set-param-value/${devId}`, + method: "PUT", + params: { nodePath, argValue }, + }); +} +export function remoteGetParameterAttributes( + devId?: number, + nodePath?: string +): AxiosPromise { + return request({ + url: `/api/equipment/v1/remote/tree/param-attribute/${devId}`, + method: "GET", + params: { nodePath }, + }); +} +export function remoteSetParameterAttributes( + devId?: number, + nodePath?: string, + argValue?: string +): AxiosPromise { + return request({ + url: `/api/equipment/v1/remote/tree/set-param-attribute/${devId}`, + method: "PUT", + params: { nodePath, argValue }, + }); +} +export function remoteAddInstanceNode( + devId?: number, + nodePath?: string +): AxiosPromise { + return request({ + url: `/api/equipment/v1/remote/tree/add-instance-node/${devId}`, + method: "GET", + params: { nodePath }, + }); +} +export function remoteDeleteInstanceNode(devId?: number, nodePath?: string) { + return request({ + url: `/api/equipment/v1/remote/tree/delete-instance-node/${devId}`, + method: "GET", + params: { nodePath }, + }); +} diff --git a/src/api/remote/types.ts b/src/api/remote/types.ts index 7424128..44901c2 100644 --- a/src/api/remote/types.ts +++ b/src/api/remote/types.ts @@ -85,3 +85,15 @@ export interface SpeedInfo { downloadUrls: string[]; speedMaxRate: string; } +export interface OptionTree { + /** 值 */ + value?: string | number; + /** 文本 */ + label?: string; + /**是否有子节点*/ + childNode?: boolean; + + nodePath?: string; + /** 子列表 */ + children?: OptionTree[]; +} diff --git a/src/assets/icons/file.svg b/src/assets/icons/file.svg new file mode 100644 index 0000000..6ec99de --- /dev/null +++ b/src/assets/icons/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index a8cf5eb..3cf487a 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -283,7 +283,6 @@ function closeAllTags(view: TagView) { */ function openContentMenu(tag: TagView, e: MouseEvent) { const menuMinWidth = 105; - const offsetLeft = proxy?.$el.getBoundingClientRect().left; // container margin left const offsetWidth = proxy?.$el.offsetWidth; // container width const maxLeft = offsetWidth - menuMinWidth; // left boundary diff --git a/src/router/index.ts b/src/router/index.ts index 14c0a79..3eff550 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -346,7 +346,7 @@ export const constantRoutes: RouteRecordRaw[] = [ }, }, { - path: "/resources/remote/device-speed/:devId/:pppoe", + path: "/resources/remote/device-speed/:devId", name: "DeviceSpeed", component: () => import( @@ -397,6 +397,19 @@ export const constantRoutes: RouteRecordRaw[] = [ title: "自定义节点", }, }, + { + path: "/resources/remote/device-param-tree/:devId", + name: "DeviceParamTree", + component: () => + import( + "@/views/family/operate/remote-operation/components/DeviceParamTree.vue" + ), + meta: { + hidden: true, + keepAlive: true, + title: "设备参数树", + }, + }, ], }, ]; diff --git a/src/utils/confirm.ts b/src/utils/confirm.ts index 346f2ed..20c4785 100644 --- a/src/utils/confirm.ts +++ b/src/utils/confirm.ts @@ -12,7 +12,7 @@ function confirm(message: string, ok: Function) { .catch((err) => { ElMessage({ type: "info", - message: "取消操作" + err, + message: "取消操作", }); }); } diff --git a/src/views/family/operate/remote-operation/components/DeviceParamTree.vue b/src/views/family/operate/remote-operation/components/DeviceParamTree.vue new file mode 100644 index 0000000..6f77f15 --- /dev/null +++ b/src/views/family/operate/remote-operation/components/DeviceParamTree.vue @@ -0,0 +1,385 @@ + + + + + diff --git a/src/views/family/operate/remote-operation/components/DeviceSpeed.vue b/src/views/family/operate/remote-operation/components/DeviceSpeed.vue index 1dbdb5e..e8e0d34 100644 --- a/src/views/family/operate/remote-operation/components/DeviceSpeed.vue +++ b/src/views/family/operate/remote-operation/components/DeviceSpeed.vue @@ -115,7 +115,7 @@ import { RemoteOperateResult } from "@/api/remote/types"; const route = useRoute(); let devId: number = parseInt(route.params.devId); -let pppoe: string = route.params?.pppoe; +let pppoe: string = route.query?.pppoe; const options = ref([]); const downloadUrl = ref(""); const speedMaxRate = ref(""); diff --git a/src/views/family/operate/remote-operation/components/RemoteOperateList.vue b/src/views/family/operate/remote-operation/components/RemoteOperateList.vue index 5c161a0..8e78a1d 100644 --- a/src/views/family/operate/remote-operation/components/RemoteOperateList.vue +++ b/src/views/family/operate/remote-operation/components/RemoteOperateList.vue @@ -5,65 +5,49 @@
- 设备参数树浏览 + 参数树浏览
设备Ping测试 + >Ping测试
设备配置文件上传 + >获取配置文件
获取设备终端日志文件 + >获取日志文件
-
- 设备更换 -
设备远程重启 + >远程重启
恢复设备出厂设置 + >远程工厂复位
设备厂商配置文件下发 + >下发配置文件
-
- 设备全业务配置下发 -
设备软件版本升级
-
- ATMF5Loopback诊断 -
-
- DslLoop诊断 -
设备监控 -
-
- IAD诊断 -
-
- 修改业务端口绑定 + >设备监控 +
测速操作 -
-
- 终端重置数图 -
-
- 重置IPTV组播 + >测速操作 +
自定义节点定制
-
- 宽带1、4口;ITV 2、3口 -
-
- 宽带3、4口;ITV 1、2口 -
-
- 宽带1口;ITV 2、3、4口 -
-
- 宽带1、3、4口;ITV 2口 -
-
- 宽带1、 2、3、4口 -
-
- 三合一终端宽带1、3口;ITV 2口 - -
- 通用信息修改 + 通用信息修改
@@ -137,6 +95,11 @@ const openPing = () => { path: `/resources/remote/ping/${prop.devId}`, }); }; +const openParamTree = () => { + router.push({ + path: `/resources/remote/device-param-tree/${prop.devId}`, + }); +}; const uploadConfig = () => { confirm("确认上传配置文件吗", () => { loading.value = true; @@ -204,7 +167,8 @@ const factoryReset = () => { }; const speedOperate = () => { router.push({ - path: `/resources/remote/device-speed/${prop.devId}/${prop.pppoe}`, + path: `/resources/remote/device-speed/${prop.devId}`, + query: { pppoe: prop.pppoe }, }); }; const deviceMonitor = () => { diff --git a/src/views/family/operate/remote-operation/components/TreeParamAttribute.vue b/src/views/family/operate/remote-operation/components/TreeParamAttribute.vue new file mode 100644 index 0000000..82f6d34 --- /dev/null +++ b/src/views/family/operate/remote-operation/components/TreeParamAttribute.vue @@ -0,0 +1,165 @@ + + + + +