From a6b8e203387cfa21dc569834324e2d1f814f884c Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@iotlink.com> Date: 星期三, 07 七月 2021 14:10:27 +0800 Subject: [PATCH] 修改系统监控接口地址 --- src/pages/systemSettings/views/generalSettings.vue | 71 ++++++++++++++++------------------- 1 files changed, 33 insertions(+), 38 deletions(-) diff --git a/src/pages/systemSettings/views/generalSettings.vue b/src/pages/systemSettings/views/generalSettings.vue index f2c3a69..b349f87 100644 --- a/src/pages/systemSettings/views/generalSettings.vue +++ b/src/pages/systemSettings/views/generalSettings.vue @@ -78,8 +78,7 @@ :min="0" :max="100" size="mini" - ></el-input-number - > s + ></el-input-number> s </div> </div> <div class="min-dur"> @@ -101,8 +100,7 @@ :min="0" :max="100" size="mini" - ></el-input-number - > s + ></el-input-number> s </div> </div> @@ -133,6 +131,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"> @@ -143,9 +142,7 @@ </el-upload> <div v-show="!showUpload"></div> <div class="add-btn"> - <span class="icon iconfont" @click="showUpload = !showUpload" - ></span - > + <span class="icon iconfont" @click="showUpload = !showUpload"></span> </div> </div> </div> @@ -156,31 +153,19 @@ <div class="min-dur" style="cursor:pointer;" @click="selectIcons(0)"> <div class="title">鎵佸钩鍐欏疄鍥炬爣</div> <div class="entity"> - <div - class="entity-img" - v-for="(item, i) in realIconList" - :key="i" - ></div> + <div class="entity-img" v-for="(item, i) in realIconList" :key="i"></div> </div> </div> <div class="min-dur" style="cursor:pointer;" @click="selectIcons(1)"> <div class="title">鎵佸钩鍖栧浘鏍�</div> <div class="entity"> - <div - class="entity-img" - v-for="(item, i) in flatIconList" - :key="i" - ></div> + <div class="entity-img" v-for="(item, i) in flatIconList" :key="i"></div> </div> </div> <div class="title">妗岄潰鑳屾櫙涓婚</div> <div class="min-dur" style="padding-top:25px;"> <div class="bg-list"> - <div - class="bg-img" - v-for="(item, i) in tableBGList" - :key="i" - ></div> + <div class="bg-img" v-for="(item, i) in tableBGList" :key="i"></div> </div> </div> </div> @@ -191,7 +176,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"; @@ -228,10 +213,10 @@ }, mounted() { this.getDeviceInfo(); - this.getSounds(); + this.getSounds(); }, - beforeDestroy() {}, + beforeDestroy() { }, props: ["barName"], methods: { getDeviceInfo() { @@ -284,27 +269,38 @@ // this.getSounds(); // } }, - wifiControl(val) {}, + wifiControl(val) { }, checkWifi() { this.inWifiDetail = true; }, checkWire(item) { this.inWireDetail = true; }, - selectIcons(typ){ + selectIcons(typ) { }, - removeSound(){ + removeSound(item) { + debugger this.$confirm('鎮ㄦ槸鍚︾‘璁ゅ垹闄や簨浠跺0闊�', '鍒犻櫎浜嬩欢澹伴煶', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning' - }).then(() => { - this.$message({ - type: 'success', - message: '鍒犻櫎鎴愬姛!' - }); + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + 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) { this.$refs["soundBar"].forEach((x) => { @@ -445,8 +441,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