Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
4804cebfcd
@ -590,3 +590,12 @@ export function getUnreceivedMessages(simulationId, memberId) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 控制叶佳供货的小车 */
|
||||||
|
export function controlYjTrain(simulationId, right) {
|
||||||
|
return request({
|
||||||
|
url: `/api/realDevice/${simulationId}/train`,
|
||||||
|
method: 'put',
|
||||||
|
params: { right }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -585,18 +585,16 @@ class Jlmap {
|
|||||||
if (elem.hasOwnProperty('applicantId')) {
|
if (elem.hasOwnProperty('applicantId')) {
|
||||||
controlTransferList.push(elem);
|
controlTransferList.push(elem);
|
||||||
}
|
}
|
||||||
if (!elem.applicantId) {
|
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
const guideLock = this.mapDevice[oDevice.guideLockCode];
|
||||||
const guideLock = this.mapDevice[oDevice.guideLockCode];
|
const guideLockStatus = {totalGuideLock: elem.totalGuideLock};
|
||||||
const guideLockStatus = {totalGuideLock: elem.totalGuideLock};
|
if (guideLock && this.hookHandle(guideLock, guideLockStatus)) {
|
||||||
if (guideLock && this.hookHandle(guideLock, guideLockStatus)) {
|
this.$painter.update(guideLock);
|
||||||
this.$painter.update(guideLock);
|
}
|
||||||
}
|
if (elem.dispose) {
|
||||||
if (elem.dispose) {
|
this.$painter.delete(oDevice);
|
||||||
this.$painter.delete(oDevice);
|
} else {
|
||||||
} else {
|
this.$painter.update(oDevice);
|
||||||
this.$painter.update(oDevice);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
store.commit('map/mapStationStateUpdate');
|
store.commit('map/mapStationStateUpdate');
|
||||||
} else if (elem.deviceType === 'STATION_DIRECTION') {
|
} else if (elem.deviceType === 'STATION_DIRECTION') {
|
||||||
|
@ -954,6 +954,7 @@ export default class Station extends Group {
|
|||||||
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
this.stationControlCC && this.stationControlCC.setStyle({text:'EL', textFill:this.style.Station.StationControl.text.emergencyControlColor});
|
this.stationControlCC && this.stationControlCC.setStyle({text:'EL', textFill:this.style.Station.StationControl.text.emergencyControlColor});
|
||||||
|
this.stationControlCC && this.stationControlCC.stopAnimation(true);
|
||||||
this.veryControl && this.veryControl.setColor(this.style.Station.StationControl.veryControl.defaultColor);
|
this.veryControl && this.veryControl.setColor(this.style.Station.StationControl.veryControl.defaultColor);
|
||||||
this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.defaultColor);
|
this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.defaultColor);
|
||||||
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.defaultColor);
|
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.defaultColor);
|
||||||
@ -1047,7 +1048,25 @@ export default class Station extends Group {
|
|||||||
device && device.instance && device.instance.setCount(countNum);
|
device && device.instance && device.instance.setCount(countNum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.style.Station.StationControl.special && model.apply2TheControlMode) {
|
||||||
|
this.controlTextFlash(model.apply2TheControlMode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
controlTextFlash(apply2TheControlMode) {
|
||||||
|
if (this.stationControlCC && apply2TheControlMode) {
|
||||||
|
let color;
|
||||||
|
if (apply2TheControlMode === 'Local') {
|
||||||
|
color = this.style.Station.StationControl.text.stationControlColor;
|
||||||
|
this.stationControlCC && this.stationControlCC.setStyle({text:'LC', textFill:color});
|
||||||
|
} else if (apply2TheControlMode === 'Center') {
|
||||||
|
color = this.style.Station.StationControl.text.centerControlColor;
|
||||||
|
this.stationControlCC && this.stationControlCC.setStyle({text:'CC', textFill:color});
|
||||||
|
}
|
||||||
|
this.stationControlCC.animateStyle(true)
|
||||||
|
.when(500, {textFill: '#000'})
|
||||||
|
.when(1000, {textFill: color})
|
||||||
|
.when(1500, {textFill: '#000'}).start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
handleGuideLock(model) {
|
handleGuideLock(model) {
|
||||||
|
@ -388,6 +388,14 @@ export const menuOperate = {
|
|||||||
// 非常站控 大铁线路
|
// 非常站控 大铁线路
|
||||||
operation: OperationEvent.StationControl.requestVeryControl.menu.operation,
|
operation: OperationEvent.StationControl.requestVeryControl.menu.operation,
|
||||||
cmdType:CMD.ControlConvertMenu.CMD_CM_SPECIAL_STATION_CONTROL
|
cmdType:CMD.ControlConvertMenu.CMD_CM_SPECIAL_STATION_CONTROL
|
||||||
|
},
|
||||||
|
replyStationControl: {
|
||||||
|
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||||
|
cmdType: CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL
|
||||||
|
},
|
||||||
|
replyCenterControl: {
|
||||||
|
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||||
|
cmdType: CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
TrainWindow: {
|
TrainWindow: {
|
||||||
|
@ -64,8 +64,15 @@ export default {
|
|||||||
// 暂无功能,先disabled
|
// 暂无功能,先disabled
|
||||||
label: '授权',
|
label: '授权',
|
||||||
disabled: true,
|
disabled: true,
|
||||||
handler: this.undeveloped,
|
handler: this.work === 'localWork' ? this.agreeCenterControl : this.agreeStationControl,
|
||||||
isShow: (station, work) => false
|
isDisabled: (station, work) => {
|
||||||
|
if (work === 'localWork') {
|
||||||
|
return station.apply2TheControlMode !== 'Center';
|
||||||
|
} else {
|
||||||
|
return station.apply2TheControlMode !== 'Local';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isShow: (station, work) => true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消',
|
label: '取消',
|
||||||
@ -75,11 +82,11 @@ export default {
|
|||||||
if (work === 'localWork') {
|
if (work === 'localWork') {
|
||||||
return station.controlMode === 'Center';
|
return station.controlMode === 'Center';
|
||||||
} else {
|
} else {
|
||||||
return station.controlMode !== 'Center';
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isShow: (station, work) => {
|
isShow: (station, work) => {
|
||||||
return work === 'localWork';
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// /** 紧急站控 */
|
// /** 紧急站控 */
|
||||||
@ -89,10 +96,14 @@ export default {
|
|||||||
handler: this.setEmergencyControl,
|
handler: this.setEmergencyControl,
|
||||||
cmdType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL,
|
cmdType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL,
|
||||||
isDisabled: (station, work) => {
|
isDisabled: (station, work) => {
|
||||||
return station.controlMode === 'Emergency';
|
if (work === 'localWork') {
|
||||||
|
return station.controlMode === 'Emergency';
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
isShow: (station, work) => {
|
isShow: (station, work) => {
|
||||||
return work === 'localWork';
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -458,6 +469,32 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
agreeStationControl() {
|
||||||
|
commitOperate(menuOperate.StationControl.replyStationControl, {stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||||
|
device: this.selected,
|
||||||
|
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '授权控制'},
|
||||||
|
cmdType: CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||||
|
param: { replyVOList:[{ stationCode: this.selected.code, agree: true}] }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
agreeCenterControl() {
|
||||||
|
commitOperate(menuOperate.StationControl.replyCenterControl, {stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||||
|
device: this.selected,
|
||||||
|
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '授权控制'},
|
||||||
|
cmdType: CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL,
|
||||||
|
param: { replyVOList:[{ stationCode: this.selected.code, agree: true}] }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
setEmergencyControl() {
|
setEmergencyControl() {
|
||||||
// 紧急站控
|
// 紧急站控
|
||||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||||
|
@ -50,10 +50,10 @@
|
|||||||
<div class="left-table-cell"><span>跳停</span></div>
|
<div class="left-table-cell"><span>跳停</span></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div class="center-table-cell"><span :id="domSetOrCancelJump" @contextmenu="menuEvent('stopJumping')">设置/取消 所有列车跳停本站</span></div>
|
<div class="center-table-cell"><span :id="domSetOrCancelJump" :style="{color:jumpInterval ? standJumpColor :jumpStatusColor}" @contextmenu="menuEvent('stopJumping')">设置/取消 所有列车跳停本站</span></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div class="right-table-cell"><span @contextmenu="menuEvent('allTrainStopJump')">所有列车跳停本站</span></div>
|
<div class="right-table-cell"><span :style="{color: jumpStatusColor}" @contextmenu="menuEvent('allTrainStopJump')">所有列车跳停本站</span></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -149,9 +149,12 @@ export default {
|
|||||||
title: '',
|
title: '',
|
||||||
standDetainColor: '#FFF',
|
standDetainColor: '#FFF',
|
||||||
detainStatusColor: '#FFF',
|
detainStatusColor: '#FFF',
|
||||||
|
standJumpColor: '#FFF',
|
||||||
|
jumpStatusColor: '#FFF',
|
||||||
bgColor: '#000',
|
bgColor: '#000',
|
||||||
fontColor: '#FFF',
|
fontColor: '#FFF',
|
||||||
detainInterval: ''
|
detainInterval: '',
|
||||||
|
jumpInterval: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -203,9 +206,7 @@ export default {
|
|||||||
this.initStatus(list);
|
this.initStatus(list);
|
||||||
},
|
},
|
||||||
'$store.state.socket.equipmentStatus': function (val) {
|
'$store.state.socket.equipmentStatus': function (val) {
|
||||||
if (this.selected) {
|
this.initDeviceStatus();
|
||||||
this.detainStatusColor = this.selected.centerHoldTrain || this.selected.stationHoldTrain ? '#FF0' : '#FFF';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -222,6 +223,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
const requestList = this.$store.state.menuOperation.requestList;
|
const requestList = this.$store.state.menuOperation.requestList;
|
||||||
|
this.initDeviceStatus();
|
||||||
this.initStatus(requestList || []);
|
this.initStatus(requestList || []);
|
||||||
this.position = position;
|
this.position = position;
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
@ -233,21 +235,37 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
initDeviceStatus() {
|
||||||
|
if (this.selected) {
|
||||||
|
const device = this.$store.getters['map/getDeviceByCode'](this.selected.code);
|
||||||
|
this.detainStatusColor = device.centerHoldTrain || device.stationHoldTrain ? '#FF0' : '#FFF';
|
||||||
|
this.jumpStatusColor = device.assignSkip || device.allSkip ? '#FF0' : '#FFF';
|
||||||
|
}
|
||||||
|
},
|
||||||
initStatus(requestList) {
|
initStatus(requestList) {
|
||||||
this.standDetainColor = '#FFF';
|
this.standDetainColor = '#FFF';
|
||||||
this.bgColor = '#000';
|
this.bgColor = '#000';
|
||||||
this.fontColor = '#FFF';
|
this.fontColor = '#FFF';
|
||||||
|
this.clearTimer();
|
||||||
|
requestList.forEach(item => {
|
||||||
|
if (item.device && item.device.code === this.selected.code) {
|
||||||
|
if (item.operation.name === '设置扣车' || item.operation.name === '取消扣车') {
|
||||||
|
this.standDetain();
|
||||||
|
} else if (item.operation.name === '跳停本站' || item.operation.name === '取消跳停') {
|
||||||
|
this.standJump();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
clearTimer() {
|
||||||
if (this.detainInterval) {
|
if (this.detainInterval) {
|
||||||
clearInterval(this.detainInterval);
|
clearInterval(this.detainInterval);
|
||||||
this.detainInterval = '';
|
this.detainInterval = '';
|
||||||
}
|
}
|
||||||
requestList.forEach(item => {
|
if (this.jumpInterval) {
|
||||||
if (item.device && item.device.code === this.selected.code) {
|
clearInterval(this.jumpInterval);
|
||||||
if (item.operation.code === OperationEvent.StationStand.setDetainTrain.menu.operation || item.operation.code === OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
this.jumpInterval = '';
|
||||||
this.standDetain();
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
const step = {
|
const step = {
|
||||||
@ -259,10 +277,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
if (this.detainInterval) {
|
this.clearTimer();
|
||||||
clearInterval(this.detainInterval);
|
|
||||||
this.detainInterval = '';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -343,7 +358,21 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.standDetainColor = '#000';
|
this.standDetainColor = '#000';
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 500);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
standJump() {
|
||||||
|
this.standJumpColor = '#FF0';
|
||||||
|
this.bgColor = '#FFF';
|
||||||
|
this.fontColor = '#000';
|
||||||
|
if (!this.jumpInterval) {
|
||||||
|
this.jumpInterval = setInterval(() => {
|
||||||
|
if (this.standJumpColor !== '#FF0') {
|
||||||
|
this.standJumpColor = '#FF0';
|
||||||
|
} else {
|
||||||
|
this.standJumpColor = '#000';
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setRuningMode(mode, direction) {
|
setRuningMode(mode, direction) {
|
||||||
|
@ -369,7 +369,7 @@ export default {
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||||
device: this.selected,
|
device: this.selected,
|
||||||
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '跳停本站请求成功'},
|
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '跳停本站'},
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||||
param: step.param
|
param: step.param
|
||||||
});
|
});
|
||||||
@ -390,7 +390,7 @@ export default {
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||||
device: this.selected,
|
device: this.selected,
|
||||||
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '取消跳停请求成功'},
|
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '取消跳停'},
|
||||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
||||||
param: step.param
|
param: step.param
|
||||||
});
|
});
|
||||||
|
@ -50,6 +50,9 @@ const projectConfig = {
|
|||||||
},
|
},
|
||||||
bottomRecordNumber: (state) => {
|
bottomRecordNumber: (state) => {
|
||||||
return state.viewSetting.bottomRecordNumber;
|
return state.viewSetting.bottomRecordNumber;
|
||||||
|
},
|
||||||
|
loginContectInformation: (state) => {
|
||||||
|
return state.viewSetting.loginContectInformation;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
@ -6,16 +6,13 @@
|
|||||||
<div class="main_screen_content">
|
<div class="main_screen_content">
|
||||||
<div v-show="!isSingleStation" class="screen_left">
|
<div v-show="!isSingleStation" class="screen_left">
|
||||||
<div class="screen_left_tab">特定区域</div>
|
<div class="screen_left_tab">特定区域</div>
|
||||||
<el-row
|
<el-row><el-button
|
||||||
><el-button
|
v-for="(item, index) in verticalHeader"
|
||||||
v-for="(item, index) in verticalHeader"
|
:key="index"
|
||||||
:key="index"
|
class="screen_operate_name"
|
||||||
class="screen_operate_name"
|
:class="{ active: item.active }"
|
||||||
:class="{ active: item.active }"
|
@click="selectedBatch(item)"
|
||||||
@click="selectedBatch(item)"
|
>{{ item.title }}</el-button></el-row>
|
||||||
>{{ item.title }}</el-button
|
|
||||||
></el-row
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="screen_main_content">
|
<div class="screen_main_content">
|
||||||
<div v-show="!isSingleStation" class="screen_main_content_inner">
|
<div v-show="!isSingleStation" class="screen_main_content_inner">
|
||||||
@ -60,7 +57,7 @@
|
|||||||
<div v-for="(item, index) in verticalHeader" :key="index" class="each_data_info">{{ item.name }}</div>
|
<div v-for="(item, index) in verticalHeader" :key="index" class="each_data_info">{{ item.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="list" v-if="currentStation && currentStation.children && currentStation.children.length > 0">
|
<div v-if="currentStation && currentStation.children && currentStation.children.length > 0" class="list">
|
||||||
<div class="stationButton" @click="selectedStation(currentStation)">
|
<div class="stationButton" @click="selectedStation(currentStation)">
|
||||||
<div class="screen_station_name">全车站</div>
|
<div class="screen_station_name">全车站</div>
|
||||||
</div>
|
</div>
|
||||||
@ -91,11 +88,11 @@
|
|||||||
<div class="screen_right">
|
<div class="screen_right">
|
||||||
<div class="each_operate">
|
<div class="each_operate">
|
||||||
<div class="each_operate_text">操作</div>
|
<div class="each_operate_text">操作</div>
|
||||||
<div class="each_operate_button" @click="showInfoBrroadcast">滚动信息<br />发布</div>
|
<div class="each_operate_button" @click="showInfoBrroadcast">滚动信息<br>发布</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="each_operate">
|
<div class="each_operate">
|
||||||
<div class="each_operate_text">信息清除</div>
|
<div class="each_operate_text">信息清除</div>
|
||||||
<div class="each_operate_button" @click="stopBroadcast">清除<br />普通信息</div>
|
<div class="each_operate_button" @click="stopBroadcast">清除<br>普通信息</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -125,49 +122,49 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getByGroupStationList } from '@/api/jmap/map'
|
import { getByGroupStationList } from '@/api/jmap/map';
|
||||||
import { queryIscsDeviceCod } from '@/api/iscs'
|
import { queryIscsDeviceCod } from '@/api/iscs';
|
||||||
import InfoBroadcast from './infoBroadcast'
|
import InfoBroadcast from './infoBroadcast';
|
||||||
import { sendCommandNew } from '@/api/jmap/training'
|
import { sendCommandNew } from '@/api/jmap/training';
|
||||||
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp'
|
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp';
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MainScreen',
|
name: 'MainScreen',
|
||||||
components: {
|
components: {
|
||||||
InfoBroadcast,
|
InfoBroadcast
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
currentStation() {
|
|
||||||
return this.stationList.find(station => station.code === this.$route.query.stationId)
|
|
||||||
},
|
},
|
||||||
isSingleStation() {
|
data() {
|
||||||
return this.$route.query.stationId.startsWith('Station')
|
return {
|
||||||
|
verticalHeader: [
|
||||||
|
{ name: '车站', title: '全线', key: 'station', type: 'header', active: false },
|
||||||
|
{ name: '站厅(LCD)', title: '全站厅(LCD)', key: 'stationHall', type: 'checkBox', active: false },
|
||||||
|
{ name: '上行站台', title: '全上行站台', key: 'uplinkStation', type: 'checkBox', active: false },
|
||||||
|
{ name: '下行站台', title: '全下行站台', key: 'downlinkStation', type: 'checkBox', active: false },
|
||||||
|
{ name: '出入口', title: '全出入口', key: 'passageway', type: 'checkBox', active: false },
|
||||||
|
{ name: '物业', title: '全物业', key: 'property', type: 'checkBox', active: false },
|
||||||
|
{ name: '天桥1', title: '天桥1', key: 'overbridge1', type: 'checkBox', active: false },
|
||||||
|
{ name: '天桥2', title: '天桥2', key: 'overbridge2', type: 'checkBox', active: false },
|
||||||
|
{ name: 'LED', title: '出入口(LED)', key: 'LED', type: 'checkBox', active: false }
|
||||||
|
],
|
||||||
|
statusColor: {
|
||||||
|
normal: '#00ff00'
|
||||||
|
},
|
||||||
|
stationList: [],
|
||||||
|
selectedAreaList: [],
|
||||||
|
iscsDeviceMap: {},
|
||||||
|
deviceMap: {}
|
||||||
|
};
|
||||||
},
|
},
|
||||||
},
|
computed: {
|
||||||
data() {
|
currentStation() {
|
||||||
return {
|
return this.stationList.find(station => station.code === this.$route.query.stationId);
|
||||||
verticalHeader: [
|
},
|
||||||
{ name: '车站', title: '全线', key: 'station', type: 'header', active: false },
|
isSingleStation() {
|
||||||
{ name: '站厅(LCD)', title: '全站厅(LCD)', key: 'stationHall', type: 'checkBox', active: false },
|
return this.$route.query.stationId.startsWith('Station');
|
||||||
{ name: '上行站台', title: '全上行站台', key: 'uplinkStation', type: 'checkBox', active: false },
|
}
|
||||||
{ name: '下行站台', title: '全下行站台', key: 'downlinkStation', type: 'checkBox', active: false },
|
},
|
||||||
{ name: '出入口', title: '全出入口', key: 'passageway', type: 'checkBox', active: false },
|
watch: {
|
||||||
{ name: '物业', title: '全物业', key: 'property', type: 'checkBox', active: false },
|
|
||||||
{ name: '天桥1', title: '天桥1', key: 'overbridge1', type: 'checkBox', active: false },
|
|
||||||
{ name: '天桥2', title: '天桥2', key: 'overbridge2', type: 'checkBox', active: false },
|
|
||||||
{ name: 'LED', title: '出入口(LED)', key: 'LED', type: 'checkBox', active: false },
|
|
||||||
],
|
|
||||||
statusColor: {
|
|
||||||
normal: '#00ff00',
|
|
||||||
},
|
|
||||||
stationList: [],
|
|
||||||
selectedAreaList: [],
|
|
||||||
iscsDeviceMap: {},
|
|
||||||
deviceMap: {},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
// '$store.state.socket.iscsStatePisMessages': function(list) {
|
// '$store.state.socket.iscsStatePisMessages': function(list) {
|
||||||
// if (list && list.length) {
|
// if (list && list.length) {
|
||||||
// list.forEach(item => {
|
// list.forEach(item => {
|
||||||
@ -178,198 +175,198 @@ export default {
|
|||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
// 请求当前线路车站列表
|
// 请求当前线路车站列表
|
||||||
try {
|
try {
|
||||||
const positionMap = {
|
const positionMap = {
|
||||||
LCD: 0,
|
LCD: 0,
|
||||||
UP_STAND: 1,
|
UP_STAND: 1,
|
||||||
DOWN_STAND: 2,
|
DOWN_STAND: 2,
|
||||||
GATE: 3,
|
GATE: 3,
|
||||||
PROPERTY: 4,
|
PROPERTY: 4,
|
||||||
OVERPASS1: 5,
|
OVERPASS1: 5,
|
||||||
OVERPASS2: 6,
|
OVERPASS2: 6,
|
||||||
LED: 7,
|
LED: 7
|
||||||
}
|
};
|
||||||
const res = await getByGroupStationList(this.$route.query.group)
|
const res = await getByGroupStationList(this.$route.query.group);
|
||||||
const resp = await queryIscsDeviceCod({ mapId: this.$route.query.mapId, system: 'PIS' })
|
const resp = await queryIscsDeviceCod({ mapId: this.$route.query.mapId, system: 'PIS' });
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.stationList = []
|
this.stationList = [];
|
||||||
res.data.forEach(station => {
|
res.data.forEach(station => {
|
||||||
if (!station.depot) {
|
if (!station.depot) {
|
||||||
const children = [
|
const children = [
|
||||||
{ status: 'none' },
|
{ status: 'none' },
|
||||||
{ status: 'none' },
|
{ status: 'none' },
|
||||||
{ status: 'none' },
|
{ status: 'none' },
|
||||||
{ status: 'none' },
|
{ status: 'none' },
|
||||||
{ status: 'none' },
|
{ status: 'none' },
|
||||||
{ status: 'none' },
|
{ status: 'none' },
|
||||||
{ status: 'none' },
|
{ status: 'none' },
|
||||||
{ status: 'none' },
|
{ status: 'none' }
|
||||||
]
|
];
|
||||||
if (resp.code == 200) {
|
if (resp.code == 200) {
|
||||||
resp.data &&
|
resp.data &&
|
||||||
resp.data.forEach(item => {
|
resp.data.forEach(item => {
|
||||||
if (station.code == item.station) {
|
if (station.code == item.station) {
|
||||||
const index = positionMap[item.position]
|
const index = positionMap[item.position];
|
||||||
if (children[index]) {
|
if (children[index]) {
|
||||||
children[index].status = 'default'
|
children[index].status = 'default';
|
||||||
this.iscsDeviceMap[item.code] = station.code + '-' + index
|
this.iscsDeviceMap[item.code] = station.code + '-' + index;
|
||||||
this.deviceMap[station.code + '-' + index] = item
|
this.deviceMap[station.code + '-' + index] = item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
const param = {
|
||||||
|
stationName: station.name,
|
||||||
|
code: station.code,
|
||||||
|
children: children
|
||||||
|
};
|
||||||
|
this.stationList.push(param);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.subscribe();
|
||||||
|
} catch (e) {
|
||||||
|
this.$message.error('获取车站列表失败!');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.clearSubscribe();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showInfoBrroadcast() {
|
||||||
|
this.$refs.infoBroadcast.doShow();
|
||||||
|
},
|
||||||
|
stopBroadcast() {
|
||||||
|
const iscsDeviceCodes = [];
|
||||||
|
this.selectedAreaList.forEach(item => {
|
||||||
|
if (this.deviceMap[item]) {
|
||||||
|
iscsDeviceCodes.push(this.deviceMap[item].code);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!iscsDeviceCodes.length) {
|
||||||
|
this.$message.error('请选择广播设备');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes })
|
||||||
|
.then(resp => {
|
||||||
|
const audio = document.getElementById('voice');
|
||||||
|
audio.pause();
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message.error('广播终止播放失败!');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
releaseBroadcast(voice, type) {
|
||||||
|
const iscsDeviceCodes = [];
|
||||||
|
this.selectedAreaList.forEach(item => {
|
||||||
|
if (this.isSingleStation && !item.startsWith(this.$route.query.stationId)) return;
|
||||||
|
if (this.deviceMap[item]) {
|
||||||
|
iscsDeviceCodes.push(this.deviceMap[item].code);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!iscsDeviceCodes.length) {
|
||||||
|
this.$message.error('请选择广播设备');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
const param = {
|
const params = {
|
||||||
stationName: station.name,
|
resourceId: voice.id,
|
||||||
code: station.code,
|
iscsDeviceCodes: iscsDeviceCodes,
|
||||||
children: children,
|
name: voice.name,
|
||||||
|
content: voice.content,
|
||||||
|
type
|
||||||
|
};
|
||||||
|
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Play', params)
|
||||||
|
.then(resp => {
|
||||||
|
const voiceUrl = this.$store.state.user.ossUrl + (voice.url || resp.data);
|
||||||
|
const audio = document.getElementById('voice');
|
||||||
|
audio.src = voiceUrl;
|
||||||
|
audio.play();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message.error('发布广播失败!');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
selectArea(stationName, index) {
|
||||||
|
const elem = stationName + '-' + index;
|
||||||
|
if (this.selectedAreaList.includes(elem)) {
|
||||||
|
const areaIndex = this.selectedAreaList.indexOf(elem);
|
||||||
|
this.selectedAreaList.splice(areaIndex, 1);
|
||||||
|
} else {
|
||||||
|
this.selectedAreaList.push(elem);
|
||||||
}
|
}
|
||||||
this.stationList.push(param)
|
},
|
||||||
}
|
selectedStation(station) {
|
||||||
})
|
const flag = this.checkStationSelected(station);
|
||||||
}
|
station.children.forEach((item, index) => {
|
||||||
this.subscribe()
|
const elem = station.code + '-' + index;
|
||||||
} catch (e) {
|
if (item.status === 'default' && flag) {
|
||||||
this.$message.error('获取车站列表失败!')
|
const areaIndex = this.selectedAreaList.indexOf(elem);
|
||||||
|
this.selectedAreaList.splice(areaIndex, 1);
|
||||||
|
} else if (item.status === 'default' && !flag && !this.selectedAreaList.includes(elem)) {
|
||||||
|
this.selectedAreaList.push(elem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
checkStationSelected(station) {
|
||||||
|
let stationSelectedFlag = true;
|
||||||
|
station.children.some((item, index) => {
|
||||||
|
if (item.status === 'default') {
|
||||||
|
stationSelectedFlag = this.selectedAreaList.includes(station.code + '-' + index);
|
||||||
|
return !stationSelectedFlag;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return stationSelectedFlag;
|
||||||
|
},
|
||||||
|
selectedBatch(data) {
|
||||||
|
data.active = !data.active;
|
||||||
|
if (data.key == 'station') {
|
||||||
|
this.selectedAllLine(data);
|
||||||
|
} else {
|
||||||
|
let areaIndex;
|
||||||
|
this.verticalHeader.map((item, index) => {
|
||||||
|
if (item.key == data.key) {
|
||||||
|
areaIndex = index;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const flag = data.active;
|
||||||
|
this.stationList.forEach(station => {
|
||||||
|
station.children.forEach((item, index) => {
|
||||||
|
const elem = station.code + '-' + index;
|
||||||
|
if (item.status == 'default' && index + 1 == areaIndex && !flag) {
|
||||||
|
const selectedAreaIndex = this.selectedAreaList.indexOf(elem);
|
||||||
|
this.selectedAreaList.splice(selectedAreaIndex, 1);
|
||||||
|
} else if (item.status == 'default' && index + 1 == areaIndex && flag) {
|
||||||
|
this.selectedAreaList.push(elem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectedAllLine(data) {
|
||||||
|
const flag = data.active;
|
||||||
|
this.selectedAreaList = [];
|
||||||
|
this.stationList.forEach(station => {
|
||||||
|
station.children.forEach((item, index) => {
|
||||||
|
if (item.status === 'default' && flag) {
|
||||||
|
this.selectedAreaList.push(station.code + '-' + index);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
subscribe() {
|
||||||
|
this.clearSubscribe();
|
||||||
|
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||||
|
creatSubscribe(getTopic('ISCSPIS', this.$route.query.group), header);
|
||||||
|
this.$store.dispatch('app/animationsClose');
|
||||||
|
},
|
||||||
|
clearSubscribe() {
|
||||||
|
clearSubscribe(getTopic('ISCSPIS', this.$route.query.group));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
beforeDestroy() {
|
|
||||||
this.clearSubscribe()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
showInfoBrroadcast() {
|
|
||||||
this.$refs.infoBroadcast.doShow()
|
|
||||||
},
|
|
||||||
stopBroadcast() {
|
|
||||||
const iscsDeviceCodes = []
|
|
||||||
this.selectedAreaList.forEach(item => {
|
|
||||||
if (this.deviceMap[item]) {
|
|
||||||
iscsDeviceCodes.push(this.deviceMap[item].code)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (!iscsDeviceCodes.length) {
|
|
||||||
this.$message.error('请选择广播设备')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes })
|
|
||||||
.then(resp => {
|
|
||||||
// const audio = document.getElementById('voice')
|
|
||||||
// audio.pause()
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.$message.error('广播终止播放失败!')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
releaseBroadcast(voice, type) {
|
|
||||||
const iscsDeviceCodes = []
|
|
||||||
this.selectedAreaList.forEach(item => {
|
|
||||||
if (this.isSingleStation && !item.startsWith(this.$route.query.stationId)) return
|
|
||||||
if (this.deviceMap[item]) {
|
|
||||||
iscsDeviceCodes.push(this.deviceMap[item].code)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (!iscsDeviceCodes.length) {
|
|
||||||
this.$message.error('请选择广播设备')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const params = {
|
|
||||||
resourceId: voice.id,
|
|
||||||
iscsDeviceCodes: iscsDeviceCodes,
|
|
||||||
name: voice.name,
|
|
||||||
content: voice.content,
|
|
||||||
type,
|
|
||||||
}
|
|
||||||
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Play', params)
|
|
||||||
.then(resp => {
|
|
||||||
// const voiceUrl = this.$store.state.user.resourcesUrl + (voice.url || resp.data)
|
|
||||||
// const audio = document.getElementById('voice')
|
|
||||||
// audio.src = voiceUrl
|
|
||||||
// audio.play()
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.$message.error('发布广播失败!')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
selectArea(stationName, index) {
|
|
||||||
const elem = stationName + '-' + index
|
|
||||||
if (this.selectedAreaList.includes(elem)) {
|
|
||||||
const areaIndex = this.selectedAreaList.indexOf(elem)
|
|
||||||
this.selectedAreaList.splice(areaIndex, 1)
|
|
||||||
} else {
|
|
||||||
this.selectedAreaList.push(elem)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selectedStation(station) {
|
|
||||||
const flag = this.checkStationSelected(station)
|
|
||||||
station.children.forEach((item, index) => {
|
|
||||||
const elem = station.code + '-' + index
|
|
||||||
if (item.status === 'default' && flag) {
|
|
||||||
const areaIndex = this.selectedAreaList.indexOf(elem)
|
|
||||||
this.selectedAreaList.splice(areaIndex, 1)
|
|
||||||
} else if (item.status === 'default' && !flag && !this.selectedAreaList.includes(elem)) {
|
|
||||||
this.selectedAreaList.push(elem)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
checkStationSelected(station) {
|
|
||||||
let stationSelectedFlag = true
|
|
||||||
station.children.some((item, index) => {
|
|
||||||
if (item.status === 'default') {
|
|
||||||
stationSelectedFlag = this.selectedAreaList.includes(station.code + '-' + index)
|
|
||||||
return !stationSelectedFlag
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return stationSelectedFlag
|
|
||||||
},
|
|
||||||
selectedBatch(data) {
|
|
||||||
data.active = !data.active
|
|
||||||
if (data.key == 'station') {
|
|
||||||
this.selectedAllLine(data)
|
|
||||||
} else {
|
|
||||||
let areaIndex
|
|
||||||
this.verticalHeader.map((item, index) => {
|
|
||||||
if (item.key == data.key) {
|
|
||||||
areaIndex = index
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const flag = data.active
|
|
||||||
this.stationList.forEach(station => {
|
|
||||||
station.children.forEach((item, index) => {
|
|
||||||
const elem = station.code + '-' + index
|
|
||||||
if (item.status == 'default' && index + 1 == areaIndex && !flag) {
|
|
||||||
const selectedAreaIndex = this.selectedAreaList.indexOf(elem)
|
|
||||||
this.selectedAreaList.splice(selectedAreaIndex, 1)
|
|
||||||
} else if (item.status == 'default' && index + 1 == areaIndex && flag) {
|
|
||||||
this.selectedAreaList.push(elem)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selectedAllLine(data) {
|
|
||||||
const flag = data.active
|
|
||||||
this.selectedAreaList = []
|
|
||||||
this.stationList.forEach(station => {
|
|
||||||
station.children.forEach((item, index) => {
|
|
||||||
if (item.status === 'default' && flag) {
|
|
||||||
this.selectedAreaList.push(station.code + '-' + index)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
subscribe() {
|
|
||||||
this.clearSubscribe()
|
|
||||||
const header = { group: this.$route.query.group || '', 'X-Token': getToken() }
|
|
||||||
creatSubscribe(getTopic('ISCSPIS', this.$route.query.group), header)
|
|
||||||
this.$store.dispatch('app/animationsClose')
|
|
||||||
},
|
|
||||||
clearSubscribe() {
|
|
||||||
clearSubscribe(getTopic('ISCSPIS', this.$route.query.group))
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ {
|
/deep/ {
|
||||||
|
@ -262,8 +262,8 @@ export default {
|
|||||||
}
|
}
|
||||||
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes })
|
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes })
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
// const audio = document.getElementById('voice')
|
const audio = document.getElementById('voice');
|
||||||
// audio.pause()
|
audio.pause();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.$message.error('广播终止播放失败!');
|
this.$message.error('广播终止播放失败!');
|
||||||
@ -290,10 +290,10 @@ export default {
|
|||||||
};
|
};
|
||||||
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Play', params)
|
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Play', params)
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
// const voiceUrl = this.$store.state.user.resourcesUrl + (voice.url || resp.data)
|
const voiceUrl = this.$store.state.user.ossUrl + (voice.url || resp.data);
|
||||||
// const audio = document.getElementById('voice')
|
const audio = document.getElementById('voice');
|
||||||
// audio.src = voiceUrl
|
audio.src = voiceUrl;
|
||||||
// audio.play()
|
audio.play();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.$message.error('发布广播失败!');
|
this.$message.error('发布广播失败!');
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
<exam-panel ref="examPanel" />
|
<exam-panel ref="examPanel" />
|
||||||
<device-manage ref="deviceManage" />
|
<device-manage ref="deviceManage" />
|
||||||
<simulation-id ref="simulationId" />
|
<simulation-id ref="simulationId" />
|
||||||
|
<train-operation ref="trainOperation" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -36,6 +37,7 @@ import { destroySimulationByAdmin, exitSimulation, ranAsPlan} from '@/api/simula
|
|||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import SimulationControl from './simulationControl';
|
import SimulationControl from './simulationControl';
|
||||||
import SimulationId from '../simulationId';
|
import SimulationId from '../simulationId';
|
||||||
|
import TrainOperation from './trainOperation';
|
||||||
export default {
|
export default {
|
||||||
name: 'SimulationMenu',
|
name: 'SimulationMenu',
|
||||||
components: {
|
components: {
|
||||||
@ -48,7 +50,8 @@ export default {
|
|||||||
MemberManage,
|
MemberManage,
|
||||||
DeviceManage,
|
DeviceManage,
|
||||||
SimulationControl,
|
SimulationControl,
|
||||||
SimulationId
|
SimulationId,
|
||||||
|
TrainOperation
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -58,13 +61,14 @@ export default {
|
|||||||
deviceif: false,
|
deviceif: false,
|
||||||
deviceShow: true,
|
deviceShow: true,
|
||||||
allMenuList: [
|
allMenuList: [
|
||||||
|
{ label: '列车操作', name: 'trainOperation', click: this.trainOperation, isDisabled: () => { return false; }, isShow: () => { return this.$route.query.project === 'cdgxy'; } },
|
||||||
{ label: '切换', name: 'switchOffset', click: this.switchOffset, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.ibp.moreScreen; } },
|
{ label: '切换', name: 'switchOffset', click: this.switchOffset, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.ibp.moreScreen; } },
|
||||||
{ label: '设备视图', name: 'jlmap3dmodel', click: this.jlmap3dmodel, isDisabled: () => { return false; }, isShow: () => { return this.$route.query.client !== 'diagramEdit' && this.$route.query.simType !== 'EMERGENCY'; } },
|
{ label: '设备视图', name: 'jlmap3dmodel', click: this.jlmap3dmodel, isDisabled: () => { return false; }, isShow: () => { return this.$route.query.client !== 'diagramEdit' && this.$route.query.simType !== 'EMERGENCY'; } },
|
||||||
{ label: '设备管理', name: 'deviceManage', click: this.deviceManage, isDisabled: () => { return false; },
|
{ label: '设备管理', name: 'deviceManage', click: this.deviceManage, isDisabled: () => { return false; },
|
||||||
isShow: () => {
|
isShow: () => {
|
||||||
return (this.$store.state.training.domConfig.hasDeviceManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER) || (this.$route.query.client === 'interlockWork' && this.$route.query.projectDevice === 'ILW');
|
return (this.$store.state.training.domConfig.hasDeviceManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER) || (this.$route.query.client === 'interlockWork' && this.$route.query.projectDevice === 'ILW');
|
||||||
} },
|
} },
|
||||||
{ label: '联系方式', name: 'contectUs', click: this.contectUs, isDisabled: () => { return false; }, isShow: () => { return true; } },
|
{ label: '联系方式', name: 'contectUs', click: this.contectUs, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.projectConfig.loginContectInformation; } },
|
||||||
{ label: '生成仿真号', name: 'generateQrCode', click: this.generateQrCode, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.joint && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
{ label: '生成仿真号', name: 'generateQrCode', click: this.generateQrCode, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.joint && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
||||||
{ label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: this.isShowLpf},
|
{ label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: this.isShowLpf},
|
||||||
{ label: '成员管理', name: 'memberManage', click: this.memberManage, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasMemberManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
{ label: '成员管理', name: 'memberManage', click: this.memberManage, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasMemberManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
|
||||||
@ -141,6 +145,9 @@ export default {
|
|||||||
switchOffset() {
|
switchOffset() {
|
||||||
EventBus.$emit('switchOffset');
|
EventBus.$emit('switchOffset');
|
||||||
},
|
},
|
||||||
|
trainOperation() {
|
||||||
|
this.$refs.trainOperation.doShow();
|
||||||
|
},
|
||||||
generateQrCode() {
|
generateQrCode() {
|
||||||
this.hideMenuList();
|
this.hideMenuList();
|
||||||
const param = {
|
const param = {
|
||||||
|
58
src/views/newMap/display/simulationMenu/trainOperation.vue
Normal file
58
src/views/newMap/display/simulationMenu/trainOperation.vue
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="550px" center :before-close="doClose">
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<el-button-group>
|
||||||
|
<el-button type="success" icon="el-icon-arrow-left" @click="trainRun(false)">启动</el-button>
|
||||||
|
<el-button type="success" @click="trainRun(true)">启动<i class="el-icon-arrow-right el-icon--right"></i></el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { controlYjTrain } from '@/api/simulation';
|
||||||
|
export default {
|
||||||
|
name: 'TrainOperation',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
title() {
|
||||||
|
return '列车操作';
|
||||||
|
},
|
||||||
|
group() {
|
||||||
|
return this.$route.query.group;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow() {
|
||||||
|
this.show = true;
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.show = false;
|
||||||
|
},
|
||||||
|
trainRun(right) {
|
||||||
|
this.$confirm('是否确认启动列车?', this.$t('tip.hint'), {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
controlYjTrain(this.group, right).then(() => {
|
||||||
|
this.$message.success('列车启动成功!');
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.error('列车启动失败!');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleSure() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -88,6 +88,50 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-form v-show="['TMS', 'PIS'].includes(data.type)" ref="formTms" :model="formTms" label-width="100px" :rules="rulesTms">
|
||||||
|
<el-form-item label="关联设备:" prop="deviceCode" size="small">
|
||||||
|
<el-select v-model="formTms.deviceCode" placeholder="请选择" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in lwList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.code"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="关联角色:" prop="roleCode">
|
||||||
|
<el-select v-model="formTms.roleCode" placeholder="请选择" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in roleList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户端列表:" prop="clientList">
|
||||||
|
<el-select v-model="formTms.clientList" multiple placeholder="请选择" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in clientList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="初始客户端:" prop="client">
|
||||||
|
<el-select v-model="formTms.client" placeholder="请选择" size="small">
|
||||||
|
<template v-for="item in clientList">
|
||||||
|
<el-option
|
||||||
|
v-if="formTms.clientList.includes(item.id)"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<el-form v-show="data.type === 'LW'" ref="formLw" :model="formLw" label-width="100px" :rules="rulesLw">
|
<el-form v-show="data.type === 'LW'" ref="formLw" :model="formLw" label-width="100px" :rules="rulesLw">
|
||||||
<el-form-item label="关联车站:" prop="stationCode">
|
<el-form-item label="关联车站:" prop="stationCode">
|
||||||
<el-select v-model="formLw.stationCode" placeholder="请选择" size="small">
|
<el-select v-model="formLw.stationCode" placeholder="请选择" size="small">
|
||||||
@ -242,11 +286,31 @@ export default {
|
|||||||
client:'',
|
client:'',
|
||||||
clientList: []
|
clientList: []
|
||||||
},
|
},
|
||||||
|
formTms: {
|
||||||
|
deviceCode: '',
|
||||||
|
roleCode:'',
|
||||||
|
client:'',
|
||||||
|
clientList: []
|
||||||
|
},
|
||||||
clientList: [],
|
clientList: [],
|
||||||
pictureList: [
|
pictureList: [
|
||||||
{ label: '广播系统', value: 'paMain' },
|
{ label: '广播系统', value: 'paMain' },
|
||||||
{ label: '乘客信息', value: 'pidsMain' }
|
{ label: '乘客信息', value: 'pidsMain' }
|
||||||
],
|
],
|
||||||
|
rulesTms:{
|
||||||
|
deviceCode: [
|
||||||
|
{ required: true, message: '请选择归属车站', trigger: 'change'}
|
||||||
|
],
|
||||||
|
roleCode: [
|
||||||
|
{ required: true, message: '请选择关联角色', trigger: 'change'}
|
||||||
|
],
|
||||||
|
client: [
|
||||||
|
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
||||||
|
],
|
||||||
|
clientList: [
|
||||||
|
{ required: true, message: '请选择客户端列表', trigger: 'change'}
|
||||||
|
]
|
||||||
|
},
|
||||||
rulesIm:{
|
rulesIm:{
|
||||||
roleCode: [
|
roleCode: [
|
||||||
{ required: true, message: '请选择关联角色', trigger: 'change'}
|
{ required: true, message: '请选择关联角色', trigger: 'change'}
|
||||||
@ -331,6 +395,10 @@ export default {
|
|||||||
this.formIscs = {deviceCode: '', picture: '', stationCode: '', roleCode:'', client:'', clientList: []};
|
this.formIscs = {deviceCode: '', picture: '', stationCode: '', roleCode:'', client:'', clientList: []};
|
||||||
const form = JSON.parse(resp.data.config);
|
const form = JSON.parse(resp.data.config);
|
||||||
this.formIscs = Object.assign(this.formIscs, form);
|
this.formIscs = Object.assign(this.formIscs, form);
|
||||||
|
} else if (resp.data.config && ['PIS', 'TMS'].includes(resp.data.type)) {
|
||||||
|
this.formTms = {deviceCode: '', roleCode:'', client:'', clientList: []};
|
||||||
|
const form = JSON.parse(resp.data.config);
|
||||||
|
this.formTms = Object.assign(this.formTms, form);
|
||||||
}
|
}
|
||||||
}).catch(()=> {
|
}).catch(()=> {
|
||||||
this.$message.error('获取项目设备详情失败!');
|
this.$message.error('获取项目设备详情失败!');
|
||||||
@ -348,7 +416,7 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message.error('获取设备列表失败!');
|
this.$message.error('获取设备列表失败!');
|
||||||
});
|
});
|
||||||
} else if (this.data.type === 'ISCS_CW') {
|
} else if (this.data.type === 'ISCS_CW' || this.data.type === 'PIS') {
|
||||||
getDevicesByType(row.project, 'CW').then(res => {
|
getDevicesByType(row.project, 'CW').then(res => {
|
||||||
if (res.data && res.data.length) {
|
if (res.data && res.data.length) {
|
||||||
this.lwList = res.data;
|
this.lwList = res.data;
|
||||||
@ -356,6 +424,14 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message.error('获取设备列表失败!');
|
this.$message.error('获取设备列表失败!');
|
||||||
});
|
});
|
||||||
|
} else if (this.data.type === 'TMS') {
|
||||||
|
getDevicesByType(row.project, 'DRIVE').then(res => {
|
||||||
|
if (res.data && res.data.length) {
|
||||||
|
this.lwList = res.data;
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.error('获取设备列表失败!');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
getBackProjectConfigByCode(row.project).then(res=>{
|
getBackProjectConfigByCode(row.project).then(res=>{
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
@ -435,6 +511,17 @@ export default {
|
|||||||
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else if (this.data.type === 'PIS' || this.data.type === 'TMS') {
|
||||||
|
this.$refs.formTms.validate(() => {
|
||||||
|
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(this.formTms) };
|
||||||
|
setDeviceConfig(data).then(response => {
|
||||||
|
self.$message.success('设置设备配置成功');
|
||||||
|
self.handleClose();
|
||||||
|
self.$emit('reloadTable');
|
||||||
|
}).catch(error => {
|
||||||
|
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
@ -445,6 +532,7 @@ export default {
|
|||||||
this.formLw = {stationCode: '', roleCode:'', client:'', clientList: []};
|
this.formLw = {stationCode: '', roleCode:'', client:'', clientList: []};
|
||||||
this.formIm = { roleCode:'', client:'', clientList: []};
|
this.formIm = { roleCode:'', client:'', clientList: []};
|
||||||
this.formIscs = {deviceCode: '', picture: '', stationCode: '', roleCode:'', client:'', clientList: []};
|
this.formIscs = {deviceCode: '', picture: '', stationCode: '', roleCode:'', client:'', clientList: []};
|
||||||
|
this.formTms = { deviceCode: '', roleCode: '', client: '', clientList: [] };
|
||||||
this.$refs.formIbp.resetFields();
|
this.$refs.formIbp.resetFields();
|
||||||
this.$refs.formLw.resetFields();
|
this.$refs.formLw.resetFields();
|
||||||
this.$refs.formIscs.resetFields();
|
this.$refs.formIscs.resetFields();
|
||||||
|
@ -187,8 +187,8 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
editConfig(index, row) {
|
editConfig(index, row) {
|
||||||
const configGatewayList = ['SWITCH', 'SIGNAL', 'PSD', 'PSL', 'PSC', 'UDP_LOW', 'SECTION', 'TRAIN', 'UDP_CLIENT', 'PIS_STAND', 'PIS_TRAIN', 'PIS', 'TMS'];
|
const configGatewayList = ['SWITCH', 'SIGNAL', 'PSD', 'PSL', 'PSC', 'UDP_LOW', 'SECTION', 'TRAIN', 'UDP_CLIENT', 'PIS_STAND', 'PIS_TRAIN', 'PIS'];
|
||||||
if (['LW', 'VR_IBP', 'ISCS_LW', 'ISCS_CW', 'IM', 'CW', 'DRIVE', 'DEPOT'].includes(row.type)) {
|
if (['LW', 'VR_IBP', 'ISCS_LW', 'ISCS_CW', 'IM', 'CW', 'DRIVE', 'DEPOT', 'TMS', 'PIS'].includes(row.type)) {
|
||||||
this.$refs.editConfig.doShow(row);
|
this.$refs.editConfig.doShow(row);
|
||||||
} else if (configGatewayList.includes(row.type)) {
|
} else if (configGatewayList.includes(row.type)) {
|
||||||
this.$refs.editConfigGateway.doShow(row);
|
this.$refs.editConfigGateway.doShow(row);
|
||||||
|
Loading…
Reference in New Issue
Block a user