diff --git a/src/router/index.js b/src/router/index.js index ef25a6984..be7ebd757 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -49,10 +49,10 @@ import TeachDetail from '@/views/teach/detail/index'; import TeachHome from '@/views/teach/index'; import Pay from '@/views/components/pay/index'; -import ExamDetail from '@/views/exam/detail/examDetail'; import ExamHome from '@/views/exam/index'; -import ExamCourseDetail from '@/views/exam/detail/courseDetail'; import ExamResult from '@/views/exam/result'; +import ExamDetail from '@/views/exam/detail/examDetail'; +import ExamCourseDetail from '@/views/exam/detail/courseDetail'; import DemonstrationDetail from '@/views/demonstration/detail/index'; diff --git a/src/views/approval/lesson/detail.vue b/src/views/approval/lesson/detail.vue index f17d8e1b8..36c23b7c2 100644 --- a/src/views/approval/lesson/detail.vue +++ b/src/views/approval/lesson/detail.vue @@ -49,53 +49,53 @@ import {reviewLessonDetail} from '@/api/designPlatform'; export default { - name: 'LessonApprovalDetail', - components: { + name: 'LessonApprovalDetail', + components: { - }, - data() { - return { - loading: false, - tableData: [], - lessonName: '', - lessonRemark: '', - showDetail: false - }; - }, - computed: { - height() { - return this.$store.state.app.height - 260; - } - }, - watch: { + }, + data() { + return { + loading: false, + tableData: [], + lessonName: '', + lessonRemark: '', + showDetail: false + }; + }, + computed: { + height() { + return this.$store.state.app.height - 260; + } + }, + watch: { - }, - created() { - }, - mounted() { - // this.loadInitData(); - }, - beforeDestroy() { + }, + created() { + }, + mounted() { + // this.loadInitData(); + }, + beforeDestroy() { - }, - methods: { - show(lessonId) { - this.showDetail = true; - this.loadInitData(lessonId); - }, - loadInitData(lessonId) { - this.loading =true; - reviewLessonDetail(lessonId).then(response =>{ - this.tableData = response.data[0].children; - this.lessonName = response.data[0].name; - this.lessonRemark = response.data[0].remarks; - this.loading = false; - }).catch(()=>{ - this.$messageBox(this.$t('approval.failedToGetCourseData')); - }); - }, - doClose() { - } - } + }, + methods: { + show(lessonId) { + this.showDetail = true; + this.loadInitData(lessonId); + }, + loadInitData(lessonId) { + this.loading = true; + reviewLessonDetail(lessonId).then(response =>{ + this.tableData = response.data[0].children; + this.lessonName = response.data[0].name; + this.lessonRemark = response.data[0].remarks; + this.loading = false; + }).catch(()=>{ + this.$messageBox(this.$t('approval.failedToGetCourseData')); + }); + }, + doClose() { + } + } }; diff --git a/src/views/exam/detail/examDetail.vue b/src/views/exam/detail/examDetail.vue index 706485a61..8656fb526 100644 --- a/src/views/exam/detail/examDetail.vue +++ b/src/views/exam/detail/examDetail.vue @@ -58,6 +58,7 @@ import { getDetailList } from '@/api/management/dictionary'; import { mapGetters } from 'vuex'; import { launchFullscreen } from '@/utils/screen'; import { UrlConfig } from '@/router/index'; +import LangStorage from '@/utils/lang'; export default { name: 'ExamDetailView', @@ -84,10 +85,7 @@ export default { computed: { ...mapGetters('trainingList', [ 'trainingList' - ]), - height() { - return this.$store.state.app.height - 50; - } + ]) }, watch: { '$route.params.examId': function (val) { @@ -125,6 +123,36 @@ export default { this.typeList = []; await getDetailList('training_type').then(res => { this.typeList = res.data; + if (LangStorage.getLang() == 'en') { + this.typeList.forEach(item => { + switch (item.code) { + case '01': + item.name = 'Control permission operation'; + break; + case '02': + item.name = 'Signalling machine operation'; + break; + case '03': + item.name = 'Turnout operation'; + break; + case '04': + item.name = 'Section operation'; + break; + case '05': + item.name = 'Platform operation'; + break; + case '06': + item.name = 'Train scheduling operation'; + break; + case '07': + item.name = 'Train operation'; + break; + case '08': + item.name = 'Temporary speed limit operation of the whole line'; + break; + } + }); + } }); }, async loadInitPage(examId) { diff --git a/src/views/exam/index.vue b/src/views/exam/index.vue index f04d75329..fb7f988c2 100644 --- a/src/views/exam/index.vue +++ b/src/views/exam/index.vue @@ -6,23 +6,10 @@ - - - - + + + +