Merge branch 'master' of ssh://git.czcyedu.com:222/huoran/FE_bankTeaching into master

20240205
yujialong 3 years ago
commit 7c3902ece2
  1. 100
      src/components/case/index.vue
  2. 9
      src/layouts/header/index.vue
  3. 7
      src/pages/index/list/index.vue
  4. 37
      src/pages/lobbyManager/list/index.vue
  5. 2
      src/pages/manage/index/index.vue

@ -184,6 +184,7 @@ export default {
loading:false, loading:false,
sss:1, sss:1,
popContainer:false, popContainer:false,
timestamp:'',
} }
}, },
watch: { watch: {
@ -243,6 +244,13 @@ export default {
let projectId = this.getQueryVariable('projectId') let projectId = this.getQueryVariable('projectId')
let assessmentId = this.getQueryVariable('assessmentId') let assessmentId = this.getQueryVariable('assessmentId')
let classId = this.getQueryVariable('classId') let classId = this.getQueryVariable('classId')
let stopTime = this.getQueryVariable('stopTime')
let timestamp = +stopTime;
if (timestamp != null){
sessionStorage.setItem('timestamp', timestamp)
}else{
sessionStorage.setItem('timestamp', null)
}
if (token != null){ if (token != null){
sessionStorage.setItem('token', token) sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid) sessionStorage.setItem('cid', cid)
@ -379,14 +387,16 @@ export default {
getProjectDetail(params).then((data)=>{ getProjectDetail(params).then((data)=>{
if(data.status == 200){ if(data.status == 200){
this.globalTimer = ""; this.globalTimer = "";
this.countVal = ""; let stopTime = sessionStorage.getItem('timestamp')
this.day = "00"; let timestamp = +stopTime;
this.seconds = "00"; this.countVal = timestamp;
this.minutes = "00"; // this.day = "00";
this.hour = "00"; // this.seconds = "00";
// this.minutes = "00";
// this.hour = "00";
this.sss = 1; this.sss = 1;
this.hintOpen = data.data.projectManage.hintOpen this.hintOpen = data.data.projectManage.hintOpen;
this.startCountFn(); this.countDown(timestamp);
let projectId = this.getQueryVariable('projectId') let projectId = this.getQueryVariable('projectId')
if(projectId != null){ if(projectId != null){
// //
@ -511,14 +521,17 @@ export default {
}); });
}); });
}, },
//
//
startCountFn() { startCountFn() {
if (!this.isStart) { if (!this.isStart) {
this.countVal = this.countVal ? this.countVal : 0; // this.countVal = this.countVal ? this.countVal : 0;
this.globalTimer = setInterval(() => { this.globalTimer = setInterval(() => {
if(this.sss == 0){ if(this.sss == 0){
this.globalTimer = null; this.globalTimer = null;
clearInterval(this.globalTimer); clearInterval(this.globalTimer);
}else if (this.timestamp){
this.counterFn(this.countVal--);
}else{ }else{
this.counterFn(this.countVal++); this.counterFn(this.countVal++);
} }
@ -526,22 +539,57 @@ export default {
this.isStart = true; this.isStart = true;
} }
}, },
//
countDown(timestamp){
this.timestamp = timestamp
console.log(this.timestamp)
this.sss = 1;
this.globalTimer = null;
clearInterval(this.globalTimer);
this.startCountFn()
},
counterFn(counterTime) { counterFn(counterTime) {
let leave1 = counterTime % (24 * 3600 * 1); // if (this.timestamp){
let leave2 = leave1 % (3600 * 1); // let countDown = (new Date(counterTime).getTime() - new Date().getTime()) / 1000
let leave3 = leave2 % (60 * 1); // if (countDown > 0) {
let day = Math.floor(counterTime / (24 * 3600 * 1)); // let d = Math.floor(countDown / (60 * 60 * 24));
let hour = Math.floor(leave1 / (3600 * 1)); // let h = Math.floor(countDown / (60 * 60));
let minutes = Math.floor(leave2 / (60 * 1)); // let m = Math.floor(countDown % (60 * 60) / 60);
let seconds = Math.round(leave3 / 1); // let s = Math.floor(countDown % (60 * 60) % 60);
day = day >= 10 ? day : "0" + day; this.day = `${d > 9 ? d : `0${d}`}`;
hour = hour >= 10 ? hour : "0" + hour; this.hour = `${h > 9 ? h : `0${h}`}`;
minutes = minutes >= 10 ? minutes : "0" + minutes; this.minutes = `${m > 9 ? m : `0${m}`}`;
seconds = seconds >= 10 ? seconds : "0" + seconds; this.seconds = `${s > 9 ? s : `0${s}`}`;
this.day = day; } else {
this.hour = hour; this.$alert('考核结束,已自动交卷', '提示', {
this.minutes = minutes; confirmButtonText: '确定',
this.seconds = seconds; callback: action => {
}
});
this.Submit()
this.day = '00';
this.hour = '00';
this.minutes = '00';
this.seconds = '00';
}
}else{
let leave1 = counterTime % (24 * 3600 * 1); //
let leave2 = leave1 % (3600 * 1); //
let leave3 = leave2 % (60 * 1); //
let day = Math.floor(counterTime / (24 * 3600 * 1)); //
let hour = Math.floor(leave1 / (3600 * 1)); //
let minutes = Math.floor(leave2 / (60 * 1)); //
let seconds = Math.round(leave3 / 1); //
day = day >= 10 ? day : "0" + day;
hour = hour >= 10 ? hour : "0" + hour;
minutes = minutes >= 10 ? minutes : "0" + minutes;
seconds = seconds >= 10 ? seconds : "0" + seconds;
this.day = day;
this.hour = hour;
this.minutes = minutes;
this.seconds = seconds;
}
}, },
// //
reload() { reload() {
@ -602,9 +650,9 @@ export default {
getCookie(cookie_name) { getCookie(cookie_name) {
//cookiekeyvalue //cookiekeyvalue
var allcookies = document.cookie; // var allcookies = document.cookie; //
var cookie_pos = allcookies.indexOf(cookie_name); // cookie, var cookie_pos = allcookies.indexOf(cookie_name); //cookie,
if (cookie_pos != -1) { if (cookie_pos != -1) {
// cookie_pos1 //cookie_pos1
//cookie1= //cookie1=
cookie_pos = cookie_pos + cookie_name.length + 1; //cookie cookie_pos = cookie_pos + cookie_name.length + 1; //cookie
var cookie_end = allcookies.indexOf(";", cookie_pos); var cookie_end = allcookies.indexOf(";", cookie_pos);

@ -33,8 +33,13 @@ export default {
}) })
}, },
exit(){ exit(){
let cid = sessionStorage.getItem('cid') let stopTime = sessionStorage.getItem('timestamp')
window.location = 'http://39.108.250.202/student/#/station/preview?courseId='+cid+'&curriculumName=银行项目' if (stopTime){
window.location = 'http://39.108.250.202/student/#/ass/list'
}else{
let cid = sessionStorage.getItem('cid')
window.location = 'http://39.108.250.202/student/#/station/preview?courseId='+cid+'&curriculumName=银行项目'
}
}, },
}, },
}; };

@ -40,11 +40,18 @@ export default {
let token = this.getQueryVariable('token') let token = this.getQueryVariable('token')
let cid = this.getQueryVariable('cid') let cid = this.getQueryVariable('cid')
let systemId = this.getQueryVariable('systemId') let systemId = this.getQueryVariable('systemId')
let stopTime = this.getQueryVariable('stopTime')
let timestamp =+stopTime;
if (token != null){ if (token != null){
sessionStorage.setItem('token', token) sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid) sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId) sessionStorage.setItem('systemId', systemId)
} }
if (timestamp != null){
sessionStorage.setItem('timestamp', timestamp)
}else{
sessionStorage.setItem('timestamp', null)
}
}, },
methods: { methods: {
getQueryVariable(name) { getQueryVariable(name) {

@ -1,8 +1,9 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<img class="sth manager" src="@/assets/img/manager.png" alt=""> <img class="sth manager" src="@/assets/img/manager.png" alt="">
<img class="sth guide" @click="toPart('../index/list')" src="@/assets/img/guide.png" alt=""> <div class="sth guide" @click="toPart" alt="">
返回
</div>
<div class="actions"> <div class="actions">
<ul class="btns"> <ul class="btns">
<li @click="showTake">取号</li> <li @click="showTake">取号</li>
@ -11,7 +12,6 @@
<li>取回</li> <li>取回</li>
</ul> </ul>
</div> </div>
<el-dialog :visible.sync="takeVisible" width="1280px" @close="closeTake" :close-on-click-modal="false" :show-close="false" custom-class="data-dia"> <el-dialog :visible.sync="takeVisible" width="1280px" @close="closeTake" :close-on-click-modal="false" :show-close="false" custom-class="data-dia">
<div slot="title" class="dia-header"> <div slot="title" class="dia-header">
<div class="data-title">取号机</div> <div class="data-title">取号机</div>
@ -170,8 +170,21 @@ export default {
this.takeVisible = false this.takeVisible = false
this.takeResultVisible = true this.takeResultVisible = true
}, },
toPart(path){ toPart(){
this.$router.push(path) let token = sessionStorage.getItem('token')
let cid = sessionStorage.getItem('cid')
let systemId = sessionStorage.getItem('systemId')
let projectId = sessionStorage.getItem('projectId')
let assessmentId = sessionStorage.getItem('assessmentId')
let classId = sessionStorage.getItem('classId')
if (projectId){
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://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
}
}, },
showData(){ showData(){
this.dataVisible = true this.dataVisible = true
@ -205,10 +218,18 @@ export default {
} }
} }
.guide{ .guide{
top: 90px; top: 80px;
left: 0; left: 10px;
width: 222px; width: 150px;
cursor: pointer; cursor: pointer;
background:url(../../../assets/img/lobby-btn-bg.png);
background-repeat: no-repeat;
background-size: 100% 100%;
line-height: 50px;
font-size: 24px;
text-align: center;
color: #fff;
&:hover{ &:hover{
opacity: .9; opacity: .9;
} }

@ -62,7 +62,7 @@ export default {
.box{ .box{
display: flex; display: flex;
min-width: 1300px; min-width: 1300px;
margin-top: 50px; margin-top: 70px;
overflow: auto; overflow: auto;
.nav{ .nav{
width: 270px; width: 270px;

Loading…
Cancel
Save