From 2ff4a572df6b098779bc592a0c6e0a90e1b79b2e Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期五, 12 十一月 2021 19:08:00 +0800
Subject: [PATCH] 暂存
---
src/pages/settings/index/index.vue | 365 ++++++++++++++++++++++++++++++++++-----------------
1 files changed, 240 insertions(+), 125 deletions(-)
diff --git a/src/pages/settings/index/index.vue b/src/pages/settings/index/index.vue
index fb7a356..15e71d0 100644
--- a/src/pages/settings/index/index.vue
+++ b/src/pages/settings/index/index.vue
@@ -8,7 +8,6 @@
:key="i"
@click="openMenu(i)"
>
- <!-- <span class="icon iconfont">{{ item.icon }}</span> -->
<img :src="item.blackIcon" class="b" alt="" />
<img :src="item.whiteIcon" class="w" alt="" />
<span class="card-text">{{ item.name }}</span>
@@ -17,7 +16,12 @@
<div class="container-center" v-if="activeIndex == 0">
<div class="account-left" v-if="activeIndex == 0">
- <div class="account-list">
+ <div class="account-list"
+ :class="{'account-list-scroll'
+ :account_list_scroll}"
+ @mouseenter="account_list_scroll = true"
+ @mouseleave="account_list_scroll = false"
+ >
<div
class="account-card"
:class="activeAccountIndex == index ? 'account-card-active' : ''"
@@ -40,7 +44,6 @@
</div>
</div>
<div class="add-account" v-if="curUserRole != '鏅�氱敤鎴�'">
- <!-- <span class="icon iconfont" @click="openAdd"></span> -->
<i
class="el-icon-circle-plus"
style="font-size: 40px"
@@ -74,23 +77,15 @@
<span class="enable" v-if="!showJPGArr" @click="editHeadPic"
>缂栬緫澶村儚</span
>
- <!-- <span
- class="enable"
- v-if="addForm.headpic"
- @click="confirmChangePic"
- >纭閫夋嫨</span
- >
- <span class="enable" v-if="showJPGArr" @click="cacelChoosePic">
- 鍙栨秷</span
- > -->
+
</div>
</div>
<div class="user-desc">
<div class="user-name">
<span
class="icon iconfont"
- style="font-size: 20px; margin-right: 3px"
- ></span
+ style="font-size: 19px; margin-right: 4px"
+ ></span
>
<span>{{ activeAccountItem.username }}</span>
</div>
@@ -175,7 +170,10 @@
</div>
<div class="change-pw" v-if="inAccountDetail && isChangePw">
- <div class="title">淇敼瀵嗙爜</div>
+ <div class="title">
+ <span class="icon iconfont"></span>
+ <span>淇敼瀵嗙爜</span>
+ </div>
<el-form
:model="passwordForm"
:rules="pwRules"
@@ -186,7 +184,7 @@
prop="curPassword"
v-if="activeAccountItem.id == curUserID"
>
- <div class="p-title">褰撳墠瀵嗙爜锛�</div>
+ <div class="p-title">褰撳墠瀵嗙爜</div>
<el-input
placeholder="蹇呭~"
@@ -195,7 +193,7 @@
></el-input>
</el-form-item>
<el-form-item prop="newPassword">
- <div class="p-title">鏂板瘑鐮侊細</div>
+ <div class="p-title">鏂板瘑鐮�</div>
<el-input
placeholder="蹇呭~"
v-model="passwordForm.newPassword"
@@ -203,7 +201,7 @@
></el-input>
</el-form-item>
<el-form-item prop="confirmPassword">
- <div class="p-title">纭瀵嗙爜锛�</div>
+ <div class="p-title">纭瀵嗙爜</div>
<el-input
placeholder="蹇呭~"
v-model="passwordForm.confirmPassword"
@@ -363,12 +361,6 @@
</div>
<div class="adjust-zone">
- <!-- <el-radio-group v-model="ajustType"
- fill="#4E94FF"
- >
- <el-radio-button label="鎵嬪姩鏍℃椂"></el-radio-button>
- <el-radio-button label=""></el-radio-button>
- </el-radio-group> -->
<div class="two-radio">
<div
class="radio"
@@ -615,13 +607,12 @@
ref="view_6"
></deviceInfo>
</div>
- <div class="welcome-page" v-else ref="curPage">
+ <div class="welcome-page" v-else ref="curPage" @mouseup="mouseDownIndex = ''">
<div
class="search-box"
:class="showRecomand ? 'border-change' : ''"
@click.stop
>
- <!-- @blur="showRecomand = false" -->
<el-input
class="search-input"
placeholder="鏌ユ壘璁剧疆"
@@ -653,11 +644,12 @@
<div
class="nav-child"
@click="openWelcome(i)"
+ @mousedown="mouseDownIndex = i"
+ :class="mouseDownIndex === i? 'nav-child-active':''"
v-for="(item, i) in menuArr"
:key="i"
>
<div class="child-info">
- <!-- <span class="icon iconfont welcome-icon">{{ item.icon }}</span> -->
<img :src="item.imgUrl" alt="" />
<span class="welcome-title">{{ item.name }}</span>
</div>
@@ -749,7 +741,6 @@
browserTimer: null,
timezone: "",
showRecomand: false,
-
searchArr: [
{ name: "璐︽埛", addr: [0] },
{ name: "閫氱敤璁剧疆", addr: [5] },
@@ -783,7 +774,6 @@
isSetPermission: false,
timeInterval: 10,
ntpServer: "",
- // syncType: "1",
equipmentTime: "",
equipmentDate: "",
roleList: [],
@@ -844,13 +834,13 @@
],
accountArr: [],
jpgArr: [],
- isManual: true,
isNtp: false,
activeIndex: 0,
clockTimer: null,
inputHour: "",
inputMin: "",
inputSec: "",
+ mouseDownIndex:'',
inputYrs: "",
showInputNickName: false,
inputMonth: "",
@@ -896,16 +886,28 @@
],
confirmPassword: [{ validator: v4, trigger: "blur" }],
},
+ account_list_scroll: false
};
+ },
+ created(){
+ let color = localStorage.getItem('--colorCard')
+ if(color) {
+ document.documentElement.style.setProperty('--colorCard',`${color}`)
+ }
},
beforeDestroy() {
clearTimeout(this.clockTimer);
clearInterval(this.browserTimer);
- if (this.$refs.curPage) {
- this.$refs.curPage.removeEventListener("click");
- }
+ // if (this.$refs.curPage) {
+ // this.$refs.curPage.removeEventListener("click");
+ // }
},
mounted() {
+ window.addEventListener("message",(e)=>{
+ if(e.data.msg === '杩斿洖绯荤粺璁剧疆') {
+ this.showWelcome = true
+ }
+ })
const menu = getUrlKey("menu");
if (menu) {
this.showWelcome = false;
@@ -1014,7 +1016,6 @@
case "hrs":
num = +this.syncHour - 1;
if (num == -1) {
- 鏈夌嚎缃戠粶鏈夌嚎缃戠粶;
num = 23;
}
this.syncHour = pad0(+num);
@@ -1172,18 +1173,18 @@
}
);
},
- flatCheckedArr(arr, res) {
- for (const item of arr) {
- if (item.selected) res.push(item.id);
- if (item.children) this.flatCheckedArr(item.children, res);
- }
- },
+ // flatCheckedArr(arr, res) {
+ // for (const item of arr) {
+ // if (item.selected) res.push(item.id);
+ // if (item.children) this.flatCheckedArr(item.children, res);
+ // }
+ // },
saveAuth() {
- let arr = [];
- this.flatCheckedArr(this.sysMenus, arr);
+ // let arr = [];
+ // this.flatCheckedArr(this.sysMenus, arr);
updataUser({
id: this.activeAccountItem.id,
- menuIds: arr,
+ menuIds: this.$refs.treeMenus.getCheckedKeys(),
}).then((res) => {
if (res.success) {
this.$message.success(res.msg);
@@ -1215,9 +1216,7 @@
if (rsp && rsp.success) {
this.timezone = rsp.data.time_zone;
if (!ntpTest) {
- // this.syncType = rsp.data.ntp ? "1" : "2";
this.isNtp = rsp.data.ntp;
- this.isManual = !rsp.data.ntp;
}
if (rsp.data.ntp) {
this.ntpServer = rsp.data.ntp_server;
@@ -1229,7 +1228,7 @@
"鏃ヤ竴浜屼笁鍥涗簲鍏�".charAt(new Date(+this.timestamp * 1000).getDay());
if (this.clockTimer === null) {
this.runClock();
- if (this.isManual) this.parseTime();
+ if (!this.isNtp) this.parseTime();
}
}
});
@@ -1310,9 +1309,6 @@
this.openWelcome(addr[0]);
this.$nextTick(() => {
if (addr[0] == 1) {
- // addr[1] == 0
- // ? this.changeSwitch("isNtp")
- // : this.changeSwitch("isManual");
return;
}
this.$refs[`view_${addr[0]}`].openRight(addr[1]);
@@ -1562,21 +1558,23 @@
background-color: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(4px);
.border-change {
- border-radius: 20px !important;
+ border-radius: 15px !important;
}
.search-box {
width: 332px;
z-index: 999;
- // margin: 55px auto;
position: fixed;
left: calc(50% - 166px);
top: 50px;
- background: rgba(255, 255, 255, 0.8);
- border: 2px solid #4e94ff;
+ border: 2px solid var(--colorCard);
box-sizing: border-box;
backdrop-filter: blur(4px);
border-radius: 40px;
+
+ .search-res {
+ background-color: rgba(255,255,255,.5);
+ }
.search-input {
font-size: 14px;
.el-input--mini .el-input__inner {
@@ -1604,6 +1602,30 @@
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
font-weight: bold;
+
+ &::-webkit-input-placeholder { /* WebKit browsers */
+ color: #828282;
+ font-weight: normal;
+ font-size: 14px;
+ }
+ &:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
+ color: #828282;
+ font-weight: normal;
+ font-size: 14px;
+ }
+ &::-moz-placeholder { /* Mozilla Firefox 19+ */
+ color: #828282;
+ font-weight: normal;
+ font-size: 14px;
+ }
+ &:-ms-input-placeholder { /* Internet Explorer 10+ */
+ color: #828282;
+ font-weight: normal;
+ font-size: 14px;
+
+ }
+
+
}
.el-input__suffix {
display: flex;
@@ -1632,7 +1654,7 @@
text-align: left;
box-sizing: border-box;
padding: 0 20px;
- color: #333333;
+ color: #4F4F4F;
font-size: 14px;
cursor: pointer;
}
@@ -1642,20 +1664,19 @@
text-align: left;
box-sizing: border-box;
padding: 0 20px;
- color: #333333;
+ color: #4F4F4F;
font-size: 14px;
}
.res-bar:hover {
background: #f5f5f6 10%;
font-weight: bold;
- color: #4e94ff;
+ color: var(--colorCard);
}
- // .res-bar:last-child {
- // border-radius: 0 0 20px 20px;
- // }
}
}
.nav-items {
+ max-width: 960px;
+ margin: 0 auto;
.nav-child {
box-sizing: border-box;
background-color: rgba(251, 251, 255, 0.1);
@@ -1670,12 +1691,19 @@
justify-content: center;
align-items: center;
cursor: pointer;
+ border: 2px solid #F2F2F7;
- // box-shadow: 2px 2px 4px rgb(226, 226, 226);
+ &-active {
+ border: 2px solid #4E94FF;
+ }
+
+ &:hover {
+ background: #F2F2F7;
+ }
+
.child-info {
display: flex;
flex-direction: column;
- // justify-content: space-around;
height: 100%;
.welcome-icon {
font-size: 72px;
@@ -1683,22 +1711,18 @@
img {
width: 64px;
margin: 0 auto;
- margin-top: 65px;
+ margin-top: 61px;
height: 50px;
}
.welcome-title {
font-size: 16px;
font-weight: bold;
margin-top: 24px;
- color: #333333;
+ color: #4F4F4F;
}
}
}
- .nav-child:hover {
- // box-shadow: 4px 4px 12px rgb(218, 218, 218);
- // transform: translate3d(0, -1px, 0);
- // transition: all 0.3s;
- }
+
}
}
.container {
@@ -1709,8 +1733,9 @@
flex-basis: auto;
box-sizing: border-box;
background-color: #fff;
- border-top: 1px solid #e1e0e6;
-
+ color: #4F4F4F;
+ border-top: 2px solid #E1E0E6;
+ overflow-x: hidden;
.container-left {
height: 100%;
width: 244px;
@@ -1718,32 +1743,27 @@
box-sizing: border-box;
flex-shrink: 0;
padding: 10px;
- // border-right: 5px solid rgba(248, 248, 248, 1);
box-sizing: border-box;
.left-card {
height: 56px;
cursor: pointer;
border-radius: 8px;
- margin-bottom: 10px;
+ margin-bottom: 4px;
display: flex;
align-items: center;
padding: 0 20px;
- // .iconfont {
- // margin-left: 25px;
- // margin-right: 10px;
- // font-size: 24px;
- // }
+
.card-text {
margin-left: 20px;
- color: #333333;
+ color: #4F4F4F;
font-weight: bold;
font-size: 16px;
line-height: 22px;
height: 22px;
}
img {
- height: 40px;
- width: 40px;
+ height: 30px;
+ width: 30px;
}
.w {
display: none;
@@ -1753,7 +1773,7 @@
}
}
.left-card-active {
- background-color: #4e94ff !important;
+ background-color: var(--colorCard) !important;
.card-text {
color: #fff !important;
}
@@ -1774,15 +1794,29 @@
overflow: auto;
flex-shrink: 0;
padding: 10px;
- border-right: 4px solid #f2f2f7;
+ padding-top: 6px;
+ padding-right: 5px;
+ border-top: 4px solid #f2f2f7;
+ border-left: 4px solid #f2f2f7;
box-sizing: border-box;
background-color: #fbfaff;
- border-left: 4px solid #f2f2f7;
.account-left {
height: 100%;
.account-list {
height: calc(85%);
overflow: auto;
+ padding-right: 5px;
+ &::-webkit-scrollbar-track, &::-webkit-scrollbar-thumb { visibility: hidden; }
+ &::-webkit-scrollbar {
+ background-color: #fff;
+ }
+
+ &.account-list-scroll::-webkit-scrollbar-thumb, &.account-list-scroll::-webkit-scrollbar-track {
+ visibility: visible;
+ }
+ &.account-list-scroll::-webkit-scrollbar {
+ background-color: #f5f5f5;
+ }
}
.add-account {
color: var(--colorCard);
@@ -1819,10 +1853,9 @@
height: 19.21px;
background: #ffffff;
border-radius: 20px;
- color: #333333;
+ color: #4F4F4F;
transform: scale(0.833333);
line-height: 22.21px;
- // border: 1px solid var(--colorCard) ;
span {
font-size: 13px;
}
@@ -1848,6 +1881,8 @@
position: relative;
padding: 30px 40px;
background: #f2f2f7;
+ border-left: 4px solid #f2f2f7;
+ border-top: 4px solid #f2f2f7;
.account-right {
height: 100%;
.account-content {
@@ -1856,7 +1891,6 @@
margin: 0 auto;
display: flex;
flex-direction: column;
- // margin-bottom: 80px;
align-items: center;
.touxiang-big {
width: 100px;
@@ -1906,7 +1940,7 @@
display: flex;
flex-direction: column;
align-items: center;
- color: #333333;
+ color: #4F4F4F;
min-width: 200px;
.user-name {
margin-bottom: 10px;
@@ -1934,7 +1968,7 @@
margin-left: 10px;
}
.confirm-icon {
- color: #4e94ff;
+ color: var(--colorCard);
font-size: 18px;
margin-left: 10px;
}
@@ -1953,7 +1987,7 @@
height: 20px;
line-height: 20px;
/* border: 1px solid; */
- border: 1px solid #4e94ff;
+ border: 1px solid var(--colorCard);
border-radius: 20px;
background: #f2f2f7;
}
@@ -1981,14 +2015,14 @@
margin-top: 80px;
.alt-pw-btn {
background: rgba(78, 148, 255, 0.1);
- border: 1px solid #4e94ff;
+ border: 1px solid var(--colorCard);
}
.del-usr-btn {
background: #e0e0e0;
color: #fc4958;
}
.auth-set-btn {
- background: #4e94ff;
+ background: var(--colorCard);
color: #ffffff;
}
.item-btn {
@@ -2005,10 +2039,89 @@
}
.change-pw {
+ padding: 40px 10px;
+ max-width: 600px;
+ margin: 0 auto;
+ .title {
+ font-weight: bold;
+ font-size: 16px;
+ line-height: 22px;
+ color: #4F4F4F;
+ margin-bottom: 40px;
+ height: 28px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ .icon {
+ font-size: 28px;
+ font-weight: normal;
+ margin-right: 10px;
+ }
+ }
+ .el-form-item__content {
+ line-height: 48px;
+ display: flex;
+ align-items: center;
+ background: #f2f2f7;
+ border-radius: 8px;
+ padding: 0 15px 0 20px;
+ .el-select-dropdown__item {
+ color: #4F4F4F;
+ height: 32px;
+ font-size: 12px;
+ line-height: 32px;
+ text-align: center;
+ }
+ .el-popper {
+ margin-top: 0;
+ background: #fbfaff;
+ box-shadow: 0px 2px 6px rgb(0 0 0 / 18%);
+ border-radius: 2px;
+ .el-select-dropdown__item.hover,
+ .el-select-dropdown__item:hover {
+ background-color: #f2f2f7;
+ color: var(--colorCard);
+ }
+ }
+ }
+ .el-form-item__error {
+ line-height: 0.7;
+ left: 20px;
+ }
+ .el-form-item {
+ .el-input__inner {
+ background-color: #ffffff;
+ border: 2px solid transparent;
+ border-radius: 20px;
+ height: 32px;
+ line-height: 32px;
+ padding: 0 15px;
+ font-size: 14px;
+ font-weight: bold;
+ }
+ .el-input__inner:focus{
+ border: 2px solid var(--colorCard);
+ }
+ .el-input__inner::placeholder {
+ color: #c0c4cc;
+ font-size: 12px;
+ font-weight: normal;
+ }
+ .el-select {
+ width: 100%;
+ }
+ .el-select .el-input .el-select__caret {
+ color: #4F4F4F;
+ font-size: 14px;
+ font-weight: 600;
+ }
+ }
.p-title {
+ height: 48px;
text-align: left;
- font-size: 15px;
- margin-top: 5px;
+ line-height: 48px;
+ width: 90px;
+ font-weight: 600;
}
}
.el-form-item {
@@ -2022,7 +2135,7 @@
font-size: 15px;
}
.el-input__clear {
- color: #333333;
+ color: #4F4F4F;
font-size: 16px;
line-height: 48px;
}
@@ -2041,7 +2154,7 @@
line-height: 48px;
font-size: 16px;
font-weight: 600;
- color: #333333;
+ color: #4F4F4F;
height: 48px;
background: #fbfaff;
border-bottom: 2px solid #f2f2f7;
@@ -2055,6 +2168,8 @@
color: #333;
height: 100%;
overflow: auto;
+ max-width: 600px;
+ margin: 0 auto;
.el-tree-node {
background: initial;
.el-tree-node__content {
@@ -2070,12 +2185,12 @@
}
.el-checkbox__input.is-checked .el-checkbox__inner,
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
- background-color: #4e94ff;
- border-color: #4e94ff;
+ background-color: var(--colorCard);
+ border-color: var(--colorCard);
}
.el-checkbox__inner {
border-radius: 1px;
- border: 1px solid #4e94ff;
+ border: 1px solid var(--colorCard);
}
.el-tree-node__label {
font-size: 13px;
@@ -2083,7 +2198,7 @@
}
}
.el-tree-node__content:hover {
- border: 2px solid #4e94ff;
+ border: 2px solid var(--colorCard);
}
}
}
@@ -2135,7 +2250,7 @@
}
}
.upload-jpg-border {
- border: 2px solid #4e94ff;
+ border: 2px solid var(--colorCard);
}
}
.add-account-page {
@@ -2161,7 +2276,7 @@
border-radius: 8px;
padding: 0 15px 0 20px;
.el-select-dropdown__item {
- color: #333333;
+ color: #4F4F4F;
height: 32px;
font-size: 12px;
line-height: 32px;
@@ -2175,7 +2290,7 @@
.el-select-dropdown__item.hover,
.el-select-dropdown__item:hover {
background-color: #f2f2f7;
- color: #4e94ff;
+ color: var(--colorCard);
}
}
}
@@ -2192,14 +2307,18 @@
}
.el-form-item {
.el-input__inner {
- background-color: #ffffff;
- border: none;
- border-radius: 20px;
- height: 32px;
- padding: 0 15px;
- font-size: 14px;
- font-weight: bold;
- }
+ background-color: #ffffff;
+ border: 2px solid transparent;
+ border-radius: 20px;
+ height: 32px;
+ line-height: 32px;
+ padding: 0 15px;
+ font-size: 14px;
+ font-weight: bold;
+ }
+ .el-input__inner:focus{
+ border: 2px solid var(--colorCard);
+ }
.el-input__inner::placeholder {
color: #c0c4cc;
font-size: 12px;
@@ -2209,7 +2328,7 @@
width: 100%;
}
.el-select .el-input .el-select__caret {
- color: #333333;
+ color: #4F4F4F;
font-size: 14px;
font-weight: 600;
}
@@ -2220,7 +2339,7 @@
.datetime-right {
.datetime-left {
.device-time {
- color: #333333;
+ color: #4F4F4F;
.title {
display: flex;
justify-content: center;
@@ -2290,7 +2409,7 @@
letter-spacing: 0.5px;
}
.highlight-radio {
- background: #4e94ff;
+ background: var(--colorCard);
color: #ffffff;
}
}
@@ -2427,7 +2546,7 @@
}
.right {
display: flex;
- align-items: baseline;
+ align-items: center;
.desc-min {
font-size: 12px;
font-weight: bold;
@@ -2443,22 +2562,20 @@
background: #f2f2f7;
}
.el-input__inner:focus {
- border: 2px solid #4e94ff;
+ border: 2px solid var(--colorCard);
}
}
.el-button--text {
margin-left: 42px;
color: #409eff;
- /* background: 0 0; */
- padding-left: 0;
- padding-right: 0;
background: rgba(78, 148, 255, 0.1);
- border: 1px solid #4e94ff;
+ border: 1px solid var(--colorCard);
box-sizing: border-box;
border-radius: 20px;
width: 68px;
color: #333;
font-weight: bold;
+ padding: 6px 20px;
}
}
}
@@ -2497,7 +2614,6 @@
}
.ip-input-container {
max-width: none !important;
- display: inline-block;
width: 336px;
height: 34px;
line-height: normal;
@@ -2509,7 +2625,9 @@
border: 2px solid transparent;
}
}
- .btns {
+
+ }
+ .btns {
margin: 0 auto;
margin-top: 40px;
width: fit-content;
@@ -2530,20 +2648,17 @@
height: 40px;
cursor: pointer;
border-radius: 25px;
- background-color: #4e94ff;
+ background-color: var(--colorCard);
color: #fff;
line-height: 40px;
font-weight: bold;
font-size: 16px;
}
}
- }
.container-right-for-account {
background: #fbfaff;
padding: 0;
}
-}
-.del-account-message-box {
}
</style>
--
Gitblit v1.8.0