From 994e5e08cba4e6b9ce321b7cf5cb1ec8d19dfa22 Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期二, 12 四月 2022 17:50:21 +0800 Subject: [PATCH] 摄像机管理 --- src/views/hashrate/CameraManage/CameraRules/components/AddRuleBox.vue | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/views/hashrate/CameraManage/CameraRules/components/AddRuleBox.vue b/src/views/hashrate/CameraManage/CameraRules/components/AddRuleBox.vue index 1ed8212..101188a 100644 --- a/src/views/hashrate/CameraManage/CameraRules/components/AddRuleBox.vue +++ b/src/views/hashrate/CameraManage/CameraRules/components/AddRuleBox.vue @@ -114,9 +114,6 @@ this.eventAudio.addEventListener("ended", () => { this.togglePlay = true; }); - if (this.editData.type) { - this.initEditData(); - } }, data() { return { @@ -172,6 +169,12 @@ voiceId: this.editData.rule.voiceId, index: this.editData.index, }; + this.soundList.forEach((item) => { + if (item.id == this.editData.rule.voiceId) { + this.ruleForm.voiceId = item.id; + this.ruleForm.voice = item; + } + }); }, getSounds() { let _this = this; @@ -179,8 +182,11 @@ .then((res) => { if (res.success) { _this.soundList = [{ id: "", name: "绌�", path: "" }].concat( - res.data + res.data.voices ); + if (_this.editData.type) { + _this.initEditData(); + } } }) .catch((e) => console.log(e)); -- Gitblit v1.8.0