Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
4804cebfcd
@ -590,3 +590,12 @@ export function getUnreceivedMessages(simulationId, memberId) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 控制叶佳供货的小车 */
|
||||
export function controlYjTrain(simulationId, right) {
|
||||
return request({
|
||||
url: `/api/realDevice/${simulationId}/train`,
|
||||
method: 'put',
|
||||
params: { right }
|
||||
});
|
||||
}
|
||||
|
@ -585,7 +585,6 @@ class Jlmap {
|
||||
if (elem.hasOwnProperty('applicantId')) {
|
||||
controlTransferList.push(elem);
|
||||
}
|
||||
if (!elem.applicantId) {
|
||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||
const guideLock = this.mapDevice[oDevice.guideLockCode];
|
||||
const guideLockStatus = {totalGuideLock: elem.totalGuideLock};
|
||||
@ -597,7 +596,6 @@ class Jlmap {
|
||||
} else {
|
||||
this.$painter.update(oDevice);
|
||||
}
|
||||
}
|
||||
store.commit('map/mapStationStateUpdate');
|
||||
} else if (elem.deviceType === 'STATION_DIRECTION') {
|
||||
const mapStationDirectionData = store.state.map.mapStationDirectionData;
|
||||
|
@ -954,6 +954,7 @@ export default class Station extends Group {
|
||||
this.substationArrowsControl && this.substationArrowsControl.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.stopAnimation(true);
|
||||
this.veryControl && this.veryControl.setColor(this.style.Station.StationControl.veryControl.defaultColor);
|
||||
this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.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);
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
|
@ -388,6 +388,14 @@ export const menuOperate = {
|
||||
// 非常站控 大铁线路
|
||||
operation: OperationEvent.StationControl.requestVeryControl.menu.operation,
|
||||
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: {
|
||||
|
@ -64,8 +64,15 @@ export default {
|
||||
// 暂无功能,先disabled
|
||||
label: '授权',
|
||||
disabled: true,
|
||||
handler: this.undeveloped,
|
||||
isShow: (station, work) => false
|
||||
handler: this.work === 'localWork' ? this.agreeCenterControl : this.agreeStationControl,
|
||||
isDisabled: (station, work) => {
|
||||
if (work === 'localWork') {
|
||||
return station.apply2TheControlMode !== 'Center';
|
||||
} else {
|
||||
return station.apply2TheControlMode !== 'Local';
|
||||
}
|
||||
},
|
||||
isShow: (station, work) => true
|
||||
},
|
||||
{
|
||||
label: '取消',
|
||||
@ -75,11 +82,11 @@ export default {
|
||||
if (work === 'localWork') {
|
||||
return station.controlMode === 'Center';
|
||||
} else {
|
||||
return station.controlMode !== 'Center';
|
||||
return true;
|
||||
}
|
||||
},
|
||||
isShow: (station, work) => {
|
||||
return work === 'localWork';
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// /** 紧急站控 */
|
||||
@ -89,10 +96,14 @@ export default {
|
||||
handler: this.setEmergencyControl,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL,
|
||||
isDisabled: (station, work) => {
|
||||
if (work === 'localWork') {
|
||||
return station.controlMode === 'Emergency';
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
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() {
|
||||
// 紧急站控
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
|
@ -50,10 +50,10 @@
|
||||
<div class="left-table-cell"><span>跳停</span></div>
|
||||
</el-col>
|
||||
<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 :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-row>
|
||||
<el-row>
|
||||
@ -149,9 +149,12 @@ export default {
|
||||
title: '',
|
||||
standDetainColor: '#FFF',
|
||||
detainStatusColor: '#FFF',
|
||||
standJumpColor: '#FFF',
|
||||
jumpStatusColor: '#FFF',
|
||||
bgColor: '#000',
|
||||
fontColor: '#FFF',
|
||||
detainInterval: ''
|
||||
detainInterval: '',
|
||||
jumpInterval: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -203,9 +206,7 @@ export default {
|
||||
this.initStatus(list);
|
||||
},
|
||||
'$store.state.socket.equipmentStatus': function (val) {
|
||||
if (this.selected) {
|
||||
this.detainStatusColor = this.selected.centerHoldTrain || this.selected.stationHoldTrain ? '#FF0' : '#FFF';
|
||||
}
|
||||
this.initDeviceStatus();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -222,6 +223,7 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
const requestList = this.$store.state.menuOperation.requestList;
|
||||
this.initDeviceStatus();
|
||||
this.initStatus(requestList || []);
|
||||
this.position = position;
|
||||
this.dialogShow = true;
|
||||
@ -233,21 +235,37 @@ export default {
|
||||
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) {
|
||||
this.standDetainColor = '#FFF';
|
||||
this.bgColor = '#000';
|
||||
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) {
|
||||
clearInterval(this.detainInterval);
|
||||
this.detainInterval = '';
|
||||
}
|
||||
requestList.forEach(item => {
|
||||
if (item.device && item.device.code === this.selected.code) {
|
||||
if (item.operation.code === OperationEvent.StationStand.setDetainTrain.menu.operation || item.operation.code === OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.standDetain();
|
||||
if (this.jumpInterval) {
|
||||
clearInterval(this.jumpInterval);
|
||||
this.jumpInterval = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
const step = {
|
||||
@ -259,10 +277,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
if (this.detainInterval) {
|
||||
clearInterval(this.detainInterval);
|
||||
this.detainInterval = '';
|
||||
}
|
||||
this.clearTimer();
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -343,7 +358,21 @@ export default {
|
||||
} else {
|
||||
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) {
|
||||
|
@ -369,7 +369,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
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,
|
||||
param: step.param
|
||||
});
|
||||
@ -390,7 +390,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
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,
|
||||
param: step.param
|
||||
});
|
||||
|
@ -50,6 +50,9 @@ const projectConfig = {
|
||||
},
|
||||
bottomRecordNumber: (state) => {
|
||||
return state.viewSetting.bottomRecordNumber;
|
||||
},
|
||||
loginContectInformation: (state) => {
|
||||
return state.viewSetting.loginContectInformation;
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
|
@ -6,16 +6,13 @@
|
||||
<div class="main_screen_content">
|
||||
<div v-show="!isSingleStation" class="screen_left">
|
||||
<div class="screen_left_tab">特定区域</div>
|
||||
<el-row
|
||||
><el-button
|
||||
<el-row><el-button
|
||||
v-for="(item, index) in verticalHeader"
|
||||
:key="index"
|
||||
class="screen_operate_name"
|
||||
:class="{ active: item.active }"
|
||||
@click="selectedBatch(item)"
|
||||
>{{ item.title }}</el-button
|
||||
></el-row
|
||||
>
|
||||
>{{ item.title }}</el-button></el-row>
|
||||
</div>
|
||||
<div class="screen_main_content">
|
||||
<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>
|
||||
<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="screen_station_name">全车站</div>
|
||||
</div>
|
||||
@ -91,11 +88,11 @@
|
||||
<div class="screen_right">
|
||||
<div class="each_operate">
|
||||
<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 class="each_operate">
|
||||
<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>
|
||||
@ -125,25 +122,17 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getByGroupStationList } from '@/api/jmap/map'
|
||||
import { queryIscsDeviceCod } from '@/api/iscs'
|
||||
import InfoBroadcast from './infoBroadcast'
|
||||
import { sendCommandNew } from '@/api/jmap/training'
|
||||
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import { queryIscsDeviceCod } from '@/api/iscs';
|
||||
import InfoBroadcast from './infoBroadcast';
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp';
|
||||
import { getToken } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'MainScreen',
|
||||
components: {
|
||||
InfoBroadcast,
|
||||
},
|
||||
computed: {
|
||||
currentStation() {
|
||||
return this.stationList.find(station => station.code === this.$route.query.stationId)
|
||||
},
|
||||
isSingleStation() {
|
||||
return this.$route.query.stationId.startsWith('Station')
|
||||
},
|
||||
InfoBroadcast
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -156,15 +145,23 @@ export default {
|
||||
{ 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 },
|
||||
{ name: 'LED', title: '出入口(LED)', key: 'LED', type: 'checkBox', active: false }
|
||||
],
|
||||
statusColor: {
|
||||
normal: '#00ff00',
|
||||
normal: '#00ff00'
|
||||
},
|
||||
stationList: [],
|
||||
selectedAreaList: [],
|
||||
iscsDeviceMap: {},
|
||||
deviceMap: {},
|
||||
deviceMap: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
currentStation() {
|
||||
return this.stationList.find(station => station.code === this.$route.query.stationId);
|
||||
},
|
||||
isSingleStation() {
|
||||
return this.$route.query.stationId.startsWith('Station');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -190,12 +187,12 @@ export default {
|
||||
PROPERTY: 4,
|
||||
OVERPASS1: 5,
|
||||
OVERPASS2: 6,
|
||||
LED: 7,
|
||||
}
|
||||
const res = await getByGroupStationList(this.$route.query.group)
|
||||
const resp = await queryIscsDeviceCod({ mapId: this.$route.query.mapId, system: 'PIS' })
|
||||
LED: 7
|
||||
};
|
||||
const res = await getByGroupStationList(this.$route.query.group);
|
||||
const resp = await queryIscsDeviceCod({ mapId: this.$route.query.mapId, system: 'PIS' });
|
||||
if (res.code == 200) {
|
||||
this.stationList = []
|
||||
this.stationList = [];
|
||||
res.data.forEach(station => {
|
||||
if (!station.depot) {
|
||||
const children = [
|
||||
@ -206,170 +203,170 @@ export default {
|
||||
{ status: 'none' },
|
||||
{ status: 'none' },
|
||||
{ status: 'none' },
|
||||
{ status: 'none' },
|
||||
]
|
||||
{ status: 'none' }
|
||||
];
|
||||
if (resp.code == 200) {
|
||||
resp.data &&
|
||||
resp.data.forEach(item => {
|
||||
if (station.code == item.station) {
|
||||
const index = positionMap[item.position]
|
||||
const index = positionMap[item.position];
|
||||
if (children[index]) {
|
||||
children[index].status = 'default'
|
||||
this.iscsDeviceMap[item.code] = station.code + '-' + index
|
||||
this.deviceMap[station.code + '-' + index] = item
|
||||
children[index].status = 'default';
|
||||
this.iscsDeviceMap[item.code] = station.code + '-' + index;
|
||||
this.deviceMap[station.code + '-' + index] = item;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
const param = {
|
||||
stationName: station.name,
|
||||
code: station.code,
|
||||
children: children,
|
||||
children: children
|
||||
};
|
||||
this.stationList.push(param);
|
||||
}
|
||||
this.stationList.push(param)
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
this.subscribe()
|
||||
this.subscribe();
|
||||
} catch (e) {
|
||||
this.$message.error('获取车站列表失败!')
|
||||
this.$message.error('获取车站列表失败!');
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.clearSubscribe()
|
||||
this.clearSubscribe();
|
||||
},
|
||||
methods: {
|
||||
showInfoBrroadcast() {
|
||||
this.$refs.infoBroadcast.doShow()
|
||||
this.$refs.infoBroadcast.doShow();
|
||||
},
|
||||
stopBroadcast() {
|
||||
const iscsDeviceCodes = []
|
||||
const iscsDeviceCodes = [];
|
||||
this.selectedAreaList.forEach(item => {
|
||||
if (this.deviceMap[item]) {
|
||||
iscsDeviceCodes.push(this.deviceMap[item].code)
|
||||
iscsDeviceCodes.push(this.deviceMap[item].code);
|
||||
}
|
||||
})
|
||||
});
|
||||
if (!iscsDeviceCodes.length) {
|
||||
this.$message.error('请选择广播设备')
|
||||
return
|
||||
this.$message.error('请选择广播设备');
|
||||
return;
|
||||
}
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes })
|
||||
.then(resp => {
|
||||
// const audio = document.getElementById('voice')
|
||||
// audio.pause()
|
||||
const audio = document.getElementById('voice');
|
||||
audio.pause();
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message.error('广播终止播放失败!')
|
||||
})
|
||||
this.$message.error('广播终止播放失败!');
|
||||
});
|
||||
},
|
||||
releaseBroadcast(voice, type) {
|
||||
const iscsDeviceCodes = []
|
||||
const iscsDeviceCodes = [];
|
||||
this.selectedAreaList.forEach(item => {
|
||||
if (this.isSingleStation && !item.startsWith(this.$route.query.stationId)) return
|
||||
if (this.isSingleStation && !item.startsWith(this.$route.query.stationId)) return;
|
||||
if (this.deviceMap[item]) {
|
||||
iscsDeviceCodes.push(this.deviceMap[item].code)
|
||||
iscsDeviceCodes.push(this.deviceMap[item].code);
|
||||
}
|
||||
})
|
||||
});
|
||||
if (!iscsDeviceCodes.length) {
|
||||
this.$message.error('请选择广播设备')
|
||||
return
|
||||
this.$message.error('请选择广播设备');
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
resourceId: voice.id,
|
||||
iscsDeviceCodes: iscsDeviceCodes,
|
||||
name: voice.name,
|
||||
content: voice.content,
|
||||
type,
|
||||
}
|
||||
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()
|
||||
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('发布广播失败!')
|
||||
})
|
||||
this.$message.error('发布广播失败!');
|
||||
});
|
||||
},
|
||||
selectArea(stationName, index) {
|
||||
const elem = stationName + '-' + index
|
||||
const elem = stationName + '-' + index;
|
||||
if (this.selectedAreaList.includes(elem)) {
|
||||
const areaIndex = this.selectedAreaList.indexOf(elem)
|
||||
this.selectedAreaList.splice(areaIndex, 1)
|
||||
const areaIndex = this.selectedAreaList.indexOf(elem);
|
||||
this.selectedAreaList.splice(areaIndex, 1);
|
||||
} else {
|
||||
this.selectedAreaList.push(elem)
|
||||
this.selectedAreaList.push(elem);
|
||||
}
|
||||
},
|
||||
selectedStation(station) {
|
||||
const flag = this.checkStationSelected(station)
|
||||
const flag = this.checkStationSelected(station);
|
||||
station.children.forEach((item, index) => {
|
||||
const elem = station.code + '-' + index
|
||||
const elem = station.code + '-' + index;
|
||||
if (item.status === 'default' && flag) {
|
||||
const areaIndex = this.selectedAreaList.indexOf(elem)
|
||||
this.selectedAreaList.splice(areaIndex, 1)
|
||||
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)
|
||||
this.selectedAreaList.push(elem);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
checkStationSelected(station) {
|
||||
let stationSelectedFlag = true
|
||||
let stationSelectedFlag = true;
|
||||
station.children.some((item, index) => {
|
||||
if (item.status === 'default') {
|
||||
stationSelectedFlag = this.selectedAreaList.includes(station.code + '-' + index)
|
||||
return !stationSelectedFlag
|
||||
stationSelectedFlag = this.selectedAreaList.includes(station.code + '-' + index);
|
||||
return !stationSelectedFlag;
|
||||
}
|
||||
})
|
||||
return stationSelectedFlag
|
||||
});
|
||||
return stationSelectedFlag;
|
||||
},
|
||||
selectedBatch(data) {
|
||||
data.active = !data.active
|
||||
data.active = !data.active;
|
||||
if (data.key == 'station') {
|
||||
this.selectedAllLine(data)
|
||||
this.selectedAllLine(data);
|
||||
} else {
|
||||
let areaIndex
|
||||
let areaIndex;
|
||||
this.verticalHeader.map((item, index) => {
|
||||
if (item.key == data.key) {
|
||||
areaIndex = index
|
||||
areaIndex = index;
|
||||
}
|
||||
})
|
||||
const flag = data.active
|
||||
});
|
||||
const flag = data.active;
|
||||
this.stationList.forEach(station => {
|
||||
station.children.forEach((item, index) => {
|
||||
const elem = station.code + '-' + 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)
|
||||
const selectedAreaIndex = this.selectedAreaList.indexOf(elem);
|
||||
this.selectedAreaList.splice(selectedAreaIndex, 1);
|
||||
} else if (item.status == 'default' && index + 1 == areaIndex && flag) {
|
||||
this.selectedAreaList.push(elem)
|
||||
this.selectedAreaList.push(elem);
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
selectedAllLine(data) {
|
||||
const flag = data.active
|
||||
this.selectedAreaList = []
|
||||
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)
|
||||
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')
|
||||
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))
|
||||
},
|
||||
},
|
||||
}
|
||||
clearSubscribe(getTopic('ISCSPIS', this.$route.query.group));
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ {
|
||||
|
@ -262,8 +262,8 @@ export default {
|
||||
}
|
||||
sendCommandNew(this.$route.query.group, 'ISCS_PIS_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes })
|
||||
.then(resp => {
|
||||
// const audio = document.getElementById('voice')
|
||||
// audio.pause()
|
||||
const audio = document.getElementById('voice');
|
||||
audio.pause();
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message.error('广播终止播放失败!');
|
||||
@ -290,10 +290,10 @@ export default {
|
||||
};
|
||||
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()
|
||||
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('发布广播失败!');
|
||||
|
@ -18,6 +18,7 @@
|
||||
<exam-panel ref="examPanel" />
|
||||
<device-manage ref="deviceManage" />
|
||||
<simulation-id ref="simulationId" />
|
||||
<train-operation ref="trainOperation" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -36,6 +37,7 @@ import { destroySimulationByAdmin, exitSimulation, ranAsPlan} from '@/api/simula
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import SimulationControl from './simulationControl';
|
||||
import SimulationId from '../simulationId';
|
||||
import TrainOperation from './trainOperation';
|
||||
export default {
|
||||
name: 'SimulationMenu',
|
||||
components: {
|
||||
@ -48,7 +50,8 @@ export default {
|
||||
MemberManage,
|
||||
DeviceManage,
|
||||
SimulationControl,
|
||||
SimulationId
|
||||
SimulationId,
|
||||
TrainOperation
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -58,13 +61,14 @@ export default {
|
||||
deviceif: false,
|
||||
deviceShow: true,
|
||||
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: '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; },
|
||||
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');
|
||||
} },
|
||||
{ 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: '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; } },
|
||||
@ -141,6 +145,9 @@ export default {
|
||||
switchOffset() {
|
||||
EventBus.$emit('switchOffset');
|
||||
},
|
||||
trainOperation() {
|
||||
this.$refs.trainOperation.doShow();
|
||||
},
|
||||
generateQrCode() {
|
||||
this.hideMenuList();
|
||||
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-form-item>
|
||||
</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-item label="关联车站:" prop="stationCode">
|
||||
<el-select v-model="formLw.stationCode" placeholder="请选择" size="small">
|
||||
@ -242,11 +286,31 @@ export default {
|
||||
client:'',
|
||||
clientList: []
|
||||
},
|
||||
formTms: {
|
||||
deviceCode: '',
|
||||
roleCode:'',
|
||||
client:'',
|
||||
clientList: []
|
||||
},
|
||||
clientList: [],
|
||||
pictureList: [
|
||||
{ label: '广播系统', value: 'paMain' },
|
||||
{ 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:{
|
||||
roleCode: [
|
||||
{ required: true, message: '请选择关联角色', trigger: 'change'}
|
||||
@ -331,6 +395,10 @@ export default {
|
||||
this.formIscs = {deviceCode: '', picture: '', stationCode: '', roleCode:'', client:'', clientList: []};
|
||||
const form = JSON.parse(resp.data.config);
|
||||
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(()=> {
|
||||
this.$message.error('获取项目设备详情失败!');
|
||||
@ -348,7 +416,7 @@ export default {
|
||||
}).catch(() => {
|
||||
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 => {
|
||||
if (res.data && res.data.length) {
|
||||
this.lwList = res.data;
|
||||
@ -356,6 +424,14 @@ export default {
|
||||
}).catch(() => {
|
||||
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=>{
|
||||
const data = res.data;
|
||||
@ -435,6 +511,17 @@ export default {
|
||||
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() {
|
||||
@ -445,6 +532,7 @@ export default {
|
||||
this.formLw = {stationCode: '', roleCode:'', client:'', clientList: []};
|
||||
this.formIm = { roleCode:'', client:'', clientList: []};
|
||||
this.formIscs = {deviceCode: '', picture: '', stationCode: '', roleCode:'', client:'', clientList: []};
|
||||
this.formTms = { deviceCode: '', roleCode: '', client: '', clientList: [] };
|
||||
this.$refs.formIbp.resetFields();
|
||||
this.$refs.formLw.resetFields();
|
||||
this.$refs.formIscs.resetFields();
|
||||
|
@ -187,8 +187,8 @@ export default {
|
||||
});
|
||||
},
|
||||
editConfig(index, row) {
|
||||
const configGatewayList = ['SWITCH', 'SIGNAL', 'PSD', 'PSL', 'PSC', 'UDP_LOW', 'SECTION', 'TRAIN', 'UDP_CLIENT', 'PIS_STAND', 'PIS_TRAIN', 'PIS', 'TMS'];
|
||||
if (['LW', 'VR_IBP', 'ISCS_LW', 'ISCS_CW', 'IM', 'CW', 'DRIVE', 'DEPOT'].includes(row.type)) {
|
||||
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', 'TMS', 'PIS'].includes(row.type)) {
|
||||
this.$refs.editConfig.doShow(row);
|
||||
} else if (configGatewayList.includes(row.type)) {
|
||||
this.$refs.editConfigGateway.doShow(row);
|
||||
|
Loading…
Reference in New Issue
Block a user