openf12
yujialong 1 year ago
parent 2652e3b412
commit eb864e33c4
  1. 20
      src/components/TestPanel.vue
  2. 7
      src/components/codemirror.vue
  3. 29
      src/main.js

@ -100,7 +100,7 @@
<el-aside id="aside" <el-aside id="aside"
width="30%"> width="30%">
<div class="aside-header"> <div class="aside-header">
<div :class="['p-title color', 'system' + systemId]"> <div :class="['p-title color', 'system' + $themeId]">
<i class="el-icon-s-order"></i> <i class="el-icon-s-order"></i>
<p>实验目标</p> <p>实验目标</p>
</div> </div>
@ -110,7 +110,7 @@
</div> </div>
</div> </div>
<div class="aside-footer"> <div class="aside-footer">
<div :class="['p-title color', 'system' + systemId]"> <div :class="['p-title color', 'system' + $themeId]">
<i class="el-icon-s-management"></i> <i class="el-icon-s-management"></i>
<p>实验任务</p> <p>实验任务</p>
</div> </div>
@ -897,6 +897,12 @@ export default {
togglePannel () { togglePannel () {
document.querySelector('#panel').style.left = 0 document.querySelector('#panel').style.left = 0
this.pannelVisible = !this.pannelVisible this.pannelVisible = !this.pannelVisible
// if (this.pannelVisible) {
// document.querySelector('#toggle').onmousedown = null
// document.querySelector('#toggle').onmousedown = togglePannel
// } else {
this.drag()
// }
}, },
// //
timeFormat (param) { timeFormat (param) {
@ -938,6 +944,9 @@ export default {
}, },
// //
drag () { drag () {
document.querySelector('.scrollbar').onmousedown = null
document.querySelector('#toggle').onmousedown = null
const el = document.querySelector('#panel') const el = document.querySelector('#panel')
const drag = e => { const drag = e => {
if (this.dragIds.includes(e.target.id)) { if (this.dragIds.includes(e.target.id)) {
@ -962,7 +971,6 @@ export default {
} }
} }
} }
// document.querySelector('#header').onmousedown = drag
document.querySelector('.scrollbar').onmousedown = drag document.querySelector('.scrollbar').onmousedown = drag
@ -992,7 +1000,7 @@ export default {
document.onmouseup = null document.onmouseup = null
} }
} }
document.querySelector('#toggle').onmousedown = drag1 document.querySelector('#toggle').onmousedown = this.pannelVisible ? this.togglePannel : drag1
} }
} }
}; };
@ -1123,7 +1131,6 @@ export default {
&.system4 { &.system4 {
background-size: 100% 58px; background-size: 100% 58px;
} }
&.system5,
&.system7, &.system7,
&.system9 { &.system9 {
background-size: 100% 40px; background-size: 100% 40px;
@ -1132,9 +1139,6 @@ export default {
&.system6 { &.system6 {
background-size: 100% 61px; background-size: 100% 61px;
} }
&.system10 {
background-size: 104% 61px;
}
p { p {
padding-left: 10px; padding-left: 10px;
line-height: 40px; line-height: 40px;

@ -506,6 +506,8 @@ export default {
projectId, projectId,
type: 0 type: 0
}).then(res => { }).then(res => {
//
if (res.code) {
const data = res.code const data = res.code
const photo = data.photoUrl const photo = data.photoUrl
const result = data.runResult || '' const result = data.runResult || ''
@ -543,6 +545,11 @@ export default {
this.runResult = result this.runResult = result
this.errLine = parseInt(result.substring(result.indexOf("line") + 4, result.length)) this.errLine = parseInt(result.substring(result.indexOf("line") + 4, result.length))
} }
} else if (res.data && res.data.current) {
//
this.$message.success(`当前队列有${res.data.current - 1}人在排队,请稍等!`)
this.loadIns.close()
}
}).catch(res => { }).catch(res => {
this.isError = false this.isError = false
this.runResult = '' this.runResult = ''

@ -10,17 +10,38 @@ import config from '@/config'
import api from './api'; import api from './api';
import Cookie from 'js-cookie' import Cookie from 'js-cookie'
Vue.prototype.$themeId = 4 Vue.prototype.$themeId = 9
axios.get(config.host + api.detailsOfGoods + '?mallId=' + Cookie.get('admin-mallId'), { axios.get(config.host + api.detailsOfGoods + '?mallId=' + Cookie.get('admin-mallId'), {
headers: { headers: {
token: Cookie.get('admin-token') token: Cookie.get('admin-token')
}, },
}).then(({ data }) => { }).then(({ data }) => {
console.log(33, data.orderDetails.mall.themeId) console.log(33, data.orderDetails.mall.themeId)
const themeId = data.orderDetails.mall.themeId || 4 const themeId = data.orderDetails.mall.themeId || 9
// const themeId = 14
Vue.prototype.$themeId = themeId Vue.prototype.$themeId = themeId
require(`@/styles/theme/theme${themeId}.scss`) // require(`@/styles/theme/theme${themeId}.scss`)
if (themeId == 1) {
import('@/styles/theme/theme1.scss')
} else if (themeId == 2) {
import('@/styles/theme/theme2.scss')
} else if (themeId == 3) {
import('@/styles/theme/theme3.scss')
} else if (themeId == 4) {
import('@/styles/theme/theme4.scss')
} else if (themeId == 5) {
import('@/styles/theme/theme5.scss')
} else if (themeId == 6) {
import('@/styles/theme/theme6.scss')
} else if (themeId == 7) {
import('@/styles/theme/theme7.scss')
} else if (themeId == 8) {
import('@/styles/theme/theme8.scss')
} else if (themeId == 9) {
import('@/styles/theme/theme9.scss')
} else if (themeId == 10) {
import('@/styles/theme/theme10.scss')
}
}).catch(e => {}) }).catch(e => {})
import { import {

Loading…
Cancel
Save