tro 轨道总览

This commit is contained in:
fan 2021-05-18 13:36:06 +08:00
parent 4b83445624
commit df68e9a969
10 changed files with 169 additions and 101 deletions

View File

@ -1,3 +1,3 @@
# jl-nclient
showMode 01 行调&现地;02 行调; 03 现地; 04 大屏; 05 轨道预览;
Copyright (c) 2018-present Joylink

View File

@ -81,6 +81,8 @@ class SkinCode extends defaultStyle {
line: {
z: 0,
width: 5, // 区段宽度
troWidth: 2, // 轨道总览区段宽度
troColor: '#c0c0c0', // 轨道总览区段颜色
beyondWidth: 0, // 区段宽超出宽度
invadeColor: '#EF0C08', // 区段侵入颜色
routeBlockFlashing: true, // 进路锁闭且封锁时闪烁
@ -262,7 +264,7 @@ class SkinCode extends defaultStyle {
fillColorVirtual: '#000080',
sideLength: 20,
textColor: '#fff',
strokeColor: '#00FFFF',
strokeColor: '#00FFFF'
}
};

View File

@ -14,7 +14,6 @@ import ELimitName from './ELimitName'; // 成都三号线 限速名称
import { drawSectionStyle } from '../../config/defaultStyle';
import EStopRouteImg from './EStopRouteImg';
import EBadShunt from './EBadShunt';
import store from '@/store/index';
const exec = (f, ...args) => { f && f(...args); };
const DerailerMap = {
@ -48,7 +47,7 @@ const DerailerMap = {
derailer.setTextStyle({textFill: 'red'});
derailer.setSymbolStyle({fill: 'gray'});
}
}
};
/** 区段*/
export default class Section extends Group {
@ -67,6 +66,7 @@ export default class Section extends Group {
this.create();
this.createMouseEvent();
this.setState(model);
this.setShowMode();
}
create() {
@ -573,7 +573,14 @@ export default class Section extends Group {
mouseover() {
this.line && this.line.setStyle({ stroke: 'rgba(255,255,255,0.8)' });
}
setShowMode() { }
setShowMode() {
if (this.model.showMode === '05') {
this.line.setStyle({stroke: this.style.Section.line.troColor, lineWidth: this.style.Section.line.troWidth});
if (this.model.type === '05') {
this.line.hide();
}
}
}
setShowStation(stationCode) {
if (!stationCode || this.model.stationCode === stationCode) {
this.eachChild(item => {

View File

@ -31,6 +31,7 @@ export default class Switch extends Group {
this.createMouseEvent();
this.setState(model);
this.checkIsDrawMap();
this.setShowMode();
}
createMouseEvent() {
@ -722,7 +723,7 @@ export default class Switch extends Group {
// this.interlockingReserved(); // 联锁预留道岔
model.preReset && this.preReset(model.normalPosition, model.reversePosition); // 道岔预复位
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
if (this.style.Switch.sectionAction.flag && this.model.showMode !== '05') { // 哈尔滨线路处理道岔相关区段颜色
const switchModel = this.mapDevice[model.code];
const sectionB = this.mapDevice[switchModel.sectionBCode];
sectionB && sectionB.instance && sectionB.instance.setState(sectionB);
@ -797,7 +798,13 @@ export default class Switch extends Group {
this.on('mouseover', () => { this.highlight.mouseover(); });
}
}
setShowMode() {}
setShowMode() {
if ( this.model.showMode === '05') {
this.eachChild(item => {
item.hide();
});
}
}
setShowStation(stationCode) {
if (!stationCode || this.model.stationCode === stationCode) {
this.eachChild(item => {

View File

@ -79,7 +79,7 @@
<el-button size="mini" plain :disabled="trainOperateType==='update'" @click="handleTrainOperate('update')">车次号修改</el-button>
<el-button size="mini" plain :disabled="trainOperateType==='delete'" @click="handleTrainOperate('delete')">车次号删除</el-button>
<el-button size="mini" plain :disabled="trainOperateType==='create'" @click="handleTrainOperate('create')">车次号创建</el-button>
<el-button size="mini" plain :disabled="trainOperateType==='move'" @click="handleTrainOperate('create')">车次号步进</el-button>
<el-button size="mini" plain :disabled="trainOperateType==='move'" @click="handleTrainOperate('move')">车次号步进</el-button>
</div>
</el-row>
<el-row style="height: 25px;line-height: 25px;border-top: 2px solid #7E8076;border-left: 2px solid #6A6B64;border-right: 2px solid #FBFBFA;">

View File

@ -2,7 +2,6 @@
<div
ref="jlmapCanvas"
class="jlmap-canvas"
style="width: 100%;height:960px;"
>
<div :id="canvasId" class="display_canvas" />
</div>
@ -10,10 +9,10 @@
<script>
import Jlmap from '@/jmapNew/map';
import { parser } from '@/jmapNew/utils/parser';
import { deepAssign } from '@/utils/index';
import deviceType from '@/jmapNew/constant/deviceType';
import { mapGetters } from 'vuex';
import { parser } from '@/jmapNew/utils/parser';
export default {
name: 'JLocalmapVisual',
@ -41,7 +40,7 @@ export default {
'bigScreenConfig'
]),
width() {
return this.$store.state.app.width - 40;
return this.$store.state.app.width - 30;
},
height() {
return this.$store.state.app.height - 60;
@ -58,7 +57,6 @@ export default {
}
},
created() {
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map));
},
mounted() {
this.init();
@ -102,12 +100,15 @@ export default {
return false;
};
if (this.mapData.skinVO) {
this.mapDevice = parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
}
},
loadData() {
loadData(mapData, showMode) {
try {
this.mapData = mapData;
if (this.mapData.skinVO) {
const config = this.map.getShowConfig();
config.showMode = showMode;
this.mapDevice = parser(this.mapData, this.mapData.skinVO.code, config);
}
this.setMap(this.mapData, this.mapDevice);
} catch (error) {
console.log('[ERROR] ', error);
@ -122,9 +123,7 @@ export default {
routeData: this.routeData,
autoReentryData: this.autoReentryData
});
setTimeout(() => {
this.handleUpdateScreen();
}, 2000);
} else {
this.mapDevice = {};
this.map.clear();
@ -132,7 +131,6 @@ export default {
},
handleUpdateScreen() {
this.maskOpen = false;
console.log(this.bigScreenConfig, '--0000');
if (this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length) {
const offsetList = this.bigScreenConfig.offsetList;
const width = this.bigScreenConfig.width;
@ -144,7 +142,6 @@ export default {
list: this.bigScreenConfig.bigScreenSplitConfig.map(ele => ele.position),
offsetList: offsetList
};
console.log(size, '=----1');
this.map.setUpdateScreen(size);
} else {
const size = {
@ -153,7 +150,6 @@ export default {
list: this.bigScreenConfig.bigScreenSplitConfig.map(ele => ele.position),
offsetList: offsetList
};
console.log(size, '=----');
this.map.setUpdateScreen(size);
}
} else {

View File

@ -1,7 +1,7 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm"
:modal="false"
:title="title"
:visible.sync="show"
:fullscreen="true"
@ -13,50 +13,20 @@
</template>
<script>
import { mapGetters } from 'vuex';
import MapVisual from './mapVisual';
export default {
name: 'TrainMove',
name: 'RPS',
components: {
MapVisual
},
data() {
return {
trainNoList: [],
addModel: {
tripNumber: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: ''
},
rules: {
tripNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
],
trainSource: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandSource: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
],
trainGoal: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
]
},
dialogShow: false,
loading: false
mapData: null
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -65,10 +35,11 @@ export default {
}
},
methods: {
doShow(operate, selected) {
doShow() {
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.map.loadData(this.mapData);
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map));
this.$refs.map.loadData(this.mapData, '02');
});
},
doClose() {
@ -82,11 +53,14 @@ export default {
</script>
<style scoped>
/deep/ .el-dialog {
background: rgba(100, 100, 100, 1);
background: rgba(100, 100, 100, 1) !important;
position: relative;
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
/deep/ .el-dialog .el-dialog__body{
background: rgba(100, 100, 100, 1) !important;
border: 0 !important;
}
</style>

View File

@ -0,0 +1,76 @@
<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" />
</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, '05');
});
},
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

@ -93,7 +93,7 @@
<div>
<div class="div-simulate-button" style="width: 40px;" @click="rpsClick">背投</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;" @click="troClick">轨道</div>
<div class="div-simulate-button" style="width: 40px;">系统</div>
<div class="div-simulate-button" style="width: 40px;">列车</div>
</div>
@ -171,6 +171,7 @@
<train-control ref="trainControl" :offset="10" />
<log-detail ref="logDetail" />
<rps-dialog ref="rpsDialog" />
<tro-dialog ref="troDialog" />
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
<source :src="buzzerAudio" type="audio/mpeg">
</audio>
@ -187,6 +188,7 @@ import AlarmTableHmi from './menuDialog/alarmTableHmi';
import AlarmTableLow from './menuDialog/alarmTableLow';
import TrainControl from './dialog/trainControl';
import RpsDialog from './dialog/rps';
import TroDialog from './dialog/tro';
import LogDetail from './menuDialog/logDetail';
export default {
@ -196,7 +198,8 @@ export default {
AlarmTableHmi,
TrainControl,
LogDetail,
RpsDialog
RpsDialog,
TroDialog
},
props: {
selected: {
@ -483,6 +486,9 @@ export default {
rpsClick() {
this.$refs.rpsDialog.doShow();
},
troClick() {
this.$refs.troDialog.doShow();
},
controlAudio(val) {
const audio = document.getElementById('buzzer');
this.sound = val;

View File

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