diff --git a/main/manager-web/src/apis/module/user.js b/main/manager-web/src/apis/module/user.js index 4b008ffe..6bd4acea 100755 --- a/main/manager-web/src/apis/module/user.js +++ b/main/manager-web/src/apis/module/user.js @@ -257,4 +257,20 @@ export default { }); }).send(); }, + // 获取已绑设备 + getAgentBindDevices(agentId, callback) { + RequestService.sendRequest() + .url(`${getServiceUrl()}/api/v1/user/agent/device/bind/${agentId}`) + .method('GET') + .success((res) => { + RequestService.clearRequestTime(); + callback(res); + }) + .fail((err) => { + console.error('获取设备列表失败:', err); + RequestService.reAjaxFun(() => { + this.getAgentBindDevices(agentId, callback); + }); + }).send(); + }, } diff --git a/main/manager-web/src/components/DeviceItem.vue b/main/manager-web/src/components/DeviceItem.vue index 4f651482..4ad34709 100644 --- a/main/manager-web/src/components/DeviceItem.vue +++ b/main/manager-web/src/components/DeviceItem.vue @@ -26,7 +26,7 @@
历史对话
-
+
设备管理
@@ -51,6 +51,9 @@ export default { }, handleConfigure() { this.$router.push({ path: '/role-config', query: { agentId: this.device.agentId } }); + }, + handleDeviceManage() { + this.$router.push({ path: '/device-management', query: { agentId: this.device.agentId } }); } } } diff --git a/main/manager-web/src/components/HeaderBar.vue b/main/manager-web/src/components/HeaderBar.vue index 95ed2b94..5c1f52e9 100644 --- a/main/manager-web/src/components/HeaderBar.vue +++ b/main/manager-web/src/components/HeaderBar.vue @@ -25,7 +25,7 @@ - {{ userInfo.username || '加载中...' }} + {{ userInfo.mobile || '加载中...' }} 个人中心 diff --git a/main/manager-web/src/views/DeviceManagement.vue b/main/manager-web/src/views/DeviceManagement.vue index 03939a28..9135a3e6 100644 --- a/main/manager-web/src/views/DeviceManagement.vue +++ b/main/manager-web/src/views/DeviceManagement.vue @@ -1,20 +1,20 @@