dbsd_kczx/src/views/site/studentWdkc/studentMenu.vue

125 lines
3.8 KiB
Vue
Raw Normal View History

2024-05-09 22:25:24 +08:00
<template>
2024-05-15 11:22:43 +08:00
<div id="siteMain" style="height: 640px;">
2024-05-09 22:25:24 +08:00
<a-row>
<a-col :span="24">
<a-menu
v-model:selectedKeys="selectedKeys"
2024-05-15 11:22:43 +08:00
style="width: 98%;height:640px; margin: 10px 0;"
2024-05-09 22:25:24 +08:00
mode="inline"
>
<a-sub-menu key="sub1">
2024-05-21 17:53:16 +08:00
<template #title>课程简介</template>
<a-menu-item key="1" @click="getGzt('kcjs')">课程简介</a-menu-item>
2024-05-15 11:22:43 +08:00
<a-menu-item key="2" @click="getGzt('tzgg')">通知公告</a-menu-item>
<a-menu-item key="3" @click="getGzt('stuJiaoXueDanYuanNeiRong')">教学单元</a-menu-item>
2024-05-09 22:25:24 +08:00
</a-sub-menu>
<a-sub-menu key="sub4">
2024-05-20 23:01:32 +08:00
<template #title>作业/测验</template>
2024-05-13 16:29:57 +08:00
<a-menu-item key="4" @click="getGzt('dqzy')">课程作业</a-menu-item>
<a-menu-item key="5" @click="getGzt('kcjc')">课程测验</a-menu-item>
2024-05-09 22:25:24 +08:00
</a-sub-menu>
<a-menu-item key="sub5">
<span @click="getGzt('dcwj')">问卷调查</span>
2024-05-09 22:25:24 +08:00
</a-menu-item>
2024-05-20 23:01:32 +08:00
<a-menu-item key="sub6">
<span @click="getGzt('tlq')">讨论区</span>
</a-menu-item>
<!-- <a-menu-item key="sub6">
2024-05-09 22:25:24 +08:00
<span>讨论区</span>
</a-menu-item>
-->
2024-05-09 22:25:24 +08:00
</a-menu>
</a-col>
</a-row>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted, unref } from 'vue';
import { getUserSf,getSysConfig } from '/@/views/site/utils/index';
import { defHttp } from '/@/utils/http/axios';
import { useRouter } from 'vue-router';
import headerPage from '/@/views/site/common/header.vue';
import footerPage from '/@/views/site/common/footer.vue';
import dqxqkc from '/@/views/site/renKeJiaoCheng/checkKecheng/dqxqkc.vue';
2024-05-09 22:25:24 +08:00
const maxClassName = ref<any>({});
const selectedKeys = ref<string[]>([]);
//当前路由信息
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn,type } = query;//获取传递参数
let router = useRouter();
2024-05-09 22:25:24 +08:00
function getGzt(zytype){
console.log(`🚀 ~ getGzt ~ type:`, zytype)
2024-05-13 16:29:57 +08:00
var href = "";
2024-05-15 11:22:43 +08:00
if(zytype=='dqzy'){//当前作业
2024-05-10 20:01:34 +08:00
href = "/stuzy/studentDqzy";
2024-05-15 11:22:43 +08:00
} else if(zytype=='dcwj'){//当前问卷
href = "/stuzy/stuDcwjWenjuan";
2024-05-15 11:22:43 +08:00
}else if(zytype=='kcjc'){//课程检测
href = "/stuzy/stuCeshiWenjuan";
2024-05-21 17:53:16 +08:00
}else if(zytype=='kcjs'){//课程简介
2024-05-15 11:22:43 +08:00
href = "/stuzy/studentMain";
}else if(zytype=='tzgg'){//通知公告
href = "/stuzy/StudentGonggaoList";
2024-05-20 23:01:32 +08:00
}else if(zytype=='tlq'){//讨论区
href = "/stuzy/stuTlq";
}else if(zytype == 'stuJiaoXueDanYuanNeiRong'){//教学单元内容
router.push({ name: 'stuJiaoXueDanYuanNeiRong', query: { rwbh,xqxn,type } });
return;
}
2024-05-15 11:22:43 +08:00
2024-05-09 22:25:24 +08:00
router.push({path:href,query: {rwbh,xqxn,type}});
}
//进入就加载
onMounted(() => {
console.log('rwbh:',rwbh);
});
2024-05-09 22:25:24 +08:00
</script>
<style lang="less" scoped>
#siteMain {
// font-size: ;
// height: 100%;
background: #f3f3f4;
#maxSite {
//最大宽度
max-width: 1070px;
min-height: 750px;
//居中
margin: 0 auto;
.rowGutter{
margin-top: 1rem;
margin-bottom: 1rem;
}
.ant-layout-header {
color: #fff;
background: #1ab394;
}
.ant-layout-footer {
line-height: 1.5;
background: #FFF;
}
.ant-layout-sider {
color: #fff;
line-height: 120px;
background: #3ba0e9;
}
.ant-layout-content {
min-height: 120px;
color: #000;
line-height: 120px;
background: #f3f3f4;
}
}
}
</style>