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/index/index.vue | 81 +++++++++++++++++++--------------------- 1 files changed, 39 insertions(+), 42 deletions(-) diff --git a/src/pages/settings/index/index.vue b/src/pages/settings/index/index.vue index 61e1bc0..e8eaf50 100644 --- a/src/pages/settings/index/index.vue +++ b/src/pages/settings/index/index.vue @@ -216,35 +216,6 @@ <div class="permission" v-if="inAccountDetail && isSetPermission"> <div class="title">鏉冮檺绠$悊</div> - - <!-- <div class="line-wrap" v-for="item in sysMenus" :key="item.id"> - <div class="line"> - <div class="name">{{ item.name }}</div> - <el-switch - v-model="item.selected" - active-color="rgba(61, 104, 225, 1)" - @change="fatherChange(item)" - > - </el-switch> - </div> - <div v-if="item.children"> - <div - class="line" - style="margin-left: 55px" - v-for="x in item.children" - :key="x.id" - > - <div class="name">{{ x.name }}</div> - <el-switch - v-model="x.selected" - active-color="rgba(61, 104, 225, 1)" - @change="childrenChange(item)" - > - </el-switch> - </div> - </div> - </div> --> - <!-- --> <div class="tree-window"> <el-tree ref="treeMenus" @@ -607,6 +578,7 @@ ></deviceInfo> <Authorization v-if="activeIndex == 7" style="width: 100%" ref="view_7"> </Authorization> + <WebManage v-if="activeIndex == 8"></WebManage> </div> <div class="welcome-page" v-else ref="curPage" @mouseup="mouseDownIndex = ''"> <div @@ -620,7 +592,6 @@ size="mini" @focus="showRecomand = true" clearable - @input="filterRecomand" :suffix-icon="showRecomand && searchText.length ? '' : 'el-icon-search'" v-model="searchText" > @@ -680,6 +651,7 @@ import keyboardLanguage from "../views/keyboardLanguage"; import generalSettings from "../views/generalSettings"; import Authorization from "../views/Authorization"; +import WebManage from "@/pages/settings/components/WebManage"; import { pad0, getUrlKey } from "@/api/utils"; export default { @@ -693,6 +665,7 @@ generalSettings, deviceInfo, Authorization, + WebManage, }, data() { var v2 = (rule, value, callback) => { @@ -836,9 +809,16 @@ { name: "鎺堟潈绠$悊", icon: "\ue7e9;", - imgUrl: "/images/settings/璁惧淇℃伅.png", + imgUrl: "/images/settings/鎺堟潈绠$悊.png", blackIcon: "/images/settings/榛戣壊涓�绾con/鎺堟潈绠$悊.png", whiteIcon: "/images/settings/鐧借壊涓�绾con/鎺堟潈绠$悊.png", + }, + { + name: "鍩熷悕绠$悊", + icon: "\ue6db", + imgUrl: "/images/settings/閫氱敤璁剧疆.png", + blackIcon: "/images/settings/榛戣壊涓�绾con/閫氱敤璁剧疆.png", + whiteIcon: "/images/settings/鐧借壊涓�绾con/閫氱敤璁剧疆.png", }, ], accountArr: [], @@ -899,13 +879,6 @@ }; }, created() { - window.parent.postMessage( - { - msg: "showBack", - }, - "*" - ); - let color = localStorage.getItem("--colorCard"); if (color) { document.documentElement.style.setProperty("--colorCard", `${color}`); @@ -916,6 +889,7 @@ clearInterval(this.browserTimer); }, mounted() { + // 杩斿洖鎸夐挳鍥炶皟 window.addEventListener("message", (e) => { if (e.data.msg === "杩斿洖绯荤粺璁剧疆") { this.showWelcome = true; @@ -1530,6 +1504,10 @@ return false; }, isShowPermitBtn() { + // basic 鐢ㄦ埛涓嶅厑璁镐慨鏀规潈闄� + if (this.activeUserRole == "瓒呯骇绠$悊鍛�") { + return false; + } if (this.curUserRole == "绠$悊鍛�") { return this.activeUserRole == "鏅�氱敤鎴�"; } else { @@ -1543,6 +1521,27 @@ return this.searchArr.filter((item) => { return item.name.indexOf(this.searchText.toUpperCase()) > -1; }); + } + }, + }, + watch: { + showWelcome(newVal) { + if (newVal) { + // 闅愯棌杩斿洖鎸夋寜閽� + window.parent.postMessage( + { + msg: "hiddenBack", + }, + "*" + ); + } else { + //鏄剧ず杩斿洖鎸夐挳 + window.parent.postMessage( + { + msg: "showBack", + }, + "*" + ); } }, }, @@ -2044,7 +2043,7 @@ .change-pw { padding: 40px 10px; - max-width: 600px; + // max-width: 600px; margin: 0 auto; .title { font-weight: bold; @@ -2268,7 +2267,7 @@ line-height: 22px; } .fill-group { - max-width: 450px; + // max-width: 450px; margin-top: 10px; margin: 0 auto; @@ -2664,5 +2663,3 @@ } } </style> - - -- Gitblit v1.8.0