From 99282675ce3fc592abc8a53d6ba7b1d4e9e8bca7 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Tue, 1 Sep 2026 14:26:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=B5=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/assetManage/monitor/deviceList.vue | 6 +- src/views/assetManage/monitor/index.vue | 20 +-- src/views/components/hkVideo-old.vue | 71 +++++++++++ src/views/components/hkVideo.vue | 121 +++++++++++++------ 4 files changed, 165 insertions(+), 53 deletions(-) create mode 100644 src/views/components/hkVideo-old.vue diff --git a/src/views/assetManage/monitor/deviceList.vue b/src/views/assetManage/monitor/deviceList.vue index ca9515b..363546a 100644 --- a/src/views/assetManage/monitor/deviceList.vue +++ b/src/views/assetManage/monitor/deviceList.vue @@ -203,7 +203,7 @@
- +
@@ -603,9 +603,7 @@ export default { } this.hkVideoVisible = true - this.$nextTick(() => { - this.$refs.hkVideoRef.initVideo() - }) + // hkVideo 加了 v-if,会随 visible 重建并触发 mounted 中的 initVideo,无需手动调用 } }).catch(err => { console.log('获取设备视频信息失败', err) diff --git a/src/views/assetManage/monitor/index.vue b/src/views/assetManage/monitor/index.vue index 1cdf88b..e55792a 100644 --- a/src/views/assetManage/monitor/index.vue +++ b/src/views/assetManage/monitor/index.vue @@ -45,7 +45,9 @@

{{ item.warehouse.administrator }}

 {{ item.warehouse.contactPhone }}

-

最后同步时间: {{ item.warehouse.lastTime | parseTime }}

+ +

{{ item.warehouse.lastTime | parseTime }}

+
@@ -115,7 +117,7 @@
- +
@@ -199,10 +201,10 @@ export default { warningScrollTasks: [], hkVideoVisible: false, hkConfig: { - username: null, - password: null, - ip: null, - port: null + 'username': null, + 'devicePassword': null, + 'ip': null, + 'port': null }, // ==========历史报警弹窗新增data========== alarmDialogVisible: false, @@ -417,14 +419,12 @@ export default { const finalPassword = pwdRes || detailRes.devicePassword this.hkConfig = { username: detailRes.deviceAccount, - password: finalPassword, + devicePassword: finalPassword, ip: detailRes.deviceIp, port: detailRes.devicePort } this.hkVideoVisible = true - this.$nextTick(() => { - this.$refs.hkVideoRef.initVideo() - }) + // hkVideo 加了 v-if,会随 visible 重建并触发 mounted 中的 initVideo,无需手动调用 } catch (err) { console.error('打开视频失败:', err) this.$message.error('获取监控设备信息失败') diff --git a/src/views/components/hkVideo-old.vue b/src/views/components/hkVideo-old.vue new file mode 100644 index 0000000..36979e0 --- /dev/null +++ b/src/views/components/hkVideo-old.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/views/components/hkVideo.vue b/src/views/components/hkVideo.vue index 36979e0..34c851b 100644 --- a/src/views/components/hkVideo.vue +++ b/src/views/components/hkVideo.vue @@ -1,24 +1,12 @@ - -