diff --git a/src/api/runplan.js b/src/api/runplan.js index 9cb7a336b..78c765766 100644 --- a/src/api/runplan.js +++ b/src/api/runplan.js @@ -21,10 +21,10 @@ export function getStationList(mapId) { }); } -// 创建通用运行图 -export function createRunPlan(mapId, data) { +// 运行图填充通用数据 +export function populatingGenericData(planId, data) { return request({ - url: `/api/runPlan/draft/${mapId}`, + url: `/api/runPlan/draft/${planId}`, method: 'post', data: data }); diff --git a/src/router/index_Common.js b/src/router/index_Common.js index 83e8d889b..47905a8ca 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -355,8 +355,33 @@ export const publicAsyncRoute = [ ] }, { - path: '/device/runPlan', - component: PlanMonitorDetail, + path: '/device/teachDetail', + component: TeachDetail, + hidden: true + }, + { + path: '/device/course', + component: ExamCourseDetail, + hidden: true + }, + { + path: '/device/examRule/manage', + component: PublishExamRule, + hidden: true + }, + { + path: '/device/examRule/draft/:mode/:ruleId/:lessonId', + component: PublishExamRuleDraft, + hidden: true + }, + { // 试卷详情 + path: '/device/exam/:examId', + component: ExamDetail, + hidden: true + }, + { // 考试结果 + path: '/device/result/:userExamId', + component: ExamResult, hidden: true } ]; diff --git a/src/scripts/ConstDic.js b/src/scripts/ConstDic.js index 8fd40f917..af6e2513e 100644 --- a/src/scripts/ConstDic.js +++ b/src/scripts/ConstDic.js @@ -2236,6 +2236,7 @@ export const UrlConfig = { practiceDisplayNew:'/practiceDisplayNew', examRuleDraft: '/examRule/draft', examRuleManage: '/examRule/manage', + examDetail: '/exam', lesson: { prefix: '/lesson', record: '/system/record/training', diff --git a/src/views/exam/detail/courseDetail.vue b/src/views/exam/detail/courseDetail.vue index bf2216077..f8f5f8b60 100644 --- a/src/views/exam/detail/courseDetail.vue +++ b/src/views/exam/detail/courseDetail.vue @@ -50,7 +50,7 @@ {{ $t('exam.buy') }} {{ $t('exam.distributePermission') }} {{ $t('exam.viewCoursePapers') }} - {{ $t('exam.returnCourseList') }} + {{ $t('exam.returnCourseList') }} @@ -171,9 +171,11 @@ export default { checkCourse() { this.loading = true; if (this.isAddRule) { + const path = `${this.$route.path.match(/(\/.*)\/course/)[1]}${UrlConfig.examRuleManage}`; this.$router.push({ - path: `${UrlConfig.trainingPlatform.examRuleManage}`, - query: { lessonId: this.courseModel.id } + path: path, + query: { lessonId: this.courseModel.id }, + noPreLogout: this.$route.query.noPreLogout }); } else { this.$messageBox(this.$t('tip.notViewTheCoursePaper')); @@ -195,8 +197,9 @@ export default { }, 100); }, clickEvent(obj) { + const path = `${this.$route.path.match(/(\/.*)\/course/)[1]}${UrlConfig.examDetail}`; if (this.valid || obj.trial) { - this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${obj.id}`, query: { subSystem: this.$route.params.subSystem, mapId: this.courseModel.mapId }}); + this.$router.push({ path: `${path}/${obj.id}`, query: { subSystem: this.$route.params.subSystem, mapId: this.courseModel.mapId, noPreLogout: this.$route.query.noPreLogout }}); } else { this.confirmToBuy(); } diff --git a/src/views/exam/detail/examDetail.vue b/src/views/exam/detail/examDetail.vue index 7f6e959a7..29b2f1ea5 100644 --- a/src/views/exam/detail/examDetail.vue +++ b/src/views/exam/detail/examDetail.vue @@ -250,7 +250,8 @@ export default { subSystem: this.$route.query.subSystem, examId: this.$route.params.examId, mapId: this.$route.query.mapId, - lineCode: this.lineCode + lineCode: this.lineCode, + noPreLogout: this.$route.query.noPreLogout }; this.$router.push({ path: `${UrlConfig.display}/exam`, query: query }); launchFullscreen(); @@ -268,7 +269,8 @@ export default { subSystem: this.$route.query.subSystem, examId: this.$route.params.examId, mapId: this.$route.query.mapId, - lineCode: this.lineCode + lineCode: this.lineCode, + noPreLogout: this.$route.query.noPreLogout }; this.$router.push({ path: `${UrlConfig.displayNew}/exam`, query: query }); launchFullscreen(); @@ -283,7 +285,11 @@ export default { back() { this.disabled = true; setTimeout(() => { - this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`, query: {lessonId: this.examDetails.lessonId}}); + if (this.$route.query.subSystem) { + this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`, query: {lessonId: this.examDetails.lessonId}}); + } else { + this.$router.push({ path: '/device/examDetail', query: {lessonId: this.examDetails.lessonId, noPreLogout: this.$route.query.noPreLogout}}); + } }, 100); } } diff --git a/src/views/exam/result.vue b/src/views/exam/result.vue index 2ae9a3995..9bdc100df 100644 --- a/src/views/exam/result.vue +++ b/src/views/exam/result.vue @@ -109,7 +109,8 @@ export default { }, back() { const examId = this.resultModel.examId; - this.$router.push({path: `${UrlConfig.trainingPlatform.examDetail}/${examId}`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId }}); + const path = `${this.$route.path.match(/(\/.*)\/result/)[1]}${UrlConfig.examDetail}`; + this.$router.push({path: `${path}/${examId}`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, noPreLogout: this.$route.query.noPreLogout }}); } } }; diff --git a/src/views/newMap/displayNew/LeftSlider.vue b/src/views/newMap/displayNew/LeftSlider.vue index 7e5054adf..4c3c6efe4 100644 --- a/src/views/newMap/displayNew/LeftSlider.vue +++ b/src/views/newMap/displayNew/LeftSlider.vue @@ -92,7 +92,7 @@ export default { this.disabled = true; trainingNotifyNew({ trainingId: obj.id }).then(resp => { const query = { - group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.$route.query.mapId, lineCode:this.$route.query.lineCode + group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.$route.query.mapId, lineCode:this.$route.query.lineCode, noPreLogout: this.$route.query.noPreLogout }; this.$router.replace({ path: `${UrlConfig.displayNew}/teach`, query: query }); launchFullscreen(); diff --git a/src/views/newMap/displayNew/demon/runPlanEdit.vue b/src/views/newMap/displayNew/demon/runPlanEdit.vue new file mode 100644 index 000000000..b89d6b9cd --- /dev/null +++ b/src/views/newMap/displayNew/demon/runPlanEdit.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/src/views/newMap/displayNew/menuSchema.vue b/src/views/newMap/displayNew/menuSchema.vue index 58f029548..6aed23b89 100644 --- a/src/views/newMap/displayNew/menuSchema.vue +++ b/src/views/newMap/displayNew/menuSchema.vue @@ -15,6 +15,7 @@ {{ $t('display.schema.previewRunDiagram') }} {{ $t('display.schema.loadRunDiagram') }} + 运行图编辑 自动故障设置 {{ faultMode?'切换到普通模式':'切换到故障模式' }} @@ -26,6 +27,7 @@ + \ No newline at end of file + diff --git a/src/views/planMonitor/editTool/schedule.vue b/src/views/planMonitor/editTool/schedule.vue index 396f87653..04761d1ea 100644 --- a/src/views/planMonitor/editTool/schedule.vue +++ b/src/views/planMonitor/editTool/schedule.vue @@ -48,6 +48,18 @@ export default { maxHeight: { type: Number, required: true + }, + loadRunPlanId: { + type: String, + default() { + return ''; + } + }, + loadRunPlanName: { + type: String, + default() { + return ''; + } } }, data() { @@ -237,6 +249,9 @@ export default { this.$nextTick(() => { this.loadChartPage(); }); + }, + loadRunPlanId() { + this.loadChartPage(); } }, mounted() { @@ -371,11 +386,11 @@ export default { try { if (/^\/plan\/usertool/.test(this.$route.fullPath)) { getUserMapDetailByMapId(this.$route.query.mapId).then(resp => { - this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`; + this.mapName = `${resp.data.name} (${this.$route.query.planName || this.loadRunPlanName || ''})`; }); } else { getPublishMapInfo(this.$route.query.mapId).then(resp => { - this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`; + this.mapName = `${resp.data.name} (${this.$route.query.planName || this.loadRunPlanName || ''})`; }); } @@ -390,8 +405,8 @@ export default { const stationList = res.stationList.sort((a, b)=>{ return a.kmRange - b.kmRange; }); this.$store.dispatch('runPlan/setStations', stationList).then(() => { this.loadInitData(); - if (this.planId) { - getRpDetailByUserMapId(this.planId).then(rest => { + if (this.planId || this.loadRunPlanId) { + getRpDetailByUserMapId(this.planId || this.loadRunPlanId).then(rest => { this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => { this.analyticalServiceNumber(this.$store.state.runPlan.editData); this.loadChartData(); @@ -410,9 +425,9 @@ export default { getStationList(this.$route.query.mapId).then(resp => { this.$store.dispatch('runPlan/setStations', resp.data).then(() => { this.loadInitData(); - if (this.planId) { + if (this.planId || this.loadRunPlanId) { this.myChart && this.myChart.showLoading(); - queryRunPlan(this.planId).then(rest => { + queryRunPlan(this.planId || this.loadRunPlanId).then(rest => { this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => { this.analyticalServiceNumber(this.$store.state.runPlan.editData); this.loadChartData(); @@ -533,7 +548,7 @@ export default { if (this.myChart && this.myChart.isDisposed) { this.myChart.clear(); } - if (this.$route.query.planName) { + if (this.$route.query.planName || this.$route.query.prdType === '05') { this.option.title.text = this.mapName; } this.myChart = echarts.init(document.getElementById(this.runPlanId)); @@ -545,6 +560,18 @@ export default { } }); }, + refreshRunPlanName(name) { + getPublishMapInfo(this.$route.query.mapId).then(resp => { + this.mapName = `${resp.data.name} (${name})`; + this.myChart.setOption({ + title: { + text: this.mapName, + left: 'center', // 居中对齐 + top: '10px' + } + }); + }); + }, clearCanvas() { this.option.series = []; this.option.title.text = ''; diff --git a/src/views/planMonitor/editTool/userindex.vue b/src/views/planMonitor/editTool/userindex.vue index 46265770f..1fd5355bc 100644 --- a/src/views/planMonitor/editTool/userindex.vue +++ b/src/views/planMonitor/editTool/userindex.vue @@ -59,7 +59,7 @@ import SystermOut from './menus/systermOut'; // import AddSmoothRunTime from './menus/addSmoothRunTime'; // import EditSmoothRunTime from './menus/editSmoothRunTime'; // import ModifyingStationIntervalTime from './menus/modifyingStationIntervalTime'; -// import { deletePlanService } from '@/api/runplan'; +import { deletePlanService } from '@/api/runplan'; export default { name: 'Menus', diff --git a/src/views/publish/examRule/draft/index.vue b/src/views/publish/examRule/draft/index.vue index 4817a3d31..d7c637665 100644 --- a/src/views/publish/examRule/draft/index.vue +++ b/src/views/publish/examRule/draft/index.vue @@ -153,9 +153,9 @@ export default { const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleManage}`; const lessonId = this.$route.params.lessonId; if (parseInt(lessonId)) { - this.$router.push({ path: `${path}`, query: { lessonId: lessonId } }); + this.$router.push({ path: `${path}`, query: { lessonId: lessonId, noPreLogout: this.$route.query.noPreLogout } }); } else { - this.$router.push({ path: `${path}` }); + this.$router.push({ path: `${path}`, query: { noPreLogout: this.$route.query.noPreLogout } }); } } catch (error) { if (error) { diff --git a/src/views/publish/examRule/draft/rule.vue b/src/views/publish/examRule/draft/rule.vue index d076d8a49..bd4363744 100644 --- a/src/views/publish/examRule/draft/rule.vue +++ b/src/views/publish/examRule/draft/rule.vue @@ -207,9 +207,9 @@ export default { const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleManage}`; const lessonId = this.$route.params.lessonId; if (parseInt(lessonId)) { - this.$router.push({ path: `${path}`, query: { lessonId: lessonId } }); + this.$router.push({ path: `${path}`, query: { lessonId: lessonId, noPreLogout: this.$route.query.noPreLogout } }); } else { - this.$router.push({ path: `${path}` }); + this.$router.push({ path: `${path}`, query: {noPreLogout: this.$route.query.noPreLogout} }); } } catch (error) { if (error) { diff --git a/src/views/publish/examRule/index.vue b/src/views/publish/examRule/index.vue index f4b29cfb1..c5ee79758 100644 --- a/src/views/publish/examRule/index.vue +++ b/src/views/publish/examRule/index.vue @@ -209,17 +209,17 @@ export default { handleNormalAdd() { const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleDraft}`; const lessonId = this.$route.query.lessonId ? this.$route.query.lessonId : 0; - this.$router.push({ path: `${path}/add/0/${lessonId}` }); + this.$router.push({ path: `${path}/add/0/${lessonId}`, query: {noPreLogout: this.$route.query.noPreLogout} }); }, handleUpdate(index, data) { const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleDraft}`; const lessonId = this.$route.query.lessonId ? this.$route.query.lessonId : 0; - this.$router.push({ path: `${path}/edit/${data.id}/${lessonId}` }); + this.$router.push({ path: `${path}/edit/${data.id}/${lessonId}`, query: {noPreLogout: this.$route.query.noPreLogout} }); }, handleDistribute(index, data) { const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleDraft}`; const lessonId = this.$route.query.lessonId ? this.$route.query.lessonId : 0; - this.$router.push({ path: `${path}/add/${data.id}/${lessonId}` }); + this.$router.push({ path: `${path}/add/${data.id}/${lessonId}`, query: {noPreLogout: this.$route.query.noPreLogout} }); }, // 删除 deleteList(index, data) { diff --git a/src/views/teach/detail/index.vue b/src/views/teach/detail/index.vue index 942cc0f69..1c8d116f0 100644 --- a/src/views/teach/detail/index.vue +++ b/src/views/teach/detail/index.vue @@ -7,28 +7,28 @@
- - - - -  {{ node.label }} -  {{ node.label }} - - - + + + + +  {{ node.label }} +  {{ node.label }} + + +
@@ -39,7 +39,7 @@
{{ $t('teach.buy') }} {{ $t('teach.permissionDistribute') }} - {{ $t('teach.returnCourseList') }} + {{ $t('teach.returnCourseList') }}
@@ -149,7 +149,7 @@ export default { if (this.drawWay) { trainingNotifyNew({ trainingId: obj.id }).then(resp => { const query = { - group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.courseModel.mapId, lineCode: this.lineCode + group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.courseModel.mapId, lineCode: this.lineCode, noPreLogout: this.$route.query.noPreLogout }; this.$router.push({ path: `${UrlConfig.displayNew}/teach`, query: query }); launchFullscreen();