heyujie
2021-07-08 b322b2bad8b2f9b88521c9ffbbe7e77282b9fe2e
src/pages/settings/views/generalSettings.vue
@@ -78,8 +78,7 @@
                :min="0"
                :max="100"
                size="mini"
              ></el-input-number
              >&nbsp;s
              ></el-input-number>&nbsp;s
            </div>
          </div>
          <div class="min-dur">
@@ -101,8 +100,7 @@
                :min="0"
                :max="100"
                size="mini"
              ></el-input-number
              >&nbsp;s
              ></el-input-number>&nbsp;s
            </div>
          </div>
@@ -144,9 +142,7 @@
            </el-upload>
            <div v-show="!showUpload"></div>
            <div class="add-btn">
              <span class="icon iconfont" @click="showUpload = !showUpload"
                >&#xe646;</span
              >
              <span class="icon iconfont" @click="showUpload = !showUpload">&#xe646;</span>
            </div>
          </div>
        </div>
@@ -157,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>
@@ -192,7 +176,7 @@
<script>
import { saveAlarmConfig, getDevInfo } from "@/api/system";
import { uploadSound, getSoundList ,deleteSound} from "@/api/event";
import { uploadSound, getSoundList, deleteSound } from "@/api/event";
import config from "../../../../package.json";
import { isIPv4 } from "@/scripts/validate";
@@ -229,10 +213,10 @@
  },
  mounted() {
    this.getDeviceInfo();
        this.getSounds();
    this.getSounds();
  },
  beforeDestroy() {},
  beforeDestroy() { },
  props: ["barName"],
  methods: {
    getDeviceInfo() {
@@ -285,37 +269,37 @@
      //   this.getSounds();
      // }
    },
    wifiControl(val) {},
    wifiControl(val) { },
    checkWifi() {
      this.inWifiDetail = true;
    },
    checkWire(item) {
      this.inWireDetail = true;
    },
    selectIcons(typ){
    selectIcons(typ) {
    },
    removeSound(item){
    removeSound(item) {
      this.$confirm('您是否确认删除事件声音', '删除事件声音', {
          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)
          })
        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) => {