diff --git a/src/router/index.js b/src/router/index.js index 03a46f75a..e7a4c0a99 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -118,6 +118,7 @@ const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew'); const BigScreen = () => import('@/views/designPlatform/bigScreen'); const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen'); const TrainingDesign = () => import('@/views/designPlatform/trainingDesign'); +const TrainingPreview = () => import('@/views/designPlatform/trainingPreview'); const TestRunplan = () => import('@/views/designPlatform/testRunplan'); const Package = () => import('@/views/package/index'); @@ -485,6 +486,11 @@ export const publicAsyncRoute = [ component: TrainingDesign, hidden: true }, + { + path: '/trainingPreview', + component: TrainingPreview, + hidden: true + }, { path: '/jointTrainingNew', component: JointTrainingNew, diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue index db764c81c..9cd295265 100644 --- a/src/views/designPlatform/demonList.vue +++ b/src/views/designPlatform/demonList.vue @@ -93,6 +93,7 @@ export default { } }, clickEvent(obj, data, ele) { + console.log(obj.type, '----------'); switch (obj.type) { case 'scriptDesign': { const query = {lineCode:obj.lineCode}; @@ -147,6 +148,19 @@ export default { }); break; } + case 'trainingPreview': { + const data = { mapId: obj.mapId, prdType: '01' }; + createSimulationNew(data).then(resp => { + if (this.loadingProjectList.includes(this.project)) { + this.$store.dispatch('app/transitionAnimations'); + } + const query = { ...data, group: resp.data, scriptId: obj.id, lineCode:obj.lineCode}; + this.$router.push({ path: `/trainingPreview`, query }); + }).catch(error => { + this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`); + }); + break; + } } }, async refresh(filterSelect) { @@ -230,7 +244,16 @@ export default { cityCode: elem.cityCode } ); - + elem.children.push( + { + id: '10', + name: '实训预览', + type: 'trainingPreview', + mapId: elem.id, + lineCode: elem.lineCode, + cityCode: elem.cityCode + } + ); }); this.treeData = res.data; diff --git a/src/views/designPlatform/leftSlider.vue b/src/views/designPlatform/leftSlider.vue new file mode 100644 index 000000000..e8fb5dd57 --- /dev/null +++ b/src/views/designPlatform/leftSlider.vue @@ -0,0 +1,158 @@ + + + + + {{ $t('display.lesson.coursePracticeList') }} + + + + + 实训列表 + + 实训列表 + + + + + + + {{ node.data.name }} + {{ node.data.name }} + {{ node.data.name }} + + + + + + + + + + diff --git a/src/views/designPlatform/tipTrainingDetail.vue b/src/views/designPlatform/tipTrainingDetail.vue new file mode 100644 index 000000000..02da179fb --- /dev/null +++ b/src/views/designPlatform/tipTrainingDetail.vue @@ -0,0 +1,305 @@ + + + + + + + + + {{ lessonName }} + + + + + + + + + {{ $t('display.training.trainingName') }} + {{ courseModel.name }} + + + + {{ $t('display.training.trainingInstructions') }} + {{ courseModel.remarks }} + + + 当前操作: + {{ courseModel.minDuration }} + + + + + + + + + + + + + + + + diff --git a/src/views/designPlatform/trainingPreview.vue b/src/views/designPlatform/trainingPreview.vue new file mode 100644 index 000000000..ebc401f9a --- /dev/null +++ b/src/views/designPlatform/trainingPreview.vue @@ -0,0 +1,186 @@ + + + + + + + + + + + + 返回 + + + + + +
+ {{ lessonName }} +
+ {{ $t('display.training.trainingName') }} + {{ courseModel.name }} +
+ {{ $t('display.training.trainingInstructions') }} + {{ courseModel.remarks }} +
+ 当前操作: + {{ courseModel.minDuration }} +