From 0e11714f01de9fe1756d6896f67bcd07ff50a148 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Wed, 10 Aug 2022 18:34:52 +0800
Subject: [PATCH] Merge branch 'master' of https://sinanoaq.cn:8888/r/gtqt
---
src/views/homeMenu/homeMenu.vue | 42 ++++++++++++++++++++++++++++++++++--------
1 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/src/views/homeMenu/homeMenu.vue b/src/views/homeMenu/homeMenu.vue
index 04087b8..4c3a9a0 100644
--- a/src/views/homeMenu/homeMenu.vue
+++ b/src/views/homeMenu/homeMenu.vue
@@ -8,6 +8,9 @@
<div>安全风险预警监测系统</div>
</div>
<div class="userInfo">
+ <div @click="onScreenfullClick" style="margin-right: 15px;cursor: pointer">
+ <i class="iconfont" :title="isScreenfull ? $t('message.user.title6') : $t('message.user.title5')" :class="!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'"></i>
+ </div>
<div class="avator">
<img src="../../assets/menu/admin.png" />
<div>admin</div>
@@ -37,7 +40,7 @@
<img class="iconImg" src="../../assets/menu/icon8.png" /><img class="bgImg" src="../../assets/menu/card8.png" /></div
></el-col>
<el-col :span="6">
- <div class="grid-content" v-throttle @click="render('5')">
+ <div class="grid-content" v-throttle @click="toRiskPlatform">
<div class="itemTit">安全风险综合 <br />预警预报平台</div>
<img class="iconImg" src="../../assets/menu/icon1.png" />
<img class="bgImg" src="../../assets/menu/card1.png" />
@@ -79,7 +82,7 @@
></el-col>
<el-col :span="9"
><div class="grid-content grid-content-3" @click="render('1')">
- <div class="itemTit">基础数据权限管理系统</div>
+ <div class="itemTit">安全基础信息系统</div>
<img class="iconImg" src="../../assets/menu/icon11.png" /><img class="bgImg" src="../../assets/menu/card11.png" /></div
></el-col>
</el-row>
@@ -106,6 +109,8 @@
import { ElMessageBox } from 'element-plus/es';
import { useLoginApi } from '/@/api/login';
import { useI18n } from 'vue-i18n';
+import screenfull from 'screenfull';
+import router from '../../router'
// 定义接口来定义对象的类型
interface LoginState {
@@ -133,7 +138,8 @@
isScan: false,
count: 0,
projectId: '1',
- once: 0
+ once: 0,
+ isScreenfull: false
});
// 获取布局配置信息
const getThemeConfig = computed(() => {
@@ -185,7 +191,24 @@
state.projectId = value;
renderMenu();
};
-
+ // 全屏点击时
+ const onScreenfullClick = () => {
+ if (!screenfull.isEnabled) {
+ ElMessage.warning('暂不不支持全屏');
+ return false;
+ }
+ screenfull.toggle();
+ screenfull.on('change', () => {
+ if (screenfull.isFullscreen) state.isScreenfull = true;
+ else state.isScreenfull = false;
+ });
+ };
+ // 去风险大屏
+ const toRiskPlatform = ()=>{
+ router.push({
+ name: "bigDataScreen"
+ });
+ }
const throttle = (renderMenu: any, delay: number) => {
let flag = true;
let count = 0;
@@ -247,6 +270,8 @@
render,
logoMini,
onLoginOut,
+ toRiskPlatform,
+ onScreenfullClick,
loginIconTwo,
getThemeConfig,
...toRefs(state)
@@ -260,7 +285,7 @@
width: 100%;
height: 100%;
position: relative;
- background: url('../../assets/menu/bg_home1.jpg') no-repeat center;
+ background: url('../../assets/menu/bg_home.jpg') no-repeat center;
.topPanel {
position: absolute;
width: 100%;
@@ -366,10 +391,10 @@
.grid-content {
border-radius: 10px;
- height: 234px;
+ height: calc((100vh - 240px) / 3);
padding: 32px;
position: relative;
- background-image: linear-gradient(135deg, #00c0f5, #44b1ff);
+ background: #007BE5;
overflow: hidden;
cursor: pointer;
transition: 0.3s;
@@ -384,7 +409,8 @@
line-height: 36px;
height: 40%;
font-family: 'PingFang SC';
- font-weight: lighter;
+ font-weight: bolder;
+ letter-spacing: 1px;
color: #fff;
margin-bottom: 25px;
}
--
Gitblit v1.9.2