From 4a800a8fc83c6bd1f86a8e847b079a51a7532c09 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期三, 20 七月 2022 15:05:58 +0800
Subject: [PATCH] 修复国标配置的bug

---
 src/pages/settings/views/generalSettings.vue |  111 ++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 72 insertions(+), 39 deletions(-)

diff --git a/src/pages/settings/views/generalSettings.vue b/src/pages/settings/views/generalSettings.vue
index be4ad27..2cd47a2 100644
--- a/src/pages/settings/views/generalSettings.vue
+++ b/src/pages/settings/views/generalSettings.vue
@@ -20,12 +20,12 @@
           <div class="min-dur">
             <div class="title">鎶撴媿鍓嶅綍鍍忔椂闀�</div>
             <div class="entity">
-              <div class="sec">{{ min_video_len }}s</div>
+              <div class="sec">0s</div>
               <div class="block">
                 <el-slider
                   v-model="fakeObj.min"
                   id="cut_min_duration"
-                  :min="5 / 1.2"
+                  :min="0"
                   :max="100"
                   :step="5 / 1.2"
                   @input="min_len = min_video_len"
@@ -35,27 +35,28 @@
                   :format-tooltip="formatTooltip"
                 ></el-slider>
               </div>
+              <div class="sec" style="margin: 0 20px">120s</div>
               <el-input-number
                 v-model="min_len"
                 @change="fakeObj.min = +(min_len / 1.2)"
-                :min="5"
+                :min="0"
                 :step="5"
                 :max="120"
                 step-strictly
                 size="small"
               ></el-input-number
-              >&nbsp;s
+              >s
             </div>
           </div>
           <div class="min-dur">
             <div class="title">鎶撴媿鍚庡綍鍍忔椂闀�</div>
             <div class="entity">
-              <div class="sec">{{ max_video_len }} s</div>
+              <div class="sec">0s</div>
               <div class="block">
                 <el-slider
                   v-model="fakeObj.max"
                   id="cut_max_duration"
-                  :min="5 / 1.2"
+                  :min="0"
                   @input="max_len = max_video_len"
                   :max="100"
                   :step="5 / 1.2"
@@ -64,10 +65,11 @@
                   :show-tooltip="true"
                 ></el-slider>
               </div>
+              <div class="sec" style="margin: 0 20px">120s</div>
               <el-input-number
                 v-model="max_len"
                 @change="fakeObj.max = +(max_len / 1.2)"
-                :min="5"
+                :min="0"
                 :step="5"
                 step-strictly
                 :max="120"
@@ -102,6 +104,10 @@
                     style="cursor: pointer"
                     >{{ playSpan }}</span
                   >
+                  <!-- <span class="iconfont" v-else style="cursor: pointer">{{
+                    playSpan2
+                  }}</span> -->
+
                   <img
                     v-else
                     src="/images/settings/鏆傚仠.png"
@@ -113,6 +119,13 @@
                       margin-top: 15px;
                     "
                   />
+                  <!-- 
+                  <i
+                    v-if="!item.isPlay"
+                    class="el-icon-video-play"
+                    style=""
+                  ></i>
+                  <i v-else class="el-icon-video-pause"></i> -->
                 </span>
                 <span
                   class="icon iconfont del"
@@ -130,6 +143,7 @@
               action=""
               :http-request="uploadSound"
               :show-file-list="false"
+              style="bottom: -94px; left: calc(50% - 217px)"
             >
               <div class="info">
                 璇峰皢澹伴煶浜嬩欢鏂囦欢鎷栨嫿鍒版澶勶紝鎴�<span class="info-click"
@@ -185,7 +199,7 @@
           <div class="top-title">鍥炬爣涓婚</div>
           <div class="icon-bar" style="cursor: pointer" @click="selectIcons(0)">
             <div class="bar-title">
-              <span class="title">鎵佸钩鍐欏疄鍥炬爣</span>
+              <span class="title">闈㈡�ч鏍�</span>
               <span
                 class="icon iconfont"
                 :class="activeIcons == 0 ? 'icon-active' : 'icon-normal'"
@@ -204,7 +218,7 @@
           </div>
           <div class="icon-bar" style="cursor: pointer" @click="selectIcons(1)">
             <div class="bar-title">
-              <span class="title">鎵佸钩鍖栧浘鏍�</span>
+              <span class="title">绠�绾﹂鏍�</span>
               <span
                 class="icon iconfont"
                 :class="activeIcons == 1 ? 'icon-active' : 'icon-normal'"
@@ -285,14 +299,22 @@
       },
       isPlay: false,
       realIconList: [
-        { url: "/images/settings/鏃ュ織绠$悊.png", color: "green" },
-        { url: "/images/settings/瀹炴椂鐩戞帶.png", color: "yellow" },
-        { url: "/images/settings/鏁版嵁鍙鍖�.png", color: "pink" },
+        { url: "/images/settings/闈㈡�у浘鏍�/1浠板崸妫�娴�.png" },
+        { url: "/images/settings/闈㈡�у浘鏍�/2涓綋闈欐.png" },
+        { url: "/images/settings/闈㈡�у浘鏍�/3瀹夊叏璀︽垝.png" },
+        { url: "/images/settings/闈㈡�у浘鏍�/4瀹夊叏甯芥娴�.png" },
+        { url: "/images/settings/闈㈡�у浘鏍�/5濂旇窇.png" },
+        { url: "/images/settings/闈㈡�у浘鏍�/6杞﹁締妫�娴�.png" },
+        { url: "/images/settings/闈㈡�у浘鏍�/7鎶界儫.png" },
       ],
       flatIconList: [
-        { url: "/images/settings/鏁版嵁鎺ㄩ��.png" },
-        { url: "/images/settings/鏁版嵁鏍堥厤缃�.png" },
-        { url: "/images/settings/绯荤粺璁剧疆.png" },
+        { url: "/images/settings/绠�绾﹀浘鏍�/1浠板崸妫�娴�.png" },
+        { url: "/images/settings/绠�绾﹀浘鏍�/2涓綋闈欐.png" },
+        { url: "/images/settings/绠�绾﹀浘鏍�/3瀹夊叏璀︽垝.png" },
+        { url: "/images/settings/绠�绾﹀浘鏍�/4瀹夊叏甯芥娴�.png" },
+        { url: "/images/settings/绠�绾﹀浘鏍�/5濂旇窇.png" },
+        { url: "/images/settings/绠�绾﹀浘鏍�/6杞﹁締妫�娴�.png" },
+        { url: "/images/settings/绠�绾﹀浘鏍�/7鎶界儫.png" },
       ],
       tableBGList: [
         { name: "background", url: "/images/desktop/background.png" },
@@ -316,28 +338,25 @@
   mounted() {
     this.getDeviceInfo();
     this.getSounds();
-    let _this = this;
-    this.eventAudio.addEventListener("ended", () => {
-      if (_this.curPlayingIndex !== null && _this.soundList.length) {
-        _this.soundList[_this.curPlayingIndex].isPlay = false;
-        _this.curPlayingIndex = null;
-      }
-    });
     const url = this.curUser.backgroundpic;
     this.activeIcons = this.curUser.useIconType - 1;
-    this.universalColor = this.colorList.findIndex(
-      (x) => x.color == localStorage.getItem("--colorCard")
-    );
-    this.activeBg = url ? this.tableBGList.findIndex((x) => x.url == url) : 0;
-    const e = this.$refs.curPage;
-    e.addEventListener("click", (e) => {
-      if (this.showUpload) {
-        this.showUpload = false;
-      }
+    this.universalColor = this.colorList.findIndex((x) => {
+      return x.color == localStorage.getItem("--colorCard");
     });
+    if (url) {
+      this.activeBg = this.tableBGList.findIndex((x) => {
+        return x.url == url;
+      });
+    } else {
+      this.activeBg = 0;
+    }
+
+    this.eventAudio.addEventListener("ended", this.endedHandle, false);
+    this.$refs.curPage.addEventListener("click", this.clickHandle, false);
   },
   beforeDestroy() {
-    this.$refs.curPage.removeEventListener("click");
+    this.eventAudio.removeEventListener("ended", this.endedHandle, false);
+    this.$refs.curPage.removeEventListener("click", this.clickHandle, false);
   },
   computed: {
     min_video_len() {
@@ -351,6 +370,19 @@
     },
   },
   methods: {
+    endedHandle() {
+      let _this = this;
+      if (_this.curPlayingIndex !== null && _this.soundList.length) {
+        _this.soundList[_this.curPlayingIndex].isPlay = false;
+        _this.curPlayingIndex = null;
+      }
+    },
+    clickHandle() {
+      let _this = this;
+      if (this.showUpload) {
+        this.showUpload = false;
+      }
+    },
     formatTooltip(v) {
       return Math.round(v * 1.2);
     },
@@ -364,6 +396,7 @@
       }).then((res) => {
         if (res.success) {
           sessionStorage.setItem("userInfo", JSON.stringify(res.data));
+          debugger;
           this.$message.success(res.msg);
         }
       });
@@ -433,7 +466,7 @@
           this.getSounds();
         },
         (err) => {
-          this.$message.error("澹伴煶涓婁紶澶辫触");
+          this.$message.error(err.msg);
         }
       );
     },
@@ -736,13 +769,13 @@
         .sec {
           min-width: 30px;
           line-height: 80px;
-          margin-right: 10px;
+
           color: #333;
           font-size: 8px;
         }
         .block {
           flex: 1;
-          margin: 0 20px 0 6px;
+          margin: 0 0px 0 6px;
         }
         .el-input-number--small {
           width: 100px;
@@ -796,7 +829,9 @@
         font-weight: 700;
         margin-top: 20px;
       }
-
+      /*     .icon-bar:hover {
+        background-color: rgba(233, 233, 233, 1);
+      } */
       .color-bar {
         display: flex;
         justify-content: center;
@@ -917,8 +952,6 @@
 }
 
 .upload-demo {
-  top: 452px;
-  left: 2px !important;
   width: 452px;
   height: 150px;
   background: #ffffff;
@@ -1101,4 +1134,4 @@
   /*  color: var(--colorCard); */
   color: #4e94ff;
 }
-</style>
+</style>
\ No newline at end of file

--
Gitblit v1.8.0