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

210 lines
7.0 KiB
Vue
Raw Normal View History

2024-05-09 22:25:24 +08:00
<template>
2024-06-18 19:48:24 +08:00
<div id="siteMain">
2024-05-09 22:25:24 +08:00
<a-row>
2024-06-18 19:48:24 +08:00
<a-col :lg="24" :xs="{ span: 0 }">
2024-05-09 22:25:24 +08:00
<a-menu
2024-08-08 09:47:20 +08:00
v-model:openKeys="openKeys"
2024-05-09 22:25:24 +08:00
v-model:selectedKeys="selectedKeys"
2024-05-23 17:30:43 +08:00
style="width: 98%;min-height: calc(100vh - 225px); margin: 10px 0;"
2024-05-09 22:25:24 +08:00
mode="inline"
2024-08-08 09:47:20 +08:00
:inline-collapsed="collapsed"
2024-05-09 22:25:24 +08:00
>
2024-06-18 19:48:24 +08:00
<a-menu-item key="sub1">
2024-08-08 09:47:20 +08:00
<template #icon>
<PieChartOutlined />
</template>
2024-06-18 19:48:24 +08:00
<span @click="getGzt('tzgg')">通知公告</span>
</a-menu-item>
2024-08-09 14:08:22 +08:00
<a-menu-item key="sub2">
<template #icon>
2024-08-12 09:14:57 +08:00
<BarChartOutlined />
2024-08-09 14:08:22 +08:00
</template>
<span @click="getGzt('kcjs')">课程简介</span>
</a-menu-item>
2024-09-20 08:34:10 +08:00
<!-- <a-menu-item key="sub3">
2024-08-08 09:47:20 +08:00
<template #icon>
2024-08-23 09:51:38 +08:00
<SettingOutlined />
2024-08-08 09:47:20 +08:00
</template>
2024-08-23 09:51:38 +08:00
<span @click="getGzt('jxdg')">教学大纲</span>
2024-09-20 08:34:10 +08:00
</a-menu-item> -->
2024-07-23 15:24:38 +08:00
<a-menu-item key="sub4">
2024-08-08 09:47:20 +08:00
<template #icon>
2024-08-12 09:14:57 +08:00
<SnippetsOutlined />
2024-08-08 09:47:20 +08:00
</template>
2024-07-23 15:24:38 +08:00
<span @click="getGzt('dqzy')">课程作业</span>
</a-menu-item>
2024-08-19 08:37:20 +08:00
<a-menu-item key="sub5">
<template #icon>
<AppstoreOutlined />
</template>
<span @click="getGzt('qmks')">期末考试</span>
</a-menu-item>
2024-07-23 15:24:38 +08:00
<a-menu-item key="sub7">
2024-08-08 09:47:20 +08:00
<template #icon>
2024-08-12 09:14:57 +08:00
<AppstoreAddOutlined />
2024-08-08 09:47:20 +08:00
</template>
2024-07-23 15:24:38 +08:00
<span @click="getGzt('kcjc')">课程测验</span>
</a-menu-item>
2024-09-20 08:34:10 +08:00
<a-menu-item key="sub8">
<template #icon>
<BlockOutlined />
</template>
<span @click="getGzt('kczy')">课程资源</span>
</a-menu-item>
2024-05-09 22:25:24 +08:00
</a-menu>
</a-col>
2024-06-18 19:48:24 +08:00
<a-col :lg="0" :xs="{ span: 24 }" style="text-align: right;">
<a-menu
v-model:selectedKeys="selectedKeys"
2024-09-06 17:14:05 +08:00
style="width: 98%; margin: 10px 0; height: 53px;"
2024-06-18 19:48:24 +08:00
mode="horizontal"
>
<a-sub-menu key="min0">
<template #icon>
<MenuUnfoldOutlined />
</template>
<a-menu-item key="min1">
<span @click="getGzt('tzgg')">通知公告</span>
</a-menu-item>
<a-menu-item key="min2">
<span @click="getGzt('kcjs')">课程简介</span>
</a-menu-item>
2024-08-28 08:57:17 +08:00
<!-- <a-menu-item key="min3">
2024-08-23 09:51:38 +08:00
<span @click="getGzt('jxdg')">教学大纲</span>
2024-08-28 08:57:17 +08:00
</a-menu-item> -->
2024-06-18 19:48:24 +08:00
<a-menu-item key="min4">
<span @click="getGzt('dqzy')">课程作业</span>
</a-menu-item>
2024-08-19 08:37:20 +08:00
<a-menu-item key="min6">
<span @click="getGzt('qmks')">期末考试</span>
</a-menu-item>
2024-06-18 19:48:24 +08:00
<a-menu-item key="min5">
<span @click="getGzt('kcjc')">课程测验</span>
</a-menu-item>
2024-09-20 08:34:10 +08:00
<a-menu-item key="min8">
<span @click="getGzt('kczy')">课程资源</span>
</a-menu-item>
2024-08-12 09:14:57 +08:00
<!-- <a-menu-item key="min6">
2024-06-18 19:48:24 +08:00
<span @click="getGzt('dcwj')">问卷调查</span>
</a-menu-item>
<a-menu-item key="min7">
<span @click="getGzt('tlq')">讨论区</span>
2024-08-12 09:14:57 +08:00
</a-menu-item> -->
2024-06-18 19:48:24 +08:00
</a-sub-menu>
</a-menu>
</a-col>
2024-05-09 22:25:24 +08:00
</a-row>
</div>
</template>
<script lang="ts" setup>
2024-08-08 09:47:20 +08:00
import { ref, onMounted, unref ,defineExpose } from 'vue';
2024-05-09 22:25:24 +08:00
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-09-20 08:34:10 +08:00
import { MailOutlined, AppstoreOutlined, SettingOutlined, MenuUnfoldOutlined,PieChartOutlined,BarChartOutlined,SnippetsOutlined,AppstoreAddOutlined,BlockOutlined } from '@ant-design/icons-vue';
2024-08-08 09:47:20 +08:00
2024-05-09 22:25:24 +08:00
const maxClassName = ref<any>({});
const selectedKeys = ref<string[]>([]);
2024-08-08 09:47:20 +08:00
const openKeys = ref<string[]>(['sub0']);
2024-05-09 22:25:24 +08:00
//当前路由信息
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
2024-06-04 08:47:27 +08:00
const { rwbh,xqxn,type,teano } = query;//获取传递参数
2024-05-09 22:25:24 +08:00
let router = useRouter();
2024-08-08 09:47:20 +08:00
const collapsed = ref<any>(false);
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";
2024-07-30 20:39:43 +08:00
}else if(zytype=='zyhp'){//作业互评
href = "/stuzy/zyhp";
}else if(zytype == 'stuJiaoXueDanYuanNeiRong'){//教学单元内容
2024-06-04 08:47:27 +08:00
router.push({ name: 'stuJiaoXueDanYuanNeiRong', query: { rwbh,xqxn,type,teano } });
return;
2024-08-19 08:37:20 +08:00
}else if(zytype=='qmks'){//期末考试
href = "/stuzy/studentQmks";
2024-08-23 09:51:38 +08:00
}else if(zytype=='jxdg'){//jxdg
href = "/stuzy/studentJxdg";
2024-09-20 08:34:10 +08:00
}else if(zytype=='kczy'){//kczy
href = "/stuzy/studentKczy";
}
2024-05-15 11:22:43 +08:00
2024-09-20 08:34:10 +08:00
2024-06-04 08:47:27 +08:00
router.push({path:href,query: {rwbh,xqxn,type,teano}});
2024-05-09 22:25:24 +08:00
}
2024-08-08 09:47:20 +08:00
function toggleCollapsed() {
collapsed.value = !collapsed.value;
openKeys.value = collapsed.value ? [] : selectedKeys.value;
}
2024-05-09 22:25:24 +08:00
//进入就加载
onMounted(() => {
console.log('rwbh:',rwbh);
});
2024-08-08 09:47:20 +08:00
defineExpose({
toggleCollapsed
});
2024-05-09 22:25:24 +08:00
</script>
<style lang="less" scoped>
#siteMain {
// font-size: ;
// height: 100%;
background: #f3f3f4;
#maxSite {
//最大宽度
max-width: 1070px;
//居中
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;
}
}
}
2024-06-18 19:48:24 +08:00
.ant-menu-overflow {
flex-direction: row-reverse
}
</style>