openf12
yujialong 2 years ago
parent ac2f86b339
commit c53b018596
  1. 15
      public/index.html
  2. 3
      src/api/index.js
  3. 143
      src/components/TestPanel.vue
  4. 115
      src/components/codemirror.vue
  5. 6
      src/config/index.js
  6. 231
      src/views/Data.vue
  7. 49
      src/views/Home.vue

@ -1,15 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<!-- <meta http-equiv="X-Frame-Options" content="deny" /> -->
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
<strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->

@ -21,6 +21,7 @@ export default {
getDetailById: 'occupationlab/occupationlab/assessment/getDetailById',
pageStuAssessment: 'occupationlab/occupationlab/assessment/pageStuAssessment',
modelClassList: `nakadai/nakadai/model/reference/modelClassList`,
studentModelList: `nakadai/nakadai/model/student/studentModelList`,
referenceDemoList: `nakadai/nakadai/model/reference/demo/referenceDemoList`,
referenceFindById: `nakadai/nakadai/model/reference/demo/findById`,
checkIsShowBySystemId: `nakadai/nakadai/model/reference/checkIsShowBySystemId`,
@ -34,4 +35,6 @@ export default {
exportLabReport: `occupationlab/occupationlab/achievement/exportLabReport`,
reportDetail: `occupationlab/occupationlab/achievement/reportDetail`,
getCompetition: `competition/competition/management/getCompetition`,
whetherCanPaste: `nakadai/nakadai/model/demo/whetherCanPaste`,
displayListOrNotByStudent: `nakadai/nakadai/model/demo/displayListOrNotByStudent`,
}

@ -1,29 +1,30 @@
<template>
<div :class="['panel', {active: pannelVisible}]" id="panel">
<el-container class="scrollbar" v-if="pannelVisible">
<el-header>
<div :class="['panel', {active: pannelVisible}]"
id="panel">
<el-container class="scrollbar"
v-if="pannelVisible">
<el-header id="header">
<div class="panel-header">
<div class="project">
<div class="inline-center">
<p>实训项目</p>
<el-tooltip effect="dark" content="点击右侧“下三角”按钮可切换实验项目" placement="bottom">
<i class="info el-icon-warning" style="margin-left: 10px"></i>
<el-tooltip effect="dark"
content="点击右侧“下三角”按钮可切换实验项目"
placement="bottom">
<i class="info el-icon-warning"
style="margin-left: 10px"></i>
</el-tooltip>
</div>
<el-select
v-model="projectId"
<el-select v-model="projectId"
placeholder="请选择"
class="select"
:disabled="projectPermissions != 0"
@change="selectProject"
style="flex: 1"
>
<el-option
v-for="(item, i) in projectList"
style="flex: 1">
<el-option v-for="(item, i) in projectList"
:key="item.projectId"
:label="i + 1 + '. ' + item.projectName"
:value="item.projectId"
></el-option>
:value="item.projectId"></el-option>
</el-select>
</div>
<div class="item">
@ -35,16 +36,23 @@
<span>{{seconds}}</span>
</div>
</div>
<div v-if="!competitionId" class="item">
<div v-if="!competitionId"
class="item">
<div>
总得分
<span class="total-score">{{grade}}</span>
</div>
</div>
<div>
<el-button @click="toReport" v-if="isSubmit && !competitionId">查看实验报告</el-button>
<el-button class="reload" @click="reload" v-show="projectPermissions == 0">重新开始</el-button>
<el-button type="primary" class="submit btn" @click="confirmSubmit" :disabled="isSubmit || !projectList.length">提交</el-button>
<el-button @click="toReport"
v-if="isSubmit && !competitionId">查看实验报告</el-button>
<el-button class="reload"
@click="reload"
v-show="projectPermissions == 0">重新开始</el-button>
<el-button type="primary"
class="submit btn"
@click="confirmSubmit"
:disabled="isSubmit || !projectList.length">提交</el-button>
</div>
</div>
</el-header>
@ -56,7 +64,8 @@
<p>实验目标</p>
</div>
<div class="goal">
<div class="ql-editor" v-html="experimentTarget"></div>
<div class="ql-editor"
v-html="experimentTarget"></div>
</div>
</div>
<div class="aside-footer">
@ -67,30 +76,38 @@
<div>
<el-row>
<el-col :span="24">
<el-card shadow="never" :border="false">
<el-table :data="taskList" :stripe="true">
<el-card shadow="never"
:border="false">
<el-table :data="taskList"
:stripe="true">
<el-table-column type="index"></el-table-column>
<el-table-column prop="name" label="判分点" align="center"></el-table-column>
<el-table-column prop="score" label="分值" width="60" align="center"></el-table-column>
<el-table-column prop="name"
label="判分点"
align="center"></el-table-column>
<el-table-column prop="score"
label="分值"
width="60"
align="center"></el-table-column>
<template v-if="!competitionId">
<el-table-column label="结果" width="60" align="center">
<el-table-column label="结果"
width="60"
align="center">
<template slot-scope="scope">
<template v-if="isSubmit">
<template v-if="!competitionId">
<i
v-if="scope.row.finishedResult"
class="el-icon-check right"
></i>
<i
v-else
class="el-icon-close wrong"
></i>
<i v-if="scope.row.finishedResult"
class="el-icon-check right"></i>
<i v-else
class="el-icon-close wrong"></i>
</template>
<template v-else>-</template>
</template>
</template>
</el-table-column>
<el-table-column prop="score" label="得分" width="60" align="center">
<el-table-column prop="score"
label="得分"
width="60"
align="center">
<template slot-scope="scope">
<template v-if="isSubmit">{{ competitionId ? '-' : scope.row.examScore }}</template>
</template>
@ -104,23 +121,34 @@
</div>
</el-aside>
<el-main>
<el-tabs v-model="pannelTab" type="card">
<el-tab-pane label="项目背景" name="first">
<div class="ql-editor" v-html="experimentDescription"></div>
<el-tabs v-model="pannelTab"
type="card">
<el-tab-pane label="项目背景"
name="first">
<div class="ql-editor"
v-html="experimentDescription"></div>
</el-tab-pane>
<el-tab-pane label="实验要求" name="second">
<el-tab-pane label="实验要求"
name="second">
<el-collapse v-model="curReq">
<el-collapse-item v-for="item in points" :name="item.judgmentId" :key="item.judgmentId">
<el-collapse-item v-for="item in points"
:name="item.judgmentId"
:key="item.judgmentId">
<template slot="title">
<i class="el-icon-s-ticket"></i>
<div class="break-all des" v-html="item.name"></div>
<div class="break-all des"
v-html="item.name"></div>
</template>
<div class="ql-editor" v-html="item.experimentalRequirements"></div>
<div class="ql-editor"
v-html="item.experimentalRequirements"></div>
</el-collapse-item>
</el-collapse>
</el-tab-pane>
<el-tab-pane label="实验提示" name="fifth" v-if="hintOpen">
<div class="ql-editor" v-html="experimentHint"></div>
<el-tab-pane label="实验提示"
name="fifth"
v-if="hintOpen">
<div class="ql-editor"
v-html="experimentHint"></div>
</el-tab-pane>
</el-tabs>
</el-main>
@ -129,8 +157,14 @@
<div :class="['toggle-panel', {active: pannelVisible}]">
<div @click="togglePannel">
<img :src="require(`@/assets/images/system/${$config.defaultSystem}/left.png`)" alt class="c-p" v-if="pannelVisible" />
<img :src="require(`@/assets/images/system/${$config.defaultSystem}/right.png`)" alt class="c-p" v-if="!pannelVisible" />
<img :src="require(`@/assets/images/system/${$config.defaultSystem}/left.png`)"
alt
class="c-p"
v-if="pannelVisible" />
<img :src="require(`@/assets/images/system/${$config.defaultSystem}/right.png`)"
alt
class="c-p"
v-if="!pannelVisible" />
</div>
</div>
</div>
@ -251,6 +285,7 @@ export default {
}).then(res => {
const points = res.projectJudgmentVos
const project = res.projectManage
const mg = res.projectManage
const curReq = []
//
if (project.systemId == 11) {
@ -284,7 +319,7 @@ export default {
this.experimentTarget = project.experimentTarget
this.experimentDescription = project.experimentDescription
this.experimentHint = project.experimentHint
this.hintOpen = !res.projectManage.hintOpen // 01
this.hintOpen = mg.founder ? !mg.hintOpenBySchool : !mg.hintOpen // 01
this.$emit('tell', projectId, systemId, this.points)
const isPrac = this.projectPermissions == 0 //
this.text = isPrac ? '已用' : '剩余'
@ -698,13 +733,12 @@ export default {
const el = document.querySelector('#panel')
let gap = 10 //
let parent = document.body
el.onmousedown = e => {
document.querySelector('#header').onmousedown = e => {
var x = e.clientX - el.offsetLeft
var y = e.clientY - el.offsetTop
var left = 0
var top = 0
var boxer = document.querySelector(".boxer")
document.onmousemove = function (eve) {
left = eve.clientX - x
top = eve.clientY - y
@ -786,7 +820,7 @@ export default {
}
/deep/.des {
font-size: 16px;
font-family: "Microsoft YaHei";
font-family: 'Microsoft YaHei';
img {
max-width: 100%;
}
@ -836,8 +870,8 @@ export default {
color: #333;
background-color: #fff;
}
.el-aside /deep/[class*=" el-icon-"],
[class^="el-icon-"] {
.el-aside /deep/[class*=' el-icon-'],
[class^='el-icon-'] {
line-height: 40px;
font-size: 16px;
}
@ -856,10 +890,13 @@ export default {
&.system4 {
background-size: 100% 58px;
}
&.system5, &.system7, &.system9 {
&.system5,
&.system7,
&.system9 {
background-size: 100% 40px;
}
&.system8, &.system6 {
&.system8,
&.system6 {
background-size: 100% 61px;
}
&.system10 {
@ -902,7 +939,7 @@ export default {
}
/deep/.select {
.el-select__caret:before {
content: "\e78f";
content: '\e78f';
padding: 3px;
font-size: 16px;
color: #fff;
@ -971,7 +1008,7 @@ export default {
color: #bfbfbf;
cursor: pointer;
&:hover {
opacity: .9;
opacity: 0.9;
}
}
</style>

@ -1,59 +1,71 @@
<template>
<div class="code-wrap flex">
<div class="left">
<codemirror
v-model="codeVal"
<codemirror v-model="codeVal"
:options="cmOption"
class="code-mirror"
@ready="ready"
ref="codemirror"
></codemirror>
<div v-if="isSubmit" class="code-mask"></div>
ref="codemirror"></codemirror>
<div v-if="isSubmit"
class="code-mask"></div>
<div class="btns">
<span
class="el-icon-delete del"
@click="clearCode"
></span>
<el-button
v-if="modelIsShow"
<span class="el-icon-delete del"
@click="clearCode"></span>
<el-button v-if="modelIsShow"
class="btn"
type="warning"
@click="importModel"
>导入模型</el-button>
<el-button
class="run btn"
@click="importModel">导入模型</el-button>
<el-button class="run btn"
type="primary"
@click="runCode(false)"
:disabled="runEnable"
>运行</el-button>
:disabled="runEnable">运行</el-button>
</div>
</div>
<div class="line"></div>
<div class="code-right answer">
<p :class="['text-wrapper', 'pic-num' + picSrcList.length]">{{ runResult }}</p>
<div :class="['pic-wrap', {wrong: isError === 0}]" v-if="picSrcList.length">
<div class="pic-item" v-for="(img, i) in picSrcList" :key="i">
<el-image
class="pic"
<div :class="['pic-wrap', {wrong: isError === 0}]"
v-if="picSrcList.length">
<div class="pic-item"
v-for="(img, i) in picSrcList"
:key="i">
<el-image class="pic"
:src="img"
:preview-src-list="picSrcList">
</el-image>
<el-button class="download-btn btn" type="primary" size="mini" @click="downloadPic(i)">下载图片</el-button>
<a :ref="'picLink' + i" style="display: none;" download="运行结果.png" :href="img">下载图片</a>
<el-button class="download-btn btn"
type="primary"
size="mini"
@click="downloadPic(i)">下载图片</el-button>
<a :ref="'picLink' + i"
style="display: none;"
download="运行结果.png"
:href="img">下载图片</a>
</div>
</div>
<div class="result-right t-color" v-show="isError">
<img :src="require(`@/assets/images/system/${$config.defaultSystem}/yes.png`)" alt />运行成功
<el-button class="tips-btn" @click="exportResult">导出结果</el-button>
<div class="result-right t-color"
v-show="isError">
<img :src="require(`@/assets/images/system/${$config.defaultSystem}/yes.png`)"
alt />运行成功
<el-button class="tips-btn"
@click="exportResult">导出结果</el-button>
</div>
<div class="result-wrong" v-show="isError === 0">
<img src="@/assets/images/error.png" alt />
<div class="result-wrong"
v-show="isError === 0">
<img src="@/assets/images/error.png"
alt />
{{errLine}}行出现错误
<el-button class="tips-btn" @click="getTips" v-show="showTips">提示</el-button>
<el-dialog title="答案提示" center :close-on-click-modal="false" :visible.sync="tipsVisible">
<el-button class="tips-btn"
@click="getTips"
v-show="showTips">提示</el-button>
<el-dialog title="答案提示"
center
:close-on-click-modal="false"
:visible.sync="tipsVisible">
<el-tabs>
<el-tab-pane label="参考答案">
<div :class="['answer-wrap', {client: !fromManager}]" v-html="answer"></div>
<div :class="['answer-wrap', {client: !fromManager}]"
v-html="answer"></div>
</el-tab-pane>
</el-tabs>
</el-dialog>
@ -61,10 +73,12 @@
</div>
<!-- 导入模型 -->
<el-dialog title="请选择要导入的模型" :visible.sync="modelVisible" width="400px" :close-on-click-modal="false">
<el-dialog title="请选择要导入的模型"
:visible.sync="modelVisible"
width="400px"
:close-on-click-modal="false">
<div class="model-wrap">
<el-tree
:data="modelData"
<el-tree :data="modelData"
ref="tree"
default-expand-all
@check-change="treeCheckChange"
@ -75,9 +89,13 @@
v-loading="modelLoading">
</el-tree>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="modelVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="submit">导入</el-button>
<span slot="footer"
class="dialog-footer">
<el-button size="small"
@click="modelVisible = false">取消</el-button>
<el-button size="small"
type="primary"
@click="submit">导入</el-button>
</span>
</el-dialog>
</div>
@ -207,6 +225,14 @@ export default {
ready () {
const code = this.$refs.codemirror.codemirror
code.setSize("auto", "calc(100vh - 167px)");
//
this.$post(`${this.api.whetherCanPaste}?systemId=${this.systemId}`).then(res => {
// ()
res.data == 'false' && !this.fromManager && code.on('beforeChange', (istance, change) => {
change.origin === 'paste' && change.cancel()
})
}).catch(err => { })
code.on('keypress', function () {
//
code.showHint()
@ -226,20 +252,21 @@ export default {
this.modelLoading = true
this.modelVisible = true
//
this.$post(`${this.api.modelClassList}?systemId=${this.systemId}`).then(res => {
const { data } = res
this.$post(`${this.api.modelClassList}?systemId=${this.systemId}&founder=1`).then(({ data }) => {
const promises = []
const addType = list => {
list.map(e => {
e.disabled = true
// promise
promises.push(new Promise((resolve, reject) => {
this.$post(this.api.referenceDemoList, {
this.$post(this.api.studentModelList, {
categoryId: e.id,
pageNum: 1,
pageSize: 10000,
categoryId: e.id
}).then(res => {
let { records } = res.data
systemId: +this.systemId,
founder: 1
}).then(({ data }) => {
let { records } = data
records = records.filter(e => !e.isOpen) //
records.map(n => {
n.categoryName = n.modelName
@ -605,7 +632,7 @@ export default {
background-color: #f00;
cursor: pointer;
&:hover {
opacity: .9;
opacity: 0.9;
}
}
/deep/.CodeMirror-wrap pre.CodeMirror-line,

@ -10,9 +10,9 @@ let host = location.origin + '/'
let bankPath = `${location.origin}/banksystem` // 银行系统
// 121.37.12.51 | 192.168.31.151
if (isDev) {
// host = 'http://192.168.31.51:9000/'
// host = 'http://192.168.31.116:9000/'
host = 'http://121.37.12.51:9000/'
host = 'http://192.168.31.152:9000/'
// host = 'http://192.168.31.53:9000/'
// host = 'http://121.37.12.51:9000/'
// host = 'https://occupationlab.com/'
bankPath = `http://${location.hostname}:8093`
} else if (isPro) {

@ -1,59 +1,124 @@
<template>
<div class="wrap" v-loading="loading">
<div class="wrap"
v-loading="loading">
<breadcrumb data="返回实验/我的数据"></breadcrumb>
<div class="inner">
<div class="tool">
<el-input style="width: 250px" placeholder="请输入文件名称" v-model="keyword" suffix-icon="el-icon-search" clearable size="small"></el-input>
<el-input style="width: 250px"
placeholder="请输入文件名称"
v-model="keyword"
suffix-icon="el-icon-search"
clearable
size="small"></el-input>
<div class="action">
<el-button class="cus-btn" type="primary" size="small" @click="sourceVisible = true">导入数据</el-button>
<el-button class="cus-btn" style="margin-left: 10px;" type="primary" size="small" @click="delAll">批量删除</el-button>
<el-button class="cus-btn"
type="primary"
size="small"
@click="sourceVisible = true">导入数据</el-button>
<el-button class="cus-btn"
style="margin-left: 10px;"
type="primary"
size="small"
@click="delAll">批量删除</el-button>
</div>
</div>
<el-table :data="list" class="cus-table" ref="table" stripe header-align="center" empty-text="暂无数据支持导入xlsx csv txt等格式的文件" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="80" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="55" align="center"></el-table-column>
<el-table-column prop="fileName" label="文件名称" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="createTime" label="导入时间" align="center"></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="120" align="center">
<el-table :data="list"
class="cus-table"
ref="table"
stripe
header-align="center"
empty-text="暂无数据,支持导入xlsx 、csv 、txt等格式的文件"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="80"
align="center"></el-table-column>
<el-table-column type="index"
label="序号"
width="55"
align="center"></el-table-column>
<el-table-column prop="fileName"
label="文件名称"
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column prop="createTime"
label="导入时间"
align="center"></el-table-column>
<el-table-column prop="fileSize"
label="文件大小"
width="120"
align="center">
<template slot-scope="scope">
{{ (scope.row.fileSize / 1024 / 1024).toFixed(3) }}MB
</template>
</el-table-column>
<el-table-column prop="fileFormat" label="格式" width="100" align="center"></el-table-column>
<el-table-column label="文件路径" align="center">
<el-table-column prop="fileFormat"
label="格式"
width="100"
align="center"></el-table-column>
<el-table-column label="文件路径"
align="center">
<template slot-scope="scope">
{{ scope.row.ossFileName }}
<i class="el-icon-document-copy copy" @click="copy($event, scope.row)"></i>
<i class="el-icon-document-copy copy"
@click="copy($event, scope.row)"></i>
</template>
</el-table-column>
<el-table-column width="300" label="操作" align="center">
<el-table-column width="300"
label="操作"
align="center">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button>
<el-button type="text" @click="download(scope.row)">下载</el-button>
<el-button type="text" @click="del(scope.row)">删除</el-button>
<el-button type="text"
@click="show(scope.row)">查看</el-button>
<el-button type="text"
@click="download(scope.row)">下载</el-button>
<el-button type="text"
@click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total,prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total"></el-pagination>
<el-pagination background
layout="total,prev, pager, next"
:current-page="page"
@current-change="handleCurrentChange"
:total="total"></el-pagination>
</div>
<el-dialog title="请选择数据源" :visible.sync="sourceVisible" width="400px" :close-on-click-modal="false">
<el-dialog title="请选择数据源"
:visible.sync="sourceVisible"
width="400px"
:close-on-click-modal="false">
<ul class="source-list">
<li style="width: 48%" @click="showData">
<img src="@/assets/images/dataforward.png" alt="">
<li style="width: 48%"
@click="showData">
<img src="@/assets/images/dataforward.png"
alt="">
</li>
<el-upload class="upload" :headers="{token}" :action="api.fileUpload" name="file" :limit="1000" :show-file-list="false" :before-upload="beforeImport" :on-success="successImport">
<el-upload class="upload"
drag
:headers="{token}"
:action="api.fileUpload"
name="file"
:limit="1000"
:show-file-list="false"
:before-upload="beforeImport"
:on-success="successImport">
<li style="width: 100%;">本地上传</li>
</el-upload>
</ul>
</el-dialog>
<!-- 导入数据 -->
<el-dialog title="导入" :visible.sync="importVisible" width="80%" center class="dialog" :close-on-click-modal="false">
<el-dialog title="导入"
:visible.sync="importVisible"
width="80%"
center
class="dialog"
:close-on-click-modal="false">
<el-container style="padding: 20px 0 20px 20px;background-color: #f0f0f0;">
<div style="overflow:auto;height: 558px;width:330px;padding:15px;background:#fff" ref="typeTreeWrap">
<div style="overflow:auto;height: 558px;width:330px;padding:15px;background:#fff"
ref="typeTreeWrap">
<el-tree v-loading="importLoading"
ref="typeTree"
:data="importTypeList"
@ -66,62 +131,123 @@
:props="{
label: 'categoryName'
}"
@node-click="typeClick"
>
@node-click="typeClick">
</el-tree>
</div>
<el-main style="padding-top: 0;padding-bottom: 0;">
<el-card shadow="hover">
<el-input style="width: 250px;margin-bottom: 15px;" placeholder="请输入表名称" v-model="keywordTable" suffix-icon="el-icon-search" clearable size="small"></el-input>
<el-table v-loading="tableLoading" :data="tables" class="cus-table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table-column width="40" align="center">
<el-input style="width: 250px;margin-bottom: 15px;"
placeholder="请输入表名称"
v-model="keywordTable"
suffix-icon="el-icon-search"
clearable
size="small"></el-input>
<el-table v-loading="tableLoading"
:data="tables"
class="cus-table"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange">
<el-table-column width="40"
align="center">
<template slot-scope="scope">
<el-radio class="check-table" v-model="curTable" :label="scope.row.id"></el-radio>
<el-radio class="check-table"
v-model="curTable"
:label="scope.row.id"></el-radio>
</template>
</el-table-column>
<el-table-column type="index" width="50" label="序号" align="center"></el-table-column>
<el-table-column prop="tableComment" label="数据表名称" align="center">
<el-table-column type="index"
width="50"
label="序号"
align="center"></el-table-column>
<el-table-column prop="tableComment"
label="数据表名称"
align="center">
<template slot-scope="scope">
{{scope.row.tableComment ? scope.row.tableComment : scope.row.showName}}
</template>
</el-table-column>
<el-table-column prop="dataTotal" label="数据总量" width="80" align="center"></el-table-column>
<el-table-column prop="timeRange" label="起止日期" width="200" align="center"></el-table-column>
<el-table-column prop="dataSize" label="数据大小" width="80" align="center">
<el-table-column prop="dataTotal"
label="数据总量"
width="80"
align="center"></el-table-column>
<el-table-column prop="timeRange"
label="起止日期"
width="200"
align="center"></el-table-column>
<el-table-column prop="dataSize"
label="数据大小"
width="80"
align="center">
<template slot-scope="scope">
{{scope.row.dataSize}}M
</template>
</el-table-column>
<el-table-column prop="updateTime" label="更新时间" width="160" align="center"></el-table-column>
<el-table-column label="操作" width="80" align="center">
<el-table-column prop="updateTime"
label="更新时间"
width="160"
align="center"></el-table-column>
<el-table-column label="操作"
width="80"
align="center">
<template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)">预览</el-button>
<el-button type="text"
@click="preview(scope.row)">预览</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :current-page="pageTable" @current-change="handleCurrentChangeTable" :total="totalTable">
<el-pagination background
layout="total, prev, pager, next"
:current-page="pageTable"
@current-change="handleCurrentChangeTable"
:total="totalTable">
</el-pagination>
</div>
</el-card>
</el-main>
</el-container>
<span slot="footer" class="dialog-footer">
<span slot="footer"
class="dialog-footer">
<el-button @click="importVisible = false"> </el-button>
<el-button class="cus-btn" type="primary" :loading="submited" @click="confirmImport"> </el-button>
<el-button class="cus-btn"
type="primary"
:loading="submited"
@click="confirmImport"> </el-button>
</span>
</el-dialog>
<el-dialog title="预览" :visible.sync="previewVisible" width="60%" center :close-on-click-modal="false">
<el-table :data="previewData" class="cus-table" stripe header-align="center" row-key="id">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column v-for="(item,index) in previewHead" :prop="item.field" :key="index" :label="item.comment" align="center"></el-table-column>
<el-dialog title="预览"
:visible.sync="previewVisible"
width="60%"
center
:close-on-click-modal="false">
<el-table :data="previewData"
class="cus-table"
stripe
header-align="center"
row-key="id">
<el-table-column type="index"
width="100"
label="序号"
align="center"></el-table-column>
<el-table-column v-for="(item,index) in previewHead"
:prop="item.field"
:key="index"
:label="item.comment"
align="center"></el-table-column>
</el-table>
</el-dialog>
<!-- 购买弹框 -->
<el-dialog title="温馨提示" :visible.sync="buyVisible" width="400px" center :close-on-click-modal="false">
<el-dialog title="温馨提示"
:visible.sync="buyVisible"
width="400px"
center
:close-on-click-modal="false">
<div class="buy">
<p class="tips">当前院校暂未购买该数据库请扫码咨询购买</p>
<img src="@/assets/images/wechat-code.jpeg" alt="">
<img src="@/assets/images/wechat-code.jpeg"
alt="">
</div>
</el-dialog>
</div>
@ -504,7 +630,7 @@ export default {
font-size: 16px;
color: #333;
border-radius: 8px;
background-color: #F6F8FA;
background-color: #f6f8fa;
border: 1px solid transparent;
cursor: pointer;
img {
@ -521,6 +647,11 @@ export default {
&:focus {
color: #007eff;
}
.el-upload-dragger {
width: auto;
height: auto;
border: 0;
}
}
}
}
@ -539,7 +670,9 @@ export default {
display: none;
}
}
/deep/.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
/deep/.el-tree--highlight-current
.el-tree-node.is-current
> .el-tree-node__content {
background-color: #e8f0ff;
}
/deep/.el-radio__input.is-checked .el-radio__inner {

@ -17,9 +17,13 @@
<p v-if="$config.isHh"
style="font-size: 18px">{{$config.title}}</p>
<p>编程语言</p>
<el-input placeholder="请输入内容"
v-model="language"
:disabled="true"></el-input>
<el-select v-model="language"
@change="languageChange">
<el-option v-for="(item, i) in languages"
:key="i"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</div>
<div class="inline-center">
<el-tooltip class="item"
@ -44,7 +48,8 @@
:key="item.judgmentId"
:label="item.name"
:value="item.judgmentId">
<codemirror :ref="'code' + i"
<codemirror v-if="!language"
:ref="'code' + i"
:key="codeKey"
:projectId.sync="projectId"
:systemId.sync="systemId"
@ -55,6 +60,16 @@
:retResult.sync="item.retResult"
:modelIsShow.sync="modelIsShow"
@cache="leavePage"></codemirror>
<!-- <img v-else
src="@/assets/images/vscode.png"
alt=""
width="100%"
height="700"> -->
<iframe v-else
class="vscode"
src="http://121.37.12.51:8088/?folder=/home/coder"
frameborder="0"
width="100%"></iframe>
</el-tab-pane>
</el-tabs>
</div>
@ -88,7 +103,17 @@ export default {
systemId: '',
modelIsShow: false, //
projectPermissions: 0, // (0 1 2)
language: 'Python', //
languages: [
{
id: 0,
name: 'Python'
},
{
id: 1,
name: 'Vscode'
},
],
language: 0, //
curTab: '', //
workbench: [], //
codeKey: 1 //
@ -143,9 +168,13 @@ export default {
},
//
getModelStatus (systemId) {
this.$post(`${this.api.checkIsShowBySystemId}?systemId=${systemId}`).then(res => {
this.modelIsShow = !res.isShow // 0 1
this.$post(`${this.api.displayListOrNotByStudent}?systemId=${systemId}`).then(res => {
this.modelIsShow = res.studentSideShowsTheStatus == 'true' ? true : false
}).catch(res => { })
},
//
languageChange (id) {
},
//
toData () {
@ -258,10 +287,14 @@ export default {
.el-input {
width: 200px;
}
.el-input.is-disabled .el-input__inner {
.el-input .el-input__inner {
border-radius: 30px;
}
}
.vscode {
height: calc(100vh - 186px);
}
.menu {
position: relative;
z-index: 1000;

Loading…
Cancel
Save