Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2021-05-28 18:19:42 +08:00
commit 7725723a69
45 changed files with 2374 additions and 935 deletions

View File

@ -484,18 +484,20 @@ export function postFlankProtection(data) {
}
// 更新进路侧防数据
export function putFlankProtection(data) {
export function putFlankProtection(mapId, data) {
return request({
url: `/api/draftMap/flankProtection/${data.id}`,
// url: `/api/draftMap/flankProtection/${data.id}`,
url: `/api/draftMap/${mapId}/fls/${data.code}`,
method: 'put',
data
});
}
// 删除进路侧防
export function delFlankProtection(id) {
export function delFlankProtection(mapId, code) {
return request({
url: `/api/draftMap/flankProtection/${id}`,
// url: `/api/draftMap/flankProtection/${id}`,
url: `/api/draftMap/${mapId}/fls/${code}`,
method: 'delete'
});
}
@ -511,11 +513,19 @@ export function getFlankProtectionDetail(id) {
// 查询进路侧防明细list
export function getFlankProtectionList(mapId, params) {
return request({
url: `/api/draftMap/flankProtection/${mapId}/paging`,
// url: `/api/draftMap/flankProtection/${mapId}/paging`,
url: `/api/draftMap/${mapId}/fls/paging`,
method: 'get',
params
});
}
// 查询进路侧防明细list
export function getDraftMapFlsList(mapId) {
return request({
url: `/api/draftMap/${mapId}/fls/all`,
method: 'get'
});
}
// /** 创建车站区段停站时间 */
// export function createStationParkTime(data) {
// return request({

View File

@ -638,6 +638,7 @@ class SkinCode extends defaultStyle {
horizontalDistance: 7// 箭头三角水平高度
};
this[deviceType.Train] = {
moreTrainDetail: true,
trainBody: {
fontFamily: 'consolas',
trainBodyLineWidth: 0, // 车身line宽
@ -792,7 +793,7 @@ class SkinCode extends defaultStyle {
};
this[deviceType.FloodGate] = {};
this[deviceType.DirectionRod] = {};
this[deviceType.IndicatorLight] = {};
this[deviceType.IndicatorLight] = {};
}
}

View File

@ -212,7 +212,6 @@ class Jlmap {
this.screenFlag = false;
this.$painter.updateTransform({ scaleRate: opts.scaleRate, offsetX: opts.offsetX, offsetY: opts.offsetY });
}
setUpdateScreen(opts) {
this.setRecover({ scaleRate: 1, offsetX: 0, offsetY: 0 });
this.screenFlag = true;
@ -654,6 +653,11 @@ class Jlmap {
this.$painter.clear();
}
clearView() {
// this.mapDevice = {};
this.$painter.clear();
}
dispose() {
this.off(this.events.Pan, this.optionsHandler);
this.off(this.events.Zoom, this.optionsHandler);

View File

@ -149,8 +149,6 @@ class Painter {
const overlapTrainList = this.checkTrainOverlap(device);
overlapTrainList.forEach((item, index) => {
const trainDevice = this.$jmap.getDeviceByCode(item);
trainDevice._type = deviceRender['Train']._type;
trainDevice.zlevel = deviceRender['Train'].zlevel;
trainDevice.overLapIndex = index;
trainDevice.instance && this.mapInstanceLevel[deviceType.Train].remove(trainDevice.instance);
this.add(trainDevice);

View File

@ -18,6 +18,7 @@ export default class Line2 extends Group {
this.isShowShape = true;
this.create();
this.setState(model);
this.setShowMode(true);
this.checkIsDrawMap();
}
@ -42,24 +43,24 @@ export default class Line2 extends Group {
currentTypeList.forEach(element => {
this[element].recover();
});
}
}
setAshShow() {
this.safetyDoorNormal && this.safetyDoorNormal.setColor('#7F7F7F');
}
setAshShow() {
this.safetyDoorNormal && this.safetyDoorNormal.setColor('#7F7F7F');
}
setState(model) {
this.recover();
if (!this.isShowShape) return;
if (model._free) {
this.setAshShow();
} else {
const currentTypeList = this.style.Psd.elemnetType;
currentTypeList.forEach(element => {
this[element].setState(model);
});
}
if (model._free) {
this.setAshShow();
} else {
const currentTypeList = this.style.Psd.elemnetType;
currentTypeList.forEach(element => {
this[element].setState(model);
});
}
}
drawSelected(selected) {
@ -75,7 +76,20 @@ export default class Line2 extends Group {
this.on('mouseover', () => { this.highlight.mouseover(); });
}
}
setShowMode() {}
setShowMode(flag) {
const showMode = this.model.showMode;
if (!flag) {
this.eachChild(item => {
item.show();
});
this.setState(this.model);
}
if (showMode == '05') {
this.eachChild(item => {
item.hide();
});
}
}
setShowStation(flag) {
if (flag) {
this.eachChild(item => {

View File

@ -66,7 +66,7 @@ export default class Section extends Group {
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode();
this.setShowMode(true);
}
create() {
@ -424,9 +424,8 @@ export default class Section extends Group {
}
/** 设置状态*/
setState(model, flag = false) {
if (!this.isShowShape) return;
if (!this.isShowShape || model.showMode === '05') return;
this.recover();
// 只响应前端自定义类型的状态变化
if (model._free) {
// 先初始化为灰色
@ -469,7 +468,7 @@ export default class Section extends Group {
model.signalDerailer && exec(DerailerMap[model.signalDerailer], this.derailer, this.style);
/** 道岔区段更新岔心颜色 */
if (model.type === '03' && model.switch) {
if (model.type === '03' && model.switch && model.showMode !== '05') {
const sectionSwitch = this.mapDevice[model.switch.code];
if (sectionSwitch && sectionSwitch.sectionACode === model.code) {
sectionSwitch.instance && sectionSwitch.instance.setState(sectionSwitch);
@ -573,7 +572,13 @@ export default class Section extends Group {
mouseover() {
this.line && this.line.setStyle({ stroke: 'rgba(255,255,255,0.8)' });
}
setShowMode() {
setShowMode(flag = false) {
if (!flag) {
this.eachChild(item => {
item.show();
});
this.setState(this.model);
}
if (this.model.showMode === '05') {
this.line.setStyle({stroke: this.style.Section.line.troColor, lineWidth: this.style.Section.line.troWidth});
this.separator && this.separator.hide();

View File

@ -212,8 +212,8 @@ class Signal extends Group {
this.createMouseEvent();
this.checkIsDrawMap();
this.transformRotation(this);
this.setShowMode();
this.setState(model);
this.setShowMode(true);
// this.checkIsDrawMap();
}
@ -929,7 +929,7 @@ class Signal extends Group {
}
setState(model) {
if (!this.isShowShape || this.model.type === 'TRANSMISSION') {
if (!this.isShowShape || this.model.type === 'TRANSMISSION' || model.showMode === '05') {
return;
}
const path = window.location.href;
@ -1143,14 +1143,24 @@ class Signal extends Group {
});
}
}
setShowMode() {
setShowMode(flag = false) {
const showMode = this.model.showMode;
if (!flag) {
this.eachChild(item => {
item.show();
});
this.setState(this.model);
}
if (showMode == '03') {
this.lowButton && this.lowButton.show();
this.model.prdType = '01';
} else if (showMode == '02') {
this.lowButton && this.lowButton.hide();
this.model.prdType = '02';
} else if (showMode == '05') {
this.eachChild(item => {
item.hide();
});
}
}
setShowStation(stationCode) {

View File

@ -776,6 +776,8 @@ export default class Station extends Group {
setShowMode() {
if (this.model.showMode === '05') {
this.createTroButton(); // 创建轨道预览按钮
} else {
this.troButton && this.troButton.hide();
}
}
setShowStation(flag) {

View File

@ -235,6 +235,10 @@ class StationStand extends Group {
this.cancelStopJumpLamp && this.cancelStopJumpLamp.show();
this.upDetainLamp && this.upDetainLamp.show();
this.downDetainLamp && this.downDetainLamp.show();
} else if (showMode === '05') {
this.eachChild(item => {
item.hide();
});
} else {
this.stopJumpLamp && this.stopJumpLamp.hide();
this.cancelStopJumpLamp && this.cancelStopJumpLamp.hide();

View File

@ -31,7 +31,7 @@ export default class Switch extends Group {
this.createMouseEvent();
this.setState(model);
this.checkIsDrawMap();
this.setShowMode();
this.setShowMode(true);
}
createMouseEvent() {
@ -674,9 +674,8 @@ export default class Switch extends Group {
}
}
setState(model) {
if (!this.isShowShape) return;
if (!this.isShowShape || model.showMode === '05') return;
this.recover();
// 只响应前端自定义类型的状态变化
if (model._free) {
if (model.normalPosition) {
@ -798,7 +797,13 @@ export default class Switch extends Group {
this.on('mouseover', () => { this.highlight.mouseover(); });
}
}
setShowMode() {
setShowMode(flag = false) {
if (!flag) {
this.eachChild(item => {
item.show();
});
this.setState(this.model);
}
if ( this.model.showMode === '05') {
this.eachChild(item => {
item.hide();

View File

@ -52,7 +52,7 @@ class EMouse extends Group {
if (LangStorage.getLang() == 'en') {
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
} else {
if (Vue.prototype.$jlmap.lineCode == '11' || Vue.prototype.$jlmap.lineCode == '10') {
if (this.device.style.Train.moreTrainDetail) {
text = `列车类型: ${trainType}\n\0\0\0\0源:人工标记\n\0\0号: ${this.device.model.groupNumber}\n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel || 'CTC'}\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
} else {
text = `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0号: ${this.device.model.groupNumber}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;

View File

@ -45,10 +45,10 @@ export default class TrainBody extends Group {
: model.tripNumber || style.Train.trainTarget.defaultTripNumber); // 车次号
const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (style.Train.trainTargetNumber.lineNumber || '') + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber); // 车组号
const serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || model.model.specialServiceNumber || style.Train.trainServer.defaultServiceNumber);// 服务号(表号)
let targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode); // 目的地码
if (Vue.prototype.$jlmap.lineCode == '09') { // 暂时先写死 后面有了删掉就好
targetCode = '01';
}
const targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode); // 目的地码
// if (Vue.prototype.$jlmap.lineCode == '09') { // 暂时先写死 后面有了删掉就好
// targetCode = '01';
// }
// 服务号
this.textTrainServer = new ETextName({
zlevel: model.zlevel,

View File

@ -357,7 +357,7 @@ export default class Train extends Group {
this.setSoonerOrLater(model.dt);
}
if (this.style.Train.common.cbtcSpeedColor && model.runLevel === 'CBTC') { // 南京二号线 ctc列车随速度变化 列车部分颜色发生变化
this.trainB.setSpeedColor(model.speed);
this.trainB && this.trainB.setSpeedColor(model.speed);
}
this.setDoorStatus(model.doorCloseLock);
this.setAlarmStatus(model.alarmStatus);

View File

@ -18,6 +18,7 @@ class TrainWindow extends Group {
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode();
}
create() {
if (this.prdType !== '01') {
@ -83,7 +84,14 @@ class TrainWindow extends Group {
return (store.getters['map/getDeviceByCode'](code) || {}).instance;
}
// 设置显示模式
setShowMode() {}
setShowMode() {
const showMode = this.model.showMode;
if (showMode == '05') {
this.eachChild(item => {
item.hide();
});
}
}
setShowStation(flag) {
if (flag) {
this.eachChild(item => {

View File

@ -1,277 +0,0 @@
<template>
<div
ref="jlmapCanvas"
class="jlmap-canvas"
>
<div :id="canvasId" class="display_canvas" />
</div>
</template>
<script>
import Jlmap from '@/jmapNew/map';
import { deepAssign } from '@/utils/index';
import deviceType from '@/jmapNew/constant/deviceType';
import { mapGetters } from 'vuex';
import { parser } from '@/jmapNew/utils/parser';
export default {
name: 'JLocalmapVisual',
props: {
type: {
type: String,
required: true
},
deviceCode: {
type: String,
default: () => {
return '';
}
}
},
data() {
return {
loading: true,
offset: {
x: 0,
y: 0
},
map: null,
mapDevice: {},
routeData: [],
mapData: null,
autoReentryData: []
};
},
computed: {
canvasId() {
return ['map', Math.random().toFixed(5) * 100000].join('_');
},
...mapGetters('map', [
'bigScreenConfig'
]),
width() {
return this.$store.state.app.width - 30;
},
height() {
return this.$store.state.app.height - 60;
}
},
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() {
},
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: {}
});
}
this.map.on('selected', this.onSelected, this);
window.document.oncontextmenu = function () {
return false;
};
},
loadData(mapData, con) {
try {
this.mapData = mapData;
if (this.mapData.skinVO) {
const config = this.map.getShowConfig();
Object.assign(config, con);
this.mapDevice = parser(this.mapData, this.mapData.skinVO.code, config);
}
this.setMap(this.mapData, this.mapDevice);
} catch (error) {
console.log('[ERROR] ', error);
}
},
onSelected(em) {
if (em.deviceType === 'Station' && em.subType === 'troButton') {
this.$emit('goTroDetail', em.deviceCode);
}
},
//
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
});
if (this.type === 'troDetail') {
this.setCenter(this.deviceCode);
} else {
this.handleUpdateScreen();
}
} else {
this.mapDevice = {};
this.map.clear();
}
},
setCenter(deviceCode) {
this.map.setCenter(deviceCode);
},
handleUpdateScreen() {
this.maskOpen = false;
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
};
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
};
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

@ -1,66 +0,0 @@
<template>
<el-dialog
class="haerbin-01__systerm"
:modal="false"
:title="title"
:visible.sync="show"
:fullscreen="true"
:before-close="doClose"
:z-index="2000"
>
<map-visual ref="map" type="rps" />
</el-dialog>
</template>
<script>
import MapVisual from './mapVisual';
export default {
name: 'RPS',
components: {
MapVisual
},
data() {
return {
dialogShow: false,
mapData: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '背投系统';
}
},
methods: {
doShow() {
this.dialogShow = true;
this.$nextTick(function () {
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map));
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>
/deep/ .el-dialog {
background: rgba(100, 100, 100, 1) !important;
position: relative;
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
font-size: 14px;
}
/deep/ .el-dialog .el-dialog__body{
background: rgba(100, 100, 100, 1) !important;
border: 0 !important;
}
</style>

View File

@ -1,78 +0,0 @@
<template>
<el-dialog
class="haerbin-01__systerm"
:modal="false"
:title="title"
:visible.sync="show"
:fullscreen="true"
:before-close="doClose"
:z-index="2000"
>
<map-visual ref="map" type="tro" @goTroDetail="goTroDetail" />
</el-dialog>
</template>
<script>
import MapVisual from './mapVisual';
export default {
name: 'TRO',
components: {
MapVisual
},
data() {
return {
dialogShow: false,
mapData: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '轨道总览';
}
},
methods: {
doShow() {
this.dialogShow = true;
this.$nextTick(function () {
const map = this.$store.state.map.map;
const data = {
sectionList: map.sectionList,
scaling: map.scaling,
skinVO: map.skinVO,
stationList: map.stationList,
origin: map.origin,
bigScreenConfig: map.bigScreenConfig,
switchList: map.switchList
};
this.mapData = JSON.parse(JSON.stringify(data));
this.$refs.map.loadData(this.mapData, { showMode: '05' });
});
},
goTroDetail(deviceCode) {
this.doClose();
this.$emit('goTroDetail', deviceCode);
},
doClose() {
this.loading = false;
this.dialogShow = false;
}
}
};
</script>
<style scoped>
/deep/ .el-dialog {
background: rgba(100, 100, 100, 1) !important;
position: relative;
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
font-size: 14px;
}
/deep/ .el-dialog .el-dialog__body{
background: rgba(100, 100, 100, 1) !important;
border: 0 !important;
}
</style>

View File

@ -1,112 +0,0 @@
<template>
<el-dialog
class="haerbin-01__systerm"
:modal="false"
:title="title"
:visible.sync="show"
:fullscreen="true"
:before-close="doClose"
:z-index="2000"
>
<map-visual ref="map" type="troDetail" :device-code="deviceCode" />
<div style="width: 150px;height: 35px;display: flex;position: absolute; bottom: 60px;left: calc(50% - 75px);z-index: 9999;justify-content: space-between;justify-items: center;">
<div class="arrow-button" @click="changeStation(-1)"><i class="el-icon-back" /></div>
<div class="arrow-button" @click="goTroDialog"><i class="el-icon-top" /><i class="el-icon-top" /></div>
<div class="arrow-button" @click="changeStation(1)"><i class="el-icon-right" /></div>
</div>
</el-dialog>
</template>
<script>
import MapVisual from './mapVisual';
export default {
name: 'TRO',
components: {
MapVisual
},
props: {
stationList: {
type: Array,
required: true
}
},
data() {
return {
dialogShow: false,
mapData: null,
deviceCode: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '轨道详览';
}
},
methods: {
doShow(deviceCode) {
this.dialogShow = true;
this.deviceCode = deviceCode;
this.$nextTick(function () {
const map = this.$store.state.map.map;
const data = {
sectionList: map.sectionList,
scaling: map.scaling,
skinVO: map.skinVO,
stationList: map.stationList,
origin: map.origin,
bigScreenConfig: map.bigScreenConfig,
switchList: map.switchList
};
this.mapData = JSON.parse(JSON.stringify(data));
this.$refs.map.loadData(this.mapData, {showMode: '02'});
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
goTroDialog() {
this.doClose();
this.$emit('goTroDialog');
},
changeStation(value) {
const device = this.$store.getters['map/getDeviceByCode'](this.deviceCode);
const stationSn = device.sn + value;
const station = this.stationList.find((item) => {
return item.sn === stationSn;
});
if (station) {
this.deviceCode = station.code;
this.$refs.map.setCenter(this.deviceCode);
}
}
}
};
</script>
<style scoped>
/deep/ .el-dialog {
background: rgba(100, 100, 100, 1) !important;
position: relative;
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
font-size: 14px;
}
/deep/ .el-dialog .el-dialog__body{
background: rgba(100, 100, 100, 1) !important;
border: 0 !important;
}
.arrow-button{
width: 45px;
height: 30px;
color: #00f;
background: #99a9bf;
font-size: 22px;
line-height: 30px;
text-align: center;
cursor: pointer;
}
</style>

View File

@ -1,13 +1,13 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar v-if="$store.state.training.prdType === '01' || $store.state.training.prdType === '02'" ref="menuBar" :selected="selected" :loginActive="loginActive" :isIgnoreLogin="isIgnoreLogin" @login="login" />
<menu-bar v-if="$store.state.training.prdType === '01'" ref="menuBar" :selected="selected" :login-active="loginActive" :is-ignore-login="isIgnoreLogin" @login="login" />
<menu-train ref="menuTrain" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" />
<menu-button v-if="isShowButton" ref="menuButton" :selected="selected" :loginActive="loginActive" :isIgnoreLogin="isIgnoreLogin" :inputStr="inputStr" />
<menu-button v-if="isShowButton" ref="menuButton" :selected="selected" :login-active="loginActive" :is-ignore-login="isIgnoreLogin" :input-str="inputStr" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="haerbin-01__systerm" />
<passive-Timeout ref="passiveTimeout" />
@ -50,25 +50,25 @@ export default {
return null;
}
}
},
data() {
return {
loginActive: false,
inputStr: ''
}
},
},
data() {
return {
loginActive: false,
inputStr: ''
};
},
computed: {
...mapGetters('config', [
'width'
]),
isShowButton() {
return this.$store.state.training.prdType === '01' || this.$store.state.training.prdType === '02';
},
isIgnoreLogin() {
return /jointTrainingNew/.test(this.$route.path) ||
},
isIgnoreLogin() {
return /jointTrainingNew/.test(this.$route.path) ||
/scriptDisplayNew/.test(this.$route.path) ||
/displayNew\/[teach|exam|manage]/.test(this.$route.path)
}
/displayNew\/[teach|exam|manage]/.test(this.$route.path);
}
},
watch: {
isShowBar(val) {
@ -79,13 +79,13 @@ export default {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
},
methods: {
login(inputStr) {
this.loginActive = !!inputStr
this.inputStr = inputStr;
}
}
},
methods: {
login(inputStr) {
this.loginActive = !!inputStr;
this.inputStr = inputStr;
}
}
};
</script>

View File

@ -170,11 +170,6 @@
<alarm-table-hmi ref="alarmTableHmi" />
<train-control ref="trainControl" :offset="10" />
<log-detail ref="logDetail" />
<rps-dialog ref="rpsDialog" />
<tra-dialog ref="traDialog" />
<ttl-dialog ref="ttlDialog" />
<tro-dialog ref="troDialog" @goTroDetail="goTroDetail" />
<tro-detail-dialog ref="troDetailDialog" :station-list="stationList" @goTroDialog="troClick" />
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
<source :src="buzzerAudio" type="audio/mpeg">
</audio>
@ -190,12 +185,6 @@ import BuzzerAudio from '@/assets/buzzer.mp3';
import AlarmTableHmi from './menuDialog/alarmTableHmi';
import AlarmTableLow from './menuDialog/alarmTableLow';
import TrainControl from './dialog/trainControl';
import RpsDialog from './dialog/rps';
import TraDialog from './dialog/tra';
import TtlDialog from './dialog/ttl';
import TroDialog from './dialog/tro';
import TroDetailDialog from './dialog/troDetail';
import LogDetail from './menuDialog/logDetail';
export default {
@ -204,12 +193,7 @@ export default {
AlarmTableLow,
AlarmTableHmi,
TrainControl,
LogDetail,
RpsDialog,
TroDialog,
TraDialog,
TtlDialog,
TroDetailDialog
LogDetail
},
props: {
selected: {
@ -268,7 +252,8 @@ export default {
'order'
]),
...mapGetters('map', [
'stationList'
'stationList',
'trainList'
]),
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
@ -502,9 +487,6 @@ export default {
traClick() {
this.$refs.traDialog.doShow();
},
ttlClick() {
this.$refs.ttlDialog.doShow();
},
goTroDetail(deviceCode) {
this.$refs.troDetailDialog.doShow(deviceCode);
},

View File

@ -1,5 +1,15 @@
<template>
<el-dialog class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-dialog
class="haerbin-01__systerm manage-user"
title="报警列表"
:before-close="handleClose"
:visible.sync="show"
width="70%"
:z-index="2000"
:modal="false"
append-to-body
:close-on-click-modal="false"
>
<div style="text-align: center;">
<div style="text-align: left;width: 90%;margin-left: 5%;border: 1px solid #808080;border-radius: 5px;padding: 10px;">
<el-row>

View File

@ -237,6 +237,10 @@ export default {
{
label: '开/关门',
handler: this.handleOpenCloseDoor
},
{
label: '换端',
handler: this.handlerTurnDirection
}
],
menuSpeed: [
@ -396,6 +400,20 @@ export default {
this.$refs.noticeInfo.doShow();
});
},
//
handlerTurnDirection() {
const group = this.$route.query.group;
const param = {
commandType: 'Turn_Direction',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
limitSpeed() {
const operate = {

View File

@ -132,6 +132,10 @@ export default {
{
label: '越红灯行驶',
handler: this.handleOverEedLight
},
{
label: '换端',
handler: this.handlerTurnDirection
}
],
menuSpeed: [
@ -328,6 +332,20 @@ export default {
this.$refs.noticeInfo.doShow();
});
},
//
handlerTurnDirection() {
const group = this.$route.query.group;
const param = {
commandType: 'Turn_Direction',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
routeBlockRun() {
//
// const list = [];

View File

@ -34,6 +34,7 @@ const Jlmap3dOtherVR = () => import('@/views/jlmap3d/maintainer/jl3dothervr');
const DisplayNew = () => import('@/views/newMap/displayNew/index');
const DisplayCity = () => import('@/views/newMap/displayCity/index');
const DisplayBaSiDi = () => import('@/views/newMap/displayBaSiDi/index');
const DesignDisplayNew = () => import('@/views/newMap/displayNew/scriptDisplay/scriptPreview/index');
const PracticeDisplay = () => import('@/views/newMap/displayNew/practiceDisplay');
const BigLPFStrategy = () => import('@/views/newMap/displayNew/bigLPFStrategy');
@ -393,6 +394,11 @@ export const publicAsyncRoute = [
component: DisplayCity,
hidden: true
},
{
path: '/displayBaSiDi/:mode',
component: DisplayBaSiDi,
hidden: true
},
{
path: '/design/displayNew/:mode',
component: DesignDisplayNew,

View File

@ -324,7 +324,9 @@ export default {
/** 列车在指定站台跳停 */
CMD_TRAIN_SKIP_STOP : { value: 'Train_Skip_Stop', label: '指定站台跳停' },
/** 列车取消指定站台的跳停 */
CMD_TRAIN_CANCEL_SKIP_STOP : { value: 'Train_Cancel_Skip_Stop', label: '取消指定站台跳停' }
CMD_TRAIN_CANCEL_SKIP_STOP : { value: 'Train_Cancel_Skip_Stop', label: '取消指定站台跳停' },
/** 换端 */
CMD_TRAIN_TURN_DIRECTION: { value: 'Turn_Direction', label: '换端' }
},
TrainWindow: {
/** 修改列车识别号 */

View File

@ -61,8 +61,8 @@ const config = {
commit('updateMenuBar');
},
setCurrentCancasId: ({state, dispatch, commit }, payLoad) => {
commit('setCanvasId', payLoad.id);
setCurrentCancasId: async ({state, dispatch, commit }, payLoad) => {
await commit('setCanvasId', payLoad.id);
dispatch('resetCanvasOffset');
},

View File

@ -15,7 +15,7 @@ function handleSimulationStateMsg(state, type) {
store.dispatch('scriptRecord/updateSimulationPause', true);
break;
case 1:
store.dispatch('scriptRecord/updateSimulationPause', true);
store.dispatch('scriptRecord/updateSimulationPause', false);
state.simulationPause = false;
break;
case 4:

View File

@ -249,7 +249,11 @@ export default {
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
if (this.currentPrdType === '02' && this.courseModel.lineCode === '14') {
this.$router.push({ path: `/displayBaSiDi/demon`, query: query });
} else {
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
}
launchFullscreen();
}).catch(error=>{
if (error.code == 10003) {

View File

@ -0,0 +1,390 @@
<template>
<el-dialog
v-dialogDrag
:visible.sync="dialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
:show-close="false"
z-index="1999"
:modal="false"
width="100%"
>
<div style="height: 130px;">
<div class="haerbin-01__systerm nav">
<el-row style="padding: 3px;">
<el-col :span="20">
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 1px;height: 132px;">
<el-row style="padding: 4px;">
<div class="tip-content-box">
<div v-if="tipContent[0]">{{ `${tipContent[0].level}` }}</div>
<div v-if="tipContent[0]">{{ `${tipContent[0].time}` }}</div>
<div v-if="tipContent[0]">{{ `${tipContent[0].confirm ? '确认': '未确认'}` }}</div>
</div>
<div class="tip-content-box">
<div v-if="tipContent[1]">{{ `${tipContent[1].level}` }}</div>
<div v-if="tipContent[1]">{{ `${tipContent[1].time}` }}</div>
<div v-if="tipContent[1]">{{ `${tipContent[1].confirm ? '确认': '未确认'}` }}</div>
</div>
<div class="tip-content-box">
<div v-if="tipContent[2]">{{ `${tipContent[2].level}` }}</div>
<div v-if="tipContent[2]">{{ `${tipContent[2].time}` }}</div>
<div v-if="tipContent[2]">{{ `${tipContent[2].confirm ? '确认': '未确认'}` }}</div>
</div>
</el-row>
<div style="padding: 5px;height:20px;line-height: 20px;border-top: 2px solid #DDD9CA;display: flex;justify-content: space-between;">
<div>
<div class="div-simulate-button" style="width: 40px;" @click="handleDialogShow('rpsDialog')">背投</div>
<div class="div-simulate-button" style="width: 40px;" @click="handleDialogShow('carPack')">车场</div>
<div class="div-simulate-button" style="width: 40px;" @click="handleDialogShow('troDialog')">轨道</div>
<div class="div-simulate-button" style="width: 40px;">系统</div>
<div class="div-simulate-button" style="width: 40px;" @click="handleDialogShow('traDialog')">列车</div>
</div>
<div>
<div class="div-simulate-button" style="width: 40px;">联锁</div>
<div class="div-simulate-button" style="width: 40px;" @click="handleDialogShow('tmtDialog')">列监</div>
<div class="div-simulate-button" style="width: 40px;">运图</div>
<div class="div-simulate-button" style="width: 55px;" @click="handleDialogShow('ttlDialog')">时刻表</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>
</div>
</el-col>
<el-col :span="2">
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 1px;">
<el-row style="margin-top: 20px;margin-bottom: 18px;">
<el-col :span="16">
<el-row class="button-row">
<div style="width: 25px;" class="div-simulate-button" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#F00':'#DDD' }" :class="{'headerBox' :isNoConfirmLevelA}" @click="showHimAlarm('A')">A</div>
<div style="width: 25px;" class="div-simulate-button" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#F00':'#DDD' }" :class="{'headerBox' :isNoConfirmLevelB}" @click="showHimAlarm('B')">B</div>
<div style="width: 25px;" class="div-simulate-button" :style="{background:isNoRecoverLevelC?'#F00':'#DDD' }" @click="showHimAlarm('C')">C</div>
</el-row>
<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 class="button-row" style="margin: 10px 0;">
<div style="width: 40px;" 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>
</div>
</el-col>
<el-col :span="2" style="border: 2px solid #DDD9CA;border-radius: 1px;">
<el-row style="height: 88px;">
<div style="font-size: 15px;color: #000;display: flex;justify-content: space-around;align-items: center;margin-top: 40px;">
<span>{{ dateString }}</span>
<span>{{ time }}</span>
</div>
</el-row>
<el-row class="button-row" style="margin: 10px 0;">
<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-col>
</el-row>
</div>
<alarm-table-hmi ref="alarmTableHmi" />
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
<source :src="buzzerAudio" type="audio/mpeg">
</audio>
<div class="display-draft">
<el-button-group class="button-group-box">
<template v-if="!dataError">
<el-button type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
</template>
<el-button type="primary" size="small" @click="back">{{ $t('display.demon.back') }}</el-button>
</el-button-group>
</div>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date';
import BuzzerAudio from '@/assets/buzzer.mp3';
import AlarmTableHmi from '@/jmapNew/theme/nanjing_02/menus/menuDialog/alarmTableHmi';
import { prefixIntrger } from '@/utils/date';
export default {
name: 'BaSiDi',
components: {
AlarmTableHmi
},
props: {
dataError: {
type: Boolean,
required: true
},
isDisable: {
type: Boolean,
required: true
}
},
data() {
return {
dialogVisible: true,
tipContent: [],
buzzerAudio: BuzzerAudio,
sound: false,
noConfirmMapA: {},
noConfirmMapB: {},
confirmNoRecoverMapA: {},
confirmNoRecoverMapB: {},
confirmNoRecoverMapC: {},
noConfirmMapAString: '{}',
noConfirmMapBString: '{}',
confirmNoRecoverMapAString: '{}',
confirmNoRecoverMapBString: '{}',
confirmNoRecoverMapCString: '{}',
time: '00:00:00',
dateString: '00.00.0000'
};
},
computed: {
...mapGetters('training', [
'mode',
'started',
'steps',
'order'
]),
...mapGetters('map', [
'stationList',
'trainList'
]),
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
},
isNoConfirmLevelA() {
return this.noConfirmMapAString !== '{}';
},
isNoConfirmLevelB() {
return this.noConfirmMapBString !== '{}';
},
isNoRecoverLevelA() {
return this.confirmNoRecoverMapAString !== '{}';
},
isNoRecoverLevelB() {
return this.confirmNoRecoverMapBString !== '{}';
},
isNoRecoverLevelC() {
return this.confirmNoRecoverMapCString !== '{}';
}
},
watch: {
'$store.state.training.initTime': function (initTime) {
const date = new Date(initTime);
this.initDate(date);
},
'$store.state.socket.simulationTimeSync': function (time) { // 仿
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
},
'$store.state.socket.simulationAlarmInfo': function(val) {
(val || []).forEach(item => {
if (!item.confirmed) {
this.tipContent.push(item);
this.handleAlarm(item);
if (this.tipContent.length > 3) {
this.tipContent.shift();
}
if (item.level === 'A') {
this.noConfirmMapA[item.code] = item;
this.noConfirmMapAString = JSON.stringify(this.noConfirmMapA);
} else if (item.level === 'B') {
this.noConfirmMapB[item.code] = item;
this.noConfirmMapBString = JSON.stringify(this.noConfirmMapB);
}
} else if (!item.recovered) {
if (item.level === 'A') {
delete this.noConfirmMapA[item.code];
this.confirmNoRecoverMapA[item.code] = item;
this.noConfirmMapAString = JSON.stringify(this.noConfirmMapA);
this.confirmNoRecoverMapAString = JSON.stringify(this.confirmNoRecoverMapA);
} else if (item.level === 'B') {
delete this.noConfirmMapB[item.code];
this.confirmNoRecoverMapB[item.code] = item;
this.noConfirmMapBString = JSON.stringify(this.noConfirmMapB);
this.confirmNoRecoverMapBString = JSON.stringify(this.confirmNoRecoverMapB);
} else if (item.level === 'C') {
this.confirmNoRecoverMapC[item.code] = item;
this.confirmNoRecoverMapCString = JSON.stringify(this.confirmNoRecoverMapC);
}
} else {
if (item.level === 'A') {
delete this.noConfirmMapA[item.code];
delete this.confirmNoRecoverMapA[item.code];
this.noConfirmMapAString = JSON.stringify(this.noConfirmMapA);
this.confirmNoRecoverMapAString = JSON.stringify(this.confirmNoRecoverMapA);
} else if (item.level === 'B') {
delete this.noConfirmMapB[item.code];
delete this.confirmNoRecoverMapB[item.code];
this.noConfirmMapBString = JSON.stringify(this.noConfirmMapB);
this.confirmNoRecoverMapBString = JSON.stringify(this.confirmNoRecoverMapB);
} else if (item.level === 'C') {
delete this.confirmNoRecoverMapC[item.code];
this.confirmNoRecoverMapCString = JSON.stringify(this.confirmNoRecoverMapC);
}
}
});
}
},
methods: {
undeveloped() {
this.doClose();
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
callback: action => {
}
});
},
showHimAlarm(level) {
this.$refs.alarmTableHmi.doShow(level);
},
controlAudio(val) {
const audio = document.getElementById('buzzer');
this.sound = val;
if (audio !== null) {
if (val) {
audio.play();
} else if (val === false) {
audio.pause();
}
}
},
handleDialogShow(type) {
this.$emit('handleDialogShow', type);
},
selectBeginTime() {
this.$emit('selectBeginTime');
},
end() {
this.$emit('end');
},
back() {
this.$emit('back');
},
initDate(date) {
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`;
const years = date.getFullYear() + '';
let months = date.getMonth() + 1 + '';
let dates = date.getDate() + '';
if (months.length < 2) { months = '0' + months; }
if (dates.length < 2) { dates = '0' + dates; }
this.dateString = dates + '.' + months + '.' + years;
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$width: 30px;
$height: 90px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 190px;
$menuItemPadding: 5px;
.nav {
display: block;
cursor: pointer;
color: #0000;
background: -webkit-linear-gradient(#FDFDFE, #DEE3F3);
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
background: linear-gradient(#FDFDFE, #DEE3F3);
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
}
.div-simulate-button{
height: 20px;
line-height: 20px;
display: inline-block;
font-size: 14px;
color: #303030;
border: 1px solid #44556D;
background: #DDD;
text-align: center;
border-radius: 1px;
width: 80px;
}
.tip-content-box{
height: 30px;
width: 100%;
line-height: 30px;
background: #001528;
color: #C20F29;
font-size: 14px;
display: flex;
justify-content: space-around;
}
.button-row{
height: 20px;
line-height: 20px;
display: flex;
justify-content:space-between;
}
@keyframes fade {
from {
opacity: 1.0;
}
50% {
opacity: 0.4;
}
to {
opacity: 1.0;
}
}
@-webkit-keyframes fade {
from {
opacity: 1.0;
}
50% {
opacity: 0.4;
}
to {
opacity: 1.0;
}
}
.headerBox {
background: #f00;
animation: fade 600ms infinite;
-webkit-animation: fade 600ms infinite;
}
/deep/.el-dialog__body{
padding: 0;
}
.display-draft {
position: fixed;
right: 10px;
bottom: 15px;
.button-group-box{
float: right;
}
}
</style>

View File

@ -0,0 +1,261 @@
<template>
<el-dialog v-dialogDrag class="nanjing-02__systerm route-setting" :title="title" :visible.sync="show" width="900px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 5px;">
<div class="content_box">
<div class="el-button" :class="activeIndex == 0 ? 'active' : ''" style="width: 49%;" @click="handleSelect(0)">Mileage and inspection</div>
<div class="el-button" :class="activeIndex == 1 ? 'active' : ''" style="width: 49%;" @click="handleSelect(1)">Cargroup management</div>
</div>
<div v-if="activeIndex == 0" class="table">
<span>Range of car group number: 401(1/6) - 450(1/6)</span>
<el-table
ref="tempTable"
class="table_content_box"
:data="tempData1"
border
style="width: 100%"
header-cell-class-name="table_header_box"
size="mini"
highlight-current-row
:height="340"
>
<el-table-column prop="firstGroup" label="First car group" style="margin-left:30px" :width="100" />
<el-table-column prop="lastGroup" label="Last car group" :width="100" />
<el-table-column prop="totalmileage" label="Total mileage" :width="95" />
<el-table-column prop="recentDate" label="Recent inspection date" :width="150" />
<el-table-column prop="mileageSince" label="Mileage since recent inspection" :width="200" />
<el-table-column prop="correction" label="Correction mileage" />
<el-table-column label="Carry out inspection" :width="100">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.carryOut" />
</template>
</el-table-column>
</el-table>
</div>
<div v-if="activeIndex == 1" class="table">
<span>Range of car group number: 401(1/6) - 450(1/6)</span>
<el-table
ref="tempTable"
class="table_content_box"
:data="tempData"
border
style="width: 100%"
header-cell-class-name="table_header_box"
size="mini"
highlight-current-row
:height="340"
>
<el-table-column prop="serviceNo" label="Train service No." style="margin-left:30px" :width="90" />
<el-table-column prop="trainId" label="Train-ID" :width="80" />
<el-table-column prop="firstGroup" label="First car group" :width="70" />
<el-table-column prop="lastGroup" label="Last car group" :width="70" />
<el-table-column prop="startStation" label="Start station" :width="110">
<template slot-scope="scope">
<el-select v-model="scope.row.startStation" clearable placeholder="请选择" size="mini">
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="startTime" label="Start time">
<template slot-scope="scope">
<span>{{ scope.row.startTime }}</span>
</template>
</el-table-column>
<el-table-column prop="terminalStation" label="Terminal station" :width="110">
<template slot-scope="scope">
<el-select v-model="scope.row.terminalStation" clearable placeholder="请选择" size="mini">
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="terminalTime" label="Terminal time">
<template slot-scope="scope">
<span>{{ scope.row.terminalTime }}</span>
</template>
</el-table-column>
<el-table-column label="In service" :width="65">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.inService" />
</template>
</el-table-column>
</el-table>
</div>
<div style="overflow: hidden;">
<el-button style="float: left;" @click="cancel">Refresh</el-button>
<el-button style="float: left;" @click="cancel">Load</el-button>
<el-button style="float: left;" @click="cancel">Delete</el-button>
<el-button style="float: left;" @click="cancel">Insert</el-button>
<el-button style="float: right;" @click="cancel">Close</el-button>
<el-button class="disabled" :loading="loading" style="float: right;" @click="commit">Execute</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import { EventBus } from '@/scripts/event-bus';
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteCreate',
data() {
return {
dialogShow: false,
loading: false,
selected: null,
activeIndex: 0,
tempData1: [
{
firstGroup: '4011',
lastGroup: '4016',
totalmileage: '0',
recentDate: '01.01.1970',
mileageSince: '0',
correction: '0',
carryOut: false
},
{
firstGroup: '4021',
lastGroup: '4026',
totalmileage: '0',
recentDate: '01.01.1970',
mileageSince: '0',
correction: '0',
carryOut: false
}
],
tempData: [
{
serviceNo: 47,
trainId: '07474807',
firstGroup: '',
lastGroup: '',
startStation: '',
startTime: '24.07.2008 22:08:51',
terminalStation: '',
terminalTime: '24.07.2008 22:08:51',
inService: false
},
{
serviceNo: 67,
trainId: '07474808',
firstGroup: '',
lastGroup: '',
startStation: '',
startTime: '24.07.2008 22:08:51',
terminalStation: '',
terminalTime: '24.07.2008 22:08:51',
inService: false
}
]
};
},
computed: {
...mapGetters('map', [
'map',
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '[bjdvt1/a1bj]-0-Process/Realtime - Depot Service';
}
},
methods: {
loadInitData(map) {
console.log(map, 11111);
},
doShow(operate, selected) {
this.dialogShow = true;
this.selected = selected;
this.loadInitData(this.map);
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
handleSelect(tab) {
this.activeIndex = tab;
},
commit() {
// const operate = {
// send: true,
// operation: OperationEvent.Section.newtrain.menu.operation,
// cmdType: CMD.Section.CMD_NEW_TRAIN,
// val: '' + this.direction + '::' + this.trainCode
// };
// this.loading = true;
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// this.loading = false;
// if (valid) {
// this.doClose();
// }
// }).catch(() => {
// this.loading = false;
// this.doClose();
// EventBus.$emit('sendMsg', {message: ''});
// });
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.route-setting {
.content_box {
margin-bottom: 10px;
.el-button{
&.active{
background: #969696;
}
}
}
.table_content_box{
margin-bottom: 20px;
}
/deep/ {
.table{
.table_header_box{
.cell{
text-align: center;
word-break: break-word;
}
}
}
}
}
</style>

View File

@ -0,0 +1,460 @@
<template>
<div class="main" :style="{width: '100%',height:'100%',position:'absolute',overflow:'hidden'}" style="background: #000;">
<ba-si-di
ref="baSiDi"
:is-disable="isDisable"
:data-error="dataError"
@handleDialogShow="handleDialogShow"
@end="end"
@back="back"
@selectBeginTime="selectBeginTime"
/>
<rps-dialog ref="rpsDialog" :train-list="trainList" />
<tro-dialog ref="troDialog" :train-list="trainList" :station-list="stationList" />
<car-pack ref="carPack" />
<tro-detail ref="troDetail" :train-list="trainList" :station-list="stationList" @goTroDialog="troClick" />
<tra-dialog ref="traDialog" />
<ttl-dialog ref="ttlDialog" />
<tmt-dialog ref="tmtDialog" />
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
</div>
</template>
<script>
import { getSessionStorage } from '@/utils/auth';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { timeFormat } from '@/utils/date';
import { getToken } from '@/utils/auth';
import { creatSubscribe, clearSubscribe, displayTopic, getTopic } from '@/utils/stomp';
import SetTime from '@/views/newMap/displayNew/demon/setTime';
import { clearSimulation, getSimulationInfoNew, ranAsPlan, exitRunPlan } from '@/api/simulation';
import { loadMapDataById } from '@/utils/loaddata';
import { EventBus } from '@/scripts/event-bus';
import { getSimulationMemberList, getAllSimulationUser } from '@/api/simulation';
import { getMemberListCommon, getUserListCommon } from '@/api/rtSimulation';
import BaSiDi from './baSiDi';
import RpsDialog from './rps';
import TroDialog from './tro';
import CarPack from './carPack';
import TroDetail from './troDetail';
import TraDialog from './tra';
import TtlDialog from './ttl';
import TmtDialog from './tmt';
import parseStatus from '@/utils/parseStatus';
export default {
name: 'DisplayDraft',
components: {
BaSiDi,
SetTime,
RpsDialog,
CarPack,
TroDialog,
TroDetail,
TraDialog,
TtlDialog,
TmtDialog
},
data() {
return {
offset: 15,
offsetBottom: 15,
tipBottom: 0,
textStatusHeight: 0,
planRunning:false,
dataError: false,
group:''
};
},
computed:{
...mapGetters([
'canvasWidth'
]),
...mapGetters('map', [
'stationList',
'trainList'
]),
mode() {
return this.$route.params.mode;
},
project() {
return getSessionStorage('project');
},
isDemon() {
return this.mode === 'demon' && this.project != 'drts';
},
isContest() {
return this.mode === 'demon' && this.project == 'drts';
},
mapId() {
return this.$route.query.mapId;
},
width() {
return this.$store.state.app.width;
},
height() {
return this.$store.state.app.height;
},
projectDevice() {
return this.$route.query.projectDevice;
},
isDisable() {
return this.$store.state.training.started;
}
},
watch:{
'$store.state.socket.permissionOver': function () {
this.$alert('用户权限已被收回', '提示', {
confirmButtonText: '确定',
callback: action => {
this.back();
}
});
},
'$store.state.socket.equipmentStatus': function (val) {
if (val.length) {
this.statusMessage(val);
}
},
'$store.state.socket.deviceStateMessages': function (val) {
if (val) {
this.statusMessageNew(val);
}
},
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar
this.setPosition();
},
'$store.state.app.windowSizeCount': function() { //
this.setWindowSize();
},
'$store.state.training.prdType': function (val) { //
this.setPosition();
},
'$store.state.map.mapViewLoadedCount': function (val) { //
if (this.planRunning) {
this.$store.dispatch('training/simulationStart');
}
},
'$store.state.socket.memberChangeCount': function () { // 仿
this.initMemberUserInfo();
},
'$store.state.socket.simulationStart':function(val) {
if (val) {
this.$store.dispatch('training/simulationStart');
}
},
$route() {
if (!this.isLesson && !this.isExam) {
this.initLoadData();
}
},
'$store.state.menuOperation.selectedCount':function(em) {
const device = this.$store.state.menuOperation.selected;
if (device && device._type === 'Station' && this.$store.state.menuOperation.subType === 'troButton') {
this.$refs.troDialog.doClose();
this.$refs.troDetail.doShow(device.code);
}
}
},
beforeDestroy() {
this.clearSubscribe();
this.clearSubscribeNew();
clearSimulation(this.group);
this.$store.dispatch('training/reset');
},
async mounted() {
const _that = this;
window.onbeforeunload = () => { _that.clearSubscribe(); _that.clearSubscribeNew(); };
this.setWindowSize();
this.initLoadData();
this.initMemberUserInfo(true);
this.$store.dispatch('app/animationsClose');
},
methods:{
//
endViewLoading(isSuccess) {
if (!isSuccess) {
this.$store.dispatch('map/mapClear');
}
this.$nextTick(() => {
EventBus.$emit('viewLoading', false);
});
},
// 仿退
async back() {
this.$router.go(-1);
},
async statusMessage(list) {
if (this.$jlmap) {
await this.$store.dispatch('training/updateMapState', list);
} else {
this.$store.commit('map/updateMapDevice', list);
}
await this.$store.dispatch('socket/setEquipmentStatus');
},
async statusMessageNew(deviceStatus) {
const list = parseStatus(deviceStatus);
await this.$store.dispatch('training/updateMapState', list);
await this.$store.dispatch('socket/setDeviceStateMessages');
},
async subscribe() {
this.clearSubscribe();
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header);
await this.$store.dispatch('training/setHasSubscribed');
},
async subscribeNew() {
this.clearSubscribeNew();
const header = { 'X-Token': getToken() };
creatSubscribe(getTopic('ATS', this.$route.query.group), header);
creatSubscribe(getTopic('SYSTIME', this.$route.query.group), header);
creatSubscribe(getTopic('STATE', this.$route.query.group), header);
await this.$store.dispatch('training/setHasSubscribed');
},
clearSubscribeNew() {
clearSubscribe(getTopic('ATS', this.$route.query.group));
clearSubscribe(getTopic('SYSTIME', this.$route.query.group));
clearSubscribe(getTopic('STATE', this.$route.query.group));
},
clearSubscribe() {
clearSubscribe(`${displayTopic}\/${this.groupModel}`);
},
initMemberUserInfo(isFirst = false) {
if (this.$route.query.newApi + '' === 'true') {
getMemberListCommon(this.$route.query.group).then(resp => {
this.$store.dispatch('training/setMemberList', { memberList: resp.data, userId: this.$store.state.user.id });
getUserListCommon(this.$route.query.group).then(res => {
this.$store.dispatch('training/setSimulationUserList', res.data);
if (isFirst) { this.subscribeNew(); }
}).catch(() => {
this.$messageBox('获取所有仿真用户失败!');
});
}).catch(() => {
this.$messageBox('获取仿真成员列表失败!');
});
} else {
// 仿
getSimulationMemberList(this.$route.query.group).then(resp => {
this.$store.dispatch('training/setMemberList', { memberList: resp.data, userId: this.$store.state.user.id });
getAllSimulationUser(this.$route.query.group).then(res => {
this.$store.dispatch('training/setSimulationUserList', res.data);
if (isFirst) {
this.subscribe();
}
}).catch(() => {
this.$messageBox('获取所有仿真用户失败!');
});
}).catch(() => {
this.$messageBox('获取仿真成员列表失败!');
});
}
},
//
setPosition() {
this.$nextTick(() => {
this.offset = 10;
this.offsetBottom = 15;
const menuBar = document.getElementById('menuBar');
const menuTool = document.getElementById('menuTool');
const menuBottom = document.getElementById('menuButton');
const menuButtonsBox = document.getElementById('menuButtons_box');
const textStatus = document.getElementById('textStatus');
if (menuBar) {
this.offset = (menuBar.offsetHeight || 0) + 15;
}
if (menuTool) {
this.offset = (menuTool.offsetHeight || 0) + 15;
}
const buttonWidth = this.width - 1200; // B box widht
if (menuBottom && buttonWidth < 780) {
this.offsetBottom = (menuBottom.offsetHeight || 0) + 15;
}
if (menuButtonsBox) {
this.tipBottom = (menuButtonsBox.offsetHeight || 0) + 15;
}
if (textStatus) {
this.textStatusHeight = textStatus.offsetHeight || 0;
textStatus.style.top = this.offset - 15 + 'px';
}
});
},
//
setWindowSize() {
const width = this.width;
const height = this.height;
this.$store.dispatch('config/resize', { width, height });
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
},
//
initLoadData() {
this.group = this.$route.query.group;
this.$store.dispatch('training/reset');
this.loadSimulationInfo();
this.loadMapData();
},
// 仿group仿
async loadSimulationInfo() {
const resp = await getSimulationInfoNew(this.group);
if (resp && resp.code == 200 && resp.data) {
if (!resp.data.dataError) {
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); //
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
this.$store.dispatch('training/countTime');
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
this.planRunning = resp.data.planRunning;
if (resp.data.planRunning) {
this.$store.commit('training/start');
}
} else {
this.$messageBox('此地图数据正在维护中,无法运行!');
}
this.dataError = resp.data.dataError;
}
},
selectBeginTime() {
this.$refs.setTime.doShow();
},
//
loadMapData() {
if (parseInt(this.mapId)) {
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
loadMapDataById(this.mapId, 'simulation');
} else {
this.endViewLoading();
}
},
start(model) { // 仿
const data = {
time: model.initTime
};
if (this.$route.query.prdType === '04') {
data.loadNumber = model.loadNum;
}
ranAsPlan(data, this.group).then(res => {
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
}).catch(error => {
let message = '';
switch (error.code) {
case '5001':
message = this.$t('error.mapDataError');
break;
case '5002':
message = this.$t('error.runningChartDataError');
break;
case '5003':
message = this.$t('error.runningChartIsNotLoaded');
break;
case '5004':
message = this.$t('error.runningDataError');
break;
case '5000':
message = this.$t('error.systemError');
break;
case '4000':
message = this.$t('error.simulationDoesNotExist');
break;
case '4001':
message = this.$t('error.simulationOperationIsNotDefined');
break;
case '4002':
message = this.$t('error.simulationOperationProcessingMethodNotFound');
break;
case '4003':
message = this.$t('error.simulationOperationFailed');
break;
case '4004':
message = this.$t('error.operationConflict');
break;
default:
message = '按计划行车异常,请退出重试!';
// this.$messageBox(',退!');
break;
}
this.$messageBox(message + '' + this.$t('error.startSimulationFailed'));
});
},
end() {
exitRunPlan(this.group).then(() => {
this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('training/setMapDefaultState').then(() => {
this.$store.dispatch('map/clearJlmapTrainView');
this.$store.dispatch('map/resetActiveTrainList', false);
this.$store.dispatch('map/setTrainWindowShow', false);
});
});
}).catch(() => {
this.$messageBox(this.$t('display.demon.endSimulationFail'));
});
},
troClick() {
this.$refs.troDialog.doShow();
},
handleDialogShow(type) {
this.$refs[type].doShow();
}
}
};
</script>
<style>
.nanjing-02__systerm .el-dialog {
background: #d8d8d8;
border: 2px solid rgba(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.nanjing-02__systerm .el-dialog .el-dialog__header {
padding: 5px;
height: 30px;
background-image: linear-gradient(#A5A5BA, #FDFEFD);
border-radius: 4px 4px 0 0;
}
.nanjing-02__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 4px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 24px;
font-size: 15px;
}
.nanjing-02__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 6px;
right: 5px;
line-height: 16px;
}
.nanjing-02__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close{
color: #fff;
}
.nanjing-02__systerm .el-dialog .el-dialog__body {
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
margin: 0px 1px 1px;
border: 2px solid rgb(212 212 212);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #E6E6E6;
opacity: 1;
}
.nanjing-02__systerm .el-dialog .el-button {
height: 26px;
line-height: 24px;
font-size: 13px;
padding: 0px;
width: 80px;
border: 1px solid #8B958A;
border-radius: 0px !important;
color: #000;
background: #E6E6E6;
}
.nanjing-02__systerm .el-dialog .el-button.disabled {
border: 1px solid #B1B1B1;
color: #ABABAB;
}
</style>

View File

@ -0,0 +1,160 @@
<template>
<el-dialog
:modal="false"
:title="title"
:visible.sync="show"
:fullscreen="true"
:before-close="doClose"
:z-index="2003"
>
<map-system-draft ref="mapCanvas" :no-menu="true" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import MapSystemDraft from '@/views/newMap/mapsystemNew/common/index';
import Vue from 'vue';
export default {
name: 'RPS',
components: {
MapSystemDraft
},
props: {
trainList: {
type: Array,
required: true
}
},
data() {
return {
dialogShow: false,
mapData: null,
enter: false,
selfJmap: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '背投系统';
},
width() {
return this.$store.state.app.width - 5;
},
height() {
return this.$store.state.app.height - 50;
},
...mapGetters('map', [
'bigScreenConfig'
])
},
watch: {
'$store.state.map.mapViewLoadedCount': function (val) { //
if (this.dialogShow) {
this.handleUpdateScreen();
this.$refs.mapCanvas && this.$refs.mapCanvas.mapViewLoaded(false);
}
},
'$store.state.app.windowSizeCount': function() { //
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
}
},
beforeDestroy() {
if (!this.dialogShow) {
this.destroy();
}
},
methods: {
doShow() {
this.dialogShow = true;
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
this.$nextTick(function() {
if (!this.enter) {
this.$refs.mapCanvas.setMap(this.$store.state.map.map);
this.enter = true;
} else {
this.$jlmap.clearTrainView();
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowMode(list, '02');
this.$store.dispatch('training/updateMapState', list);
}
});
},
destroy() {
if (this.selfJmap) {
this.selfJmap.dispose();
}
},
handleUpdateScreen() {
this.maskOpen = false;
if (this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length) {
const offsetList = this.bigScreenConfig.offsetList;
const width = this.bigScreenConfig.width;
const height = this.bigScreenConfig.height;
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
};
this.$jlmap.setUpdateScreen(size);
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowMode(list, '02');
} else {
this.maskOpen = true;
// this.$messageBox('线, ');
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.selfJmap = Vue.prototype.$jlmap;
}
}
};
</script>
<style scoped>
/deep/ .el-dialog {
background: rgba(100, 100, 100, 1);
position: relative;
border: 2px solid rgba(144, 144, 144, 0.8);
border-radius: 6px;
font-size: 14px;
}
/deep/ .el-dialog .el-dialog__body{
background: rgba(100, 100, 100, 1);
border: 0;
padding: 0;
}
/deep/ .el-dialog .el-dialog__header {
padding: 5px;
height: 30px;
}
/deep/ .el-dialog .el-dialog__title {
color: #fff;
}
/deep/ .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 4px;
right: 5px;
line-height: 16px;
}
/deep/ .el-dialog__headerbtn .el-dialog__close{
color: #fff;
}
</style>

View File

@ -0,0 +1,227 @@
<template>
<el-dialog
v-dialogDrag
class="route-setting"
:title="title"
:visible.sync="show"
width="900px"
label-position="top"
:before-close="doClose"
:z-index="2009"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 5px;">
<el-row>
<el-col :span="12"><span>所选位置</span></el-col>
<el-col :span="12"><span>列车号</span></el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="sectionName" size="mini" style="width: 400px;" :disabled="true" />
</el-col>
<el-col :span="12">
<el-input v-model="trainCode" :max-length="7" size="mini" style="width: 310px;" />
<el-button size="mini" icon="el-icon-search" @click="trainFind" />
<el-button size="mini" icon="el-icon-refresh-left" @click="resetTrainCode" />
</el-col>
</el-row>
<div style="display: flex;justify-content: space-around;margin-top: 20px;">
<el-button size="mini" style="width: 280px;" @click="changeOperationType('show')">显示列车信息</el-button>
<el-button size="mini" style="width: 280px;" @click="changeOperationType('update')">修改列车资料</el-button>
<el-button size="mini" style="width: 280px;" @click="changeOperationType('create')">创建列车号</el-button>
</div>
<div style="display: flex;justify-content: space-around;margin-top: 10px;">
<el-button size="mini" style="width: 280px;" @click="changeOperationType('delete')">删除列车号</el-button>
<el-button size="mini" style="width: 280px;" @click="changeOperationType('move')">步进列车号</el-button>
<el-button size="mini" style="width: 280px;" @click="changeOperationType('resort')">重排列车号</el-button>
</div>
<div v-if="operationType === 'show'">
<el-table :data="tableData" border style="width: 100%;margin-top: 20px;" height="200">
<el-table-column prop="date" label="方向" />
<el-table-column prop="name" label="列车号" />
<el-table-column prop="address" label="位置" />
<el-table-column prop="address" label="ARS" />
<el-table-column prop="address" label="晚点" />
</el-table>
</div>
<div v-else-if="operationType === 'create'" style="display: flex;justify-content: space-between;">
<div>
<el-table :data="tableData" border style="width: 280px;margin-top: 20px;" height="200">
<el-table-column prop="date" label="方向" width="60" />
<el-table-column prop="name" label="列车号" width="157" />
<el-table-column prop="address" label="位置" width="60" />
</el-table>
</div>
<div>
<div style="margin-top: 20px;display: flex;justify-content: space-between;padding: 5px;align-items: center;">
<span>位置</span>
<el-input size="mini" style="width: 150px;" />
</div>
<div style="display: flex;justify-content: space-between;padding: 5px;align-items: center;margin-top: 10px;">
<span>新列车号</span>
<el-input size="mini" style="width: 150px;" />
</div>
<div style="display: flex;justify-content: space-between;padding: 5px;margin-top: 10px;">
<span>设置该列车为自动排列</span>
<el-radio v-model="autoArrange" label="true">开启</el-radio>
<el-radio v-model="autoArrange" label="false">关闭</el-radio>
</div>
<div style="display: flex;justify-content: space-between;padding: 5px;align-items: center;margin-top: 10px;">
<span>车组号</span>
<el-input size="mini" style="width: 60px;" />
<div style="border: 1px solid #DCDFE6;padding: 4px 5px;border-radius: 3px;">&lt;&gt;</div>
<el-input size="mini" style="width: 60px;" />
</div>
</div>
<div>
<div style="margin-top: 20px;height: 20px;">插入位置之前</div>
<el-table :data="tableData" border style="width: 280px;" height="180">
<el-table-column prop="date" label="方向" width="60" />
<el-table-column prop="name" label="列车号" width="157" />
<el-table-column prop="address" label="位置" width="60" />
</el-table>
</div>
</div>
<div v-else-if="operationType === 'delete'" style="display: flex;">
<div>
<el-table :data="tableData" border style="width: 280px;margin-top: 20px;" height="200">
<el-table-column prop="date" label="方向" width="60" />
<el-table-column prop="name" label="列车号" width="157" />
<el-table-column prop="address" label="位置" width="60" />
</el-table>
</div>
<div style="width: 250px;display: flex;justify-content: space-between;margin-top: 20px;margin-left: 10px;align-items: center;height: 25px;">
<div>所选列车号</div>
<el-input style="width: 150px;" size="mini" />
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import { EventBus } from '@/scripts/event-bus';
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteCreate',
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tableData: [],
sectionName: '',
trainCode: '',
operationType: 'create',
autoArrange: false
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '列监';
}
},
methods: {
loadInitData(map) {
// console.log(map, 11111);
},
doShow(operate, selected) {
this.dialogShow = true;
this.selected = selected;
this.loadInitData();
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
handleSelect(tab) {
this.activeIndex = tab;
},
trainFind() {
const train = this.$store.getters['map/getDeviceByCode'](this.trainCode);
this.tableData = [train];
},
resetTrainCode() {
this.trainCode = '';
},
changeOperationType(type) {
this.operationType = type;
},
commit() {
// const operate = {
// send: true,
// operation: OperationEvent.Section.newtrain.menu.operation,
// cmdType: CMD.Section.CMD_NEW_TRAIN,
// val: '' + this.direction + '::' + this.trainCode
// };
// this.loading = true;
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// this.loading = false;
// if (valid) {
// this.doClose();
// }
// }).catch(() => {
// this.loading = false;
// this.doClose();
// EventBus.$emit('sendMsg', {message: ''});
// });
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.route-setting {
.content_box {
margin-bottom: 10px;
.el-button{
&.active{
background: #969696;
}
}
}
.table_content_box{
margin-bottom: 20px;
}
/deep/ {
.table{
.table_header_box{
.cell{
text-align: center;
word-break: break-word;
}
}
}
}
}
</style>

View File

@ -27,7 +27,7 @@
</template>
<script>
import trainTrunkDown from '@/assets/baSiDi/up.png';
import TrainTrunkDetail from './trainTrunkDetail.vue';
import TrainTrunkDetail from '../../../jmapNew/theme/nanjing_02/menus/dialog/trainTrunkDetail.vue';
export default {
name:'Tra',
components:{
@ -63,7 +63,6 @@ export default {
});
},
doClose() {
// this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
@ -77,7 +76,7 @@ export default {
/deep/ .el-dialog {
background: rgba(100, 100, 100, 1) !important;
position: relative;
border: 2px solid rgb(144, 144, 144, 0.8);
border: 2px solid rgba(144, 144, 144, 0.8);
border-radius: 6px;
font-size: 14px;
display: flex;

View File

@ -0,0 +1,199 @@
<template>
<el-dialog
:modal="false"
:title="title"
:visible.sync="show"
:fullscreen="true"
:before-close="doClose"
:z-index="2003"
>
<div>
<map-system-draft ref="mapCanvas" :no-menu="true" @back="back" />
</div>
</el-dialog>
</template>
<script>
import MapSystemDraft from '@/views/newMap/mapsystemNew/common/index';
import { mapGetters } from 'vuex';
import ButtonDbupIcon from '@/assets/baSiDi/dbup.png';
import ButtonRightIcon from '@/assets/baSiDi/right.png';
import ButtonLeftIcon from '@/assets/baSiDi/left.png';
import Vue from 'vue';
export default {
name: 'TRO',
components: {
MapSystemDraft
},
props: {
stationList: {
type: Array,
required: true
},
trainList: {
type: Array,
required: true
}
},
data() {
return {
dialogShow: false,
mapData: null,
deviceCode: '',
enter: false,
selfJmap: null,
buttonDbup: ButtonDbupIcon,
buttonRight: ButtonRightIcon,
buttonLeft: ButtonLeftIcon
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '轨道总览';
},
width() {
return this.$store.state.app.width - 5;
},
height() {
return this.$store.state.app.height - 50;
},
...mapGetters('map', [
'bigScreenConfig'
])
},
watch: {
'$store.state.map.mapViewLoadedCount': function (val) { //
if (this.dialogShow) {
this.showTroMode();
this.$refs.mapCanvas && this.$refs.mapCanvas.mapViewLoaded(false);
}
},
'$store.state.app.windowSizeCount': function() { //
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
}
},
beforeDestroy() {
if (!this.dialogShow) {
this.destroy();
}
},
methods: {
doShow() {
this.dialogShow = true;
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
this.$nextTick(function() {
if (!this.enter) {
this.$refs.mapCanvas.setMap(this.$store.state.map.map);
this.enter = true;
} else {
this.$jlmap.clearTrainView();
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowMode(list, '05');
this.$store.dispatch('training/updateMapState', list);
}
});
},
destroy() {
if (this.selfJmap) {
this.selfJmap.dispose();
}
},
showTroMode() {
// const nameList = Object.keys(this.$store.state.map.map || {});
// let list = [];
// nameList.forEach(item => {
// if (item !== 'skinVO') {
// const data = this.$store.state.map.map[item];
// if (data && data.constructor === Array) {
// list = [...list, ...data];
// }
// }
// });
// const trainList = [];
// this.trainList.forEach(item => {
// trainList.push({ code: item.groupNumber, deviceType:'TRAIN' });
// });
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.handleUpdateScreen();
this.$jlmap.updateShowMode(list, '05'); //
// this.$store.dispatch('training/updateMapState', trainList);
},
handleUpdateScreen() {
this.maskOpen = false;
if (this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length) {
const offsetList = this.bigScreenConfig.offsetList;
const width = this.bigScreenConfig.width;
const height = this.bigScreenConfig.height;
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
};
this.$jlmap.setUpdateScreen(size);
} else {
this.maskOpen = true;
// this.$messageBox('线, ');
}
},
back() {},
doClose() {
this.loading = false;
this.dialogShow = false;
this.selfJmap = Vue.prototype.$jlmap;
}
}
};
</script>
<style scoped>
/deep/ .el-dialog {
background: rgba(100, 100, 100, 1);
position: relative;
border: 2px solid rgba(144, 144, 144, 0.8);
border-radius: 6px;
font-size: 14px;
}
/deep/ .el-dialog .el-dialog__body{
background: rgba(100, 100, 100, 1);
border: 0;
padding: 0;
}
/deep/ .el-dialog .el-dialog__header {
padding: 5px;
height: 30px;
}
/deep/ .el-dialog .el-dialog__title {
color: #fff;
}
/deep/ .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 4px;
right: 5px;
line-height: 16px;
}
/deep/ .el-dialog__headerbtn .el-dialog__close{
color: #fff;
}
.arrow-button{
width: 45px;
height: 30px;
cursor: pointer;
background-size: 45px 30px;
background-repeat: no-repeat;
}
</style>

View File

@ -0,0 +1,194 @@
<template>
<el-dialog
:modal="false"
:title="title"
:visible.sync="show"
:fullscreen="true"
append-to-body
:before-close="doClose"
:z-index="2000"
>
<div style="text-align: center;">
<map-system-draft ref="mapCanvas" />
<div class="button-box" style="">
<div class="arrow-button" :style="{backgroundImage: 'url(' + buttonLeft + ')' }" @click="changeStation(-1)" />
<div class="arrow-button" :style="{backgroundImage: 'url(' + buttonDbup + ')' }" @click="goTroDialog" />
<div class="arrow-button" :style="{backgroundImage: 'url(' + buttonRight + ')' }" @click="changeStation(1)" />
</div>
</div>
</el-dialog>
</template>
<script>
import MapSystemDraft from '@/views/newMap/mapsystemNew/common/index';
import ButtonDbupIcon from '@/assets/baSiDi/dbup.png';
import ButtonRightIcon from '@/assets/baSiDi/right.png';
import ButtonLeftIcon from '@/assets/baSiDi/left.png';
import Vue from 'vue';
export default {
name: 'TRO',
components: {
MapSystemDraft
},
props: {
stationList: {
type: Array,
required: true
},
trainList: {
type: Array,
required: true
}
},
data() {
return {
dialogShow: false,
mapData: null,
deviceCode: '',
buttonDbup: ButtonDbupIcon,
buttonRight: ButtonRightIcon,
buttonLeft: ButtonLeftIcon,
enter: false,
selfJmap: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '轨道详览';
},
width() {
return this.$store.state.app.width - 10;
},
height() {
return this.$store.state.app.height - 40;
}
},
watch: {
'$store.state.map.mapViewLoadedCount': function (val) { //
if (this.dialogShow) {
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
Vue.prototype.$jlmap.updateShowMode(list, '02');
this.$refs.mapCanvas && this.$refs.mapCanvas.setCenter(this.deviceCode);
this.$refs.mapCanvas && this.$refs.mapCanvas.mapViewLoaded(false);
}
},
'$store.state.app.windowSizeCount': function() { //
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
}
},
beforeDestroy() {
if (!this.dialogShow) {
this.destroy();
}
},
methods: {
doShow(deviceCode) {
this.dialogShow = true;
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
this.$store.dispatch('config/resize', { width:this.width, height: this.height });
this.deviceCode = deviceCode;
if (this.enter) {
this.$refs.mapCanvas && this.$refs.mapCanvas.setCenter(this.deviceCode);
}
this.$nextTick(function() {
if (!this.enter) {
this.$refs.mapCanvas.setMap(this.$store.state.map.map);
this.enter = true;
} else {
this.$jlmap.clearTrainView();
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowMode(list, '02');
this.$store.dispatch('training/updateMapState', list);
}
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.selfJmap = Vue.prototype.$jlmap;
},
destroy() {
if (this.selfJmap) {
this.selfJmap.dispose();
}
},
goTroDialog() {
this.doClose();
this.$emit('goTroDialog');
},
changeStation(value) {
const device = this.$store.getters['map/getDeviceByCode'](this.deviceCode);
const stationSn = device.sn + value;
const station = this.stationList.find((item) => {
return item.sn === stationSn;
});
if (station) {
this.deviceCode = station.code;
this.$refs.mapCanvas && this.$refs.mapCanvas.setCenter(this.deviceCode);
}
}
}
};
</script>
<style scoped>
/deep/ .el-dialog {
background: rgba(100, 100, 100, 1);
position: relative;
border: 2px solid rgba(144, 144, 144, 0.8);
border-radius: 6px;
font-size: 14px;
}
/deep/ .el-dialog .el-dialog__body{
background: rgba(100, 100, 100, 1);
border: 0;
padding: 0;
}
/deep/ .el-dialog .el-dialog__header {
padding: 5px;
height: 30px;
}
/deep/ .el-dialog .el-dialog__title {
color: #fff;
}
/deep/ .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 4px;
right: 5px;
line-height: 16px;
}
/deep/ .el-dialog__headerbtn .el-dialog__close{
color: #fff;
}
.arrow-button{
width: 45px;
height: 30px;
cursor: pointer;
background-size: 45px 30px;
background-repeat: no-repeat;
}
.button-box{
width: 150px;
height: 35px;
display: flex;
position: absolute;
bottom: 60px;
left: calc(50% - 75px);
z-index: 9999;
justify-content: space-between;
justify-items: center;
}
</style>

View File

@ -76,6 +76,7 @@ export default {
operate: null,
concentrationStationList: [],
showMode: '02',
canvasId:'',
localStationShow: false,
previewOrMapDraw: false,
trainingSetStation: false //
@ -85,11 +86,12 @@ export default {
...mapGetters('training', [
'mode'
]),
canvasId() {
const canvasId = ['map', (Math.random().toFixed(5)) * 100000].join('_');
this.$store.dispatch('config/setCurrentCancasId', { id: canvasId });
return canvasId;
},
// canvasId() {
// // debugger;
// const canvasId = ['map', (Math.random().toFixed(5)) * 100000].join('_');
// this.$store.dispatch('config/setCurrentCancasId', { id: canvasId });
// return canvasId;
// },
width() {
return this.$store.state.config.width;
},
@ -207,6 +209,8 @@ export default {
EventBus.$on('refresh', () => {
this.refresh(this.$store.state.map.map);
});
this.canvasId = ['map', (Math.random().toFixed(5)) * 100000].join('_');
this.$store.dispatch('config/setCurrentCancasId', { id: this.canvasId });
},
mounted() {
this.initLoadPage();
@ -265,7 +269,6 @@ export default {
stateUpdate: this.handleStateUpdate
}
});
this.$jlmap.on('dataZoom', this.onDataZoom, this);
this.$jlmap.on('selected', this.onSelected, this);
this.$jlmap.on('contextmenu', this.onContextMenu, this);

View File

@ -1,7 +1,7 @@
<template>
<div id="_Tips_Start_Position" class="mapContext">
<training-tips ref="trainingTips" />
<component :is="menus" :selected="selected" />
<component :is="menus" v-if="!noMenu" :selected="selected" />
<jlmap-visual ref="jlmapVisual" @onSelect="clickEvent" @onMenu="contextmenu" />
</div>
</template>
@ -21,6 +21,12 @@ export default {
JlmapVisual,
TrainingTips
},
props: {
noMenu: {
type: Boolean,
default: false
}
},
data() {
return {
selected: null,
@ -215,6 +221,9 @@ export default {
},
setCenter(code) {
this.$refs.jlmapVisual && this.$refs.jlmapVisual.setCenter(code);
},
setMap(data) {
this.$refs.jlmapVisual && this.$refs.jlmapVisual.setMap(data);
}
}
};

View File

@ -64,6 +64,7 @@
<script>
import { saveMap, generateCI } from '@/api/jmap/mapdraft';
import { mapGetters } from 'vuex';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'Config',
components: {
@ -92,7 +93,7 @@ export default {
'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen',
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly',
'generateCycle', 'routeButton', 'likeHa1', 'getNearlySignal', 'overlapSettingByTrigger', 'generateFls', 'signalApproachNotPassPreSignal',
'generateDestination'
'generateDestination', 'ctcOverlapOnlyTurnBackStationLock'
],
multipleList: ['sharingECStations'],
selectList: [],
@ -125,7 +126,8 @@ export default {
generateFls: '是否生成侧防:是-生成侧防,不要联动道岔,否-不生成侧防,用联动道岔',
signalApproachNotPassPreSignal:'信号机接近区段不跨过前方同向信号机',
generateDestination: '是否生成目的地码定义(泰雷兹)',
sharingECStations: '共享紧急关闭效果的车站'
sharingECStations: '共享紧急关闭效果的车站',
ctcOverlapOnlyTurnBackStationLock: 'CTC列车进路延续保护仅折返站处锁闭'
}
};
},
@ -244,6 +246,7 @@ export default {
<span>生成站间运行等级数据${resp.data.stationRunlevelCount}</span>`;
instance.type = 'success';
instance.showCancelButton = false;
EventBus.$emit('successCI');
}).catch((error)=> {
if (error.code === 500045) {
this.$message.error('生成并保存联锁关系失败:地图基础信息有误');

View File

@ -13,8 +13,7 @@
<script>
import { mapGetters } from 'vuex';
import { listMap } from '@/api/jmap/mapdraft';
import { getFlankProtectionList, delFlankProtection, getFlankProtectionDetail } from '@/api/jmap/mapdraft';
import { getFlankProtectionList, delFlankProtection, getDraftMapFlsList } from '@/api/jmap/mapdraft';
export default {
name: 'RouteDetail',
@ -29,7 +28,7 @@ export default {
data() {
return {
show: false,
mapList: [],
// mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
@ -37,17 +36,13 @@ export default {
queryForm: {
labelWidth: '120px',
queryObject: {
stationCode: {
code: {
type: 'select',
label: '联锁车站',
label: '侧防code',
config: {
data: []
}
},
number: {
type: 'text',
label: '侧防编号'
},
name: {
type: 'text',
label: '侧防名称'
@ -68,22 +63,18 @@ export default {
title: '侧防code',
prop: 'code'
},
{
title: '侧防编号',
prop: 'number'
},
{
title: '地图名称',
prop: 'mapId'
},
{
title: '连锁站',
prop: 'stationCode'
},
// {
// title: '',
// prop: 'number'
// },
// {
// title: '',
// prop: 'stationCode'
// },
{
type: 'button',
title: this.$t('map.operation'),
width: '200',
width: '300',
buttons: [
{
name: this.$t('map.compile'),
@ -102,21 +93,21 @@ export default {
},
computed: {
...mapGetters('map', [
'stationList'
// 'stationList'
])
},
watch: {
stationList: function (val, old) {
const list = [];
if (val && val.length) {
for (let i = 0; i < val.length; i++) {
if (val[i].ciStation) {
list.push({ label: val[i].name, value: val[i].code });
}
}
this.queryForm.queryObject.stationCode.config.data = list;
}
}
// stationList: function (val, old) {
// const list = [];
// if (val && val.length) {
// for (let i = 0; i < val.length; i++) {
// if (val[i].ciStation) {
// list.push({ label: val[i].name, value: val[i].code });
// }
// }
// this.queryForm.queryObject.stationCode.config.data = list;
// }
// }
},
mounted() {
this.acquireMapList();
@ -143,30 +134,27 @@ export default {
return getFlankProtectionList(this.mapInfo.id, params);
}
},
acquireMapList() { //
listMap({ drawWay:true}).then(response => {
this.mapList = response.data;
acquireMapList() {
getDraftMapFlsList(this.mapInfo.id).then(response => {
this.queryForm.queryObject.code.config.data = response.data;
});
},
afterQuery(data) {
if (data && data.list) {
const that = this;
const list = data.list;
if (list) {
list.map(elem => {
that.$convertSpecifiedField(elem, that.mapList, 'id', 'name', ['mapId']);
that.$convertSpecifiedField(elem, that.stationList, 'code', 'name', ['stationCode']);
});
}
// const that = this;
// const list = data.list;
// if (list) {
// list.map(elem => {
// that.$convertSpecifiedField(elem, that.mapList, 'id', 'name', ['mapId']);
// that.$convertSpecifiedField(elem, that.stationList, 'code', 'name', ['stationCode']);
// });
// }
}
return data;
},
editObj(index, row) {
getFlankProtectionDetail(row.id).then(response => {
const data = response.data;
this.$emit('autoMaticoSelected', data);
this.doClose();
});
this.$emit('autoMaticoSelected', row);
this.doClose();
},
deleteObj(index, row) {
if (this.mapInfo && this.mapInfo.id && row) {
@ -176,7 +164,7 @@ export default {
type: 'warning'
}).then(() => {
//
delFlankProtection(row.id).then(response => {
delFlankProtection(this.mapInfo.id, row.code).then(response => {
this.$message.success(this.$t('map.successfullyDelete'));
this.$store.dispatch('map/delFlankProtectList', row);
this.reloadTable();

View File

@ -3,162 +3,132 @@
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="form" :model="addModel" :rules="rules" label-width="140px" size="mini">
<div class="definition">
<el-form-item label="编号:" prop="number">
<el-input v-model="addModel.number" style="width: 220px;" />
</el-form-item>
<el-form-item label="名称:" prop="name">
<el-input v-model="addModel.name" style="width: 220px;" />
</el-form-item>
<el-form-item label="所属联锁站:" prop="stationCode">
<el-select v-model="addModel.stationCode" clearable :filterable="true" style="width: 220px;" @change="changeStation">
<el-option
v-for="item in filterStationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'flankStationList' ? 'danger' : 'primary'"
@click="hover('flankStationList')"
>{{ $t('map.activate') }}</el-button>
<el-form-item label="侧防1线路:" prop="level1List">
<el-table :data="addModel.level1List" border style="width: 80%">
<el-table-column type="index" label="序号" width="100" />
<el-table-column fixed="right" :label="$t('map.operation')">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.prevent="deleteOverlab(addModel.level1List, scope.$index)"
>
移出
</el-button>
<el-button
type="text"
size="small"
@click.native.prevent="editOverlab(addModel.level1List, scope.$index, 'level1List')"
>
编辑
</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<div style="height: 100%; position: relative; left: 8%; width: 88%; margin-bottom: 20px;">
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<span style="font-size: 12px;">等级1</span>
</div>
<div style="margin-top: 8px;">
<el-form-item label="侧防道岔:">
<el-select v-model="addModel.level1.protectSwitch.switchCode" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in switchList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-form-item label="侧防2线路:" prop="level2List">
<el-table :data="addModel.level2List" border style="width: 80%">
<el-table-column type="index" label="序号" width="100" />
<el-table-column fixed="right" :label="$t('map.operation')">
<template slot-scope="scope">
<el-button
:type=" field === 'flankSwitchLevel1' ? 'danger' : 'primary'"
@click="hover('flankSwitchLevel1')"
>{{ $t('map.activate') }}</el-button>
<el-select v-model="addModel.level1.protectSwitch.normal" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in SwitchLocateTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="侧防信号机:">
<el-select v-model="addModel.level1.protectSignal" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in signalList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
type="text"
size="small"
@click.native.prevent="deleteOverlab(addModel.level2List, scope.$index)"
>
移出
</el-button>
<el-button
:type=" field === 'flankSingalLevel1' ? 'danger' : 'primary'"
@click="hover('flankSingalLevel1')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="侧防区域元件:">
<el-select v-model="addModel.level1.areaSwitch.switchCode" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in switchList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'flankAreaSwitchLevel1' ? 'danger' : 'primary'"
@click="hover('flankAreaSwitchLevel1')"
>{{ $t('map.activate') }}</el-button>
<el-select v-model="addModel.level1.areaSwitch.normal" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in SwitchLocateTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
</div>
</el-card>
</div>
<div style="height: 100%; position: relative; left: 8%; width: 88%">
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<span style="font-size: 12px;">等级2</span>
</div>
<div style="margin-top: 8px;">
<el-form-item label="侧防道岔:">
<el-select v-model="addModel.level2.protectSwitch.switchCode" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in switchList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'flankSwitchLevel2' ? 'danger' : 'primary'"
@click="hover('flankSwitchLevel2')"
>{{ $t('map.activate') }}</el-button>
<el-select v-model="addModel.level2.protectSwitch.normal" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in SwitchLocateTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="侧防信号机:">
<el-select v-model="addModel.level2.protectSignal" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in signalList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'flankSingalLevel2' ? 'danger' : 'primary'"
@click="hover('flankSingalLevel2')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="侧防区域元件:">
<el-select v-model="addModel.level2.areaSwitch.switchCode" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in switchList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'flankAreaSwitchLevel2' ? 'danger' : 'primary'"
@click="hover('flankAreaSwitchLevel2')"
>{{ $t('map.activate') }}</el-button>
<el-select v-model="addModel.level2.areaSwitch.normal" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in SwitchLocateTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
</div>
</el-card>
</div>
type="text"
size="small"
@click.native.prevent="editOverlab(addModel.level2List, scope.$index, 'level2List')"
>
编辑
</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</div>
</el-form>
<div style="height: 100%; position: relative; left: 8%; width: 88%; margin-bottom: 20px;">
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<span style="font-size: 14px;">{{ cardTitle }}</span>
<el-button v-if="cardMode === 'generate'" style="float: right; padding: 3px 0;" type="text" @click="handleLevel('level1List')">生成等级1</el-button>
<el-button v-if="cardMode === 'generate'" style="float: right; padding: 3px 0; margin-right: 10px;" type="text" @click="handleLevel('level2List')">生成等级2</el-button>
<el-button-group v-else-if=" cardMode === 'edit'" style="float: right;">
<el-button type="text" style="padding:3px 3px" @click="updateOverlab">修改</el-button>
<el-button type="text" style="padding:3px 0" @click="cancelOverlab">取消</el-button>
</el-button-group>
</div>
<div>
<el-form ref="overlabForm" :model="addModelFlank" :rules="overLapRules" label-width="135px" size="mini" style="margin-top: 15px">
<el-form-item label="侧防道岔:">
<el-select v-model="addModelFlank.protectSwitch.switchCode" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in switchList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'flankSwitchLevel' ? 'danger' : 'primary'"
@click="hover('flankSwitchLevel')"
>{{ $t('map.activate') }}</el-button>
<el-select v-model="addModelFlank.protectSwitch.normal" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in SwitchLocateTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="侧防信号机:">
<el-select v-model="addModelFlank.protectSignal" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in signalList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'flankSingalLevel' ? 'danger' : 'primary'"
@click="hover('flankSingalLevel')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="侧防区域元件:">
<el-select v-model="addModelFlank.areaSwitch.switchCode" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in switchList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'flankAreaSwitchLevel' ? 'danger' : 'primary'"
@click="hover('flankAreaSwitchLevel')"
>{{ $t('map.activate') }}</el-button>
<el-select v-model="addModelFlank.areaSwitch.normal" clearable filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in SwitchLocateTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-form>
</div>
</el-card>
</div>
<div class="draft">
<el-button-group>
<el-button v-if="isSave" type="primary" size="small" :loading="loading" @click="save">保存侧防</el-button>
@ -171,7 +141,8 @@
<script>
import { mapGetters } from 'vuex';
import { setUID } from '@/jmapNew/utils/Uid';
import { getFlankProtectionList, postFlankProtection, putFlankProtection } from '@/api/jmap/mapdraft';
import { postFlankProtection, putFlankProtection } from '@/api/jmap/mapdraft';
import { deepAssign } from '@/utils/index';
export default {
name: 'RouteOperation',
@ -208,56 +179,49 @@ export default {
code: '',
mapId: '',
id: '',
number: '',
stationCode: '',
name: '',
level1: {
protectSwitch: {
switchCode: '',
normal: ''
},
protectSignal: '',
areaSwitch: {
switchCode: '',
normal: ''
}
source: {},
level1List: [],
level2List: []
},
addModelFlank: {
protectSwitch: {
switchCode: '',
normal: ''
},
level2: {
protectSwitch: {
switchCode: '',
normal: ''
},
protectSignal: '',
areaSwitch: {
switchCode: '',
normal: ''
}
protectSignal: '',
areaSwitch: {
switchCode: '',
normal: ''
}
},
parentIndex: 0,
editShow: false,
overLapRules: {
},
levelList: '',
rules: {
stationCode: [
{ required: true, message: '请选择所属连锁站', trigger: 'change' }
],
number: [
{ required: true, message: '请输入编号', trigger: 'blur' }
],
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
]
}
},
cardMode: 'generate'
};
},
computed: {
...mapGetters('map', [
'stationList',
'switchList',
'signalList'
]),
filterStationList() { //
return this.stationList.filter(station=>{
return station.ciStation;
});
cardTitle() {
if (this.cardMode === 'generate') {
return '生成侧防线路';
} else if (this.cardMode === 'edit') {
return '编辑侧防线路';
} else {
return '';
}
}
},
watch: {
@ -268,8 +232,15 @@ export default {
},
routeData(val, old) {
if (val) {
// console.log(this, this.$copyClone);
this.addModel = this.$copyClone(this.addModel, val);
this.addModel = {
code: val.code,
mapId: val.mapId,
id: val.id,
name: val.name,
source: JSON.parse(JSON.stringify(val.source)),
level1List: JSON.parse(JSON.stringify(val.level1List)),
level2List: JSON.parse(JSON.stringify(val.level2List))
};
this.editShow = true;
}
}
@ -283,48 +254,19 @@ export default {
setSelected(selected) {
if (selected) {
if (selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
if (this.field.toUpperCase() === 'flankSingalLevel1'.toUpperCase()) {
this.addModel.level1.protectSignal = selected.code;
} else if (this.field.toUpperCase() === 'flankSingalLevel2'.toUpperCase()) {
this.addModel.level2.protectSignal = selected.code;
if (this.field.toUpperCase() === 'flankSingalLevel'.toUpperCase()) {
this.addModelFlank.protectSignal = selected.code;
}
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'flankStationList'.toUpperCase()) {
this.addModel.stationCode = selected.code;
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
if (this.field.toUpperCase() === 'flankSwitchLevel1'.toUpperCase()) {
this.addModel.level1.protectSwitch.switchCode = selected.code;
} else if (this.field.toUpperCase() === 'flankSwitchLevel2'.toUpperCase()) {
this.addModel.level2.protectSwitch.switchCode = selected.code;
} else if (this.field.toUpperCase() === 'flankAreaSwitchLevel1'.toUpperCase()) {
this.addModel.level1.areaSwitch.switchCode = selected.code;
} else if (this.field.toUpperCase() === 'flankAreaSwitchLevel2'.toUpperCase()) {
this.addModel.level2.areaSwitch.switchCode = selected.code;
if (this.field.toUpperCase() === 'flankSwitchLevel'.toUpperCase()) {
this.addModelFlank.protectSwitch.switchCode = selected.code;
} else if (this.field.toUpperCase() === 'flankAreaSwitchLevel'.toUpperCase()) {
this.addModelFlank.areaSwitch.switchCode = selected.code;
}
}
this.field = '';
}
},
async changeStation(code) {
if (code) {
const params = {
stationCode: code,
number: '',
name: '',
pageSize: 999,
pageNum: 1
};
const res = await getFlankProtectionList(this.mapInfo.id, params);
if (res.data.list.length) {
let num = 0;
res.data.list.forEach(elem => {
if (Number(elem.number) > num) {
num = Number(elem.number);
}
});
this.addModel.number = num + 1;
}
}
},
buildModel(code) {
const model = Object.assign({}, this.addModel);
if (code) { model['code'] = code; }
@ -343,7 +285,6 @@ export default {
this.$message.success('保存成功');
this.loading = false;
this.clear();
this.changeStation(dataModel.stationCode);
}).catch(() => {
this.$messageBox('保存失败');
this.loading = false;
@ -355,13 +296,10 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
this.loading = true;
const data = this.buildModel();
putFlankProtection(data).then(resp => {
const dataModel = JSON.parse(JSON.stringify(data));
putFlankProtection(this.mapInfo.id, this.addModel).then(resp => {
this.$message.success('更新成功');
this.loading = false;
this.clear();
this.changeStation(dataModel.stationCode);
}).catch(() => {
this.$messageBox('更新失败');
this.loading = false;
@ -371,39 +309,71 @@ export default {
},
clear() {
if (this.$refs && this.$refs.form && this.mapInfo) {
// this.$refs.form.resetFields();
this.addModel = {
code: '',
mapId: '',
id: '',
number: '',
name: '',
stationCode: this.addModel.stationCode,
level1: {
protectSwitch: {
switchCode: '',
normal: ''
},
protectSignal: '',
areaSwitch: {
switchCode: '',
normal: ''
}
},
level2: {
protectSwitch: {
switchCode: '',
normal: ''
},
protectSignal: '',
areaSwitch: {
switchCode: '',
normal: ''
}
}
level1List: [],
level2List: []
};
this.isSave = true;
}
},
deleteOverlab(list, index) {
list.splice(index, 1);
this.clearOverlab();
this.cardMode = 'generate';
this.levelList = '';
},
editOverlab(list, index, level) {
this.addModelFlank = deepAssign(this.addModelFlank, list[index]);
this.parentIndex = index;
this.cardMode = 'edit';
this.levelList = level;
},
updateOverlab() {
if (this.addModelFlank.protectSwitch.switchCode || this.addModelFlank.protectSignal) {
this.addModel[this.levelList][this.parentIndex] = {
protectSwitch: this.addModelFlank.protectSwitch,
protectSignal: this.addModelFlank.protectSignal,
areaSwitch: this.addModelFlank.areaSwitch
};
this.clearOverlab();
this.cardMode = 'generate';
this.levelList = '';
}
},
cancelOverlab() {
this.clearOverlab();
this.cardMode = 'generate';
this.levelList = '';
},
handleLevel(level) {
if (!this.addModelFlank.protectSwitch.switchCode || !this.addModelFlank.protectSignal) {
this.$messageBox('请选择侧防等级信息!');
} else {
this.addModel[level].push({
protectSwitch: this.addModelFlank.protectSwitch,
protectSignal: this.addModelFlank.protectSignal,
areaSwitch: this.addModelFlank.areaSwitch
});
this.clearOverlab();
}
},
clearOverlab() {
this.addModelFlank = {
protectSwitch: {
switchCode: '',
normal: ''
},
protectSignal: '',
areaSwitch: {
switchCode: '',
normal: ''
}
};
}
}
};

View File

@ -104,10 +104,10 @@ export default {
{label: this.$t('map.routeID'), name:'route', menus:RouteOperate},
{label: '延续保护', name: 'overlap', menus: ContinueProtectOperate},
{label: this.$t('map.signalApprochSection'), name:'signal', menus:SignalOperate}, //
{label: '侧防', name:'flankProtect', menus:FlankProtectOperate},
{label: '自动折返', name:'turned', menus:TurnedOperate},
{label: '目的地码', name:'destination', menus:DestinationOperate},
{label: this.$t('map.automaticSignal'), name:'automatic', menus:AutomaticOperate},
{label: '侧防', name:'flankProtect', menus:FlankProtectOperate},
{label: this.$t('map.routing'), name:'routing', menus:RoutingOperate},
{label: '停站时间', name:'dwellTime', menus:DwellTimeOperate},
{label: '设置运行等级', name:'runLevel', menus:RunLevelOperate}

View File

@ -22,6 +22,7 @@ import { listMap, getRouteNewList, delRouteNew, putRouteNew, putSetDraftMapRoute
// import ProtectDetail from './protectDetail';
import PreViewField from './preview';
import Related from './related';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'RouteDetail',
@ -257,6 +258,9 @@ export default {
});
this.acquireMapList();
this.initProtectData();
EventBus.$on('successCI', () => {
this.initProtectData();
});
},
methods: {
doShow(showType, codeType) {

View File

@ -166,6 +166,7 @@
import { mapGetters } from 'vuex';
import { getRouteNewList, getFlankProtectionList, getOverlapAllList, putSetDraftMapRouteById } from '@/api/jmap/mapdraft';
import HostileData from './hostileData';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'RouteOperation',
@ -337,6 +338,9 @@ export default {
this.getRouteList();
this.getFlankProtectList();
this.initProtectData();
EventBus.$on('successCI', () => {
this.initProtectData();
});
},
methods: {
initLoad() { //