|
|
@ -229,6 +229,42 @@ export default { |
|
|
|
submitType: false |
|
|
|
submitType: false |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
|
|
|
|
needSendSunc: function () { |
|
|
|
|
|
|
|
return this.sendSync; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 倒计时 |
|
|
|
|
|
|
|
second: function () { |
|
|
|
|
|
|
|
return this.num(this.seconds); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
minute: function () { |
|
|
|
|
|
|
|
return this.num(this.minutes); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
activeNames () { |
|
|
|
|
|
|
|
// 默认展开所有 |
|
|
|
|
|
|
|
return this.requires.map(item => item.id) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
watch: { |
|
|
|
|
|
|
|
countVal: { |
|
|
|
|
|
|
|
deep: true, |
|
|
|
|
|
|
|
handler: function (val, oldVal) { |
|
|
|
|
|
|
|
let vm = this; |
|
|
|
|
|
|
|
if (vm.needSendSunc) { |
|
|
|
|
|
|
|
vm.passToParent(val); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
needSendSunc: { |
|
|
|
|
|
|
|
deep: true, |
|
|
|
|
|
|
|
handler: function (val) { |
|
|
|
|
|
|
|
let vm = this; |
|
|
|
|
|
|
|
if (val) { |
|
|
|
|
|
|
|
vm.passToParent(vm.countString); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
created () { |
|
|
|
created () { |
|
|
|
let assessmentId = this.getQueryVariable('assessmentId') |
|
|
|
let assessmentId = this.getQueryVariable('assessmentId') |
|
|
|
sessionStorage.setItem('assessmentId', assessmentId) |
|
|
|
sessionStorage.setItem('assessmentId', assessmentId) |
|
|
@ -252,7 +288,6 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 提交 |
|
|
|
// 提交 |
|
|
|
this.sureSubmit(true) |
|
|
|
this.sureSubmit(true) |
|
|
|
} else { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, 4000) |
|
|
|
}, 4000) |
|
|
@ -261,69 +296,22 @@ export default { |
|
|
|
this.popContainer = data |
|
|
|
this.popContainer = data |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
|
|
|
|
countVal: { |
|
|
|
|
|
|
|
deep: true, |
|
|
|
|
|
|
|
handler: function (val, oldVal) { |
|
|
|
|
|
|
|
let vm = this; |
|
|
|
|
|
|
|
if (vm.needSendSunc) { |
|
|
|
|
|
|
|
vm.passToParent(val); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
needSendSunc: { |
|
|
|
|
|
|
|
deep: true, |
|
|
|
|
|
|
|
handler: function (val) { |
|
|
|
|
|
|
|
let vm = this; |
|
|
|
|
|
|
|
if (val) { |
|
|
|
|
|
|
|
vm.passToParent(vm.countString); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// caseVisible(newVal) { |
|
|
|
|
|
|
|
// if(!newVal) { |
|
|
|
|
|
|
|
// console.log(this.$refs.scrollTag) |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
computed: { |
|
|
|
|
|
|
|
needSendSunc: function () { |
|
|
|
|
|
|
|
return this.sendSync; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 倒计时 |
|
|
|
|
|
|
|
second: function () { |
|
|
|
|
|
|
|
return this.num(this.seconds); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
minute: function () { |
|
|
|
|
|
|
|
return this.num(this.minutes); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
activeNames () { |
|
|
|
|
|
|
|
// 默认展开所有 |
|
|
|
|
|
|
|
return this.requires.map(item => item.id) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
mounted () { |
|
|
|
mounted () { |
|
|
|
let token = sessionStorage.getItem('token') || this.getQueryVariable('token') |
|
|
|
let token = this.getParam('token') |
|
|
|
let cid = sessionStorage.getItem('cid') || this.getQueryVariable('cid') |
|
|
|
let cid = this.getParam('cid') |
|
|
|
let systemId = sessionStorage.getItem('systemId') || this.getQueryVariable('systemId') |
|
|
|
let systemId = this.getParam('systemId') |
|
|
|
let projectId = this.getQueryVariable('projectId') |
|
|
|
let projectId = this.getParam('projectId') |
|
|
|
if (sessionStorage.getItem('projectId')) { |
|
|
|
let assessmentId = this.getParam('assessmentId') |
|
|
|
projectId = sessionStorage.getItem('projectId') |
|
|
|
let competitionId = this.getParam('competitionId') |
|
|
|
} |
|
|
|
let stageId = this.getParam('stageId') |
|
|
|
let assessmentId = sessionStorage.getItem('assessmentId') || this.getQueryVariable('assessmentId') |
|
|
|
let teamId = this.getParam('teamId') |
|
|
|
let competitionId = sessionStorage.getItem('competitionId') || this.getQueryVariable('competitionId') |
|
|
|
let classId = this.getParam('classId') |
|
|
|
let stageId = sessionStorage.getItem('stageId') || this.getQueryVariable('stageId') |
|
|
|
let stopTime = this.getParam('stopTime') |
|
|
|
let teamId = sessionStorage.getItem('teamId') || this.getQueryVariable('teamId') |
|
|
|
let mallId = this.getParam('mallId') |
|
|
|
let classId = sessionStorage.getItem('classId') || this.getQueryVariable('classId') |
|
|
|
let timestamp = +stopTime |
|
|
|
let stopTime = sessionStorage.getItem('stopTime') || this.getQueryVariable('stopTime') |
|
|
|
timestamp || sessionStorage.removeItem('timestamp') |
|
|
|
let mallId = sessionStorage.getItem('mallId') || this.getQueryVariable('mallId') |
|
|
|
|
|
|
|
let timestamp = +stopTime; |
|
|
|
if (token) { |
|
|
|
if (timestamp != null) { |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
sessionStorage.setItem('timestamp', 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) |
|
|
@ -335,21 +323,20 @@ export default { |
|
|
|
sessionStorage.setItem('teamId', teamId) |
|
|
|
sessionStorage.setItem('teamId', teamId) |
|
|
|
sessionStorage.setItem('classId', classId) |
|
|
|
sessionStorage.setItem('classId', classId) |
|
|
|
this.assessmentId = assessmentId |
|
|
|
this.assessmentId = assessmentId |
|
|
|
this.competitionId = JSON.parse(competitionId) |
|
|
|
this.competitionId = competitionId |
|
|
|
this.stageId = stageId |
|
|
|
this.stageId = stageId |
|
|
|
this.teamId = teamId |
|
|
|
this.teamId = teamId |
|
|
|
this.classId = classId |
|
|
|
this.classId = classId |
|
|
|
this.mallId = mallId |
|
|
|
this.mallId = mallId |
|
|
|
} |
|
|
|
} |
|
|
|
let tokens = sessionStorage.getItem('token') |
|
|
|
if (token) { |
|
|
|
if (tokens || token) { |
|
|
|
|
|
|
|
this.projectPermissions = this.assessmentId ? |
|
|
|
this.projectPermissions = this.assessmentId ? |
|
|
|
1 : |
|
|
|
1 : |
|
|
|
this.competitionId ? |
|
|
|
this.competitionId ? |
|
|
|
2 : |
|
|
|
2 : |
|
|
|
0 |
|
|
|
0 |
|
|
|
this.assessmentId && this.projectId && this.checkVer() |
|
|
|
this.assessmentId && this.projectId && this.checkVer() |
|
|
|
if (JSON.parse(assessmentId != null && assessmentId != '' && assessmentId != 'null' || this.competitionId)) { |
|
|
|
if (assessmentId || this.competitionId) { |
|
|
|
this.selectProjects({ |
|
|
|
this.selectProjects({ |
|
|
|
projectId |
|
|
|
projectId |
|
|
|
}) |
|
|
|
}) |
|
|
@ -411,6 +398,11 @@ export default { |
|
|
|
this.toggleCase() |
|
|
|
this.toggleCase() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取参数 |
|
|
|
|
|
|
|
getParam (field) { |
|
|
|
|
|
|
|
const s = sessionStorage.getItem(field) |
|
|
|
|
|
|
|
return s !== 'null' && s !== 'undefined' && s ? s : this.getQueryVariable(field) |
|
|
|
|
|
|
|
}, |
|
|
|
getQueryVariable (name) { |
|
|
|
getQueryVariable (name) { |
|
|
|
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)') |
|
|
|
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)') |
|
|
|
if (window.location.href.split('?')[1]) { |
|
|
|
if (window.location.href.split('?')[1]) { |
|
|
@ -421,20 +413,6 @@ export default { |
|
|
|
return null |
|
|
|
return null |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// if(sessionStorage.getItem(name)) { |
|
|
|
|
|
|
|
// return sessionStorage.getItem(name) |
|
|
|
|
|
|
|
// }else { |
|
|
|
|
|
|
|
// var reg = new RegExp('(^|&)'+name+'=([^&]*)(&|$)') |
|
|
|
|
|
|
|
// if(window.location.href.split('?')[1]){ |
|
|
|
|
|
|
|
// var r = window.location.href.split('?')[1].match(reg) |
|
|
|
|
|
|
|
// if (r != null){ |
|
|
|
|
|
|
|
// return (r[2]) |
|
|
|
|
|
|
|
// }else{ |
|
|
|
|
|
|
|
// return null |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
//获取项目列表 |
|
|
|
//获取项目列表 |
|
|
|
getData () { |
|
|
|
getData () { |
|
|
@ -549,6 +527,7 @@ export default { |
|
|
|
this.selectProjects(params) |
|
|
|
this.selectProjects(params) |
|
|
|
}, |
|
|
|
}, |
|
|
|
selectProjects (params) { |
|
|
|
selectProjects (params) { |
|
|
|
|
|
|
|
console.log("🚀 ~ selectProjects ~ params:", params) |
|
|
|
getProjectDetail(params).then((data) => { |
|
|
|
getProjectDetail(params).then((data) => { |
|
|
|
if (data.status == 200) { |
|
|
|
if (data.status == 200) { |
|
|
|
this.globalTimer = ""; |
|
|
|
this.globalTimer = ""; |
|
|
@ -601,6 +580,7 @@ export default { |
|
|
|
sessionStorage.removeItem('submited', 0) |
|
|
|
sessionStorage.removeItem('submited', 0) |
|
|
|
sessionStorage.removeItem('firstLoad2') |
|
|
|
sessionStorage.removeItem('firstLoad2') |
|
|
|
this.setBusinessKey('') |
|
|
|
this.setBusinessKey('') |
|
|
|
|
|
|
|
console.log("🚀 ~ getProjectDetail ~ params:", params) |
|
|
|
getProjectDetail(params).then((data) => { |
|
|
|
getProjectDetail(params).then((data) => { |
|
|
|
if (data.status == 200) { |
|
|
|
if (data.status == 200) { |
|
|
|
const { systemId, projectId } = data.data.projectManage |
|
|
|
const { systemId, projectId } = data.data.projectManage |
|
|
|