diff --git a/src/api/script.js b/src/api/script.js index 93bed7652..b4cc5e639 100644 --- a/src/api/script.js +++ b/src/api/script.js @@ -3,8 +3,8 @@ import request from '@/utils/request'; /** 分页查找上线的剧本*/ export function getScriptPageListOnline(params) { return request({ - // url: `/api/script/paging/online`, - url: `/api/script/paging/published`, + url: `/api/script/paging/online`, + // url: `/api/script/paging/published`, method: 'get', params: params }); diff --git a/src/api/trainingPlatform.js b/src/api/trainingPlatform.js index 0b9fe20be..d3cde2894 100644 --- a/src/api/trainingPlatform.js +++ b/src/api/trainingPlatform.js @@ -48,3 +48,12 @@ export function getSubSystemDetail(id) { method: 'get' }); } + +export function getMapSystemPageList(params) { + /** 分页查询地图系统 */ + return request({ + url: `/api/mapSystem`, + method: 'get', + params + }); +} diff --git a/src/i18n/langs/en/index.js b/src/i18n/langs/en/index.js index f55c5a908..6a41b8f3e 100644 --- a/src/i18n/langs/en/index.js +++ b/src/i18n/langs/en/index.js @@ -25,6 +25,7 @@ import trainRoom from './trainRoom'; import menu from './menu'; import ibp from './ibp'; import approval from './approval'; +import systemGenerate from './systemGenerate'; export default { ...enLocale, @@ -53,5 +54,6 @@ export default { trainRoom, menu, ibp, - approval + approval, + systemGenerate }; diff --git a/src/i18n/langs/en/systemGenerate.js b/src/i18n/langs/en/systemGenerate.js new file mode 100644 index 000000000..cd34967aa --- /dev/null +++ b/src/i18n/langs/en/systemGenerate.js @@ -0,0 +1,9 @@ +export default { + map: 'Map', + mapName: 'Map Name', + prdName: 'Product Name', + name: 'Name', + type: 'Type', + updateData: 'Modify', + generate: 'Generate' +}; diff --git a/src/i18n/langs/zh/index.js b/src/i18n/langs/zh/index.js index 50d8a0d1e..c84bf1120 100644 --- a/src/i18n/langs/zh/index.js +++ b/src/i18n/langs/zh/index.js @@ -25,6 +25,7 @@ import trainRoom from './trainRoom'; import menu from './menu'; import ibp from './ibp'; import approval from './approval'; +import systemGenerate from './systemGenerate'; export default { ...cnLocale, @@ -53,5 +54,6 @@ export default { trainRoom, menu, ibp, - approval + approval, + systemGenerate }; diff --git a/src/i18n/langs/zh/systemGenerate.js b/src/i18n/langs/zh/systemGenerate.js new file mode 100644 index 000000000..158981019 --- /dev/null +++ b/src/i18n/langs/zh/systemGenerate.js @@ -0,0 +1,9 @@ +export default { + map: '地图', + mapName: '地图名称', + prdName: '产品名称', + name: '名称', + type: '类型', + updateData: '更新', + generate: '生成' +}; diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index da8435267..2987f9ec9 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -103,7 +103,11 @@ export default { { enlabel: 'Pending review', label: '待审核', value: '1'}, { enlabel: 'Successfully released', label: '发布成功', value: '2'}, { enlabel: 'Overrule', label: '被驳回', value: '3'} + ], + productType: [ + { enlabel: 'Lesson System', label: '教学系统', value: 'Lesson'}, + { enlabel: 'Exam System', label: '考试系统', value: 'Exam'}, + { enlabel: 'Simulation System', label: '仿真系统', value: 'Simulation'} ] - } }; diff --git a/src/views/demonstration/detail/index.vue b/src/views/demonstration/detail/index.vue index faf587857..19fa1b091 100644 --- a/src/views/demonstration/detail/index.vue +++ b/src/views/demonstration/detail/index.vue @@ -102,7 +102,6 @@ export default { methods: { async loadInitData() { this.loading = true; - this.currentPrdCode = this.prodId; try { const resp = await getSubSystemDetail(this.$route.params.subSystem); this.tryUser = 0; @@ -119,6 +118,7 @@ export default { pmsList: resp.data.permissionList || [], PermissionType: PermissionType.SIMULATION }; + this.currentPrdCode = resp.data.mapPrd.code; if (resp.data.mapPrd.prdType === '03') { this.getJointTrainingList(); } diff --git a/src/views/display/menuExam.vue b/src/views/display/menuExam.vue index b2e7c7f52..51dfcf9c6 100644 --- a/src/views/display/menuExam.vue +++ b/src/views/display/menuExam.vue @@ -24,6 +24,7 @@ import { exitFullscreen } from '@/utils/screen'; import { timeFormat } from '@/utils/date'; import { refreshExamList, finishOneExamQuestion } from '@/api/management/userexam'; import { launchFullscreen } from '@/utils/screen'; +import { UrlConfig } from '@/router/index'; export default { name: 'MenuExam', @@ -124,7 +125,7 @@ export default { type: 'warning' }).then(() => { this.$emit('quit'); - this.$router.back(); + this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${this.$route.query.examId}`, query: { subSystem: this.$route.query.subSystem }}); Notification.closeAll(); exitFullscreen(); }).catch(() => { @@ -141,7 +142,7 @@ export default { }).catch(error => { // 如果时50009则表示考试已完成,不能再次进行y if (error.code === 500009) { - this.$router.replace({ path: `/trainingPlatform/result/${this.$route.params.userExamId}` }); + this.$router.replace({ path: `/trainingPlatform/result/${this.$route.params.userExamId}`, query: {subSystem: this.$route.query.subSystem} }); } else { this.$messageBox(this.$t('display.exam.refreshListError')); } diff --git a/src/views/display/tipExamList.vue b/src/views/display/tipExamList.vue index da7f989a6..ad55ebf76 100644 --- a/src/views/display/tipExamList.vue +++ b/src/views/display/tipExamList.vue @@ -5,7 +5,7 @@

- {{$t('display.exam.examTime')}} + {{ $t('display.exam.examTime') }} {{ formatRemainTime }}

@@ -38,12 +38,12 @@ {{ courseModel.name }}

- {{$t('display.exam.bestTime')}} - {{ courseModel.minDuration }} {{$t('display.seconds')}} + {{ $t('display.exam.bestTime') }} + {{ courseModel.minDuration }} {{ $t('display.seconds') }}

- {{$t('display.exam.maximumTime')}} - {{ courseModel.maxDuration }} {{$t('display.seconds')}} + {{ $t('display.exam.maximumTime') }} + {{ courseModel.maxDuration }} {{ $t('display.seconds') }}

{{ $t('display.exam.trainingInstructions') }} @@ -59,10 +59,10 @@ {{ $t('display.exam.submitExaminationPaper') }}

- {{$t('display.exam.submitExaminationPaper')}} + {{ $t('display.exam.submitExaminationPaper') }}

- {{$t('display.exam.examTime')}} + {{ $t('display.exam.examTime') }} {{ formatRemainTime }}

@@ -191,7 +191,7 @@ export default { }).catch(error => { // 如果时50009则表示考试已完成,不能再次进行y if (error.code === 500009) { - this.$router.replace({ path: `/exam/result/${this.$route.params.userExamId}` }); + this.$router.replace({ path: `/trainingPlatform/result/${this.$route.params.userExamId}`, query: { subSystem: this.$route.query.subSystem } }); } else { this.$messageBox(this.$t('display.exam.refreshListError')); @@ -233,7 +233,9 @@ export default { group: this.$route.query.group, userExamId: this.$route.query.userExamId, trainingId: obj.trainingId, - examQuestionId: obj.id + examQuestionId: obj.id, + subSystem: this.$route.query.subSystem, + examId: this.$route.query.examId }; this.$router.push({ path: '/display/exam', query: query }); this.$emit('refresh'); @@ -260,7 +262,7 @@ export default { exitFullscreen(); this.$store.dispatch('exam/over').then(() => { this.$store.dispatch('trainingList/clearTrainingList'); - this.$router.replace({ path: `/trainingPlatform/result/${this.$route.query.userExamId}` }); + this.$router.replace({ path: `/trainingPlatform/result/${this.$route.query.userExamId}`, query: {subSystem: this.$route.query.subSystem} }); }); }, shrink() { diff --git a/src/views/exam/detail/courseDetail.vue b/src/views/exam/detail/courseDetail.vue index 6e0d9ec97..f9dfee80e 100644 --- a/src/views/exam/detail/courseDetail.vue +++ b/src/views/exam/detail/courseDetail.vue @@ -102,8 +102,8 @@ export default { } }, watch: { - '$route.query.prodId': function (val) { - this.loadInitPage(val, this.$route.query.type); + '$route.params.subSystem': function (val) { + this.loadInitPage(); } }, mounted() { @@ -137,7 +137,7 @@ export default { this.loading = true; this.$router.push({ path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, - query: { permissionType: PermissionType.EXAM, lessonId: this.courseModel.id, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId,subSystem:this.$route.params.subSystem } + query: { permissionType: PermissionType.EXAM, lessonId: this.courseModel.id, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem } }); }, checkCourse() { @@ -162,10 +162,9 @@ export default { } }, clickEvent(obj, node, data) { - // setSessionStorage('trainingExamCheckId', obj.id); if (obj.type === 'Exam') { if (obj.valid) { - this.$router.push(`${UrlConfig.trainingPlatform.examDetail}/${obj.id}`); + this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${obj.id}`, query: { subSystem: this.$route.params.subSystem }}); } else { this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), { confirmButtonText: this.$t('tip.confirm'), diff --git a/src/views/exam/detail/examDetail.vue b/src/views/exam/detail/examDetail.vue index 5abc807d5..67dc2d424 100644 --- a/src/views/exam/detail/examDetail.vue +++ b/src/views/exam/detail/examDetail.vue @@ -44,7 +44,7 @@
{{ $t('exam.startTheExam') }} - {{ $t('global.back') }} + {{ $t('global.back') }}
@@ -155,7 +155,7 @@ export default { getPublishLessonDetail({ id: this.examDetails.lessonId }).then((res) => { this.$router.push({ path: `${UrlConfig.trainingPlatform.pay}/${this.examDetails.lessonId}`, - query: { permissionType: PermissionType.EXAM,lessonId: this.examDetails.lessonId,prdCode: res.data.prdCode, mapId: res.data.mapId } + query: { permissionType: PermissionType.EXAM, lessonId: this.examDetails.lessonId, prdCode: res.data.prdCode, mapId: res.data.mapId } }); }).catch(() => { this.$messageBox(this.$t('error.obtainCourseDetailsFailed')); @@ -200,7 +200,9 @@ export default { group: resp.data, trainingId: this.examList[0].trainingId, userExamId: this.userExam.id, - examQuestionId: this.examList[0].id + examQuestionId: this.examList[0].id, + subSystem: this.$route.query.subSystem, + examId: this.$route.params.examId }; this.$router.push({ path: `${UrlConfig.display}/exam`, query: query }); launchFullscreen(); @@ -212,9 +214,9 @@ export default { this.loading = false; } }, - back() { - this.$router.back(); - } + back() { + this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`}); + } } }; diff --git a/src/views/exam/result.vue b/src/views/exam/result.vue index bf148114b..f277c59db 100644 --- a/src/views/exam/result.vue +++ b/src/views/exam/result.vue @@ -118,7 +118,7 @@ export default { }, back() { const examId = this.resultModel.examId; - this.$router.push(`${UrlConfig.trainingPlatform.examDetail}/${examId}`); + this.$router.push({path: `${UrlConfig.trainingPlatform.examDetail}/${examId}`, query: { subSystem: this.$route.query.subSystem }}); } } }; diff --git a/src/views/jointTraining/index.vue b/src/views/jointTraining/index.vue index 3c4d2cf74..81fee4a96 100644 --- a/src/views/jointTraining/index.vue +++ b/src/views/jointTraining/index.vue @@ -121,7 +121,7 @@ export default { await this.$store.dispatch('training/over'); await runDiagramOver(this.group); await deljointTrainRoom(this.group); - await this.$router.push({ path: `/trainingPlatform/prodDetail/${this.mapId}` }); + await this.$router.push({ path: `/trainingPlatform/detail/${this.subSystem}`, query: {mapId: this.mapId} }); } }); }, @@ -149,6 +149,7 @@ export default { this.group = this.$route.query.group; this.mapId = this.$route.query.mapId; this.skinCode = this.$route.query.skinCode; + this.subSystem = this.$route.query.subSystem; Message.closeAll(); }, async mounted() { diff --git a/src/views/jointTraining/menuDemon.vue b/src/views/jointTraining/menuDemon.vue index 127776a62..a0847e377 100644 --- a/src/views/jointTraining/menuDemon.vue +++ b/src/views/jointTraining/menuDemon.vue @@ -298,7 +298,7 @@ export default { back() { this.$store.dispatch('training/over').then(() => { putJointTrainingSimulationUser(this.group).then(() => { - this.$router.push({ path: `/trainroom`, query: { group: this.group } }); + this.$router.push({ path: `/trainroom`, query: { skinCode: this.$route.query.skinCode, group: this.group, subSystem: this.$route.query.subSystem } }); exitFullscreen(); }); }); diff --git a/src/views/lesson/home.vue b/src/views/lesson/home.vue index 0bb09a0fa..31949755e 100644 --- a/src/views/lesson/home.vue +++ b/src/views/lesson/home.vue @@ -214,9 +214,9 @@ export default { }); }, createChapter(row) { - if (row.type === 'lesson') { + if (row.type === 'Lesson') { this.$router.push({path: `${UrlConfig.design.lessonEdit}/chapterCreate`, query: {lessonId: row.id}}); - } else if (row.type === 'chapter') { + } else if (row.type === 'Chapter') { this.$router.push( {path: `${UrlConfig.design.lessonEdit}/chapterEdit`, query: {id: row.id, lessonId: row.parentId}} ); } }, diff --git a/src/views/login/index.vue b/src/views/login/index.vue index c606c0188..1a553d0ff 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -54,7 +54,25 @@
{{ tipsMsg }}
- +
+ 自动登录 +
+ +
+ +
请在琏课堂小程序助手,完善个人信息,设置登录密码,手机号或邮箱。
+
+
无法登录?
+
+ + 登录 @@ -80,6 +98,7 @@ diff --git a/src/views/teach/detail/index.vue b/src/views/teach/detail/index.vue index bb90b6e09..baad8434a 100644 --- a/src/views/teach/detail/index.vue +++ b/src/views/teach/detail/index.vue @@ -22,14 +22,18 @@ highlight-current :default-expanded-keys="expandList" :span="22" - @node-click="clickEvent" @node-expand="nodeExpand" @node-collapse="nodeCollapse" > - +  {{ node.label }}  {{ node.label }} + + 开始实训 + 购买 + + @@ -124,6 +128,7 @@ export default { PermissionType: PermissionType.LESSON }; } + this.getExpandList(this.courseModel.id); }).catch(error => { this.$message.error(this.$t('tip.failedCourse') + ':' + error.message); }); @@ -143,7 +148,7 @@ export default { this.$refs.limitList.distribute(this.courseModel); } }, - clickEvent(obj, node, ele) { + /* clickEvent(obj, node, ele) { if (obj && obj.type==='Training') { if (obj.valid) { this.$router.push({ path: `${UrlConfig.trainingPlatform.practical}/${obj.id}/${this.courseModel.id}`}); @@ -156,7 +161,7 @@ export default { }).catch(() => { }); } } - }, + },*/ filterNode(value, data) { if (!value) return true; return data.name.indexOf(value) !== -1; @@ -175,7 +180,7 @@ export default { }, nodeCollapse(obj, node, ele) { const key = obj.id; - if (type === 'lesson') { + if (obj.type === 'Lesson') { this.expandList = []; } else { this.expandList = this.expandList.filter(item => item!==key); @@ -188,6 +193,20 @@ export default { if (expand instanceof Array) { this.expandList = expand; } + }, + startTraining(data) { + if (data && data.type==='Training') { + if (data.valid) { + this.$router.push({ path: `${UrlConfig.trainingPlatform.practical}/${data.id}/${this.courseModel.id}`}); + } else { + this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), { + confirmButtonText: this.$t('tip.confirm'), + cancelButtonText: this.$t('tip.cancel') + }).then(() => { + this.buy(); + }).catch(() => { }); + } + } } } }; @@ -210,4 +229,11 @@ export default { justify-content: center; transform: translateY(-20px); } + .custom-tree-node { + flex: 1; + display: flex; + align-items: center; + justify-content: space-between; + padding-right: 50px; + } diff --git a/src/views/teach/practical/index.vue b/src/views/teach/practical/index.vue index 611a684c3..f4221b80d 100644 --- a/src/views/teach/practical/index.vue +++ b/src/views/teach/practical/index.vue @@ -21,7 +21,7 @@
{{ $t('teach.startTraining') }} - {{ $t('global.back') }} + {{ $t('global.back') }}
@@ -98,9 +98,9 @@ export default { this.$messageBox(`${this.$t('tip.createSimulationFaild')} : ${error.message}`); }); }, - back() { - this.$router.back(); - } + back() { + this.$router.back(); + } } }; diff --git a/src/views/trainRoom/index.vue b/src/views/trainRoom/index.vue index e8dc80444..4ed75deda 100644 --- a/src/views/trainRoom/index.vue +++ b/src/views/trainRoom/index.vue @@ -465,7 +465,7 @@ export default { this.starting = true; await putJointTrainingSimulationEntrance(param.group); const rest = await getPublishMapInfo(param.mapId); - const query = { skinCode: rest.data.skinCode, mapId: param.mapId, group: param.group }; + const query = { skinCode: rest.data.skinCode, mapId: param.mapId, group: param.group, subSystem: this.$route.query.subSystem }; this.$router.push({ path: `/jointTraining`, query: query }); launchFullscreen(); } @@ -487,7 +487,7 @@ export default { this.loading = true; await putJointTrainingSimulationEntrance(this.$route.query.group); const rest = await getPublishMapInfo(this.mapId); - const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.$route.query.group }; + const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.$route.query.group, subSystem: this.$route.query.subSystem }; this.$router.push({ path: `/jointTraining`, query: query }); launchFullscreen(); }, diff --git a/src/views/trainingPlatform/demonList.vue b/src/views/trainingPlatform/demonList.vue index 7dfefe354..2e6be1f80 100644 --- a/src/views/trainingPlatform/demonList.vue +++ b/src/views/trainingPlatform/demonList.vue @@ -124,7 +124,7 @@ export default { this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${obj.id}`}); break; case 'Simulation': - this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}`); + this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`); this.$router.push({ path: `${UrlConfig.trainingPlatform.prodDetail}/${obj.id}`, query: { mapId: this.mapId}}); break; // case '运行图编制':