Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
c0c5356f8a
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,7 +6,7 @@ yarn-debug.log*
|
|||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
package-lock.json
|
package-lock.json
|
||||||
tests/**/coverage/
|
tests/**/coverage/
|
||||||
/src/utils/baseUrl.js
|
src/utils/baseUrl.js*
|
||||||
|
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
.idea
|
.idea
|
||||||
|
@ -574,8 +574,9 @@ class SkinCode extends defaultStyle {
|
|||||||
spareColor: '#5b5b5b' // 区段显示颜色 (灰色)
|
spareColor: '#5b5b5b' // 区段显示颜色 (灰色)
|
||||||
},
|
},
|
||||||
core: {
|
core: {
|
||||||
|
rateOpen: true, // 计算道岔按照区段一半计算
|
||||||
splice: true, // 哈尔滨特殊显示
|
splice: true, // 哈尔滨特殊显示
|
||||||
length: 6 // 道岔单边长度
|
length: 30 // 道岔单边A长度,
|
||||||
},
|
},
|
||||||
trapezoid: { // 直角梯形元素
|
trapezoid: { // 直角梯形元素
|
||||||
length: 16, // 默认长度
|
length: 16, // 默认长度
|
||||||
|
@ -254,7 +254,9 @@ class SkinCode extends defaultStyle {
|
|||||||
buttonText: '站遥控按钮',
|
buttonText: '站遥控按钮',
|
||||||
buttonShow: true,
|
buttonShow: true,
|
||||||
arrowShow: false,
|
arrowShow: false,
|
||||||
grayColor: '#7F7F7F'
|
grayColor: '#7F7F7F',
|
||||||
|
lightShow: true,
|
||||||
|
lightText: '强制点灯'
|
||||||
},
|
},
|
||||||
substationControl: { // 站控按钮
|
substationControl: { // 站控按钮
|
||||||
show: true,
|
show: true,
|
||||||
|
@ -173,13 +173,30 @@ class Jlmap {
|
|||||||
this.$painter.updateScreenNum(opts);
|
this.$painter.updateScreenNum(opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setCenterWithOffset(deviceCode, offsetX) {
|
||||||
|
const arr = Object.keys(this.mapDevice);
|
||||||
|
if (arr.length != 0) {
|
||||||
|
const device = this.mapDevice[deviceCode];
|
||||||
|
if (device && device.instance) {
|
||||||
|
var rect = createBoundingRect(device.instance);
|
||||||
|
var dcenter = calculateDCenter(rect, offsetX, { width: this.$zr.getWidth(), height: this.$zr.getHeight() });
|
||||||
|
this.setOptions(dcenter);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setCenterWithOffset(deviceCode, offsetX);
|
||||||
|
}, 60);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
setCenter(deviceCode) {
|
setCenter(deviceCode) {
|
||||||
const arr = Object.keys(this.mapDevice);
|
const arr = Object.keys(this.mapDevice);
|
||||||
if (arr.length != 0) {
|
if (arr.length != 0) {
|
||||||
const device = this.mapDevice[deviceCode];
|
const device = this.mapDevice[deviceCode];
|
||||||
if (device && device.instance) {
|
if (device && device.instance) {
|
||||||
var rect = createBoundingRect(device.instance);
|
var rect = createBoundingRect(device.instance);
|
||||||
var dcenter = calculateDCenter(rect, { width: this.$zr.getWidth(), height: this.$zr.getHeight() });
|
var dcenter = calculateDCenter(rect, this.$zr.getWidth()/2, { width: this.$zr.getWidth(), height: this.$zr.getHeight() });
|
||||||
this.setOptions(dcenter);
|
this.setOptions(dcenter);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -302,10 +319,13 @@ class Jlmap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setUpdateMapDevice(list = [], fetch=true) {
|
||||||
|
if (fetch) {
|
||||||
|
store.commit('map/updateMapDevice', list);
|
||||||
|
}
|
||||||
|
|
||||||
setUpdateMapDevice(list = []) {
|
|
||||||
store.commit('map/updateMapDevice', list);
|
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
const code = elem.code;
|
const code = elem.code;
|
||||||
const type = elem._type;
|
const type = elem._type;
|
||||||
@ -314,7 +334,7 @@ class Jlmap {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 模式选择 -> 更新
|
// 模式选择 -> 更新
|
||||||
updateShowMode(list = [], showMode = false) {
|
updateShowMode(list=[], showMode=false) {
|
||||||
this.showConfig.showMode = showMode;
|
this.showConfig.showMode = showMode;
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
const code = elem.code;
|
const code = elem.code;
|
||||||
@ -328,7 +348,7 @@ class Jlmap {
|
|||||||
getShowConfig() {
|
getShowConfig() {
|
||||||
return this.showConfig;
|
return this.showConfig;
|
||||||
}
|
}
|
||||||
updateShowStation(list = [], stationCode = false) {
|
updateShowStation(list=[], stationCode=false) {
|
||||||
this.stationCode = stationCode;
|
this.stationCode = stationCode;
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
const code = elem.code;
|
const code = elem.code;
|
||||||
@ -348,7 +368,7 @@ class Jlmap {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.$painter.$transformHandle.revisibleAll();
|
this.$painter.$transformHandle.revisibleAll();
|
||||||
if (stationCode) {
|
if (stationCode) {
|
||||||
this.$painter.$transformHandle.setFoldLines(store.state.map.foldLineMap[stationCode]);
|
this.$painter.$transformHandle.setFoldLines(store.state.map.foldLineMap[stationCode]);
|
||||||
} else {
|
} else {
|
||||||
this.$painter.$transformHandle.setFoldLines([]);
|
this.$painter.$transformHandle.setFoldLines([]);
|
||||||
@ -397,16 +417,17 @@ class Jlmap {
|
|||||||
this.$painter.updateShowMode(oDevice);
|
this.$painter.updateShowMode(oDevice);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
update(list = []) {
|
update(list=[], fetch=true) {
|
||||||
this.setUpdateMapDevice(list); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息
|
this.setUpdateMapDevice(list, fetch); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息
|
||||||
const codeList = [];
|
|
||||||
|
const codeList = [];
|
||||||
const controlTransferList = [];
|
const controlTransferList = [];
|
||||||
const signalDeviceList = [];
|
const signalDeviceList = [];
|
||||||
const selected = store.state.menuOperation.selected;
|
const selected = store.state.menuOperation.selected;
|
||||||
|
|
||||||
list.forEach((elem, index) => {
|
list.forEach((elem, index) => {
|
||||||
const code = elem.code;
|
const code = elem.code;
|
||||||
const type = elem._type;
|
const type = elem._type;
|
||||||
|
|
||||||
if (elem.deviceType === 'ROUTE' && this.logicData.routeData) { // 处理进路数据状态
|
if (elem.deviceType === 'ROUTE' && this.logicData.routeData) { // 处理进路数据状态
|
||||||
store.dispatch('map/updateRouteState', elem);
|
store.dispatch('map/updateRouteState', elem);
|
||||||
@ -462,7 +483,7 @@ class Jlmap {
|
|||||||
}
|
}
|
||||||
store.commit('map/mapStationStateUpdate');
|
store.commit('map/mapStationStateUpdate');
|
||||||
} else {
|
} else {
|
||||||
if (elem.deviceType === 'TRAIN') {
|
if (elem.deviceType === 'TRAIN') {
|
||||||
this.isUpdateShowTrainList = true;
|
this.isUpdateShowTrainList = true;
|
||||||
store.commit('map/updateActiveTrainList', elem);
|
store.commit('map/updateActiveTrainList', elem);
|
||||||
} else if (elem.deviceType === 'STAND') {
|
} else if (elem.deviceType === 'STAND') {
|
||||||
@ -473,34 +494,34 @@ class Jlmap {
|
|||||||
this.$painter.update(psdDevice);
|
this.$painter.update(psdDevice);
|
||||||
}
|
}
|
||||||
} else if (elem.deviceType == 'SWITCH') {
|
} else if (elem.deviceType == 'SWITCH') {
|
||||||
const oDevice = this.mapDevice[code];
|
const oDevice = this.mapDevice[code]
|
||||||
if (oDevice) {
|
if (oDevice) {
|
||||||
const sectionA = this.mapDevice[oDevice.sectionACode];
|
const sectionA = this.mapDevice[oDevice.sectionACode];
|
||||||
const sectionB = this.mapDevice[oDevice.sectionBCode];
|
const sectionB = this.mapDevice[oDevice.sectionBCode];
|
||||||
const sectionC = this.mapDevice[oDevice.sectionCCode];
|
const sectionC = this.mapDevice[oDevice.sectionCCode];
|
||||||
if (sectionA && sectionB && sectionC) {
|
if (sectionA && sectionB && sectionC) {
|
||||||
oDevice['cutOff'] = sectionA.cutOff;
|
oDevice['cutOff'] = sectionA.cutOff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$painter.update(oDevice);
|
this.$painter.update(oDevice);
|
||||||
} else if (elem.deviceType == 'SECTION') {
|
} else if (elem.deviceType == 'SECTION') {
|
||||||
const oDevice = this.mapDevice[code];
|
const oDevice = this.mapDevice[code]
|
||||||
if (oDevice) {
|
if (oDevice) {
|
||||||
const sDevice = this.mapDevice[oDevice.relSwitchCode];
|
const sDevice = this.mapDevice[oDevice.relSwitchCode];
|
||||||
if (sDevice) {
|
if (sDevice) {
|
||||||
const sectionA = this.mapDevice[sDevice.sectionACode];
|
const sectionA = this.mapDevice[sDevice.sectionACode];
|
||||||
const sectionB = this.mapDevice[sDevice.sectionBCode];
|
const sectionB = this.mapDevice[sDevice.sectionBCode];
|
||||||
const sectionC = this.mapDevice[sDevice.sectionCCode];
|
const sectionC = this.mapDevice[sDevice.sectionCCode];
|
||||||
if (sectionA && sectionB && sectionC) {
|
if (sectionA && sectionB && sectionC) {
|
||||||
sDevice['cutOff'] = sectionA.cutOff;
|
sDevice['cutOff'] = sectionA.cutOff;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$painter.update(sDevice);
|
this.$painter.update(sDevice);
|
||||||
codeList.push(sDevice.code);
|
codeList.push(sDevice.code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (elem.deviceType === 'DIRECTION_ROD' && elem.uniqueCode) {
|
} else if (elem.deviceType === 'DIRECTION_ROD' && elem.uniqueCode) {
|
||||||
store.state.map.map.directionRodList.forEach(item => {
|
store.state.map.map.directionRodList.forEach(item => {
|
||||||
if (elem.uniqueCode === item.uniqueCode) {
|
if (elem.uniqueCode === item.uniqueCode) {
|
||||||
const updateRod = this.mapDevice[item.code];
|
const updateRod = this.mapDevice[item.code];
|
||||||
@ -508,17 +529,17 @@ class Jlmap {
|
|||||||
this.$painter.update(updateRod);
|
this.$painter.update(updateRod);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||||
if (elem.dispose) {
|
if (elem.dispose) {
|
||||||
this.$painter.delete(oDevice);
|
this.$painter.delete(oDevice);
|
||||||
} else {
|
} else {
|
||||||
this.$painter.update(oDevice);
|
this.$painter.update(oDevice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
codeList.push(code);
|
codeList.push(code);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (controlTransferList.length > 0) {
|
if (controlTransferList.length > 0) {
|
||||||
@ -528,11 +549,11 @@ class Jlmap {
|
|||||||
if (this.isUpdateShowTrainList) {
|
if (this.isUpdateShowTrainList) {
|
||||||
store.dispatch('map/setActiveTrainList');
|
store.dispatch('map/setActiveTrainList');
|
||||||
this.isUpdateShowTrainList = false;
|
this.isUpdateShowTrainList = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected && codeList.includes(selected.code)) {
|
if (selected && codeList.includes(selected.code)) {
|
||||||
store.commit('menuOperation/setSelected', {device: {...selected}});
|
store.commit('menuOperation/setSelected', {device: {...selected}});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.handleRouteSignalStatus(signalDeviceList);
|
this.handleRouteSignalStatus(signalDeviceList);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import Group from 'zrender/src/container/Group';
|
|||||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||||
|
|
||||||
export default class Arrow extends Group {
|
export default class Arrow extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
|
@ -9,7 +9,7 @@ import EMouse from './EMouse';
|
|||||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||||
|
|
||||||
export default class AutoTurnBack extends Group {
|
export default class AutoTurnBack extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.z = 20;
|
this.z = 20;
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
|
@ -8,7 +8,7 @@ import EMouse from './EMouse';
|
|||||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||||
|
|
||||||
export default class AutomacticRoute extends Group {
|
export default class AutomacticRoute extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.z = 20;
|
this.z = 20;
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
|
@ -8,7 +8,7 @@ import EMouse from './EMouse';
|
|||||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||||
|
|
||||||
export default class AxleReset extends Group {
|
export default class AxleReset extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.z = 20;
|
this.z = 20;
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
@ -83,9 +83,18 @@ export default class AxleReset extends Group {
|
|||||||
this.add(this.text);
|
this.add(this.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setAshShow() {
|
||||||
|
this.control && this.control.setStyle({fill:'#FFF'});
|
||||||
|
}
|
||||||
|
|
||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
if (!this.isShowShape) return;
|
// 只响应前端自定义类型的状态变化
|
||||||
|
if (model._free) {
|
||||||
|
this.setAshShow()
|
||||||
|
} else {
|
||||||
|
if (!this.isShowShape) return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
createMouseEvent() {
|
createMouseEvent() {
|
||||||
|
@ -3,7 +3,7 @@ import Polygon from 'zrender/src/graphic/shape/Polygon';
|
|||||||
import Text from 'zrender/src/graphic/Text';
|
import Text from 'zrender/src/graphic/Text';
|
||||||
|
|
||||||
export default class DirectionRod extends Group {
|
export default class DirectionRod extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.z = 5;
|
this.z = 5;
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
|
@ -5,7 +5,7 @@ import Group from 'zrender/src/container/Group';
|
|||||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
|
|
||||||
export default class FloodGate extends Group {
|
export default class FloodGate extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.z = 20;
|
this.z = 20;
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
|
@ -8,7 +8,7 @@ import EMouse from './EMouse';
|
|||||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||||
|
|
||||||
export default class GuideLock extends Group {
|
export default class GuideLock extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.z = 20;
|
this.z = 20;
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
@ -86,12 +86,22 @@ export default class GuideLock extends Group {
|
|||||||
}
|
}
|
||||||
handleSignal() {
|
handleSignal() {
|
||||||
this.control.setStyle({ fill: this.style.GuideLock.lamp.lightUpColor });
|
this.control.setStyle({ fill: this.style.GuideLock.lamp.lightUpColor });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setAshShow() {
|
||||||
|
this.control && this.control.setStyle({fill:'#FFF'});
|
||||||
|
}
|
||||||
|
|
||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
if (!this.isShowShape) return;
|
// 只响应前端自定义类型的状态变化
|
||||||
this.recover();
|
if (model._free) {
|
||||||
model.totalGuideLock && this.handleSignal();
|
this.setAshShow()
|
||||||
|
} else {
|
||||||
|
if (!this.isShowShape) return;
|
||||||
|
this.recover();
|
||||||
|
model.totalGuideLock && this.handleSignal();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
createMouseEvent() {
|
createMouseEvent() {
|
||||||
|
@ -6,7 +6,7 @@ import EControl from '../element/EControl';
|
|||||||
import EMouse from './EMouse';
|
import EMouse from './EMouse';
|
||||||
|
|
||||||
export default class LcControl extends Group {
|
export default class LcControl extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.z = 20;
|
this.z = 20;
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
@ -53,9 +53,19 @@ export default class LcControl extends Group {
|
|||||||
this.add(this.control);
|
this.add(this.control);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setAshShow() {
|
||||||
|
this.control && this.control.setControlColor('#7F7F7F');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
if (!this.isShowShape) return;
|
// 只响应前端自定义类型的状态变化
|
||||||
|
if (model._free) {
|
||||||
|
this.setAshShow()
|
||||||
|
} else {
|
||||||
|
if (!this.isShowShape) return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
createMouseEvent() {
|
createMouseEvent() {
|
||||||
|
@ -6,7 +6,7 @@ import EControl from '../element/EControl';
|
|||||||
import EMouse from './EMouse';
|
import EMouse from './EMouse';
|
||||||
|
|
||||||
export default class LimitControl extends Group {
|
export default class LimitControl extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.selected = false;
|
this.selected = false;
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
@ -57,9 +57,18 @@ export default class LimitControl extends Group {
|
|||||||
this.add(this.control);
|
this.add(this.control);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setAshShow() {
|
||||||
|
this.control && this.control.setControlColor('#FFF');
|
||||||
|
}
|
||||||
|
|
||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
if (!this.isShowShape) return;
|
// 只响应前端自定义类型的状态变化
|
||||||
|
if (model._free) {
|
||||||
|
this.setAshShow()
|
||||||
|
} else {
|
||||||
|
if (!this.isShowShape) return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
createMouseEvent() {
|
createMouseEvent() {
|
||||||
|
@ -2,7 +2,7 @@ import Group from 'zrender/src/container/Group';
|
|||||||
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||||
|
|
||||||
export default class Line2 extends Group {
|
export default class Line2 extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
|
@ -2,7 +2,7 @@ import Group from 'zrender/src/container/Group';
|
|||||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
|
|
||||||
export default class OutFrame extends Group {
|
export default class OutFrame extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
|
@ -3,7 +3,7 @@ import ETextName from '../element/ETextName'; // 名称文字 (共有)
|
|||||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||||
|
|
||||||
export default class OverAp extends Group {
|
export default class OverAp extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
|
@ -4,7 +4,7 @@ import JTriangle from '../../utils/JTriangle';
|
|||||||
import ESeparator from './ESeparator';
|
import ESeparator from './ESeparator';
|
||||||
|
|
||||||
export default class Line2 extends Group {
|
export default class Line2 extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
|
@ -7,7 +7,7 @@ import {traverseLineElements} from '../utils/ShapeStatusCovert';
|
|||||||
import ERectDoor from './ERectDoor';
|
import ERectDoor from './ERectDoor';
|
||||||
|
|
||||||
export default class Line2 extends Group {
|
export default class Line2 extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
@ -42,16 +42,24 @@ export default class Line2 extends Group {
|
|||||||
currentTypeList.forEach(element => {
|
currentTypeList.forEach(element => {
|
||||||
this[element].recover();
|
this[element].recover();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setAshShow() {
|
||||||
|
this.safetyDoorNormal && this.safetyDoorNormal.setColor('#7F7F7F');
|
||||||
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.recover();
|
this.recover();
|
||||||
if (!this.isShowShape) return;
|
if (!this.isShowShape) return;
|
||||||
|
|
||||||
const currentTypeList = this.style.Psd.elemnetType;
|
if (model._free) {
|
||||||
currentTypeList.forEach(element => {
|
this.setAshShow();
|
||||||
this[element].setState(model);
|
} else {
|
||||||
});
|
const currentTypeList = this.style.Psd.elemnetType;
|
||||||
|
currentTypeList.forEach(element => {
|
||||||
|
this[element].setState(model);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
drawSelected(selected) {
|
drawSelected(selected) {
|
||||||
|
@ -5,7 +5,7 @@ import Group from 'zrender/src/container/Group';
|
|||||||
import Image from 'zrender/src/graphic/Image';
|
import Image from 'zrender/src/graphic/Image';
|
||||||
|
|
||||||
export default class Resource extends Group {
|
export default class Resource extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
|
@ -23,7 +23,7 @@ const defaultStyle = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
export default class Responder extends Group {
|
export default class Responder extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
|
@ -11,7 +11,7 @@ import EUnmanned from './EUnmanned';
|
|||||||
import EAxle from './EAxle';
|
import EAxle from './EAxle';
|
||||||
|
|
||||||
export default class SaidLamp extends Group {
|
export default class SaidLamp extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.z = 20;
|
this.z = 20;
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
|
@ -13,18 +13,18 @@ import ELimitName from './ELimitName'; // 成都三号线 限速名称
|
|||||||
import { drawSectionStyle } from '../../config/defaultStyle';
|
import { drawSectionStyle } from '../../config/defaultStyle';
|
||||||
import EStopRouteImg from './EStopRouteImg';
|
import EStopRouteImg from './EStopRouteImg';
|
||||||
import store from '@/store/index';
|
import store from '@/store/index';
|
||||||
import Vue from 'vue';
|
|
||||||
|
|
||||||
/** 区段*/
|
/** 区段*/
|
||||||
export default class Section extends Group {
|
export default class Section extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style, mapDevice}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
this.zlevel = model.zlevel;
|
this.zlevel = model.zlevel;
|
||||||
this.z = 5 + parseInt(model.layer || 0);
|
this.z = 5 + parseInt(model.layer || 0);
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.style = style;
|
this.style = style;
|
||||||
|
this.mapDevice = mapDevice;
|
||||||
this.selected = false; // 绘图选中状态
|
this.selected = false; // 绘图选中状态
|
||||||
this.selectedType = ''; // 绘图批量选中状态
|
this.selectedType = ''; // 绘图批量选中状态
|
||||||
this.isShowShape = true;
|
this.isShowShape = true;
|
||||||
@ -154,9 +154,9 @@ export default class Section extends Group {
|
|||||||
|
|
||||||
/** 非通信车占用状态 03*/
|
/** 非通信车占用状态 03*/
|
||||||
unCommunicationOccupied() {
|
unCommunicationOccupied() {
|
||||||
if (this.style.Section.preAxleIgnoreFault && this.model.preReset) {
|
if (this.style.Section.preAxleIgnoreFault && this.model.preReset) {
|
||||||
return;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.line) {
|
if (this.line) {
|
||||||
this.line.setStyle({
|
this.line.setStyle({
|
||||||
@ -174,9 +174,9 @@ export default class Section extends Group {
|
|||||||
}
|
}
|
||||||
/** ARB故障 */
|
/** ARB故障 */
|
||||||
invalid() {
|
invalid() {
|
||||||
if (this.style.Section.preAxleIgnoreFault && this.model.preReset) {
|
if (this.style.Section.preAxleIgnoreFault && this.model.preReset) {
|
||||||
return;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.line && this.line.setStyle({
|
this.line && this.line.setStyle({
|
||||||
stroke: this.style.Section.line.invalidColor,
|
stroke: this.style.Section.line.invalidColor,
|
||||||
@ -300,7 +300,7 @@ export default class Section extends Group {
|
|||||||
if (this.style.Section.sectionMiddle && this.style.Section.sectionMiddle.preResetColor && !blockade) { // 南京二号线
|
if (this.style.Section.sectionMiddle && this.style.Section.sectionMiddle.preResetColor && !blockade) { // 南京二号线
|
||||||
this.sectionMiddle.setStyle({stroke: this.style.Section.sectionMiddle.preResetColor});
|
this.sectionMiddle.setStyle({stroke: this.style.Section.sectionMiddle.preResetColor});
|
||||||
this.sectionMiddle.show();
|
this.sectionMiddle.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 延时解锁
|
// 延时解锁
|
||||||
delayUnlock() {
|
delayUnlock() {
|
||||||
@ -321,9 +321,9 @@ export default class Section extends Group {
|
|||||||
handleSwitchSection(model, flag) {
|
handleSwitchSection(model, flag) {
|
||||||
// 哈尔滨线路 南京二 道岔相关区段设置 默认颜色
|
// 哈尔滨线路 南京二 道岔相关区段设置 默认颜色
|
||||||
if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) {
|
if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) {
|
||||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode];
|
const switchModel = this.mapDevice[model.relSwitchCode];
|
||||||
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
|
const sectionB = this.mapDevice[switchModel.sectionBCode];
|
||||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
const sectionC = this.mapDevice[switchModel.sectionCCode];
|
||||||
if (switchModel && switchModel.normalPosition === 1) {
|
if (switchModel && switchModel.normalPosition === 1) {
|
||||||
this.setSwitchSectionColor(sectionC, sectionB);// 定位
|
this.setSwitchSectionColor(sectionC, sectionB);// 定位
|
||||||
} else if (switchModel && switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'reverse' && switchModel.fault !== 'SPLIT') {
|
} else if (switchModel && switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'reverse' && switchModel.fault !== 'SPLIT') {
|
||||||
@ -363,42 +363,51 @@ export default class Section extends Group {
|
|||||||
/** 设置状态*/
|
/** 设置状态*/
|
||||||
setState(model, flag = false) {
|
setState(model, flag = false) {
|
||||||
if (!this.isShowShape) return;
|
if (!this.isShowShape) return;
|
||||||
this.recover();
|
this.recover();
|
||||||
this.handleSwitchSection(model, flag);
|
|
||||||
// 顺序代表优先级
|
// 只响应前端自定义类型的状态变化
|
||||||
/** 道岔保护区段锁闭 */
|
if (model._free) {
|
||||||
model.overlapLock && this.protectiveLock(model.lockRight);
|
// 先初始化为灰色
|
||||||
/** 空闲锁闭或者叫进路锁闭 */
|
this.setAshShow()
|
||||||
model.routeLock && this.routeLock(model.lockRight);
|
model.preGreen && this.line.setStyle({stroke: '#00FF00'});
|
||||||
/** 计轴故障 */
|
model.preBlue && this.line.setStyle({stroke: '#4A76B7'});
|
||||||
model.invalid && this.invalid();
|
} else {
|
||||||
/** 轨道封锁 */
|
this.handleSwitchSection(model, flag);
|
||||||
model.blockade && this.block(model.routeLock);
|
// 顺序代表优先级
|
||||||
/** 非通信车占用状态 */
|
/** 道岔保护区段锁闭 */
|
||||||
model.nctOccupied && this.unCommunicationOccupied();
|
model.overlapLock && this.protectiveLock(model.lockRight);
|
||||||
/** 通信车占用状态 */
|
/** 空闲锁闭或者叫进路锁闭 */
|
||||||
model.ctOccupied && this.communicationOccupied();
|
model.routeLock && this.routeLock(model.lockRight);
|
||||||
// 计轴预复位
|
/** 计轴故障 */
|
||||||
model.preReset && this.preReset(model.blockade);
|
model.invalid && this.invalid();
|
||||||
/** 区段切除*/
|
/** 轨道封锁 */
|
||||||
model.cutOff && this.sectionCutOff();
|
model.blockade && this.block(model.routeLock);
|
||||||
/** 是否限速*/
|
/** 非通信车占用状态 */
|
||||||
model.speedUpLimit > 0 && this.setSpeedUpperLimit(model.speedUpLimit);
|
model.nctOccupied && this.unCommunicationOccupied();
|
||||||
// 区段计轴预复位状态 (未处理)
|
/** 通信车占用状态 */
|
||||||
// 区段延时解锁
|
model.ctOccupied && this.communicationOccupied();
|
||||||
model.delayUnlock && this.delayUnlock();
|
// 计轴预复位
|
||||||
// 区段故障锁闭 之前是fault 暂时设置为faultLock
|
model.preReset && this.preReset(model.blockade);
|
||||||
model.faultLock && this.faultLock();
|
/** 区段切除*/
|
||||||
// 设置灰显
|
model.cutOff && this.sectionCutOff();
|
||||||
model.noStatus && this.setAshShow();
|
/** 是否限速*/
|
||||||
/** 道岔区段更新岔心颜色 */
|
model.speedUpLimit > 0 && this.setSpeedUpperLimit(model.speedUpLimit);
|
||||||
if (model.type === '03' && model.switch) {
|
// 区段计轴预复位状态 (未处理)
|
||||||
const sectionSwitch = store.getters['map/getDeviceByCode'](model.switch.code);
|
// 区段延时解锁
|
||||||
if (sectionSwitch && sectionSwitch.sectionACode === model.code) {
|
model.delayUnlock && this.delayUnlock();
|
||||||
sectionSwitch.instance && sectionSwitch.instance.setState(sectionSwitch);
|
// 区段故障锁闭 之前是fault 暂时设置为faultLock
|
||||||
sectionSwitch.instance && sectionSwitch.instance.setLimitState(model.speedUpLimit > 0, model.speedUpLimit);
|
model.faultLock && this.faultLock();
|
||||||
}
|
// 设置灰显
|
||||||
}
|
model.noStatus && this.setAshShow();
|
||||||
|
/** 道岔区段更新岔心颜色 */
|
||||||
|
if (model.type === '03' && model.switch) {
|
||||||
|
const sectionSwitch = this.mapDevice[model.switch.code];
|
||||||
|
if (sectionSwitch && sectionSwitch.sectionACode === model.code) {
|
||||||
|
sectionSwitch.instance && sectionSwitch.instance.setState(sectionSwitch);
|
||||||
|
sectionSwitch.instance && sectionSwitch.instance.setLimitState(model.speedUpLimit > 0, model.speedUpLimit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 计算提示位置*/
|
/** 计算提示位置*/
|
||||||
@ -434,8 +443,8 @@ export default class Section extends Group {
|
|||||||
this.line.setOrignalCross(true);
|
this.line.setOrignalCross(true);
|
||||||
}
|
}
|
||||||
if (this.style.Switch.sectionAction.flag && this.model.relSwitchCode) {
|
if (this.style.Switch.sectionAction.flag && this.model.relSwitchCode) {
|
||||||
const switchModel = Vue.prototype.$jlmap.mapDevice[this.model.relSwitchCode];
|
const switchModel = this.mapDevice[this.model.relSwitchCode];
|
||||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
const sectionC = this.mapDevice[switchModel.sectionCCode];
|
||||||
if (sectionC.code == this.model.code) {
|
if (sectionC.code == this.model.code) {
|
||||||
sectionC && sectionC.instance && sectionC.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
|
sectionC && sectionC.instance && sectionC.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
|
||||||
}
|
}
|
||||||
@ -519,7 +528,8 @@ export default class Section extends Group {
|
|||||||
this.isShowShape = false;
|
this.isShowShape = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getAnchorPoint() {
|
|
||||||
|
getAnchorPoint() {
|
||||||
const rect = this.getBoundingRect();
|
const rect = this.getBoundingRect();
|
||||||
return {
|
return {
|
||||||
x:rect.x,
|
x:rect.x,
|
||||||
|
@ -22,7 +22,7 @@ import { findDeviceByModelDepType } from '../utils/ShapeDepFind';
|
|||||||
// import background from './../../../ibp/shape/background';
|
// import background from './../../../ibp/shape/background';
|
||||||
|
|
||||||
class Signal extends Group {
|
class Signal extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
@ -733,87 +733,92 @@ class Signal extends Group {
|
|||||||
const path = window.location.href;
|
const path = window.location.href;
|
||||||
this.recover();
|
this.recover();
|
||||||
|
|
||||||
/** 信号机进路按钮显示 */
|
// 只响应前端自定义类型的状态变化
|
||||||
/** 终端信号机按钮 */
|
if (model._free) {
|
||||||
if (model.isRouteActive) {
|
this.setAshShow()
|
||||||
this.setLowButtonActive();
|
} else {
|
||||||
} else {
|
/** 信号机进路按钮显示 */
|
||||||
this.setLowButtonRecover();
|
/** 终端信号机按钮 */
|
||||||
}
|
if (model.isRouteActive) {
|
||||||
model.isRouteSignal && this.setLowButtonShow();
|
this.setLowButtonActive();
|
||||||
|
} else {
|
||||||
|
this.setLowButtonRecover();
|
||||||
|
}
|
||||||
|
model.isRouteSignal && this.setLowButtonShow();
|
||||||
|
|
||||||
/** 设置灯的颜色 */
|
/** 设置灯的颜色 */
|
||||||
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(model.logicLight); // 信号关闭
|
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(model.logicLight); // 信号关闭
|
||||||
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.redOpen && model.yellowOpen && !model.greenOpen && this.guid(); // 引导信号显示
|
model.redOpen && model.yellowOpen && !model.greenOpen && this.guid(); // 引导信号显示
|
||||||
|
|
||||||
/** 信号机封锁 */ // 缺一个功能封锁
|
/** 信号机封锁 */ // 缺一个功能封锁
|
||||||
model.blockade && this.block();
|
model.blockade && this.block();
|
||||||
model.reblockade && this.reblock();
|
model.reblockade && this.reblock();
|
||||||
model.remainTime && this.showRemainTime(model.remainTime);
|
model.remainTime && this.showRemainTime(model.remainTime);
|
||||||
if (!path.includes('/map/draw')) {
|
if (!path.includes('/map/draw')) {
|
||||||
// 联锁自动进路通过
|
// 联锁自动进路通过
|
||||||
model.fleetMode && this.setAutoRouteOpen();
|
model.fleetMode && this.setAutoRouteOpen();
|
||||||
// 联锁自动触发
|
// 联锁自动触发
|
||||||
if (model.ciControl) {
|
if (model.ciControl) {
|
||||||
this.setAutoTriggerOpen();
|
this.setAutoTriggerOpen();
|
||||||
} else {
|
} else {
|
||||||
!model.atsControl && this.setArtificialRouteClose(); /** 进路交人工控或自动控 */
|
!model.atsControl && this.setArtificialRouteClose(); /** 进路交人工控或自动控 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 设置点灯类型 必须在最后设置不能放前面 logicLight 0 物理点灯 1 逻辑点灯
|
// 设置点灯类型 必须在最后设置不能放前面 logicLight 0 物理点灯 1 逻辑点灯
|
||||||
if (model.logicLight) {
|
if (model.logicLight) {
|
||||||
this.logicalLight(); // 设置逻辑点灯
|
this.logicalLight(); // 设置逻辑点灯
|
||||||
} else {
|
} else {
|
||||||
this.physicsLight(); // 设置物理点灯
|
this.physicsLight(); // 设置物理点灯
|
||||||
}
|
}
|
||||||
if (model.isStartSignal) {
|
if (model.isStartSignal) {
|
||||||
this.insideTriangle && this.insideTriangle.show();
|
this.insideTriangle && this.insideTriangle.show();
|
||||||
this.lamps.forEach(item => { item.hide(); });
|
this.lamps.forEach(item => { item.hide(); });
|
||||||
this.insideTriangle.setStyle({fill: this.style.Signal.insideTriangle.startSignalColor, stroke: this.style.Signal.insideTriangle.startSignalColor});
|
this.insideTriangle.setStyle({fill: this.style.Signal.insideTriangle.startSignalColor, stroke: this.style.Signal.insideTriangle.startSignalColor});
|
||||||
} else if (model.isTerminalSignal) {
|
} else if (model.isTerminalSignal) {
|
||||||
this.sigPost && this.sigPost.setTerminalOptional();
|
this.sigPost && this.sigPost.setTerminalOptional();
|
||||||
}
|
}
|
||||||
if (model.isCiConfirm) {
|
if (model.isCiConfirm) {
|
||||||
this.setCiConfirm();
|
this.setCiConfirm();
|
||||||
}
|
}
|
||||||
if (model.isRequestLock) {
|
if (model.isRequestLock) {
|
||||||
this.sigBack && this.sigBack.show();
|
this.sigBack && this.sigBack.show();
|
||||||
this.sigBack && this.sigBack.animateStyle(true)
|
this.sigBack && this.sigBack.animateStyle(true)
|
||||||
.when(0, { fill: this.style.backgroundColor })
|
.when(0, { fill: this.style.backgroundColor })
|
||||||
.when(1000, { fill: this.style.Signal.sigBack.fillColor })
|
.when(1000, { fill: this.style.Signal.sigBack.fillColor })
|
||||||
.when(2000, { fill: this.style.backgroundColor })
|
.when(2000, { fill: this.style.backgroundColor })
|
||||||
.when(3000, { fill: this.style.Signal.sigBack.fillColor })
|
.when(3000, { fill: this.style.Signal.sigBack.fillColor })
|
||||||
.start();
|
.start();
|
||||||
}
|
}
|
||||||
if (model.isRequestGuide) {
|
if (model.isRequestGuide) {
|
||||||
this.lamps && this.lamps[0] && this.lamps[0].setAnimationStart(this.style.Signal.lamp.yellowColor);
|
this.lamps && this.lamps[0] && this.lamps[0].setAnimationStart(this.style.Signal.lamp.yellowColor);
|
||||||
}
|
}
|
||||||
if (path.includes('/map/draw')) {
|
if (path.includes('/map/draw')) {
|
||||||
if (model.type == 'PASSING') {
|
if (model.type == 'PASSING') {
|
||||||
this.lamps && this.lamps.length && this.lamps.forEach(elem => {
|
this.lamps && this.lamps.length && this.lamps.forEach(elem => {
|
||||||
elem.setColor(this.style.Signal.lamp.greenColor);
|
elem.setColor(this.style.Signal.lamp.greenColor);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.lamps && this.lamps.length && this.lamps.forEach(elem => {
|
this.lamps && this.lamps.length && this.lamps.forEach(elem => {
|
||||||
elem.setColor(this.style.Signal.lamp.redColor);
|
elem.setColor(this.style.Signal.lamp.redColor);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( model.level === 3 && this.style.Signal.post.mainSignalVerColor && !model.fleetMode) {
|
if ( model.level === 3 && this.style.Signal.post.mainSignalVerColor && !model.fleetMode) {
|
||||||
this.sigPost.setVerColor(this.style.Signal.post.mainSignalVerColor);
|
this.sigPost.setVerColor(this.style.Signal.post.mainSignalVerColor);
|
||||||
} else if (model.level === 1 && this.style.Signal.post.closeSignalVerColor && !model.fleetMode) {
|
} else if (model.level === 1 && this.style.Signal.post.closeSignalVerColor && !model.fleetMode) {
|
||||||
this.sigPost.setVerColor(this.style.Signal.post.closeSignalVerColor);
|
this.sigPost.setVerColor(this.style.Signal.post.closeSignalVerColor);
|
||||||
} else if (model.level === 2 && this.style.Signal.post.guideSignalVerColor && !model.fleetMode) {
|
} else if (model.level === 2 && this.style.Signal.post.guideSignalVerColor && !model.fleetMode) {
|
||||||
this.sigPost.setVerColor(this.style.Signal.post.guideSignalVerColor);
|
this.sigPost.setVerColor(this.style.Signal.post.guideSignalVerColor);
|
||||||
}
|
}
|
||||||
// 信号机故障
|
// 信号机故障
|
||||||
model.fault && this.fault();
|
model.fault && this.fault();
|
||||||
// 设置灰显
|
// 设置灰显
|
||||||
if (model.noStatus || model.level === 0) {
|
if (model.noStatus || model.level === 0) {
|
||||||
this.setAshShow();
|
this.setAshShow();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getBoundingRect() {
|
getBoundingRect() {
|
||||||
|
@ -4,7 +4,7 @@ import Polygon from 'zrender/src/graphic/shape/Polygon';
|
|||||||
import Text from 'zrender/src/graphic/Text';
|
import Text from 'zrender/src/graphic/Text';
|
||||||
|
|
||||||
export default class SplitStation extends Group {
|
export default class SplitStation extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.z = 10;
|
this.z = 10;
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
|
@ -18,7 +18,7 @@ import { traverseLineElements } from '../utils/ShapeStatusCovert';
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
export default class Station extends Group {
|
export default class Station extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
@ -271,7 +271,7 @@ export default class Station extends Group {
|
|||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
point: {
|
point: {
|
||||||
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 3 / -2 + this.style.Station.StationControl.lamp.offset.x,
|
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||||
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
|
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
|
||||||
},
|
},
|
||||||
context: this.style.Station.StationControl.centerControl.buttonText,
|
context: this.style.Station.StationControl.centerControl.buttonText,
|
||||||
@ -292,6 +292,34 @@ export default class Station extends Group {
|
|||||||
});
|
});
|
||||||
this.add(this.arcBorder);
|
this.add(this.arcBorder);
|
||||||
}
|
}
|
||||||
|
if (this.style.Station.StationControl.centerControl.lightShow) {
|
||||||
|
this.controlLight = new ESingleControl({
|
||||||
|
_subType: 'light',
|
||||||
|
style: this.style,
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
point: {
|
||||||
|
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 6 / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||||
|
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
|
||||||
|
},
|
||||||
|
context: this.style.Station.StationControl.centerControl.lightText,
|
||||||
|
pop: false
|
||||||
|
});
|
||||||
|
this.add(this.controlLight);
|
||||||
|
const arcRect = this.controlLight.getArcBoundingRect();
|
||||||
|
this.lightArcBorder = new Rect({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
silent: true,
|
||||||
|
shape: arcRect,
|
||||||
|
style: {
|
||||||
|
lineDash: null,
|
||||||
|
stroke: this.style.Station.StationControl.lamp.stroke,
|
||||||
|
fill: this.style.Station.StationControl.lamp.fill
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.lightArcBorder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
createSubstationControl() { // 站控按钮
|
createSubstationControl() { // 站控按钮
|
||||||
|
@ -6,7 +6,7 @@ import Group from 'zrender/src/container/Group';
|
|||||||
import Text from 'zrender/src/graphic/Text';
|
import Text from 'zrender/src/graphic/Text';
|
||||||
|
|
||||||
export default class StationCounter extends Group {
|
export default class StationCounter extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
|
@ -6,7 +6,7 @@ import Text from 'zrender/src/graphic/Text';
|
|||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
|
|
||||||
export default class StationDelayUnlock extends Group {
|
export default class StationDelayUnlock extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
|
@ -47,7 +47,7 @@ class EDetain extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setColor(color) {
|
setColor(color) {
|
||||||
this.detain.setStyle('textFill', color);
|
this.detain && this.detain.setStyle('textFill', color);
|
||||||
}
|
}
|
||||||
|
|
||||||
recover() {
|
recover() {
|
||||||
|
@ -48,6 +48,10 @@ class EEmergentRhombus extends Group {
|
|||||||
this.hideMode();
|
this.hideMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setColor(color) {
|
||||||
|
this.emergent && this.emergent.setStyle('stroke', color);
|
||||||
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
// 紧急停车
|
// 紧急停车
|
||||||
model.emergencyClosed && this.showMode();
|
model.emergencyClosed && this.showMode();
|
||||||
|
@ -39,7 +39,7 @@ import EStationPlatform from './EStationPlatform';
|
|||||||
import {traverseLineElements, traverseStatusElements} from '../utils/ShapeStatusCovert';
|
import {traverseLineElements, traverseStatusElements} from '../utils/ShapeStatusCovert';
|
||||||
|
|
||||||
class StationStand extends Group {
|
class StationStand extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
@ -128,7 +128,15 @@ class StationStand extends Group {
|
|||||||
} else {
|
} else {
|
||||||
this.eachChild(elem => { elem.hide(); });
|
this.eachChild(elem => { elem.hide(); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setAshShow() {
|
||||||
|
this.solidStand && this.solidStand.setColor('#7F7F7F');
|
||||||
|
this.hollowStand && this.hollowStand.setColor('#7F7F7F');
|
||||||
|
this.gapStand && this.gapStand.setColor('#7F7F7F');
|
||||||
|
this.emergentRhombus && this.emergentRhombus.setColor('#7F7F7F');
|
||||||
|
this.detainNormal && this.detainNormal.setColor('#7F7F7F');
|
||||||
|
}
|
||||||
|
|
||||||
/** 恢复初始状态*/
|
/** 恢复初始状态*/
|
||||||
recover() {
|
recover() {
|
||||||
@ -143,11 +151,16 @@ class StationStand extends Group {
|
|||||||
// // 新版地图使用新版状态变更方式
|
// // 新版地图使用新版状态变更方式
|
||||||
this.recover();
|
this.recover();
|
||||||
|
|
||||||
// 更新状态
|
// 只响应前端自定义类型的状态变化
|
||||||
const currentTypeList = this.style.StationStand.elemnetType;
|
if (model._free) {
|
||||||
currentTypeList.forEach(element => {
|
this.setAshShow()
|
||||||
this[element].setState(model);
|
} else {
|
||||||
});
|
// 更新状态
|
||||||
|
const currentTypeList = this.style.StationStand.elemnetType;
|
||||||
|
currentTypeList.forEach(element => {
|
||||||
|
this[element].setState(model);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getBoundingRect() {
|
getBoundingRect() {
|
||||||
|
@ -6,14 +6,15 @@ import EFoldbackMode from './EFoldbackMode';
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
export default class StationTurnBack extends Group {
|
export default class StationTurnBack extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style, lineCode}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
this.zlevel = model.zlevel;
|
this.zlevel = model.zlevel;
|
||||||
this.z = 40;
|
this.z = 40;
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.style = style;
|
this.style = style;
|
||||||
|
this.lineCode = lineCode;
|
||||||
this.isShowShape = true;
|
this.isShowShape = true;
|
||||||
this.create();
|
this.create();
|
||||||
this.setState(model);
|
this.setState(model);
|
||||||
@ -71,7 +72,7 @@ export default class StationTurnBack extends Group {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
let turnName = '按计划执行';
|
let turnName = '按计划执行';
|
||||||
if (Vue.prototype.$jlmap.lineCode == '03') {
|
if (this.lineCode == '03') {
|
||||||
turnName = '关闭';
|
turnName = '关闭';
|
||||||
}
|
}
|
||||||
this.strategyText = new Text({
|
this.strategyText = new Text({
|
||||||
@ -144,18 +145,28 @@ export default class StationTurnBack extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setAshShow() {
|
||||||
|
this.control && this.control.setStyle({fill:'#FFF'});
|
||||||
|
}
|
||||||
|
|
||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model, tbStrategyId = null) {
|
setState(model, tbStrategyId = null) {
|
||||||
if (!this.isShowShape) return;
|
if (!this.isShowShape) return;
|
||||||
this.recover();
|
this.recover();
|
||||||
if (tbStrategyId) {
|
|
||||||
model.tbStrategyId = tbStrategyId;
|
// 只响应前端自定义类型的状态变化
|
||||||
model.optionList.forEach(item => {
|
if (model._free) {
|
||||||
if (item.id == tbStrategyId) {
|
this.setAshShow()
|
||||||
this.handleStatus(item.label);
|
} else {
|
||||||
}
|
if (tbStrategyId) {
|
||||||
});
|
model.tbStrategyId = tbStrategyId;
|
||||||
}
|
model.optionList.forEach(item => {
|
||||||
|
if (item.id == tbStrategyId) {
|
||||||
|
this.handleStatus(item.label);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
getShapeTipPoint() {
|
getShapeTipPoint() {
|
||||||
const rect = this.control.getBoundingRect();
|
const rect = this.control.getBoundingRect();
|
||||||
|
@ -13,10 +13,9 @@ import EMouse from './EMouse';
|
|||||||
import EHighlight from '../element/EHighlight';
|
import EHighlight from '../element/EHighlight';
|
||||||
import ETriangle from './ETriangle';
|
import ETriangle from './ETriangle';
|
||||||
import store from '@/store/index';
|
import store from '@/store/index';
|
||||||
import Vue from 'vue';
|
|
||||||
|
|
||||||
export default class Switch extends Group {
|
export default class Switch extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style, mapDevice}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
@ -25,7 +24,8 @@ export default class Switch extends Group {
|
|||||||
this.zlevel = model.zlevel;
|
this.zlevel = model.zlevel;
|
||||||
this.z = 6;
|
this.z = 6;
|
||||||
this.isShowShape = true;
|
this.isShowShape = true;
|
||||||
this.switchPosition = '';
|
this.switchPosition = '';
|
||||||
|
this.mapDevice = mapDevice;
|
||||||
this.triangle = new JTriangle(model.intersection, model.skew);
|
this.triangle = new JTriangle(model.intersection, model.skew);
|
||||||
this.create();
|
this.create();
|
||||||
this.createLockRect(); // 创建单锁矩形框显示
|
this.createLockRect(); // 创建单锁矩形框显示
|
||||||
@ -47,17 +47,19 @@ export default class Switch extends Group {
|
|||||||
create() {
|
create() {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
const style = this.style;
|
const style = this.style;
|
||||||
|
const sectionAModel = this.mapDevice[model.sectionACode];
|
||||||
const swPadding = style.Switch.core.length + style.Section.line.width / 2;
|
const sectionBModel = this.mapDevice[model.sectionBCode];
|
||||||
|
const sectionCModel = this.mapDevice[model.sectionCCode];
|
||||||
|
const rateOpen = style.Switch.core.rateOpen;
|
||||||
const directx = this.triangle.drictx;
|
const directx = this.triangle.drictx;
|
||||||
const directy = this.triangle.dricty;
|
const directy = this.triangle.dricty;
|
||||||
const switchWidth1 = style.Section.line.width / 2;
|
const switchWidth1 = style.Section.line.width / 2;
|
||||||
|
|
||||||
let directxA = 1;
|
let directxA = 1;
|
||||||
const sectionAModel = Vue.prototype.$jlmap.mapDevice[model.sectionACode];
|
|
||||||
const sectionBModel = Vue.prototype.$jlmap.mapDevice[model.sectionBCode];
|
|
||||||
let sectionATriangle = new JTriangle(sectionAModel.points[0], sectionAModel.points[1]);
|
let sectionATriangle = new JTriangle(sectionAModel.points[0], sectionAModel.points[1]);
|
||||||
let sectionBTriangle = new JTriangle(sectionBModel.points[0], sectionBModel.points[1]);
|
let sectionBTriangle = new JTriangle(sectionBModel.points[0], sectionBModel.points[1]);
|
||||||
|
let sectionCTriangle = new JTriangle(sectionCModel.points[0], sectionCModel.points[1]);
|
||||||
|
|
||||||
const sectionAPoint = { x: model.intersection.x, y: model.intersection.y };
|
const sectionAPoint = { x: model.intersection.x, y: model.intersection.y };
|
||||||
if (sectionAModel.points[0].x == model.intersection.x && sectionAModel.points[0].y == model.intersection.y) {
|
if (sectionAModel.points[0].x == model.intersection.x && sectionAModel.points[0].y == model.intersection.y) {
|
||||||
sectionATriangle = new JTriangle(sectionAModel.points[0], sectionAModel.points[1]);
|
sectionATriangle = new JTriangle(sectionAModel.points[0], sectionAModel.points[1]);
|
||||||
@ -74,6 +76,17 @@ export default class Switch extends Group {
|
|||||||
if (sectionBModel.points[sectionBModel.points.length - 1].x == model.intersection.x && sectionBModel.points[sectionBModel.points.length - 1].y == model.intersection.y) {
|
if (sectionBModel.points[sectionBModel.points.length - 1].x == model.intersection.x && sectionBModel.points[sectionBModel.points.length - 1].y == model.intersection.y) {
|
||||||
sectionBTriangle = new JTriangle(sectionBModel.points[sectionBModel.points.length - 2], sectionBModel.points[sectionBModel.points.length - 1]);
|
sectionBTriangle = new JTriangle(sectionBModel.points[sectionBModel.points.length - 2], sectionBModel.points[sectionBModel.points.length - 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sectionCModel.points[0].x == model.intersection.x && sectionCModel.points[0].y == model.intersection.y) {
|
||||||
|
sectionCTriangle = new JTriangle(sectionCModel.points[0], sectionCModel.points[1]);
|
||||||
|
}
|
||||||
|
if (sectionCModel.points[sectionCModel.points.length - 1].x == model.intersection.x && sectionCModel.points[sectionCModel.points.length - 1].y == model.intersection.y) {
|
||||||
|
sectionCTriangle = new JTriangle(sectionCModel.points[sectionCModel.points.length - 2], sectionCModel.points[sectionCModel.points.length - 1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
const swPadding = rateOpen
|
||||||
|
? sectionCTriangle.getLength() / 2
|
||||||
|
: style.Switch.core.length + style.Section.line.width / 2;
|
||||||
const drictyyA = sectionATriangle.dricty;
|
const drictyyA = sectionATriangle.dricty;
|
||||||
const point1 = [model.intersection.x + directx * this.triangle.getCotRate() * swPadding, model.intersection.y + directy * swPadding];
|
const point1 = [model.intersection.x + directx * this.triangle.getCotRate() * swPadding, model.intersection.y + directy * swPadding];
|
||||||
const point2 = [model.intersection.x, model.intersection.y];
|
const point2 = [model.intersection.x, model.intersection.y];
|
||||||
@ -89,7 +102,9 @@ export default class Switch extends Group {
|
|||||||
onmouseout: () => { this.name.getArrowText().hide(); }
|
onmouseout: () => { this.name.getArrowText().hide(); }
|
||||||
});
|
});
|
||||||
|
|
||||||
const relocShelterLength = 15;
|
const relocShelterLength = rateOpen
|
||||||
|
? sectionBTriangle.getLength() / 2
|
||||||
|
: 15;
|
||||||
const rpoint1 = [sectionAPoint.x - directxA * (relocShelterLength * sectionBTriangle.getCosRate()), sectionAPoint.y - drictyyA * relocShelterLength * sectionBTriangle.getSinRate()];
|
const rpoint1 = [sectionAPoint.x - directxA * (relocShelterLength * sectionBTriangle.getCosRate()), sectionAPoint.y - drictyyA * relocShelterLength * sectionBTriangle.getSinRate()];
|
||||||
const rpoint2 = [sectionAPoint.x, sectionAPoint.y];
|
const rpoint2 = [sectionAPoint.x, sectionAPoint.y];
|
||||||
const rpoint3 = [sectionAPoint.x + directxA * (switchWidth1 * sectionATriangle.getCosRate()), sectionAPoint.y + drictyyA * switchWidth1 * sectionATriangle.getSinRate()];
|
const rpoint3 = [sectionAPoint.x + directxA * (switchWidth1 * sectionATriangle.getCosRate()), sectionAPoint.y + drictyyA * switchWidth1 * sectionATriangle.getSinRate()];
|
||||||
@ -308,7 +323,7 @@ export default class Switch extends Group {
|
|||||||
this.shapeModelB.hide();
|
this.shapeModelB.hide();
|
||||||
this.shapeModelC.hide();
|
this.shapeModelC.hide();
|
||||||
} else {
|
} else {
|
||||||
this.shapeModelB.show();
|
this.shapeModelB.show();
|
||||||
this.shapeModelB.setColor(this.style.Section.line.spareColor);
|
this.shapeModelB.setColor(this.style.Section.line.spareColor);
|
||||||
this.shapeModelC.show();
|
this.shapeModelC.show();
|
||||||
this.shapeModelC.setColor(this.style.backgroundColor);
|
this.shapeModelC.setColor(this.style.backgroundColor);
|
||||||
@ -399,10 +414,10 @@ export default class Switch extends Group {
|
|||||||
this.shapeModelC.hide();
|
this.shapeModelC.hide();
|
||||||
} else {
|
} else {
|
||||||
if (this.model.switchFaultCode && fault) {
|
if (this.model.switchFaultCode && fault) {
|
||||||
const switchFault = store.getters['map/getDeviceByCode'](this.model.switchFaultCode);
|
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
||||||
switchFault.instance.setControlColor('#F00', true);
|
switchFault.instance.setControlColor('#F00', true);
|
||||||
} else if (this.model.switchFaultCode && !fault) {
|
} else if (this.model.switchFaultCode && !fault) {
|
||||||
const switchFault = store.getters['map/getDeviceByCode'](this.model.switchFaultCode);
|
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
||||||
switchFault.instance.setControlColor(this.style.backgroundColor, false);
|
switchFault.instance.setControlColor(this.style.backgroundColor, false);
|
||||||
}
|
}
|
||||||
// stopAnimation
|
// stopAnimation
|
||||||
@ -552,11 +567,11 @@ export default class Switch extends Group {
|
|||||||
|
|
||||||
// 处理岔芯颜色
|
// 处理岔芯颜色
|
||||||
setSectionState(state) {
|
setSectionState(state) {
|
||||||
const sectionC = store.getters['map/getDeviceByCode'](state.sectionCCode);
|
const sectionC = this.mapDevice[state.sectionCCode];
|
||||||
if (sectionC && state.reversePosition && !state.blockade) {
|
if (sectionC && state.reversePosition && !state.blockade) {
|
||||||
this.setSwitchModelStatus(this.shapeModelA, sectionC);
|
this.setSwitchModelStatus(this.shapeModelA, sectionC);
|
||||||
}
|
}
|
||||||
const sectionA = store.getters['map/getDeviceByCode'](state.sectionACode);
|
const sectionA = this.mapDevice[state.sectionACode];
|
||||||
if (sectionA && state.normalPosition && !this.style.Switch.core.graphShow && !state.blockade) {
|
if (sectionA && state.normalPosition && !this.style.Switch.core.graphShow && !state.blockade) {
|
||||||
this.setSwitchModelStatus(this.shapeModelB, sectionA);
|
this.setSwitchModelStatus(this.shapeModelB, sectionA);
|
||||||
}
|
}
|
||||||
@ -628,40 +643,60 @@ export default class Switch extends Group {
|
|||||||
}
|
}
|
||||||
setState(model) {
|
setState(model) {
|
||||||
if (!this.isShowShape) return;
|
if (!this.isShowShape) return;
|
||||||
this.recover();
|
this.recover();
|
||||||
this.setSwitchFault(model.fault, model.normalPosition, model.reversePosition);
|
|
||||||
if (model.normalPosition) {
|
|
||||||
this.switchPosition = 'normal';
|
|
||||||
this.setLocationAction(model); /** 定位*/
|
|
||||||
} else if (model.reversePosition) {
|
|
||||||
this.switchPosition = 'reverse';
|
|
||||||
this.setInversionAction(model); /** 反位*/
|
|
||||||
} else {
|
|
||||||
this.setLossAction(model.fault); // 失去
|
|
||||||
}
|
|
||||||
model.isCiConfirm && this.setCiConfirm(); // 道岔使能显示
|
|
||||||
|
|
||||||
model.singleLock && this.setMonolock(model.normalPosition, model.reversePosition); // 道岔单锁
|
// 只响应前端自定义类型的状态变化
|
||||||
model.blockade && this.block(model.normalPosition, model.reversePosition); // 道岔封锁
|
if (model._free) {
|
||||||
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
|
if (model.normalPosition) {
|
||||||
const path = window.location.href;
|
this.switchPosition = 'normal';
|
||||||
if (!path.includes('/map/draw')) {
|
this.setLocationAction(model); /** 定位*/
|
||||||
this.setSectionState(this.model); // 处理元素颜色
|
if (model.routeLock) {
|
||||||
}
|
this.setSectionState(model);
|
||||||
model.fpLock && this.handleFpLock(); // 道岔侧防
|
}
|
||||||
model.routeLock && this.handleRouteLock(); // 道岔进路锁闭
|
} else if (model.reversePosition) {
|
||||||
model.overlapLock && this.handleOverlapLock(); // 道岔进路延续保护
|
this.switchPosition = 'reverse';
|
||||||
// this.interlockingReserved(); // 联锁预留道岔
|
this.setInversionAction(model); /** 反位*/
|
||||||
model.preReset && this.preReset(model.normalPosition, model.reversePosition); // 道岔预复位
|
if (model.routeLock) {
|
||||||
|
this.setSectionState(model);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.setAshShow()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.setSwitchFault(model.fault, model.normalPosition, model.reversePosition);
|
||||||
|
if (model.normalPosition) {
|
||||||
|
this.switchPosition = 'normal';
|
||||||
|
this.setLocationAction(model); /** 定位*/
|
||||||
|
} else if (model.reversePosition) {
|
||||||
|
this.switchPosition = 'reverse';
|
||||||
|
this.setInversionAction(model); /** 反位*/
|
||||||
|
} else {
|
||||||
|
this.setLossAction(model.fault); // 失去
|
||||||
|
}
|
||||||
|
model.isCiConfirm && this.setCiConfirm(); // 道岔使能显示
|
||||||
|
|
||||||
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
|
model.singleLock && this.setMonolock(model.normalPosition, model.reversePosition); // 道岔单锁
|
||||||
const switchModel = Vue.prototype.$jlmap.mapDevice[model.code];
|
model.blockade && this.block(model.normalPosition, model.reversePosition); // 道岔封锁
|
||||||
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
|
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
|
||||||
sectionB && sectionB.instance && sectionB.instance.setState(sectionB);
|
const path = window.location.href;
|
||||||
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
|
if (!path.includes('/map/draw')) {
|
||||||
sectionC && sectionC.instance && sectionC.instance.setState(sectionC);
|
this.setSectionState(this.model); // 处理元素颜色
|
||||||
}
|
}
|
||||||
model.noStatus && this.setAshShow();
|
model.fpLock && this.handleFpLock(); // 道岔侧防
|
||||||
|
model.routeLock && this.handleRouteLock(); // 道岔进路锁闭
|
||||||
|
model.overlapLock && this.handleOverlapLock(); // 道岔进路延续保护
|
||||||
|
// this.interlockingReserved(); // 联锁预留道岔
|
||||||
|
model.preReset && this.preReset(model.normalPosition, model.reversePosition); // 道岔预复位
|
||||||
|
|
||||||
|
if (this.style.Switch.sectionAction.flag) { // 哈尔滨线路处理道岔相关区段颜色
|
||||||
|
const switchModel = this.mapDevice[model.code];
|
||||||
|
const sectionB = this.mapDevice[switchModel.sectionBCode];
|
||||||
|
sectionB && sectionB.instance && sectionB.instance.setState(sectionB);
|
||||||
|
const sectionC = this.mapDevice[switchModel.sectionCCode];
|
||||||
|
sectionC && sectionC.instance && sectionC.instance.setState(sectionC);
|
||||||
|
}
|
||||||
|
model.noStatus && this.setAshShow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setLimitState(flag, limitValue) {
|
setLimitState(flag, limitValue) {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import Text from 'zrender/src/graphic/Text';
|
import Text from 'zrender/src/graphic/Text';
|
||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||||
import Vue from 'vue';
|
|
||||||
|
|
||||||
export default class Text2 extends Group {
|
export default class Text2 extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style, lineCode}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
@ -12,7 +11,8 @@ export default class Text2 extends Group {
|
|||||||
this.zlevel = model.zlevel;
|
this.zlevel = model.zlevel;
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.style = style;
|
this.style = style;
|
||||||
this.z = 6;
|
this.z = 6;
|
||||||
|
this.lineCode = lineCode;
|
||||||
this.isShowShape = true;
|
this.isShowShape = true;
|
||||||
this.create();
|
this.create();
|
||||||
this.setState(model);
|
this.setState(model);
|
||||||
@ -83,7 +83,7 @@ export default class Text2 extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
screenShow() {
|
screenShow() {
|
||||||
if (Vue.prototype.$jlmap.lineCode == '06') { // 宁波线路隐藏
|
if (this.lineCode == '06') { // 宁波线路隐藏
|
||||||
this.text && this.text.hide();
|
this.text && this.text.hide();
|
||||||
} else {
|
} else {
|
||||||
this.text && this.text.show();
|
this.text && this.text.show();
|
||||||
|
@ -8,7 +8,7 @@ import EDirection from './EDirection';
|
|||||||
|
|
||||||
/** 列车 */
|
/** 列车 */
|
||||||
export default class Train extends Group {
|
export default class Train extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
|
@ -5,7 +5,7 @@ import EMouse from './EMouse';
|
|||||||
import store from '@/store/index';
|
import store from '@/store/index';
|
||||||
|
|
||||||
class TrainWindow extends Group {
|
class TrainWindow extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
|
@ -6,7 +6,7 @@ import EControl from '../element/EControl';
|
|||||||
import EMouse from './EMouse';
|
import EMouse from './EMouse';
|
||||||
|
|
||||||
export default class ZcControl extends Group {
|
export default class ZcControl extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.z = 20;
|
this.z = 20;
|
||||||
this._code = model.code;
|
this._code = model.code;
|
||||||
@ -59,11 +59,21 @@ export default class ZcControl extends Group {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setAshShow() {
|
||||||
|
this.control && this.control.setControlColor('#7F7F7F');
|
||||||
|
}
|
||||||
|
|
||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.recover();
|
this.recover();
|
||||||
model.fault == 'FAULT' && this.fault();
|
|
||||||
if (!this.isShowShape) return;
|
// 只响应前端自定义类型的状态变化
|
||||||
|
if (model._free) {
|
||||||
|
this.setAshShow()
|
||||||
|
} else {
|
||||||
|
model.fault == 'FAULT' && this.fault();
|
||||||
|
if (!this.isShowShape) return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
recover() {
|
recover() {
|
||||||
|
@ -2,7 +2,7 @@ import Group from 'zrender/src/container/Group';
|
|||||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
|
|
||||||
export default class checkBox extends Group {
|
export default class checkBox extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, {style}) {
|
||||||
super();
|
super();
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this._type = model._type;
|
this._type = model._type;
|
||||||
|
@ -87,7 +87,7 @@ function shapefactory(device, jmap) {
|
|||||||
const shape = mapShape[type];
|
const shape = mapShape[type];
|
||||||
if (shape instanceof Function) {
|
if (shape instanceof Function) {
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
return new shape(device, jmap.style);
|
return new shape(device, jmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,6 +418,13 @@ export const menuOperate = {
|
|||||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
|
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 设置/取消强制点灯
|
||||||
|
StationLight: {
|
||||||
|
setOrCancelForceLight: {
|
||||||
|
operation: OperationEvent.Station,
|
||||||
|
cmdType: CMD.Station.CMD_STATION_SET_OR_CANCEL_FORCE_PHYSICAL_SIGNAL
|
||||||
|
}
|
||||||
|
},
|
||||||
AxleReset:{
|
AxleReset:{
|
||||||
// 设置计轴复位
|
// 设置计轴复位
|
||||||
SetAxleReset:{
|
SetAxleReset:{
|
||||||
|
@ -1092,17 +1092,17 @@ export default {
|
|||||||
{ name: '开放信号', commandTip: '设置信号机为开放状态', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
{ name: '开放信号', commandTip: '设置信号机为开放状态', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||||
{ name: '解封信号', commandTip: '解封信号机,允许开放', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
{ name: '解封信号', commandTip: '解封信号机,允许开放', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||||
|
|
||||||
{ name: '自排单开', commandTip: '设置单架信号机处于ATS自动排列进路模式', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (stationControl) => !this.modeMatch || stationControl.atsControl },
|
{ name: '自排单开', commandTip: '设置单架信号机处于ATS自动排列进路模式', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (stationControl) => !this.modeMatch }, // || stationControl.atsControl
|
||||||
{ name: '自排单关', commandTip: '取消单架信号机处于ATS自动排列进路模式', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (stationControl) => !this.modeMatch || !stationControl.atsControl },
|
{ name: '自排单关', commandTip: '取消单架信号机处于ATS自动排列进路模式', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (stationControl) => !this.modeMatch }, // || !stationControl.atsControl
|
||||||
{ name: '追踪单开', commandTip: '设置单架信号机处于联锁自动排列进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch || stationControl.ciControl },
|
{ name: '追踪单开', commandTip: '设置单架信号机处于联锁自动排列进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch }, // || stationControl.ciControl
|
||||||
{ name: '追踪单关', commandTip: '取消单架信号机处于联锁自动排列进路', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch || !stationControl.ciControl },
|
{ name: '追踪单关', commandTip: '取消单架信号机处于联锁自动排列进路', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch }, // || !stationControl.ciControl
|
||||||
|
|
||||||
{ name: '开放引导', commandTip: '开放引导信号', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
{ name: '开放引导', commandTip: '开放引导信号', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch },
|
||||||
{ name: '车队单开', commandTip: '对单架信号机开启车队模式,主要是信号机不关闭的情况下排列所有进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
{ name: '车队单开', commandTip: '对单架信号机开启车队模式,主要是信号机不关闭的情况下排列所有进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||||
{ name: '车队单关', commandTip: '对单架信号机关闭车队模式', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
{ name: '车队单关', commandTip: '对单架信号机关闭车队模式', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||||
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
{ name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch },
|
||||||
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
|
{ name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }
|
||||||
];
|
];
|
||||||
this.stationParamList = this.$store.state.training.prdType === '01' ? [
|
this.stationParamList = this.$store.state.training.prdType === '01' ? [
|
||||||
{ name: '关站信号', commandTip: '封锁车站所有信号机', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch || !['Local'].includes(stationControl.controlMode) }
|
{ name: '关站信号', commandTip: '封锁车站所有信号机', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch || !['Local'].includes(stationControl.controlMode) }
|
||||||
] : [
|
] : [
|
||||||
|
@ -0,0 +1,158 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="ningbo-01__systerm confirm-control-speed"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="340px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<div style="border: #c0c0c0 1px solid;padding: 5px;">
|
||||||
|
<div style="position: relative;top: -13px;width: 40px;background: #f0f0f0;text-align: center;">准备</div>
|
||||||
|
<div>按钮</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-select v-model="value1" :disabled="true" size="mini">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-button :disabled="confirmIndex" @click="confirm1">确认</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div style="border: #c0c0c0 1px solid; padding: 5px;margin-top: 10px;">
|
||||||
|
<div style="position: relative;top: -13px;width: 40px;background: #f0f0f0;text-align: center;">确认</div>
|
||||||
|
<div>按钮</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-select v-model="value2" size="mini">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-button :disabled="!confirmIndex" @click="confirm2">确认</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<el-row style="margin-top: 10px;">
|
||||||
|
<el-col :span="6"><div style="height: 30px;line-height: 30px;">操作倒计时</div></el-col>
|
||||||
|
<el-col :span="18"><div class="status-box" style="height: 30px;line-height: 30px;">{{ time }}</div></el-col>
|
||||||
|
</el-row>
|
||||||
|
<div style="margin-top: 10px;">状态</div>
|
||||||
|
<div class="status-box">{{ status }}</div>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-button @click="doClose">关闭</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
export default {
|
||||||
|
name: 'ConfirmTip',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
message: '',
|
||||||
|
operation: '',
|
||||||
|
title: '功能按钮HILC',
|
||||||
|
value1: '',
|
||||||
|
value2: '',
|
||||||
|
options: [
|
||||||
|
{ label: '车站折返变通', value: '1' },
|
||||||
|
{ label: '站遥控按钮', value: '2' },
|
||||||
|
{ label: 'FSA', value: '3'},
|
||||||
|
{ label: 'NJYXLZ', value: '4'},
|
||||||
|
{ label: '强制点灯', value: '5' }
|
||||||
|
],
|
||||||
|
time: '',
|
||||||
|
status: '',
|
||||||
|
confirmIndex: false,
|
||||||
|
timer: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
confirmId() {
|
||||||
|
return this.operation.domId;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate) {
|
||||||
|
this.message = operate.message || '';
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.confirmIndex = false;
|
||||||
|
this.operation = operate.operation;
|
||||||
|
if (this.operation === OperationEvent.StationLight.SetOrCancelForceLight.confirm1) {
|
||||||
|
this.value1 = '5';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.dialogShow = false;
|
||||||
|
if (this.timer) { clearInterval(this.timer); }
|
||||||
|
},
|
||||||
|
confirm1() {
|
||||||
|
this.confirmIndex = true;
|
||||||
|
this.time = 30;
|
||||||
|
this.timer = setInterval(() => {
|
||||||
|
this.time = this.time - 1;
|
||||||
|
if (this.time < 0) { this.doClose(); }
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
confirm2() {
|
||||||
|
if (this.value1 !== this.value2) {
|
||||||
|
this.status = '确认操作失败!';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.operation === OperationEvent.StationLight.SetOrCancelForceLight.confirm1) {
|
||||||
|
commitOperate({operate: this.operation, cmdType: CMD.Station.CMD_STATION_SET_OR_CANCEL_FORCE_PHYSICAL_SIGNAL}, {}, 2).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.confirm-control-speed .context {
|
||||||
|
padding-bottom: 40px !important;
|
||||||
|
border: 1px solid lightgray;
|
||||||
|
}
|
||||||
|
.ningbo-01__systerm .el-dialog .el-button{
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.status-box {
|
||||||
|
width: 100%;
|
||||||
|
height: 70px;
|
||||||
|
border-top: #928F92 1px solid;
|
||||||
|
border-left: #928F92 1px solid;
|
||||||
|
border-right: #E6E3E6 1px solid;
|
||||||
|
border-bottom: #E6E3E6 1px solid;
|
||||||
|
}
|
||||||
|
</style>
|
@ -46,7 +46,7 @@ export default {
|
|||||||
},
|
},
|
||||||
confirmId() {
|
confirmId() {
|
||||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||||
return OperationEvent.Signal.arrangementRoute.secondaryConfirm.operation;
|
return OperationEvent.Signal.arrangementRoute.secondaryConfirm.operation.domId;
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,86 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="ningbo-01__systerm confirm-control-speed"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="340px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<div class="message-box" v-html="$escapeHTML(message)" />
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-button :id="confirmId" type="primary" @click="confirm">是</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-button @click="doClose">否</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
export default {
|
||||||
|
name: 'ConfirmTip',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
message: '',
|
||||||
|
operation: '',
|
||||||
|
title: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
confirmId() {
|
||||||
|
return this.operation.domId;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate) {
|
||||||
|
this.message = operate.message || '';
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.operation = operate.operation;
|
||||||
|
const selected = this.$store.getters['menuOperation/selected'];
|
||||||
|
this.title = '宁波一号线-' + selected.name;
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
commitOperate({operate: this.operation}, {}, 1).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$emit('forceLightConfirm1');
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.dialogShow = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.confirm-control-speed .context {
|
||||||
|
padding-bottom: 40px !important;
|
||||||
|
border: 1px solid lightgray;
|
||||||
|
}
|
||||||
|
.ningbo-01__systerm .el-dialog .el-button{
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.message-box {
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
268
src/jmapNew/theme/ningbo_01/menus/dialog/mapVisual.vue
Normal file
268
src/jmapNew/theme/ningbo_01/menus/dialog/mapVisual.vue
Normal file
@ -0,0 +1,268 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
ref="jlmapCanvas"
|
||||||
|
class="jlmap-canvas"
|
||||||
|
:style="{ width: width + 'px', height: height + 'px' }"
|
||||||
|
>
|
||||||
|
<div :id="canvasId" class="display_canvas" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Vue from "vue";
|
||||||
|
import Jlmap from "@/jmapNew/map";
|
||||||
|
import { parser } from "@/jmapNew/utils/parser";
|
||||||
|
import { deepAssign } from "@/utils/index";
|
||||||
|
import deviceType from "@/jmapNew/constant/deviceType";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "JLocalmapVisual",
|
||||||
|
props: {
|
||||||
|
width: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true,
|
||||||
|
offset: {
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
},
|
||||||
|
map: null,
|
||||||
|
mapDevice: {},
|
||||||
|
routeData: [],
|
||||||
|
autoReentryData: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
canvasId() {
|
||||||
|
return ["map", Math.random().toFixed(5) * 100000].join("_");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
"$store.state.config.canvasSizeCount": function (val) {
|
||||||
|
this.resetSize();
|
||||||
|
},
|
||||||
|
"$store.state.training.prdType": function (val) {
|
||||||
|
if (val) {
|
||||||
|
this.changePrdType(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (this.map) {
|
||||||
|
this.map.dispose();
|
||||||
|
this.map = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
document.getElementById(this.canvasId).oncontextmenu = function (e) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const prdType = this.$store.state.training.prdType;
|
||||||
|
|
||||||
|
let showMode = "";
|
||||||
|
if (prdType == "01") {
|
||||||
|
showMode = "03";
|
||||||
|
} else if (prdType == "02") {
|
||||||
|
showMode = "02";
|
||||||
|
}
|
||||||
|
|
||||||
|
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: prdType,
|
||||||
|
previewOrMapDraw: true,
|
||||||
|
showMode: showMode,
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
window.document.oncontextmenu = function () {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
},
|
||||||
|
loadData(map) {
|
||||||
|
try {
|
||||||
|
this.setMap(map);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR] ", error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 重置jlmap宽高
|
||||||
|
resetSize() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.map && this.map.resize({ width: this.width, height: this.height });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 设置显示图层
|
||||||
|
setLevelVisible(levels) {
|
||||||
|
this.map && this.map.setLevelVisible(levels);
|
||||||
|
},
|
||||||
|
// 设置新的地图数据
|
||||||
|
setMap(map) {
|
||||||
|
if (map && map.skinVO) {
|
||||||
|
const showConfig = this.map.getShowConfig();
|
||||||
|
this.mapDevice = parser(map, map.skinVO.code, showConfig);
|
||||||
|
this.routeData = this.$store.state.map.routeData;
|
||||||
|
this.autoReentryData = this.$store.state.map.autoReentryData;
|
||||||
|
this.map.setMap(map, this.mapDevice, {
|
||||||
|
routeData: this.routeData,
|
||||||
|
autoReentryData: this.autoReentryData,
|
||||||
|
});
|
||||||
|
this.setMapFree();
|
||||||
|
} else {
|
||||||
|
this.mapDevice = {};
|
||||||
|
this.map.clear();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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, offset) {
|
||||||
|
this.map.setCenterWithOffset(code, offset);
|
||||||
|
},
|
||||||
|
// 更新地图数据
|
||||||
|
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];
|
||||||
|
},
|
||||||
|
// 综合演练切换现地行调模式
|
||||||
|
changePrdType(val) {
|
||||||
|
const nameList = Object.keys(this.$store.state.map.map || {});
|
||||||
|
let list = [];
|
||||||
|
let showMode = "";
|
||||||
|
nameList.forEach((item) => {
|
||||||
|
if (item !== "skinVO") {
|
||||||
|
const data = this.$store.state.map.map[item];
|
||||||
|
if (data && data.constructor === Array) {
|
||||||
|
list = [...list, ...data];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (val === "01") {
|
||||||
|
showMode = "03";
|
||||||
|
} else if (val === "02") {
|
||||||
|
showMode = "02";
|
||||||
|
}
|
||||||
|
this.map.updatePrdType(list, val, showMode);
|
||||||
|
},
|
||||||
|
setShowStation(stationCode, setCenter) {
|
||||||
|
const nameList = Object.keys(this.$store.state.map.map);
|
||||||
|
let list = [];
|
||||||
|
nameList.forEach((item) => {
|
||||||
|
if (
|
||||||
|
this.$store.state.map.map[item] &&
|
||||||
|
this.$store.state.map.map[item].constructor === Array
|
||||||
|
) {
|
||||||
|
if (item === "trainList") {
|
||||||
|
this.$store.state.map.map[item].forEach((elem) => {
|
||||||
|
elem && list.push(elem);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
list = [...list, ...this.$store.state.map.map[item]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.map.updateShowStation(list, stationCode);
|
||||||
|
!setCenter && this.setCenter(stationCode);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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>
|
84
src/jmapNew/theme/ningbo_01/menus/dialog/passwordInput.vue
Normal file
84
src/jmapNew/theme/ningbo_01/menus/dialog/passwordInput.vue
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="ningbo-01__systerm confirm-control-speed"
|
||||||
|
title="请输入密码"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="340px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-row justify="center" style="height: 40px;">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div style="height: 40px;line-height: 40px;color: #000;">密码:</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-input ref="passwordBox" v-model="password" size="mini" show-password />
|
||||||
|
<div v-if="messageShow" style="color: #f00;">{{ message }}</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-button :id="confirmId" type="primary" @click="confirm">确 定</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-button @click="doClose">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import { commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
export default {
|
||||||
|
name: 'PasswordInput',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
password: '',
|
||||||
|
operation: '',
|
||||||
|
message: '密码不正确,请重新输入!',
|
||||||
|
messageShow: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
confirmId() {
|
||||||
|
return this.operation.domId;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doClose() {
|
||||||
|
this.show = false;
|
||||||
|
},
|
||||||
|
doShow(operate) {
|
||||||
|
this.show = true;
|
||||||
|
this.password = '';
|
||||||
|
this.messageShow = false;
|
||||||
|
this.operation = operate.operation;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.passwordBox.focus();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
if ( this.password !== 'root' ) {
|
||||||
|
this.messageShow = true;
|
||||||
|
} else {
|
||||||
|
commitOperate({operation: this.operation}, {}, 1).then(({valid, operate}) => {
|
||||||
|
if (valid && this.operation === OperationEvent.StationLight.SetOrCancelForceLight.password) {
|
||||||
|
this.show = false;
|
||||||
|
this.$emit('forceLightConfirm');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -1,32 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="350px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" :width="showExpand? '1100px': '300px'" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
<el-row class="header">
|
<el-row :gutter="24">
|
||||||
<el-col :span="11"><span>集中站</span></el-col>
|
<el-col :span="showExpand? 6: 24">
|
||||||
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
|
<el-row class="header">
|
||||||
</el-row>
|
<el-col :span="11"><span>集中站</span></el-col>
|
||||||
<el-row>
|
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
|
||||||
<el-col :span="11">
|
</el-row>
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
<el-row>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row style="margin-top: 10px; line-height: 30px;">
|
||||||
|
<el-col :span="11"><span>进路列表</span></el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-button class="expand" @click="expandPath">展开进路预览</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; height: 460px; margin-top:10px" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">
|
||||||
|
<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />
|
||||||
|
</el-table>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="8" :offset="4">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="4">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="2">
|
<el-col v-show="showExpand" :span="showExpand? 18: 0">
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
<map-visual ref="map" :width="780" :height="600" />
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row style="margin-top: 10px; line-height: 30px;">
|
|
||||||
<el-col :span="11"><span>进路列表</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<!-- <el-button class="expand" @click="expandPath">展开进路预览</el-button> -->
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; height: 120px; margin-top:10px" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">
|
|
||||||
<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />
|
|
||||||
</el-table>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||||
@ -36,23 +43,28 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
import { mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import { dbReadData } from '@/utils/indexedDb';
|
||||||
import ConfirmTip from './childDialog/confirmTip';
|
import ConfirmTip from './childDialog/confirmTip';
|
||||||
|
import MapVisual from './mapVisual';
|
||||||
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteSelection',
|
name: 'RouteSelection',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
ConfirmTip
|
ConfirmTip,
|
||||||
|
MapVisual
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tempData: [],
|
tempData: [],
|
||||||
beforeSectionList: [],
|
beforeSectionList: [],
|
||||||
|
beforeSwitchList: [],
|
||||||
|
showExpand: true,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
selected: null,
|
selected: null,
|
||||||
@ -60,10 +72,11 @@ export default {
|
|||||||
operation: '',
|
operation: '',
|
||||||
display: true,
|
display: true,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: '',
|
signalName: '',
|
||||||
|
mapData: null,
|
||||||
tableStyle: {
|
tableStyle: {
|
||||||
'border-bottom': 'none'
|
'border-bottom': 'none'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -81,7 +94,7 @@ export default {
|
|||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '进路设置';
|
return '进路设置';
|
||||||
},
|
},
|
||||||
@ -99,10 +112,13 @@ export default {
|
|||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map));
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
expandPath() {
|
expandPath() {
|
||||||
console.log('展开进路预览');
|
this.showExpand = !this.showExpand;
|
||||||
},
|
},
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
@ -126,12 +142,21 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
|
||||||
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
|
this.loadData();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
loadData() {
|
||||||
|
this.beforeSwitchList = [];
|
||||||
|
this.beforeSectionList = [];
|
||||||
|
if (this.mapData) {
|
||||||
|
this.$refs.map.loadData(this.mapData);
|
||||||
|
}
|
||||||
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
@ -144,60 +169,80 @@ export default {
|
|||||||
restoreBeforeDevices() {
|
restoreBeforeDevices() {
|
||||||
// 恢复之前选中设备
|
// 恢复之前选中设备
|
||||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||||
this.beforeSectionList.forEach(elem => {
|
this.beforeSectionList.forEach(el => {
|
||||||
elem.cutOff = false;
|
el.routeLock = false;
|
||||||
|
el.preBlue = false;
|
||||||
|
el.preGreen = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
if (this.beforeSwitchList && this.beforeSwitchList.length) {
|
||||||
this.beforeSectionList = [];
|
this.beforeSwitchList.forEach(el => {
|
||||||
|
el.normalPosition = false;
|
||||||
|
el.reversePosition = false;
|
||||||
|
el.routeLock = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$refs.map.updateMapDevice([...this.beforeSectionList, ...this.beforeSwitchList]);
|
||||||
|
|
||||||
|
this.beforeSectionList = [];
|
||||||
|
this.beforeSwitchList = [];
|
||||||
},
|
},
|
||||||
clickEvent(row, event, column) {
|
clickEvent(row, event, column) {
|
||||||
this.row = row;
|
this.row = row;
|
||||||
if (row) {
|
if (row) {
|
||||||
// 恢复进路区段的切除状态
|
// 恢复进路区段的切除状态
|
||||||
this.row.canSetting = true;
|
this.row.canSetting = true;
|
||||||
this.restoreBeforeDevices();
|
this.restoreBeforeDevices();
|
||||||
const containSectionList = [];
|
|
||||||
|
const containSectionList = [];
|
||||||
|
const containSwitchList = [];
|
||||||
if (!row.setting) {
|
if (!row.setting) {
|
||||||
// 设置选中区段为切除状态
|
const signalBegin = this.$refs.map.getDeviceByCode(row.startSignalCode);
|
||||||
|
const signalEnd = this.$refs.map.getDeviceByCode(row.endSignalCode);
|
||||||
|
const diff = signalBegin.position.x - signalEnd.position.x;
|
||||||
|
const code = diff > 0? row.endSignalCode : row.startSignalCode;
|
||||||
|
const switchCodeList = [];
|
||||||
|
|
||||||
|
this.$refs.map.setCenterWithOffset(code, 0);
|
||||||
if (row.routeSectionList && row.routeSectionList.length) {
|
if (row.routeSectionList && row.routeSectionList.length) {
|
||||||
// 设置新选的进路区段为切除状态
|
row.routeSectionList.forEach(code => {
|
||||||
row.routeSectionList.forEach(elem => {
|
const section = deepAssign({}, this.$refs.map.getDeviceByCode(code));
|
||||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
|
||||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||||
section.logicSectionCodeList.forEach(item => {
|
section.logicSectionCodeList.forEach(sectionCode => {
|
||||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
|
containSectionList.push({code: sectionCode,preGreen: true,preBlue: false});
|
||||||
sec.cutOff = true;
|
|
||||||
containSectionList.push(sec);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
section.cutOff = true;
|
containSectionList.push({code, preGreen: true,preBlue: false});
|
||||||
containSectionList.push(section);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (section.switchSection && section.switch) {
|
||||||
|
switchCodeList.push(section.switch.code);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.overlapData[row.overlapCode] && this.overlapData[row.overlapCode].pathList && this.overlapData[row.overlapCode].pathList.length) {
|
|
||||||
this.overlapData[row.overlapCode].pathList.forEach(item => {
|
if (row.routeSwitchList && row.routeSwitchList.length) {
|
||||||
if (item.sectionList && item.sectionList.length) {
|
row.routeSwitchList.filter(el => switchCodeList.includes(el.switchCode)).forEach(el => {
|
||||||
item.sectionList.forEach(elem => {
|
const swch = deepAssign({}, this.$refs.map.getDeviceByCode(el.switchCode));
|
||||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
const sectionA = this.$refs.map.getDeviceByCode(swch.sectionACode);
|
||||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
const sectionB = this.$refs.map.getDeviceByCode(swch.sectionBCode);
|
||||||
section.logicSectionCodeList.forEach(logicSectionCode => {
|
const sectionC = this.$refs.map.getDeviceByCode(swch.sectionCCode);
|
||||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](logicSectionCode));
|
containSwitchList.push({code: el.switchCode, routeLock: true, normalPosition: el.normal,reversePosition: !el.normal});
|
||||||
sec.cutOff = true;
|
if (el.normal) {
|
||||||
containSectionList.push(sec);
|
containSectionList.push({code: sectionA.code, routeLock:true });
|
||||||
});
|
containSectionList.push({code: sectionC.code, preBlue: true });
|
||||||
} else {
|
} else {
|
||||||
section.cutOff = true;
|
containSectionList.push({code: sectionC.code, routeLock:true });
|
||||||
containSectionList.push(section);
|
containSectionList.push({code: sectionB.code, preBlue: true });
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.$store.dispatch('training/updateMapState', [...containSectionList]);
|
|
||||||
this.beforeSectionList = containSectionList || [];
|
this.$refs.map.updateMapDevice([...containSectionList, ...containSwitchList]);
|
||||||
|
this.beforeSectionList = containSectionList
|
||||||
|
this.beforeSwitchList = containSwitchList;
|
||||||
|
|
||||||
// 设置选中指令
|
// 设置选中指令
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
<menu-train ref="menuTrain" :selected="selected" />
|
<menu-train ref="menuTrain" :selected="selected" />
|
||||||
<menu-station ref="menuStation" :selected="selected" />
|
<menu-station ref="menuStation" :selected="selected" />
|
||||||
<menu-limit ref="menuLimit" :selected="selected" />
|
<menu-limit ref="menuLimit" :selected="selected" />
|
||||||
|
<menu-station-light ref="menuStationLight" :selected="selected" />
|
||||||
<!--<passive-alarm ref="passiveAlarm" />-->
|
<!--<passive-alarm ref="passiveAlarm" />-->
|
||||||
<passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" />
|
<passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" />
|
||||||
<!--<passive-Timeout ref="passiveTimeout" />-->
|
<!--<passive-Timeout ref="passiveTimeout" />-->
|
||||||
@ -32,6 +33,7 @@ import MenuStation from './menuStation';
|
|||||||
import MenuBar from './menuBar';
|
import MenuBar from './menuBar';
|
||||||
import MenuLimit from './menuLimit';
|
import MenuLimit from './menuLimit';
|
||||||
import MenuStationTurnBack from './menuStationTurnBack';
|
import MenuStationTurnBack from './menuStationTurnBack';
|
||||||
|
import MenuStationLight from './menuStationLight';
|
||||||
// import PassiveAlarm from './passiveDialog/alarm';
|
// import PassiveAlarm from './passiveDialog/alarm';
|
||||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||||
// import PassiveTimeout from './passiveDialog/timeout';
|
// import PassiveTimeout from './passiveDialog/timeout';
|
||||||
@ -52,7 +54,8 @@ export default {
|
|||||||
MenuStationTurnBack,
|
MenuStationTurnBack,
|
||||||
MenuLimit,
|
MenuLimit,
|
||||||
// PassiveAlarm,
|
// PassiveAlarm,
|
||||||
PassiveContorl
|
PassiveContorl,
|
||||||
|
MenuStationLight
|
||||||
// PassiveTimeout
|
// PassiveTimeout
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
128
src/jmapNew/theme/ningbo_01/menus/menuStationLight.vue
Normal file
128
src/jmapNew/theme/ningbo_01/menus/menuStationLight.vue
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
|
<password-input ref="passwordInput" @forceLightConfirm="forceLightConfirm" />
|
||||||
|
<operateConfirm ref="operateConfirm" @forceLightConfirm1="forceLightConfirm1" />
|
||||||
|
<button-confirm ref="buttonConfirm" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PopMenu from '@/components/PopMenu';
|
||||||
|
import PasswordInput from './dialog/passwordInput';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperateConfirm from './dialog/childDialog/operateConfirm';
|
||||||
|
import ButtonConfirm from './dialog/childDialog/buttonConfirm';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'StationControlLight',
|
||||||
|
components: {
|
||||||
|
PopMenu,
|
||||||
|
PasswordInput,
|
||||||
|
OperateConfirm,
|
||||||
|
ButtonConfirm
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
menu: [],
|
||||||
|
menuNormal: {
|
||||||
|
Local: [
|
||||||
|
{
|
||||||
|
label: '设置/取消强制点灯',
|
||||||
|
handler: this.setOrCancelForceLight,
|
||||||
|
cmdType: CMD.Station.CMD_STATION_SET_OR_CANCEL_FORCE_PHYSICAL_SIGNAL
|
||||||
|
}
|
||||||
|
],
|
||||||
|
Center: [
|
||||||
|
{
|
||||||
|
label: '设置/取消强制点灯',
|
||||||
|
handler: this.setOrCancelForceLight,
|
||||||
|
cmdType: CMD.Station.CMD_STATION_SET_OR_CANCEL_FORCE_PHYSICAL_SIGNAL
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
menuForce: [
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('training', [
|
||||||
|
'mode',
|
||||||
|
'operatemode'
|
||||||
|
]),
|
||||||
|
...mapGetters('menuOperation', [
|
||||||
|
'buttonOperation'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationLight) && !this.buttonOperation) {
|
||||||
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clickEvent() {
|
||||||
|
const self = this;
|
||||||
|
window.onclick = function (e) {
|
||||||
|
self.doClose();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
initMenu() {
|
||||||
|
// 编辑模式菜单列表
|
||||||
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
|
// 故障模式菜单列表
|
||||||
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
|
this.menu = this.menuForce;
|
||||||
|
}
|
||||||
|
this.getCurrentStateObject();
|
||||||
|
},
|
||||||
|
doShow(point) {
|
||||||
|
this.clickEvent();
|
||||||
|
this.initMenu();
|
||||||
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
|
this.$refs.popMenu.close();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getCurrentStateObject() {
|
||||||
|
this.selected = this.$store.getters['menuOperation/selected'];
|
||||||
|
},
|
||||||
|
setOrCancelForceLight() {
|
||||||
|
// 请求中控(遥控)
|
||||||
|
commitOperate(menuOperate.StationLight.setOrCancelForceLight, {stationCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
const nextOperate = {
|
||||||
|
operation: OperationEvent.StationLight.SetOrCancelForceLight.password
|
||||||
|
};
|
||||||
|
this.$refs.passwordInput.doShow(nextOperate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
forceLightConfirm() {
|
||||||
|
const nextOperate = {
|
||||||
|
message: '是否执行设置/取消全站点灯命令?',
|
||||||
|
operation: OperationEvent.StationLight.SetOrCancelForceLight.confirm
|
||||||
|
};
|
||||||
|
this.$refs.operateConfirm.doShow(nextOperate);
|
||||||
|
},
|
||||||
|
forceLightConfirm1() {
|
||||||
|
const nextOperate = {
|
||||||
|
operation: OperationEvent.StationLight.SetOrCancelForceLight.confirm1
|
||||||
|
};
|
||||||
|
this.$refs.buttonConfirm.doShow(nextOperate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -31,8 +31,8 @@ export function createBoundingRect(view) {
|
|||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function calculateDCenter(viewRect, zrbound) {
|
export function calculateDCenter(viewRect, offsetX) {
|
||||||
var dx = (zrbound.width - viewRect.width) / 2 - viewRect.x;
|
var dx = offsetX - viewRect.width/2 - viewRect.x;
|
||||||
var dy = 0;
|
var dy = 0;
|
||||||
return { dx: dx, dy: dy };
|
return { dx: dx, dy: dy };
|
||||||
}
|
}
|
||||||
|
@ -601,6 +601,11 @@ export const asyncRouter = [
|
|||||||
path: 'draftTeach/:subSystem',
|
path: 'draftTeach/:subSystem',
|
||||||
component: DraftLessonManage,
|
component: DraftLessonManage,
|
||||||
hidden: true
|
hidden: true
|
||||||
|
},
|
||||||
|
{ // 运行图设计
|
||||||
|
path: 'runPlan/:mapId',
|
||||||
|
component: PlanMonitorDetail,
|
||||||
|
hidden: true
|
||||||
},
|
},
|
||||||
{ // 试卷列表
|
{ // 试卷列表
|
||||||
path: 'course/:subSystem',
|
path: 'course/:subSystem',
|
||||||
|
@ -79,6 +79,7 @@ export const DeviceMenu = {
|
|||||||
Enabled: '13',
|
Enabled: '13',
|
||||||
StationTurnBack: '14',
|
StationTurnBack: '14',
|
||||||
Power:'15',
|
Power:'15',
|
||||||
|
StationLight: '16',
|
||||||
|
|
||||||
Map: '100',
|
Map: '100',
|
||||||
PrdCategory: '101',
|
PrdCategory: '101',
|
||||||
@ -189,6 +190,7 @@ export const UrlConfig = {
|
|||||||
trainingPlatform: {
|
trainingPlatform: {
|
||||||
prodDetail: '/trainingPlatform/detail',
|
prodDetail: '/trainingPlatform/detail',
|
||||||
teachDetail: '/trainingPlatform/teach',
|
teachDetail: '/trainingPlatform/teach',
|
||||||
|
runPlan: '/trainingPlatform/runPlan',
|
||||||
teachHome: '/trainingPlatform/teachHome',
|
teachHome: '/trainingPlatform/teachHome',
|
||||||
examHome: '/trainingPlatform/examHome',
|
examHome: '/trainingPlatform/examHome',
|
||||||
course: '/trainingPlatform/course',
|
course: '/trainingPlatform/course',
|
||||||
|
@ -222,10 +222,8 @@ export default {
|
|||||||
CMD_STATION_SET_CI_AUTO: {value: 'Station_Set_CI_Auto', label: '全站设置自动通过'},
|
CMD_STATION_SET_CI_AUTO: {value: 'Station_Set_CI_Auto', label: '全站设置自动通过'},
|
||||||
/** 全站取消自动通过 */
|
/** 全站取消自动通过 */
|
||||||
CMD_STATION_CANCEL_CI_AUTO: {value: 'Station_Set_CI_Auto', label: '全站取消自动通过'},
|
CMD_STATION_CANCEL_CI_AUTO: {value: 'Station_Set_CI_Auto', label: '全站取消自动通过'},
|
||||||
/** 强制点灯 */
|
/** 设置/取消强制点灯 */
|
||||||
CMD_STATION_FORCE_SET_SIGNAL_PHYSICAL: {value: 'Station_Force_Set_Signal_Physical', label: '强制点灯'},
|
CMD_STATION_SET_OR_CANCEL_FORCE_PHYSICAL_SIGNAL: {value: 'Station_Set_Or_Cancel_Force_Physical_Signal', label: '设置/取消强制点灯'}
|
||||||
/** 取消强制点灯 */
|
|
||||||
CMD_STATION_FORCE_CANCEL_SIGNAL_PHYSICAL: {value: 'Station_Force_Cancel_Signal_Physical', label: '取消强制点灯'}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 列车
|
// 列车
|
||||||
|
@ -2817,6 +2817,27 @@ export const OperationEvent = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
StationLight: {
|
||||||
|
SetOrCancelForceLight: {
|
||||||
|
menu: {
|
||||||
|
operation: '1100',
|
||||||
|
domId: '_Tips-Force-Light-Menu'
|
||||||
|
},
|
||||||
|
password: {
|
||||||
|
operation: '11001',
|
||||||
|
domId: '_Tips-Force-Light-Password'
|
||||||
|
},
|
||||||
|
confirm: {
|
||||||
|
operation: '11002',
|
||||||
|
domId: '_Tips-Force-Light-Confirm'
|
||||||
|
},
|
||||||
|
confirm1: {
|
||||||
|
operation: '11003',
|
||||||
|
domId: '_Tips-Force-Light-Confirm1'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 混合指令
|
// 混合指令
|
||||||
MixinCommand: {
|
MixinCommand: {
|
||||||
// 封锁
|
// 封锁
|
||||||
|
@ -94,18 +94,15 @@ export default {
|
|||||||
clickEvent(obj, data, ele) {
|
clickEvent(obj, data, ele) {
|
||||||
switch (obj.type) {
|
switch (obj.type) {
|
||||||
case 'scriptDesign': {
|
case 'scriptDesign': {
|
||||||
setSessionStorage('designType', 'scriptDesign');
|
|
||||||
const query = {lineCode:obj.lineCode};
|
const query = {lineCode:obj.lineCode};
|
||||||
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?`, query});
|
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?`, query});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'lessonDesign': {
|
case 'lessonDesign': {
|
||||||
setSessionStorage('designType', 'lessonDesign');
|
|
||||||
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}?lineCode=${obj.lineCode}&cityCode=${obj.cityCode}` });
|
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}?lineCode=${obj.lineCode}&cityCode=${obj.cityCode}` });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'runPlanDesign': {
|
case 'runPlanDesign': {
|
||||||
setSessionStorage('designType', 'runPlanDesign');
|
|
||||||
this.$router.push({ path: `${UrlConfig.design.runPlan}/${obj.mapId}?lineCode=${obj.lineCode}` });
|
this.$router.push({ path: `${UrlConfig.design.runPlan}/${obj.mapId}?lineCode=${obj.lineCode}` });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -118,7 +115,6 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'ibpDesign': {
|
case 'ibpDesign': {
|
||||||
setSessionStorage('designType', 'ibpDesign');
|
|
||||||
this.$router.push({ path: `${UrlConfig.design.ibpHome}/${obj.mapId}`, query: {cityCode: obj.cityCode} });
|
this.$router.push({ path: `${UrlConfig.design.ibpHome}/${obj.mapId}`, query: {cityCode: obj.cityCode} });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -136,6 +136,13 @@ export default {
|
|||||||
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
|
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
return;
|
return;
|
||||||
|
} else if (em.subType == 'light' && em.deviceType == 'Station') { // 宁波一号线右键显示强制点灯
|
||||||
|
const equipment = this.getDeviceByEm(em);
|
||||||
|
this.$store.dispatch('menuOperation/setSelected', { device: equipment, subType: em.subType });
|
||||||
|
menu = getDeviceMenuByDeviceType('StationLight');
|
||||||
|
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
return;
|
||||||
} else if (em.subType == 'enabled' && em.deviceType == 'Switch') {
|
} else if (em.subType == 'enabled' && em.deviceType == 'Switch') {
|
||||||
menu = getDeviceMenuByDeviceType('Enabled');
|
menu = getDeviceMenuByDeviceType('Enabled');
|
||||||
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
|
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: menu });
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<el-button v-if="scope.row.status !=='1'" size="mini" class="button_box" type="success" @click="handleConfirm(scope.row)">{{ $t('planMonitor.load') }}</el-button>
|
<el-button v-if="scope.row.status !=='1'" size="mini" class="button_box" type="success" @click="handleConfirm(scope.row)">{{ $t('planMonitor.load') }}</el-button>
|
||||||
<el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="primary" @click="handleEdit(scope.row)">{{ $t('planMonitor.modifyName') }}</el-button>
|
<el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="primary" @click="handleEdit(scope.row)">{{ $t('planMonitor.modifyName') }}</el-button>
|
||||||
<el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="danger" @click="handleDelete(scope.row)">{{ $t('global.delete') }}</el-button>
|
<el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="danger" @click="handleDelete(scope.row)">{{ $t('global.delete') }}</el-button>
|
||||||
<el-button v-if="isCreate && scope.row.status ==='0'" size="mini" class="button_box" type="primary" @click="handlePublish(scope.row)">{{ hasRelease?$t('global.release'):$t('planMonitor.applyRelease') }}</el-button>
|
<el-button v-if="isCreate && scope.row.status ==='0' && hasRelease" size="mini" class="button_box" type="primary" @click="handlePublish(scope.row)">{{ hasRelease?$t('global.release'):$t('planMonitor.applyRelease') }}</el-button>
|
||||||
<el-button v-if="scope.row.status === '1'" size="mini" class="button_box" type="primary" @click="handlePreview(scope.row)">{{ $t('planMonitor.preview') }}</el-button>
|
<el-button v-if="scope.row.status === '1'" size="mini" class="button_box" type="primary" @click="handlePreview(scope.row)">{{ $t('planMonitor.preview') }}</el-button>
|
||||||
<el-button v-if="scope.row.status === '1'" size="mini" class="button_box" type="danger" @click="handelRevert(scope.row)">{{ $t('planMonitor.revoke') }}</el-button>
|
<el-button v-if="scope.row.status === '1'" size="mini" class="button_box" type="danger" @click="handelRevert(scope.row)">{{ $t('planMonitor.revoke') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getTrainingSystemList, getSubSystemInfo, getSubSystemByProjectCode } from '@/api/trainingPlatform';
|
import { getTrainingSystemList, getSubSystemInfo, getSubSystemByProjectCode } from '@/api/trainingPlatform';
|
||||||
|
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
import FilterCity from '@/views/components/filterCity';
|
import FilterCity from '@/views/components/filterCity';
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
@ -95,6 +96,7 @@ export default {
|
|||||||
ele.expanded = true;
|
ele.expanded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
localStore.set('trainingPlatformCheckId' + this.filterSelect + this.userId + this.project, obj.key);
|
localStore.set('trainingPlatformCheckId' + this.filterSelect + this.userId + this.project, obj.key);
|
||||||
this.mapId = obj.key.split('-')[0];
|
this.mapId = obj.key.split('-')[0];
|
||||||
if ( obj.type === 'Map') {
|
if ( obj.type === 'Map') {
|
||||||
@ -120,9 +122,18 @@ export default {
|
|||||||
this.toNextPage(isReplace, router);
|
this.toNextPage(isReplace, router);
|
||||||
break;
|
break;
|
||||||
case 'Simulation':
|
case 'Simulation':
|
||||||
this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`);
|
if (resp.data.prdType == '08') {
|
||||||
router = { path: `${UrlConfig.trainingPlatform.prodDetail}/${obj.id}`, query: { mapId: this.mapId}};
|
//运行图编辑工作站
|
||||||
this.toNextPage(isReplace, router);
|
getPublishMapInfo(this.mapId).then(rest => {
|
||||||
|
this.setLocalRoute(`${UrlConfig.trainingPlatform.runPlan}/${this.mapId}?lineCode=${rest.data.lineCode}`);
|
||||||
|
router = { path: `${UrlConfig.trainingPlatform.runPlan}/${this.mapId}`, query: { lineCode: rest.data.lineCode}};
|
||||||
|
this.toNextPage(isReplace, router);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`);
|
||||||
|
router = { path: `${UrlConfig.trainingPlatform.prodDetail}/${obj.id}`, query: { mapId: this.mapId}};
|
||||||
|
this.toNextPage(isReplace, router);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user