设备登录添加实训考试运行图编辑
This commit is contained in:
parent
67cf89120f
commit
150f047552
@ -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
|
||||
});
|
||||
|
@ -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
|
||||
}
|
||||
];
|
||||
|
@ -2236,6 +2236,7 @@ export const UrlConfig = {
|
||||
practiceDisplayNew:'/practiceDisplayNew',
|
||||
examRuleDraft: '/examRule/draft',
|
||||
examRuleManage: '/examRule/manage',
|
||||
examDetail: '/exam',
|
||||
lesson: {
|
||||
prefix: '/lesson',
|
||||
record: '/system/record/training',
|
||||
|
@ -50,7 +50,7 @@
|
||||
<el-button v-if="!isLocal" :disabled="disabled" type="success" @click="buy">{{ $t('exam.buy') }}</el-button>
|
||||
<el-button v-if="hasPermssion && !isLocal" :disabled="disabled" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>
|
||||
<el-button v-if="hasPermssion" :disabled="disabled" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
|
||||
<el-button type="primary" :disabled="disabled" @click="backLessonList">{{ $t('exam.returnCourseList') }}</el-button>
|
||||
<el-button v-if="!$route.query.noPreLogout" type="primary" :disabled="disabled" @click="backLessonList">{{ $t('exam.returnCourseList') }}</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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 }});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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();
|
||||
|
45
src/views/newMap/displayNew/demon/runPlanEdit.vue
Normal file
45
src/views/newMap/displayNew/demon/runPlanEdit.vue
Normal file
@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div v-show="show" class="run-plan-dialog" style="width: 100%; height: 100%;z-index: 36;">
|
||||
<edit-tool ref="planSchedule" @doClose="doClose" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EditTool from '@/views/planMonitor/editTool/index';
|
||||
export default {
|
||||
name: 'RunPlanEdit',
|
||||
components: {
|
||||
EditTool
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menus: null,
|
||||
show: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.show = true;
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.run-plan-dialog {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
position: absolute;
|
||||
z-index: 36;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
background: white;
|
||||
}
|
||||
</style>
|
@ -15,6 +15,7 @@
|
||||
<!-- 运行图加载 -->
|
||||
<el-button v-if="notScript && running" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||
<el-button v-if="notScript && !running" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||
<el-button v-if="isScheduling" size="small" type="primary" @click="runPlanEditShow">运行图编辑</el-button>
|
||||
<el-button v-if="faultMode" size="small" type="danger" @click="setFault">自动故障设置</el-button>
|
||||
</el-button-group>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
@ -26,6 +27,7 @@
|
||||
<run-plan-view ref="runPlanView" :group="group" />
|
||||
<!-- 加载剧本列表弹窗 -->
|
||||
<add-quest ref="addQuest" @selectQuest="selectQuest" />
|
||||
<run-plan-edit ref="runPlanEdit" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -35,6 +37,7 @@ import FaultChoose from './demon/faultChoose';
|
||||
import AddQuest from './demon/addQuest';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import RunPlanEdit from './demon/runPlanEdit';
|
||||
import {loadDraftScript, loadDraftScriptNew} from '@/api/designPlatform';
|
||||
import { getEveryDayRunPlanNew, loadScriptNew } from '@/api/simulation';
|
||||
import Vue from 'vue';
|
||||
@ -46,7 +49,8 @@ export default {
|
||||
RunPlanLoad,
|
||||
RunPlanView,
|
||||
FaultChoose,
|
||||
AddQuest
|
||||
AddQuest,
|
||||
RunPlanEdit
|
||||
},
|
||||
props: {
|
||||
offset: {
|
||||
@ -261,6 +265,10 @@ export default {
|
||||
switchStationModeInfo(val) {
|
||||
this.showStationContent = val;
|
||||
this.$emit('switchStationMode', val);
|
||||
},
|
||||
runPlanEditShow() {
|
||||
console.log(this.$refs.runPlanEdit);
|
||||
this.$refs.runPlanEdit.doShow();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -202,7 +202,11 @@ export default {
|
||||
}).catch(error => {
|
||||
// 如果时50009则表示考试已完成,不能再次进行y
|
||||
if (error.code === 500009) {
|
||||
this.$router.replace({ path: `/trainingPlatform/result/${this.$route.params.userExamId}`, query: { subSystem: this.$route.query.subSystem, mapId:this.$route.query.mapId } });
|
||||
if (this.$route.query.subSystem) {
|
||||
this.$router.replace({ path: `/trainingPlatform/result/${this.$route.query.userExamId}`, query: { subSystem: this.$route.query.subSystem, mapId:this.$route.query.mapId } });
|
||||
} else {
|
||||
this.$router.replace({ path: `/device/result/${this.$route.query.userExamId}`, query: { mapId:this.$route.query.mapId, noPreLogout: this.$route.query.noPreLogout } });
|
||||
}
|
||||
} else {
|
||||
this.$messageBox(this.$t('display.exam.refreshListError'));
|
||||
|
||||
@ -260,7 +264,8 @@ export default {
|
||||
subSystem: this.$route.query.subSystem,
|
||||
examId: this.$route.query.examId,
|
||||
mapId: this.$route.query.mapId,
|
||||
lineCode: this.$route.query.lineCode
|
||||
lineCode: this.$route.query.lineCode,
|
||||
noPreLogout: this.$route.query.noPreLogout
|
||||
};
|
||||
this.$router.replace({query: query});
|
||||
this.$emit('refresh');
|
||||
@ -285,7 +290,11 @@ export default {
|
||||
submit() {
|
||||
this.$store.dispatch('exam/over').then(() => {
|
||||
this.$store.dispatch('trainingList/clearTrainingList');
|
||||
this.$router.replace({ path: `/trainingPlatform/result/${this.$route.query.userExamId}`, query: { subSystem: this.$route.query.subSystem, mapId:this.$route.query.mapId } });
|
||||
if (this.$route.query.subSystem) {
|
||||
this.$router.replace({ path: `/trainingPlatform/result/${this.$route.query.userExamId}`, query: { subSystem: this.$route.query.subSystem, mapId:this.$route.query.mapId } });
|
||||
} else {
|
||||
this.$router.replace({ path: `/device/result/${this.$route.query.userExamId}`, query: { mapId:this.$route.query.mapId, noPreLogout: this.$route.query.noPreLogout } });
|
||||
}
|
||||
});
|
||||
},
|
||||
shrink() {
|
||||
|
@ -17,8 +17,7 @@
|
||||
<el-button v-if="isAdmin" size="small" @click="memberManage">成员管理</el-button>
|
||||
<el-button v-if="isAdmin && isProject" size="small" @click="handleEquipment">设备管理</el-button>
|
||||
<el-button v-if="isDeviceLogin" size="small" @click="handleTeach">教学系统</el-button>
|
||||
<el-button v-if="isDeviceLogin" size="small" @click="handleExam">考试系统</el-button>
|
||||
<el-button v-if="isDeviceLogin" size="small" @click="handleRunPlan">运行图编制</el-button>
|
||||
<el-button v-if="isDeviceLogin || $route.query.type === 'IM'" size="small" @click="handleExam">考试系统</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div class="display-draft" :class="{'display-type-hb': lineCode == '07' && $store.state.training.prdType=='01', 'haerbin_btn_box': lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
|
||||
@ -56,6 +55,7 @@ import { getSimulationQrcode } from '@/api/jointSimulation';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition';
|
||||
import { NoQrcodeList } from '@/scripts/ProjectConfig';
|
||||
import { getPublishLessonListByMapId } from '@/api/jmap/lesson';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
@ -124,6 +124,9 @@ export default {
|
||||
lineCode() {
|
||||
return this.$route.query.lineCode;
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
isShowScheduling() {
|
||||
// 行调与管理员 可显示
|
||||
return (this.$store.state.training.prdType == '02' || this.isAdmin) && !this.$route.query.projectDevice;
|
||||
@ -149,13 +152,13 @@ export default {
|
||||
(this.isShowScheduling || this.isDriver) ||
|
||||
(this.isShowScheduling || this.isStationSupervisor) ||
|
||||
(this.isAdmin && !this.noQrcodeList.includes(this.project)) ||
|
||||
(this.isAdmin) || (this.isAdmin && this.isProject)) {
|
||||
(this.isAdmin) || (this.isAdmin && this.isProject) || this.isDeviceLogin || this.$route.query.type === 'IM') {
|
||||
num++;
|
||||
}
|
||||
return num > 0;
|
||||
},
|
||||
isDeviceLogin() {
|
||||
const typeList = ['IM', 'LW', 'CW'];
|
||||
const typeList = ['LW', 'CW'];
|
||||
return typeList.includes(this.$route.query.type);
|
||||
}
|
||||
},
|
||||
@ -435,35 +438,61 @@ export default {
|
||||
}
|
||||
},
|
||||
handleTeach() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/passengerflow',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
group:this.group,
|
||||
project: this.project,
|
||||
noPreLogout: true
|
||||
getPublishLessonListByMapId({mapId: this.mapId}).then(resp => {
|
||||
const lesson = resp.data.find(item => {
|
||||
return (this.$route.query.type === 'LW' && item.prdType === '01') || (this.$route.query.type === 'CW' && item.prdType === '02');
|
||||
});
|
||||
if (lesson) {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/device/teachDetail',
|
||||
query:{
|
||||
lessonId: lesson.id,
|
||||
mapId:this.mapId,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取课程ID失败!');
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
handleExam() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/passengerflow',
|
||||
query:{
|
||||
mapid:this.mapId,
|
||||
group:this.group,
|
||||
project: this.project,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
if (this.$route.query.type === 'IM') {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/device/examRule/manage',
|
||||
query:{
|
||||
mapId:this.mapId,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
} else {
|
||||
getPublishLessonListByMapId({mapId: this.mapId}).then(resp => {
|
||||
const lesson = resp.data.find(item => {
|
||||
return (this.$route.query.type === 'LW' && item.prdType === '01') || (this.$route.query.type === 'CW' && item.prdType === '02');
|
||||
});
|
||||
if (lesson) {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/device/course',
|
||||
query:{
|
||||
lessonId: lesson.id,
|
||||
mapId:this.mapId,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取课程ID失败!');
|
||||
});
|
||||
}
|
||||
},
|
||||
handleRunPlan() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/device/runPlan',
|
||||
path:`/device/runPlan/${this.mapId}`,
|
||||
query:{
|
||||
lineCode:this.$route.query.lineCode,
|
||||
madId: this.mapId,
|
||||
lineCode:this.lineCode,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
|
@ -1,9 +1,20 @@
|
||||
<template>
|
||||
<div class="plan-tool" style="width: 100%; height: 100%;">
|
||||
<menu-bar ref="menuBar" :plan-convert="PlanConvert" @dispatchDialog="dispatchDialog" />
|
||||
<menu-bar
|
||||
ref="menuBar"
|
||||
:plan-convert="PlanConvert"
|
||||
:run-plan-list="runPlanList"
|
||||
@doClose="doClose"
|
||||
@dispatchDialog="dispatchDialog"
|
||||
@loadingRunPlan="loadingRunPlan"
|
||||
@checkIsLoadRunPlan="checkIsLoadRunPlan"
|
||||
@modifyRunPlanName="modifyRunPlanName"
|
||||
/>
|
||||
<schedule
|
||||
ref="schedule"
|
||||
:plan-convert="PlanConvert"
|
||||
:load-run-plan-id="loadRunPlanId"
|
||||
:load-run-plan-name="loadRunPlanName"
|
||||
:max-height="height"
|
||||
:max-width="width"
|
||||
/>
|
||||
@ -34,7 +45,9 @@
|
||||
<edit-station-between-time ref="editStationBetweenTime" />
|
||||
|
||||
<modifying-station-interval-time ref="modifyingStationIntervalTime" />
|
||||
<create-run-plan ref="createRunPlan" />
|
||||
<populating-generic-data ref="populatingGenericData" :load-run-plan-id="loadRunPlanId" />
|
||||
<create-empty-plan ref="createEmptyPlan" @refresh="refreshRunPlanList" />
|
||||
<edit-plan-name ref="editPlan" @renewal="refreshRunPlanName" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -46,6 +59,7 @@ import Parameter from './menus/parameter/index';
|
||||
import OffLine from './menus/offLine';
|
||||
import AddPlanningTrain from './menus/addPlanningTrain';
|
||||
import EditPlanningTrain from './menus/editPlanningTrain';
|
||||
import EditPlanName from './menus/editPlanName';
|
||||
import DuplicateTrain from './menus/duplicateTrain';
|
||||
import SystermOut from './menus/systermOut';
|
||||
import AddTask from './menus/addTask';
|
||||
@ -57,9 +71,11 @@ import EditStationBetweenTime from './menus/editStationBetweenTime';
|
||||
import AddSmoothRunTime from './menus/addSmoothRunTime';
|
||||
import EditSmoothRunTime from './menus/editSmoothRunTime';
|
||||
import ModifyingStationIntervalTime from './menus/modifyingStationIntervalTime';
|
||||
import CreateRunPlan from './menus/createRunPlan';
|
||||
import PopulatingGenericData from './menus/populatingGenericData';
|
||||
import CreateEmptyPlan from './menus/createEmptyPlan';
|
||||
import { deletePlanService } from '@/api/runplan';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { getRpListByMapId } from '@/api/runplan';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
@ -69,7 +85,7 @@ export default {
|
||||
Schedule,
|
||||
// OpenRunPlan,
|
||||
// CreateEmptyPlan,
|
||||
CreateRunPlan,
|
||||
PopulatingGenericData,
|
||||
Parameter,
|
||||
OffLine,
|
||||
AddPlanningTrain,
|
||||
@ -84,12 +100,17 @@ export default {
|
||||
EditStationBetweenTime,
|
||||
AddSmoothRunTime,
|
||||
EditSmoothRunTime,
|
||||
ModifyingStationIntervalTime
|
||||
ModifyingStationIntervalTime,
|
||||
CreateEmptyPlan,
|
||||
EditPlanName
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
PlanConvert: {},
|
||||
timeDemon: null
|
||||
timeDemon: null,
|
||||
runPlanList: [],
|
||||
loadRunPlanId: '',
|
||||
loadRunPlanName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -105,12 +126,14 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.timeDemon = setInterval(() => {
|
||||
checkLoginLine();
|
||||
}, 5000 * 60);
|
||||
if (this.$route.query.mapId) {
|
||||
this.refreshRunPlanList(true);
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.timeDemon) {
|
||||
@ -159,6 +182,37 @@ export default {
|
||||
},
|
||||
refresh() {
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
},
|
||||
refreshRunPlanList(firstLoad) {
|
||||
getRpListByMapId(this.$route.query.mapId).then(resp => {
|
||||
this.runPlanList = resp.data || [];
|
||||
if (firstLoad && this.runPlanList.length) {
|
||||
this.loadRunPlanId = this.runPlanList[0].id;
|
||||
this.loadRunPlanName = this.runPlanList[0].name;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取草稿运行图列表失败');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$emit('doClose');
|
||||
},
|
||||
loadingRunPlan(param) {
|
||||
this.loadRunPlanId = param.planId;
|
||||
this.loadRunPlanName = param.planName;
|
||||
},
|
||||
checkIsLoadRunPlan(planId) {
|
||||
this.refreshRunPlanList(planId === this.loadRunPlanId);
|
||||
},
|
||||
modifyRunPlanName() {
|
||||
if (this.loadRunPlanId && this.loadRunPlanName) {
|
||||
this.$refs.editPlan.doShow({id: this.loadRunPlanId, name: this.loadRunPlanName});
|
||||
} else {
|
||||
this.$message.info(this.$t('planMonitor.openRunPlan.pleaseSelectRunplan'));
|
||||
}
|
||||
},
|
||||
refreshRunPlanName(name) {
|
||||
this.$refs.schedule.refreshRunPlanName(name);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -107,7 +107,7 @@
|
||||
</template>
|
||||
</template>
|
||||
<div class="nav-li" style="position: absolute; right: 10px;" @click="back">
|
||||
<span class="nav-li-text">{{ $t('global.back') }}</span>
|
||||
<span class="nav-li-text">{{ dispaly?'关闭':$t('global.back') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -118,6 +118,7 @@ import { planEffectiveCheck, runPlanNotify } from '@/api/runplan';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { publishRunPlan, deleteRunPlan } from '@/api/designPlatform';
|
||||
|
||||
export default {
|
||||
name: 'PlanMenuBar',
|
||||
@ -131,6 +132,12 @@ export default {
|
||||
default: function() {
|
||||
return { };
|
||||
}
|
||||
},
|
||||
runPlanList: {
|
||||
type: Array,
|
||||
default: function() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -152,9 +159,13 @@ export default {
|
||||
// disabledCallback: () => { return !this.$route.query.planId },
|
||||
},
|
||||
{
|
||||
title: '创建运行图',
|
||||
click: this.createRunPlan
|
||||
title: '填充通用数据',
|
||||
click: this.populatingGenericData
|
||||
// disabledCallback: () => { return !this.$route.query.planId },
|
||||
},
|
||||
{
|
||||
title: '创建运行图',
|
||||
click: this.newRunPlan
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -224,6 +235,10 @@ export default {
|
||||
{
|
||||
title: this.$t('planMonitor.modifyTask'),
|
||||
click: this.handleModifyingTask
|
||||
},
|
||||
{
|
||||
title: '修改名称',
|
||||
click: this.modifyRunPlanName
|
||||
}
|
||||
// {
|
||||
// type: 'separator'
|
||||
@ -241,34 +256,30 @@ export default {
|
||||
// click: this.undeveloped,
|
||||
// }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('planMonitor.option'),
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('planMonitor.help'),
|
||||
children: [
|
||||
]
|
||||
}
|
||||
// {
|
||||
// title: this.$t('planMonitor.option'),
|
||||
// children: [
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// title: this.$t('planMonitor.help'),
|
||||
// children: [
|
||||
// ]
|
||||
// }
|
||||
]
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||
this.isNotUser = false;
|
||||
} else {
|
||||
this.isNotUser = true;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
]),
|
||||
dispaly() {
|
||||
return this.$route.path.includes('display');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tempClassA() {
|
||||
@ -287,6 +298,16 @@ export default {
|
||||
},
|
||||
'$route.query.planId': function () {
|
||||
this.menus = this.menuConvert(this.menuBase);
|
||||
},
|
||||
runPlanList() {
|
||||
this.initMenu();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||
this.isNotUser = false;
|
||||
} else {
|
||||
this.isNotUser = true;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -295,7 +316,11 @@ export default {
|
||||
methods: {
|
||||
back() {
|
||||
// this.$router.push({ path: `${UrlConfig.plan.detail}/${this.$route.query.mapId}` });
|
||||
this.$router.go(-1);
|
||||
if (this.dispaly) {
|
||||
this.$emit('doClose');
|
||||
} else {
|
||||
this.$router.go(-1);
|
||||
}
|
||||
},
|
||||
menuConvert(menuBase) {
|
||||
const menus = [];
|
||||
@ -316,7 +341,19 @@ export default {
|
||||
return menus;
|
||||
},
|
||||
initMenu() {
|
||||
this.menus = this.menuConvert(this.menuBase);
|
||||
const menuLoading = [];
|
||||
const menuDelete = [];
|
||||
const menuPublish = [];
|
||||
this.runPlanList.forEach(item => {
|
||||
menuLoading.push({title: item.name, planId:item.id, planName: item.name, click: this.loadingRunPlan});
|
||||
menuDelete.push({title: item.name, planId:item.id, planName: item.name, click: this.deleteRunPlanOperate});
|
||||
menuPublish.push({title: item.name, planId:item.id, planName: item.name, click: this.publishRunPlan});
|
||||
});
|
||||
if (this.runPlanList.length) {
|
||||
this.menus = this.menuConvert([...this.menuBase, {title: '加载', children: menuLoading}, {title: '删除', children: menuDelete}, {title: '发布', children:menuPublish}]);
|
||||
} else {
|
||||
this.menus = this.menuConvert(this.menuBase);
|
||||
}
|
||||
this.clickEvent();
|
||||
this.closeMenu();
|
||||
},
|
||||
@ -348,7 +385,7 @@ export default {
|
||||
if (!item.disabled) {
|
||||
setTimeout(() => {
|
||||
if (item && typeof item.click == 'function') {
|
||||
item.click();
|
||||
item.click(item);
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
@ -399,9 +436,12 @@ export default {
|
||||
handleModifyingStationIntervalTime() {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingStationIntervalTime', params: {} });
|
||||
},
|
||||
// 创建计划运行图
|
||||
createRunPlan() {
|
||||
this.$emit('dispatchDialog', { name: 'createRunPlan', params: {} });
|
||||
// 填充计划运行图
|
||||
populatingGenericData() {
|
||||
this.$emit('dispatchDialog', { name: 'populatingGenericData', params: {} });
|
||||
},
|
||||
newRunPlan() {
|
||||
this.$emit('dispatchDialog', { name: 'createEmptyPlan', params: {}});
|
||||
},
|
||||
// 自动生成
|
||||
handleAutoGenerate() {
|
||||
@ -515,6 +555,9 @@ export default {
|
||||
this.$messageBox(this.$t('tip.selectATrain'));
|
||||
}
|
||||
},
|
||||
modifyRunPlanName() {
|
||||
this.$emit('modifyRunPlanName');
|
||||
},
|
||||
// 修改交路
|
||||
handleModifyingRouting() {
|
||||
const params = this.$store.state.runPlan.selected;
|
||||
@ -524,6 +567,37 @@ export default {
|
||||
handleModifyingStartTime() {
|
||||
const params = this.$store.state.runPlan.selected;
|
||||
this.$emit('dispatchDialog', { name: 'modifyingBeginTime', params });
|
||||
},
|
||||
loadingRunPlan(param) {
|
||||
this.$emit('loadingRunPlan', param);
|
||||
},
|
||||
deleteRunPlanOperate(param) {
|
||||
// 删除运行图
|
||||
this.$confirm(this.$t('planMonitor.openRunPlan.confirmDeleteRunPlan'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteRunPlan(param.planId).then(Response => {
|
||||
this.$message.success(this.$t('planMonitor.openRunPlan.deleteSuccess'));
|
||||
this.$emit('checkIsLoadRunPlan', param.planId);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.deleteOperationGraphFailed'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
publishRunPlan(param) {
|
||||
this.$confirm(this.$t('tip.publishRunPlanTips'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
publishRunPlan(param.planId, {runPlanName: param.planName}).then(resp => {
|
||||
this.$message.success(this.$t('tip.publishRunPlanSuccess'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.publishRunPlanFail'));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -88,12 +88,12 @@ export default {
|
||||
publishMapList: [],
|
||||
newModel: {
|
||||
name: '',
|
||||
mapId: this.$route.params.mapId
|
||||
mapId: this.$route.params.mapId || this.$route.query.mapId
|
||||
},
|
||||
pullModel: {
|
||||
templateId: '',
|
||||
name: '',
|
||||
mapId: this.$route.params.mapId
|
||||
mapId: this.$route.params.mapId || this.$route.query.mapId
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -124,7 +124,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async initLoad() {
|
||||
const res = await queryRunPlanList(this.$route.params.mapId);
|
||||
const res = await queryRunPlanList(this.$route.params.mapId || this.$route.query.mapId);
|
||||
if (res.code == 200 && res.data.length) {
|
||||
this.publishMapList = res.data;
|
||||
}
|
||||
@ -225,7 +225,7 @@ export default {
|
||||
that.loadingDig.close();
|
||||
that.$message.warning(`运行图暂无默认上行折返轨或默认下行折返轨,请输入`);
|
||||
} else {
|
||||
importRunPlan({ mapId: that.$route.params.mapId || '02', runPlanList: jsonData }).then(response => {
|
||||
importRunPlan({ mapId: that.$route.params.mapId || that.$route.query.mapId || '02', runPlanList: jsonData }).then(response => {
|
||||
that.loadingDig.close();
|
||||
if (response && response.code == 200) {
|
||||
that.$message.success(that.$t('tip.importOperationGraphSuccessfully'));
|
||||
|
@ -89,7 +89,7 @@ export default {
|
||||
|
||||
this.$emit('dispatchOperate', params);
|
||||
this.$message.success(this.$t('tip.runGraphNameModifiedSuccessfully'));
|
||||
this.$emit('renewal');
|
||||
this.$emit('renewal', this.editModel.name);
|
||||
this.doClose();
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('tip.modifyRunGraphNameFailed') + error.message);
|
||||
|
@ -1,28 +1,35 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool duplicate-train"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="doClose">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" size="medium" :loading="loading" @click="handleCommit">{{$t('global.confirm')}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool duplicate-train"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" size="medium" :loading="loading" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getStationList, createRunPlan } from '@/api/runplan';
|
||||
import { getStationList, populatingGenericData } from '@/api/runplan';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -35,11 +42,11 @@ export default {
|
||||
overTime: '',
|
||||
departureTimeInterval: 180, // 发车间隔时间
|
||||
parkedTime: 30, // 停止时间
|
||||
reentryTime: 60, // 折返时间
|
||||
reentryTime: 60, // 折返时间
|
||||
startStationCode: '',
|
||||
endStationCode: ''
|
||||
},
|
||||
|
||||
|
||||
rules: {
|
||||
beginTime: [
|
||||
{ required: true, message: '请填写开始时间', trigger: 'blur' }
|
||||
@ -66,8 +73,8 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '创建运行图';
|
||||
title() {
|
||||
return '创建运行图';
|
||||
},
|
||||
form() {
|
||||
return {
|
||||
@ -85,9 +92,9 @@ export default {
|
||||
] },
|
||||
{ prop: 'startStationCode', label: '起始站', type: 'select', options: this.stationList },
|
||||
{ prop: 'endStationCode', label: '终止站', type: 'select', options: this.stationList }
|
||||
|
||||
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -114,39 +121,26 @@ export default {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
this.loading = true;
|
||||
if (this.formModel.right == 1) {
|
||||
this.formModel.right = true
|
||||
this.formModel.right = true;
|
||||
} else if (this.formModel.right == 2) {
|
||||
this.formModel.right = false
|
||||
this.formModel.right = false;
|
||||
} else {
|
||||
this.formModel.right = null;
|
||||
}
|
||||
if (this.formModel.overTime > this.formModel.beginTime) {
|
||||
createRunPlan(this.$route.query.planId, this.formModel).then(res => {
|
||||
populatingGenericData(this.$route.query.planId || this.loadRunPlanId, this.formModel).then(res => {
|
||||
this.loading = false;
|
||||
this.doClose()
|
||||
this.loadRunPlanData({
|
||||
refresh: true,
|
||||
planId: this.$route.query.planId,
|
||||
skinCode: this.$route.query.skinCode,
|
||||
planName: '真实运行图'
|
||||
});
|
||||
this.doClose();
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
this.doClose()
|
||||
})
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('结束时间必须大于开始时间');
|
||||
}
|
||||
});
|
||||
},
|
||||
loadRunPlanData({ refresh, planId, skinCode, planName }) {
|
||||
if (refresh) {
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
} else {
|
||||
const query = { skinCode: skinCode, mapId: this.$route.query.mapId, planId: planId, planName: planName };
|
||||
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
||||
}
|
||||
},
|
||||
// 转换时间格式
|
||||
formatDateTime(date) {
|
||||
console.log(date, 3333);
|
||||
@ -156,11 +150,11 @@ export default {
|
||||
let second = date.getSeconds();
|
||||
minute = minute < 10 ? ('0' + minute) : minute;
|
||||
second = second < 10 ? ('0' + second) : second;
|
||||
return h+':'+minute+':'+second;
|
||||
return h + ':' + minute + ':' + second;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
</style>
|
||||
</style>
|
@ -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 = '';
|
||||
|
@ -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',
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -7,28 +7,28 @@
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane :label="$t('teach.courseDetails')" name="first">
|
||||
<div>
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="courseModel.treeList"
|
||||
node-key="id"
|
||||
:props="defaultProps"
|
||||
:filter-node-method="filterNode"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
:default-expanded-keys="expandList"
|
||||
:span="22"
|
||||
@node-click="clickEvent"
|
||||
@node-expand="nodeExpand"
|
||||
@node-collapse="nodeCollapse"
|
||||
>
|
||||
<span slot-scope="{ node }">
|
||||
<span v-if="node.data.type === 'Training'" class="el-icon-goods" />
|
||||
<span v-if="node.data.valid" :style="{color: 'green'}"> {{ node.label }}</span>
|
||||
<span v-else> {{ node.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
<!--<el-scrollbar wrap-class="scrollbar-wrapper">-->
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="courseModel.treeList"
|
||||
node-key="id"
|
||||
:props="defaultProps"
|
||||
:filter-node-method="filterNode"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
:default-expanded-keys="expandList"
|
||||
:span="22"
|
||||
@node-click="clickEvent"
|
||||
@node-expand="nodeExpand"
|
||||
@node-collapse="nodeCollapse"
|
||||
>
|
||||
<span slot-scope="{ node }">
|
||||
<span v-if="node.data.type === 'Training'" class="el-icon-goods" />
|
||||
<span v-if="node.data.valid" :style="{color: 'green'}"> {{ node.label }}</span>
|
||||
<span v-else> {{ node.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
<!--</el-scrollbar>-->
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('teach.permissionsDetails')" name="second">
|
||||
@ -39,7 +39,7 @@
|
||||
<div class="btn-buy">
|
||||
<el-button type="success" :disabled="disabled" @click="buy">{{ $t('teach.buy') }}</el-button>
|
||||
<el-button v-if="hasPermssion" type="primary" :disabled="disabled" @click="distribute">{{ $t('teach.permissionDistribute') }}</el-button>
|
||||
<el-button type="primary" :disabled="disabled" @click="backLessonList">{{ $t('teach.returnCourseList') }}</el-button>
|
||||
<el-button v-if="!$route.query.noPreLogout" type="primary" :disabled="disabled" @click="backLessonList">{{ $t('teach.returnCourseList') }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user