成都一号线 列车所在区段位置代码调整(部分)

This commit is contained in:
joylink_cuiweidong 2020-03-06 15:27:31 +08:00
parent 93be0b7ff6
commit 4c02e416bc
11 changed files with 38 additions and 4 deletions

View File

@ -135,6 +135,9 @@ class SkinCode extends defaultStyle {
},
block: {
special: false, // 区段特殊显示
},
trainPosition:{
display: false // 列车实时位置显示
}
};

View File

@ -135,6 +135,9 @@ class SkinCode extends defaultStyle {
},
block: {
special: false, // 区段特殊显示
},
trainPosition:{
display: true // 列车实时位置显示
}
};

View File

@ -138,6 +138,9 @@ class SkinCode extends defaultStyle {
},
block: {
special: false, // 区段特殊显示
},
trainPosition:{
display: false // 列车实时位置显示
}
};

View File

@ -128,6 +128,9 @@ class SkinCode extends defaultStyle {
},
block: {
special: false, // 区段特殊显示
},
trainPosition:{
display: false // 列车实时位置显示
}
};

View File

@ -128,6 +128,9 @@ class SkinCode extends defaultStyle {
},
block: {
special: true, // 区段特殊显示
},
trainPosition:{
display: false // 列车实时位置显示
}
};

View File

@ -136,6 +136,9 @@ class SkinCode extends defaultStyle {
block: {
special: false, // 区段特殊显示
blockGlint: true, // 区段封锁闪烁显示
},
trainPosition:{
display: false // 列车实时位置显示
}
};

View File

@ -148,7 +148,7 @@ class Painter {
try {
if (device._dispose) {
this.delete(device);
} else if (deviceType.Train == device._type) {
} else if (deviceType.Train.toUpperCase() == device.deviceType) {
this.updateTrain(device);
} else {
const instance = device.instance;

View File

@ -3,6 +3,8 @@ import TrainHead from './TrainHead';
import TrainBody from './TrainBody';
import BoundingRect from 'zrender/src/core/BoundingRect';
import Rect from 'zrender/src/graphic/shape/Rect';
import { deepAssign } from '@/utils/index';
import store from '@/store';
/** 列车 */
export default class Train extends Group {
@ -115,6 +117,18 @@ export default class Train extends Group {
getShapeTipPoint() {
}
updateSection() {
const train = this.model;
if (train.physicalCode && train.offsetp) {
const data = train.physicalCode;
const oldmodel = store.getters['map/getDeviceByCode'](data);
let models = [];
const model = deepAssign(oldmodel, {_type: 'Section'}); // 修改元素model
models = [model];
store.dispatch('map/updateMapDevices', models);
}
}
// 恢复颜色状态
recover() {
this.trainB && this.trainB.setHShow(false);
@ -309,6 +323,11 @@ export default class Train extends Group {
this.setCommunicationStatus(model.runLevel);
// this.setTrainTypeStatus(model.type); 配合早晚点设置
this.setDoorStatus(model.doorCloseLock);
const style = this.style;
if (style.Section.trainPosition.display) {
this.updateSection();
}
}
// let points = [];
// if (model) {

View File

@ -153,7 +153,6 @@ export default {
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
debugger;
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {

View File

@ -191,7 +191,6 @@ export default {
break;
}
case OperationEvent.Switch.lock.button.operation: {
debugger;
//
if (!selectType.singleLock) {
this.lock(selectType);

View File

@ -388,7 +388,6 @@ export default {
this.stationName = station.name;
}
}
debugger;
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.radio = selected.direction;
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {