From 62f32758a170157eb792720c21e6964e2f813fc7 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期一, 05 七月 2021 21:35:24 +0800 Subject: [PATCH] 应用中心和系统设置的修改 --- src/pages/systemSettings/views/generalSettings.vue | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/pages/systemSettings/views/generalSettings.vue b/src/pages/systemSettings/views/generalSettings.vue index f2c3a69..90645df 100644 --- a/src/pages/systemSettings/views/generalSettings.vue +++ b/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('鎮ㄦ槸鍚︾‘璁ゅ垹闄や簨浠跺0闊�', '鍒犻櫎浜嬩欢澹伴煶', { 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; -- Gitblit v1.8.0