Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
7068b73585
@ -365,7 +365,8 @@ export default {
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
console.log(error, '=====');
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
|
@ -348,7 +348,8 @@ export default {
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
console.log(error, '=====');
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
|
@ -151,26 +151,26 @@ export default {
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
|
||||
handler: this.setAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
|
||||
handler: this.cancelAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||
},
|
||||
// {
|
||||
// label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
|
||||
// handler: this.setAutoInterlock,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
|
||||
// handler: this.cancelAutoInterlock,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
|
||||
// handler: this.setAutoTrigger,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
|
||||
// handler: this.cancelAutoTrigger,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||
// },
|
||||
{
|
||||
label: this.$t('menu.menuSignal.humanControl'),
|
||||
handler: this.humanControl,
|
||||
|
@ -92,6 +92,7 @@ export default {
|
||||
{ deviceType: '05', orderNum: 8, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -303,7 +304,7 @@ export default {
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{ // 未生成实训
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: 'Stand_Set_Reentry_Strategy',
|
||||
@ -364,7 +365,7 @@ export default {
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// { // 未生成实训
|
||||
// {
|
||||
// maxDuration: 15,
|
||||
// minDuration: 8,
|
||||
// operateType: 'Section_Axis_Pre_Reset',
|
||||
@ -372,7 +373,7 @@ export default {
|
||||
// trainingName: '计轴预复位({8}{9})',
|
||||
// trainingRemark: '计轴预复位功能',
|
||||
// trainingType: 'Section',
|
||||
// productTypes: ['01'],
|
||||
// productTypes: ['01', '02'],
|
||||
// stepVOList: [
|
||||
// { deviceType: '03', orderNum: 1, operateCode: '409', tip: '鼠标右键菜单选择【区段计轴预复位】' },
|
||||
// { deviceType: '03', orderNum: 2, operateCode: '4091', tip: '鼠标左键点击【下达】按钮' },
|
||||
@ -733,23 +734,23 @@ export default {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3041', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// { // 未生成实训
|
||||
// maxDuration: 15,
|
||||
// minDuration: 8,
|
||||
// operateType: 'Signal_Set_Guide',
|
||||
// skinCode: '02',
|
||||
// trainingName: '引导进路办理({3})',
|
||||
// trainingRemark: '进路办理信号引导',
|
||||
// trainingType: 'Signal',
|
||||
// productTypes: ['01'],
|
||||
// stepVOList: [
|
||||
// { deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【进路引导】' },
|
||||
// { deviceType: '04', orderNum: 2, operateCode: '3081', tip: '鼠标左键点击【下达】按钮' },
|
||||
// { deviceType: '04', orderNum: 3, operateCode: '3083', tip: '鼠标左键点击【确认1】按钮' },
|
||||
// { deviceType: '04', orderNum: 4, operateCode: '3084', tip: '鼠标左键点击【确认2】按钮' },
|
||||
// { deviceType: '04', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: 'Signal_Set_Guide',
|
||||
skinCode: '02',
|
||||
trainingName: '引导进路办理({3})',
|
||||
trainingRemark: '进路办理信号引导',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【进路引导】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3081', tip: '鼠标左键点击【下达】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3083', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '3084', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '04', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
@ -794,7 +795,7 @@ export default {
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{ // 未生成实训
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: 'Signal_Set_CI_Auto',
|
||||
@ -822,7 +823,7 @@ export default {
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '310', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{ // 未生成实训
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: 'Signal_Set_CI_Auto_Trigger',
|
||||
@ -836,7 +837,7 @@ export default {
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '311', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{ // 未生成实训
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: 'Signal_Cancel_CI_Auto_Trigger',
|
||||
|
@ -77,7 +77,7 @@ export default {
|
||||
{
|
||||
label: '人工解锁进路', // 信号机引导取消
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
@ -129,7 +129,7 @@ export default {
|
||||
{
|
||||
label: '人工解锁进路', // 信号机引导取消
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
|
@ -687,8 +687,8 @@ export default {
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '318', tip: '鼠标右键菜单选择【人工解锁进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '318', tip: '鼠标左键点击【确定】按钮' }
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '305', tip: '鼠标右键菜单选择【人工解锁进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '305', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -100,12 +100,12 @@ export default {
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '取消临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
}
|
||||
// {
|
||||
// label: '取消临时限速',
|
||||
// handler: this.cancelSpeed,
|
||||
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -293,17 +293,17 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelSpeed() {
|
||||
let sectionCode = this.selected.code;
|
||||
if (this.selected.type == '02' || this.selected.type == '03') {
|
||||
sectionCode = this.selected.parentCode;
|
||||
}
|
||||
commitOperate(menuOperate.Section.cancelSpeed, {sectionCode:sectionCode}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// cancelSpeed() {
|
||||
// let sectionCode = this.selected.code;
|
||||
// if (this.selected.type == '02' || this.selected.type == '03') {
|
||||
// sectionCode = this.selected.parentCode;
|
||||
// }
|
||||
// commitOperate(menuOperate.Section.cancelSpeed, {sectionCode:sectionCode}).then(({valid, operate})=>{
|
||||
// if (valid) {
|
||||
// this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
|
@ -297,7 +297,7 @@ export default {
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' },
|
||||
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '5' },
|
||||
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
@ -316,7 +316,7 @@ export default {
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' },
|
||||
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '0' },
|
||||
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
|
@ -133,6 +133,7 @@ const CompanyManage = () => import('@/views/system/companyManage/index');
|
||||
const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/index');
|
||||
const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport');
|
||||
const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule');
|
||||
const MessageBoard = () => import('@/views/messageBoard/index');
|
||||
|
||||
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
// import { getSessionStorage } from '@/utils/auth';
|
||||
@ -404,6 +405,11 @@ export const publicAsyncRoute = [
|
||||
path: '/practiceDisplay',
|
||||
component: PracticeDisplay,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/messageBoard',
|
||||
component: MessageBoard,
|
||||
hidden: true
|
||||
}
|
||||
];
|
||||
// 城市轨道项目
|
||||
|
@ -1,13 +1,15 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
id="elDialog"
|
||||
title="留言板"
|
||||
:visible.sync="dialogVisible"
|
||||
fullscreen
|
||||
:show-close="false"
|
||||
center
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<!--<el-dialog-->
|
||||
<!--id="elDialog"-->
|
||||
<!--title="留言板"-->
|
||||
<!--:visible.sync="dialogVisible"-->
|
||||
<!--fullscreen-->
|
||||
<!--:show-close="false"-->
|
||||
<!--center-->
|
||||
<!--:before-close="handleClose"-->
|
||||
<!-->-->
|
||||
<div id="elDialog" class="message-board-box">
|
||||
<div class="message-board-title">留言板</div>
|
||||
<div style="width: 80%;margin-left: 10%;padding: 20px;margin-bottom: 20px;background-color: rgba(255,255,255,0);border: 1px solid #ebeef5;border-radius: 4px;box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);">
|
||||
<div v-if="postCommentList.length">
|
||||
<template v-for="(item,i) in postCommentList">
|
||||
@ -90,11 +92,13 @@
|
||||
<el-button type="danger" @click="commitComment">留言</el-button>
|
||||
</span>
|
||||
<el-button size="mini" type="danger" style="position: fixed; right: 100px;top: 80px;width: 90px;" @click="goSlide">我要留言</el-button>
|
||||
<el-button size="mini" style="position: fixed; right: 100px;top: 120px;width: 90px;" @click="dialogVisible = false">退出留言板</el-button>
|
||||
<!--<el-button size="mini" style="position: fixed; right: 100px;top: 120px;width: 90px;" @click="dialogVisible = false">退出留言板</el-button>-->
|
||||
<div v-show="imgShow" style="position: fixed;width: 100%;height: 100%;left: 0;top: 0;background: rgba(0,0,0,0.5);cursor: zoom-out;" @click="handelCloseImg">
|
||||
<img id="targetImg" src="" style="position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);min-width: 500px;max-height: 80%;height: auto;">
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<!--</el-dialog>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -105,13 +109,12 @@ import unlike_icon from '@/assets/unlike.png';
|
||||
import reply_icon from '@/assets/reply.png';
|
||||
import delete_icon from '@/assets/delete.png';
|
||||
import { superAdmin } from '@/router/index_APP_TARGET';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { ProjectCode } from '@/scripts/ProjectConfig';
|
||||
export default {
|
||||
name: 'MessageBoard',
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
// dialogVisible: false,
|
||||
content: '',
|
||||
postCommentList: [],
|
||||
pageSize: 10,
|
||||
@ -140,7 +143,7 @@ export default {
|
||||
return this.$store.state.user.roles.includes(superAdmin);
|
||||
},
|
||||
projectCode() {
|
||||
const project = getSessionStorage('project');
|
||||
const project = this.$route.query.project;
|
||||
return ProjectCode[project];
|
||||
}
|
||||
},
|
||||
@ -152,20 +155,18 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
if (this.projectCode === 'DRTS' || this.projectCode === 'BJD') {
|
||||
getPostByProjectCode(this.projectCode).then(resp => {
|
||||
this.postId = resp.data.id;
|
||||
});
|
||||
}
|
||||
getPostByProjectCode(this.projectCode).then(resp => {
|
||||
this.postId = resp.data.id;
|
||||
});
|
||||
this.handleCurrentChange();
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
doShow() {
|
||||
this.handleCurrentChange();
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
// handleClose() {
|
||||
// this.dialogVisible = false;
|
||||
// },
|
||||
// doShow() {
|
||||
// this.dialogVisible = true;
|
||||
// },
|
||||
commitComment() {
|
||||
const images = this.content.match(/<img/g);
|
||||
const answerContent = this.handleEmojiContent(this.content);
|
||||
@ -370,6 +371,7 @@ export default {
|
||||
<style scoped>
|
||||
.dialog-footer{
|
||||
margin: 0 auto;
|
||||
padding: 10px 0 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
@ -389,16 +391,22 @@ export default {
|
||||
width: 100px;
|
||||
height: auto;
|
||||
}
|
||||
/deep/ .el-dialog.is-fullscreen{
|
||||
background-image:url('../../../../assets/bg_board.jpg');
|
||||
.message-board-box{
|
||||
width: 100%;
|
||||
background-image:url('../../assets/bg_board.jpg');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
/deep/.ql-container{
|
||||
height: 80%;
|
||||
}
|
||||
/deep/.el-dialog__title{
|
||||
.message-board-title{
|
||||
font-size: 30px;
|
||||
color: #F00;
|
||||
font-family: 'fangsong';
|
||||
font-weight: bolder;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
}
|
||||
</style>
|
@ -46,7 +46,6 @@
|
||||
<scheduling v-if="scheduleLoadShow" ref="scheduling" :group="group" />
|
||||
<scheduling-view v-if="schedulePreviewShow" ref="schedulingView" :group="group" />
|
||||
<qr-code ref="qrCode" />
|
||||
<message-board ref="messageBoard" />
|
||||
<contect-us ref="contectUs" />
|
||||
</div>
|
||||
</template>
|
||||
@ -60,7 +59,6 @@ import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import DistributeDraft from '@/views/components/limits/distribute';
|
||||
import QrCode from '@/components/QrCode';
|
||||
import MessageBoard from './demon/messageBoard';
|
||||
import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
@ -72,8 +70,7 @@ export default {
|
||||
SchedulingView,
|
||||
DistributeDraft,
|
||||
QrCode,
|
||||
ContectUs,
|
||||
MessageBoard
|
||||
ContectUs
|
||||
},
|
||||
props:{
|
||||
isAllShow:{
|
||||
@ -321,7 +318,15 @@ export default {
|
||||
}
|
||||
},
|
||||
messageBoardShow() {
|
||||
this.$refs.messageBoard.doShow();
|
||||
// this.$refs.messageBoard.doShow();
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/messageBoard',
|
||||
query:{
|
||||
project: this.$route.query.project,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
contectUs() {
|
||||
this.$refs.contectUs.doShow();
|
||||
|
@ -12,17 +12,19 @@
|
||||
<el-button type="success" :disabled="isDisable || dataError" :loading="startLoading" @click="start">{{ $t('display.startBtn') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<tip-exam-list :offset-bottom="offsetBottom" @refresh="refresh" />
|
||||
<tip-exam-list :offset-bottom="offsetBottom" />
|
||||
<!-- @refresh="refresh" -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||
// import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||
import TipExamList from './tipExamList';
|
||||
import { Notification } from 'element-ui';
|
||||
import { startTrainingNew } from '@/api/jmap/training';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { refreshExamList, finishOneExamQuestion } from '@/api/management/userexam';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'MenuExam',
|
||||
@ -49,6 +51,7 @@ export default {
|
||||
return {
|
||||
isDisable: false,
|
||||
startLoading: false,
|
||||
locateDeviceCode:null,
|
||||
training: {
|
||||
id: '',
|
||||
name: '',
|
||||
@ -73,14 +76,22 @@ export default {
|
||||
watch: {
|
||||
'$store.state.map.mapViewLoadedCount': function() {
|
||||
this.$store.dispatch('exam/countUsedTime');
|
||||
this.locateDeviceCode && this.$store.dispatch('exam/setCenter', this.locateDeviceCode); // 设置考题对象居中
|
||||
},
|
||||
$route() {
|
||||
this.initData();
|
||||
// this.initData();
|
||||
this.isDisable = false;
|
||||
this.$store.dispatch('training/end', null);
|
||||
this.$store.dispatch('training/reset');
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.$store.dispatch('training/setStopCountTime');
|
||||
this.$store.dispatch('training/setTrainingStart', false);
|
||||
EventBus.$emit('viewLoading', false);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initData();
|
||||
},
|
||||
// mounted() {
|
||||
// this.initData();
|
||||
// },
|
||||
methods: {
|
||||
tipInfo(opt) {
|
||||
if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) {
|
||||
@ -171,28 +182,28 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
refresh() {
|
||||
this.isDisable = false;
|
||||
this.$store.dispatch('training/end', null);
|
||||
},
|
||||
// 课程和考试系统
|
||||
async initData() {
|
||||
if (parseInt(this.$route.query.trainingId)) {
|
||||
const resp = await getTrainingDetailNew(this.$route.query.trainingId);
|
||||
this.$store.dispatch('exam/setCenter', resp.data.locateDeviceCode); // 设置考题对象居中
|
||||
if (resp && resp.code == 200) {
|
||||
const detail = resp.data;
|
||||
await this.$store.dispatch('training/setPrdType', this.prdTypeMap[detail.prdType]);
|
||||
|
||||
await this.$store.dispatch('training/setTrainingData', detail); // 设置实训信息
|
||||
} else {
|
||||
this.$messageBox(`获取实训步骤数据失败`);
|
||||
this.endViewLoading();
|
||||
}
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
// refresh() {
|
||||
// this.isDisable = false;
|
||||
// this.$store.dispatch('training/end', null);
|
||||
// },
|
||||
// // 课程和考试系统
|
||||
// async initData() {
|
||||
// if (parseInt(this.$route.query.trainingId)) {
|
||||
// const resp = await getTrainingDetailNew(this.$route.query.trainingId);
|
||||
// if (resp && resp.code == 200) {
|
||||
// const detail = resp.data;
|
||||
// this.locateDeviceCode = resp.data.locateDeviceCode;
|
||||
// debugger;
|
||||
// await this.$store.dispatch('training/setPrdType', this.prdTypeMap[detail.prdType]);
|
||||
// await this.$store.dispatch('training/setTrainingData', detail); // 设置实训信息
|
||||
// } else {
|
||||
// this.$messageBox(`获取实训步骤数据失败`);
|
||||
// this.endViewLoading();
|
||||
// }
|
||||
// } else {
|
||||
// this.endViewLoading();
|
||||
// }
|
||||
// },
|
||||
// 结束加载状态
|
||||
endViewLoading(isSuccess) {
|
||||
if (!isSuccess) {
|
||||
|
@ -82,6 +82,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { refreshExamList } from '@/api/management/userexam';
|
||||
// loadTrainingInSimulation
|
||||
import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||
|
||||
export default {
|
||||
@ -113,7 +114,13 @@ export default {
|
||||
},
|
||||
detailShow: false,
|
||||
examIndex: 0,
|
||||
scanInter:null
|
||||
scanInter:null,
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
'02': '02', // 行调 => 行调
|
||||
'04': '02', // 司机 => 行调
|
||||
'05': '' // 派班 => null
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -151,7 +158,7 @@ export default {
|
||||
});
|
||||
},
|
||||
// 获取试题详情
|
||||
selectedTraining(obj) {
|
||||
selectedTraining(obj, type = null) {
|
||||
this.trainingList.forEach((item, index) => {
|
||||
if (item.id == obj.id) {
|
||||
this.examIndex = index;
|
||||
@ -159,21 +166,41 @@ export default {
|
||||
}
|
||||
});
|
||||
if (obj) {
|
||||
getTrainingDetailNew(obj.trainingId).then(res => {
|
||||
// if (type) {
|
||||
getTrainingDetailNew(obj.trainingId).then(resp => {
|
||||
this.courseModel = {
|
||||
id: res.data.id,
|
||||
name: res.data.name,
|
||||
maxDuration: res.data.maxDuration,
|
||||
remarks: res.data.remarks,
|
||||
minDuration: res.data.minDuration,
|
||||
updateTime: res.data.updateTime
|
||||
id: resp.data.id,
|
||||
name: resp.data.name,
|
||||
maxDuration: resp.data.maxDuration,
|
||||
remarks: resp.data.remarks,
|
||||
minDuration: resp.data.minDuration,
|
||||
updateTime: resp.data.updateTime
|
||||
};
|
||||
// this.$store.dispatch('exam/setCenter', res.data.locateDeviceCode);
|
||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[resp.data.prdType]);
|
||||
this.$store.dispatch('exam/setCenter', resp.data.locateDeviceCode);
|
||||
this.$store.dispatch('training/setTrainingData', resp.data); // 设置实训信息
|
||||
}).catch(error => {
|
||||
this.$message.error(this.$t('display.exam.getTestInformation') + ':' + error.message);
|
||||
});
|
||||
// } else {
|
||||
// loadTrainingInSimulation(this.$route.query.group, this.$route.query.trainingId).then(resp => {
|
||||
// // getTrainingDetailNew(obj.trainingId).then(res => {
|
||||
// this.courseModel = {
|
||||
// id: resp.data.id,
|
||||
// name: resp.data.name,
|
||||
// maxDuration: resp.data.maxDuration,
|
||||
// remarks: resp.data.remarks,
|
||||
// minDuration: resp.data.minDuration,
|
||||
// updateTime: resp.data.updateTime
|
||||
// };
|
||||
// this.$store.dispatch('training/setPrdType', this.prdTypeMap[resp.data.prdType]);
|
||||
// this.$store.dispatch('exam/setCenter', resp.data.locateDeviceCode);
|
||||
// this.$store.dispatch('training/setTrainingData', resp.data); // 设置实训信息
|
||||
// }).catch(error => {
|
||||
// this.$message.error(this.$t('display.exam.getTestInformation') + ':' + error.message);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
this.jump(obj);
|
||||
},
|
||||
getTrainDetail(obj) {
|
||||
@ -200,7 +227,7 @@ export default {
|
||||
obj.trainingId = response.data.userExamQuestionsVOs[0].trainingId;
|
||||
obj.id = response.data.userExamQuestionsVOs[0].id;
|
||||
}
|
||||
this.selectedTraining(obj);
|
||||
this.selectedTraining(obj, 'first');
|
||||
this.scanCommit();
|
||||
}).catch(error => {
|
||||
// 如果时50009则表示考试已完成,不能再次进行y
|
||||
@ -271,7 +298,7 @@ export default {
|
||||
noPreLogout: this.$route.query.noPreLogout
|
||||
};
|
||||
this.$router.replace({query: query});
|
||||
this.$emit('refresh');
|
||||
// this.$emit('refresh');
|
||||
},
|
||||
overExam() {
|
||||
this.$store.dispatch('exam/isOver').then(isOver => {
|
||||
|
@ -30,7 +30,7 @@ import MenuTrainList from '@/views/newMap/displayNew/menuTrainList';
|
||||
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||
|
||||
import { clearSimulation, getSimulationInfoNew, ranAsPlan, exitRunPlan } from '@/api/simulation';
|
||||
import { loadNewMapDataByGroup } from '@/utils/loaddata';
|
||||
import { loadNewMapDataByGroup, loadMapDataById } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -118,7 +118,7 @@ export default {
|
||||
}
|
||||
},
|
||||
$route() {
|
||||
if (!this.isLesson) {
|
||||
if (!this.isLesson && !this.isExam) {
|
||||
this.initLoadData();
|
||||
}
|
||||
}
|
||||
@ -225,6 +225,7 @@ export default {
|
||||
loadMapData() {
|
||||
if (parseInt(this.mapId)) {
|
||||
this.loadNewMapDataByGroup(this.group);
|
||||
// this.loadNewMapDataByGroup(this.mapId);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -234,6 +235,7 @@ export default {
|
||||
try {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
await loadNewMapDataByGroup(group);
|
||||
// await loadMapDataById(group);
|
||||
await this.$store.dispatch('training/setMapDefaultState');
|
||||
} catch (error) {
|
||||
this.$messageBox(`获取地图数据失败: ${error.message}`);
|
||||
|
@ -4,7 +4,7 @@
|
||||
<jlmap-visual ref="jlmapVisual" />
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<el-button type="small" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
|
||||
<el-button type="primary" size="small" plain @click="back">退出</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<menu-system-time ref="menuSystemTime" :offset="15" :group="group" />
|
||||
@ -217,8 +217,8 @@ export default {
|
||||
.display-draft {
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 15px;
|
||||
bottom: 15px;
|
||||
right: 5px;
|
||||
top: 5px;
|
||||
}
|
||||
.trainExample{
|
||||
position: absolute;
|
||||
|
Loading…
Reference in New Issue
Block a user