西安三号线调整
This commit is contained in:
parent
18054e5001
commit
bb37c6ebbb
@ -418,6 +418,8 @@ class Jlmap {
|
||||
if (elem.deviceType === 'TRAIN') {
|
||||
store.dispatch('map/updateTrainState', elem);
|
||||
store.dispatch('map/setTrainListUpdate', elem);
|
||||
} else if (elem.deviceType === 'STAND') {
|
||||
store.dispatch('map/updateStationStand', elem);
|
||||
}
|
||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||
if (elem.dispose) {
|
||||
|
@ -344,10 +344,10 @@ export default class TrainBody extends Group {
|
||||
this.delayTime && this.delayTime.setStyle({textFill: this.style.Train.soonerOrLater.normalColor});
|
||||
}
|
||||
} else if (this.style.Train.soonerOrLater && this.style.Train.soonerOrLater.level === 3) {
|
||||
if (dt > 0) {
|
||||
if (dt > 120) {
|
||||
this.style.Train.soonerOrLater.serviceNumber && this.textTrainServer && this.textTrainServer.setStyle({textFill: this.style.Train.soonerOrLater.earlyColor});
|
||||
this.style.Train.soonerOrLater.trainBody && this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.earlyColor});
|
||||
} else if (dt < 0) {
|
||||
} else if (dt < -120) {
|
||||
this.style.Train.soonerOrLater.serviceNumber && this.textTrainServer && this.textTrainServer.setStyle({textFill: this.style.Train.soonerOrLater.lateColor});
|
||||
this.style.Train.soonerOrLater.trainBody && this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.lateColor});
|
||||
} else {
|
||||
|
@ -25,8 +25,8 @@
|
||||
@change="trainTypeChange"
|
||||
>
|
||||
<el-radio :label="'PLAN'">{{ $t('menu.planTrain') }}</el-radio>
|
||||
<el-radio :label="'MANUAL'">{{ $t('menu.headCodeTrain') }}</el-radio>
|
||||
<el-radio :label="'HEAD'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
|
||||
<el-radio :label="'HEAD'">{{ $t('menu.headCodeTrain') }}</el-radio>
|
||||
<el-radio :label="'MANUAL'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formModel.type == 'PLAN'" prop="serviceNumber">
|
||||
@ -37,14 +37,14 @@
|
||||
:disabled="serverNoIsDisabled"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formModel.type == 'PLAN'|| formModel.type == 'MANUAL'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
|
||||
<el-form-item v-if="formModel.type == 'PLAN'|| formModel.type == 'HEAD'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
|
||||
<el-input
|
||||
:id="domIdTrainNo"
|
||||
v-model="formModel.tripNumber"
|
||||
maxlength="4"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formModel.type == 'PLAN' || formModel.type == 'MANUAL'" :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="destinationCode">
|
||||
<el-form-item v-if="formModel.type == 'PLAN' || formModel.type == 'HEAD'" :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="destinationCode">
|
||||
<el-input
|
||||
:id="domIdTargetCode"
|
||||
v-model="formModel.destinationCode"
|
||||
|
@ -67,10 +67,10 @@
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<div class="deviceStatus">
|
||||
<div class="holdTrainStatus">H</div>
|
||||
<div class="jumpStopStatus">S</div>
|
||||
</div>
|
||||
<!--<div class="deviceStatus">-->
|
||||
<!--<div class="holdTrainStatus">H</div>-->
|
||||
<!--<div class="jumpStopStatus">S</div>-->
|
||||
<!--</div>-->
|
||||
<station-control-convert ref="stationControlConvert" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
@ -698,8 +698,7 @@ export default {
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$width: 30px;
|
||||
$lineHeight: 30px;
|
||||
$height:74px;
|
||||
$height:30px;
|
||||
$menuPadding: 10px;
|
||||
$menuItemHeight: 30px;
|
||||
$menuItemWidth: 190px;
|
||||
@ -710,7 +709,7 @@ export default {
|
||||
position: absolute;
|
||||
width: inherit;
|
||||
height: $height;
|
||||
line-height: $lineHeight;
|
||||
line-height: $height;
|
||||
}
|
||||
|
||||
.nav {
|
||||
|
@ -209,7 +209,11 @@ const map = {
|
||||
showCentralizedStationCode: '', // 现地分集中站显示(集中站code)
|
||||
showCentralizedStationNum: 0, // 现地分集中站显示判断
|
||||
overlapList: [], // 延续保护list
|
||||
overlapData: {} // 延续保护数据
|
||||
overlapData: {}, // 延续保护数据
|
||||
holdStandList: [], // 扣车站台列表
|
||||
holdStatus: false, // 是否有扣车状态
|
||||
jumpStandList: [], // 跳停站台列表
|
||||
jumpStatus: false // 是否有跳停状态
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -751,6 +755,23 @@ const map = {
|
||||
updateTrainState:(state, status) =>{
|
||||
state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1] || {}, status);
|
||||
},
|
||||
updateStationStand: (state, status) => {
|
||||
const holdIndex = state.holdStandList.indexOf(status.code);
|
||||
const jumpIndex = state.jumpStandList.indexOf(status.code);
|
||||
if ((status.stationHoldTrain || status.centerHoldTrain) && holdIndex < 0) {
|
||||
state.holdStandList.push(status.code);
|
||||
} else if (!(status.stationHoldTrain && status.centerHoldTrain) && holdIndex > -1) {
|
||||
state.holdStandList.splice(holdIndex, 1);
|
||||
}
|
||||
state.holdStatus = state.holdStandList.length > 0;
|
||||
if ((status.assignSkip || status.allSkip) && jumpIndex < 0) {
|
||||
state.jumpStandList.push(status.code);
|
||||
} else if (!(status.assignSkip && status.allSkip) && jumpIndex > -1) {
|
||||
state.jumpStandList.splice(jumpIndex, 1);
|
||||
}
|
||||
state.jumpStatus = state.jumpStandList.length > 0;
|
||||
console.log(state.jumpStatus, state.jumpStandList, state.holdStandList, state.holdStatus);
|
||||
},
|
||||
setMapVersion:(state, version) => {
|
||||
state.version = version;
|
||||
},
|
||||
@ -819,6 +840,9 @@ const map = {
|
||||
updateTrainState:({ commit }, status) => {
|
||||
commit('updateTrainState', status);
|
||||
},
|
||||
updateStationStand: ({ commit }, status) => {
|
||||
commit('updateStationStand', status);
|
||||
},
|
||||
getRouteDataListByCode: ({ state, commit }, code) => { // 获取进路数据
|
||||
return new Promise((resolve) => {
|
||||
const list = [];
|
||||
|
82
src/views/components/StatusIcon/statusIcon.vue
Normal file
82
src/views/components/StatusIcon/statusIcon.vue
Normal file
@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<div class="icon-box" :style="{top: offset+'px'}">
|
||||
<div class="textStatus" :style="{background: holdBackground}">H</div>
|
||||
<div class="textStatus" :style="{background: jumpBackground}">S</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'StatusIcon',
|
||||
data() {
|
||||
return {
|
||||
offset: 15,
|
||||
holdBackground: '#807D8E',
|
||||
jumpBackground: '#807D8E'
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.holdStatus': function (val) {
|
||||
console.log(val, '-----------');
|
||||
if (val) {
|
||||
this.holdBackground = '#F00';
|
||||
} else {
|
||||
this.holdBackground = '#807D8E';
|
||||
}
|
||||
},
|
||||
'$store.state.map.jumpStatus': function (val) {
|
||||
if (val) {
|
||||
this.jumpBackground = '#F00';
|
||||
} else {
|
||||
this.jumpBackground = '#807D8E';
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setPosition();
|
||||
},
|
||||
methods: {
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
let offset = 30;
|
||||
const menuBar = document.getElementById('menuBar');
|
||||
const menuTool = document.getElementById('menuTool');
|
||||
if (menuBar) {
|
||||
offset = (menuBar.offsetHeight || 0);
|
||||
}
|
||||
|
||||
if (menuTool) {
|
||||
offset = (menuTool.offsetHeight || 0);
|
||||
}
|
||||
if (this.offset !== offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.icon-box {
|
||||
z-index: 7;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 120px;
|
||||
height: 58px;
|
||||
background: rgb(224, 223, 223);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
}
|
||||
.textStatus {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
margin: 4px;
|
||||
background: #807D8E;
|
||||
color: #C9A167;
|
||||
}
|
||||
</style>
|
@ -4,6 +4,7 @@
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<map-system-draft ref="mapCanvas" @back="back" />
|
||||
</transition>
|
||||
<status-icon v-if="$route.query.lineCode == '11' || $route.query.lineCode == '10'" ref="statusIcon" />
|
||||
<menu-exam
|
||||
v-if="isExam"
|
||||
ref="menuExam"
|
||||
@ -108,6 +109,7 @@ import Vue from 'vue';
|
||||
import LeftSlider from '@/views/newMap/displayNew/LeftSlider';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import MenuTrainList from '@/views/newMap/displayNew/menuTrainList';
|
||||
import StatusIcon from '@/views/components/StatusIcon/statusIcon';
|
||||
|
||||
// 三维
|
||||
// import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||
@ -130,7 +132,8 @@ export default {
|
||||
Jl3dDrive,
|
||||
Jl3dDevice,
|
||||
Scheduling,
|
||||
LeftSlider
|
||||
LeftSlider,
|
||||
StatusIcon
|
||||
},
|
||||
props: {
|
||||
size: {
|
||||
|
@ -38,7 +38,7 @@ export default {
|
||||
methods: {
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
let offset = 15;
|
||||
let offset = this.$route.path.includes('displayNew') && (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) ? 73 : 15;
|
||||
const menuBar = document.getElementById('menuBar');
|
||||
const menuTool = document.getElementById('menuTool');
|
||||
if (menuBar) {
|
||||
|
@ -6,19 +6,19 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Tip',
|
||||
props: {
|
||||
tip: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaultFontSize: 14
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
name: 'Tip',
|
||||
props: {
|
||||
tip: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaultFontSize: 14
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user