代码调整

This commit is contained in:
fan 2021-05-14 15:05:57 +08:00
parent 149d4cf995
commit ddfddfa292
13 changed files with 637 additions and 156 deletions

View File

@ -500,7 +500,6 @@ class Jlmap {
oDevice['cutOff'] = sectionA.cutOff; oDevice['cutOff'] = sectionA.cutOff;
} }
} }
this.$painter.update(oDevice); this.$painter.update(oDevice);
} else if (elem.deviceType == 'SECTION') { } else if (elem.deviceType == 'SECTION') {
const oDevice = this.mapDevice[code]; const oDevice = this.mapDevice[code];

View File

@ -6,6 +6,7 @@ import transitionDeviceStatus from './constant/stateTransition';
import shapefactory from './shape/factory'; import shapefactory from './shape/factory';
import TransformHandle from './transformHandle'; import TransformHandle from './transformHandle';
import TransformHandleScreen from './transformHandleScreen'; import TransformHandleScreen from './transformHandleScreen';
import deviceRender from './constant/deviceRender';
class Painter { class Painter {
constructor(jmap) { constructor(jmap) {
@ -136,6 +137,8 @@ class Painter {
const overlapTrainList = this.checkTrainOverlap(device); const overlapTrainList = this.checkTrainOverlap(device);
overlapTrainList.forEach((item, index) => { overlapTrainList.forEach((item, index) => {
const trainDevice = this.$jmap.getDeviceByCode(item); const trainDevice = this.$jmap.getDeviceByCode(item);
trainDevice._type = deviceRender['Train']._type;
trainDevice.zlevel = deviceRender['Train'].zlevel;
trainDevice.overLapIndex = index; trainDevice.overLapIndex = index;
trainDevice.instance && this.mapInstanceLevel[deviceType.Train].remove(trainDevice.instance); trainDevice.instance && this.mapInstanceLevel[deviceType.Train].remove(trainDevice.instance);
this.add(trainDevice); this.add(trainDevice);
@ -223,7 +226,7 @@ class Painter {
getShapeTipPoint(instance, opts) { getShapeTipPoint(instance, opts) {
if (instance) { if (instance) {
var point = instance.getShapeTipPoint(opts); var point = instance.getShapeTipPoint(opts);
if (point) { if (point) {
// 矩阵变换 // 矩阵变换
var transPoint = instance.transformCoordToGlobal(point.x, point.y); var transPoint = instance.transformCoordToGlobal(point.x, point.y);
return { return {

View File

@ -60,7 +60,6 @@ export default class Train extends Group {
this._computed(); this._computed();
const model = this.model; const model = this.model;
const style = this.style; const style = this.style;
if (this.point) { if (this.point) {
this.trainB = new TrainBody({ this.trainB = new TrainBody({
zlevel: this.zlevel, zlevel: this.zlevel,

View File

@ -76,9 +76,9 @@
<div class="nav-border" style="padding: 5px;"> <div class="nav-border" style="padding: 5px;">
<el-row style="height: 25px;"> <el-row style="height: 25px;">
<div style="display: flex;justify-content: space-between"> <div style="display: flex;justify-content: space-between">
<el-button size="mini" plain>车次号修改</el-button> <el-button size="mini" plain :disabled="trainOperateType==='update'" @click="handleTrainOperate('update')">车次号修改</el-button>
<el-button size="mini" plain :disabled="true">车次号删除</el-button> <el-button size="mini" plain :disabled="trainOperateType==='delete'" @click="handleTrainOperate('delete')">车次号删除</el-button>
<el-button size="mini" plain :disabled="true">车次号创建</el-button> <el-button size="mini" plain :disabled="trainOperateType==='create'" @click="handleTrainOperate('create')">车次号创建</el-button>
<el-button size="mini" plain :disabled="true">车次号步进</el-button> <el-button size="mini" plain :disabled="true">车次号步进</el-button>
</div> </div>
</el-row> </el-row>
@ -100,22 +100,29 @@
<div class="nav-border" style="padding: 5px;"> <div class="nav-border" style="padding: 5px;">
<el-row style="display: flex;align-items: center;"> <el-row style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">车次号</el-col> <el-col :span="7" style="height: 25px;line-height: 25px;">车次号</el-col>
<el-col :span="17"><el-input v-model="formModelTripNum" size="mini" style="height: 20px;" :disabled="true" /></el-col> <el-col :span="17">
<el-input v-if="trainOperateType!=='create'" v-model="formModelTripNum" size="mini" style="height: 20px;" :disabled="true" />
<el-input v-if="trainOperateType==='create'" v-model="formModelNewTrip" size="mini" style="height: 20px;" />
</el-col>
</el-row> </el-row>
<el-row style="display: flex;align-items: center;"> <el-row style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">轨道号</el-col> <el-col :span="7" style="height: 25px;line-height: 25px;">轨道号</el-col>
<el-col :span="17"><el-input v-model="formModelSectionName" size="mini" style="height: 20px;" :disabled="true" /></el-col> <el-col :span="17"><el-input v-model="formModelSectionName" size="mini" style="height: 20px;" :disabled="true" /></el-col>
</el-row> </el-row>
<el-row style="display: flex;align-items: center;"> <el-row v-if="trainOperateType ==='update'" style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">新车次号</el-col> <el-col :span="7" style="height: 25px;line-height: 25px;">新车次号</el-col>
<el-col :span="17"><el-input v-model="formModelNewTrip" size="mini" style="height: 20px;" /></el-col> <el-col :span="17"><el-input v-model="formModelNewTrip" size="mini" style="height: 20px;" /></el-col>
</el-row> </el-row>
<el-row v-if="trainOperateType ==='create'" style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">新车组号</el-col>
<el-col :span="17"><el-input v-model="formModelNewGroup" size="mini" style="height: 20px;" /></el-col>
</el-row>
</div> </div>
</el-col> </el-col>
<el-col v-if="trainOperationShow" :span="6" style="padding: 1px;"> <el-col v-if="trainOperationShow" :span="6" style="padding: 1px;">
<div class="nav-border"> <div class="nav-border">
<div style="display: flex;justify-content: space-around;width: 100%;height: 45px;align-items: center;border-bottom: 2px solid #FBFBFA;"> <div style="display: flex;justify-content: space-around;width: 100%;height: 45px;align-items: center;border-bottom: 2px solid #FBFBFA;">
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!trainModel.groupNumber" @click="trainCommit">执行</el-button> <el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!trainCommitDisabled" @click="trainCommit">执行</el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="doClose">退出</el-button> <el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="doClose">退出</el-button>
</div> </div>
</div> </div>
@ -200,7 +207,9 @@ export default {
formModelTripNum: '', formModelTripNum: '',
formModelSectionName: '', formModelSectionName: '',
formModelNewTrip: '', formModelNewTrip: '',
speedShowCon: false formModelNewGroup: '',
speedShowCon: false,
trainOperateType: ''
}; };
}, },
computed: { computed: {
@ -225,6 +234,10 @@ export default {
}, },
speedShow() { speedShow() {
return (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) && this.speedShowCon; return (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) && this.speedShowCon;
},
trainCommitDisabled() {
return (this.trainOperateType === 'create' && this.formModelNewTrip && this.formModelNewTrip.length === 7 && this.formModelNewGroup && this.formModelNewGroup.length === 6) ||
(this.trainOperateType === 'update' && this.formModelNewTrip && this.formModelNewTrip.length === 7) || (this.trainOperateType === 'delete');
} }
}, },
watch: { watch: {
@ -363,6 +376,9 @@ export default {
} }
} }
}, },
handleTrainOperate(type) {
this.trainOperateType = type;
},
getStationControl(selected) { getStationControl(selected) {
let control; let control;
if (selected._type == 'StationStand') { if (selected._type == 'StationStand') {
@ -641,15 +657,7 @@ export default {
this.param.routeCodeList = routeCodeList; this.param.routeCodeList = routeCodeList;
} }
if (this.cmdType == CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER || this.cmdType == CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER) { if (this.cmdType == CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER || this.cmdType == CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER) {
if (this.selectedObj.centralized) { this.param = { stationCode: this.selectedObj.code };
this.param = { stationCode: this.selectedObj.code };
} else {
this.stationList.forEach(station => {
if (station.centralized && station.chargeStationCodeList.includes(this.selectedObj.code)) {
this.param = { stationCode: station.code };
}
});
}
} }
if (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) { if (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) {
this.param.speedLimitValue = this.speedLimitValue; this.param.speedLimitValue = this.speedLimitValue;
@ -745,19 +753,16 @@ export default {
handleTrainParam() { handleTrainParam() {
if (this.selectedObj.type === '01') { if (this.selectedObj.type === '01') {
this.formModelSectionName = this.selectedObj.name; this.formModelSectionName = this.selectedObj.name;
this.trainOperateType = '';
this.$store.state.map.activeTrainList.forEach(trainCode => { this.$store.state.map.activeTrainList.forEach(trainCode => {
const trainModel = this.$store.getters['map/getDeviceByCode'](trainCode); const trainModel = this.$store.getters['map/getDeviceByCode'](trainCode);
if (trainModel && trainModel.physicalCode === this.selectedObj.code) { if (trainModel && trainModel.sectionCode === this.selectedObj.code) {
this.formModelTripNum = trainModel.serviceNumber + trainModel.destinationCode + (trainModel.tripNumber.substring(1)); this.formModelTripNum = trainModel.destinationCode + (trainModel.serviceNumber.substring(1)) + (trainModel.tripNumber.substring(1));
this.trainModel = trainModel; this.trainModel = trainModel;
this.formModelNewTrip = ''; this.formModelNewTrip = '';
} }
}); });
} }
// this.trainModel = this.selectedObj; physicalCode
// this.formModelTripNum = this.trainModel.destinationCode + this.trainModel.serviceNumber + this.trainModel.tripNumber;
// this.formModelSectionName = this.trainModel.sectionModel.name;
// this.formModelNewTrip = '';
}, },
setSpeedLimitValue(val) { setSpeedLimitValue(val) {
this.speedLimitValue = val; this.speedLimitValue = val;
@ -768,34 +773,47 @@ export default {
this.formModelTripNum = ''; this.formModelTripNum = '';
this.formModelSectionName = ''; this.formModelSectionName = '';
this.formModelNewTrip = ''; this.formModelNewTrip = '';
this.formModelNewGroup = '';
this.trainOperateType = '';
this.trainOperationShow = flag; this.trainOperationShow = flag;
} }
}, },
trainCommit() { trainCommit() {
if (this.formModelNewTrip && this.formModelNewTrip.length === 9) { const params = {};
const params = { const step = {
groupNumber: this.trainModel.groupNumber, over: true
tripNumber: this.formModelNewTrip.slice(6, 9), };
serviceNumber: this.formModelNewTrip.slice(3, 6) if (this.trainOperateType === 'update') {
}; params.groupNumber = this.trainModel.groupNumber;
const step = { params.serviceNumber = '0' + this.formModelNewTrip.slice(3, 5);
over: true, params.tripNumber = '0' + this.formModelNewTrip.slice(5, 7);
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN, step.cmdType = CMD.TrainWindow.CMD_TRAIN_SET_PLAN;
operation: OperationEvent.Train.setPlanTrainId.menu.operation, step.operation = OperationEvent.Train.setPlanTrainId.menu.operation;
param: params step.param = params;
}; } else if (this.trainOperateType === 'create') {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { params.sectionCode = this.selectedObj.code;
if (valid) { params.groupNumber = this.formModelNewGroup;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); params.dn = this.formModelNewTrip.slice(0, 3);
this.changeShowMode(true); params.sn = '0' + this.formModelNewTrip.slice(3, 5);
} params.tn = '0' + this.formModelNewTrip.slice(5, 7);
}).catch((error) => { step.cmdType = CMD.TrainWindow.CMD_TRAIN_ADD_TRAIN_TRACE;
console.error(error); step.operation = OperationEvent.Train.addTrainId.menu.operation;
this.$refs.noticeInfo.doShow(); step.param = params;
}); } else if (this.trainOperateType === 'delete') {
} else { params.groupNumber = this.trainModel.groupNumber;
this.$refs.noticeInfo.doShow('请输入正确的车次号'); step.cmdType = CMD.TrainWindow.CMD_TRAIN_REMOVE_TRAIN_TRACE;
step.operation = OperationEvent.Train.delTrainId.menu.operation;
step.param = params;
} }
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.changeShowMode(true);
}
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
}, },
initMenus() { initMenus() {
this.basicParamList = this.$store.state.training.prdType === '01' ? [ this.basicParamList = this.$store.state.training.prdType === '01' ? [

View File

@ -0,0 +1,255 @@
<template>
<div
ref="jlmapCanvas"
class="jlmap-canvas"
style="width: 100%;height:960px;"
>
<div :id="canvasId" class="display_canvas" />
</div>
</template>
<script>
import Jlmap from '@/jmapNew/map';
import { parser } from '@/jmapNew/utils/parser';
import { deepAssign } from '@/utils/index';
import deviceType from '@/jmapNew/constant/deviceType';
import { mapGetters } from 'vuex';
export default {
name: 'JLocalmapVisual',
props: {
},
data() {
return {
loading: true,
offset: {
x: 0,
y: 0
},
map: null,
mapDevice: {},
routeData: [],
mapData: null,
autoReentryData: [],
width: 1920,
height: 960
};
},
computed: {
canvasId() {
return ['map', Math.random().toFixed(5) * 100000].join('_');
},
...mapGetters('map', [
'bigScreenConfig'
])
},
watch: {
'$store.state.config.canvasSizeCount': function (val) {
this.resetSize();
},
'$store.state.map.mapViewLoadedCount':function() {
this.$store.dispatch('map/setTrainWindowShow', false);
this.map.off('zoom');
this.handleUpdateScreen();
}
},
created() {
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map));
},
mounted() {
this.init();
},
beforeDestroy() {
if (this.map) {
this.map.dispose();
this.map = null;
}
},
methods: {
init() {
document.getElementById(this.canvasId).oncontextmenu = function (e) {
return false;
};
if (!this.map) {
this.map = new Jlmap({
dom: document.getElementById(this.canvasId),
config: {
renderer: 'canvas',
width: this.width,
height: this.height
},
options: {
scaleRate: 1,
offsetX: 0,
offsetY: 0,
zoomOnMouseWheel: false
},
showConfig: {
prdType: '02',
previewOrMapDraw: true,
showMode: '02'
},
methods: {}
});
}
window.document.oncontextmenu = function () {
return false;
};
if (this.mapData.skinVO) {
this.mapDevice = parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
}
},
loadData() {
try {
this.setMap(this.mapData, this.mapDevice);
} catch (error) {
console.log('[ERROR] ', error);
}
},
//
setMap(data, mapDevice) {
if (data.skinVO) {
this.routeData = this.$store.state.map.routeData;
this.autoReentryData = this.$store.state.map.autoReentryData;
this.map.setMap(data, mapDevice, {
routeData: this.routeData,
autoReentryData: this.autoReentryData
});
setTimeout(() => {
this.handleUpdateScreen();
}, 2000);
} else {
this.mapDevice = {};
this.map.clear();
}
},
handleUpdateScreen() {
this.maskOpen = false;
console.log(this.bigScreenConfig, '--0000');
if (this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length) {
const offsetList = this.bigScreenConfig.offsetList;
const width = this.bigScreenConfig.width;
const height = this.bigScreenConfig.height;
if (this.widthLeft) {
const size = {
width: (this.$store.state.app.width - (this.widthLeft || 450) - 2) * width,
height: this.height * height,
list: this.bigScreenConfig.bigScreenSplitConfig.map(ele => ele.position),
offsetList: offsetList
};
console.log(size, '=----1');
this.map.setUpdateScreen(size);
} else {
const size = {
width: (this.$store.state.app.width - 2) * width,
height: this.$store.state.app.height * height,
list: this.bigScreenConfig.bigScreenSplitConfig.map(ele => ele.position),
offsetList: offsetList
};
console.log(size, '=----');
this.map.setUpdateScreen(size);
}
} else {
this.maskOpen = true;
// this.$messageBox('线, ');
}
},
// jlmap
resetSize() {
this.$nextTick(() => {
this.map && this.map.resize({ width: 1920, height: 960 });
});
},
//
setLevelVisible(levels) {
this.map && this.map.setLevelVisible(levels);
},
setMapFree() {
const list = [];
Object.values(this.mapDevice).forEach((elem) => {
const code = elem.code;
const type = elem._type;
//
type != deviceType.Train &&
list.push({ code, _type: type, _free: true });
});
this.map.update(list, false);
},
//
setCenterWithOffset(code, dx, y) {
this.map.setCenterWithOffset(code, dx, y - this.height / 2);
},
//
updateMapDevice(elems) {
const list = [];
elems.forEach((elem) => {
if (elem.code) {
list.push(deepAssign(this.mapDevice[elem.code], elem));
}
});
this.map.update(list, false);
},
getDeviceByCode(code) {
return this.mapDevice[code];
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.mask {
opacity: 0;
background: #000;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 9;
}
.jlmap-canvas {
position: relative;
-moz-user-select: none;
-o-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
background: #000;
float: left;
}
.title {
text-align: right;
font-size: 14px;
color: #606266;
line-height: 32px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-weight: 700;
}
.zoom-view {
position: absolute;
bottom: 0;
background: #fff;
padding-top: 5px;
height: 42px;
border-bottom: 1px #f3f3f3 solid;
border-right: 1px #f3f3f3 solid;
}
/deep/ {
.el-form.el-form--inline {
height: 28px !important;
line-height: 28px !important;
}
.el-loading-mask {
background-color: rgba(0, 0, 0, 0.3);
}
}
</style>

View File

@ -0,0 +1,95 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
:fullscreen="true"
:before-close="doClose"
:z-index="2000"
>
<map-visual ref="map" style="width: 100%;height: 100%;" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { EventBus } from '@/scripts/event-bus';
import MapVisual from './mapVisual';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TrainMove',
components: {
MapVisual
},
data() {
return {
trainNoList: [],
addModel: {
tripNumber: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: ''
},
rules: {
tripNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
],
trainSource: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandSource: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
],
trainGoal: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '背投系统';
}
},
methods: {
doShow(operate, selected) {
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.map.loadData(this.mapData);
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
}
}
};
</script>
<style scoped>
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -62,8 +62,8 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row v-else-if="$store.state.training.prdType === '02'" style="padding: 3px;"> <el-row v-else-if="$store.state.training.prdType === '02'" style="padding: 3px;">
<el-col :span="16"> <el-col :span="20">
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 1px;"> <div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 1px;height: 132px;">
<el-row style="padding: 4px;"> <el-row style="padding: 4px;">
<div class="tip-content-box"> <div class="tip-content-box">
<div v-if="tipContent[0]">{{ `${tipContent[0].level}` }}</div> <div v-if="tipContent[0]">{{ `${tipContent[0].level}` }}</div>
@ -81,53 +81,86 @@
<div v-if="tipContent[2]">{{ `${tipContent[2].confirm ? '确认': '未确认'}` }}</div> <div v-if="tipContent[2]">{{ `${tipContent[2].confirm ? '确认': '未确认'}` }}</div>
</div> </div>
</el-row> </el-row>
<el-row class="button-row"> <div style="padding: 5px;height:20px;line-height: 20px;border-top: 2px solid #DDD9CA;display: flex;justify-content: space-between;">
<div class="div-simulate-button" @click="undeveloped">系统</div> <!--<div class="div-simulate-button" @click="undeveloped">系统</div>-->
<div class="div-simulate-button" @click="undeveloped">联锁</div> <!--<div class="div-simulate-button" @click="undeveloped">联锁</div>-->
<div class="div-simulate-button" @click="trainControlShow">列监</div> <!--<div class="div-simulate-button" @click="trainControlShow">列监</div>-->
<div class="div-simulate-button" @click="undeveloped">站控</div> <!--<div class="div-simulate-button" @click="undeveloped">站控</div>-->
<div class="div-simulate-button" @click="undeveloped">车场</div> <!--<div class="div-simulate-button" @click="undeveloped">车场</div>-->
<div class="div-simulate-button" @click="undeveloped">编表</div> <!--<div class="div-simulate-button" @click="undeveloped">编表</div>-->
<div class="div-simulate-button" @click="undeveloped">车辆段</div> <!--<div class="div-simulate-button" @click="undeveloped">车辆段</div>-->
</el-row> <div>
<el-row class="button-row" style="margin: 10px 0;"> <div class="div-simulate-button" style="width: 40px;" @click="rpsClick">背投</div>
<div class="div-simulate-button" @click="undeveloped">轨道</div> <div class="div-simulate-button" style="width: 40px;">车场</div>
<div class="div-simulate-button" @click="undeveloped">调度</div> <div class="div-simulate-button" style="width: 40px;">轨道</div>
<div class="div-simulate-button" @click="undeveloped">录放</div> <div class="div-simulate-button" style="width: 40px;">系统</div>
<div class="div-simulate-button" @click="undeveloped">管理</div> <div class="div-simulate-button" style="width: 40px;">列车</div>
<div class="div-simulate-button" @click="undeveloped">列车信息</div> </div>
<div class="div-simulate-button" @click="undeveloped">职权</div> <div>
<div style="width: 80px;" /> <div class="div-simulate-button" style="width: 40px;">联锁</div>
</el-row> <div class="div-simulate-button" style="width: 40px;">列监</div>
<div class="div-simulate-button" style="width: 40px;">运图</div>
<div class="div-simulate-button" style="width: 55px;">时刻表</div>
<div class="div-simulate-button" style="width: 40px;">编表</div>
<div class="div-simulate-button" style="width: 40px;">调度</div>
<div class="div-simulate-button" style="width: 40px;">站控</div>
<div class="div-simulate-button" style="width: 40px;">计划</div>
</div>
<div>
<div class="div-simulate-button" style="width: 40px;">SDM</div>
</div>
<div>
<div class="div-simulate-button" style="width: 55px;">管理员</div>
<div class="div-simulate-button" style="width: 40px;">职权</div>
</div>
<div>
<div class="div-simulate-button" style="width: 40px;">拷屏</div>
<div class="div-simulate-button" style="width: 40px;">录放</div>
<div class="div-simulate-button" style="width: 40px;">布局</div>
</div>
</div>
<!--<el-row class="button-row" style="margin: 10px 0;">-->
<!--<div class="div-simulate-button" @click="undeveloped">轨道</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">调度</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">录放</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">管理</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">列车信息</div>-->
<!--<div class="div-simulate-button" @click="undeveloped">职权</div>-->
<!--<div style="width: 80px;" />-->
<!--</el-row>-->
</div> </div>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="2">
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 1px;"> <div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 1px;">
<el-row style="height: 68px;display: flex; justify-content: space-between;align-items: center;"> <el-row style="margin-top: 20px;margin-bottom: 18px;">
<div style="width: 40px;" class="div-simulate-button" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#F00':'#DDD' }" :class="{'headerBox' :isNoConfirmLevelA}" @click="showHimAlarm('A')">A</div> <el-col :span="16">
<div style="width: 40px;" class="div-simulate-button" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#F00':'#DDD' }" :class="{'headerBox' :isNoConfirmLevelB}" @click="showHimAlarm('B')">B</div> <el-row class="button-row">
<div style="width: 40px;" class="div-simulate-button" :style="{background:isNoRecoverLevelC?'#F00':'#DDD' }" @click="showHimAlarm('C')">C</div> <div style="width: 25px;" class="div-simulate-button" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#F00':'#DDD' }" :class="{'headerBox' :isNoConfirmLevelA}" @click="showHimAlarm('A')">A</div>
<img :src="voiceIcon" style="width: 40px;height: 40px;" @click="controlAudio(false)"> <div style="width: 25px;" class="div-simulate-button" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#F00':'#DDD' }" :class="{'headerBox' :isNoConfirmLevelB}" @click="showHimAlarm('B')">B</div>
</el-row> <div style="width: 25px;" class="div-simulate-button" :style="{background:isNoRecoverLevelC?'#F00':'#DDD' }" @click="showHimAlarm('C')">C</div>
<el-row class="button-row"> <!--<img :src="voiceIcon" style="width: 40px;height: 40px;" @click="controlAudio(false)">-->
<div style="width: 80px;" class="div-simulate-button" @click="showHimAlarm">报警</div> </el-row>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">运图</div> <el-row class="button-row" style="margin-top: 20px;">
<div style="width: 40px;" class="div-simulate-button" @click="showHimAlarm">报警</div>
<div style="width: 40px;" class="div-simulate-button" @click="undeveloped">运图</div>
</el-row>
</el-col>
<el-col :span="8">
<div style="width: 40px;height: 60px;line-height: 60px;" class="div-simulate-button" @click="controlAudio(false)">静音</div>
</el-col>
</el-row> </el-row>
<el-row class="button-row" style="margin: 10px 0;"> <el-row class="button-row" style="margin: 10px 0;">
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">报表</div> <div style="width: 40px;" class="div-simulate-button" @click="undeveloped">档案</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">时刻表</div> <div style="width: 40px;" class="div-simulate-button" @click="undeveloped">归档</div>
<div style="width: 40px;" class="div-simulate-button" @click="undeveloped">统计</div>
</el-row> </el-row>
</div> </div>
</el-col> </el-col>
<el-col :span="4" style="border: 2px solid #DDD9CA;border-radius: 1px;"> <el-col :span="2" style="border: 2px solid #DDD9CA;border-radius: 1px;">
<el-row style="height: 68px;" /> <el-row style="height: 88px;" />
<el-row class="button-row">
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">考评</div>
<div style="width: 80px;" class="div-simulate-button" @click="showLogDetail">日志</div>
</el-row>
<el-row class="button-row" style="margin: 10px 0;"> <el-row class="button-row" style="margin: 10px 0;">
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">锁屏</div> <div style="width: 40px;" class="div-simulate-button" @click="undeveloped">锁屏</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">退出</div> <div style="width: 40px;" class="div-simulate-button" @click="undeveloped">退出</div>
</el-row> </el-row>
</el-col> </el-col>
</el-row> </el-row>
@ -136,6 +169,7 @@
<alarm-table-hmi ref="alarmTableHmi" /> <alarm-table-hmi ref="alarmTableHmi" />
<train-control ref="trainControl" :offset="10" /> <train-control ref="trainControl" :offset="10" />
<log-detail ref="logDetail" /> <log-detail ref="logDetail" />
<rps-dialog ref="rpsDialog" />
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0"> <audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
<source :src="buzzerAudio" type="audio/mpeg"> <source :src="buzzerAudio" type="audio/mpeg">
</audio> </audio>
@ -151,6 +185,7 @@ import BuzzerAudio from '@/assets/buzzer.mp3';
import AlarmTableHmi from './menuDialog/alarmTableHmi'; import AlarmTableHmi from './menuDialog/alarmTableHmi';
import AlarmTableLow from './menuDialog/alarmTableLow'; import AlarmTableLow from './menuDialog/alarmTableLow';
import TrainControl from './dialog/trainControl'; import TrainControl from './dialog/trainControl';
import RpsDialog from './dialog/rps';
import LogDetail from './menuDialog/logDetail'; import LogDetail from './menuDialog/logDetail';
export default { export default {
@ -159,7 +194,8 @@ export default {
AlarmTableLow, AlarmTableLow,
AlarmTableHmi, AlarmTableHmi,
TrainControl, TrainControl,
LogDetail LogDetail,
RpsDialog
}, },
props: { props: {
selected: { selected: {
@ -443,6 +479,9 @@ export default {
trainControlShow() { trainControlShow() {
this.$refs.trainControl.doShow(); this.$refs.trainControl.doShow();
}, },
rpsClick() {
this.$refs.rpsDialog.doShow();
},
controlAudio(val) { controlAudio(val) {
const audio = document.getElementById('buzzer'); const audio = document.getElementById('buzzer');
this.sound = val; this.sound = val;
@ -665,9 +704,9 @@ export default {
width: 80px; width: 80px;
} }
.tip-content-box{ .tip-content-box{
height: 20px; height: 30px;
width: 100%; width: 100%;
line-height: 20px; line-height: 30px;
background: #001528; background: #001528;
color: #C20F29; color: #C20F29;
font-size: 14px; font-size: 14px;

View File

@ -49,7 +49,7 @@
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain :class="{'disabled': !isLogin}" :disabled="!isLogin" @click="interceptLogin(cancle)()">取消</el-button> <el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain :class="{'disabled': !isLogin}" :disabled="!isLogin" @click="interceptLogin(cancle)()">取消</el-button>
</div> </div>
<div class="el-print"> <div class="el-print">
<div v-for="(el,i) in tempData" :key="i" class="selected-row" :class="{'active' : route&&el.code===route.code}" @click="interceptLogin(selectRouteParam)(el.code)"> <div v-for="(el,i) in tempData" :key="i" class="selected-row" :class="{'active' : route&&el.code===route.code || overlap&&el.code===overlap.code}" @click="interceptLogin(selectRouteParam)(el.code)">
{{ el.commandTip || el.name }} {{ el.commandTip || el.name }}
</div> </div>
</div> </div>
@ -59,9 +59,9 @@
<div class="nav-border" style="padding: 5px;"> <div class="nav-border" style="padding: 5px;">
<el-row style="height: 25px;"> <el-row style="height: 25px;">
<div style="display: flex;justify-content: space-between"> <div style="display: flex;justify-content: space-between">
<el-button size="mini" plain>车次号修改</el-button> <el-button size="mini" plain :disabled="trainOperateType==='update'" @click="handleTrainOperate('update')">车次号修改</el-button>
<el-button size="mini" plain :disabled="true">车次号删除</el-button> <el-button size="mini" plain :disabled="trainOperateType==='delete'" @click="handleTrainOperate('delete')">车次号删除</el-button>
<el-button size="mini" plain :disabled="true">车次号创建</el-button> <el-button size="mini" plain :disabled="trainOperateType==='create'" @click="handleTrainOperate('create')">车次号创建</el-button>
<el-button size="mini" plain :disabled="true">车次号步进</el-button> <el-button size="mini" plain :disabled="true">车次号步进</el-button>
</div> </div>
</el-row> </el-row>
@ -83,22 +83,29 @@
<div class="nav-border" style="padding: 5px;"> <div class="nav-border" style="padding: 5px;">
<el-row style="display: flex;align-items: center;"> <el-row style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">车次号</el-col> <el-col :span="7" style="height: 25px;line-height: 25px;">车次号</el-col>
<el-col :span="17"><el-input v-model="formModelTripNum" size="mini" style="height: 20px;" :disabled="true" /></el-col> <el-col :span="17">
<el-input v-if="trainOperateType!=='create'" v-model="formModelTripNum" size="mini" style="height: 20px;" :disabled="true" />
<el-input v-if="trainOperateType==='create'" v-model="formModelNewTrip" size="mini" style="height: 20px;" />
</el-col>
</el-row> </el-row>
<el-row style="display: flex;align-items: center;"> <el-row style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">轨道号</el-col> <el-col :span="7" style="height: 25px;line-height: 25px;">轨道号</el-col>
<el-col :span="17"><el-input v-model="formModelSectionName" size="mini" style="height: 20px;" :disabled="true" /></el-col> <el-col :span="17"><el-input v-model="formModelSectionName" size="mini" style="height: 20px;" :disabled="true" /></el-col>
</el-row> </el-row>
<el-row style="display: flex;align-items: center;"> <el-row v-if="trainOperateType ==='update'" style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">新车次号</el-col> <el-col :span="7" style="height: 25px;line-height: 25px;">新车次号</el-col>
<el-col :span="17"><el-input v-model="formModelNewTrip" size="mini" style="height: 20px;" /></el-col> <el-col :span="17"><el-input v-model="formModelNewTrip" size="mini" style="height: 20px;" /></el-col>
</el-row> </el-row>
<el-row v-if="trainOperateType ==='create'" style="display: flex;align-items: center;">
<el-col :span="7" style="height: 25px;line-height: 25px;">新车组号</el-col>
<el-col :span="17"><el-input v-model="formModelNewGroup" size="mini" style="height: 20px;" /></el-col>
</el-row>
</div> </div>
</el-col> </el-col>
<el-col v-if="trainOperationShow" :span="6" style="padding: 1px;"> <el-col v-if="trainOperationShow" :span="6" style="padding: 1px;">
<div class="nav-border"> <div class="nav-border">
<div style="display: flex;justify-content: space-around;width: 100%;height: 45px;align-items: center;border-bottom: 2px solid #FBFBFA;"> <div style="display: flex;justify-content: space-around;width: 100%;height: 45px;align-items: center;border-bottom: 2px solid #FBFBFA;">
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!trainModel.groupNumber" @click="trainCommit"> </el-button> <el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!trainCommitDisabled" @click="trainCommit"> </el-button>
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="doClose"> </el-button> <el-button style="line-height: 18px; width: 100px; margin: 0;" plain @click="doClose"> </el-button>
</div> </div>
</div> </div>
@ -267,6 +274,7 @@ export default {
selectedObj: null, selectedObj: null,
oldClickObj: null, // oldClickObj: null, //
route: null, // route: null, //
overlap: null, //
selectRouteList: [], selectRouteList: [],
menuCmdList: new Array(15).fill({}), menuCmdList: new Array(15).fill({}),
ciStationParamList: [], ciStationParamList: [],
@ -290,6 +298,8 @@ export default {
formModelTripNum: '', formModelTripNum: '',
formModelSectionName: '', formModelSectionName: '',
formModelNewTrip: '', formModelNewTrip: '',
formModelNewGroup: '',
trainOperateType: '',
dialogVisible: false, dialogVisible: false,
tipList: [], tipList: [],
modeMatch: false, modeMatch: false,
@ -312,7 +322,9 @@ export default {
...mapGetters('map', [ ...mapGetters('map', [
'routeList', 'routeList',
'stationList', 'stationList',
'routeData' 'routeData',
'overlapList',
'overlapData'
]), ]),
commandId() { commandId() {
return OperationEvent.Command.commandHaerbin.confirm.domId; return OperationEvent.Command.commandHaerbin.confirm.domId;
@ -349,6 +361,10 @@ export default {
}, },
menuPosition() { menuPosition() {
return this.$store.state.menuOperation.menuPosition; return this.$store.state.menuOperation.menuPosition;
},
trainCommitDisabled() {
return (this.trainOperateType === 'create' && this.formModelNewTrip && this.formModelNewTrip.length === 7 && this.formModelNewGroup && this.formModelNewGroup.length === 6) ||
(this.trainOperateType === 'update' && this.formModelNewTrip && this.formModelNewTrip.length === 7) || (this.trainOperateType === 'delete');
} }
}, },
watch: { watch: {
@ -449,6 +465,9 @@ export default {
} }
} }
}, },
handleTrainOperate(type) {
this.trainOperateType = type;
},
initCentralizedStationList(list) { initCentralizedStationList(list) {
const stationContorl = this.stationContorl; const stationContorl = this.stationContorl;
this.menuCmdList = new Array(15).fill({}); this.menuCmdList = new Array(15).fill({});
@ -577,13 +596,25 @@ export default {
return control; return control;
}, },
selectRouteParam(code) { selectRouteParam(code) {
this.route = this.routeData[code]; if (this.cmdType === CMD.Signal.CMD_SIGNAL_SET_OVERLAP) {
if (this.route) { this.overlap = this.overlapData[code];
this.param = { if (this.overlap) {
routeCode: this.route.code this.param = {
}; signalCode: this.selectedObj.code,
overlapCode: this.overlap.code
};
this.canCommand = false;
}
} else {
this.route = this.routeData[code];
if (this.route) {
this.param = {
routeCode: this.route.code
};
}
this.initCentralizedStationList(this.routeParamList);
} }
this.initCentralizedStationList(this.routeParamList);
}, },
handleSwicthMenu() { // handleSwicthMenu() { //
// //
@ -783,11 +814,20 @@ export default {
if (row.commandTip) { if (row.commandTip) {
EventBus.$emit('sendMsg', {message: row.commandTip}); EventBus.$emit('sendMsg', {message: row.commandTip});
} }
if (row.cmdType === CMD.Signal.CMD_SIGNAL_SET_OVERLAP) {
const overlapList = [];
this.overlapList.forEach(item => {
if (item.signalCode === this.selectedObj.code) {
overlapList.push(item);
}
});
this.tempData = [...overlapList];
}
if (this.tempData.length) { if (this.tempData.length) {
this.operate = row.operate.operation; this.operate = row.operate.operation;
this.cmdType = row.cmdType; this.cmdType = row.cmdType;
this.canCommand = false; this.canCommand = row.cmdType === CMD.Signal.CMD_SIGNAL_SET_OVERLAP;
step.operation = this.operate; step.operation = this.operate;
if (row.next) { if (row.next) {
@ -921,6 +961,7 @@ export default {
this.securityCommand = ''; this.securityCommand = '';
this.speedLimitValue = ''; this.speedLimitValue = '';
this.secondConfirm = false; this.secondConfirm = false;
this.overlap = null;
this.cr1Confrim = false; this.cr1Confrim = false;
if (this.oldClickObj) { if (this.oldClickObj) {
this.deviceHighLight(this.oldClickObj, false); this.deviceHighLight(this.oldClickObj, false);
@ -948,14 +989,15 @@ export default {
handleTrainParam() { handleTrainParam() {
if (this.selectedObj.type === '01') { if (this.selectedObj.type === '01') {
this.formModelSectionName = this.selectedObj.name; this.formModelSectionName = this.selectedObj.name;
// this.$store.state.map.activeTrainList.forEach(trainCode => { this.trainOperateType = '';
// const trainModel = this.$store.getters['map/getDeviceByCode'](trainCode); this.$store.state.map.activeTrainList.forEach(trainCode => {
// if (trainModel && trainModel.physicalCode === this.selectedObj.code) { const trainModel = this.$store.getters['map/getDeviceByCode'](trainCode);
// this.formModelTripNum = trainModel.serviceNumber + trainModel.destinationCode + (trainModel.tripNumber.substring(1)); if (trainModel && trainModel.sectionCode === this.selectedObj.code) {
// this.trainModel = trainModel; this.formModelTripNum = trainModel.destinationCode + (trainModel.serviceNumber.substring(1)) + (trainModel.tripNumber.substring(1));
// this.formModelNewTrip = ''; this.trainModel = trainModel;
// } this.formModelNewTrip = '';
// }); }
});
} }
}, },
pushTempData(list) { pushTempData(list) {
@ -970,38 +1012,50 @@ export default {
this.formModelTripNum = ''; this.formModelTripNum = '';
this.formModelSectionName = ''; this.formModelSectionName = '';
this.formModelNewTrip = ''; this.formModelNewTrip = '';
this.formModelNewGroup = '';
this.trainOperateType = '';
this.trainOperationShow = flag; this.trainOperationShow = flag;
} }
}, },
trainCommit() { trainCommit() {
if (this.formModelNewTrip && this.formModelNewTrip.length === 9) { const params = {};
const params = { const step = {
groupNumber: this.trainModel.groupNumber, over: true
tripNumber: this.formModelNewTrip.slice(6, 9), };
serviceNumber: this.formModelNewTrip.slice(3, 6) if (this.trainOperateType === 'update') {
}; params.groupNumber = this.trainModel.groupNumber;
const step = { params.serviceNumber = '0' + this.formModelNewTrip.slice(3, 5);
over: true, params.tripNumber = '0' + this.formModelNewTrip.slice(5, 7);
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN, step.cmdType = CMD.TrainWindow.CMD_TRAIN_SET_PLAN;
operation: OperationEvent.Train.setPlanTrainId.menu.operation, step.operation = OperationEvent.Train.setPlanTrainId.menu.operation;
param: params step.param = params;
}; } else if (this.trainOperateType === 'create') {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { params.sectionCode = this.selectedObj.code;
if (valid) { params.groupNumber = this.formModelNewGroup;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); params.dn = this.formModelNewTrip.slice(0, 3);
this.changeShowMode(true); params.sn = '0' + this.formModelNewTrip.slice(3, 5);
} params.tn = '0' + this.formModelNewTrip.slice(5, 7);
}).catch((error) => { step.cmdType = CMD.TrainWindow.CMD_TRAIN_ADD_TRAIN_TRACE;
console.error(error); step.operation = OperationEvent.Train.addTrainId.menu.operation;
if (error && error.code == '10017') { step.param = params;
EventBus.$emit('sendMsg', {message: error.message}); } else if (this.trainOperateType === 'delete') {
} else { params.groupNumber = this.trainModel.groupNumber;
EventBus.$emit('sendMsg', {message: '命令执行失败!'}); step.cmdType = CMD.TrainWindow.CMD_TRAIN_REMOVE_TRAIN_TRACE;
} step.operation = OperationEvent.Train.delTrainId.menu.operation;
}); step.param = params;
} else {
EventBus.$emit('sendMsg', {message: '请输入正确的车次号'});
} }
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.changeShowMode(true);
}
}).catch((error) => {
if (error && error.code == '10017') {
EventBus.$emit('sendMsg', {message: error.message});
} else {
EventBus.$emit('sendMsg', {message: '命令执行失败!'});
}
});
}, },
stationToCommand() { stationToCommand() {
const step = { const step = {
@ -1067,7 +1121,7 @@ export default {
this.basicParamList = this.$store.state.training.prdType === '01' ? [ this.basicParamList = this.$store.state.training.prdType === '01' ? [
{ name: '自排全开', commandTip: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) }, { name: '自排全开', commandTip: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) },
{ name: '自排全关', commandTip: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) }, { name: '自排全关', commandTip: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) },
{ name: '释放指令', commandTip: '释放指令', cmdType: '', operate: '', fillStationCode: true, disabledCb: (stationControl) => true }, { name: '释放指令', commandTip: '释放指令', cmdType: CMD.Station.CMD_STATION_RELEASE, operate: OperationEvent.Station.stationRelease.menuButton, securityCommand: true, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) },
{ name: '重启令解', commandTip: '重启令解', cmdType: CMD.Station.CMD_STATION_RESTART, operate: OperationEvent.Station.stationRestart.menuButton, securityCommand: true, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) }, { name: '重启令解', commandTip: '重启令解', cmdType: CMD.Station.CMD_STATION_RESTART, operate: OperationEvent.Station.stationRestart.menuButton, securityCommand: true, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) },
{ name: '追踪全开', commandTip: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) }, { name: '追踪全开', commandTip: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) },
{ name: '追踪全关', commandTip: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) }, { name: '追踪全关', commandTip: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, fillStationCode: true, disabledCb: (stationControl) => ['Center', 'None'].includes(stationControl.controlMode) },
@ -1144,7 +1198,7 @@ export default {
{ name: '车队单开', commandTip: '对单架信号机开启车队模式,主要是信号机不关闭的情况下排列所有进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.setAutoInterlock.menuButton, disabledCb: (stationControl) => !this.modeMatch }, { name: '车队单开', commandTip: '对单架信号机开启车队模式,主要是信号机不关闭的情况下排列所有进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.setAutoInterlock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '车队单关', commandTip: '对单架信号机关闭车队模式', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.cancelAutoInterlock.menuButton, disabledCb: (stationControl) => !this.modeMatch }, { name: '车队单关', commandTip: '对单架信号机关闭车队模式', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.cancelAutoInterlock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch }, { name: '设置保护', commandTip: '设置保护', cmdType: CMD.Signal.CMD_SIGNAL_SET_OVERLAP, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch } { name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
] : [ ] : [
{ name: '关闭信号', commandTip: '设置信号机为关闭状态', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (stationControl) => !this.modeMatch }, { name: '关闭信号', commandTip: '设置信号机为关闭状态', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (stationControl) => !this.modeMatch },
@ -1160,7 +1214,7 @@ export default {
{ name: '开放引导', commandTip: '开放引导信号', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.guide.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, { name: '开放引导', commandTip: '开放引导信号', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.guide.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
{ name: '车队单开', commandTip: '对单架信号机开启车队模式,主要是信号机不关闭的情况下排列所有进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch }, { name: '车队单开', commandTip: '对单架信号机开启车队模式,主要是信号机不关闭的情况下排列所有进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '车队单关', commandTip: '对单架信号机关闭车队模式', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch }, { name: '车队单关', commandTip: '对单架信号机关闭车队模式', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch }, { name: '设置保护', commandTip: '设置保护', cmdType: CMD.Signal.CMD_SIGNAL_SET_OVERLAP, operate: OperationEvent.Signal.setOverlap.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch } { name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
]; ];
this.stationParamList = this.$store.state.training.prdType === '01' ? [ this.stationParamList = this.$store.state.training.prdType === '01' ? [

View File

@ -124,7 +124,9 @@ export default {
/** 取消自动折返 */ /** 取消自动折返 */
CMD_SIGNAL_CANCEL_AUTO_TURN_BACK: {value: 'Signal_Cancel_Auto_Turn_Back', label: '取消自动折返'}, CMD_SIGNAL_CANCEL_AUTO_TURN_BACK: {value: 'Signal_Cancel_Auto_Turn_Back', label: '取消自动折返'},
/** 信号机总取消 */ /** 信号机总取消 */
CMD_SIGNAL_TOTAL_CANCLE:{value:'Signal_Total_Cancel', label: '信号机总取消'} CMD_SIGNAL_TOTAL_CANCLE:{value:'Signal_Total_Cancel', label: '信号机总取消'},
/** 设置保护 */
CMD_SIGNAL_SET_OVERLAP : {value: 'Signal_Set_Overlap', label: '设置保护'}
}, },
// 物理区段操作 // 物理区段操作
@ -263,7 +265,9 @@ export default {
/** 取消计轴预复位 */ /** 取消计轴预复位 */
CMD_STATION_CANCEL_PRE_RESET: {value: 'Station_Cancel_Pre_Reset', label: '取消计轴预复位'}, CMD_STATION_CANCEL_PRE_RESET: {value: 'Station_Cancel_Pre_Reset', label: '取消计轴预复位'},
/** 重启联锁机 */ /** 重启联锁机 */
CMD_STATION_RESTART_INTERLOCK_MACHINE: {value: 'Station_Restart_Interlock_Machine', label: '重启联锁机'} CMD_STATION_RESTART_INTERLOCK_MACHINE: {value: 'Station_Restart_Interlock_Machine', label: '重启联锁机'},
/** 释放指令 */
CMD_STATION_RELEASE : {value:'Station_Release', label: '释放指令' }
}, },
// 列车 // 列车

View File

@ -1697,6 +1697,12 @@ export const OperationEvent = {
operation: '3201', operation: '3201',
domId: '_Tips-Signal-cancelinterlock-Menu{BOTTOM}' domId: '_Tips-Signal-cancelinterlock-Menu{BOTTOM}'
} }
},
setOverlap: {
menuButton: {
operation: '3211',
domId: '_Tips-Signal-setOverlap-Menu{BOTTOM}'
}
} }
}, },
@ -2761,6 +2767,12 @@ export const OperationEvent = {
operation: '619', operation: '619',
domId: '_Tips-Station-restartInterlockMachine-Menu' domId: '_Tips-Station-restartInterlockMachine-Menu'
} }
},
stationRelease: {
menuButton: {
operation: '620',
domId: '_Tips-Station-stationRelease'
}
} }
}, },

View File

@ -261,6 +261,9 @@ const map = {
routeData: (state) => { routeData: (state) => {
return state.routeData; return state.routeData;
}, },
overlapList: (state) => {
return state.overlapList;
},
overlapData: (state) => { overlapData: (state) => {
return state.overlapData; return state.overlapData;
}, },

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线 BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线 // BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
// BASE_API = 'http://192.168.3.120:9000'; // 张赛 // BASE_API = 'http://192.168.3.120:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康 // BASE_API = 'http://192.168.8.140:9000'; // 杜康

View File

@ -136,8 +136,8 @@ export default {
menu = getDeviceMenuByDeviceType('StationControl'); menu = getDeviceMenuByDeviceType('StationControl');
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu }); this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
device = this.getDeviceByEm(em); device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right}; this.selected = { ...device, _event: MouseEvent.Right};
return; return;
} else if (em.subType == 'light' && em.deviceType == 'Station') { // 线 } else if (em.subType == 'light' && em.deviceType == 'Station') { // 线
const equipment = this.getDeviceByEm(em); const equipment = this.getDeviceByEm(em);
@ -145,8 +145,8 @@ export default {
menu = getDeviceMenuByDeviceType('StationLight'); menu = getDeviceMenuByDeviceType('StationLight');
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu }); this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
device = this.getDeviceByEm(em); device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right}; this.selected = { ...device, _event: MouseEvent.Right};
return; return;
} else if (em.subType == 'preReset' && em.deviceType == 'Station') { // 线 } else if (em.subType == 'preReset' && em.deviceType == 'Station') { // 线
const equipment = this.getDeviceByEm(em); const equipment = this.getDeviceByEm(em);
@ -154,19 +154,19 @@ export default {
menu = getDeviceMenuByDeviceType('StationPreReset'); menu = getDeviceMenuByDeviceType('StationPreReset');
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu }); this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
device = this.getDeviceByEm(em); device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right}; this.selected = { ...device, _event: MouseEvent.Right};
return; return;
} else if (em.subType == 'enabled' && em.deviceType == 'Switch') { } else if (em.subType == 'enabled' && em.deviceType == 'Switch') {
menu = getDeviceMenuByDeviceType('Enabled'); menu = getDeviceMenuByDeviceType('Enabled');
this.$store.dispatch('menuOperation/setSelected', { device: equipment, subType: em.subType }); this.$store.dispatch('menuOperation/setSelected', { device: equipment, subType: em.subType });
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu }); this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
device = this.getDeviceByEm(em); device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right}; this.selected = { ...device, _event: MouseEvent.Right};
return; return;
} else if (em.subType === 'enabled' && em.deviceType === 'Signal') { } else if (em.subType === 'enabled' && em.deviceType === 'Signal') {
menu = getDeviceMenuByDeviceType('Enabled'); menu = getDeviceMenuByDeviceType('Enabled');
this.$store.dispatch('menuOperation/setSelected', { device: equipment, subType: em.subType }); this.$store.dispatch('menuOperation/setSelected', { device: equipment, subType: em.subType });
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu}); this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu});
device = this.getDeviceByEm(em); device = this.getDeviceByEm(em);
this.selected = { ...device, _event: MouseEvent.Right}; this.selected = { ...device, _event: MouseEvent.Right};