dbsd_kczx/src/views/site/common/header.vue

190 lines
6.0 KiB
Vue
Raw Normal View History

<template>
<a-layout-header>
<!-- <BackTop/> -->
2023-04-15 15:49:46 +08:00
<div id="topDiv" v-show="props.showRightButton">
<a-row >
<a-col :xs="{ span: 0 }" :sm="{ span: 24 }" :lg="{ span: 24 }">
2023-05-31 16:21:12 +08:00
<div class="topButton" @click="toTop" style="float: right;">
2023-04-15 15:49:46 +08:00
<ArrowUpOutlined/>
</div>
</a-col>
<a-col :xs="{ span: 0 }" :sm="{ span: 24 }" :lg="{ span: 24 }">
2023-05-31 16:21:12 +08:00
<div class="topYiJianFanKui" @click="funYjfk" style="float: right;">
2023-04-15 15:49:46 +08:00
意见反馈
</div>
</a-col>
2023-05-31 16:21:12 +08:00
<a-col :xs="{ span: 0 }" :sm="{ span: 24 }" :lg="{ span: 24 }">
<a-menu style="margin-top: 20px;" :selectable="false">
<a-menu-item key="1">
<a class="abox" @click="toDom('tkzjDom')">听课足迹</a>
</a-menu-item>
<a-menu-item key="2">
<a class="abox" @click="toDom('rkjcDom')">任教课程</a>
</a-menu-item>
<a-menu-item key="3">
<a class="abox" @click="toDom('yykcDom')">预约课程</a>
</a-menu-item>
<a-menu-item key="4">
<a class="abox" @click="toDom('jcgkkDom')">&nbsp;&nbsp;&nbsp;&nbsp;</a>
</a-menu-item>
<a-menu-item key="5">
<a class="abox" @click="toDom('kxstkktDom')">线上听课</a>
</a-menu-item>
<a-menu-item key="6">
<a class="abox" @click="toDom('jrkclbDom')">今日课程</a>
</a-menu-item>
</a-menu>
<!-- <div style="background-color: #fff;">
<div>&nbsp;</div>
<div class="topLinkTextEllipsis"><a class="abox" @click="toDom('tkzjDom')">听课足迹</a></div>
<div class="topLinkTextEllipsis"><a class="abox" @click="toDom('rkjcDom')">任教课程</a></div>
<div class="topLinkTextEllipsis"><a class="abox" @click="toDom('yykcDom')">预约课程</a></div>
<div class="topLinkTextEllipsis"><a class="abox" @click="toDom('jcgkkDom')">&nbsp;&nbsp;&nbsp;&nbsp;</a></div>
<div class="topLinkTextEllipsis"><a class="abox" @click="toDom('kxstkktDom')">线上听课</a></div>
<div class="topLinkTextEllipsis"><a class="abox" @click="toDom('jrkclbDom')">今日课程</a></div>
</div> -->
</a-col>
2023-04-15 15:49:46 +08:00
</a-row>
</div>
2023-05-19 21:28:46 +08:00
<span class="topTitle" >
2023-05-22 20:37:15 +08:00
<RouterLink :to="{path:'/site/index'}" style="color:white;">{{ projectName }}</RouterLink>
<RouterLink hidden target='_blank' :to="{path:'/site/liveView',query:{ url: 'rtsp://176.139.87.16/axis-media/media.amp' }}">直播测试页rtsp</RouterLink>
<RouterLink hidden target='_blank' :to="{path:'/site/liveFlvView',query:{ url: 'rtsp://176.139.87.16/axis-media/media.amp' }}">直播测试页flv</RouterLink>
2023-04-24 22:40:50 +08:00
<RouterLink hidden target='_blank' :to="{path:'/site/livem3u8View',query:{ url: 'https://bylwcs.nenu.edu.cn:9553/live_hls/yfjxl101s_lbzj.m3u8' }}">直播测试页m3u8</RouterLink>
2023-04-25 22:11:54 +08:00
<RouterLink hidden target='_blank' :to="{path:'/site/liveRoom',query:{ id: '1139010101' }}">直播测试页正式课堂m3u8</RouterLink>
2023-04-15 09:45:50 +08:00
</span>
<span class="topRight">
<a-dropdown>
<span class="ant-dropdown-link topRightMenu" @click.prevent>
{{ userStore?.getUserInfo?.realname }}
<DownOutlined/>
</span>
<template #overlay>
<a-menu>
<a-menu-item v-if="getUserSf()=='T'">
<!-- <a href="javascript:;">后台管理</a> -->
<RouterLink to="/dashboard/analysis">后台管理</RouterLink>
</a-menu-item>
<a-menu-item>
<a href="javascript:void(0);" @click="userStore?.confirmLoginOut();">安全退出</a>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</span>
2023-04-09 20:14:19 +08:00
<YjfkModal ref="YjfkModalTab"></YjfkModal>
</a-layout-header>
</template>
<script setup lang="ts">
2023-04-15 09:45:50 +08:00
import { ref } from 'vue';
2023-04-03 23:56:45 +08:00
import { DownOutlined, ArrowUpOutlined } from '@ant-design/icons-vue';
import { useUserStore } from '/@/store/modules/user';
2023-04-09 20:14:19 +08:00
import YjfkModal from '/@/views/site/yjfk/YjfkModal.vue';
import { getUserSf } from '/@/views/site/utils/index';
2023-04-09 20:14:19 +08:00
2023-04-15 15:49:46 +08:00
const props = defineProps({
showRightButton: { type: Boolean, default: false }
});
2023-04-15 09:45:50 +08:00
const projectName = import.meta.env.VITE_GLOB_APP_TITLE;
2023-04-09 20:14:19 +08:00
const YjfkModalTab = ref();
//用户相关
const userStore = useUserStore();
2023-05-19 21:28:46 +08:00
function toIndex(){
window.location.href="/site/index"
}
2023-04-06 00:45:01 +08:00
function smoothScroll(topNum){
setTimeout(() => {
if(topNum > 0){
topNum = topNum - 50;
document.body.scrollTop = topNum;
smoothScroll(topNum);
}
},1);
}
2023-05-24 21:11:26 +08:00
function toTop(){
2023-05-22 20:37:15 +08:00
let topNum = 0;
2023-05-24 21:11:26 +08:00
topNum = document.body.scrollTop;
smoothScroll(topNum);
2023-05-22 20:37:15 +08:00
}
function toDom(toId){
let toDom: any = document?.querySelector('#' + toId);
let topNum = toDom?.offsetTop??0;
document.body.scrollTop = topNum;
2023-04-06 00:45:01 +08:00
}
2023-04-09 20:14:19 +08:00
/**
* 意见反馈
*/
function funYjfk(){
YjfkModalTab.value.add()
}
2023-04-03 23:56:45 +08:00
</script>
<style lang="less" scoped>
#siteMain {
#maxSite {
.topTitle {
font-size: 1.5rem;
}
.topRight {
float: right;
.topRightMenu {
font-size: 1.1rem;
}
}
.footerRight {
float: right;
}
}
}
2023-04-06 00:45:01 +08:00
#topDiv {
position: absolute;
right: 1rem;
top: 5rem;
z-index: 1;
2023-05-31 16:21:12 +08:00
width: 100px;
2023-04-06 00:45:01 +08:00
.topButton {
background: #c2c2c2;
margin-bottom: 2rem;
padding: 0.5rem;
width: 4rem;
font-size:3rem;
}
.topYiJianFanKui {
background: #1c84c6;
color:#FFF;
font-size:1.5rem;
padding: 0.5rem;
width: 4rem;
line-height: 2.1rem;
}
2023-05-22 20:37:15 +08:00
.topLinkTextEllipsis {
2023-05-31 16:21:12 +08:00
line-height: 18px;
2023-05-22 20:37:15 +08:00
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
.abox {
//border-radius: 50%;
//background: #1c84c6;
//color: #fff;
//order: dotted red;
2023-05-31 16:21:12 +08:00
// padding: 0.5rem 0.5rem 0.5rem 0;
// border: dotted #1c84c6;
// color: black;
}
2023-04-06 00:45:01 +08:00
}
2023-04-03 23:56:45 +08:00
</style>