Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
ace50b3e50
@ -255,4 +255,9 @@ deviceRender[deviceType.StationTurnBack] = {
|
|||||||
_type: deviceType.StationTurnBack,
|
_type: deviceType.StationTurnBack,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
};
|
};
|
||||||
|
// 延时保护计时
|
||||||
|
deviceRender[deviceType.OverAp] = {
|
||||||
|
_type: deviceType.OverAp,
|
||||||
|
zlevel: 1
|
||||||
|
};
|
||||||
export default deviceRender;
|
export default deviceRender;
|
||||||
|
@ -44,7 +44,8 @@ const deviceType = {
|
|||||||
SwitchFault: 'SwitchFault',
|
SwitchFault: 'SwitchFault',
|
||||||
Arrow: 'Arrow',
|
Arrow: 'Arrow',
|
||||||
Power: 'Power',
|
Power: 'Power',
|
||||||
StationTurnBack: 'StationTurnBack'
|
StationTurnBack: 'StationTurnBack',
|
||||||
|
OverAp: 'OverAp'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default deviceType;
|
export default deviceType;
|
||||||
|
@ -425,6 +425,21 @@ class Jlmap {
|
|||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
signalDeviceList.push(signalDevice);
|
signalDeviceList.push(signalDevice);
|
||||||
}
|
}
|
||||||
|
} else if (elem.deviceType == 'OVERLAP') {
|
||||||
|
const overlapRoute = store.state.map.overlapData[elem.code];
|
||||||
|
const model = this.mapDevice[overlapRoute.pathList[0].sectionList[0]];
|
||||||
|
console.log(overlapRoute.pathList[0].sectionList[0], model.name, model.code);
|
||||||
|
model['timeRight'] = overlapRoute.pathList[0].right;
|
||||||
|
model['remainTime'] = elem.remainTime;
|
||||||
|
// if (overlapRoute.pathList[0].right) {
|
||||||
|
// elem['points'] = { x: model.points[0].x, y: model.points[0].y };
|
||||||
|
// } else {
|
||||||
|
// elem['points'] = { x: model.points[model.points.length - 1].x, y: model.points[model.points.length - 1].y };
|
||||||
|
// }
|
||||||
|
// elem['type'] = 'OverAp';
|
||||||
|
// elem['_type'] = 'OverAp';
|
||||||
|
// this.$painter.update(elem);
|
||||||
|
this.$painter.update(model);
|
||||||
} else if (elem.deviceType === 'CYCLE') {
|
} else if (elem.deviceType === 'CYCLE') {
|
||||||
store.dispatch('map/updateAutoReentryState', elem);
|
store.dispatch('map/updateAutoReentryState', elem);
|
||||||
const autoReentryData = this.logicData.autoReentryData[code];
|
const autoReentryData = this.logicData.autoReentryData[code];
|
||||||
|
@ -161,6 +161,9 @@ class Painter {
|
|||||||
} else {
|
} else {
|
||||||
const instance = device.instance;
|
const instance = device.instance;
|
||||||
if (instance) {
|
if (instance) {
|
||||||
|
if (device._type == 'OverAp') {
|
||||||
|
console.log(transitionDeviceStatus(device));
|
||||||
|
}
|
||||||
instance.setState(transitionDeviceStatus(device)); // 改变试图状态
|
instance.setState(transitionDeviceStatus(device)); // 改变试图状态
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
77
src/jmapNew/shape/OverAp/index.js
Normal file
77
src/jmapNew/shape/OverAp/index.js
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
// import {isShowThePrdType} from '../../utils/handlePath';
|
||||||
|
import ETextName from '../element/ETextName'; // 名称文字 (共有)
|
||||||
|
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||||
|
|
||||||
|
export default class OverAp extends Group {
|
||||||
|
constructor(model, style) {
|
||||||
|
super();
|
||||||
|
this._code = model.code;
|
||||||
|
this._type = model._type;
|
||||||
|
this.zlevel = model.zlevel;
|
||||||
|
this.model = model;
|
||||||
|
this.style = style;
|
||||||
|
this.z = 6;
|
||||||
|
this.isShowShape = true;
|
||||||
|
this.create();
|
||||||
|
this.setState(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
const model = this.model;
|
||||||
|
const style = this.style;
|
||||||
|
if (model.points) {
|
||||||
|
this.text = new ETextName({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z + 2,
|
||||||
|
style: this.style,
|
||||||
|
silent: false,
|
||||||
|
x: model.points.x + 10,
|
||||||
|
y: model.points.y - style.Section.line.width * 2,
|
||||||
|
fontWeight: style.Section.text.fontWeight,
|
||||||
|
text: model.remainTime || 30,
|
||||||
|
textPosition: style.Section.text.textPosition,
|
||||||
|
fontSize: 12,
|
||||||
|
fontFamily: style.fontFamily,
|
||||||
|
textFill: '#FFF',
|
||||||
|
textAlign: 'center',
|
||||||
|
textVerticalAlign: 'middle'
|
||||||
|
});
|
||||||
|
this.add(this.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(model) {
|
||||||
|
this.text && this.text.hide();
|
||||||
|
if (model.remainTime) {
|
||||||
|
console.log(model, model.remainTime, '=====');
|
||||||
|
this.text && this.text.show();
|
||||||
|
this.text && this.text.attr({
|
||||||
|
style: {
|
||||||
|
text: model.remainTime
|
||||||
|
},
|
||||||
|
shape: {
|
||||||
|
x: model.points.x + 30,
|
||||||
|
y: model.points.y - this.style.Section.line.width * 2
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getBoundingRect() {
|
||||||
|
if (this.text) {
|
||||||
|
return this.text.getBoundingRect().clone();
|
||||||
|
} else {
|
||||||
|
return new BoundingRect(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 设置显示模式
|
||||||
|
setShowMode() {
|
||||||
|
|
||||||
|
}
|
||||||
|
setShowStation(stationCode) {
|
||||||
|
|
||||||
|
}
|
||||||
|
screenShow() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -520,6 +520,7 @@ export default class Section extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 创建延迟解锁计时
|
||||||
createReleaseText() {
|
createReleaseText() {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
const style = this.style;
|
const style = this.style;
|
||||||
@ -735,7 +736,6 @@ export default class Section extends Group {
|
|||||||
/** 保护区段延时解锁 时间计时*/
|
/** 保护区段延时解锁 时间计时*/
|
||||||
protectiveTimeRelease() {
|
protectiveTimeRelease() {
|
||||||
// console.log(this.model);
|
// console.log(this.model);
|
||||||
this.releaseName && this.releaseName.show();
|
|
||||||
// this.releaseName.setStyle('text', '20');
|
// this.releaseName.setStyle('text', '20');
|
||||||
// this.section.setStyle({
|
// this.section.setStyle({
|
||||||
// stroke: this.style.Section.line.protectiveLockColor,
|
// stroke: this.style.Section.line.protectiveLockColor,
|
||||||
@ -792,6 +792,27 @@ export default class Section extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showRemainTime(number) { // 区段延时保护倒计时显示
|
||||||
|
this.releaseName && this.releaseName.show();
|
||||||
|
// this.releaseName && this.releaseName.setStyle({ text: number });
|
||||||
|
// console.log(number, this.model.name, '====');
|
||||||
|
let pointX = this.model.points[0].x + 45;
|
||||||
|
let pointY = this.model.points[0].y;
|
||||||
|
if (!this.model.timeRight) {
|
||||||
|
pointX = this.model.points[this.model.points.length - 1].x - 45;
|
||||||
|
pointY = this.model.points[this.model.points.length - 1].y;
|
||||||
|
}
|
||||||
|
this.releaseName && this.releaseName.attr({
|
||||||
|
style: {
|
||||||
|
text: number
|
||||||
|
},
|
||||||
|
shape: {
|
||||||
|
x: pointX,
|
||||||
|
y: pointY - this.style.Section.line.width * 2
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 设置状态*/
|
/** 设置状态*/
|
||||||
setState(model, flag = false) {
|
setState(model, flag = false) {
|
||||||
if (!this.isShowShape) return;
|
if (!this.isShowShape) return;
|
||||||
@ -831,6 +852,9 @@ export default class Section extends Group {
|
|||||||
// 区段计轴预复位状态 (未处理)
|
// 区段计轴预复位状态 (未处理)
|
||||||
// 区段故障锁闭
|
// 区段故障锁闭
|
||||||
model.fault && this.faultLock();
|
model.fault && this.faultLock();
|
||||||
|
// 区段延时保护倒计时显示
|
||||||
|
// model.remainTime = 10;
|
||||||
|
model.remainTime && this.showRemainTime(model.remainTime);
|
||||||
/** 道岔区段更新岔心颜色 */
|
/** 道岔区段更新岔心颜色 */
|
||||||
if (model.type === '03' && model.switch) {
|
if (model.type === '03' && model.switch) {
|
||||||
const sectionSwitch = store.getters['map/getDeviceByCode'](model.switch.code);
|
const sectionSwitch = store.getters['map/getDeviceByCode'](model.switch.code);
|
||||||
|
@ -197,6 +197,23 @@ class Signal extends Group {
|
|||||||
textVerticalAlign: textVerticalAlign
|
textVerticalAlign: textVerticalAlign
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const timeNameY = model.position.y + model.positionPoint.y - posit * 15;
|
||||||
|
this.remainTImeName = new ESigName({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
silent: false,
|
||||||
|
style: style,
|
||||||
|
x: sigNameX,
|
||||||
|
y: timeNameY,
|
||||||
|
text: model.remainTime || 0,
|
||||||
|
fontWeight: style.Signal.text.fontWeight,
|
||||||
|
fontSize: 12,
|
||||||
|
fontFamily: style.fontFamily,
|
||||||
|
textFill: '#FFF',
|
||||||
|
textAlign: 'center',
|
||||||
|
textVerticalAlign: 'middle'
|
||||||
|
});
|
||||||
|
|
||||||
// signalBackTriangle
|
// signalBackTriangle
|
||||||
// 北京一号线,宁波一号线 自动进路状态
|
// 北京一号线,宁波一号线 自动进路状态
|
||||||
// const signalRouteH=;
|
// const signalRouteH=;
|
||||||
@ -276,6 +293,7 @@ class Signal extends Group {
|
|||||||
this.style.Signal.text.show && model.nameShow ? this.sigName.show() : this.sigName.hide();
|
this.style.Signal.text.show && model.nameShow ? this.sigName.show() : this.sigName.hide();
|
||||||
this.add(this.sigRoute);
|
this.add(this.sigRoute);
|
||||||
this.add(this.sigDelay);
|
this.add(this.sigDelay);
|
||||||
|
this.add(this.remainTImeName);
|
||||||
|
|
||||||
if (this.model.virtual) {
|
if (this.model.virtual) {
|
||||||
// 虚拟信号机显示
|
// 虚拟信号机显示
|
||||||
@ -558,6 +576,11 @@ class Signal extends Group {
|
|||||||
.start();
|
.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 信号显示延迟解锁
|
||||||
|
showRemainTime(number) {
|
||||||
|
this.remainTImeName.show();
|
||||||
|
this.remainTImeName && this.remainTImeName.setStyle({ text: number });
|
||||||
|
}
|
||||||
|
|
||||||
// 恢复状态
|
// 恢复状态
|
||||||
recover() {
|
recover() {
|
||||||
@ -567,6 +590,7 @@ class Signal extends Group {
|
|||||||
}
|
}
|
||||||
this.sigName.setStyle({ textBorderWidth: 0 });
|
this.sigName.setStyle({ textBorderWidth: 0 });
|
||||||
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
||||||
|
this.remainTImeName.hide();
|
||||||
this.sigDelay.hide();
|
this.sigDelay.hide();
|
||||||
if (this.style.Signal.auto.autoTriggerType != 'text') {
|
if (this.style.Signal.auto.autoTriggerType != 'text') {
|
||||||
this.setAutoClose();
|
this.setAutoClose();
|
||||||
@ -615,6 +639,7 @@ class Signal extends Group {
|
|||||||
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放
|
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放
|
||||||
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放
|
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放
|
||||||
model.fault && this.fault();// 信号机故障
|
model.fault && this.fault();// 信号机故障
|
||||||
|
model.remainTime && this.showRemainTime(model.remainTime);
|
||||||
if (!path.includes('/map/draw')) {
|
if (!path.includes('/map/draw')) {
|
||||||
// 联锁自动进路通过
|
// 联锁自动进路通过
|
||||||
model.fleetMode && this.setAutoRouteOpen();
|
model.fleetMode && this.setAutoRouteOpen();
|
||||||
|
@ -26,6 +26,7 @@ import SplitStation from './SplitStation/index';
|
|||||||
import Arrow from './Arrow/index';
|
import Arrow from './Arrow/index';
|
||||||
import Power from './Power/index';
|
import Power from './Power/index';
|
||||||
import StationTurnBack from './StationTurnBack/index';
|
import StationTurnBack from './StationTurnBack/index';
|
||||||
|
import OverAp from './OverAp/index.js';
|
||||||
|
|
||||||
/** 图库*/
|
/** 图库*/
|
||||||
const mapShape = {};
|
const mapShape = {};
|
||||||
@ -73,6 +74,7 @@ mapShape[deviceType.SplitStation] = SplitStation;
|
|||||||
mapShape[deviceType.Arrow] = Arrow;
|
mapShape[deviceType.Arrow] = Arrow;
|
||||||
mapShape[deviceType.Power] = Power;
|
mapShape[deviceType.Power] = Power;
|
||||||
mapShape[deviceType.StationTurnBack] = StationTurnBack;
|
mapShape[deviceType.StationTurnBack] = StationTurnBack;
|
||||||
|
mapShape[deviceType.OverAp] = OverAp;
|
||||||
|
|
||||||
function shapefactory(device, jmap) {
|
function shapefactory(device, jmap) {
|
||||||
const type = device._type;
|
const type = device._type;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<div class="content cotnent_body">
|
<div class="content cotnent_body">
|
||||||
<span class="base-label" style="left: 2px;">操作</span>
|
<span class="base-label" style="left: 2px;">操作</span>
|
||||||
<div style="overflow: hidden;">
|
<div style="overflow: hidden;">
|
||||||
<div>{{ selected._type == 'Section' ? '操作设备' : '道岔' }}</div>
|
<div>{{ selectEdType ? '操作设备' : '道岔' }}</div>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-input :value="messageText1" placeholder="" size="mini" disabled />
|
<el-input :value="messageText1" placeholder="" size="mini" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<div class="content cotnent_body">
|
<div class="content cotnent_body">
|
||||||
<span class="base-label" style="left: 2px;">确认</span>
|
<span class="base-label" style="left: 2px;">确认</span>
|
||||||
<div style="overflow: hidden;">
|
<div style="overflow: hidden;">
|
||||||
<div>{{ selected._type == 'Section' ? '操作设备' : '道岔' }}</div>
|
<div>{{ selectEdType ? '操作设备' : '道岔' }}</div>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-select :id="domIdChoose" v-model="messageText2" filterable size="mini" :disabled="disabledConfirm2" @change="SelectChange">
|
<el-select :id="domIdChoose" v-model="messageText2" filterable size="mini" :disabled="disabledConfirm2" @change="SelectChange">
|
||||||
<el-option v-for="option in optionLists" :key="option.code" :label="option.name" :value="option.code" />
|
<el-option v-for="option in optionLists" :key="option.code" :label="option.name" :value="option.code" />
|
||||||
@ -98,6 +98,12 @@ export default {
|
|||||||
'sectionList',
|
'sectionList',
|
||||||
'switchList'
|
'switchList'
|
||||||
]),
|
]),
|
||||||
|
selectEdType() {
|
||||||
|
if (this.selected && this.selected._type) {
|
||||||
|
return this.selected._type == 'Section';
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
@ -163,19 +169,21 @@ export default {
|
|||||||
},
|
},
|
||||||
optionLists() {
|
optionLists() {
|
||||||
let list = [];
|
let list = [];
|
||||||
if (this.selected._type == 'Section') {
|
if (this.selected && this.selected._type) {
|
||||||
this.sectionList.forEach(section => {
|
if (this.selected._type == 'Section') {
|
||||||
let name = section.name;
|
this.sectionList.forEach(section => {
|
||||||
if (section.type == '02') {
|
let name = section.name;
|
||||||
const sectionParent = this.$store.getters['map/getDeviceByCode'](section.parentCode);
|
if (section.type == '02') {
|
||||||
name = `${sectionParent.name}${section.name}`;
|
const sectionParent = this.$store.getters['map/getDeviceByCode'](section.parentCode);
|
||||||
}
|
name = `${sectionParent.name}${section.name}`;
|
||||||
if (section.stationCode == this.selected.stationCode) {
|
}
|
||||||
list.push({ name: name, code: section.code });
|
if (section.stationCode == this.selected.stationCode) {
|
||||||
}
|
list.push({ name: name, code: section.code });
|
||||||
});
|
}
|
||||||
} else if (this.selected._type == 'Switch') {
|
});
|
||||||
list = this.switchList.filter(elem => elem.stationCode == this.selected.stationCode);
|
} else if (this.selected._type == 'Switch') {
|
||||||
|
list = this.switchList.filter(elem => elem.stationCode == this.selected.stationCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user