Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
3898f66e78
@ -31,6 +31,11 @@ export default {
|
||||
this.subscribeMessage(val);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.roomInvite': function (val) {
|
||||
if (val.creator) {
|
||||
this.subscribeMessage(val);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.beLogoutCount': async function(val) {
|
||||
this.$store.dispatch('disconnect').then(()=>{
|
||||
this.$alert(this.$t('tip.logoutTips'), this.$t('tip.hint'), {
|
||||
@ -74,6 +79,7 @@ export default {
|
||||
this.$refs.deomonTopic.doShow(res);
|
||||
}
|
||||
this.$store.dispatch('socket/setSimulationInvite');
|
||||
this.$store.dispatch('socket/setRoomInvite');
|
||||
}
|
||||
},
|
||||
subscribe() {
|
||||
|
@ -96,8 +96,8 @@ export default {
|
||||
synthesisTrainingTitle: 'Synthesis Training Fast Entrance',
|
||||
pleaseChooseRoom: 'You did not choose a room',
|
||||
inviteJoinRoom: 'Invite you to join the synthesis training!',
|
||||
trainingHasStart: "{name}'s room (starting)",
|
||||
trainingNotStart: "{name}'s room (not starting)",
|
||||
trainingHasStart: "{name}'s room",
|
||||
trainingNotStart: "{name}'s room",
|
||||
inputRoomNumber: 'Please enter the room number.',
|
||||
chooseRoom: 'Choose Room',
|
||||
codeError: 'The captcha is incorrect',
|
||||
|
@ -63,7 +63,7 @@ export default {
|
||||
examRuleMaking: 'Exam Rule Making',
|
||||
testName: 'Test name',
|
||||
inputTestName: 'Please input test name',
|
||||
testScope: 'Test scope',
|
||||
testScope: 'Attribution course',
|
||||
selectTestScope: 'Please select test scope',
|
||||
testDuration: 'duration',
|
||||
testDate: 'Test time',
|
||||
|
@ -97,8 +97,8 @@ export default {
|
||||
synthesisTrainingTitle: '综合演练快速入口',
|
||||
pleaseChooseRoom: '您没有选择房间',
|
||||
inviteJoinRoom: '邀请你加入综合演练!',
|
||||
trainingHasStart: '{name}的房间(已开始)',
|
||||
trainingNotStart: '{name}的房间(未开始)',
|
||||
trainingHasStart: '{name}的房间',
|
||||
trainingNotStart: '{name}的房间',
|
||||
inputRoomNumber: '请输入房间号',
|
||||
chooseRoom: '选择房间',
|
||||
month: '月',
|
||||
|
@ -65,7 +65,7 @@ export default {
|
||||
examRuleMaking: '考试规则制定',
|
||||
testName: '试卷名称',
|
||||
inputTestName: '请填写试卷名称',
|
||||
testScope: '试题范围',
|
||||
testScope: '归属课程',
|
||||
selectTestScope: '请选择试题范围',
|
||||
testDuration: '时长',
|
||||
testDate: '考试时间',
|
||||
|
@ -108,7 +108,11 @@ export default {
|
||||
selected._type = '';
|
||||
}
|
||||
}
|
||||
this.deviceName = deviceType[selected._type] + '-' + selected.name;
|
||||
let name = selected.name;
|
||||
if (selected._type == 'Train') {
|
||||
name = selected.serviceNumber;
|
||||
}
|
||||
this.deviceName = deviceType[selected._type] + '-' + name;
|
||||
this.faultList = deviceFaultType[selected._type];
|
||||
if (this.faultList && this.faultList.length) {
|
||||
this.form.faultType = this.faultList[0].value;
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-if="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-bar v-if="$store.state.training.prdType === '01'" ref="menuBar" :selected="selected" />
|
||||
<!--<menu-station-stand ref="menuStationStand" :selected="selected" />-->
|
||||
<!--<menu-switch ref="menuSwitch" :selected="selected" />-->
|
||||
<!--<menu-signal ref="menuSignal" :selected="selected" />-->
|
||||
<!--<menu-section ref="menuSection" :selected="selected" />-->
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<!--<menu-station ref="menuStation" :selected="selected" />-->
|
||||
<menu-button v-if="isShowBar" ref="menuButton" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" />
|
||||
@ -59,7 +59,7 @@ export default {
|
||||
'width'
|
||||
]),
|
||||
isShowBar() {
|
||||
return this.$store.state.training.prdType === '01' && this.$store.state.training.prdType !== '07';
|
||||
return this.$store.state.training.prdType === '01' || this.$store.state.training.prdType === '02';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -31,7 +31,6 @@
|
||||
class="haerbin_table"
|
||||
highlight-current-row
|
||||
:show-header="false"
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table-column prop="name" style="margin-left:10px" class-name="abc" />
|
||||
</el-table>
|
||||
@ -85,7 +84,31 @@ export default {
|
||||
oldClickObj: null, // 上一次点击对象
|
||||
route: null, // 进路对象
|
||||
centralizedStationList: new Array(15).fill({}),
|
||||
swicthParamList: [
|
||||
ciStationParamList: [],
|
||||
startVirtual: false,
|
||||
endVirtual: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'routeList'
|
||||
]),
|
||||
commandId() {
|
||||
return OperationEvent.Command.commandHaerbin.confirm.domId;
|
||||
},
|
||||
sectionParamList() {
|
||||
return this.$store.state.training.prdType === '01' ? [
|
||||
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show: false },
|
||||
{ name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu, show: false },
|
||||
{ name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menu, show: false },
|
||||
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menu, show: false },
|
||||
{ name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu, show: false }
|
||||
] : [
|
||||
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show: false }
|
||||
];
|
||||
},
|
||||
swicthParamList() {
|
||||
return this.$store.state.training.prdType === '01' ? [
|
||||
{ name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menu, show: false },
|
||||
{ name: '解封道岔', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menu, show: false },
|
||||
{ name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menu, show: false },
|
||||
@ -97,8 +120,16 @@ export default {
|
||||
{ name: '轨区消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menu, show: false },
|
||||
{ name: '轨区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menu, show: false },
|
||||
{ name: '强解区段', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu, show: false }
|
||||
],
|
||||
signalParamList: [
|
||||
] : [
|
||||
{ name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menu, show: false },
|
||||
{ name: '单锁道岔', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menu, show: false },
|
||||
{ name: '转换定位', cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION, operate: OperationEvent.Switch.locate.menu, show: false },
|
||||
{ name: '转换反位', cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, operate: OperationEvent.Switch.reverse.menu, show: false },
|
||||
{ name: '解封区段', cmdType: CMD.Switch.CMD_SWITCH_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu, show: false}
|
||||
];
|
||||
},
|
||||
signalParamList() {
|
||||
return this.$store.state.training.prdType === '01' ? [
|
||||
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.setAutoInterlock.menu, show: false },
|
||||
{ name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.cancelAutoInterlock.menu, show: false },
|
||||
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menu, show: false },
|
||||
@ -107,34 +138,60 @@ export default {
|
||||
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menu, show: false },
|
||||
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menu, show: false },
|
||||
{ name: '关单信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menu, show: false }
|
||||
],
|
||||
routeParamList: [
|
||||
{ name: 'ATP进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menu, show: false },
|
||||
{ name: '取消ATP', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false },
|
||||
{ name: '联锁进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menu, show: false },
|
||||
{ name: '取消联锁', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false },
|
||||
{ name: '引导进路', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.guide.menu, show: false },
|
||||
{ name: '取消引导', cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE, operate: OperationEvent.Signal.humanTrainRoute.menu, show: false }
|
||||
],
|
||||
sectionParamList: [
|
||||
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show: false },
|
||||
{ name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu, show: false },
|
||||
{ name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menu, show: false },
|
||||
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menu, show: false },
|
||||
{ name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu, show: false }
|
||||
],
|
||||
stationParamList: [
|
||||
] : [
|
||||
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.setAutoInterlock.menu, show: false },
|
||||
{ name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.cancelAutoInterlock.menu, show: false },
|
||||
{ name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menu, show: false },
|
||||
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menu, show: false },
|
||||
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menu, show: false },
|
||||
{ name: '重复开放', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menu, show: false },
|
||||
{ name: '关单信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menu, show: false }
|
||||
];
|
||||
},
|
||||
stationParamList() {
|
||||
return this.$store.state.training.prdType === '01' ? [
|
||||
{ name: '关站信号', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false } // 流程未处理
|
||||
],
|
||||
ciStationParamList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'routeList'
|
||||
]),
|
||||
commandId() {
|
||||
return OperationEvent.Command.commandHaerbin.confirm.domId;
|
||||
] : [
|
||||
{ name: '接收控制', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理
|
||||
{ name: '交出控制', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理
|
||||
{ name: '追踪全开', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理
|
||||
{ name: '追踪全关', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理
|
||||
{ name: '关区信号', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理
|
||||
{ name: '自排全开', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理
|
||||
{ name: '自排全关', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理
|
||||
{ name: '关站信号', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false } // 流程未处理
|
||||
];
|
||||
},
|
||||
routeParamList() {
|
||||
if (this.$store.state.training.prdType === '01') {
|
||||
return [
|
||||
{ name: 'ATP进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menu, show: false },
|
||||
{ name: '取消ATP', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false },
|
||||
{ name: '联锁进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menu, show: false },
|
||||
{ name: '取消联锁', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false },
|
||||
{ name: '引导进路', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.guide.menu, show: false },
|
||||
{ name: '取消引导', cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE, operate: OperationEvent.Signal.humanTrainRoute.menu, show: false }
|
||||
];
|
||||
} else if (this.$store.state.training.prdType === '02' && this.startVirtual) {
|
||||
return [
|
||||
{ name: 'ATP进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menu, show: false },
|
||||
{ name: '取消ATP', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }
|
||||
];
|
||||
} else if (this.$store.state.training.prdType === '02' && this.endVirtual) {
|
||||
return [
|
||||
{ name: '联锁进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menu, show: false },
|
||||
{ name: '取消联锁', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false },
|
||||
{ name: '取消引导', cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE, operate: OperationEvent.Signal.humanTrainRoute.menu, show: false },
|
||||
{ name: 'ATP进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menu, show: false },
|
||||
{ name: '取消ATP', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }
|
||||
];
|
||||
} else if (this.$store.state.training.prdType === '02') {
|
||||
return [
|
||||
{ name: '联锁进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menu, show: false },
|
||||
{ name: '取消联锁', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false },
|
||||
{ name: '取消引导', cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE, operate: OperationEvent.Signal.humanTrainRoute.menu, show: false }
|
||||
];
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -289,6 +346,10 @@ export default {
|
||||
this.route = null;
|
||||
this.routeList.forEach(item => {
|
||||
if (item.startSignalCode == this.oldClickObj.code && item.endSignalCode == this.selected.code) {
|
||||
const startSignal = this.$store.getters['map/getDeviceByCode'](item.startSignalCode);
|
||||
const endSignal = this.$store.getters['map/getDeviceByCode'](item.endSignalCode);
|
||||
this.startVirtual = startSignal.virtual;
|
||||
this.endVirtual = endSignal.virtual;
|
||||
this.route = item;
|
||||
}
|
||||
});
|
||||
|
@ -12,12 +12,14 @@
|
||||
<train-set-head ref="trainSetHead" />
|
||||
<train-set-work ref="trainSetWork" />
|
||||
<trainSetWorkATP ref="trainSetWorkATP" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import TrainDelete from './dialog/trainDelete';
|
||||
import TrainDefine from './dialog/trainDefine';
|
||||
import TrainMove from './dialog/trainMove';
|
||||
@ -31,7 +33,8 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
@ -44,7 +47,8 @@ export default {
|
||||
TrainSetPlan,
|
||||
TrainSetHead,
|
||||
TrainSetWork,
|
||||
trainSetWorkATP
|
||||
trainSetWorkATP,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -199,11 +203,11 @@ export default {
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.undeveloped
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.undeveloped
|
||||
handler: this.cancelStoppage
|
||||
}
|
||||
],
|
||||
menuSpeed: [
|
||||
@ -263,44 +267,60 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.stoppage.menu.operation
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.cancelStoppage.menu.operation
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// // 设置故障
|
||||
// setStoppage() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// send: true,
|
||||
// code: this.selected.code,
|
||||
// operation: OperationEvent.Train.stoppage.menu.operation
|
||||
// };
|
||||
|
||||
// mouseCancelState(this.selected);
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// } else {
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// });
|
||||
// },
|
||||
// // 取消故障
|
||||
// cancelStoppage() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// send: true,
|
||||
// code: this.selected.code,
|
||||
// operation: OperationEvent.Train.cancelStoppage.menu.operation
|
||||
// };
|
||||
|
||||
// mouseCancelState(this.selected);
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// } else {
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// });
|
||||
// },
|
||||
// 限速行驶
|
||||
limitSpeed() {
|
||||
const operate = {
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag title="选择仿真" :visible.sync="dialogShow" width="30%" center>
|
||||
<el-input v-model="input" placeholder="请输入仿真号" />
|
||||
<el-checkbox v-if="!isShow" v-model="isNewMap">是否新版地图房间</el-checkbox>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button v-loading="loading" :disabled="!input.length" type="primary" @click="comit">{{ $t('global.confirm') }}</el-button>
|
||||
@ -10,6 +11,7 @@
|
||||
|
||||
<script>
|
||||
import { jointSimulationByPermission } from '@/api/jointSimulation';
|
||||
import { getPermissionJoint } from '@/api/chat';
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
@ -17,7 +19,8 @@ export default {
|
||||
return {
|
||||
input: '',
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
loading: false,
|
||||
isNewMap: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -35,7 +38,11 @@ export default {
|
||||
async comit() {
|
||||
try {
|
||||
this.loading = true;
|
||||
await jointSimulationByPermission(`${this.input}`);
|
||||
if (this.isNewMap || this.isShow) {
|
||||
await jointSimulationByPermission(`${this.input}`);
|
||||
} else {
|
||||
await getPermissionJoint(`${this.input}`);
|
||||
}
|
||||
this.dialogShow = false;
|
||||
} catch (error) {
|
||||
const errorMessage = this.isShow ? this.$t('tip.failedToAddNewRoom') : this.$t('error.scanningError');
|
||||
|
@ -43,6 +43,9 @@ export const deviceFaultType = {
|
||||
],
|
||||
ZcControl:[
|
||||
{label: 'zc故障', value: 'FAULT'}
|
||||
],
|
||||
Train: [
|
||||
{label: '通信异常', value: 'COMMUNICATION_ABNORMAL'}
|
||||
]
|
||||
};
|
||||
/** 设备类型 */
|
||||
|
@ -87,6 +87,9 @@ function handle(state, data) {
|
||||
case 'Simulation_Invite': // 综合演练-仿真邀请消息
|
||||
state.simulationInvite = msg;
|
||||
break;
|
||||
case 'JointTraining_Room_Invite': // 综合演练室-房间邀请消息
|
||||
state.roomInvite = msg;
|
||||
break;
|
||||
case 'Big_Screen_Simulation_DeviceStatus': // 大屏仿真状态数据
|
||||
state.equipmentStatus = msg;
|
||||
break;
|
||||
@ -253,7 +256,8 @@ const socket = {
|
||||
realDeviceInfo: 0, // 真实设备信息
|
||||
beLogoutCount: 0, // 被登出
|
||||
runPlanReloadCount: 0, // 仿真运行图变更
|
||||
memberChangeCount: 0 // 仿真成员变更
|
||||
memberChangeCount: 0, // 仿真成员变更
|
||||
roomInvite: {}
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
@ -298,6 +302,9 @@ const socket = {
|
||||
setSimulationInvite: (state, simulationInvite) => {
|
||||
state.simulationInvite = simulationInvite;
|
||||
},
|
||||
setRoomInvite: (state, roomInvite) => {
|
||||
state.roomInvite = roomInvite;
|
||||
},
|
||||
setRoomSubscribe:(state, roomIsSubscribe)=>{
|
||||
state.roomIsSubscribe = roomIsSubscribe;
|
||||
},
|
||||
@ -341,7 +348,9 @@ const socket = {
|
||||
setSimulationInvite: ({ commit }) => {
|
||||
commit('setSimulationInvite', {});
|
||||
},
|
||||
|
||||
setRoomInvite: ({ commit }) => {
|
||||
commit('setRoomInvite', {});
|
||||
},
|
||||
setMessage: ({ state }, data) => {
|
||||
if (!state.message[data.key]) {
|
||||
state.message[data.key] = [];
|
||||
|
@ -2,9 +2,9 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
|
@ -22,8 +22,7 @@
|
||||
:style="{height: height+'px'}"
|
||||
>
|
||||
<div slot-scope="{ node, data }" class="list-elem custom-tree-node">
|
||||
<span v-if="data.state=='01'">{{ '['+data.map.name+']'+($t('global.trainingNotStart').replace('{name}', data.creator.nickname)) }}</span>
|
||||
<span v-else>{{ '['+data.map.name+']'+($t('global.trainingHasStart').replace('{name}', data.creator.nickname)) }}</span>
|
||||
<span>{{ '['+data.map.name+']'+($t('global.trainingHasStart').replace('{name}', data.creator.nickname)) }}</span>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
@ -43,6 +42,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getjointTrainList, getjointTraining, putJointTrainingSimulationEntrance } from '@/api/chat';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getSimulationListCantainUser } from '@/api/jointSimulation';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { getToken } from '@/utils/auth';
|
||||
@ -115,9 +116,17 @@ export default {
|
||||
},
|
||||
async handleJoinRoom(data) {
|
||||
try {
|
||||
const rest = await getPublishMapInfo(data.map.id);
|
||||
launchFullscreen();
|
||||
const query = { lineCode: data.map.lineCode, mapId: data.map.id, group: data.group};
|
||||
this.$router.push({path:'/jointTrainingNew', query:query});
|
||||
if (rest.data.drawWay) {
|
||||
const query = { lineCode: data.map.lineCode, mapId: data.map.id, group: data.group};
|
||||
this.$router.push({path:'/jointTrainingNew', query:query});
|
||||
} else {
|
||||
await getjointTraining(data.group);
|
||||
const query = { group: data.group, drawWay: rest.data.drawWay };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
|
@ -19,6 +19,10 @@
|
||||
|
||||
<script>
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { getjointTraining, putJointTrainingSimulationEntrance } from '@/api/chat';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { creatSubscribe, clearSubscribe, roomTopic} from '@/utils/stomp';
|
||||
// 仿真邀请消息
|
||||
export default {
|
||||
name: 'DeomonList',
|
||||
@ -27,6 +31,7 @@ export default {
|
||||
dialogShow: false,
|
||||
group: '',
|
||||
roomName: '',
|
||||
state: '',
|
||||
mapId: '',
|
||||
lineCode: '',
|
||||
loading: false
|
||||
@ -46,20 +51,49 @@ export default {
|
||||
doShow(data) {
|
||||
this.roomName = data.creator.nickname;
|
||||
this.group = data.group;
|
||||
this.mapId = data.map.id;
|
||||
this.lineCode = data.map.lineCode;
|
||||
this.mapId = data.mapId || data.map.id;
|
||||
this.lineCode = (data.map || {}).lineCode;
|
||||
this.state = data.state;
|
||||
this.dialogShow = true;
|
||||
this.loading = false;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
async subscribe() {
|
||||
if (!this.$store.state.socket.roomIsSubscribe) {
|
||||
this.clearSubscribe();
|
||||
const header = { group: this.group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(`${roomTopic}\/${this.group}`, header);
|
||||
await this.$store.dispatch('socket/setRoomSubscribe', true);
|
||||
}
|
||||
},
|
||||
async clearSubscribe() {
|
||||
clearSubscribe(`${roomTopic}\/${this.group}`);
|
||||
await this.$store.dispatch('socket/setRoomSubscribe', false);
|
||||
},
|
||||
async handleJoin() {
|
||||
try {
|
||||
this.loading = true;
|
||||
launchFullscreen();
|
||||
const query = { lineCode: this.lineCode, mapId: this.mapId, group: this.group};
|
||||
this.$router.push({path: `/jointTrainingNew`, query: query});
|
||||
const rest = await getPublishMapInfo(this.mapId);
|
||||
const drawWay = rest.data.drawWay;
|
||||
if (drawWay) {
|
||||
launchFullscreen();
|
||||
const query = { lineCode: this.lineCode, mapId: this.mapId, group: this.group};
|
||||
this.$router.push({path: `/jointTrainingNew`, query: query});
|
||||
} else {
|
||||
await getjointTraining(this.group);
|
||||
if (this.state == '02') {
|
||||
this.subscribe();
|
||||
launchFullscreen();
|
||||
const query = { lineCode: rest.data.lineCode, mapId: this.mapId, group: this.group, drawWay: drawWay };
|
||||
await putJointTrainingSimulationEntrance(this.group);
|
||||
this.$router.push({ path: `/jointTraining`, query: query });
|
||||
} else if (this.state == '01') {
|
||||
const query = { group: this.group, drawWay: drawWay };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
}
|
||||
this.dialogShow = false;
|
||||
} catch (e) {
|
||||
this.$messageBox(this.$t('tip.enterTrainingRoomFailed'));
|
||||
|
@ -17,6 +17,8 @@
|
||||
<el-button v-if="!isLocal" type="success" :disabled="disabled" @click="buy">{{ $t('global.buy') }}</el-button>
|
||||
<el-button v-if="hasPermssion && !isComprehensive && !isLocal" type="primary" :disabled="disabled" @click="distribute">{{ $t('global.distributePermission') }}</el-button>
|
||||
<el-button v-show="isStartDemon" :disabled="disabled" type="primary" @click="start">{{ $t('demonstration.startSimulation') }}</el-button>
|
||||
<el-button v-show="isCreateRoom" :disabled="disabled" type="primary" @click="start">{{ $t('demonstration.createRoom') }}</el-button>
|
||||
<el-button v-show="isInRoom" :disabled="disabled" type="primary" @click="joinRoom">{{ $t('demonstration.enterRoom') }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -26,12 +28,13 @@ import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import { PermissionType, UrlConfig } from '@/scripts/ConstDic';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { } from '@/scripts/ConstDic';
|
||||
import { simulationNotify, schedulingNotify, createSimulationNew } from '@/api/simulation';
|
||||
import LimitList from '@/views/components/limits/index';
|
||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import localStore from 'storejs';
|
||||
import { postCreateRoom, getjointTraining } from '@/api/chat';
|
||||
import { checkRoomExistNew } from '@/api/jointTraining';
|
||||
|
||||
export default {
|
||||
name: 'ExamDetailList',
|
||||
@ -57,6 +60,8 @@ export default {
|
||||
prdType: '',
|
||||
pmsList: []
|
||||
},
|
||||
jointShow: false,
|
||||
jointGroup: '',
|
||||
lineCode:'',
|
||||
drawWay: false // 是否新版地图
|
||||
};
|
||||
@ -82,13 +87,19 @@ export default {
|
||||
return this.courseModel.prdType === '03';
|
||||
},
|
||||
isStartDemon() {
|
||||
return this.hasPermssion || this.tryTime > 0;
|
||||
return (this.hasPermssion || this.tryTime > 0) && !(this.courseModel.prdType === '03' && !this.drawWay);
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
isCreateRoom() {
|
||||
return this.courseModel.prdType === '03' && this.hasPermssion && !this.jointShow && !this.drawWay;
|
||||
},
|
||||
isInRoom() {
|
||||
return this.courseModel.prdType === '03' && this.hasPermssion && this.jointShow && !this.drawWay;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -139,6 +150,9 @@ export default {
|
||||
PermissionType: PermissionType.SIMULATION
|
||||
};
|
||||
this.currentPrdType = resp.data.prdType;
|
||||
if (resp.data.prdType === '03' && !this.drawWay) {
|
||||
this.getJointTrainingList();
|
||||
}
|
||||
if (!this.courseModel.pmsList) {
|
||||
this.tryUser = 1;
|
||||
const paras = {
|
||||
@ -167,6 +181,53 @@ export default {
|
||||
refresh() {
|
||||
this.loadInitData();
|
||||
},
|
||||
async getJointTrainingList() {
|
||||
try {
|
||||
if (this.mapId) {
|
||||
const res = await checkRoomExistNew({mapId: this.mapId});
|
||||
this.jointGroup = res.data;
|
||||
this.jointShow = false;
|
||||
if (res.data) {
|
||||
this.jointShow = true;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error, '获取是否拥有综合演练房间');
|
||||
}
|
||||
},
|
||||
async joinRoom() {
|
||||
this.disabled = true;
|
||||
await getjointTraining(this.jointGroup);
|
||||
this.$store.dispatch('socket/setInRoom', true);
|
||||
const query = { lineCode: this.courseModel.lineCode, group: this.jointGroup, drawWay: this.drawWay};
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
},
|
||||
async createRoom() {
|
||||
try {
|
||||
this.disabled = true;
|
||||
const param = {
|
||||
mapId: Number(this.mapId),
|
||||
prdType: this.courseModel.prdType
|
||||
};
|
||||
const res = await postCreateRoom(param);
|
||||
if (res && res.code == 200) {
|
||||
const query = { lineCode: this.courseModel.lineCode, group: res.data, drawWay: this.drawWay };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
} catch (error) {
|
||||
this.disabled = false;
|
||||
if (error.code == 20001) {
|
||||
this.$confirm(this.$t('tip.createRoomFailedHint'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {}).catch(() => {});
|
||||
}
|
||||
if (error.code == 500009) {
|
||||
this.$messageBox(error.message);
|
||||
}
|
||||
}
|
||||
},
|
||||
async enterIntegratedSimulation() {
|
||||
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
|
||||
createSimulationNew(data).then(resp => {
|
||||
@ -210,7 +271,8 @@ export default {
|
||||
if (this.courseModel.prdType == '05') {
|
||||
this.jumpScheduling();
|
||||
} else if (this.courseModel.prdType == '03') {
|
||||
this.enterIntegratedSimulation();
|
||||
this.drawWay && this.enterIntegratedSimulation();
|
||||
!this.drawWay && this.createRoom();
|
||||
} else if (this.courseModel.prdType == '06') {
|
||||
this.enterISCS();
|
||||
} else if (this.courseModel.prdType == '07') {
|
||||
|
@ -230,7 +230,6 @@ export default {
|
||||
},
|
||||
getFailureRulesNew(params) {
|
||||
if (this.dialogShow) {
|
||||
console.log(params, this.dialogShow, '=====');
|
||||
params['lineCode'] = this.$route.query.lineCode;
|
||||
return getFailureRulesNew(params);
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<chat-box ref="chatbox" :group="group" :user-role="userRole" />
|
||||
<!-- :style="{top: offset+'px'}" -->
|
||||
<div class="display-card">
|
||||
<div class="display-card" :style="{top: offset+'px'}">
|
||||
<el-row>
|
||||
<span v-if="countTime" class="display-score">{{ $t('display.demon.trialTime') }} {{ countTime }}</span>
|
||||
</el-row>
|
||||
</div>
|
||||
<!-- :style="{bottom: offsetBottom + 'px'}" -->
|
||||
<div class="display-draft">
|
||||
<div class="display-draft" :style="{bottom: offsetBottom + 'px'}">
|
||||
<el-button-group>
|
||||
<el-button v-if="isShowScheduling && !dataError" type="primary" @click="jumpScheduling">{{ $t('display.demon.dispatchingPlan') }}</el-button>
|
||||
<el-button v-if="!isShowScheduling && !dataError" type="jl3dpassflow" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
|
||||
@ -91,7 +89,8 @@ export default {
|
||||
jl3dname: this.$t('display.demon.threeDimensionalView'),
|
||||
jl3dstation: this.$t('display.demon.threeDimensionalStation'),
|
||||
jl3dmodel: this.$t('display.demon.deviceView'),
|
||||
isShow3dmodel :false
|
||||
isShow3dmodel :false,
|
||||
isGoback: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -139,12 +138,12 @@ export default {
|
||||
'$store.state.socket.simulationRoleList':function(val) {
|
||||
(val || []).forEach(item => {
|
||||
if (item.messageType === 'KICK_OUT' && item.userId == this.$store.state.user.id) {
|
||||
this.back();
|
||||
!this.isGoback && this.back();
|
||||
}
|
||||
});
|
||||
},
|
||||
'$store.state.socket.simulationOver':function(val) {
|
||||
this.back();
|
||||
!this.isGoback && this.back();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -268,6 +267,7 @@ export default {
|
||||
this.$refs.chatbox.clearAllData();
|
||||
},
|
||||
async back() {
|
||||
this.isGoback = true;
|
||||
if (this.projectDevice) {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
|
@ -183,15 +183,15 @@ export default {
|
||||
},
|
||||
'$store.state.training.prdType': function (val) {
|
||||
this.setPosition();
|
||||
if (val === '01' && this.$route.query.lineCode === '06') {
|
||||
if (val == '01' && this.$route.query.lineCode == '06') {
|
||||
this.showSelectStation = true;
|
||||
this.mapViewLoadedOver && this.setShowStation(this.showStation);
|
||||
this.cancelBigScreenMode();
|
||||
} else if (val === '02' && this.$route.query.lineCode === '06') {
|
||||
} else if (val == '02' && this.$route.query.lineCode == '06') {
|
||||
this.showSelectStation = false;
|
||||
this.mapViewLoadedOver && this.setShowStation('');
|
||||
this.cancelBigScreenMode();
|
||||
} else if (val === '07') { // 大屏
|
||||
} else if (val == '07') { // 大屏
|
||||
this.setBigScreenMode();
|
||||
} else {
|
||||
this.cancelBigScreenMode();
|
||||
@ -248,7 +248,7 @@ export default {
|
||||
this.group = this.$route.query.group;
|
||||
this.mapId = this.$route.query.mapId;
|
||||
this.lineCode = this.$route.query.lineCode;
|
||||
this.drawWay = this.$route.query.drawWay;
|
||||
// this.drawWay = this.$route.query.drawWay;
|
||||
Message.closeAll();
|
||||
},
|
||||
async mounted() {
|
||||
@ -458,7 +458,6 @@ export default {
|
||||
resp = await this.getUserRole();
|
||||
}
|
||||
if (resp && resp.code == 200) {
|
||||
this.userRole = resp.data.type || 'AUDIENCE';
|
||||
this.setSimulationPrdType();
|
||||
}
|
||||
await this.getTrainDetail();
|
||||
@ -471,11 +470,33 @@ export default {
|
||||
// Admin 管理员 Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号 IBP:IBP盘
|
||||
switch (this.userRole) {
|
||||
// case 'ADMIN': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'ADMIN'); this.hideIbp(); break;
|
||||
case 'DISPATCHER': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'DISPATCHER'); this.hideIbp(); this.drivingShow = false; break;
|
||||
case 'STATION_SUPERVISOR': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR'); this.hideIbp(); this.drivingShow = false; break;
|
||||
case 'AUDIENCE': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'AUDIENCE'); this.hideIbp(); break;
|
||||
case 'DRIVER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'DRIVER'); break;
|
||||
case 'MAINTAINER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'MAINTAINER'); this.hideIbp(); this.jl3dmaintainershow = true; break;
|
||||
case 'DISPATCHER':
|
||||
this.$store.dispatch('training/setPrdType', '02');
|
||||
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
||||
this.hideIbp();
|
||||
this.drivingShow = false;
|
||||
break;
|
||||
case 'STATION_SUPERVISOR':
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
||||
this.hideIbp();
|
||||
this.drivingShow = false;
|
||||
break;
|
||||
case 'AUDIENCE':
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
||||
this.hideIbp();
|
||||
break;
|
||||
case 'DRIVER':
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
this.$store.dispatch('training/setRoles', 'DRIVER');
|
||||
break;
|
||||
case 'MAINTAINER':
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
this.$store.dispatch('training/setRoles', 'MAINTAINER');
|
||||
this.hideIbp();
|
||||
this.jl3dmaintainershow = true;
|
||||
break;
|
||||
}
|
||||
if (this.isAdmin && this.adminMode) {
|
||||
this.$store.dispatch('training/setPrdType', swch || '02');
|
||||
@ -658,7 +679,7 @@ export default {
|
||||
addSimulationMember() {
|
||||
this.$refs.addMember.doShow();
|
||||
},
|
||||
changeAdminMode(adminMode, swch) {
|
||||
changeAdminMode(adminMode, swch) { // (管理/演练)模式
|
||||
this.adminMode = adminMode;
|
||||
this.setSimulationPrdType(swch);
|
||||
},
|
||||
|
@ -5,7 +5,6 @@
|
||||
v-model="swch"
|
||||
size="small"
|
||||
style="width: 100px;"
|
||||
:placeholder="this.$t('rules.productTypeInput')"
|
||||
@change="switchMode"
|
||||
>
|
||||
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
@ -19,7 +18,7 @@
|
||||
</template>
|
||||
<template v-if="isAdmin && adminMode">
|
||||
<el-button v-if="!runing && !dataError" size="small" type="warning" @click="loadRunPlan">
|
||||
{{ $t('joinTraining.runGraphLoading') }}</el-button>
|
||||
{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
|
||||
</template>
|
||||
<template v-if="isAdmin && adminMode">
|
||||
<el-button v-if="mode==OperateMode.FAULT && !dataError" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
|
||||
|
@ -50,7 +50,7 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
computedStyle(member) {
|
||||
const userId = this.memberData[member.memberId].userId;
|
||||
const userId = (this.memberData[member.memberId] || {}).userId;
|
||||
if (userId && userId == this.userId) {
|
||||
return {color: 'red'};
|
||||
} else {
|
||||
|
@ -258,10 +258,10 @@ export default {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.startDate) {
|
||||
this.form.startDate = this.getDate(this.form.startDate);
|
||||
this.form.startTime = this.getDate(this.form.startDate);
|
||||
}
|
||||
if (this.form.endDate) {
|
||||
this.form.endDate = this.getDate(this.form.endDate);
|
||||
this.form.endTime = this.getDate(this.form.endDate);
|
||||
}
|
||||
this.form['trial'] = this.trial;
|
||||
this.$store.dispatch('exam/setCourseDetail', this.form);
|
||||
@ -273,10 +273,10 @@ export default {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.startDate) {
|
||||
this.form.startDate = this.getDate(this.form.startDate);
|
||||
this.form.startTime = this.getDate(this.form.startDate);
|
||||
}
|
||||
if (this.form.endDate) {
|
||||
this.form.endDate = this.getDate(this.form.endDate);
|
||||
this.form.endTime = this.getDate(this.form.endDate);
|
||||
}
|
||||
this.form['trial'] = this.trial;
|
||||
this.$store.dispatch('exam/setCourseDetail', this.form);
|
||||
|
@ -136,8 +136,8 @@ export default {
|
||||
name: data.name, // 名称
|
||||
passingPoint: Number(data.passMark), // 及格分
|
||||
remarks: data.desc, // 考试说明
|
||||
endTime: data.endDate,
|
||||
startTime: data.startDate,
|
||||
endTime: data.endTime,
|
||||
startTime: data.startTime,
|
||||
type: data.type, // 类型
|
||||
trial: data.trial == 2 // 权限判断
|
||||
};
|
||||
|
@ -211,8 +211,8 @@ export default {
|
||||
name: this.course.name, // 名称
|
||||
passingPoint: Number(this.course.passMark), // 及格分
|
||||
remarks: this.course.desc, // 考试说明
|
||||
endTime: this.course.endDate,
|
||||
startTime: this.course.startDate,
|
||||
endTime: this.course.endTime,
|
||||
startTime: this.course.startTime,
|
||||
type: this.course.type, // 类型
|
||||
trial: this.course.trial == 2 // 权限判断
|
||||
};
|
||||
|
@ -7,7 +7,7 @@
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { kickOutMember } from '@/api/jointSimulation';
|
||||
import { putJointTrainingUserkicked } from '@/api/chat';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -17,18 +17,14 @@ export default {
|
||||
clickUserId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
menuDisabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// menu: [{
|
||||
// label: this.$t('trainRoom.kickOutTheRoom'),
|
||||
// handler: this.kicked
|
||||
// }]
|
||||
menu: [{
|
||||
label: this.$t('trainRoom.kickOutTheRoom'),
|
||||
handler: this.kicked
|
||||
}]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -40,13 +36,6 @@ export default {
|
||||
},
|
||||
drawWay() {
|
||||
return this.$route.query.drawWay + '';
|
||||
},
|
||||
menu() {
|
||||
return [{
|
||||
label: this.$t('trainRoom.kickOutTheRoom'),
|
||||
handler: this.kicked,
|
||||
disabled: this.menuDisabled
|
||||
}];
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -83,7 +72,7 @@ export default {
|
||||
},
|
||||
async kicked() {
|
||||
try {
|
||||
await kickOutMember(this.$route.query.group, this.clickUserId);
|
||||
await putJointTrainingUserkicked(this.clickUserId, this.$route.query.group);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
@ -16,13 +16,13 @@
|
||||
@node-contextmenu="handleShowContextMenu"
|
||||
>
|
||||
<span slot-scope="{ node, data }">
|
||||
<span v-if="node.data.online" style="color: green;">{{ data.nickName + (data.admin? '【管理员】':'') + (data.referee? '【裁判员】':'') + (data.deviceVO? ` -- (${data.deviceVO.code})`:'') }}</span>
|
||||
<span v-else style="color: #ccc;">{{ data.nickName + (data.admin? '【管理员】':'') + (data.referee? '【裁判员】':'') + (data.deviceVO? ` -- (${data.deviceVO.code})`:'') }}</span>
|
||||
<span v-if="node.data.inRoom" style="color: green;">{{ data.nickName }}</span>
|
||||
<span v-else style="color: #ccc;">{{ data.nickName }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<content-menu ref="menu" :click-user-id="clickUserId" :menu-disabled="menuDisabled" />
|
||||
<content-menu ref="menu" :click-user-id="clickUserId" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -46,19 +46,12 @@ export default {
|
||||
height: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
isAdmin: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
filterText: '',
|
||||
clickUserId: '',
|
||||
menuDisabled: false
|
||||
clickUserId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -86,9 +79,8 @@ export default {
|
||||
x: e.clientX,
|
||||
y: e.clientY
|
||||
};
|
||||
if (this.isAdmin) {
|
||||
this.clickUserId = `${obj.userId || ''}`;
|
||||
this.menuDisabled = !!obj.deviceVO;
|
||||
if (this.userId == this.room.creatorId) {
|
||||
this.clickUserId = `${obj.id || ''}`;
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position, menu: DeviceMenu.JointRoom });
|
||||
}
|
||||
}
|
||||
@ -129,8 +121,8 @@ export default {
|
||||
&--list {
|
||||
background: #fff;
|
||||
height: auto;
|
||||
min-height: calc(100% - 200px);
|
||||
max-height: calc(100% - 200px);
|
||||
min-height: calc(100% - 40px);
|
||||
max-height: calc(100% - 40px);
|
||||
border-bottom: 1px #ccc solid;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
|
Loading…
Reference in New Issue
Block a user