heyujie
2021-07-05 62f32758a170157eb792720c21e6964e2f813fc7
src/pages/systemSettings/views/generalSettings.vue
@@ -133,6 +133,7 @@
              action="https://jsonplaceholder.typicode.com/posts/"
              :http-request="uploadSound"
              v-show="showUpload"
              :show-file-list="false"
            >
              <i class="el-icon-upload"></i>
              <div class="el-upload__text">
@@ -191,7 +192,7 @@
<script>
import { saveAlarmConfig, getDevInfo } from "@/api/system";
import { uploadSound, getSoundList } from "@/api/event";
import { uploadSound, getSoundList ,deleteSound} from "@/api/event";
import config from "../../../../package.json";
import { isIPv4 } from "@/scripts/validate";
@@ -294,16 +295,27 @@
    selectIcons(typ){
    },
    removeSound(){
    removeSound(item){
      debugger
      this.$confirm('您是否确认删除事件声音', '删除事件声音', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.$message({
            type: 'success',
            message: '删除成功!'
          });
          deleteSound({
            id:item.id
          }).then((res) => {
            if (res.success) {
              this.getSounds()
               this.$message({
                  type: 'success',
                  message: '删除成功!'
                });
                this.showUpload=false
            }
          },err=>{
            this.$message.error(err.msg)
          })
        })
    },
    clickSound(item, i) {
@@ -445,8 +457,7 @@
        background-color: rgba(233, 233, 233, 1);
      }
      .add-group {
        margin-top: 170px;
        height: 235px;
        margin-top: 50px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;