From 19668bc2d614f0ccbc866575f70c517a76e2a53b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=B0=8F=E6=9E=97?= <320730042@qq.com> Date: Thu, 11 Jul 2024 18:05:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E5=A4=87=E9=93=BE=E8=B7=AF?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/operate-log/types.ts | 6 ++ src/api/order/index.ts | 4 +- src/api/order/types.ts | 6 +- src/api/remote/index.ts | 30 ++++++- src/api/remote/types.ts | 4 + .../order/components/OrderInfoEdit.vue | 20 ++--- .../components/DeviceAbility.vue | 1 + .../components/DeviceLinkInfo.vue | 85 +++++++++++++++++++ .../components/DeviceOrder.vue | 16 ++-- .../components/DeviceStatus.vue | 41 +++++++-- .../components/DeviceTaskTable.vue | 6 +- .../components/RemoteOperateInfo.vue | 8 +- .../system/user/components/dept-tree.vue | 2 +- 13 files changed, 184 insertions(+), 45 deletions(-) create mode 100644 src/views/family/operate/remote-operation/components/DeviceLinkInfo.vue diff --git a/src/api/operate-log/types.ts b/src/api/operate-log/types.ts index b1d57ee..3ff7f78 100644 --- a/src/api/operate-log/types.ts +++ b/src/api/operate-log/types.ts @@ -11,3 +11,9 @@ export interface ParamInfo { actualValue?: string; remarks?: string; } + +export interface DeviceLinkVO { + title?: string; + + list?: ParamInfo[]; +} diff --git a/src/api/order/index.ts b/src/api/order/index.ts index 5a47841..2d51afa 100644 --- a/src/api/order/index.ts +++ b/src/api/order/index.ts @@ -111,9 +111,9 @@ export function deviceOderTablePage( }); } -export function checkDeviceExits(devSnoOui: string): AxiosPromise { +export function checkDeviceExits(adNo: string): AxiosPromise { return request({ - url: `/api/order/v1/check-dev/${devSnoOui}`, + url: `/api/order/v1/check-dev/${adNo}`, method: "GET", }); } diff --git a/src/api/order/types.ts b/src/api/order/types.ts index 9f5c2c7..0687089 100644 --- a/src/api/order/types.ts +++ b/src/api/order/types.ts @@ -115,11 +115,7 @@ export interface DevOuiSnoSearchForm extends PageQuery { export type DevOuiSnoPageResult = PageResult; export interface DeviceOrderQuery extends PageQuery { - devSno?: string; - - devOui?: string; - - pppoeAccount?: string; + devAdNo?: string; } export interface MapDev { devId?: number; diff --git a/src/api/remote/index.ts b/src/api/remote/index.ts index 5f2916a..f590589 100644 --- a/src/api/remote/index.ts +++ b/src/api/remote/index.ts @@ -1,6 +1,11 @@ import request from "@/utils/request"; import { AxiosPromise } from "axios"; -import { RemoteDevInfoVO, UnBindingForm } from "@/api/remote/types"; +import { + RemoteDevInfoVO, + RemoteOperateResult, + UnBindingForm, +} from "@/api/remote/types"; +import { DeviceLinkVO } from "@/api/operate-log/types"; export function remoteDevInfo(devId: number): AxiosPromise { return request({ @@ -21,3 +26,26 @@ export function deleteProfile(fileId?: number, devId?: number) { method: "DELETE", }); } +export function checkDevOnline( + devId?: number +): AxiosPromise { + return request({ + url: `/api/equipment/v1/remote/check-dev-online/${devId}`, + method: "GET", + }); +} + +export function getDeviceLinkInfo(devId: number): AxiosPromise { + return request({ + url: `/api/operate-result-args/v1/device-link-info/${devId}`, + method: "GET", + }); +} +export function remoteDeviceLinkInfo( + devId: number +): AxiosPromise { + return request({ + url: `/api/equipment/v1/remote/device-link-info/${devId}`, + method: "GET", + }); +} diff --git a/src/api/remote/types.ts b/src/api/remote/types.ts index 95e4ab5..b173c4c 100644 --- a/src/api/remote/types.ts +++ b/src/api/remote/types.ts @@ -62,3 +62,7 @@ export interface DeviceInfo { devOnlineTime?: string; devCreateTime?: string; } +export interface RemoteOperateResult { + resultState?: string; + resultCode?: string; +} diff --git a/src/views/family/operate/order/components/OrderInfoEdit.vue b/src/views/family/operate/order/components/OrderInfoEdit.vue index fe6d681..5f4a6a9 100644 --- a/src/views/family/operate/order/components/OrderInfoEdit.vue +++ b/src/views/family/operate/order/components/OrderInfoEdit.vue @@ -430,8 +430,8 @@ const openBindingDev = () => { bindingDevRef.value.open(orderId); }; const skipOperate = () => { - const devSnoOui = orderInfo.value.devSnoOui; - if (devSnoOui == null || devSnoOui.length == 0) { + let adNo = orderInfo.value.adNo; + if (adNo == null || adNo.length == 0) { ElMessage({ message: "设备不存在", duration: 2000, @@ -439,19 +439,11 @@ const skipOperate = () => { }); return; } - checkDeviceExits(devSnoOui) - .then(({ data }) => { - router.push({ - path: `/resources/remote-info/${data.devId}/${data.typeAndVerId}`, - }); - }) - .catch(() => { - ElMessage({ - message: "设备不存在", - duration: 2000, - type: "error", - }); + checkDeviceExits(adNo).then(({ data }) => { + router.push({ + path: `/resources/remote-info/${data.devId}/${data.typeAndVerId}`, }); + }); }; onMounted(() => { getData(); diff --git a/src/views/family/operate/remote-operation/components/DeviceAbility.vue b/src/views/family/operate/remote-operation/components/DeviceAbility.vue index 004d6bb..e79b369 100644 --- a/src/views/family/operate/remote-operation/components/DeviceAbility.vue +++ b/src/views/family/operate/remote-operation/components/DeviceAbility.vue @@ -133,6 +133,7 @@ label-class-name="my-label" class-name="my-content" width="180px" + v-if="ability.reboot == null" > {{ ability.reboot }} diff --git a/src/views/family/operate/remote-operation/components/DeviceLinkInfo.vue b/src/views/family/operate/remote-operation/components/DeviceLinkInfo.vue new file mode 100644 index 0000000..8a8384b --- /dev/null +++ b/src/views/family/operate/remote-operation/components/DeviceLinkInfo.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/views/family/operate/remote-operation/components/DeviceOrder.vue b/src/views/family/operate/remote-operation/components/DeviceOrder.vue index a85e8c9..f0c448c 100644 --- a/src/views/family/operate/remote-operation/components/DeviceOrder.vue +++ b/src/views/family/operate/remote-operation/components/DeviceOrder.vue @@ -10,7 +10,7 @@
- + route.params.devId); -let devOui: string = route.query.devOui; -let devSno: string = route.query.devSno; -let pppoe: string = route.query.pppoeAccount; +let devAdNo: string = route.query.devAdNo; const queryForm = ref({ pageNum: 1, pageSize: 10, @@ -183,9 +181,7 @@ const skipOrderEdit = (orderId: number) => { }; const getData = async () => { loading.value = true; - queryForm.value.devSno = devSno; - queryForm.value.devOui = devOui; - queryForm.value.pppoeAccount = pppoe; + queryForm.value.devAdNo = devAdNo; await deviceOderTablePage(queryForm.value) .then(({ data }) => { tableData.value = data.list; @@ -200,4 +196,8 @@ onMounted(() => { }); - + diff --git a/src/views/family/operate/remote-operation/components/DeviceStatus.vue b/src/views/family/operate/remote-operation/components/DeviceStatus.vue index 0317cbb..ecb546f 100644 --- a/src/views/family/operate/remote-operation/components/DeviceStatus.vue +++ b/src/views/family/operate/remote-operation/components/DeviceStatus.vue @@ -1,8 +1,5 @@ diff --git a/src/views/family/operate/remote-operation/components/DeviceTaskTable.vue b/src/views/family/operate/remote-operation/components/DeviceTaskTable.vue index c88be27..5ea87ce 100644 --- a/src/views/family/operate/remote-operation/components/DeviceTaskTable.vue +++ b/src/views/family/operate/remote-operation/components/DeviceTaskTable.vue @@ -1,10 +1,12 @@