From f20a554bdb24e9dfde9dc6a69d78595944f61d15 Mon Sep 17 00:00:00 2001 From: mark <mark18340872469@163.com> Date: 星期二, 25 十月 2022 14:53:57 +0800 Subject: [PATCH] 设备管理 样式调整 --- src/views/manageCenter/index.vue | 64 ++++++++++++++++++++++++-------- 1 files changed, 48 insertions(+), 16 deletions(-) diff --git a/src/views/manageCenter/index.vue b/src/views/manageCenter/index.vue index 8b5b91a..09c9ddf 100644 --- a/src/views/manageCenter/index.vue +++ b/src/views/manageCenter/index.vue @@ -5,7 +5,7 @@ <div class="centerTitle"> <div class="heart"> - <div class="welcome">{{ userName }},娆㈣繋鎮ㄨ礉鎬濈绠$悊涓績.</div> + <div class="welcome">{{ userName }}, 娆㈣繋鎮ㄥ洖鍒拌礉鎬濈绠$悊涓績銆�</div> <div class="time">{{ timeMsg }}</div> </div> </div> @@ -19,11 +19,10 @@ class="productItem" v-for="(item, index) in productList" :key="index" + @click="jump(item)" > - <router-link :to="item.path"> - <img :src="item.icon" alt="" /> - <div class="name">{{ item.name }}</div> - </router-link> + <img :src="item.icon" alt="" /> + <div class="name">{{ item.name }}</div> </div> </div> </div> @@ -36,7 +35,7 @@ <div class="upIcon iconfont"> 2</div> </div> - <img src="/images/manageCenter/浠诲姟鎬绘暟.png" alt="" /> + <img src="/images/manageCenter/total2.png" alt="" /> </div> <div class="equipmentCard"> @@ -46,7 +45,7 @@ <div class="upIcon iconfont"> 2</div> </div> - <img src="/images/manageCenter/鎽勫儚鏈烘�绘暟.png" alt="" /> + <img src="/images/manageCenter/total3.png" alt="" /> </div> <div class="equipmentCard"> @@ -56,7 +55,7 @@ <div class="downIcon iconfont"> 2</div> </div> - <img src="/images/manageCenter/绠楁硶鎬绘暟.png" alt="" /> + <img src="/images/manageCenter/total4.png" alt="" /> </div> <div class="equipmentCard"> @@ -66,7 +65,7 @@ <div class="downIcon iconfont"> 2</div> </div> - <img src="/images/manageCenter/浠诲姟鎬绘暟.png" alt="" /> + <img src="/images/manageCenter/total1.png" alt="" /> </div> </div> @@ -270,20 +269,34 @@ productList: [ { name: "璁惧绠$悊", - icon: "/images/manageCenter/璁惧绠$悊.png", - path: "/equipmentManagement", + icon: "/images/manageCenter/manage.png", + openPath: "/equipmentManagement", + path: "/equipmentList", + permission: "deviceMng", }, { name: "绠楀姏绠$悊", - icon: "/images/manageCenter/绠楀姏绠$悊.png", - path: "/hashrate", + icon: "/images/manageCenter/manage2.png", + openPath: "/hashrate", + path: "/hashrateDetail", + permission: "analysisMng", }, { name: "缁熻鏌ヨ", - icon: "/images/manageCenter/绠楀姏绠$悊.png", - path: "/", + icon: "/images/manageCenter/search.png", + openPath: "/searchOpen", + path: "/search", + permission: "statisticMng", + }, + + { + name: "GB28181", + icon: "/images/manageCenter/search.png", + openPath: "/GB28181Open", + path: "/GB28181Open", + permission: "statisticMng", }, ], timeList: [ @@ -852,6 +865,25 @@ let myChart = echarts.init(pieDom); myChart.setOption(this.pieOption); }, + jump(route) { + const userInfo = JSON.parse(sessionStorage.getItem("userInfo")); + + const val = userInfo.permissions.find((item) => { + return item == route.permission; + }); + if (val) { + if (route.path === "/search") { + const { href } = this.$router.resolve({ + path: "/search", + }); + window.open(href, "_blank"); + return; + } + this.$router.push(route.path); + } else if (!userInfo.parentId) { + this.$router.push(route.openPath); + } + }, refrash() {}, handleSizeChange() {}, }, @@ -1209,7 +1241,7 @@ .item { display: flex; - justify-content: end; + justify-content: flex-end; align-items: center; .label { -- Gitblit v1.8.0