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

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

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

Loading…
Cancel
Save