|
|
|
|
@ -1,10 +1,11 @@
|
|
|
|
|
<template> |
|
|
|
|
<header class="flex v-center between"> |
|
|
|
|
<div> |
|
|
|
|
<div style="display: inline-flex;align-items: center;justify-content: center;height: 100%;"> |
|
|
|
|
<el-image src="public\police-icon.png" style="width: 40px;height: 40px;margin-right: 10px;"></el-image> |
|
|
|
|
<div class="title"><a href="">局长信箱即接即办管理端</a></div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" @click="router.push('/login')">退出</el-button> |
|
|
|
|
<el-button type="primary" @click="logout">退出</el-button> |
|
|
|
|
</div> |
|
|
|
|
</header> |
|
|
|
|
<div class="flex"> |
|
|
|
|
@ -12,19 +13,27 @@
|
|
|
|
|
|
|
|
|
|
<nav> |
|
|
|
|
<a class="flex v-center center wrap pointer" @click="router.push('/')"> |
|
|
|
|
<el-icon><HomeFilled /></el-icon> |
|
|
|
|
<el-icon> |
|
|
|
|
<HomeFilled /> |
|
|
|
|
</el-icon> |
|
|
|
|
<span>首页</span> |
|
|
|
|
</a> |
|
|
|
|
<a class="flex v-center center wrap pointer" @click="router.push('/holiday')"> |
|
|
|
|
<el-icon><Platform /></el-icon> |
|
|
|
|
<el-icon> |
|
|
|
|
<Platform /> |
|
|
|
|
</el-icon> |
|
|
|
|
<span>节假日管理</span> |
|
|
|
|
</a> |
|
|
|
|
<a class="flex v-center center wrap pointer" @click="router.push('/mailbox')"> |
|
|
|
|
<el-icon><Menu /></el-icon> |
|
|
|
|
<el-icon> |
|
|
|
|
<Menu /> |
|
|
|
|
</el-icon> |
|
|
|
|
<span>信件管理</span> |
|
|
|
|
</a> |
|
|
|
|
<a class="flex v-center center wrap pointer" @click="router.push('/user')"> |
|
|
|
|
<el-icon><User /></el-icon> |
|
|
|
|
<el-icon> |
|
|
|
|
<User /> |
|
|
|
|
</el-icon> |
|
|
|
|
<span>人员管理</span> |
|
|
|
|
</a> |
|
|
|
|
</nav> |
|
|
|
|
@ -33,46 +42,65 @@
|
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script setup> |
|
|
|
|
import { HomeFilled, Platform, Setting, Menu, User} from '@element-plus/icons-vue' |
|
|
|
|
import { HomeFilled, Platform, Setting, Menu, User } from '@element-plus/icons-vue' |
|
|
|
|
|
|
|
|
|
import { useRouter } from "vue-router"; |
|
|
|
|
|
|
|
|
|
import axios from 'axios'; |
|
|
|
|
import { ElMessage } from 'element-plus' |
|
|
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
|
|
|
|
|
|
|
const logout = () => { |
|
|
|
|
sessionStorage.removeItem('user'); |
|
|
|
|
axios.post('/api/logout') |
|
|
|
|
.then((res) => { if (res.data === 200) { ElMessage.success('登出成功'); } }) |
|
|
|
|
.catch((e) => { console.log(e) }); |
|
|
|
|
router.push('/login'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
:root { |
|
|
|
|
--header-height: 80px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
header { |
|
|
|
|
background-color: #162582; |
|
|
|
|
color: #fff; |
|
|
|
|
height: var(--header-height); |
|
|
|
|
padding: 0 20px; |
|
|
|
|
|
|
|
|
|
.title { |
|
|
|
|
font-size: 28px; |
|
|
|
|
|
|
|
|
|
a { |
|
|
|
|
text-decoration: none; |
|
|
|
|
color: inherit; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
aside { |
|
|
|
|
background-color: #071254; |
|
|
|
|
color: #fff; |
|
|
|
|
width: 100px; |
|
|
|
|
height: calc(100vh - var(--header-height)); |
|
|
|
|
|
|
|
|
|
nav { |
|
|
|
|
a { |
|
|
|
|
height: 100px; |
|
|
|
|
color: #707ab6; |
|
|
|
|
|
|
|
|
|
&:hover { |
|
|
|
|
color: #fff; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.el-icon { |
|
|
|
|
font-size: 50px; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
span { |
|
|
|
|
width: 100%; |
|
|
|
|
text-align: center; |
|
|
|
|
|