yujialong 9 months ago
parent fba27010ad
commit 8744db0254
  1. 5
      src/components/TestPanel.vue
  2. 65
      src/components/codemirror.vue
  3. 2
      src/config/index.js
  4. 1
      src/views/Home.vue

@ -665,7 +665,7 @@ export default {
})
//
Promise.all(promiseList).then(_ => {
hasCache && this.$confirm('是否要继续上次的实验?', '提示', {
hasCache && this.$confirm('是否要继续上次的操作记录?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'success'
@ -911,6 +911,7 @@ export default {
bcId: e.judgmentId,
isSubmit: e.codeId ? 1 : 0,
answer: e.answer,
photoUrl: e.photoUrl || '',
retResult: e.retResult,
judgmentName: e.name
})
@ -962,7 +963,7 @@ export default {
this.submiting = false
//
if (this.competitionId) {
this.$alert(`提交成功!${this.resultsDetails == 0 && this.resultAnnouncementTime != 0 ? '成绩将在' + this.resultAnnouncementTime + '小时后发布,请去参赛信息模块查看' : ''}`, '提示', {
this.$alert(`提交成功!${this.resultAnnouncementTime != 0 ? '成绩将在' + this.resultAnnouncementTime + '小时后发布,请去参赛信息模块查看' : ''}`, '提示', {
confirmButtonText: '确定',
callback: action => {
this.$parent.back()

@ -33,10 +33,12 @@
<div class="pic-item"
v-for="(img, i) in picSrcList"
:key="i">
<el-image class="pic"
:src="img"
:preview-src-list="picSrcList">
</el-image>
<div class="pic-inner">
<el-image class="pic"
:src="img"
:preview-src-list="picSrcList">
</el-image>
</div>
<el-button class="download-btn btn"
type="primary"
size="mini"
@ -229,8 +231,21 @@
</el-tab-pane>
<el-tab-pane label="结果"
name="result">
<div class="result"
v-html="curResult"></div>
<div style="position: relative">
<div class="result"
v-html="curResult"></div>
<div v-if="curPhotoUrl.length"
class="pics">
<div class="pic-item"
v-for="(img, i) in curPhotoUrl"
:key="i">
<el-image class="pic"
:src="img"
:preview-src-list="curPhotoUrl">
</el-image>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
<span slot="footer"
@ -293,7 +308,7 @@ import config from '@/config'
import { saveAs } from 'file-saver'
const CANCEL_TOKEN = axios.CancelToken // input
export default {
props: ['judgmentId', 'code', 'codeId', 'projectId', 'systemId', 'retResult', 'modelIsShow'],
props: ['judgmentId', 'code', 'codeId', 'projectId', 'systemId', 'retResult', 'modelIsShow', 'photoUrl'],
data () {
return {
token: Cookie.get('admin-token'),
@ -398,6 +413,7 @@ export default {
showActive: 'code',
curCode: '',
curResult: '',
curPhotoUrl: [],
};
},
components: {
@ -673,7 +689,11 @@ export default {
this.$emit('cache') //
this.loadIns.close()
this.picSrcList = []
if (photo) this.picSrcList = photo.split(',')
this.$emit('update:photoUrl', '')
if (photo) {
this.picSrcList = photo.split(',')
this.$emit('update:photoUrl', photo)
}
this.$emit('update:codeId', res.codeId) // coddeId
this.$emit('update:answer', result) //
this.$emit('update:retResult', data.retResult) //
@ -830,6 +850,7 @@ export default {
showCode (row) {
this.curCode = row.runCode
this.curResult = row.runResults
this.curPhotoUrl = row.photoUrl ? row.photoUrl.split(',') : []
this.showVisible = true
},
//
@ -1009,7 +1030,13 @@ export default {
}
.pic-item {
margin: 0 5px 5px;
.pic-inner {
height: 100px;
}
&:only-child {
.pic-inner {
height: auto;
}
.pic {
width: 50%;
max-height: none;
@ -1020,6 +1047,7 @@ export default {
display: block;
width: 100px;
max-height: 100px;
object-fit: cover;
margin: 0 auto 10px;
}
}
@ -1095,5 +1123,26 @@ export default {
line-height: 50px;
color: #333;
}
.pics {
display: flex;
margin-top: 20px;
overflow: auto;
.pic-item {
margin: 0 5px 5px;
&:only-child {
.pic {
width: 50%;
max-height: none;
}
}
}
.pic {
display: block;
width: 100px;
max-height: 100px;
object-fit: cover;
margin: 0 auto 10px;
}
}
}
</style>

@ -13,7 +13,7 @@ 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.217:9000/'
host = 'http://121.37.12.51:9000/'
// host = 'https://occupationlab.com/'
bankPath = `http://${location.hostname}:8093`

@ -64,6 +64,7 @@
:codeId.sync="item.codeId"
:answer.sync="item.answer"
:retResult.sync="item.retResult"
:photoUrl.sync="item.photoUrl"
:modelIsShow.sync="modelIsShow"
@cache="leavePage"></codemirror>
<iframe v-else

Loading…
Cancel
Save