|
|
|
@ -1,6 +1,5 @@ |
|
|
|
|
import config from '@/config' |
|
|
|
|
import store from '@/store' |
|
|
|
|
|
|
|
|
|
const pad2 = str => ('0' + str).substr(-2) |
|
|
|
|
|
|
|
|
|
function fMoney (s, n) { |
|
|
|
@ -167,6 +166,27 @@ function toSubSystem(className = '',id = '',classId = ''){ |
|
|
|
|
sessionStorage.setItem("tmsTeachId",id);//考核id
|
|
|
|
|
sessionStorage.setItem("kdAssessmentId",id);//竞赛id
|
|
|
|
|
sessionStorage.setItem("classId",classId);//班级id
|
|
|
|
|
sessionStorage.setItem("userId",store.state.userId);//用户id
|
|
|
|
|
if(sessionStorage.getItem('id') != ''){ |
|
|
|
|
//如果班级id不为空,即为考核模式,否则为竞赛模式
|
|
|
|
|
let source = '' |
|
|
|
|
if(sessionStorage.getItem('classId') != ''){ |
|
|
|
|
sessionStorage.setItem("tmsTeachId",''); |
|
|
|
|
source = 1
|
|
|
|
|
}else{ |
|
|
|
|
sessionStorage.setItem("kdAssessmentId",''); |
|
|
|
|
source = 0 |
|
|
|
|
} |
|
|
|
|
let params = { |
|
|
|
|
id:sessionStorage.getItem('id'), |
|
|
|
|
source:source |
|
|
|
|
} |
|
|
|
|
this.$get(this.api.queryProjectIdAndPattenById,params).then(res => { |
|
|
|
|
let projectId = res.Info.projectId |
|
|
|
|
let pattern = res.Info.pattern |
|
|
|
|
sessionStorage.setItem("id",projectId) |
|
|
|
|
})
|
|
|
|
|
} |
|
|
|
|
location.href = config.subSystem |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|