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 @@
-