20240205
e 3 years ago
parent 56f6e57e27
commit d3ba026dc6
  1. 144
      src/components/case/index.vue
  2. 1
      src/pages/counter/list/index.vue

@ -168,6 +168,7 @@ export default {
courseId: "",
// projectId: "",
assessmentId: "",
classId:'',
projectPermissions: 0, //(0 1 2)
isSubmit: false,
entryTime: util.formatDate('yyyy-MM-dd hh:mm:ss'),
@ -240,11 +241,22 @@ export default {
let cid = this.getQueryVariable('cid')
let systemId = this.getQueryVariable('systemId')
let projectId = this.getQueryVariable('projectId')
let assessmentId = this.getQueryVariable('assessmentId')
let classId = this.getQueryVariable('classId')
if (token != null){
sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId)
}
if (projectId){
sessionStorage.setItem('projectId', projectId)
sessionStorage.setItem('assessmentId', assessmentId)
sessionStorage.setItem('classId', classId)
this.assessmentId = assessmentId
this.classId = classId
}else{
this.assessmentId = ''
this.classId = ''
}
let tokens = sessionStorage.getItem('token')
if(tokens || token){
@ -277,11 +289,29 @@ export default {
//
getData(){
let params = {
systemId:sessionStorage.getItem('systemId'),
"systemId":sessionStorage.getItem('systemId'),
"cId":sessionStorage.getItem('cid'),
"permissions":0,
}
getProjectBySystemId(params).then((data)=>{
if(data.status == 200){
//
this.getBeginTime()
this.topicList = []
for (var i=0;i<data.data.projects.length;i++){
if (data.data.projects[i].projectId){
this.topicList.push(data.data.projects[i])
}
}
if(this.topicList.length > 0){
this.gotuQueryVariable()
}
this.getQueryCaches()
}
}).catch((error)=>{
})
},
getBeginTime(){
let dates = new Date().getTime();
let date = new Date(dates)
let y = date.getFullYear();
@ -295,17 +325,10 @@ export default {
m = m < 10 ? ('0' + m) : m;
let s = date.getSeconds();
s = s < 10 ? ('0' + s) : s;
let startTime = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
sessionStorage.setItem('startTime', startTime)
this.topicList = data.data.projects;
if(this.topicList.length > 0){
let projectId = this.getQueryVariable('projectId')
if(projectId){
this.projectId = projectId
}else{
this.projectId = this.topicList[0].projectId;
}
}
this.startTime = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
sessionStorage.setItem('startTime', this.startTime)
},
getQueryCaches(){
getQueryCache(params).then((data)=>{
if(data.data.status == 200){
this.$confirm('有项目未做完,是否回到未做完的项目?', '提示', {
@ -330,21 +353,17 @@ export default {
message: '已取消'
});
}).catch(() => {
})
let projectId = this.getQueryVariable('projectId')
if(projectId){
this.projectId = projectId
}else{
this.projectId = this.topicList[0].projectId;
}
sessionStorage.setItem('projectId', this.projectId)
let params = {
"projectId":this.projectId,
}
this.selectProjects(params)
this.gotuQueryVariable()
});
}else{
this.gotuQueryVariable()
}
}).catch((error)=>{
this.gotuQueryVariable()
})
},
gotuQueryVariable(){
let projectId = this.getQueryVariable('projectId')
if(projectId){
this.projectId = projectId
@ -356,47 +375,24 @@ export default {
"projectId":this.projectId,
}
this.selectProjects(params)
}
}).catch((error)=>{
})
//
},
selectProjects(params){
getProjectDetail(params).then((data)=>{
if(data.status == 200){
this.globalTimer = "";
this.countVal = "";
this.day = "00";
this.seconds = "00";
this.minutes = "00";
this.hour = "00";
// this.getClearTime();
this.sss = 1
this.startCountFn();
}
}).catch((error)=>{
})
},
selectProjects(params){
getProjectDetail(params).then((data)=>{
if(data.status == 200){
let projectId = this.getQueryVariable('projectId')
if(projectId != null){
let dates = new Date().getTime();
let date = new Date(dates)
let y = date.getFullYear();
let MM = date.getMonth() + 1;
MM = MM < 10 ? ('0' + MM) : MM;
let d = date.getDate();
d = d < 10 ? ('0' + d) : d;
let h = date.getHours();
h = h < 10 ? ('0' + h) : h;
let m = date.getMinutes();
m = m < 10 ? ('0' + m) : m;
let s = date.getSeconds();
s = s < 10 ? ('0' + s) : s;
let startTime = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
sessionStorage.setItem('startTime', startTime)
//
this.getBeginTime()
this.topicList = [data.data.projectManage];
this.projectId = +params.projectId
console.log(this.projectId)
console.log(this.topicList)
this.projectName = data.data.projectManage.projectName
this.projectManage = data.data.projectManage;
this.requires = data.data.projectJudgmentVos;
@ -430,34 +426,18 @@ export default {
}).catch((error)=>{
})
//
let dates = new Date().getTime();
let date = new Date(dates)
let y = date.getFullYear();
let MM = date.getMonth() + 1;
MM = MM < 10 ? ('0' + MM) : MM;
let d = date.getDate();
d = d < 10 ? ('0' + d) : d;
let h = date.getHours();
h = h < 10 ? ('0' + h) : h;
let m = date.getMinutes();
m = m < 10 ? ('0' + m) : m;
let s = date.getSeconds();
s = s < 10 ? ('0' + s) : s;
let startTime = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
sessionStorage.setItem('startTime', startTime)
this.getBeginTime()
this.globalTimer = "";
this.countVal = "";
this.day = "00";
this.seconds = "00";
this.minutes = "00";
this.hour = "00";
// this.getClearTime();
this.sss = 1
this.startCountFn();
},
//
Submit() {
// if(!this.codeIds.length) return this.$message.error('')
this.$confirm("此操作将视为结束考试, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -475,6 +455,8 @@ export default {
let systemId = sessionStorage.getItem('systemId')
let cid = sessionStorage.getItem('cid')
let params = {
"assessmentId":this.assessmentId,
"classId":this.classId,
"curriculumId":+cid,
"endTime": this.actEndTime,
"lcId": lcld,
@ -507,11 +489,6 @@ export default {
}
this.sss = 0;
this.popContainer = true;
// this.countVal = "";
// this.day = "00";
// this.seconds = "00";
// this.minutes = "00";
// this.hour = "00";
this.$message({
type: 'success',
message: '提交成功'
@ -522,7 +499,6 @@ export default {
}).catch((error)=>{
this.loading = false
})
// this.getClearTime();
}).catch(() => {
this.$message({
type: "info",
@ -541,7 +517,6 @@ export default {
}else{
this.counterFn(this.countVal++);
}
}, 1000);
this.isStart = true;
}
@ -590,13 +565,7 @@ export default {
this.grade = '00'
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
// this.getClearTime()
},
//
// getClearTime() {
//
// },
checkVer() {
let data = {
userId: this.userId,
@ -605,7 +574,6 @@ export default {
this.$get(this.api.qualifications,data).then(res => {
if(res.message == 'false'){
this.isSubmit = true;
// newmain.$emit("isSubmit", this.isSubmit);
}
});
},
@ -616,12 +584,6 @@ export default {
toggleCase() {
this.caseVisible = !this.caseVisible
},
// getProjects(){
// let data = {
// systemId: this.systemId,
// schoolId: ''
// }
// },
collapse(){
},
@ -632,13 +594,11 @@ export default {
//cookiekeyvalue
var allcookies = document.cookie; //
var cookie_pos = allcookies.indexOf(cookie_name); // cookie,
if (cookie_pos != -1) {
// cookie_pos1
//cookie1=
cookie_pos = cookie_pos + cookie_name.length + 1; //cookie
var cookie_end = allcookies.indexOf(";", cookie_pos);
if (cookie_end == -1) {
cookie_end = allcookies.length;
} //cookie

@ -217,7 +217,6 @@ export default {
callback(new Error('请再次输入密码'));
} else if (value.length == 6) {
if(value !== this.passwordForm.password){
console.log('=========')
callback(new Error('两次输入密码不一致!'));
}
} else {

Loading…
Cancel
Save