|
|
@ -33,10 +33,12 @@ |
|
|
|
<div class="pic-item" |
|
|
|
<div class="pic-item" |
|
|
|
v-for="(img, i) in picSrcList" |
|
|
|
v-for="(img, i) in picSrcList" |
|
|
|
:key="i"> |
|
|
|
:key="i"> |
|
|
|
<el-image class="pic" |
|
|
|
<div class="pic-inner"> |
|
|
|
:src="img" |
|
|
|
<el-image class="pic" |
|
|
|
:preview-src-list="picSrcList"> |
|
|
|
:src="img" |
|
|
|
</el-image> |
|
|
|
:preview-src-list="picSrcList"> |
|
|
|
|
|
|
|
</el-image> |
|
|
|
|
|
|
|
</div> |
|
|
|
<el-button class="download-btn btn" |
|
|
|
<el-button class="download-btn btn" |
|
|
|
type="primary" |
|
|
|
type="primary" |
|
|
|
size="mini" |
|
|
|
size="mini" |
|
|
@ -229,8 +231,21 @@ |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="结果" |
|
|
|
<el-tab-pane label="结果" |
|
|
|
name="result"> |
|
|
|
name="result"> |
|
|
|
<div class="result" |
|
|
|
<div style="position: relative"> |
|
|
|
v-html="curResult"></div> |
|
|
|
<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-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</el-tabs> |
|
|
|
<span slot="footer" |
|
|
|
<span slot="footer" |
|
|
@ -293,7 +308,7 @@ import config from '@/config' |
|
|
|
import { saveAs } from 'file-saver' |
|
|
|
import { saveAs } from 'file-saver' |
|
|
|
const CANCEL_TOKEN = axios.CancelToken // 用于input中中断请求 |
|
|
|
const CANCEL_TOKEN = axios.CancelToken // 用于input中中断请求 |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
props: ['judgmentId', 'code', 'codeId', 'projectId', 'systemId', 'retResult', 'modelIsShow'], |
|
|
|
props: ['judgmentId', 'code', 'codeId', 'projectId', 'systemId', 'retResult', 'modelIsShow', 'photoUrl'], |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
token: Cookie.get('admin-token'), |
|
|
|
token: Cookie.get('admin-token'), |
|
|
@ -398,6 +413,7 @@ export default { |
|
|
|
showActive: 'code', |
|
|
|
showActive: 'code', |
|
|
|
curCode: '', |
|
|
|
curCode: '', |
|
|
|
curResult: '', |
|
|
|
curResult: '', |
|
|
|
|
|
|
|
curPhotoUrl: [], |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
components: { |
|
|
|
components: { |
|
|
@ -673,7 +689,11 @@ export default { |
|
|
|
this.$emit('cache') // 每次运行代码都要把代码传给后端做缓存 |
|
|
|
this.$emit('cache') // 每次运行代码都要把代码传给后端做缓存 |
|
|
|
this.loadIns.close() |
|
|
|
this.loadIns.close() |
|
|
|
this.picSrcList = [] |
|
|
|
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:codeId', res.codeId) // 更新coddeId |
|
|
|
this.$emit('update:answer', result) // 更新运行结果 |
|
|
|
this.$emit('update:answer', result) // 更新运行结果 |
|
|
|
this.$emit('update:retResult', data.retResult) // 更新返回结果 |
|
|
|
this.$emit('update:retResult', data.retResult) // 更新返回结果 |
|
|
@ -830,6 +850,7 @@ export default { |
|
|
|
showCode (row) { |
|
|
|
showCode (row) { |
|
|
|
this.curCode = row.runCode |
|
|
|
this.curCode = row.runCode |
|
|
|
this.curResult = row.runResults |
|
|
|
this.curResult = row.runResults |
|
|
|
|
|
|
|
this.curPhotoUrl = row.photoUrl ? row.photoUrl.split(',') : [] |
|
|
|
this.showVisible = true |
|
|
|
this.showVisible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 导入代码 |
|
|
|
// 导入代码 |
|
|
@ -1009,7 +1030,13 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
.pic-item { |
|
|
|
.pic-item { |
|
|
|
margin: 0 5px 5px; |
|
|
|
margin: 0 5px 5px; |
|
|
|
|
|
|
|
.pic-inner { |
|
|
|
|
|
|
|
height: 100px; |
|
|
|
|
|
|
|
} |
|
|
|
&:only-child { |
|
|
|
&:only-child { |
|
|
|
|
|
|
|
.pic-inner { |
|
|
|
|
|
|
|
height: auto; |
|
|
|
|
|
|
|
} |
|
|
|
.pic { |
|
|
|
.pic { |
|
|
|
width: 50%; |
|
|
|
width: 50%; |
|
|
|
max-height: none; |
|
|
|
max-height: none; |
|
|
@ -1020,6 +1047,7 @@ export default { |
|
|
|
display: block; |
|
|
|
display: block; |
|
|
|
width: 100px; |
|
|
|
width: 100px; |
|
|
|
max-height: 100px; |
|
|
|
max-height: 100px; |
|
|
|
|
|
|
|
object-fit: cover; |
|
|
|
margin: 0 auto 10px; |
|
|
|
margin: 0 auto 10px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1095,5 +1123,26 @@ export default { |
|
|
|
line-height: 50px; |
|
|
|
line-height: 50px; |
|
|
|
color: #333; |
|
|
|
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> |
|
|
|
</style> |