修改域名

20240205
e 3 years ago
parent 0f6a60f794
commit f29ed318e2
  1. 4
      src/api/api.js
  2. 154
      src/components/case/index.vue
  3. 8
      src/layouts/header/index.vue
  4. 8
      src/pages/lobbyManager/list/index.vue

@ -2,8 +2,8 @@ import axios from 'axios';
import router from '../router';
// 创建axios实例
const service = axios.create({
// baseURL: "http://www.huorantech.cn:9000",//线上
baseURL: "http://39.108.250.202:9000/", // 中台测试服
baseURL: "http://www.huorantech.cn:9000",//线上
// baseURL: "http://39.108.250.202:9000/", // 中台测试服
// baseURL: "http://192.168.31.137:9000/", // 赓
// baseURL: "http://192.168.31.151:9000/", // 榕
// baseURL: "http://192.168.31.125:9000/", // 坤

@ -5,7 +5,7 @@
<div class="flex a-center j-between">
<div class="flex a-center" style="width: 28%">
<p>实训项目</p>
<el-select v-model="projectName" placeholder="请选择" class="select" :disabled="projectPermissions != 0" @change="selectProject">
<el-select v-model="projectId" placeholder="请选择" class="select" :disabled="projectPermissions != 0" @change="selectProject">
<el-option
v-for="item in topicList"
:key="item.projectId"
@ -32,7 +32,8 @@
</div>
</div>
<div>
<el-button style="background: #202020;color: #d0d0d0;font-size:14px;" v-show="projectPermissions == 0" @click="reload" :disabled="popContainer">
<el-button style="background: #202020;color: #d0d0d0;font-size:14px;" v-show="projectPermissions == 0"
@click="reload" :disabled="popContainer && (assessmentId!='' && assessmentId!='null' && assessmentId!=null)">
重新开始
</el-button>
<el-button class="submit-btn" style="margin-right:7px" @click="Submit()" :disabled="popContainer">提交</el-button>
@ -80,7 +81,7 @@
></i>
</template>
</el-table-column>
<el-table-column prop="score" label="得分" align="center"></el-table-column>
<el-table-column prop="scores" label="得分" align="center"></el-table-column>
</el-table>
</el-card>
</el-col>
@ -187,55 +188,26 @@ export default {
}
},
created() {
const test = this.getQueryVariable('test')
if(test) {
//
setInterval(() => {
let params = {
"systemId":sessionStorage.getItem('systemId'),
"cId":sessionStorage.getItem('cid'),
"permissions":0,
}
getProjectBySystemId(params).then((data)=>{
if(data.status == 200){
if(this.topicList.length !== data.data.projects.length) {
this.topicList = data.data.projects
if(!this.topicList.some(item => item.projectId===this.projectId)) {
this.selectProjects({projectId: this.topicList[0].projectId})
}
}
}
}).catch((error)=>{
})
}, 10000)
let assessmentId = this.getQueryVariable('assessmentId')
sessionStorage.setItem('assessmentId',assessmentId)
this.assessmentId = assessmentId
if(assessmentId == '' || assessmentId == null || assessmentId == 'null') {
}else {
if(process.env.NODE_ENV === "development") {
this.intervalJudge = setInterval(() => {
const data = {
id: parseInt(sessionStorage.getItem('assessmentId')),
token: parseInt(sessionStorage.getItem('token'))
}
checkTest(data).then(data => {
const { data: { data: { status } } } = data
if(status !== 1) {
this.popContainer = true
clearInterval(this.intervalJudge)
this.sureSubmit(false)
}else {
}
this.$confirm('考试已结束,已自动为您提交。', '提示', {
confirmButtonText: '确定',
type: 'info',
center: true
})
}, 4000)
}else {
this.intervalJudge = setInterval(() => {
const data = {
id: parseInt(sessionStorage.getItem('assessmentId')),
token: parseInt(sessionStorage.getItem('token'))
}
checkTest(data).then(data => {
const { data: { data: { status } } } = data
if(status !== 1) {
this.popContainer = true
clearInterval(this.intervalJudge)
//
this.sureSubmit(false)
}else {
@ -243,7 +215,6 @@ export default {
})
}, 4000)
}
}
},
watch: {
countVal: {
@ -318,23 +289,24 @@ export default {
sessionStorage.setItem('classId', classId)
this.assessmentId = assessmentId
this.classId = classId
console.log()
}
let tokens = sessionStorage.getItem('token')
if(this.getQueryVariable('test')) {
let params = {
"systemId":sessionStorage.getItem('systemId'),
"cId":sessionStorage.getItem('cid'),
"permissions":0,
}
getProjectBySystemId(params).then((data)=>{
if(data.status == 200){
//
this.topicList = data.data.projects
this.selectProjects({projectId: this.topicList[0].projectId})
}
}).catch((error)=>{
})
}else {
// if(this.getQueryVariable('projectId')) {
// let params = {
// "systemId":sessionStorage.getItem('systemId'),
// "cId":sessionStorage.getItem('cid'),
// "permissions":0,
// }
// getProjectBySystemId(params).then((data)=>{
// if(data.status == 200){
// //
// this.topicList = data.data.projects
// this.selectProjects({projectId: this.topicList[0].projectId})
// }
// }).catch((error)=>{
// })
// }else {
if(tokens || token){
this.projectPermissions = this.projectId ? 1 : 0
this.assessmentId && this.projectId && this.checkVer()
@ -348,7 +320,7 @@ export default {
this.getData()
}
}
}
// }
},
methods: {
getQueryVariable(name) {
@ -469,16 +441,18 @@ export default {
this.hintOpen = data.data.projectManage.hintOpen;
this.countDown(timestamp);
let projectId = this.getQueryVariable('projectId')
if(projectId != null){
if(projectId != null && projectId != '' && projectId != 'null'){
//
this.getBeginTime()
// this.topicList = [data.data.projectManage];
this.topicList = [data.data.projectManage];
this.projectId = +params.projectId
this.projectName = data.data.projectManage.projectName
this.projectId = data.data.projectManage.projectId;
this.projectManage = data.data.projectManage;
this.requires = data.data.projectJudgmentVos;
}else{
this.projectName = data.data.projectManage.projectName
this.projectId = data.data.projectManage.projectId;
this.projectManage = data.data.projectManage;
this.requires = data.data.projectJudgmentVos;
}
@ -504,18 +478,15 @@ export default {
let cid = sessionStorage.getItem('cid')
let systemId = sessionStorage.getItem('systemId')
this.projectName = data.data.projectManage.projectName;
this.projectId = data.data.projectManage.projectId;
console.log()
this.projectManage = data.data.projectManage;
this.requires = data.data.projectJudgmentVos;
//线
location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
//
// location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
//
if(process.env.NODE_ENV === "development") {
location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId
}else {
location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
}
// location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId
}
}).catch((error)=>{
@ -532,23 +503,35 @@ export default {
this.startCountFn();
},
//
Submit(judge=true) {
this.$confirm("此操作将视为结束考试, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true
Submit() {
this.$confirm('此操作将视为结束考试, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.sureSubmit()
console.log('=====')
this.sureSubmit(true)
}).catch(() => {
this.$message({
type: "info",
message: "已取消提交"
});
});
// this.$confirm(", ?", "", {
// confirmButtonText: '',
// cancelButtonText: '',
// type: "warning",
// center: true
// }).then(() => {
// this.sureSubmit(true)
// }).catch(() => {
// this.$message({
// type: "info",
// message: ""
// });
// });
},
sureSubmit(judge=true){
sureSubmit(judge){
this.actEndTime = new Date().getTime();
let ruleReqs = sessionStorage.getItem('ruleReqs')
let startTime = sessionStorage.getItem('startTime')
@ -573,6 +556,7 @@ export default {
"submitTime": this.actEndTime,
"systemId": systemId,
}
console.log(params)
this.loading = true;
submit(params).then((data)=>{
if(data.status == 200){
@ -587,7 +571,7 @@ export default {
for (var i=0;i<datas.length;i++){
if (datas[i].lcId== list[j].judgmentId){
list[j].flag = datas[i].flag
list[j].score = datas[i].judgmentScore
list[j].scores = datas[i].judgmentScore
list[j].right = datas[i].calculate
}
}
@ -600,13 +584,12 @@ export default {
message: '提交成功'
});
}else {
this.$confirm('考试已结束,已自动提交。', '提示', {
this.$confirm('考试已结束,已自动为您提交。', '提示', {
confirmButtonText: '确定',
type: 'info',
center: true
})
}
this.requires = list
}
this.loading = false
@ -652,14 +635,13 @@ export default {
this.minutes = `${m > 9 ? m : `0${m}`}`;
this.seconds = `${s > 9 ? s : `0${s}`}`;
} else {
this.$alert('考核结束,已自动交卷', '提示', {
this.$confirm('考试已结束,已自动为您提交。', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
type: 'info',
center: true
})
this.sss = 0
this.sureSubmit()
this.sureSubmit(true)
this.day = '00';
this.hour = '00';
this.minutes = '00';
@ -713,9 +695,9 @@ export default {
this.hour = "00";
this.grade = '00'
//线
// location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
//
location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
// location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
//
// location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId
},

@ -35,12 +35,12 @@ export default {
exit(){
let assessmentId = sessionStorage.getItem('assessmentId')
if (assessmentId != 'null' && assessmentId != null && assessmentId != ''){
window.location = 'http://39.108.250.202/student/#/ass/list'
// window.location = 'http://www.occupationlab.com/#/station/list'
// window.location = 'http://39.108.250.202/student/#/ass/list'
window.location = 'http://www.occupationlab.com/#/ass/list'
}else{
let cid = sessionStorage.getItem('cid')
window.location = 'http://39.108.250.202/student/#/station/preview?courseId='+cid+'&curriculumName=银行项目'
// window.location = 'http://www.occupationlab.com/#/station/preview?courseId='+cid+'&curriculumName='
// window.location = 'http://39.108.250.202/student/#/station/preview?courseId='+cid+'&curriculumName='
window.location = 'http://www.occupationlab.com/#/station/preview?courseId='+cid+'&curriculumName=银行项目'
}
},
},

@ -180,16 +180,16 @@ export default {
let classId = sessionStorage.getItem('classId')
if (projectId){
//线
// location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId+'&projectId='+projectId+'&assessmentId='+assessmentId+'&classId='+classId
location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId+'&projectId='+projectId+'&assessmentId='+assessmentId+'&classId='+classId
//
location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId+'&projectId='+projectId+'&assessmentId='+assessmentId+'&classId='+classId
// location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId+'&projectId='+projectId+'&assessmentId='+assessmentId+'&classId='+classId
//
// location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId+'&projectId='+projectId+'&assessmentId='+assessmentId+'&classId='+classId
}else{
//线
// location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
//
location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
// location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId
//
// location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId
}

Loading…
Cancel
Save