yujialong 8 months ago
parent 46186012d5
commit f98551590c
  1. 2
      src/components/TestPanel.vue
  2. 12
      src/components/codemirror.vue
  3. 2
      src/views/Home.vue
  4. 1
      src/views/Report.vue

@ -1240,7 +1240,7 @@ export default {
responseCallback: function (frame) { responseCallback: function (frame) {
const data = JSON.parse(frame.body) const data = JSON.parse(frame.body)
console.log("接收信息:", data, typeof data); console.log("接收信息:", data, typeof data, newmain, newmain.$emit);
if (typeof data === 'object') { if (typeof data === 'object') {
newmain.$emit('setPid', '') newmain.$emit('setPid', '')
if (this.runCodeType) { if (this.runCodeType) {

@ -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 => {

@ -66,6 +66,8 @@
:answer.sync="item.answer" :answer.sync="item.answer"
:retResult.sync="item.retResult" :retResult.sync="item.retResult"
:photoUrl.sync="item.photoUrl" :photoUrl.sync="item.photoUrl"
:index="i"
:curTab.sync="curTab"
:modelIsShow.sync="modelIsShow" :modelIsShow.sync="modelIsShow"
@cache="leavePage"></codemirror> @cache="leavePage"></codemirror>
<iframe v-else <iframe v-else

@ -306,6 +306,7 @@ export default {
if (item) { if (item) {
if (item.runThePictureList) e.runThePictureList = item.runThePictureList if (item.runThePictureList) e.runThePictureList = item.runThePictureList
if (item.runResult) e.runResult = item.runResult if (item.runResult) e.runResult = item.runResult
if (item.answer) e.answer = item.answer
} }
}) })
} }

Loading…
Cancel
Save