diff --git a/src/components/common/Studentcommon/FictitiousList.vue b/src/components/common/Studentcommon/FictitiousList.vue index 635c58a..21a7d80 100644 --- a/src/components/common/Studentcommon/FictitiousList.vue +++ b/src/components/common/Studentcommon/FictitiousList.vue @@ -33,6 +33,7 @@ export default { data() { return { + pattern: Number(this.$store.state.pattern), totals: 0, tableData: [], userId: this.$store.state.userId, @@ -41,6 +42,7 @@ export default { }; }, created() { + console.log(11,this.$route) this.getData(); }, methods: { @@ -61,7 +63,8 @@ export default { page: this.pageNo, size: this.pageSize, source: 0, - systemId: 3 + systemId: 3, + pattern: this.pattern }) .then(res => { let data = res.data diff --git a/src/components/common/Studentcommon/TeachingList.vue b/src/components/common/Studentcommon/TeachingList.vue index f6c5b42..bd21723 100644 --- a/src/components/common/Studentcommon/TeachingList.vue +++ b/src/components/common/Studentcommon/TeachingList.vue @@ -45,6 +45,7 @@ export default { data() { return { + pattern: Number(this.$store.state.pattern), totals: 0, tableData: [], userId: this.$store.state.userId, @@ -91,7 +92,8 @@ export default { size: this.pageSize, searchContent: this.core.encodeString(this.searchContent), source: 2, - systemId: 3 + systemId: 3, + pattern: this.pattern }) .then(res => { let data = res.data diff --git a/src/components/common/Studentcommon/competitionList.vue b/src/components/common/Studentcommon/competitionList.vue index c76964d..281fc8f 100644 --- a/src/components/common/Studentcommon/competitionList.vue +++ b/src/components/common/Studentcommon/competitionList.vue @@ -35,6 +35,7 @@ export default { data() { return { + pattern: Number(this.$store.state.pattern), totals: 0, tableData: [], userId: this.$store.state.userId, @@ -63,7 +64,8 @@ export default { page: this.pageNo, size: this.pageSize, source: 1, - systemId: 3 + systemId: 3, + pattern: this.pattern }) .then(res => { let data = res.data diff --git a/src/components/page/Assessment.vue b/src/components/page/Assessment.vue index b535cc6..68317ad 100644 --- a/src/components/page/Assessment.vue +++ b/src/components/page/Assessment.vue @@ -98,6 +98,7 @@ export default { name: 'project', data() { return { + pattern: Number(this.$store.state.pattern), userId: this.$store.state.userId, roleId: this.$store.state.accountRole, name: sessionStorage.getItem('ms_username'), @@ -145,6 +146,7 @@ export default { } }, mounted() { + console.log(22,this.pattern) this.getClass() this.getData() this.timer = setInterval(this.getData,1000) @@ -165,6 +167,7 @@ export default { status: this.form.status, pageNum: 1, pageSize: 10000, + pattern: this.pattern } this.$post(this.api.stuAssessmentByScreen,data).then(res => { let list = res.list.list diff --git a/src/components/page/Dashboard.vue b/src/components/page/Dashboard.vue index 4184b5b..3e0369e 100644 --- a/src/components/page/Dashboard.vue +++ b/src/components/page/Dashboard.vue @@ -151,7 +151,7 @@ export default { } }, mounted() { - this.getClass() + // this.getClass() this.addDefault() this.$once('hook:beforeDestroy', function () { clearInterval(this.timer) @@ -200,7 +200,7 @@ export default { if(hash == this.routeName){ location.hash = `${hash}#0` }else{ - let index = hash.replace(`${this.routeName}#`,'') + let index = hash.replace(`${this.routeName}#`,'').replace(/\?pattern=\d/,'') this.activeName = this.tabNameList[index] if(index == 3 && !isIndex){ diff --git a/src/components/page/Project.vue b/src/components/page/Project.vue index 61e69ed..64351a1 100644 --- a/src/components/page/Project.vue +++ b/src/components/page/Project.vue @@ -106,6 +106,7 @@ export default { name: 'project', data() { return { + pattern: Number(this.$store.state.pattern), userId: this.$store.state.userId, schoolId: this.$store.state.schoolId, name: sessionStorage.getItem('ms_username'), @@ -210,7 +211,8 @@ export default { page: this.pageNo, size: this.pageSize, rowId: '', - projectId: '' + projectId: '', + pattern: this.pattern } this.$get(this.api.userRecord,data).then(res => { diff --git a/src/components/page/ProjectIntro.vue b/src/components/page/ProjectIntro.vue index 2715258..7d49a6a 100644 --- a/src/components/page/ProjectIntro.vue +++ b/src/components/page/ProjectIntro.vue @@ -46,7 +46,7 @@ export default { this.$router.push('dashboard#1') }, toNext(index) { - this.$router.push(`ProjectPattern?type=${index}`) + this.$router.push(`ProjectPattern?pattern=${index}`) }, }, }; diff --git a/src/components/page/ProjectPattern.vue b/src/components/page/ProjectPattern.vue index 4cf4a74..fa2cea0 100644 --- a/src/components/page/ProjectPattern.vue +++ b/src/components/page/ProjectPattern.vue @@ -2,25 +2,25 @@
- {{projectList[patternId].title}} + {{projectList[pattern].title}}
实验原理:
- {{projectList[patternId].principle}} + {{projectList[pattern].principle}}
实验步骤:
- {{projectList[patternId].step}} + {{projectList[pattern].step}}
实验准备:
- {{projectList[patternId].prepare}} + {{projectList[pattern].prepare}}
@@ -46,7 +46,7 @@ export default { data() { return { - patternId:1, + pattern: this.$route.query.pattern, projectList:[{ title:'期权套期保值实验', principle:'本实验根据《期货、期权及其它衍生品》等理论课程的大纲要求,将期权基础知识考核、期权实战规则、模拟开户和期权策略设计等内容融会贯通于十个步骤,考察学生利用期权策略减少价格波动对企业经营影响的能力。', @@ -66,6 +66,7 @@ export default { }, methods: { toNext(index) { + this.$store.commit("patternData",{pattern: this.pattern}); this.$router.push(`dashboard#${index}`) }, }, diff --git a/src/store/index.js b/src/store/index.js index 3dafac7..09c4d01 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -29,6 +29,7 @@ const store = new Vuex.Store({ studentId: '', answerHistory: [], dataTime: '', + pattern: 0 }, mutations:{ courseIdData(state,payload){ @@ -92,6 +93,9 @@ const store = new Vuex.Store({ answerHistoryData (state, payload) { state.answerHistory = payload.answerHistory }, + patternData (state, payload) { + state.pattern = payload.pattern + }, } });