导入代码
+ @click="showSubmit">插入代码
@@ -314,7 +314,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', 'photoUrl', 'answer'],
+ props: ['judgmentId', 'code', 'finalCode', 'codeId', 'projectId', 'systemId', 'retResult', 'modelIsShow', 'photoUrl', 'answer'],
data () {
return {
token: Cookie.get('admin-token'),
@@ -417,8 +417,8 @@ export default {
showVisible: false,
showActive: 'code',
+ curRow: {},
curCode: '',
- curResult: '',
curPhotoUrl: [],
};
},
@@ -471,12 +471,15 @@ export default {
},
// 清屏
clearCode () {
+ this.picSrcList = []
this.codeVal = ''
this.isError = ''
this.runResult = ''
+ this.$emit('update:finalCode', '')
this.$emit('update:codeId', '') // 更新coddeId
this.$emit('update:answer', '') // 更新运行结果
this.$emit('update:retResult', '') // 更新返回结果
+ this.$emit('update:photoUrl', '') // 更新返回结果
},
// 导入模型
importModel () {
@@ -608,6 +611,7 @@ export default {
this.isError = 1
this.runResult += result
}
+ this.$emit('update:finalCode', this.sourceCode)
this.$emit('update:codeId', res.codeId) // 更新coddeId
this.$emit('update:answer', this.runResult) // 更新运行结果
this.$emit('update:retResult', data.retResult) // 更新返回结果
@@ -674,6 +678,7 @@ export default {
this.isError = 1
this.confirmInput(result)
}
+ this.$emit('update:finalCode', code)
this.$emit('update:codeId', res.codeId) // 更新coddeId
this.$emit('update:answer', this.runResult) // 更新运行结果
this.$emit('update:retResult', data.retResult) // 更新返回结果
@@ -710,6 +715,7 @@ export default {
this.picSrcList = photo.split(',')
this.$emit('update:photoUrl', photo)
}
+ this.$emit('update:finalCode', code)
this.$emit('update:codeId', res.codeId) // 更新coddeId
this.$emit('update:answer', result) // 更新运行结果
this.$emit('update:retResult', data.retResult) // 更新返回结果
@@ -864,9 +870,10 @@ export default {
},
// 查看代码
showCode (row) {
+ this.curRow = row
this.curCode = row.runCode
- this.curResult = row.runResults
this.curPhotoUrl = row.photoUrl ? row.photoUrl.split(',') : []
+ this.showActive = 'code'
this.showVisible = true
},
// 导入代码
diff --git a/src/config/index.js b/src/config/index.js
index f8d56c7..acebe26 100644
--- a/src/config/index.js
+++ b/src/config/index.js
@@ -13,9 +13,9 @@ let host = location.origin + '/'
let bankPath = `${location.origin}/banksystem` // 银行系统
// 121.37.12.51 | 192.168.31.151
if (isDev) {
- host = 'http://192.168.31.217:9000/'
+ // host = 'http://192.168.31.217:9000/'
// host = 'http://121.37.12.51:9000/'
- // host = 'https://occupationlab.com/'
+ host = 'https://occupationlab.com/'
bankPath = `http://${location.hostname}:8093`
} else if (isPro) {
host = 'https://occupationlab.com/'
diff --git a/src/views/Home.vue b/src/views/Home.vue
index 335afb9..d08af0d 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -60,6 +60,7 @@
:projectId.sync="projectId"
:systemId.sync="systemId"
:code.sync="item.code"
+ :finalCode.sync="item.finalCode"
:judgmentId="item.judgmentId"
:codeId.sync="item.codeId"
:answer.sync="item.answer"
@@ -82,10 +83,14 @@
ref="mainindex"
:workbench.sync="workbench">
+
+