|
|
|
@ -325,7 +325,7 @@ import config from '@/config' |
|
|
|
|
import { saveAs } from 'file-saver' |
|
|
|
|
const CANCEL_TOKEN = axios.CancelToken // 用于input中中断请求 |
|
|
|
|
export default { |
|
|
|
|
props: ['judgmentId', 'code', 'finalCode', 'codeId', 'projectId', 'systemId', 'retResult', 'modelIsShow', 'photoUrl', 'answer'], |
|
|
|
|
props: ['judgmentId', 'code', 'finalCode', 'codeId', 'projectId', 'systemId', 'retResult', 'modelIsShow', 'photoUrl', 'answer', 'curTab', 'index'], |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
token: Cookie.get('admin-token'), |
|
|
|
@ -653,7 +653,8 @@ export default { |
|
|
|
|
bcId: this.judgmentId, |
|
|
|
|
cid: this.courseId, |
|
|
|
|
projectId: this.projectId, |
|
|
|
|
type: 0 |
|
|
|
|
type: 0, |
|
|
|
|
sort: this.index |
|
|
|
|
}, { |
|
|
|
|
headers: { |
|
|
|
|
token: this.token |
|
|
|
@ -698,6 +699,7 @@ export default { |
|
|
|
|
this.$emit('update:retResult', data.retResult) // 更新返回结果 |
|
|
|
|
}, |
|
|
|
|
runCodeCb2 (data) { |
|
|
|
|
if (data.sort != this.index) return false |
|
|
|
|
// 正常返回结果 |
|
|
|
|
if (data) { |
|
|
|
|
const photo = data.photoUrl |
|
|
|
@ -778,7 +780,8 @@ export default { |
|
|
|
|
bcId, |
|
|
|
|
cid, |
|
|
|
|
projectId, |
|
|
|
|
type: 0 |
|
|
|
|
type: 0, |
|
|
|
|
sort: this.index |
|
|
|
|
}).then(res => { |
|
|
|
|
this.$emit('update:finalCode', code) |
|
|
|
|
}).catch(err => { |
|
|
|
@ -802,7 +805,8 @@ export default { |
|
|
|
|
bcId, |
|
|
|
|
cid, |
|
|
|
|
projectId, |
|
|
|
|
type: 0 |
|
|
|
|
type: 0, |
|
|
|
|
sort: this.index |
|
|
|
|
}).then(res => { |
|
|
|
|
this.$emit('update:finalCode', code) |
|
|
|
|
}).catch(res => { |
|
|
|
|