ZZJ
2022-04-12 994e5e08cba4e6b9ce321b7cf5cb1ec8d19dfa22
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));