Browse Source

工作台

CzRger 9 months ago
parent
commit
297871545b

+ 1 - 1
snowy-admin-web/src/config/index.js

@@ -58,7 +58,7 @@ const DEFAULT_CONFIG = {
 	SNOWY_LOGIN_USER_WATERMARK_OPEN: false,
 
 	// 页脚版权信息
-	SNOWY_FOOTER_COPYRIGHT_OPEN: true,
+	SNOWY_FOOTER_COPYRIGHT_OPEN: false,
 
 	// 圆角风格
 	SNOWY_ROUNDED_CORNER_STYLE_OPEN: true,

+ 5 - 0
snowy-admin-web/src/layout/components/setting.vue

@@ -172,6 +172,11 @@
 			tips: '顶部菜单',
 			value: layoutEnum.TOP,
 			style: 'snowy-setting-layout-menu-top'
+		},
+		{
+			tips: '左侧菜单',
+			value: layoutEnum.LEFT,
+			style: 'snowy-setting-layout-menu-left'
 		}
 	])
 	const xnFormStyleOptions = ref([

+ 3 - 2
snowy-admin-web/src/layout/menu/leftMenu.vue

@@ -7,7 +7,7 @@
 			<a-layout>
 				<div id="snowyHeader" class="snowy-header">
 					<div class="snowy-header-left xn-pl0">
-						<div class="logo-bar is-mobile">
+						<div class="logo-bar is-mobile __hover" @click="toPortal">
 							<img class="logo" :src="sysBaseConfig.SNOWY_SYS_LOGO"/>
 							<span>{{ sysBaseConfig.SNOWY_SYS_NAME }}</span>
 						</div>
@@ -37,7 +37,7 @@
 			<a-layout-header class="left-menu-header">
 				<div id="snowyHeader" class="snowy-header">
 					<div class="snowy-header-left xn-pl0">
-						<div class="logo-bar">
+						<div class="logo-bar __hover" @click="toPortal">
 							<img class="logo" :src="sysBaseConfig.SNOWY_SYS_LOGO"/>
 							<span>{{ sysBaseConfig.SNOWY_SYS_NAME }}</span>
 						</div>
@@ -108,6 +108,7 @@ import NavMenu from '@/layout/components/NavMenu.vue'
 import ModuleMenu from '@/layout/components/moduleMenu.vue'
 import IframeView from '@/layout/components/iframeView.vue'
 import Breadcrumb from '@/layout/components/breadcrumb.vue'
+import {toPortal} from "@/views/auth/login/util";
 
 const props = defineProps({
 	layout: {type: String}, // 布局信息

+ 8 - 0
snowy-admin-web/src/router/systemRouter.js

@@ -41,6 +41,14 @@ const routes = [
 		meta: {
 			title: '三方登录'
 		}
+	},
+	{
+		path: '/portal',
+		name: 'c6085eae-3dc7-4452-aaa3-158eb2d9e106',
+		component: () => import('@/views/auth/portal/index.vue'),
+		meta: {
+			title: '工作台'
+		}
 	}
 ]
 

BIN
snowy-admin-web/src/style/PangMenZhengDao.ttf


BIN
snowy-admin-web/src/style/YouSheBiaoTiHei.TTF


+ 8 - 0
snowy-admin-web/src/style/font.less

@@ -0,0 +1,8 @@
+@font-face {
+  font-family: PangMenZhengDao;
+  src: url("@/style/PangMenZhengDao.ttf");
+}
+@font-face {
+  font-family: YouSheBiaoTiHei;
+  src: url("@/style/YouSheBiaoTiHei.TTF");
+}

+ 1 - 0
snowy-admin-web/src/style/index.less

@@ -1,6 +1,7 @@
 @import './realdark';
 @import './default';
 @import './cus';
+@import './font';
 
 .body, html {
 	width: 100%;

+ 27 - 19
snowy-admin-web/src/views/auth/login/util.js

@@ -22,25 +22,26 @@ export const afterLogin = async (loginToken) => {
 	// 重置系统默认应用
 	tool.data.set('SNOWY_MENU_MODULE_ID', menu[0].id)
 	message.success('登录成功')
-	if (tool.data.get('LAST_VIEWS_PATH')) {
-		// 如果有缓存,将其登录跳转到最后访问的路由
-		indexMenu = tool.data.get('LAST_VIEWS_PATH')
-	}
-	// 如果存在退出后换新账号登录,进行重新匹配,匹配无果则默认首页
-	if (menu) {
-		let routerTag = 0
-		menu.forEach((item) => {
-			if (item.children) {
-				if (JSON.stringify(item.children).indexOf(indexMenu) > -1) {
-					routerTag++
-				}
-			}
-		})
-		if (routerTag === 0) {
-			// 取首页
-			indexMenu = routerUtil.getIndexMenu(menu).path
-		}
-	}
+	// if (tool.data.get('LAST_VIEWS_PATH')) {
+	// 	// 如果有缓存,将其登录跳转到最后访问的路由
+	// 	indexMenu = tool.data.get('LAST_VIEWS_PATH')
+	// }
+	// // 如果存在退出后换新账号登录,进行重新匹配,匹配无果则默认首页
+	// if (menu) {
+	// 	let routerTag = 0
+	// 	menu.forEach((item) => {
+	// 		if (item.children) {
+	// 			if (JSON.stringify(item.children).indexOf(indexMenu) > -1) {
+	// 				routerTag++
+	// 			}
+	// 		}
+	// 	})
+	// 	if (routerTag === 0) {
+	// 		// 取首页
+	// 		indexMenu = routerUtil.getIndexMenu(menu).path
+	// 	}
+	// }
+	indexMenu = '/portal'
 	dictApi.dictTree().then((data) => {
 		// 设置字典到store中
 		tool.data.set('DICT_TYPE_TREE_DATA', data)
@@ -49,3 +50,10 @@ export const afterLogin = async (loginToken) => {
 		path: indexMenu
 	})
 }
+
+export const toPortal = () => {
+	const routerUrl = router.resolve({
+		name: 'c6085eae-3dc7-4452-aaa3-158eb2d9e106',
+	});
+	window.open(routerUrl.href, "_blank");
+}

BIN
snowy-admin-web/src/views/auth/portal/bg.png


BIN
snowy-admin-web/src/views/auth/portal/icon-1.png


BIN
snowy-admin-web/src/views/auth/portal/icon-2.png


BIN
snowy-admin-web/src/views/auth/portal/icon-3.png


+ 95 - 0
snowy-admin-web/src/views/auth/portal/index.vue

@@ -0,0 +1,95 @@
+<template>
+	<div class="portal">
+		<template v-for="item in portalLinkOptions">
+			<div class="portal-item">
+				<div class="portal-item-title" v-html="item.label"/>
+				<div class="portal-item-icon">
+					<img :src="icons[$TOOL.dictTypeData('portal_link_icon', item.label)]"/>
+				</div>
+				<div class="portal-item-to __hover" @click="toLink(item)">进入系统</div>
+			</div>
+		</template>
+	</div>
+</template>
+<script setup>
+	import tool from "@/utils/tool";
+
+	const { proxy } = getCurrentInstance()
+	import icon1 from './icon-1.png'
+	import icon2 from './icon-2.png'
+	import icon3 from './icon-3.png'
+	const icons = {
+		1: icon1,
+		2: icon2,
+		3: icon3,
+	}
+	const portalLinkOptions = tool.dictList('portal_link')
+	const toLink = (item) => {
+		window.open(item.value)
+	}
+</script>
+<style lang="less" scoped>
+.portal {
+	width: 100%;
+	height: 100%;
+	background-image: url("./bg.png");
+	background-size: 100% 100%;
+	background-repeat: no-repeat;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	gap: 40px;
+	.portal-item {
+		margin-top: 80px;
+		width: 422px;
+		height: 618px;
+		background-image: url("./item-bg.png");
+		background-size: 100% 100%;
+		background-repeat: no-repeat;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		position: relative;
+		.portal-item-title {
+			font-family: YouSheBiaoTiHei;
+			font-weight: bold;
+			font-size: 44px;
+			color: #D1E1FF;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			text-align: center;
+			letter-spacing: 10px;
+			line-height: 1.5;
+			position: absolute;
+			top: 34px;
+		}
+		.portal-item-to {
+			width: 397px;
+			height: 66px;
+			position: absolute;
+			bottom: 40px;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			font-family: Source Han Sans CN;
+			font-weight: bold;
+			font-size: 32px;
+			background: linear-gradient(180deg, #FFFFFF 0%, #aedffa 100%);
+			-webkit-background-clip: text;
+			-webkit-text-fill-color: transparent;
+			letter-spacing: 6px;
+			&:before {
+				content: '';
+				background-image: url("./to-bg.png");
+				background-size: 100% 100%;
+				background-repeat: no-repeat;
+				width: 100%;
+				height: 100%;
+				position: absolute;
+			}
+		}
+	}
+}
+</style>

BIN
snowy-admin-web/src/views/auth/portal/item-bg.png


BIN
snowy-admin-web/src/views/auth/portal/to-bg.png