yujialong 4 months ago
parent 9f816354a2
commit a7a04ff314
  1. 2
      src/App.vue
  2. 13
      src/components/TestPanel.vue
  3. 15
      src/views/Home.vue

@ -21,8 +21,6 @@ export default {
}
//vuexsessionStorage
window.addEventListener("beforeunload", () => {
console.log('beforeunload')
const opened = +localStorage.getItem('opened')
if (opened) {
localStorage.setItem('opened', opened - 1)

@ -31,7 +31,8 @@
</div>
</div>
<div class="actions">
<el-button @click="toggleReport" v-if="$parent.language && !isSubmit && !competitionId">填写实验报告</el-button>
<el-button @click="toggleReport"
v-if="$parent.language === 'vscode' && !isSubmit && !competitionId">填写实验报告</el-button>
<el-button @click="toReport" v-if="isSubmit && !competitionId">查看实验报告</el-button>
<el-button class="reload" @click="reloadConfirm" v-show="projectPermissions == 0">重新开始</el-button>
<el-button type="primary" class="submit btn" @click="confirmSubmit"
@ -150,9 +151,11 @@
</el-container>
</el-container>
<div :class="['toggle-panel', { active: pannelVisible }]">
<div :class="['toggle-panel', { active: pannelVisible, ai: isAI }]">
<!-- <div @click="togglePannel"> -->
<div>
<i class="el-icon-rank drag-icon" id="drag"></i>
</div>
<img :src="require(`@/assets/images/system/${$themeId}/left.png`)" alt class="c-p" @click="togglePannel"
v-if="pannelVisible" />
<img :src="require(`@/assets/images/system/${$themeId}/right.png`)" alt class="c-p" @click="togglePannel"
@ -218,6 +221,7 @@ import Stomp from 'stompjs'
export default {
data () {
return {
isAI: Cookie.get('admin-isAI') == 'true' ? true : false,
token: Cookie.get('admin-token'),
systemId: Cookie.get('admin-systemId') || 1,
classId: Cookie.get('admin-classId'),
@ -1448,6 +1452,11 @@ export default {
top: 60%;
text-align: center;
&.ai:not(.active) {
position: fixed;
top: 45%;
}
&.active {
left: 100%;
}

@ -6,10 +6,9 @@
<p v-if="isAI">账号{{ account }}密码112233aa</p>
<el-button class="back btn" type="primary" @click="back">退出实验</el-button>
</div>
<template v-if="isAI">
<iframe class="AI" src="https://ai.huorantech.cn/" frameborder="0" width="100%"></iframe>
</template>
<template v-else-if="!notAllowed">
<template v-if="!notAllowed">
<iframe v-if="isAI" class="AI" src="https://ai.huorantech.cn/" frameborder="0" width="100%"></iframe>
<template v-else>
<div class="top">
<div class="language">
<p v-if="$config.isHh" style="font-size: 18px">{{ $config.title }}</p>
@ -42,6 +41,7 @@
</el-tab-pane>
</el-tabs>
</div>
</template>
<div class="menu">
<testPanel @tell="setPoints" @recoveryCode="recoveryCode" ref="mainindex" :workbench.sync="workbench">
@ -75,7 +75,7 @@ export default {
curriculumName: Cookie.get('admin-curriculumName') ? decodeURIComponent(Cookie.get('admin-curriculumName')) : 'python', //
assessmentId: Cookie.get('admin-assessmentId'), // id
mallId: Cookie.get('admin-mallId'),
language: Cookie.get('admin-language') || 'python3.10.9', //
language: Cookie.get('admin-language') || 'python3.7.9', //
projectId: '',
systemId: '',
modelIsShow: false, //
@ -100,7 +100,7 @@ export default {
curTab: '', //
workbench: [], //
codeKey: 1, //
notAllowed: 1,
notAllowed: 0,
account: '',
};
},
@ -110,11 +110,12 @@ export default {
},
mounted () {
if (this.isAI) {
this.language = 'vscode'
this.handleAI()
document.body.style.overflow = 'hidden'
this.loaded = true
} else {
Cookie.set('admin-language', 'python3.10.9')
Cookie.set('admin-language', 'python3.7.9')
// const opened = +localStorage.getItem('opened')
// if (opened) {
// localStorage.setItem('opened', opened + 1)

Loading…
Cancel
Save