|
|
@ -6,42 +6,42 @@ |
|
|
|
<p v-if="isAI">账号:{{ account }};密码:112233aa</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="isAI"> |
|
|
|
<template v-if="!notAllowed"> |
|
|
|
<iframe class="AI" src="https://ai.huorantech.cn/" frameborder="0" width="100%"></iframe> |
|
|
|
<iframe v-if="isAI" class="AI" src="https://ai.huorantech.cn/" frameborder="0" width="100%"></iframe> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<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> |
|
|
|
<p>编程语言</p> |
|
|
|
<p>编程语言</p> |
|
|
|
<el-select v-model="language" @change="languageChange"> |
|
|
|
<el-select v-model="language" @change="languageChange"> |
|
|
|
<el-option v-for="(item, i) in languages" :key="i" :value="item.name"></el-option> |
|
|
|
<el-option v-for="(item, i) in languages" :key="i" :value="item.name"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
|
|
<el-button v-if="language === 'vscode'" class="open-vs" type="primary" size="small" |
|
|
|
<el-button v-if="language === 'vscode'" class="open-vs" type="primary" size="small" |
|
|
|
@click="openVscode">打开Vscode新窗口</el-button> |
|
|
|
@click="openVscode">打开Vscode新窗口</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="inline-center"> |
|
|
|
<div class="inline-center"> |
|
|
|
<el-tooltip class="item" effect="dark" content="支持导入其它数据用于实验,总上传的文件大小不可以超过10M" placement="bottom"> |
|
|
|
<el-tooltip class="item" effect="dark" content="支持导入其它数据用于实验,总上传的文件大小不可以超过10M" placement="bottom"> |
|
|
|
<i class="info el-icon-warning" style="margin-right: 10px"></i> |
|
|
|
<i class="info el-icon-warning" style="margin-right: 10px"></i> |
|
|
|
</el-tooltip> |
|
|
|
</el-tooltip> |
|
|
|
<el-button type="primary" size="small" icon="el-icon-document" @click="toData">我的数据</el-button> |
|
|
|
<el-button type="primary" size="small" icon="el-icon-document" @click="toData">我的数据</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="tab"> |
|
|
|
<div class="tab"> |
|
|
|
<el-tabs v-model="curTab" type="card" @tab-click="judChange"> |
|
|
|
<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" |
|
|
|
<el-tab-pane v-for="(item, i) in workbench" :key="item.judgmentId" :label="item.name" |
|
|
|
:value="item.judgmentId"> |
|
|
|
:value="item.judgmentId"> |
|
|
|
<codemirror v-if="language !== 'vscode'" :ref="'code' + i" :key="codeKey" :projectId.sync="projectId" |
|
|
|
<codemirror v-if="language !== 'vscode'" :ref="'code' + i" :key="codeKey" :projectId.sync="projectId" |
|
|
|
:systemId.sync="systemId" :code.sync="item.code" :finalCode.sync="item.finalCode" |
|
|
|
:systemId.sync="systemId" :code.sync="item.code" :finalCode.sync="item.finalCode" |
|
|
|
:judgmentId="item.judgmentId" :codeId.sync="item.codeId" :answer.sync="item.answer" |
|
|
|
:judgmentId="item.judgmentId" :codeId.sync="item.codeId" :answer.sync="item.answer" |
|
|
|
:retResult.sync="item.retResult" :photoUrl.sync="item.photoUrl" :index="i" :curTab.sync="curTab" |
|
|
|
:retResult.sync="item.retResult" :photoUrl.sync="item.photoUrl" :index="i" :curTab.sync="curTab" |
|
|
|
:modelIsShow.sync="modelIsShow"></codemirror> |
|
|
|
:modelIsShow.sync="modelIsShow"></codemirror> |
|
|
|
<iframe v-else class="vscode" :src="Config.vscodeUrl" frameborder="0" width="100%"></iframe> |
|
|
|
<iframe v-else class="vscode" :src="Config.vscodeUrl" frameborder="0" width="100%"></iframe> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</el-tabs> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<div class="menu"> |
|
|
|
<div class="menu"> |
|
|
|
<testPanel @tell="setPoints" @recoveryCode="recoveryCode" ref="mainindex" :workbench.sync="workbench"> |
|
|
|
<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', // 课程名称 |
|
|
|
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.10.9', // 编程语言 |
|
|
|
language: Cookie.get('admin-language') || 'python3.7.9', // 编程语言 |
|
|
|
projectId: '', |
|
|
|
projectId: '', |
|
|
|
systemId: '', |
|
|
|
systemId: '', |
|
|
|
modelIsShow: false, // 导入模型按钮是否显示 |
|
|
|
modelIsShow: false, // 导入模型按钮是否显示 |
|
|
@ -100,7 +100,7 @@ export default { |
|
|
|
curTab: '', // 选中后绑定的对象 |
|
|
|
curTab: '', // 选中后绑定的对象 |
|
|
|
workbench: [], // 判分点切换列表 |
|
|
|
workbench: [], // 判分点切换列表 |
|
|
|
codeKey: 1, // 编辑器索引 |
|
|
|
codeKey: 1, // 编辑器索引 |
|
|
|
notAllowed: 1, |
|
|
|
notAllowed: 0, |
|
|
|
account: '', |
|
|
|
account: '', |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
@ -110,11 +110,12 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
mounted () { |
|
|
|
if (this.isAI) { |
|
|
|
if (this.isAI) { |
|
|
|
|
|
|
|
this.language = 'vscode' |
|
|
|
this.handleAI() |
|
|
|
this.handleAI() |
|
|
|
document.body.style.overflow = 'hidden' |
|
|
|
document.body.style.overflow = 'hidden' |
|
|
|
this.loaded = true |
|
|
|
this.loaded = true |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Cookie.set('admin-language', 'python3.10.9') |
|
|
|
Cookie.set('admin-language', 'python3.7.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) |
|
|
|