This commit is contained in:
sunzhenyu 2020-11-27 17:25:02 +08:00
commit 7068b73585
15 changed files with 209 additions and 147 deletions

View File

@ -365,7 +365,8 @@ export default {
} else { } else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') }); 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.timeCountCommand = -1;
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 }); this.setButtonEnable({ step: -1 });

View File

@ -348,7 +348,8 @@ export default {
} else { } else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') }); 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.timeCountCommand = -1;
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 }); this.setButtonEnable({ step: -1 });

View File

@ -151,26 +151,26 @@ export default {
handler: this.guide, handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
}, },
{ // {
label: this.$t('menu.menuSignal.setInterlockAutoRoute'), // label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
handler: this.setAutoInterlock, // handler: this.setAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO // cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
}, // },
{ // {
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'), // label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
handler: this.cancelAutoInterlock, // handler: this.cancelAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO // cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
}, // },
{ // {
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'), // label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
handler: this.setAutoTrigger, // handler: this.setAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER // cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
}, // },
{ // {
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'), // label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger, // handler: this.cancelAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER // cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
}, // },
{ {
label: this.$t('menu.menuSignal.humanControl'), label: this.$t('menu.menuSignal.humanControl'),
handler: this.humanControl, handler: this.humanControl,

View File

@ -92,6 +92,7 @@ export default {
{ deviceType: '05', orderNum: 8, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' } { deviceType: '05', orderNum: 8, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
] ]
}, },
{ {
maxDuration: 15, maxDuration: 15,
minDuration: 8, minDuration: 8,
@ -303,7 +304,7 @@ export default {
{ deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' } { deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ // 未生成实训 {
maxDuration: 15, maxDuration: 15,
minDuration: 8, minDuration: 8,
operateType: 'Stand_Set_Reentry_Strategy', operateType: 'Stand_Set_Reentry_Strategy',
@ -364,7 +365,7 @@ export default {
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' } { deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
// { // 未生成实训 // {
// maxDuration: 15, // maxDuration: 15,
// minDuration: 8, // minDuration: 8,
// operateType: 'Section_Axis_Pre_Reset', // operateType: 'Section_Axis_Pre_Reset',
@ -372,7 +373,7 @@ export default {
// trainingName: '计轴预复位({8}{9})', // trainingName: '计轴预复位({8}{9})',
// trainingRemark: '计轴预复位功能', // trainingRemark: '计轴预复位功能',
// trainingType: 'Section', // trainingType: 'Section',
// productTypes: ['01'], // productTypes: ['01', '02'],
// stepVOList: [ // stepVOList: [
// { deviceType: '03', orderNum: 1, operateCode: '409', tip: '鼠标右键菜单选择【区段计轴预复位】' }, // { deviceType: '03', orderNum: 1, operateCode: '409', tip: '鼠标右键菜单选择【区段计轴预复位】' },
// { deviceType: '03', orderNum: 2, operateCode: '4091', tip: '鼠标左键点击【下达】按钮' }, // { deviceType: '03', orderNum: 2, operateCode: '4091', tip: '鼠标左键点击【下达】按钮' },
@ -733,23 +734,23 @@ export default {
{ deviceType: '04', orderNum: 3, operateCode: '3041', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 3, operateCode: '3041', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
// { // 未生成实训 {
// maxDuration: 15, maxDuration: 15,
// minDuration: 8, minDuration: 8,
// operateType: 'Signal_Set_Guide', operateType: 'Signal_Set_Guide',
// skinCode: '02', skinCode: '02',
// trainingName: '引导进路办理({3})', trainingName: '引导进路办理({3})',
// trainingRemark: '进路办理信号引导', trainingRemark: '进路办理信号引导',
// trainingType: 'Signal', trainingType: 'Signal',
// productTypes: ['01'], productTypes: ['01'],
// stepVOList: [ stepVOList: [
// { deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【进路引导】' }, { deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【进路引导】' },
// { deviceType: '04', orderNum: 2, operateCode: '3081', tip: '鼠标左键点击【下达】按钮' }, { deviceType: '04', orderNum: 2, operateCode: '3081', tip: '鼠标左键点击【下达】按钮' },
// { deviceType: '04', orderNum: 3, operateCode: '3083', tip: '鼠标左键点击【确认1】按钮' }, { deviceType: '04', orderNum: 3, operateCode: '3083', tip: '鼠标左键点击【确认1】按钮' },
// { deviceType: '04', orderNum: 4, operateCode: '3084', tip: '鼠标左键点击【确认2】按钮' }, { deviceType: '04', orderNum: 4, operateCode: '3084', tip: '鼠标左键点击【确认2】按钮' },
// { deviceType: '04', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' } { deviceType: '04', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
// ] ]
// }, },
{ {
maxDuration: 15, maxDuration: 15,
minDuration: 8, minDuration: 8,
@ -794,7 +795,7 @@ export default {
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ // 未生成实训 {
maxDuration: 15, maxDuration: 15,
minDuration: 8, minDuration: 8,
operateType: 'Signal_Set_CI_Auto', operateType: 'Signal_Set_CI_Auto',
@ -822,7 +823,7 @@ export default {
{ deviceType: '04', orderNum: 2, operateCode: '310', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '310', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ // 未生成实训 {
maxDuration: 15, maxDuration: 15,
minDuration: 8, minDuration: 8,
operateType: 'Signal_Set_CI_Auto_Trigger', operateType: 'Signal_Set_CI_Auto_Trigger',
@ -836,7 +837,7 @@ export default {
{ deviceType: '04', orderNum: 2, operateCode: '311', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '311', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ // 未生成实训 {
maxDuration: 15, maxDuration: 15,
minDuration: 8, minDuration: 8,
operateType: 'Signal_Cancel_CI_Auto_Trigger', operateType: 'Signal_Cancel_CI_Auto_Trigger',

View File

@ -77,7 +77,7 @@ export default {
{ {
label: '人工解锁进路', // label: '人工解锁进路', //
handler: this.humanTrainRoute, handler: this.humanTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
}, },
{ {
label: '信号封锁', label: '信号封锁',
@ -129,7 +129,7 @@ export default {
{ {
label: '人工解锁进路', // label: '人工解锁进路', //
handler: this.humanTrainRoute, handler: this.humanTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
}, },
{ {
label: '信号重开', label: '信号重开',

View File

@ -687,8 +687,8 @@ export default {
trainingType: 'Signal', trainingType: 'Signal',
productTypes: ['01', '02'], productTypes: ['01', '02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '318', tip: '鼠标右键菜单选择【人工解锁进路】' }, { deviceType: '04', orderNum: 1, operateCode: '305', tip: '鼠标右键菜单选择【人工解锁进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '318', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '305', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {

View File

@ -100,12 +100,12 @@ export default {
label: '设置临时限速', label: '设置临时限速',
handler: this.setSpeed, handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED 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: [ menuForce: [
@ -293,17 +293,17 @@ export default {
} }
}); });
}, },
cancelSpeed() { // cancelSpeed() {
let sectionCode = this.selected.code; // let sectionCode = this.selected.code;
if (this.selected.type == '02' || this.selected.type == '03') { // if (this.selected.type == '02' || this.selected.type == '03') {
sectionCode = this.selected.parentCode; // sectionCode = this.selected.parentCode;
} // }
commitOperate(menuOperate.Section.cancelSpeed, {sectionCode:sectionCode}).then(({valid, operate})=>{ // commitOperate(menuOperate.Section.cancelSpeed, {sectionCode:sectionCode}).then(({valid, operate})=>{
if (valid) { // if (valid) {
this.$refs.speedLimitControl.doShow(operate, this.selected); // this.$refs.speedLimitControl.doShow(operate, this.selected);
} // }
}); // });
}, // },
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{

View File

@ -297,7 +297,7 @@ export default {
{ deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' }, { deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' }, { deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' }, { 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: '鼠标左键点击【关闭】按钮' } { deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
] ]
}, },
@ -316,7 +316,7 @@ export default {
{ deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' }, { deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' }, { deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' }, { 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: '鼠标左键点击【关闭】按钮' } { deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
] ]
}, },

View File

@ -133,6 +133,7 @@ const CompanyManage = () => import('@/views/system/companyManage/index');
const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/index'); const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/index');
const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport'); const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport');
const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule'); const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule');
const MessageBoard = () => import('@/views/messageBoard/index');
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; // import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth'; // import { getSessionStorage } from '@/utils/auth';
@ -404,6 +405,11 @@ export const publicAsyncRoute = [
path: '/practiceDisplay', path: '/practiceDisplay',
component: PracticeDisplay, component: PracticeDisplay,
hidden: true hidden: true
},
{
path: '/messageBoard',
component: MessageBoard,
hidden: true
} }
]; ];
// 城市轨道项目 // 城市轨道项目

View File

@ -1,13 +1,15 @@
<template> <template>
<el-dialog <!--<el-dialog-->
id="elDialog" <!--id="elDialog"-->
title="留言板" <!--title="留言板"-->
:visible.sync="dialogVisible" <!--:visible.sync="dialogVisible"-->
fullscreen <!--fullscreen-->
:show-close="false" <!--:show-close="false"-->
center <!--center-->
:before-close="handleClose" <!--:before-close="handleClose"-->
> <!--&gt;-->
<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 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"> <div v-if="postCommentList.length">
<template v-for="(item,i) in postCommentList"> <template v-for="(item,i) in postCommentList">
@ -90,11 +92,13 @@
<el-button type="danger" @click="commitComment">留言</el-button> <el-button type="danger" @click="commitComment">留言</el-button>
</span> </span>
<el-button size="mini" type="danger" style="position: fixed; right: 100px;top: 80px;width: 90px;" @click="goSlide">我要留言</el-button> <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"> <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;"> <img id="targetImg" src="" style="position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);min-width: 500px;max-height: 80%;height: auto;">
</div> </div>
</el-dialog> </div>
<!--</el-dialog>-->
</template> </template>
<script> <script>
@ -105,13 +109,12 @@ import unlike_icon from '@/assets/unlike.png';
import reply_icon from '@/assets/reply.png'; import reply_icon from '@/assets/reply.png';
import delete_icon from '@/assets/delete.png'; import delete_icon from '@/assets/delete.png';
import { superAdmin } from '@/router/index_APP_TARGET'; import { superAdmin } from '@/router/index_APP_TARGET';
import { getSessionStorage } from '@/utils/auth';
import { ProjectCode } from '@/scripts/ProjectConfig'; import { ProjectCode } from '@/scripts/ProjectConfig';
export default { export default {
name: 'MessageBoard', name: 'MessageBoard',
data() { data() {
return { return {
dialogVisible: false, // dialogVisible: false,
content: '', content: '',
postCommentList: [], postCommentList: [],
pageSize: 10, pageSize: 10,
@ -140,7 +143,7 @@ export default {
return this.$store.state.user.roles.includes(superAdmin); return this.$store.state.user.roles.includes(superAdmin);
}, },
projectCode() { projectCode() {
const project = getSessionStorage('project'); const project = this.$route.query.project;
return ProjectCode[project]; return ProjectCode[project];
} }
}, },
@ -152,20 +155,18 @@ export default {
}; };
}, },
mounted() { mounted() {
if (this.projectCode === 'DRTS' || this.projectCode === 'BJD') {
getPostByProjectCode(this.projectCode).then(resp => { getPostByProjectCode(this.projectCode).then(resp => {
this.postId = resp.data.id; this.postId = resp.data.id;
}); });
} this.handleCurrentChange();
}, },
methods: { methods: {
handleClose() { // handleClose() {
this.dialogVisible = false; // this.dialogVisible = false;
}, // },
doShow() { // doShow() {
this.handleCurrentChange(); // this.dialogVisible = true;
this.dialogVisible = true; // },
},
commitComment() { commitComment() {
const images = this.content.match(/<img/g); const images = this.content.match(/<img/g);
const answerContent = this.handleEmojiContent(this.content); const answerContent = this.handleEmojiContent(this.content);
@ -370,6 +371,7 @@ export default {
<style scoped> <style scoped>
.dialog-footer{ .dialog-footer{
margin: 0 auto; margin: 0 auto;
padding: 10px 0 30px;
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
@ -389,16 +391,22 @@ export default {
width: 100px; width: 100px;
height: auto; height: auto;
} }
/deep/ .el-dialog.is-fullscreen{ .message-board-box{
background-image:url('../../../../assets/bg_board.jpg'); width: 100%;
background-image:url('../../assets/bg_board.jpg');
background-size: 100% 100%;
} }
/deep/.ql-container{ /deep/.ql-container{
height: 80%; height: 80%;
} }
/deep/.el-dialog__title{ .message-board-title{
font-size: 30px; font-size: 30px;
color: #F00; color: #F00;
font-family: 'fangsong'; font-family: 'fangsong';
font-weight: bolder; font-weight: bolder;
width: 100%;
text-align: center;
height: 80px;
line-height: 80px;
} }
</style> </style>

View File

@ -46,7 +46,6 @@
<scheduling v-if="scheduleLoadShow" ref="scheduling" :group="group" /> <scheduling v-if="scheduleLoadShow" ref="scheduling" :group="group" />
<scheduling-view v-if="schedulePreviewShow" ref="schedulingView" :group="group" /> <scheduling-view v-if="schedulePreviewShow" ref="schedulingView" :group="group" />
<qr-code ref="qrCode" /> <qr-code ref="qrCode" />
<message-board ref="messageBoard" />
<contect-us ref="contectUs" /> <contect-us ref="contectUs" />
</div> </div>
</template> </template>
@ -60,7 +59,6 @@ import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import DistributeDraft from '@/views/components/limits/distribute'; import DistributeDraft from '@/views/components/limits/distribute';
import QrCode from '@/components/QrCode'; import QrCode from '@/components/QrCode';
import MessageBoard from './demon/messageBoard';
import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs'; import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs';
import { PermissionType } from '@/scripts/ConstDic'; import { PermissionType } from '@/scripts/ConstDic';
export default { export default {
@ -72,8 +70,7 @@ export default {
SchedulingView, SchedulingView,
DistributeDraft, DistributeDraft,
QrCode, QrCode,
ContectUs, ContectUs
MessageBoard
}, },
props:{ props:{
isAllShow:{ isAllShow:{
@ -321,7 +318,15 @@ export default {
} }
}, },
messageBoardShow() { 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() { contectUs() {
this.$refs.contectUs.doShow(); this.$refs.contectUs.doShow();

View File

@ -12,17 +12,19 @@
<el-button type="success" :disabled="isDisable || dataError" :loading="startLoading" @click="start">{{ $t('display.startBtn') }}</el-button> <el-button type="success" :disabled="isDisable || dataError" :loading="startLoading" @click="start">{{ $t('display.startBtn') }}</el-button>
</el-button-group> </el-button-group>
</div> </div>
<tip-exam-list :offset-bottom="offsetBottom" @refresh="refresh" /> <tip-exam-list :offset-bottom="offsetBottom" />
<!-- @refresh="refresh" -->
</div> </div>
</template> </template>
<script> <script>
import { getTrainingDetailNew } from '@/api/jmap/training'; // import { getTrainingDetailNew } from '@/api/jmap/training';
import TipExamList from './tipExamList'; import TipExamList from './tipExamList';
import { Notification } from 'element-ui'; import { Notification } from 'element-ui';
import { startTrainingNew } from '@/api/jmap/training'; import { startTrainingNew } from '@/api/jmap/training';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { refreshExamList, finishOneExamQuestion } from '@/api/management/userexam'; import { refreshExamList, finishOneExamQuestion } from '@/api/management/userexam';
import { EventBus } from '@/scripts/event-bus';
export default { export default {
name: 'MenuExam', name: 'MenuExam',
@ -49,6 +51,7 @@ export default {
return { return {
isDisable: false, isDisable: false,
startLoading: false, startLoading: false,
locateDeviceCode:null,
training: { training: {
id: '', id: '',
name: '', name: '',
@ -73,14 +76,22 @@ export default {
watch: { watch: {
'$store.state.map.mapViewLoadedCount': function() { '$store.state.map.mapViewLoadedCount': function() {
this.$store.dispatch('exam/countUsedTime'); this.$store.dispatch('exam/countUsedTime');
this.locateDeviceCode && this.$store.dispatch('exam/setCenter', this.locateDeviceCode); //
}, },
$route() { $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() { // mounted() {
this.initData(); // this.initData();
}, // },
methods: { methods: {
tipInfo(opt) { tipInfo(opt) {
if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) { if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) {
@ -171,28 +182,28 @@ export default {
} }
}); });
}, },
refresh() { // refresh() {
this.isDisable = false; // this.isDisable = false;
this.$store.dispatch('training/end', null); // this.$store.dispatch('training/end', null);
}, // },
// // //
async initData() { // async initData() {
if (parseInt(this.$route.query.trainingId)) { // if (parseInt(this.$route.query.trainingId)) {
const resp = await getTrainingDetailNew(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) {
if (resp && resp.code == 200) { // const detail = resp.data;
const detail = resp.data; // this.locateDeviceCode = resp.data.locateDeviceCode;
await this.$store.dispatch('training/setPrdType', this.prdTypeMap[detail.prdType]); // debugger;
// await this.$store.dispatch('training/setPrdType', this.prdTypeMap[detail.prdType]);
await this.$store.dispatch('training/setTrainingData', detail); // // await this.$store.dispatch('training/setTrainingData', detail); //
} else { // } else {
this.$messageBox(`获取实训步骤数据失败`); // this.$messageBox(``);
this.endViewLoading(); // this.endViewLoading();
} // }
} else { // } else {
this.endViewLoading(); // this.endViewLoading();
} // }
}, // },
// //
endViewLoading(isSuccess) { endViewLoading(isSuccess) {
if (!isSuccess) { if (!isSuccess) {

View File

@ -82,6 +82,7 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { refreshExamList } from '@/api/management/userexam'; import { refreshExamList } from '@/api/management/userexam';
// loadTrainingInSimulation
import { getTrainingDetailNew } from '@/api/jmap/training'; import { getTrainingDetailNew } from '@/api/jmap/training';
export default { export default {
@ -113,7 +114,13 @@ export default {
}, },
detailShow: false, detailShow: false,
examIndex: 0, examIndex: 0,
scanInter:null scanInter:null,
prdTypeMap: {
'01': '01', // =>
'02': '02', // =>
'04': '02', // =>
'05': '' // => null
}
}; };
}, },
computed: { computed: {
@ -151,7 +158,7 @@ export default {
}); });
}, },
// //
selectedTraining(obj) { selectedTraining(obj, type = null) {
this.trainingList.forEach((item, index) => { this.trainingList.forEach((item, index) => {
if (item.id == obj.id) { if (item.id == obj.id) {
this.examIndex = index; this.examIndex = index;
@ -159,21 +166,41 @@ export default {
} }
}); });
if (obj) { if (obj) {
getTrainingDetailNew(obj.trainingId).then(res => { // if (type) {
getTrainingDetailNew(obj.trainingId).then(resp => {
this.courseModel = { this.courseModel = {
id: res.data.id, id: resp.data.id,
name: res.data.name, name: resp.data.name,
maxDuration: res.data.maxDuration, maxDuration: resp.data.maxDuration,
remarks: res.data.remarks, remarks: resp.data.remarks,
minDuration: res.data.minDuration, minDuration: resp.data.minDuration,
updateTime: res.data.updateTime 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 => { }).catch(error => {
this.$message.error(this.$t('display.exam.getTestInformation') + ':' + error.message); 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); this.jump(obj);
}, },
getTrainDetail(obj) { getTrainDetail(obj) {
@ -200,7 +227,7 @@ export default {
obj.trainingId = response.data.userExamQuestionsVOs[0].trainingId; obj.trainingId = response.data.userExamQuestionsVOs[0].trainingId;
obj.id = response.data.userExamQuestionsVOs[0].id; obj.id = response.data.userExamQuestionsVOs[0].id;
} }
this.selectedTraining(obj); this.selectedTraining(obj, 'first');
this.scanCommit(); this.scanCommit();
}).catch(error => { }).catch(error => {
// 50009y // 50009y
@ -271,7 +298,7 @@ export default {
noPreLogout: this.$route.query.noPreLogout noPreLogout: this.$route.query.noPreLogout
}; };
this.$router.replace({query: query}); this.$router.replace({query: query});
this.$emit('refresh'); // this.$emit('refresh');
}, },
overExam() { overExam() {
this.$store.dispatch('exam/isOver').then(isOver => { this.$store.dispatch('exam/isOver').then(isOver => {

View File

@ -30,7 +30,7 @@ import MenuTrainList from '@/views/newMap/displayNew/menuTrainList';
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime'; import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
import { clearSimulation, getSimulationInfoNew, ranAsPlan, exitRunPlan } from '@/api/simulation'; 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'; import { EventBus } from '@/scripts/event-bus';
export default { export default {
@ -118,7 +118,7 @@ export default {
} }
}, },
$route() { $route() {
if (!this.isLesson) { if (!this.isLesson && !this.isExam) {
this.initLoadData(); this.initLoadData();
} }
} }
@ -225,6 +225,7 @@ export default {
loadMapData() { loadMapData() {
if (parseInt(this.mapId)) { if (parseInt(this.mapId)) {
this.loadNewMapDataByGroup(this.group); this.loadNewMapDataByGroup(this.group);
// this.loadNewMapDataByGroup(this.mapId);
} else { } else {
this.endViewLoading(); this.endViewLoading();
} }
@ -234,6 +235,7 @@ export default {
try { try {
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
await loadNewMapDataByGroup(group); await loadNewMapDataByGroup(group);
// await loadMapDataById(group);
await this.$store.dispatch('training/setMapDefaultState'); await this.$store.dispatch('training/setMapDefaultState');
} catch (error) { } catch (error) {
this.$messageBox(`获取地图数据失败: ${error.message}`); this.$messageBox(`获取地图数据失败: ${error.message}`);

View File

@ -4,7 +4,7 @@
<jlmap-visual ref="jlmapVisual" /> <jlmap-visual ref="jlmapVisual" />
<div class="display-draft"> <div class="display-draft">
<el-button-group> <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> </el-button-group>
</div> </div>
<menu-system-time ref="menuSystemTime" :offset="15" :group="group" /> <menu-system-time ref="menuSystemTime" :offset="15" :group="group" />
@ -217,8 +217,8 @@ export default {
.display-draft { .display-draft {
position: absolute; position: absolute;
float: right; float: right;
right: 15px; right: 5px;
bottom: 15px; top: 5px;
} }
.trainExample{ .trainExample{
position: absolute; position: absolute;