|
|
|
@ -6,42 +6,42 @@ |
|
|
|
|
<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"> |
|
|
|
|
<div class="top"> |
|
|
|
|
<div class="language"> |
|
|
|
|
<p v-if="$config.isHh" style="font-size: 18px">{{ $config.title }}</p> |
|
|
|
|
<p>编程语言</p> |
|
|
|
|
<el-select v-model="language" @change="languageChange"> |
|
|
|
|
<el-option v-for="(item, i) in languages" :key="i" :value="item.name"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
<el-button v-if="language === 'vscode'" class="open-vs" type="primary" size="small" |
|
|
|
|
@click="openVscode">打开Vscode新窗口</el-button> |
|
|
|
|
</div> |
|
|
|
|
<div class="inline-center"> |
|
|
|
|
<el-tooltip class="item" effect="dark" content="支持导入其它数据用于实验,总上传的文件大小不可以超过10M" placement="bottom"> |
|
|
|
|
<i class="info el-icon-warning" style="margin-right: 10px"></i> |
|
|
|
|
</el-tooltip> |
|
|
|
|
<el-button type="primary" size="small" icon="el-icon-document" @click="toData">我的数据</el-button> |
|
|
|
|
<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> |
|
|
|
|
<p>编程语言</p> |
|
|
|
|
<el-select v-model="language" @change="languageChange"> |
|
|
|
|
<el-option v-for="(item, i) in languages" :key="i" :value="item.name"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
<el-button v-if="language === 'vscode'" class="open-vs" type="primary" size="small" |
|
|
|
|
@click="openVscode">打开Vscode新窗口</el-button> |
|
|
|
|
</div> |
|
|
|
|
<div class="inline-center"> |
|
|
|
|
<el-tooltip class="item" effect="dark" content="支持导入其它数据用于实验,总上传的文件大小不可以超过10M" placement="bottom"> |
|
|
|
|
<i class="info el-icon-warning" style="margin-right: 10px"></i> |
|
|
|
|
</el-tooltip> |
|
|
|
|
<el-button type="primary" size="small" icon="el-icon-document" @click="toData">我的数据</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="tab"> |
|
|
|
|
<el-tabs v-model="curTab" type="card" @tab-click="judChange"> |
|
|
|
|
<el-tab-pane v-for="(item, i) in workbench" :key="item.judgmentId" :label="item.name" |
|
|
|
|
:value="item.judgmentId"> |
|
|
|
|
<codemirror v-if="language !== 'vscode'" :ref="'code' + i" :key="codeKey" :projectId.sync="projectId" |
|
|
|
|
:systemId.sync="systemId" :code.sync="item.code" :finalCode.sync="item.finalCode" |
|
|
|
|
:judgmentId="item.judgmentId" :codeId.sync="item.codeId" :answer.sync="item.answer" |
|
|
|
|
:retResult.sync="item.retResult" :photoUrl.sync="item.photoUrl" :index="i" :curTab.sync="curTab" |
|
|
|
|
:modelIsShow.sync="modelIsShow"></codemirror> |
|
|
|
|
<iframe v-else class="vscode" :src="Config.vscodeUrl" frameborder="0" width="100%"></iframe> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
</el-tabs> |
|
|
|
|
</div> |
|
|
|
|
<div class="tab"> |
|
|
|
|
<el-tabs v-model="curTab" type="card" @tab-click="judChange"> |
|
|
|
|
<el-tab-pane v-for="(item, i) in workbench" :key="item.judgmentId" :label="item.name" |
|
|
|
|
:value="item.judgmentId"> |
|
|
|
|
<codemirror v-if="language !== 'vscode'" :ref="'code' + i" :key="codeKey" :projectId.sync="projectId" |
|
|
|
|
:systemId.sync="systemId" :code.sync="item.code" :finalCode.sync="item.finalCode" |
|
|
|
|
:judgmentId="item.judgmentId" :codeId.sync="item.codeId" :answer.sync="item.answer" |
|
|
|
|
:retResult.sync="item.retResult" :photoUrl.sync="item.photoUrl" :index="i" :curTab.sync="curTab" |
|
|
|
|
:modelIsShow.sync="modelIsShow"></codemirror> |
|
|
|
|
<iframe v-else class="vscode" :src="Config.vscodeUrl" frameborder="0" width="100%"></iframe> |
|
|
|
|
</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) |
|
|
|
|