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

20240205
yujialong 3 years ago
commit 7c3902ece2
  1. 68
      src/components/case/index.vue
  2. 5
      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,
sss:1,
popContainer:false,
timestamp:'',
}
},
watch: {
@ -243,6 +244,13 @@ export default {
let projectId = this.getQueryVariable('projectId')
let assessmentId = this.getQueryVariable('assessmentId')
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){
sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid)
@ -379,14 +387,16 @@ export default {
getProjectDetail(params).then((data)=>{
if(data.status == 200){
this.globalTimer = "";
this.countVal = "";
this.day = "00";
this.seconds = "00";
this.minutes = "00";
this.hour = "00";
let stopTime = sessionStorage.getItem('timestamp')
let timestamp = +stopTime;
this.countVal = timestamp;
// this.day = "00";
// this.seconds = "00";
// this.minutes = "00";
// this.hour = "00";
this.sss = 1;
this.hintOpen = data.data.projectManage.hintOpen
this.startCountFn();
this.hintOpen = data.data.projectManage.hintOpen;
this.countDown(timestamp);
let projectId = this.getQueryVariable('projectId')
if(projectId != null){
//
@ -511,14 +521,17 @@ export default {
});
});
},
//
startCountFn() {
if (!this.isStart) {
this.countVal = this.countVal ? this.countVal : 0;
// this.countVal = this.countVal ? this.countVal : 0;
this.globalTimer = setInterval(() => {
if(this.sss == 0){
this.globalTimer = null;
clearInterval(this.globalTimer);
}else if (this.timestamp){
this.counterFn(this.countVal--);
}else{
this.counterFn(this.countVal++);
}
@ -526,7 +539,41 @@ export default {
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) {
if (this.timestamp){
let countDown = (new Date(counterTime).getTime() - new Date().getTime()) / 1000
if (countDown > 0) {
let d = Math.floor(countDown / (60 * 60 * 24));
let h = Math.floor(countDown / (60 * 60));
let m = Math.floor(countDown % (60 * 60) / 60);
let s = Math.floor(countDown % (60 * 60) % 60);
this.day = `${d > 9 ? d : `0${d}`}`;
this.hour = `${h > 9 ? h : `0${h}`}`;
this.minutes = `${m > 9 ? m : `0${m}`}`;
this.seconds = `${s > 9 ? s : `0${s}`}`;
} else {
this.$alert('考核结束,已自动交卷', '提示', {
confirmButtonText: '确定',
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); //
@ -542,6 +589,7 @@ export default {
this.hour = hour;
this.minutes = minutes;
this.seconds = seconds;
}
},
//
reload() {
@ -602,9 +650,9 @@ export default {
getCookie(cookie_name) {
//cookiekeyvalue
var allcookies = document.cookie; //
var cookie_pos = allcookies.indexOf(cookie_name); // cookie,
var cookie_pos = allcookies.indexOf(cookie_name); //cookie,
if (cookie_pos != -1) {
// cookie_pos1
//cookie_pos1
//cookie1=
cookie_pos = cookie_pos + cookie_name.length + 1; //cookie
var cookie_end = allcookies.indexOf(";", cookie_pos);

@ -33,8 +33,13 @@ export default {
})
},
exit(){
let stopTime = sessionStorage.getItem('timestamp')
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 cid = this.getQueryVariable('cid')
let systemId = this.getQueryVariable('systemId')
let stopTime = this.getQueryVariable('stopTime')
let timestamp =+stopTime;
if (token != null){
sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId)
}
if (timestamp != null){
sessionStorage.setItem('timestamp', timestamp)
}else{
sessionStorage.setItem('timestamp', null)
}
},
methods: {
getQueryVariable(name) {

@ -1,8 +1,9 @@
<template>
<div class="wrap">
<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">
<ul class="btns">
<li @click="showTake">取号</li>
@ -11,7 +12,6 @@
<li>取回</li>
</ul>
</div>
<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 class="data-title">取号机</div>
@ -170,8 +170,21 @@ export default {
this.takeVisible = false
this.takeResultVisible = true
},
toPart(path){
this.$router.push(path)
toPart(){
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(){
this.dataVisible = true
@ -205,10 +218,18 @@ export default {
}
}
.guide{
top: 90px;
left: 0;
width: 222px;
top: 80px;
left: 10px;
width: 150px;
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{
opacity: .9;
}

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

Loading…
Cancel
Save