From 05d754bb09ba4aeddd60320d33d583d388434c2f Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期一, 20 十二月 2021 15:38:45 +0800
Subject: [PATCH] 树形组件修改
---
src/pages/systemSettings/views/generalSettings.vue | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/pages/systemSettings/views/generalSettings.vue b/src/pages/systemSettings/views/generalSettings.vue
index f2c3a69..753211b 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,26 @@
selectIcons(typ){
},
- removeSound(){
+ removeSound(item){
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 +456,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