|
|
@ -3,9 +3,13 @@ |
|
|
|
<div class="header" :class="{ hh: $config.isHh }"> |
|
|
|
<div class="header" :class="{ hh: $config.isHh }"> |
|
|
|
<img v-if="$config.isHh" src="@/assets/images/logo-hh.png" alt="" class="logo"> |
|
|
|
<img v-if="$config.isHh" src="@/assets/images/logo-hh.png" alt="" class="logo"> |
|
|
|
<p v-else>{{ curriculumName }}</p> |
|
|
|
<p v-else>{{ curriculumName }}</p> |
|
|
|
|
|
|
|
<p v-if="isAI">账号:{{ account }};密码:112233aa</p> |
|
|
|
<el-button class="back btn" type="primary" @click="back">退出实验</el-button> |
|
|
|
<el-button class="back btn" type="primary" @click="back">退出实验</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<template v-if="!notAllowed"> |
|
|
|
<template v-if="isAI"> |
|
|
|
|
|
|
|
<iframe class="AI" src="https://ai.huorantech.cn/" frameborder="0" width="100%"></iframe> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else-if="!notAllowed"> |
|
|
|
<div class="top"> |
|
|
|
<div class="top"> |
|
|
|
<div class="language"> |
|
|
|
<div class="language"> |
|
|
|
<p v-if="$config.isHh" style="font-size: 18px">{{ $config.title }}</p> |
|
|
|
<p v-if="$config.isHh" style="font-size: 18px">{{ $config.title }}</p> |
|
|
@ -61,6 +65,7 @@ export default { |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
Config, |
|
|
|
Config, |
|
|
|
|
|
|
|
isAI: Cookie.get('admin-isAI') == 'true' ? true : false, |
|
|
|
isSubmit: Cookie.get('admin-isSubmit') == 'true' ? true : false, // 是否提交的标识 |
|
|
|
isSubmit: Cookie.get('admin-isSubmit') == 'true' ? true : false, // 是否提交的标识 |
|
|
|
loaded: false, // 页面是否加载完的标识,页面默认隐藏,一进来先显示加载条,接口加载完后再显示页面,不然一开始会一闪而过没有样式的页面 |
|
|
|
loaded: false, // 页面是否加载完的标识,页面默认隐藏,一进来先显示加载条,接口加载完后再显示页面,不然一开始会一闪而过没有样式的页面 |
|
|
|
loadIns: null, // loading实例 |
|
|
|
loadIns: null, // loading实例 |
|
|
@ -70,7 +75,7 @@ export default { |
|
|
|
curriculumName: Cookie.get('admin-curriculumName') ? decodeURIComponent(Cookie.get('admin-curriculumName')) : 'python', // 课程名称 |
|
|
|
curriculumName: Cookie.get('admin-curriculumName') ? decodeURIComponent(Cookie.get('admin-curriculumName')) : 'python', // 课程名称 |
|
|
|
assessmentId: Cookie.get('admin-assessmentId'), // 考核id |
|
|
|
assessmentId: Cookie.get('admin-assessmentId'), // 考核id |
|
|
|
mallId: Cookie.get('admin-mallId'), |
|
|
|
mallId: Cookie.get('admin-mallId'), |
|
|
|
language: Cookie.get('admin-language') || 'python3.7.9', // 编程语言 |
|
|
|
language: Cookie.get('admin-language') || 'python3.10.9', // 编程语言 |
|
|
|
projectId: '', |
|
|
|
projectId: '', |
|
|
|
systemId: '', |
|
|
|
systemId: '', |
|
|
|
modelIsShow: false, // 导入模型按钮是否显示 |
|
|
|
modelIsShow: false, // 导入模型按钮是否显示 |
|
|
@ -83,7 +88,7 @@ export default { |
|
|
|
name: 'python3.9' |
|
|
|
name: 'python3.9' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: 'python3.10' |
|
|
|
name: 'python3.10.9' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: 'python3.12.4' |
|
|
|
name: 'python3.12.4' |
|
|
@ -96,6 +101,7 @@ export default { |
|
|
|
workbench: [], // 判分点切换列表 |
|
|
|
workbench: [], // 判分点切换列表 |
|
|
|
codeKey: 1, // 编辑器索引 |
|
|
|
codeKey: 1, // 编辑器索引 |
|
|
|
notAllowed: 1, |
|
|
|
notAllowed: 1, |
|
|
|
|
|
|
|
account: '', |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
components: { |
|
|
|
components: { |
|
|
@ -103,7 +109,12 @@ export default { |
|
|
|
testPanel |
|
|
|
testPanel |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
mounted () { |
|
|
|
Cookie.get('admin-language') || Cookie.set('admin-language', 'python3.7.9') |
|
|
|
if (this.isAI) { |
|
|
|
|
|
|
|
this.handleAI() |
|
|
|
|
|
|
|
document.body.style.overflow = 'hidden' |
|
|
|
|
|
|
|
this.loaded = true |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
Cookie.set('admin-language', 'python3.10.9') |
|
|
|
// const opened = +localStorage.getItem('opened') |
|
|
|
// const opened = +localStorage.getItem('opened') |
|
|
|
// if (opened) { |
|
|
|
// if (opened) { |
|
|
|
// localStorage.setItem('opened', opened + 1) |
|
|
|
// localStorage.setItem('opened', opened + 1) |
|
|
@ -136,9 +147,20 @@ export default { |
|
|
|
newmain.$on("isSubmit", isSubmit => { |
|
|
|
newmain.$on("isSubmit", isSubmit => { |
|
|
|
this.isSubmit = isSubmit |
|
|
|
this.isSubmit = isSubmit |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
this.autoLogout() |
|
|
|
this.autoLogout() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
// 给ai平台添加账号 |
|
|
|
|
|
|
|
async handleAI () { |
|
|
|
|
|
|
|
const res = await this.$get(`${this.api.getTheMostRecentlyRunProject}`, { |
|
|
|
|
|
|
|
ai: 1, |
|
|
|
|
|
|
|
cid: Cookie.get('admin-courseId') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if (res.account) { |
|
|
|
|
|
|
|
this.account = res.account |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// 获取导入模型按钮展示状态 |
|
|
|
// 获取导入模型按钮展示状态 |
|
|
|
getModelStatus (systemId) { |
|
|
|
getModelStatus (systemId) { |
|
|
|
this.$post(`${this.api.displayListOrNotByStudent}?systemId=${systemId}`).then(res => { |
|
|
|
this.$post(`${this.api.displayListOrNotByStudent}?systemId=${systemId}`).then(res => { |
|
|
@ -230,6 +252,7 @@ export default { |
|
|
|
margin-left: 10px; |
|
|
|
margin-left: 10px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.back { |
|
|
|
.back { |
|
|
|
padding: 23px 50px; |
|
|
|
padding: 23px 50px; |
|
|
|
border: none; |
|
|
|
border: none; |
|
|
@ -237,6 +260,10 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.AI { |
|
|
|
|
|
|
|
height: calc(100vh - 58px); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/deep/.top { |
|
|
|
/deep/.top { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
justify-content: space-between; |
|
|
|