|
|
@ -325,7 +325,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', 'finalCode', 'codeId', 'projectId', 'systemId', 'retResult', 'modelIsShow', 'photoUrl', 'answer'], |
|
|
|
props: ['judgmentId', 'code', 'finalCode', 'codeId', 'projectId', 'systemId', 'retResult', 'modelIsShow', 'photoUrl', 'answer', 'curTab', 'index'], |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
token: Cookie.get('admin-token'), |
|
|
|
token: Cookie.get('admin-token'), |
|
|
@ -653,7 +653,8 @@ export default { |
|
|
|
bcId: this.judgmentId, |
|
|
|
bcId: this.judgmentId, |
|
|
|
cid: this.courseId, |
|
|
|
cid: this.courseId, |
|
|
|
projectId: this.projectId, |
|
|
|
projectId: this.projectId, |
|
|
|
type: 0 |
|
|
|
type: 0, |
|
|
|
|
|
|
|
sort: this.index |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
headers: { |
|
|
|
headers: { |
|
|
|
token: this.token |
|
|
|
token: this.token |
|
|
@ -698,6 +699,7 @@ export default { |
|
|
|
this.$emit('update:retResult', data.retResult) // 更新返回结果 |
|
|
|
this.$emit('update:retResult', data.retResult) // 更新返回结果 |
|
|
|
}, |
|
|
|
}, |
|
|
|
runCodeCb2 (data) { |
|
|
|
runCodeCb2 (data) { |
|
|
|
|
|
|
|
if (data.sort != this.index) return false |
|
|
|
// 正常返回结果 |
|
|
|
// 正常返回结果 |
|
|
|
if (data) { |
|
|
|
if (data) { |
|
|
|
const photo = data.photoUrl |
|
|
|
const photo = data.photoUrl |
|
|
@ -778,7 +780,8 @@ export default { |
|
|
|
bcId, |
|
|
|
bcId, |
|
|
|
cid, |
|
|
|
cid, |
|
|
|
projectId, |
|
|
|
projectId, |
|
|
|
type: 0 |
|
|
|
type: 0, |
|
|
|
|
|
|
|
sort: this.index |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
this.$emit('update:finalCode', code) |
|
|
|
this.$emit('update:finalCode', code) |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
@ -802,7 +805,8 @@ export default { |
|
|
|
bcId, |
|
|
|
bcId, |
|
|
|
cid, |
|
|
|
cid, |
|
|
|
projectId, |
|
|
|
projectId, |
|
|
|
type: 0 |
|
|
|
type: 0, |
|
|
|
|
|
|
|
sort: this.index |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
this.$emit('update:finalCode', code) |
|
|
|
this.$emit('update:finalCode', code) |
|
|
|
}).catch(res => { |
|
|
|
}).catch(res => { |
|
|
|