This commit is contained in:
sunzhenyu 2020-07-14 09:25:11 +08:00
commit 006fd8f0a3
67 changed files with 951 additions and 771 deletions

View File

@ -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() {

View File

@ -142,7 +142,8 @@ export function loadDraftScript(scriptId, memberId, group) {
/** 剧本预览选择角色 */
export function loadDraftScriptNew(memberId, group) {
return request({
url: `/simulation/${group}/choosePlay?memberId=${memberId}`,
// url: `/simulation/${group}/choosePlay?memberId=${memberId}`,
url: `/api/scriptSimulation/${group}/chooseMember/${memberId}/StartScript`,
method: 'put'
});
}

View File

@ -77,9 +77,9 @@ export function getAllDeviceInProject(params) {
});
}
/** 添加/修改ibp设备配置 */
export function setIbpConfig(id, data) {
export function setVrIbpConfig(id, data) {
return request({
url: `/api/device/${id}/config/ibp`,
url: `/api/device/${id}/config/vribp`,
method: 'put',
data: data
});

View File

@ -757,13 +757,6 @@ export function getTrainDetailBytripNumber(group, params) {
params: params
});
}
/** 根据memberId获取综合演练角色信息 */
export function getMemberInfo(group, memberId) {
return request({
url: `/simulation/${group}/${memberId}/memberInfo`,
method: 'get'
});
}
/** 获取新版综合仿真仿真成员列表 */
export function getSimulationMemberList(group) {
return request({

View File

@ -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',

View File

@ -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',

View File

@ -97,8 +97,8 @@ export default {
synthesisTrainingTitle: '综合演练快速入口',
pleaseChooseRoom: '您没有选择房间',
inviteJoinRoom: '邀请你加入综合演练!',
trainingHasStart: '{name}的房间(已开始)',
trainingNotStart: '{name}的房间(未开始)',
trainingHasStart: '{name}的房间',
trainingNotStart: '{name}的房间',
inputRoomNumber: '请输入房间号',
chooseRoom: '选择房间',
month: '月',

View File

@ -65,7 +65,7 @@ export default {
examRuleMaking: '考试规则制定',
testName: '试卷名称',
inputTestName: '请填写试卷名称',
testScope: '试题范围',
testScope: '归属课程',
selectTestScope: '请选择试题范围',
testDuration: '时长',
testDate: '考试时间',

View File

@ -12,12 +12,14 @@
<train-set-head ref="trainSetHead" />
<train-set-work ref="trainSetWork" />
<train-flag ref="trainFlag" />
<set-fault ref="setFault" pop-class="beijing-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 { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { DeviceMenu } from '@/scripts/ConstDic';
@ -31,9 +33,10 @@ import TrainDeletePlan from './dialog/trainDeletePlan';
import TrainSetHead from './dialog/trainSetHead';
import TrainSetWork from './dialog/trainSetWork';
import TrainFlag from './dialog/trainFlag';
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
// import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
@ -50,7 +53,8 @@ export default {
TrainDeletePlan,
TrainSetHead,
TrainSetWork,
TrainFlag
TrainFlag,
SetFault
},
props: {
selected: {
@ -216,6 +220,14 @@ export default {
{
label: '取消通信故障',
handler: this.cancelStoppage
},
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
}
],
menuSpeed: [
@ -261,7 +273,8 @@ export default {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce, ...this.menuSpeed];
this.menu = [...this.menuForce];
// ...this.menuSpeed
}
// this.menu = menuConvert(this.menu);
@ -282,42 +295,30 @@ 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/next', 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(operate);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Train.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', 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(operate);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
nextStation() {
commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
routeBlockRun() {
commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
//

View File

@ -2,18 +2,21 @@
<div>
<pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" pop-class="chengdou-01__system" />
<set-fault ref="setFault" pop-class="chengdou-01__system" />
</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 { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'MenuTrain',
@ -22,7 +25,8 @@ export default {
NoticeInfo
},
mixins: [
CancelMouseState
CancelMouseState,
SetFault
],
props: {
selected: {
@ -129,6 +133,14 @@ export default {
{
label: '取消通信故障',
handler: this.cancelStoppage
},
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
}
],
menuSpeed: [
@ -190,44 +202,30 @@ export default {
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Train.stoppage.menu.operation
};
this.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(operate);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Train.cancelStoppage.menu.operation
};
this.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(operate);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
nextStation() {
commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
routeBlockRun() {
commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
//

View File

@ -8,12 +8,14 @@
<train-move-number ref="trainMoveNumber" />
<train-delete-number ref="trainDeleteNumber" />
<train-detail-info ref="trainDetailInfo" />
<set-fault ref="setFault" pop-class="chengdou-03__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 { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import TrainControl from './dialog/trainControl';
@ -26,6 +28,7 @@ import CancelMouseState from '@/mixin/CancelMouseState';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'MenuTrain',
@ -37,7 +40,8 @@ export default {
TrainMoveNumber,
TrainCreateNumber,
TrainDeleteNumber,
TrainDetailInfo
TrainDetailInfo,
SetFault
},
mixins: [
CancelMouseState
@ -112,6 +116,14 @@ export default {
{
label: '取消通信故障',
handler: this.cancelStoppage
},
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
}
],
menuSpeed: [
@ -170,44 +182,30 @@ export default {
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Train.stoppage.menu.operation
};
this.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(operate);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Train.cancelStoppage.menu.operation
};
this.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(operate);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
nextStation() {
commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
routeBlockRun() {
commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
//

View File

@ -62,7 +62,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {getMemberInfo} from '@/api/simulation';
import {SimulationType} from '@/scripts/ConstDic';
export default {
name: 'RequestControl',
@ -191,11 +191,23 @@ export default {
});
},
doShow(msgHead) {
getMemberInfo(this.$route.query.group, msgHead.sourceMemberId).then(resp => {
if (resp.data && resp.data.deviceName && resp.data.name) {
this.requestInfo = `${ resp.data.deviceName}(${resp.data.name})`;
const member = this.$store.state.training.memberData[msgHead.sourceMemberId];
const simulationUserList = this.$store.state.training.simulationUserList;
if (member) {
let info = SimulationType[member.type];
if (member.deviceCode) {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
info = info + `(${device.name})`;
}
});
if (member.userId) {
simulationUserList.forEach(item => {
if (item.userId === member.userId) {
info = info + '-' + item.nickName;
}
});
}
this.requestInfo = info;
}
this.dialogShow = true;
this.disabledAgree = true;
this.createTimer();

View File

@ -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;

View File

@ -405,6 +405,16 @@ export const menuOperate = {
createPlanTrain:{
operation: OperationEvent.Train.createPlanTrain.menu.operation,
cmdType: CMD.Section.CMD_Train_Init_Plan
},
// 确认列车行驶之前方站台
nextStation:{
operation: OperationEvent.Train.nextStation.menu.operation,
cmdType: CMD.Driver.CMD_DRIVER_NEXT_STATION
},
// 进路闭塞法行车
routeBlockRun:{
operation: OperationEvent.Train.routeBlockRun.menu.operation,
cmdType: CMD.Driver.CMD_DRIVER_BLOCK_ROUTE
}
}

View File

@ -12,12 +12,14 @@
<train-set-head ref="trainSetHead" />
<train-set-work ref="trainSetWork" />
<trainSetWorkATP ref="trainSetWorkATP" />
<set-fault ref="setFault" pop-class="foshan-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';
@ -35,6 +37,7 @@ 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 { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'MenuTrain',
@ -50,7 +53,8 @@ export default {
// TrainDeletePlan,
TrainSetHead,
TrainSetWork,
trainSetWorkATP
trainSetWorkATP,
SetFault
},
props: {
selected: {
@ -121,6 +125,14 @@ export default {
{
label: '取消通信故障',
handler: this.cancelStoppage
},
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
}
],
menuSpeed: [
@ -180,42 +192,30 @@ export default {
},
//
setStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.stoppage.menu.operation,
cmdType: CMD.Train.CMD_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/nextNew', step).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 step = {
start: true,
operation: OperationEvent.Train.cancelStoppage.menu.operation,
cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/nextNew', step).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();
});
},
nextStation() {
commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
routeBlockRun() {
commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
//

View File

@ -62,7 +62,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {getMemberInfo} from '@/api/simulation';
import {SimulationType} from '@/scripts/ConstDic';
export default {
name: 'RequestControl',
@ -190,11 +190,23 @@ export default {
});
},
doShow(msgHead) {
getMemberInfo(this.$route.query.group, msgHead.sourceMemberId).then(resp => {
if (resp.data && resp.data.deviceName && resp.data.name) {
this.requestInfo = `${ resp.data.deviceName}(${resp.data.name})`;
const member = this.$store.state.training.memberData[msgHead.sourceMemberId];
const simulationUserList = this.$store.state.training.simulationUserList;
if (member) {
let info = SimulationType[member.type];
if (member.deviceCode) {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
info = info + `(${device.name})`;
}
});
if (member.userId) {
simulationUserList.forEach(item => {
if (item.userId === member.userId) {
info = info + '-' + item.nickName;
}
});
}
this.requestInfo = info;
}
this.dialogShow = true;
this.disabledAgree = true;
this.createTimer();

View File

@ -7,12 +7,14 @@
<train-move ref="trainMove" />
<train-switch ref="trainSwitch" />
<train-edit-number ref="trainEditNumber" />
<set-fault ref="setFault" pop-class="fuzhou-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 { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
@ -23,6 +25,7 @@ import TrainMove from './dialog/trainMove';
import TrainSwitch from './dialog/trainSwitch';
import TrainEditNumber from './dialog/trainEditNumber';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'MenuTrain',
@ -33,7 +36,8 @@ export default {
TrainDelete,
TrainMove,
TrainSwitch,
TrainEditNumber
TrainEditNumber,
SetFault
},
props: {
selected: {
@ -84,13 +88,20 @@ export default {
menuForce: [
{
label: this.$t('menu.menuTrain.setCommunicationFault'),
handler: this.undeveloped,
cmdType:CMD.Train.CMD_TRAIN_ADD_FAULT
handler: this.setStoppage
},
{
label: this.$t('menu.menuTrain.cancelCommunicationFault'),
handler: this.undeveloped,
cmdType:CMD.Train.CMD_TRAIN_REMOVE_FAULT
},
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
}
],
menuSpeed: [
@ -145,7 +156,8 @@ export default {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce, ...this.menuSpeed];
this.menu = [...this.menuForce];
// ...this.menuSpeed
}
},
doShow(point) {
@ -164,44 +176,31 @@ export default {
},
//
setStoppage() {
// const step = {
// start: true,
// operation: OperationEvent.Train.stoppage.menu.operation,
// cmdType: CMD.Train.CMD_STOPPAGE,
// param: {
// code: this.selected.code
// }
// };
// this.$store.dispatch('training/next', step).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// } else {
// this.$refs.noticeInfo.doShow(step);
// }
// }).catch(() => {
// this.$refs.noticeInfo.doShow(step);
// });
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
});
},
//
cancelStoppage() {
// const step = {
// start: true,
//
// operation: OperationEvent.Train.cancelStoppage.menu.operation,
// cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
// param: {
// code: this.selected.code
// }
// };
// this.$store.dispatch('training/next', step).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// } else {
// this.$refs.noticeInfo.doShow(step);
// }
// }).catch(() => {
// this.$refs.noticeInfo.doShow(step);
// });
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
},
nextStation() {
commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
routeBlockRun() {
commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
//
limitSpeed() {

View File

@ -62,7 +62,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {getMemberInfo} from '@/api/simulation';
import {SimulationType} from '@/scripts/ConstDic';
export default {
name: 'RequestControl',
@ -190,11 +190,23 @@ export default {
});
},
doShow(msgHead) {
getMemberInfo(this.$route.query.group, msgHead.sourceMemberId).then(resp => {
if (resp.data && resp.data.deviceName && resp.data.name) {
this.requestInfo = `${ resp.data.deviceName}(${resp.data.name})`;
const member = this.$store.state.training.memberData[msgHead.sourceMemberId];
const simulationUserList = this.$store.state.training.simulationUserList;
if (member) {
let info = SimulationType[member.type];
if (member.deviceCode) {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
info = info + `(${device.name})`;
}
});
if (member.userId) {
simulationUserList.forEach(item => {
if (item.userId === member.userId) {
info = info + '-' + item.nickName;
}
});
}
this.requestInfo = info;
}
this.dialogShow = true;
this.disabledAgree = true;
this.createTimer();

View File

@ -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: {

View File

@ -7,7 +7,7 @@
<el-row class="nav-border-row">
<template v-for="(item, index) in centralizedStationList">
<div :key="index" class="nav-border-row row-width-box flex-row">
<div v-if="item.name" :id="item.operate.domId" class="fake-button-active" :class="{'active': item.show}" @click="clickCommand(item)">{{ item.name }}</div>
<div v-if="item.name" :id="item.operate.domId" class="fake-button-active" :class="{'active': item.show}" :style="{background: item.securityCommand ? '#87CEFA': '#E0E0E0'}" @click="clickCommand(item)">{{ item.name }}</div>
<div v-else class="fake-button" />
</div>
</template>
@ -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,48 +84,9 @@ export default {
oldClickObj: null, //
route: null, //
centralizedStationList: new Array(15).fill({}),
swicthParamList: [
{ 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 },
{ 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_BLOCK, operate: OperationEvent.Section.lock.menu, show: false },
{ name: '解封区段', cmdType: CMD.Switch.CMD_SWITCH_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu, show: false },
{ 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.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_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menu, show: false },
{ 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.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false } //
],
ciStationParamList: []
ciStationParamList: [],
startVirtual: false,
endVirtual: false
};
},
computed: {
@ -135,6 +95,118 @@ export default {
]),
commandId() {
return OperationEvent.Command.commandHaerbin.confirm.domId;
},
basicParamList() {
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_BLOCK, operate: OperationEvent.Section.lock.menu, show:false },
{ name: '强行站控', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false, securityCommand: true },
{ name: '重启另解', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false, securityCommand: true },
{ name: '追踪全开', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false },
{ name: '追踪全关', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false },
{ name: '关区信号', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false },
{ name: '自排全开', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false },
{ name: '自排全关', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false }
] : [];
},
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, securityCommand: true },
{ name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menu, show: false, securityCommand: true },
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menu, show: false, securityCommand: true },
{ name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu, show: false, securityCommand: true }
] : [
{ 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, securityCommand: true },
{ name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menu, show: false, securityCommand: true },
{ 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_BLOCK, operate: OperationEvent.Section.lock.menu, show: false },
{ name: '解封区段', cmdType: CMD.Switch.CMD_SWITCH_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu, show: false, securityCommand: true },
{ name: '轨区消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menu, show: false, securityCommand: true },
{ name: '轨区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menu, show: false, securityCommand: true},
{ name: '强解区段', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu, show: false, securityCommand: true }
] : [
{ 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 },
{ name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menu, show: false },
{ name: '重复开放', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menu, show: false },
{ 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, securityCommand: true },
{ name: '关单信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menu, show: false }
] : [
{ 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.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, show: false } //
] : [
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false },
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false },
{ name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, show: false },
{ name: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, show: false },
{ name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false },
{ name: '自排全开', cmdType: CMD.Section.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, show: false },
{ name: '自排全关', cmdType: CMD.Section.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, show: false },
{ name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.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, securityCommand: true },
{ 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 }
];
} else {
return [];
}
}
},
watch: {
@ -176,9 +248,14 @@ export default {
}).catch((error) => {
this.$refs.noticeInfo.doShow({}, error.message);
});
} else {
this.handleBasicMenu();
}
}
},
mounted() {
this.handleBasicMenu();
},
methods: {
//
deviceHighLight(device, flag) {
@ -289,6 +366,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;
}
});
@ -316,6 +397,18 @@ export default {
speedLimitValue: '5'
};
},
handleBasicMenu() {
this.centralizedStationList = new Array(15).fill({});
this.basicParamList.forEach((basic, index) => {
this.centralizedStationList[index] = basic;
});
this.tempData = [];
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
this.tempData.push(station);
this.param = {
stationCode: this.$store.state.map.showCentralizedStationCode
};
},
handleStationMenu() {
this.centralizedStationList = new Array(15).fill({});
this.stationParamList.forEach((swicth, index) => {
@ -348,7 +441,6 @@ export default {
const step = {
over: true,
cmdType: this.cmdType,
// operation: this.operate,
operation: OperationEvent.Command.commandHaerbin.confirm.operation,
param: this.param
};

View File

@ -7,12 +7,14 @@
<train-move ref="trainMove" />
<train-switch ref="trainSwitch" />
<train-edit-number ref="trainEditNumber" />
<set-fault ref="setFault" pop-class="haerbin-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 { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
@ -23,6 +25,7 @@ import TrainMove from './dialog/trainMove';
import TrainSwitch from './dialog/trainSwitch';
import TrainEditNumber from './dialog/trainEditNumber';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'MenuTrain',
@ -33,7 +36,8 @@ export default {
TrainDelete,
TrainMove,
TrainSwitch,
TrainEditNumber
TrainEditNumber,
SetFault
},
props: {
selected: {
@ -64,19 +68,26 @@ export default {
},
menuForce: [
{
label: this.$t('menu.menuTrain.setCommunicationFault'),
handler: this.setStoppage,
cmdType:CMD.Train.CMD_TRAIN_ADD_FAULT
label: '设置故障',
handler: this.setStoppage
},
{
label: this.$t('menu.menuTrain.cancelCommunicationFault'),
handler: this.cancelStoppage,
cmdType:CMD.Train.CMD_TRAIN_REMOVE_FAULT
},
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
}
],
menuSpeed: [
{
label: this.$t('menu.menuTrain.confirmRunToFrontStation'),
label: '限速行驶',
handler: this.limitSpeed,
cmdType:CMD.Train.CMD_TRAIN_MANUAL_LIMIT_DRIVE
}
@ -118,7 +129,8 @@ export default {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce, ...this.menuSpeed];
this.menu = [...this.menuForce];
// ...this.menuSpeed
}
// this.menu = MenuContextHandler.covert(this.menu);
@ -139,44 +151,18 @@ export default {
},
//
setStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.stoppage.menu.operation,
cmdType: CMD.Train.CMD_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).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(step);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.cancelStoppage.menu.operation,
cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).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(step);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
@ -200,6 +186,18 @@ export default {
this.$refs.noticeInfo.doShow(step);
});
},
nextStation() {
commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
routeBlockRun() {
commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
//
addTrainId() {
const step = {

View File

@ -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,16 +203,24 @@ export default {
menuForce: [
{
label: '设置故障',
handler: this.undeveloped
handler: this.setStoppage
},
{
label: '取消故障',
handler: this.undeveloped
handler: this.cancelStoppage
},
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
}
],
menuSpeed: [
{
label: '确认运行至前方站',
label: '限速行驶',
handler: this.limitSpeed
}
]
@ -263,44 +275,72 @@ 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();
});
},
nextStation() {
commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
routeBlockRun() {
commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
// //
// 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 = {

View File

@ -8,12 +8,14 @@
<train-switch ref="trainSwitch" />
<train-edit-number ref="trainEditNumber" />
<train-detail ref="trainDetail" />
<set-fault ref="setFault" pop-class="xian-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 { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
@ -25,6 +27,7 @@ import TrainSwitch from './dialog/trainSwitch';
import TrainEditNumber from './dialog/trainEditNumber';
import TrainDetail from './dialog/trainDetail';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'MenuTrain',
@ -36,7 +39,8 @@ export default {
TrainMove,
TrainSwitch,
TrainEditNumber,
TrainDetail
TrainDetail,
SetFault
},
props: {
selected: {
@ -102,18 +106,25 @@ export default {
menuForce: [
{
label: '设置故障',
handler: this.undeveloped,
cmdType:CMD.Train.CMD_TRAIN_ADD_FAULT
handler: this.setStoppage
},
{
label: '取消故障',
handler: this.undeveloped,
cmdType:CMD.Train.CMD_TRAIN_REMOVE_FAULT
},
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
}
],
menuSpeed: [
{
label: this.$t('menu.menuTrain.confirmRunToFrontStation'),
label: '限速行驶',
handler: this.limitSpeed,
cmdType:CMD.Train.CMD_TRAIN_MANUAL_LIMIT_DRIVE
}
@ -154,7 +165,8 @@ export default {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce, ...this.menuSpeed];
this.menu = [...this.menuForce];
// ...this.menuSpeed
}
},
doShow(point) {
@ -172,42 +184,18 @@ export default {
},
//
setStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.stoppage.menu.operation,
cmdType: CMD.Train.CMD_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/nextNew', step).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 step = {
start: true,
operation: OperationEvent.Train.cancelStoppage.menu.operation,
cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/nextNew', step).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();
});
},
//
@ -310,6 +298,18 @@ export default {
}
});
},
nextStation() {
commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
routeBlockRun() {
commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {

View File

@ -62,7 +62,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {getMemberInfo} from '@/api/simulation';
import {SimulationType} from '@/scripts/ConstDic';
export default {
name: 'RequestControl',
@ -190,11 +190,23 @@ export default {
});
},
doShow(msgHead) {
getMemberInfo(this.$route.query.group, msgHead.sourceMemberId).then(resp => {
if (resp.data && resp.data.deviceName && resp.data.name) {
this.requestInfo = `${ resp.data.deviceName}(${resp.data.name})`;
const member = this.$store.state.training.memberData[msgHead.sourceMemberId];
const simulationUserList = this.$store.state.training.simulationUserList;
if (member) {
let info = SimulationType[member.type];
if (member.deviceCode) {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
info = info + `(${device.name})`;
}
});
if (member.userId) {
simulationUserList.forEach(item => {
if (item.userId === member.userId) {
info = info + '-' + item.nickName;
}
});
}
this.requestInfo = info;
}
this.dialogShow = true;
this.disabledAgree = true;
this.createTimer();

View File

@ -10,12 +10,14 @@
<train-set-work ref="trainSetWork" />
<trainSetWorkATP ref="trainSetWorkATP" />
<train-destination ref="trainDestination" />
<set-fault ref="setFault" pop-class="xian-02__system" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu/index';
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';
@ -30,6 +32,7 @@ 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 {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'MenuTrain',
@ -43,7 +46,8 @@ export default {
TrainSetHead,
TrainSetWork,
trainSetWorkATP,
TrainDestination
TrainDestination,
SetFault
},
props: {
selected: {
@ -213,16 +217,24 @@ export default {
menuForce: [
{
label: '设置故障',
handler: this.undeveloped
handler: this.setStoppage
},
{
label: '取消故障',
handler: this.undeveloped
},
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
}
],
menuSpeed: [
{
label: '确认运行至前方站',
label: '限速行驶',
handler: this.limitSpeed
}
]
@ -280,40 +292,30 @@ export default {
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Train.stoppage.menu.operation
};
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(operate);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Train.cancelStoppage.menu.operation
};
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(operate);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
nextStation() {
commitOperate(menuOperate.Train.nextStation, { code: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
routeBlockRun() {
commitOperate(menuOperate.Train.routeBlockRun, { code: this.selected.code }, 3).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
//

View File

@ -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');

View File

@ -59,7 +59,6 @@ function getRouteInfo(to) {
}
function handleRoute(to, next, loginPath) {
console.log(store.getters.roles, 'roles');
if (store.getters.roles.length == 0) {
store.dispatch('GetInfo', getToken()).then(res => {
// 根据roles权限生成可访问的路由表
@ -88,8 +87,6 @@ function handleRoute(to, next, loginPath) {
} else {
next();
}
// } else {
// next({ path: '/401', replace: true, query: { noGoBack: true } });
// }
}
}

View File

@ -27,7 +27,6 @@ const TrainRoom = () => import('@/views/trainRoom/index');
const JointTraining = () => import('@/views/jointTraining/index');
const JointTrainingNew = () => import('@/views/newMap/jointTrainingNew/index');
// const Error401 = () => import('@/views/error-page/401');
const Errpr404 = () => import('@/views/error-page/404');
const Dictionary = () => import('@/views/system/dictionary/index');

View File

@ -23,7 +23,6 @@ const TrainRoom = () => import('@/views/trainRoom/index');
const JointTraining = () => import('@/views/jointTraining/index');
const JointTrainingNew = () => import('@/views/newMap/jointTrainingNew/index');
// const Error401 = () => import('@/views/error-page/401');
const Errpr404 = () => import('@/views/error-page/404');
const Dictionary = () => import('@/views/system/dictionary/index');
@ -194,11 +193,6 @@ export const constantRoutes = [
component: Jlmap3dTrain,
hidden: true
},
// {
// path: '/401',
// component: Error401,
// hidden: true
// },
{
path: '/404',
component: Errpr404,

View File

@ -148,7 +148,8 @@ export default {
{ label: '车站', value: 'Station' },
{ label: '控制模式', value: 'ControlConvertMenu' },
{ label: '车次窗', value: 'TrainWindow' },
{ label: '全线限速', value: 'LimitControl' }
{ label: '全线限速', value: 'LimitControl' },
{ label: '司机', value: 'Driver' }
],
simulationDeviceList:[
@ -218,6 +219,7 @@ export default {
{label: '信号机', value:'SIGNAL'},
{label: '屏蔽门', value: 'PSD'},
{label: 'IBP盘', value: 'IBP'},
{label: '虚拟IBP盘', value: 'VR_IBP'},
{label: '教员机', value: 'IM'},
{label: '行调工作站', value: 'CW'},
{label: '现地工作站', value: 'LW'},
@ -227,7 +229,8 @@ export default {
{label: '现地综合监控', value: 'ISCS_LW'},
{label: '中心综合监控', value: 'ISCS_CW'},
{label: '车辆段终端', value: 'DEPOT'},
{label: '虚拟CCTV', value: 'CCTV'}
{label: '虚拟CCTV', value: 'CCTV'},
{label: 'PLC网关', value: 'PLC_GATEWAY'}
]
}
};

View File

@ -2218,6 +2218,13 @@ export const TrainType = {
HEAD: '头码车',
MANUAL: '人工车'
};
/** 仿真成员类型 */
export const SimulationType = {
DISPATCHER: '行调',
STATION_SUPERVISOR: '车站值班员',
DRIVER: '司机',
MAINTAINER: '通号'
};
export const UrlConfig = {
display: '/display',
displayNew: '/displayNew',

View File

@ -1,6 +1,6 @@
export const FaultStatusEnum = {
Section: {
'01': '占用',
'01': '占用'
},
Switch: {

View File

@ -1,9 +1,5 @@
export default {
Switch: {
/** 设置故障 */
CMD_SWITCH_ADD_FAULT: {value:'Switch_Add_Fault', label: '设置道岔故障'},
/** 清除故障 */
CMD_SWITCH_REMOVE_FAULT: {value:'Switch_Remove_Fault', label: '清除道岔故障'},
/** 单锁 */
CMD_SWITCH_SINGLE_LOCK: {value:'Switch_Single_Lock', label: '单锁'},
/** 单解 */
@ -75,15 +71,13 @@ export default {
CMD_DRIVER_ATP_CHANGE:{value:'Driver_ATP_Change', label:'改变ATP状态'},
CMD_DRIVER_DRIVE_MODE_CHANGE:{value:'Driver_Drive_Mode_Change', label:'改变列车运行模式'},
CMD_DRIVER_CHANGE_HEAD:{value:'Driver_Change_Head', label:'换端'},
CMD_DRIVER_DOOR_ON_OFF:{value:'Driver_Door_On_Off', label:'列车车门开关'}
CMD_DRIVER_DOOR_ON_OFF:{value:'Driver_Door_On_Off', label:'列车车门开关'},
CMD_DRIVER_NEXT_STATION:{value:'Driver_Next_Station', label:'确认列车行驶之前方站台'},
CMD_DRIVER_BLOCK_ROUTE:{value:'Driver_Block_Route', label:'进路闭塞法行车'}
},
// 信号机操作
Signal: {
/** 设置故障 */
CMD_SIGNAL_ADD_FAULT: {value:'Signal_Add_Fault', label: '设置信号机故障'},
/** 清除故障 */
CMD_SIGNAL_REMOVE_FAULT: {value:'Signal_Remove_Fault', label: '清除信号机故障'},
/** 封锁 */
CMD_SIGNAL_BLOCK: {value:'Signal_Block', label: '封锁'},
/** 解封 */
@ -128,10 +122,6 @@ export default {
// 物理区段操作
Section: {
/** 设置故障 */
CMD_SECTION_ADD_FAULT: {value:'Section_Add_Fault', label: '设置区段故障'},
/** 清除故障 */
CMD_SECTION_REMOVE_FAULT: {value:'Section_Remove_Fault', label: '清除区段故障'},
/** 封锁 */
CMD_SECTION_BLOCK: {value:'Section_Block', label: '封锁'},
/** 解封 */
@ -158,10 +148,6 @@ export default {
// 站台
Stand: {
/** 设置故障 */
CMD_STAND_ADD_FAULT: {value:'Stand_Add_Fault', label: '设置站台故障'},
/** 清除故障 */
CMD_STAND_REMOVE_FAULT: {value:'Stand_Remove_Fault', label: '清除站台故障'},
/** 设置跳停 */
CMD_STAND_SET_JUMP_STOP: {value:'Stand_Set_Jump_Stop', label: '设置跳停'},
/** 取消跳停 */
@ -197,10 +183,6 @@ export default {
},
Station: {
/** 设置故障 */
CMD_STATION_ADD_FAULT: {value:'Station_Add_Fault', label: '设置车站故障'},
/** 清除故障 */
CMD_STATION_REMOVE_FAULT: {value:'Station_Remove_Fault', label: '清除车站故障'},
/** 全站设置联锁自动触发 */
CMD_STATION_SET_CI_AUTO_TRIGGER: {value:'Station_Set_CI_Auto_Trigger', label: '全站设置联锁自动触发'},
/** 全站取消联锁自动触发 */
@ -220,15 +202,15 @@ export default {
/** 执行关键操作测试 */
CMD_STATION_KEY_OPERATION_TEST: {value: 'Station_Key_Operation_Test', label: '执行关键操作测试'},
// 设置折返策略
CMD_STATION_SET_TURN_BACK_STRATEGY: {value: 'Station_Set_Turn_Back_Strategy', label: '设置折返策略'}
CMD_STATION_SET_TURN_BACK_STRATEGY: {value: 'Station_Set_Turn_Back_Strategy', label: '设置折返策略'},
/** 关站信号 */
CMD_STATION_CLOSE_ALLSIGNAL: {value: 'Station_Close_AllSignal', label:'关站信号'},
/** 关区信号 */
CMD_STATION_CIAREA_CLOSE_ALLSIGNAL: {value: 'Station_CIArea_Close_AllSignal', label: '关区信号'}
},
// 列车
Train: {
/** 设置故障 */
CMD_TRAIN_ADD_FAULT: {value:'Train_Add_Fault', label: '设置列车故障'},
/** 清除故障 */
CMD_TRAIN_REMOVE_FAULT: {value:'Train_Remove_Fault', label: '清除列车故障'},
/** 人工限速行驶 */
CMD_TRAIN_MANUAL_LIMIT_DRIVE: {value:'Train_Manual_Limit_Drive', label: '人工限速行驶'},
/** 按进路闭塞法行车 */

View File

@ -43,6 +43,9 @@ export const deviceFaultType = {
],
ZcControl:[
{label: 'zc故障', value: 'FAULT'}
],
Train: [
{label: '通信异常', value: 'COMMUNICATION_ABNORMAL'}
]
};
/** 设备类型 */

View File

@ -1741,6 +1741,42 @@ export const OperationEvent = {
operation: '6102',
domId: '_Tips-Station-setBackStrategy-confirm'
}
},
closeAllSignal: {
menu: {
operation: '611',
domId: '_Tips-Station-closeAllSignal-menu'
},
mbar: {
operation: '6111',
domId: '_Tips-Station-closeAllSignal-Mbar'
},
choose: {
operation: '6112',
domId: '_Tips-Station-closeAllSignal-Choose'
},
confirm: {
operation: '6113',
domId: '_Tips-Station-closeAllSignal-confirm'
}
},
ciAreaCloseAllSignal: {
menu: {
operation: '612',
domId: '_Tips-Station-ciAreaCloseAllSignal-menu'
},
mbar: {
operation: '6121',
domId: '_Tips-Station-ciAreaCloseAllSignal-Mbar'
},
choose: {
operation: '6122',
domId: '_Tips-Station-ciAreaCloseAllSignal-Choose'
},
confirm: {
operation: '6123',
domId: '_Tips-Station-ciAreaCloseAllSignal-Confirm'
}
}
},
@ -2007,6 +2043,20 @@ export const OperationEvent = {
operation: '70f1',
domId: '_Tips-Train-trainDetailInfo-Confirm'
}
},
// 确认列车行驶之前方站台
nextStation:{
menu:{
operation: '70g',
domId: '_Tip-Train_nextStation-Menu'
}
},
// 进路闭塞法行车
routeBlockRun:{
menu:{
operation: '70h',
domId: '_Tip-Train_routeBlockRun-Menu'
}
}
},

View File

@ -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] = [];

View File

@ -240,6 +240,7 @@ const training = {
state.memberData[newMemberId].name = name;
state.memberData[newMemberId].disabled = true;
},
updateMemberAndUser: (state, {simulationUserList, userId}) => {
simulationUserList.forEach(item => {
let memberIndex = -1;

View File

@ -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 {

View File

@ -19,7 +19,11 @@
<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',
data() {
@ -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'));

View File

@ -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: {
@ -119,7 +130,15 @@ export default {
this.tryUser = 0;
this.loading = false;
this.drawWay = res.data.drawWay;
const remarksList = {'01':'ATS现地工作站原理级仿真系统实现车站值班员培训功能。', '02':'ATS行调工作站原理级仿真系统实现行车调度员培训功能。', '03':'各岗位应急综合演练', '04':'桌面版模拟驾驶系统,实现列车驾驶员培训功能。', '05':'派班工作站主要是供车辆段/停车场派班员进行派班操作,可以自动生成派班计划,极大的简化了派班计划管理的复杂性。', '06': '综合监控工作站原理级仿真系统,实现电调、环调及车站值班员培训功能。', '07':'大屏仿真系统,可显示全线全站场实时状况,便于教学及观摩使用。'};
const remarksList = {
'01':'ATS现地工作站原理级仿真系统实现车站值班员培训功能。',
'02':'ATS行调工作站原理级仿真系统实现行车调度员培训功能。',
'03':'各岗位应急综合演练',
'04':'桌面版模拟驾驶系统,实现列车驾驶员培训功能。',
'05':'派班工作站主要是供车辆段/停车场派班员进行派班操作,可以自动生成派班计划,极大的简化了派班计划管理的复杂性。',
'06': '综合监控工作站原理级仿真系统,实现电调、环调及车站值班员培训功能。',
'07':'大屏仿真系统,可显示全线全站场实时状况,便于教学及观摩使用。'
};
this.courseModel = {
id: resp.data.id,
name: resp.data.name,
@ -131,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 = {
@ -159,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 => {
@ -202,27 +271,14 @@ 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') {
this.enterScreen();
} else {
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
this.jump();
} else {
if (this.tryTime <= 1) {
this.$confirm(this.$t('tip.noPermissionHint'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
this.buy();
}).catch(() => { });
} else {
this.jump();
}
}
this.jump();
}
},
jumpScheduling() {

View File

@ -215,11 +215,11 @@ export default {
},
bgImg() {
const bgImgAll = process.env.VUE_APP_PRO === 'local' || this.$route.query.project == 'heb' ? '' : bgImg;
const synchronousLogin = ['IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD'];
const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD'];
const imgMap = {
ISCS_LW: bgIscsImg,
ISCS_CW: bgIscsImg,
IBP: bgIbpImg,
VR_IBP: bgIbpImg,
CCTV: bgCctvImg,
VR_PSD: bgPsdImg,
LSW: bgLswImg
@ -227,14 +227,14 @@ export default {
return synchronousLogin.includes(this.$route.query.type) ? imgMap[this.$route.query.type] : bgImgAll;
},
syncLogin() {
const synchronousLogin = ['IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD'];
const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD'];
return this.$route.query.type ? synchronousLogin.includes(this.$route.query.type) : false;
},
loadingText() {
const textMap = {
ISCS_LW: '检测现地工作站登录中',
ISCS_CW: '检测行调工作站登录中',
IBP: '检测现地工作站登陆中',
VR_IBP: '检测现地工作站登陆中',
CCTV: '检测教员机登录中',
VR_PSD: '检测教员机登录中',
LSW: '检测教员机登录中'

View File

@ -109,13 +109,6 @@ export default {
},
clearSubscribe() {
clearSubscribe(`${displayTopic}\/${this.group}`);
},
sendDeviceChangeEvent(data, header) {
//
sendCommand('', data).then(response => {
}).catch(error => {
console.error(error);
});
}
}
};

View File

@ -14,7 +14,7 @@
:key="member.id"
class="each-chat-member"
:label="member"
:disabled="member.userId === userId"
:disabled="member.disabled"
>{{ member.memberName }}</el-checkbox>
</el-checkbox-group>
</div>

View File

@ -30,13 +30,13 @@
<div>
<el-form ref="ruleForm" :model="form" label-width="50px">
<el-form-item :label="$t('display.script.role')" prop="role">
<el-select v-model="form.role" :placeholder="$t('display.script.pleaseSelect')">
<el-select v-model="form.type" :placeholder="$t('display.script.pleaseSelect')">
<el-option
v-for="item in memberList"
:key="item.id"
:label="(roleConfig[item.role]?roleConfig[item.role]: '')+(item.name?item.name: '')"
:label="(roleConfig[item.type]?roleConfig[item.type]: '')+(item.name?item.name: '')"
:value="item.id"
:disabled="checkDisabled(item.role)"
:disabled="checkDisabled(item.type)"
/>
</el-select>
</el-form-item>
@ -82,7 +82,7 @@ export default {
},
row: {},
form: {
role: ''
type: ''
},
memberList: [],
mapLocation:null,
@ -229,8 +229,8 @@ export default {
},
confirm() {
const roleName = this.memberList.find(elem=>{ return elem.id == this.form.role; });
this.$emit('selectQuest', this.row, this.form.role, this.mapLocation, roleName.role);
const roleName = this.memberList.find(elem=>{ return elem.id == this.form.type; });
this.$emit('selectQuest', this.row, this.form.type, this.mapLocation, roleName.type);
this.doClose();
this.roleDoClose();
},
@ -260,7 +260,7 @@ export default {
},
handleName(item) {
return this.roleConfig[item.role] ? this.roleConfig[item.role] : '' + (item.name ? item.name : '');
return this.roleConfig[item.type] ? this.roleConfig[item.type] : '' + (item.name ? item.name : '');
}
}
};

View File

@ -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);
}

View File

@ -18,9 +18,7 @@
<chat-box ref="chatbox" :group="group" :user-role="userRole" />
<div class="display-draft">
<template v-if="isscriptRun">
<el-button v-if="!dataError" type="danger" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
</template>
<el-button v-if="isscriptRun&&!dataError" type="danger" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
<el-button type="primary" @click="back">{{ $t('display.demon.back') }}</el-button>
</div>
@ -117,7 +115,7 @@ export default {
'04': '02', // =>
'05': '' // => null
},
userRole:'ADMIN',
userRole:'AUDIENCE',
isDrive: this.prdType == '04'
};
},
@ -345,14 +343,6 @@ export default {
},
//
async selectQuest(row) {
debugger;
this.scriptId = parseInt(row.id);
if (this.isDemon) {
this.$refs.menuDemon.initLoadPage();
}
if (this.isScript) {
this.$refs.menuScript.initLoadPage();
}
},
// 退
handleQuitQuest() {
@ -473,4 +463,10 @@ export default {
-ms-user-select: none;
user-select: none;
}
.display-draft {
position: absolute;
float: right;
right: 20px;
bottom: 15px;
}
</style>

View File

@ -353,7 +353,7 @@ export default {
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.switchMode('01');
if (parseInt(this.mapId)) {
if (this.mapId) {
await this.loadNewMapDataByGroup(this.group);
} else {
this.endViewLoading();

View File

@ -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(() => {

View File

@ -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() {
@ -413,7 +413,7 @@ export default {
this.isAdmin = data.admin;
const deviceVO = this.$store.state.user.projectDevice;
if (deviceVO && deviceVO.type === 'IBP') {
if (deviceVO && deviceVO.type === 'VR_IBP') {
this.showIbp(this.deviceCode);
const config = JSON.parse(deviceVO.config);
this.ibpPart = config.part.toLowerCase();
@ -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);
},

View File

@ -6,7 +6,7 @@
</div>
<div class="member__container">
<el-input v-model="filterText" :placeholder="this.$t('global.enterNameToFilter')" clearable />
<el-scrollbar class="member__container--list" wrap-class="scrollbar-wrapper" :style="{height: treeHeight+'px'}">
<el-scrollbar class="member__container--list" wrap-class="scrollbar-wrapper" style="{height: calc(100% - 64px)}">
<el-tree
ref="tree"
:data="filterMembers"
@ -43,10 +43,6 @@ export default {
type: Array,
required: true
},
height: {
type: Number,
required: true
},
isAdmin: {
type: Boolean,
default() {
@ -66,9 +62,6 @@ export default {
defaultProps() {
return { label: 'nickName' };
},
treeHeight() {
return this.height - 64;
},
filterMembers() {
return this.members.filter(e =>{ return e.nickName.includes(this.filterText); });
},
@ -144,11 +137,10 @@ export default {
&__container {
flex-grow: 1;
height: 520px;
&--list {
background: #fff;
height: auto;
min-height: calc(100% - 200px);
max-height: calc(100% - 200px);
height: 490px;
border-bottom: 1px #ccc solid;
&::-webkit-scrollbar {

View File

@ -3,11 +3,10 @@
v-dialogDrag
title="仿真成员管理"
:visible.sync="show"
width="100%"
width="75%"
:before-close="doClose"
:z-index="2000"
:modal="false"
fullscreen
:close-on-click-modal="false"
center
>
@ -25,8 +24,7 @@
:data="treeData"
:props="defaultProps"
default-expand-all
style="margin: 10px;margin-bottom: 0;border: 1px solid #ccc;overflow-y: auto;"
:style="{height: height - 35 + 'px'}"
style="margin: 10px;margin-bottom: 0;border: 1px solid #ccc;overflow-y: auto;height: 520px;"
:filter-node-method="filterNode"
@node-click="handleNodeClick"
>
@ -50,7 +48,7 @@
:room="room"
:members="simulationUserList"
:is-admin="isAdmin"
:height="height"
style="height:570px"
@message="messageInfo"
/>
</div>
@ -291,7 +289,7 @@ export default {
}
.room {
width: 100%;
height: 100%;
height: 600px;
display: flex;
flex-direction: column;
box-sizing: border-box;

View File

@ -316,6 +316,8 @@ export default {
if (this.isAdmin) {
await clearSimulation(this.group);
}
this.$store.dispatch('training/setMemberList', {memberList:[], userId: this.$store.state.user.id});
this.$store.dispatch('training/setSimulationUserList', []);
this.$store.dispatch('training/over').then(() => {
this.backLoading = true;
this.$store.dispatch('map/resetActiveTrainList');

View File

@ -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>

View File

@ -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 {

View File

@ -8,7 +8,6 @@
import MapCommon from './common/index';
import { getToken } from '@/utils/auth';
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
import { sendCommand } from '@/api/jmap/training';
import { getSessionStorage } from '@/utils/auth';
export default {
@ -112,13 +111,6 @@ export default {
},
setCenter(code) {
this.$refs.mapCommon && this.$refs.mapCommon.setCenter(code);
},
sendDeviceChangeEvent(data, header) {
//
sendCommand('', data).then(response => {
}).catch(error => {
console.error(error);
});
}
}
};

View File

@ -128,7 +128,7 @@ export default {
},
hover(field) {
this.field = field === this.field ? '' : field;
this.$emit('standStationCode', this.field);
this.$emit('espCode', this.field);
},
deviceSelect(selected) {
if (selected && selected._type.toUpperCase() === 'Esp'.toUpperCase()) {
@ -140,7 +140,7 @@ export default {
this.addModel.standCode = selected.code;
this.activeName = 'second';
this.field = '';
this.$emit('standStationCode', '');
this.$emit('espCode', '');
}
},
hasPSD(data) {

View File

@ -21,183 +21,24 @@
<el-button type="text" style="float: right; padding: 3px 0; margin-right: 5px;" @click="showMap">绘图显隐</el-button>
</div>
<el-tabs v-show="projectType" v-model="enabledTab" class="mapEdit" type="card">
<el-tab-pane :label="$t('map.section')" class="tab_pane_box" name="Section" :lazy="lazy">
<section-draft
ref="Section"
<el-tab-pane v-for="(each,index) in tabList" :key="index" :label="each.label" class="tab_pane_box" :name="each.name" :lazy="lazy">
<component
:is="each.menus"
:ref="each.name"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
@fieldSelect="fieldSelect"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.switch')" class="tab_pane_box" name="Switch" :lazy="lazy">
<switch-draft
ref="Switch"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
@fieldSelectSwitchSection="fieldSelectSwitchSection"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.station')" class="tab_pane_box" name="Station" :lazy="lazy">
<station-draft
ref="Station"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
@stationSectionCode="stationEnabledTab"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.signal')" class="tab_pane_box" name="Signal" :lazy="lazy">
<signal-draft
ref="Signal"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
@signalSectionCode="selectEnabledTab"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.platform')" class="tab_pane_box" name="StationStand" :lazy="lazy">
<station-stand-draft
ref="StationStand"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
@standStationCode="standStationTab"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.psd')" class="tab_pane_box" name="Psd" :lazy="lazy">
<psd-draft
ref="Psd"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
@standStationCode="psdTab"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.platformEmergencyStop')" class="tab_pane_box" name="Esp" :lazy="lazy">
<esp-draft
ref="Esp"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
@standStationCode="esqTab"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.trainWindow')" class="tab_pane_box" name="TrainWindow" :lazy="lazy">
<train-window-draft
ref="TrainWindow"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.zcZoneControl')" class="tab_pane_box" name="ZcControl" :lazy="lazy">
<zc-control-draft
ref="ZcControl"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.functionButton')" class="tab_pane_box" name="ControlDraft" :lazy="lazy">
<control-draft
ref="ControlDraft"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
@selectFiled="selectFiled"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.saidLamp')" class="tab_pane_box" name="ControlLamp" :lazy="lazy">
<control-lamp
ref="ControlLamp"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
@psdCode="psdTab"
@espCode="esqTab"
@saidLampHover="saidLampTab"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.train')" class="tab_pane_box" name="Train" :lazy="lazy">
<train-draft
ref="Train"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.line')" class="tab_pane_box" name="Line" :lazy="lazy">
<line-draft
ref="Line"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="供电线" class="tab_pane_box" name="Power" :lazy="lazy">
<power-draft
ref="Power"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.text')" class="tab_pane_box" name="Text" :lazy="lazy">
<text-draft
ref="Text"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.lcControl')" class="tab_pane_box" name="LcControl" :lazy="lazy">
<lc-control-draft
ref="LcControl"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.rectangularBox')" class="tab_pane_box" name="OutFrame" :lazy="lazy">
<out-frame-draft
ref="OutFrame"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.image')" class="tab_pane_box" name="Resource" :lazy="lazy">
<Image-control-draft
ref="Resource"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.boundingBox')" class="tab_pane_box" name="CheckBox" :lazy="lazy">
<checkbox-draft
ref="CheckBox"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="站间分隔" class="tab_pane_box" name="SplitStation" :lazy="lazy">
<split-station
ref="SplitStation"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="箭头" class="tab_pane_box" name="Arrow" :lazy="lazy">
<arrow
ref="Arrow"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</el-tab-pane>
</el-tabs>
<template v-show="!projectType">
<split-screen
@ -280,6 +121,29 @@ export default {
data() {
return {
lazy: true,
tabList:[
{label:this.$t('map.section'), name:'Section', menus:SectionDraft},
{label:this.$t('map.switch'), name:'Switch', menus:SwitchDraft},
{label:this.$t('map.station'), name:'Station', menus:StationDraft},
{label:this.$t('map.signal'), name:'Signal', menus:SignalDraft},
{label:this.$t('map.platform'), name:'StationStand', menus:StationStandDraft},
{label:this.$t('map.psd'), name:'Psd', menus:PsdDraft},
{label:this.$t('map.platformEmergencyStop'), name:'Esp', menus:EspDraft},
{label:this.$t('map.trainWindow'), name:'TrainWindow', menus:TrainWindowDraft},
{label:this.$t('map.zcZoneControl'), name:'ZcControl', menus:ZcControlDraft},
{label:this.$t('map.functionButton'), name:'ControlDraft', menus:ControlDraft},
{label:this.$t('map.saidLamp'), name:'ControlLamp', menus:ControlLamp},
{label:this.$t('map.train'), name:'Train', menus:TrainDraft},
{label:this.$t('map.line'), name:'Line', menus:LineDraft},
{label:'供电线', name:'Power', menus:PowerDraft},
{label:this.$t('map.text'), name:'Text', menus:TextDraft},
{label:this.$t('map.lcControl'), name:'LcControl', menus:LcControlDraft},
{label:this.$t('map.rectangularBox'), name:'OutFrame', menus:OutFrameDraft},
{label:this.$t('map.image'), name:'Resource', menus:ImageControlDraft},
{label:this.$t('map.boundingBox'), name:'CheckBox', menus:CheckboxDraft},
{label:'站间分隔', name:'SplitStation', menus:SplitStation},
{label:'箭头', name:'Arrow', menus:Arrow}
],
feild: '',
singlaType: '',
stationType: '',
@ -306,16 +170,16 @@ export default {
watch: {
'$store.state.map.deleteCount': function (val) {
if (this.selected) {
this.$refs[this.enabledTab].deleteObj();
this.$refs[this.enabledTab][0].deleteObj();
}
},
'$store.state.map.updateCount': function (val) {
this.$refs[this.enabledTab].edit();
this.$refs[this.enabledTab][0].edit();
},
selected(val, oldVal) {
if (this.selected) {
this.$nextTick(() => {
this.$refs[this.enabledTab].deviceSelect(val);
this.$refs[this.enabledTab][0].deviceSelect(val);
});
}
}

View File

@ -211,7 +211,7 @@ export default {
},
hover(field) {
this.field = field === this.field ? '' : field;
this.$emit('standStationCode', this.field);
this.$emit('psdCode', this.field);
},
deviceSelect(selected) {
if (selected && selected._type.toUpperCase() === 'Psd'.toUpperCase()) {
@ -223,7 +223,7 @@ export default {
this.addModel.standCode = selected.code;
this.activeName = 'second';
this.field = '';
this.$emit('standStationCode', '');
this.$emit('psdCode', '');
}
},
create() {

View File

@ -158,21 +158,23 @@ export default {
},
handleList(data) {
this.tableData = [];
data.bigScreenSplitConfig.forEach(item => {
const section = this.$store.getters['map/getDeviceByCode'](item.sectionCode);
const param = {
position: String(section.points[section.points.length - 1].x),
name: `${section.name}(${section.code})`,
offsetTop: 0,
sectionCode: section.code
if (data.bigScreenSplitConfig) {
data.bigScreenSplitConfig.forEach(item => {
const section = this.$store.getters['map/getDeviceByCode'](item.sectionCode);
const param = {
position: String(section.points[section.points.length - 1].x),
name: `${section.name}(${section.code})`,
offsetTop: 0,
sectionCode: section.code
};
this.tableData.push(param);
});
this.formData = {
width: data.width,
height: data.height
};
this.tableData.push(param);
});
this.formData = {
width: data.width,
height: data.height
};
if (data.offsetList.length) {
}
if (data.offsetList && data.offsetList.length) {
this.list = [];
data.offsetList.forEach(item => {
const param = {offsetTop: item};

View File

@ -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);

View File

@ -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 //
};

View File

@ -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 //
};

View File

@ -455,8 +455,8 @@ export default {
});
that.$message.success('学生信息导入成功!');
}).catch(() => {
that.$message.error('学生信息导入失败');
}).catch((err) => {
that.$message.error('学生信息导入失败' + err.message);
});
} catch (error) {
that.$message.warning(`解析成绩单失败:${error}`);

View File

@ -1,6 +1,6 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="500px" :before-close="handleClose" center :close-on-click-modal="false">
<el-form v-show="data.type === 'IBP'" ref="formIbp" :model="formIbp" label-width="100px" :rules="rulesIbp">
<el-form v-show="data.type === 'VR_IBP'" ref="formIbp" :model="formIbp" label-width="100px" :rules="rulesIbp">
<el-form-item label="显示位置:" prop="part">
<el-select v-model="formIbp.part" placeholder="请选择" size="small">
<el-option
@ -64,7 +64,7 @@
</template>
<script>
import { getDeviceDetail, setIbpConfig, setLwConfig, getDevicesByType, setIscsLwConfig, setIscsCwConfig } from '@/api/project';
import { getDeviceDetail, setVrIbpConfig, setLwConfig, getDevicesByType, setIscsLwConfig, setIscsCwConfig } from '@/api/project';
import { getAllMapOnline, getStationListNeedAttendant } from '@/api/jmap/map';
export default {
@ -122,7 +122,7 @@ export default {
methods: {
initData(row) {
getDeviceDetail(row.id).then(resp => {
if (resp.data.config && resp.data.type === 'IBP') {
if (resp.data.config && resp.data.type === 'VR_IBP') {
this.formIbp = JSON.parse(resp.data.config);
} else if (resp.data.config && resp.data.type === 'LW') {
this.formLw = JSON.parse(resp.data.config);
@ -139,7 +139,7 @@ export default {
this.data = row;
this.mapList = [];
this.stationList = [];
if (this.data.type === 'IBP' || this.data.type === 'ISCS_LW') {
if (this.data.type === 'VR_IBP' || this.data.type === 'ISCS_LW') {
getDevicesByType('LW').then(res => {
if (res.data && res.data.length) {
this.lwList = res.data;
@ -170,10 +170,10 @@ export default {
},
doSave() {
const self = this;
if (this.data.type === 'IBP') {
if (this.data.type === 'VR_IBP') {
this.$refs.formIbp.validate(() => {
setIbpConfig(this.data.id, this.formIbp).then(response => {
self.$message.success('设置IBP设备配置成功');
setVrIbpConfig(this.data.id, this.formIbp).then(response => {
self.$message.success('设置虚拟IBP设备配置成功');
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {

View File

@ -175,7 +175,7 @@ export default {
});
},
editConfig(index, row) {
if (row.type === 'LW' || row.type === 'IBP' || row.type === 'ISCS_LW' || row.type === 'ISCS_CW') {
if (row.type === 'LW' || row.type === 'VR_IBP' || row.type === 'ISCS_LW' || row.type === 'ISCS_CW') {
this.$refs.editConfig.doShow(row);
} else if (row.type === 'SWITCH' || row.type === 'SIGNAL' || row.type === 'PSD') {
this.$refs.editConfigGateway.doShow(row);

View File

@ -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);
}

View File

@ -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 {