| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421 |
- <template>
- <div style="height:100%">
- <Header v-if="!gotype"></Header>
- <div class="container">
- <div class="container-left" :style="leftShow ? { width: 0 } : { width: '240px' }" v-if="!gotype">
- <div class="container-left-top" @click="dialogVisible1 = !dialogVisible1">
- <span>
- <img class="icon-img" :src="img11" alt="AI 应用" />AI通识课
- <img v-if="dialogVisible1" class="up" :src="img3" alt="up" />
- <img v-else class="up" :src="down" alt="down" />
- </span>
- </div>
- <transition name="fade">
- <div v-if="dialogVisible1">
- <div :class="activeIndex == 0 ? 'container-left-top active' : 'container-left-top'" @click="clickSwitch(0)">
- 教学中心
- </div>
- <!-- v-if="isLogin" -->
- <div :class="activeIndex == 9 ? 'container-left-top active' : 'container-left-top'" @click="clickSwitch(9)">
- 创建课程
- </div>
- <div :class="activeIndex == 5 ? 'container-left-top active' : 'container-left-top'" @click="clickSwitch(5)">
- 学生评价
- </div>
- <div v-if="admin" :class="activeIndex == 6 ? 'container-left-top active' : 'container-left-top'"
- @click="clickSwitch(6)">
- 学生管理
- </div>
- </div>
- </transition>
- <div class="container-left-top" @click="dialogVisible = !dialogVisible">
- <span>
- <img class="icon-img" :src="img2" alt="AI 应用" />AI 应用
- <img v-if="dialogVisible" class="up" :src="img3" alt="up" />
- <img v-else class="up" :src="down" alt="down" />
- </span>
- </div>
- <transition name="fade">
- <div v-if="dialogVisible">
- <div :class="activeIndex == 1 ? 'container-left-top active' : 'container-left-top'" @click="clickSwitch(1)">
- 应用中心
- </div>
- <div :class="activeIndex == 2 ? 'container-left-top active' : 'container-left-top'" @click="clickSwitch(2)">
- 创建应用
- </div>
- <div :class="activeIndex == 7 ? 'container-left-top active' : 'container-left-top'" @click="clickSwitch(7)">
- 教学空间
- </div>
- <div :class="activeIndex == 8 ? 'container-left-top active' : 'container-left-top'" @click="clickSwitch(8)">
- 学习空间
- </div>
- <!-- <div :class="activeIndex == 3 ? 'container-left-top active' : 'container-left-top'" @click="clickSwitch(3)">
- AI
- 应用精选</div> -->
- <div :class="activeIndex == 4 ? 'container-left-top active' : 'container-left-top'" @click="clickSwitch(4)">
- 知识库
- </div>
- </div>
- </transition>
- <div class="container-left-show" :style="!leftShow ? { left: '200px' } : { left: '0' }"
- @click="leftShow = !leftShow">
- <span v-if="leftShow"><el-icon><ArrowRight /></el-icon></span>
- <span v-else><el-icon><ArrowLeft /></el-icon></span>
- </div>
- </div>
- <div class="main" :style="leftShow ? { width: '100%' } : ''" v-if="activeIndex == 0" :class="[gotype ? 'liyuan' : '']">
- <div class="pgb" v-if="gotype">
- <div @click="backO" class="pgbL">
- <img src="../assets/icon/backPage.svg" alt="">
- <div>AI通识课</div>
- </div>
- </div>
- <!-- <BannerVue></BannerVue> -->
- <CourseSelect></CourseSelect>
- <AIExperience></AIExperience>
- <AIexploration></AIexploration>
- <DemoCurourse />
- <!-- <resource></resource> -->
- <Practice></Practice>
- <!-- <other v-if="!isupdateCourse"></other> -->
- <!-- <Edu v-if="isLogin"></Edu> -->
- </div>
- <div class="iframe" :style="leftShow ? { width: '100%' } : ''" v-else-if="activeIndex == 1" v-loading="loading">
- <iframe ref="iframeRef1" :src="iframeRef1Url" frameborder="0"></iframe>
- </div>
- <div class="iframe" :style="leftShow ? { width: '100%' } : ''" v-else-if="activeIndex == 2" v-loading="loading">
- <iframe ref="iframeRef2" :src="iframeRef2Url" frameborder="0"></iframe>
- <el-dialog v-model="iframeRef2Dialog" width="450" @close="clickSwitch(1)">
- <template #header="{ }">
- <div class="my-header">
- <h4 style="display: flex;align-items: center;color: #0354D7;font-weight: bold;"><img :src="info" alt=""
- style="margin-right: 5px;" />无权访问 !</h4>
- </div>
- </template>
- <div class="dialog-content">
- 暂无开通权限,请通过<span style="color: #0354D7;font-weight: bold;">“support@cocorobo.cc”</span>联系管理员。
- </div>
- <template #footer="{ }">
- <div class="dialog-footer" style="text-align: right;">
- <el-button @click="clickSwitch(1)">返回</el-button>
- <el-button type="primary" @click="copyEmail">复制邮箱</el-button>
- </div>
- </template>
- </el-dialog>
- </div>
- <div class="iframe" :style="leftShow ? { width: '100%' } : ''" v-else-if="activeIndex == 3" v-loading="loading">
- <iframe allow="camera *; microphone *; display-capture; midi; encrypted-media; fullscreen; geolocation; clipboard-read; clipboard-write; accelerometer; autoplay; gyroscope; payment; picture-in-picture; usb; xr-spatial-tracking;" ref="iframeRef" src="//app.cocorobo.cn/#/appSelection" frameborder="0"></iframe>
- </div>
- <div class="iframe" :style="leftShow ? { width: '100%' } : ''" v-else v-loading="loading">
- <iframe allow="camera *; microphone *; display-capture; midi; encrypted-media; fullscreen; geolocation; clipboard-read; clipboard-write; accelerometer; autoplay; gyroscope; payment; picture-in-picture; usb; xr-spatial-tracking;" ref="iframeRef4" :src="iframeRef1Url4" frameborder="0"></iframe>
- </div>
- </div>
- <Feedback></Feedback>
- </div>
- </template>
- <script setup>
- import { ref, watchEffect, onMounted } from 'vue';
- import { ArrowLeft,ArrowRight } from '@element-plus/icons-vue'
- import img1 from '@/assets/icon/1.png'
- import img11 from '@/assets/icon/1-1.png'
- import img2 from '@/assets/icon/2.png'
- import img3 from '@/assets/icon/up.png'
- import down from '@/assets/icon/down.png'
- import info from '@/assets/icon/info.png'
- import shows from '@/assets/icon/show.png'
- import BannerVue from '@/components/main/banner.vue'
- import CourseSelect from '@/components/main/courseSelect.vue'
- import DemoCurourse from '@/components/main/demoCourse.vue'
- import resource from '@/components/main/resource.vue';
- import Practice from '@/components/main/Practice.vue';
- import AIExperience from '@/components/main/AIExperience.vue';
- import AIexploration from '@/components/main/AIexploration.vue';
- import other from '@/components/main/other.vue';
- import Edu from '@/components/main/edu.vue';
- import Feedback from '@/components/main/feedback.vue';
- import Header from './header.vue'
- import { userCurrentRole, userInfoStore } from '../stores/counter'
- const user = userInfoStore()
- const CurrentRole = userCurrentRole()
- const isupdateCourse = ref(false)
- const isLogin = ref(false)
- const activeIndex = ref(0)
- const dialogVisible = ref(true)
- const dialogVisible1 = ref(true)
- const iframeRef = ref(null)
- const iframeRef1 = ref(null)
- const iframeRef2 = ref(null)
- const iframeRef4 = ref(null)
- const loading = ref(false)
- const iframeRef1Url = ref('')
- const iframeRef2Url = ref('')
- const iframeRef1Url4 = ref('')
- const iframeRef2Dialog = ref(false)
- const leftShow = ref(false)
- const admin = ref(false)
- const gotype = ref((window.topU && window.topU.gotype2) ? window.topU.gotype2 : '')
- onMounted(() => {
- console.log('gotype',gotype.value);
- console.log('gotype',sessionStorage.getItem('gotype2'));
- // let timer = setInterval(() => {
- // if (JSON.stringify(user.user) != "{}") {
- // clickSwitch(1)
- // clearInterval(timer)
- // }
- // }, 10);
- })
- watchEffect(() => {
- // console.log('111111111111',CurrentRole, user.user)
- if (JSON.stringify(user.user) != "{}") {
- isLogin.value = true
- if (CurrentRole.currentRole == "edupersonnel" || CurrentRole.currentRole == "areaAdministrator" || CurrentRole.currentRole == "userAdministrator" || CurrentRole.currentRole == "securityAuditor" || CurrentRole.currentRole == "schoolAdministrator" || CurrentRole.currentRole == "schoolSecurityAuditor" || CurrentRole.currentRole == "teacher" || user.user.type != 2) {
- isupdateCourse.value = true
- }
- if (CurrentRole.currentRole == "edupersonnel" || CurrentRole.currentRole == "areaAdministrator" || CurrentRole.currentRole == "userAdministrator" || CurrentRole.currentRole == "securityAuditor" || CurrentRole.currentRole == "schoolAdministrator" || CurrentRole.currentRole == "schoolSecurityAuditor" || CurrentRole.currentRole == "teacher" || user.user.type != 2) {
- admin.value = true
- }
- }
- })
- const clickSwitch = (index) => {
- console.log('clickSwitch', activeIndex.value)
- if (index == 1 && activeIndex.value != 1) {
- loading.value = true
- iframeRef1Url.value = `//app.cocorobo.cn/#/appManagement?userid=${user.user.userid}&oid=${user.user.organizeid}&org=${user.user.org}&role=${user.user.role}`
- setTimeout(() => {
- iframeRef1.value.onload = () => {
- loading.value = false
- }
- }, 100)
- } else if (index == 3 && activeIndex.value != 3) {
- loading.value = true
- setTimeout(() => {
- iframeRef.value.onload = () => {
- loading.value = false
- }
- }, 10)
- } else if (index == 2 && activeIndex.value != 2) {
- loading.value = true
- iframeRef2Url.value = `//app.cocorobo.cn/#/AppList?userid=${user.user.userid}&oid=${user.user.organizeid}&org=${user.user.org}&role=${user.user.role}`
- setTimeout(() => {
- iframeRef2.value.onload = () => {
- loading.value = false
- }
- }, 10)
- } else if (index == 4 && activeIndex.value != 4) {
- loading.value = true
- // //storage.cocorobo.cn/dist/#/knowledge?userid=b7ccc834-aae5-11ea-a8d4-52540005ab01&oid=45facc0a-1211-11ec-80ad-005056b86db5&org=null
- iframeRef1Url4.value = `//storage.cocorobo.cn/dist/#/knowledge?userid=${user.user.userid}&oid=${user.user.organizeid}&org=${user.user.org}`
- setTimeout(() => {
- iframeRef4.value.onload = () => {
- loading.value = false
- }
- loading.value = false
- }, 100)
- } else if (index == 5 && activeIndex.value != 5) {
- loading.value = true
- // iframeRef1Url4.value = `//pbl.cocorobo.cn/pbl-teacher-table/dist/#/works?userid=4e748720-5878-11ef-b873-005056b86db5&oid=46034950-39b1-11ef-b873-005056b86db5&org=16ace517-b5c7-4168-a9bb-a9e0035df840`
- iframeRef1Url4.value = `//pbl.cocorobo.cn/pbl-teacher-table/dist/#/works?userid=${user.user.userid}&oid=${user.user.organizeid}&org=${user.user.org}`
- setTimeout(() => {
- iframeRef4.value.onload = () => {
- loading.value = false
- }
- loading.value = false
- }, 100)
- } else if (index == 6 && activeIndex.value != 6) {
- loading.value = true
- //pbl.cocorobo.cn/pbl-teacher-table/dist/#/grade?userid=4e748720-5878-11ef-b873-005056b86db5&oid=46034950-39b1-11ef-b873-005056b86db5&org=16ace517-b5c7-4168-a9bb-a9e0035df840
- iframeRef1Url4.value = `//pbl.cocorobo.cn/pbl-teacher-table/dist/#/grade?userid=${user.user.userid}&oid=${user.user.organizeid}&org=${user.user.org}`
- setTimeout(() => {
- iframeRef4.value.onload = () => {
- loading.value = false
- }
- loading.value = false
- }, 100)
- } else if (index == 7 && activeIndex.value != 7) {
- loading.value = true
- //pbl.cocorobo.cn/pbl-teacher-table/dist/#/grade?userid=4e748720-5878-11ef-b873-005056b86db5&oid=46034950-39b1-11ef-b873-005056b86db5&org=16ace517-b5c7-4168-a9bb-a9e0035df840
- iframeRef1Url4.value = `//app.cocorobo.cn/#/teachingModel?userid=${user.user.userid}&oid=${user.user.organizeid}&org=${user.user.org}&role=${user.user.role}`
- setTimeout(() => {
- iframeRef4.value.onload = () => {
- loading.value = false
- }
- loading.value = false
- }, 100)
- } else if (index == 8 && activeIndex.value != 8) {
- loading.value = true
- //pbl.cocorobo.cn/pbl-teacher-table/dist/#/grade?userid=4e748720-5878-11ef-b873-005056b86db5&oid=46034950-39b1-11ef-b873-005056b86db5&org=16ace517-b5c7-4168-a9bb-a9e0035df840
- iframeRef1Url4.value = `//app.cocorobo.cn/#/cocobookllm?userid=${user.user.userid}&oid=${user.user.organizeid}&org=${user.user.org}&role=${user.user.role}`
- setTimeout(() => {
- iframeRef4.value.onload = () => {
- loading.value = false
- }
- loading.value = false
- }, 100)
- } else if (index == 9 && activeIndex.value != 9) {
- loading.value = true
- //pbl.cocorobo.cn/pbl-teacher-table/dist/#/grade?userid=4e748720-5878-11ef-b873-005056b86db5&oid=46034950-39b1-11ef-b873-005056b86db5&org=16ace517-b5c7-4168-a9bb-a9e0035df840
- iframeRef1Url4.value = `//pbl.cocorobo.cn/pbl-teacher-table/dist/#/course?userid=${user.user.userid}&oid=${user.user.organizeid}&org=${user.user.org}&role=${user.user.role}`
-
- setTimeout(() => {
- iframeRef4.value.onload = () => {
- loading.value = false
- }
- loading.value = false
- }, 100)
- }
- activeIndex.value = index
- }
- const copyEmail = () => {
- navigator.clipboard.writeText('support@cocorobo.cc').then(() => {
- console.log('复制成功');
- }).catch((error) => {
- console.error('复制失败:', error);
- });
- }
- const backO = () => {
- window.location.href = `https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/CourseCon?userid=${user.user.userid}&oid=${user.user.oid}&org=${user.user.org}&role=${user.user.role}&tType=${user.user.tType}`
- }
- const show = () => {
- console.log('show')
- }
- </script>
- <style lang="scss">
- .container {
- display: flex;
- overflow: hidden;
- align-items: center;
- .container-left {
- height: calc(100vh - 60px);
- width: 240px;
- background: #fff;
- overflow: hidden;
- padding-top: 0px;
- .container-left-top {
- margin: 0 10px 0 10px;
- font-size: 14px;
- color: #111;
- font-weight: 500;
- padding: 10px 0 10px 40px;
- position: relative;
- cursor: pointer;
- transition: all 0.7s ease 0ms;
- .icon-img {
- position: absolute;
- top: 10px;
- left: 15px;
- }
- .up {
- position: absolute;
- top: 15px;
- left: 140px;
- }
- div {
- background-color: #fff;
- padding: 5px 0;
- color: #00000099;
- }
- }
- .container-left-show{
- position: fixed;
- top: 60px;
- left: 0;
- z-index: 99;
- }
- .container-left-show span{
- display: inline-block;
- width: 35px;
- height: 35px;
- line-height: 35px;
- text-align: center;
- border: 1px solid #E7E7E7;
- cursor: pointer;
- background-color: #fff;
- border-radius: 5px;
- z-index: 99;
- }
- }
- .main {
- background: #F0F2F5;
- padding: 20px 10%;
- width: calc(100% - 240px);
- height: calc(100vh - 60px);
- overflow: auto;
- }
- .liyuan{
- width: 100% !important;
- height: 100vh !important;
- padding: 20px 90px !important;
- }
- .iframe {
- width: calc(100% - 240px);
- height: calc(100vh - 60px);
- position: relative;
- .el-overlay {
- position: absolute !important;
- .el-overlay-dialog {
- position: absolute !important;
- .el-dialog__header {
- text-align: left;
- }
- }
- }
- iframe {
- width: 100%;
- height: 100%;
- }
- }
- }
- .active {
- background: #F0F2F5;
- color: #0061FF !important;
- border-radius: 5px;
- }
- /* 渐入渐出动画 */
- .fade-enter-active,
- .fade-leave-active {
- transition: opacity 0.5s;
- }
- .fade-enter-from,
- .fade-leave-to {
- opacity: 0;
- }
- .pgb{
- /* font-family: PingFang SC; */
- font-weight: bold;
- font-size: 20px;
- display: flex;align-items: center;
- gap: 10px;
- padding:20px 0px 0;
- /* height: 23.8px; */
- margin-bottom: 15px;
- }
- .pgbL{
- display: flex;align-items: center;
- gap: 10px;
- cursor: pointer;
- }
- </style>
|