zhangzengfei
2021-07-07 a6b8e203387cfa21dc569834324e2d1f814f884c
src/pages/systemSettings/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>
@@ -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"
                >&#xe646;</span
              >
              <span class="icon iconfont" @click="showUpload = !showUpload">&#xe646;</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('您是否确认删除事件声音', '删除事件声音', {
          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;