From ae2d855c89ca722ac7309fdf1aa6ceed370e3b95 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期一, 11 十月 2021 20:22:30 +0800 Subject: [PATCH] 监控ui --- src/pages/settings/views/generalSettings.vue | 296 ++++++++++++++++++++++++++++++++++------------------------ 1 files changed, 174 insertions(+), 122 deletions(-) diff --git a/src/pages/settings/views/generalSettings.vue b/src/pages/settings/views/generalSettings.vue index 1dbf000..b2cd669 100644 --- a/src/pages/settings/views/generalSettings.vue +++ b/src/pages/settings/views/generalSettings.vue @@ -134,10 +134,12 @@ <div class="save-btn" @click="submitAlarm">淇濆瓨</div> </div> <div class="lang" v-if="activePage == 1"> - <div class="bar title voice-title" style="border: 2px solid #fff;">浜嬩欢澹伴煶</div> + <div class="bar title voice-title" style="border: 2px solid #fff"> + 浜嬩欢澹伴煶 + </div> <div class="bar-group"> <div - class="bar" + class="general-bar" v-for="(item, i) in soundList" :key="i" @click="clickSound(item, i)" @@ -146,12 +148,20 @@ <div class="left-part"> <span class="name">{{ item.name }}</span> </div> - <div class="btns"> + <div class="sound-btns"> <span @click="togglePlay(item, i)"> + <span + class="iconfont" + v-if="!item.isPlay" + style="cursor: pointer" + >{{ playSpan }}</span + > + <!-- <span class="iconfont" v-else style="cursor: pointer">{{ + playSpan2 + }}</span> --> - <span class="iconfont" v-if="!item.isPlay" style="cursor: pointer;">{{playSpan}}</span> - <span class="iconfont" v-else style="cursor: pointer;">{{playSpan2}}</span> -<!-- + <img v-else src="/images/settings/鏆傚仠.png" alt="" style="width:16px;hight:16px;cursor: pointer;margin-top:15px;"> + <!-- <i v-if="!item.isPlay" class="el-icon-video-play" @@ -161,14 +171,14 @@ </span> <span class="icon iconfont del" - style="cursor: pointer;" + style="cursor: pointer" @click="removeSound(item)" - >{{delspan}}</span + >{{ delspan }}</span > </div> </div> </div> - <div v-if="showUpload" @click.stop > + <div v-if="showUpload" @click.stop> <el-upload class="upload-demo" drag @@ -176,11 +186,16 @@ :http-request="uploadSound" :show-file-list="false" > - <div class="info">璇峰皢澹伴煶浜嬩欢鏂囦欢鎷栨嫿鍒版澶勶紝鎴�<span class="info-click" >鐐瑰嚮涓婁紶</span></div> - <div class="des" v-if="showUpload" @click.stop>浠呮敮鎸乵p3銆亀av绛夋牸寮�</div> - </el-upload> + <div class="info"> + 璇峰皢澹伴煶浜嬩欢鏂囦欢鎷栨嫿鍒版澶勶紝鎴�<span class="info-click" + >鐐瑰嚮涓婁紶</span + > + </div> + <div class="des" v-if="showUpload" @click.stop> + 浠呮敮鎸乵p3銆亀av绛夋牸寮� + </div> + </el-upload> </div> - <div class="add-group"> <div class="add-btn"> @@ -197,6 +212,7 @@ <div v-for="(item,index) in colorList" :key="index" + style="border:none;" > <div class="color-option" v-if="universalColor != index" @@ -286,10 +302,10 @@ export default { data() { return { - playSpan:"\ue6e8", - playSpan2:"\ue6e8", - delspan:"\ue6e8", - warnSpn:"\ue6e8", + playSpan: "\ue75e", + playSpan2: "\ue75f", + delspan: "\ue715", + warnSpn: "\ue71c", curPlayingIndex: null, showUpload: false, activeIcons: 0, @@ -301,9 +317,9 @@ }, menuArr: [ // { name: "璁惧淇℃伅", icon: "\ue933" ,size:18}, - { name: "浜嬩欢褰曞儚鏃堕暱", icon: "\ue6f3", size: 20 }, - { name: "浜嬩欢澹伴煶", icon: "\ue6e1", size: 16 }, - { name: "涓�у寲璁剧疆", icon: "\ue756", size: 18 }, + { name: "浜嬩欢褰曞儚鏃堕暱", icon: "\ue74f", size: 20 }, + { name: "浜嬩欢澹伴煶", icon: "\ueb5e", size: 16 }, + { name: "涓�у寲璁剧疆", icon: "\ue750", size: 18 }, ], soundList: [], activePage: 0, @@ -323,9 +339,9 @@ }, isPlay: false, realIconList: [ - { url: "/images/settings/鏃ュ織绠$悊.png",color:"green" }, - { url: "/images/settings/瀹炴椂鐩戞帶.png",color:"yellow" }, - { url: "/images/settings/鏁版嵁鍙鍖�.png",color:"pink" }, + { url: "/images/settings/鏃ュ織绠$悊.png", color: "green" }, + { url: "/images/settings/瀹炴椂鐩戞帶.png", color: "yellow" }, + { url: "/images/settings/鏁版嵁鍙鍖�.png", color: "pink" }, ], flatIconList: [ { url: "/images/settings/鏁版嵁鎺ㄩ��.png" }, @@ -479,17 +495,24 @@ }, removeSound(item) { const h = this.$createElement; - const icon = - this.$msgbox({ - message: h('div', {style: 'display: flex; flex-direction: column; justify-content: center; align-items: center;'}, [ - h('span',{class:'iconfont warn-icon'},`${this.warnSpn}`), - h('span', {class:'warn-title'}, '鍒犻櫎浜嬩欢澹伴煶 '), - h('span', {class:'warn-dec'}, '鎮ㄦ槸鍚︾‘璁ゅ垹闄や簨浠跺0闊�?') - ]), - showCancelButton: true, - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - }).then(() => { + const icon = this.$msgbox({ + title: "", + message: h( + "div", + { + style: + "display: flex; flex-direction: column; justify-content: center; align-items: center;", + }, + [ + h("span", { class: "icon iconfont warn-icon" }, `${this.warnSpn}`), + h("span", { class: "warn-title" }, "鍒犻櫎浜嬩欢澹伴煶 "), + h("span", { class: "warn-dec" }, "鎮ㄦ槸鍚︾‘璁ゅ垹闄や簨浠跺0闊�?"), + ] + ), + showCancelButton: true, + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + }).then(() => { deleteSound({ id: item.id, }).then( @@ -513,8 +536,7 @@ this.$refs["soundBar"].forEach((x) => { x.style = "border: 2px solid #FFF;"; }); - this.$refs["soundBar"][i].style = - "border: 2px solid #4E94FF;"; + this.$refs["soundBar"][i].style = "border: 2px solid #4E94FF;"; }, submitAlarm() { saveAlarmConfig({ @@ -540,7 +562,6 @@ </script> <style scoped lang="scss"> - .all { width: 100%; } @@ -552,6 +573,9 @@ flex: 1; flex-basis: auto; box-sizing: border-box; + .el-input__inner { + height: 24px !important; +} .general-center { height: 100%; width: 300px; @@ -559,13 +583,10 @@ box-sizing: border-box; flex-shrink: 0; padding: 24px 10px; - border-right: 4px solid #F2F2F7; - background-color: #FBFAFF; - - + border-right: 4px solid #f2f2f7; + background-color: #fbfaff; .menu-item { - height: 56px; margin-bottom: 4px; border-radius: 8px; @@ -641,35 +662,34 @@ text-align: left; margin-bottom: 5px; } - .voice-title { + .voice-title { justify-content: center !important; - font-weight: 700 ; + font-weight: 700; } .bar-group { overflow: auto; - height: 400px; - } - .bar { - height: 48px; - background-color: #f8f8f8; - border-radius: 10px; - line-height: 48px; - box-sizing: border-box; - padding: 0 20px 0 20px; - font-weight: 700; - display: flex; - justify-content: space-between; - margin-bottom: 2px; - border: 2px solid #fff; - .name { - font-size: 14px; - } - .btns { - width: 52px; + height: calc(100% - 132px); + .general-bar { + height: 48px; + background-color: #f8f8f8; + border-radius: 10px; + line-height: 48px; + box-sizing: border-box; + padding: 0 20px 0 20px; + font-weight: 700; display: flex; justify-content: space-between; - color: rgba(191, 191, 191, 1); - /* .el-icon-video-pause { + margin-bottom: 2px; + border: 2px solid #fff; + .name { + font-size: 14px; + } + .sound-btns { + width: 52px; + display: flex; + justify-content: space-between; + color: rgba(191, 191, 191, 1); + /* .el-icon-video-pause { cursor: pointer; font-size: 23px; vertical-align: middle; @@ -681,18 +701,20 @@ vertical-align: middle; color: #409eff; } */ - span { - color: #333 + span { + color: #333; + } + .del:hover { + color: #fc4958; + } } - .del:hover { - color:#FC4958; + .desc { + font-size: 14px; + color: rgba(134, 134, 134, 1); } - } - .desc { - font-size: 14px; - color: rgba(134, 134, 134, 1); } } + /* .bar:hover { border: 2px solid #4E94FF !important; } */ @@ -919,88 +941,104 @@ } } .v-modal { - opacity:0.35 !important; + opacity: 0.35 !important; border-radius: 8px !important; } .el-message-box { -position: absolute; -width: 420px; -height: 210px; -left: 302px; -top: 279px; + position: absolute; + width: 420px; + height: 210px; + left: 302px; + top: 279px; -background: #FFFFFF; -border-radius: 8px; + background: #ffffff; + border-radius: 8px; } .upload-demo { -top: 452px; -left: 2px !important; -width: 452px; -height: 150px; -background: #FFFFFF; -box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1); -border-radius: 8px; + top: 452px; + left: 2px !important; + width: 452px; + height: 150px; + background: #ffffff; + box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1); + border-radius: 8px; -::v-deep .el-upload-dragger { -display: flex; -justify-content: center; -align-items: center; -overflow: visible; -width: 340px; -height: 72px; -margin-top:30px ; -} - - -.info { - -font-weight: bold; -font-size: 14px; -color: #828282; -} + ::v-deep .el-upload-dragger { + display: flex; + justify-content: center; + align-items: center; + overflow: visible; + width: 340px; + height: 72px; + margin-top: 30px; + } .info-click { color: var(--colorCard); text-decoration: underline; } + .info-click { + color: #4e94ff; + text-decoration: underline; + } } .des { position: absolute; - top: 78px; - left: 109px; + top: 78px; + left: 109px; z-index: 999; - color: #4F4F4F; + color: #4f4f4f; font-weight: bold; font-size: 12px; } - </style> <style lang="scss"> .el-message-box { + padding-bottom: 20px !important; + border-radius: 8px !important; + .el-message-box__content { + color: #333333; + padding: 0; + font-size: 14px; + } .warn-icon { - color:rgba(254, 109, 104, 1) ; - font-size: 50px; - margin-top:26px ; + color: #fe6d68; + font-size: 40px; + margin-top: 11px; } .warn-title { font-weight: bold; font-size: 16px; - margin: 5px; + margin: 6px; + line-height: 22px; } .warn-dec { font-weight: bold; font-size: 14px; - color: #828282; + color: #828282; + line-height: 20px; } - .el-message-box__btns { + .el-message-box__headerbtn { + top: 12px; + } + .el-message-box__headerbtn .el-message-box__close { + color: #333333; + font-weight: bold; + } + .el-message-box__btns { display: flex; justify-content: center; - margin-top: 10px; + margin-top: 20px; + .el-button:focus, + .el-button:hover { + background-color: none; + border: none; + } button { width: 175px; height: 40px; @@ -1009,15 +1047,19 @@ font-size: 16px; font-weight: 700; } + &:hover { + border: 1px solid var(--colorCard) !important; + } } button:first-child { - background-color: #E0E0E0; + background-color: #e0e0e0; span { - color: #333333; + color: #333333; } } button:last-child { background-color: var(--colorCard) !important; + border: 1px solid var(--colorCard) !important; span { color: #fff; } @@ -1031,7 +1073,19 @@ .videoTime .el-slider__button { margin-top: -25px !important; border: none !important; - background-image: url(/images/gengeralSettings/鍒诲害鏍�.png); + +} + +.videoTime .el-slider__button::after { + display: block; + position: relative; +content: "\e75d"; + color: var(--colorCard); + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } .videoTime .el-tooltip { @@ -1094,9 +1148,7 @@ color: #4E94FF; } -.el-input__inner { - height: 24px !important; -} + /* .el-tooltip__popper { -- Gitblit v1.8.0