Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
9ec0c99d70
54
src/api/ibp.js
Normal file
54
src/api/ibp.js
Normal file
@ -0,0 +1,54 @@
|
||||
|
||||
import request from '@/utils/request';
|
||||
// 创建草稿数据 ibp
|
||||
export function createIbp(params) {
|
||||
return request({
|
||||
url: '/api/draftIbp',
|
||||
method: 'post',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 发布IBP盘数据
|
||||
export function postIbpPublish(params) {
|
||||
return request({
|
||||
url: '/api/draftIbp/{id}/publish',
|
||||
method: 'post',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 分页查询IBP数据基本信息
|
||||
export function getIbpAllList(mapId, params) {
|
||||
return request({
|
||||
url: '/api/ibp/list/all',
|
||||
method: 'get',
|
||||
param: params
|
||||
});
|
||||
}
|
||||
|
||||
// 更新草稿IBP盘基本信息
|
||||
export function putIbpBasicInfo(id, params) {
|
||||
return request({
|
||||
url: `/api/draftIbp/${id}/basic`,
|
||||
method: 'put',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 更新草稿IBP盘绘图数据
|
||||
export function putIbpDrawData(id, params) {
|
||||
return request({
|
||||
url: `/api/draftIbp/${id}/data`,
|
||||
method: 'put',
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 删除草稿IBP盘绘图数据
|
||||
export function deleteIbpInfo(id) {
|
||||
return request({
|
||||
url: `/api/draftIbp/${id}/data`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -173,3 +173,11 @@ export function toSortMap(data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 根据group获取排序的车站列表(包含车辆段/停车场) */
|
||||
export function getByGroupStationList(group) {
|
||||
return request({
|
||||
url: `/simulation/${group}/stationWithDepot`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -133,9 +133,9 @@ class SkinCode extends defaultStyle {
|
||||
endColor: '#FFFFFF', // 尽头分隔符颜色
|
||||
color: '#FFFFFF' // 区段边界符颜色
|
||||
},
|
||||
shuttleBack: { // 折返进路 (存在此对象 显示折返箭头)
|
||||
distance: 5 // 限速线距离区段距离
|
||||
},
|
||||
// shuttleBack: { // 折返进路 (存在此对象 显示折返箭头)
|
||||
// distance: 5 // 限速线距离区段距离
|
||||
// },
|
||||
block: {
|
||||
special: false // 区段特殊显示
|
||||
},
|
||||
|
@ -219,7 +219,18 @@ deviceState[deviceType.Train] = {
|
||||
/** 列车是否向右形式 */
|
||||
right: 1,
|
||||
/** 是否故障*/
|
||||
fault: 0 /** 非故障*/
|
||||
fault: 0 /** 非故障*/,
|
||||
/** 是否跳停 */
|
||||
jump: 0,
|
||||
/** 是否扣车 */
|
||||
hold: 0,
|
||||
/** 列车类型 PLAN计划车 HEAD 头码车 MANUAL 人工车*/
|
||||
type: 'PLAN',
|
||||
/** 列车精确位置 (成都一号线使用)*/
|
||||
offsetp:0,
|
||||
/** 列车所在物理区段 */
|
||||
physicalCode:''
|
||||
|
||||
};
|
||||
|
||||
export default deviceState;
|
||||
|
@ -83,10 +83,14 @@ class Status {
|
||||
right: device.right, /** 列车方向 */
|
||||
doorCloseLock: device.doorCloseLock, /** 车门是否关闭且锁闭 */
|
||||
stop: device.stop, /** 列车是否停稳 */
|
||||
type: device.type, /** 列车类型 */
|
||||
type: device.type, /** 列车类型 PLAN计划车 HEAD 头码车 MANUAL 人工车*/
|
||||
runLevel: device.runLevel, /** 列车运行级别 */
|
||||
driveMode: device.driveMode, /** 驾驶模式 */
|
||||
fault: device.fault /** 非故障*/
|
||||
fault: device.fault, /** 非故障*/
|
||||
jump: device.jump, /** 是否跳停 */
|
||||
hold: device.hold, /** 是否扣车 */
|
||||
offsetp:device.offsetp, /** 列车精确位置 (成都一号线使用)*/
|
||||
physicalCode:device.physicalCode /** 列车所在物理区段 */
|
||||
};
|
||||
}
|
||||
handleStation(device) {
|
||||
|
@ -36,6 +36,9 @@ class Jlmap {
|
||||
this.defaultStateDict = this.loadDefaultState();
|
||||
|
||||
this.initMapInstance(opts);
|
||||
|
||||
// 显示集中站
|
||||
this.stationCode = '';
|
||||
}
|
||||
|
||||
// 初始化属性有鼠标事件 缩放等
|
||||
@ -173,6 +176,8 @@ class Jlmap {
|
||||
});
|
||||
|
||||
if (this.methods.viewUpdate instanceof Function) { this.methods.viewUpdate(list); }
|
||||
this.updateShowMode(list, this.showConfig.showMode);
|
||||
this.updateShowStation(list, this.stationCode);
|
||||
}
|
||||
|
||||
// 中间处理
|
||||
@ -266,6 +271,57 @@ class Jlmap {
|
||||
getShowConfig() {
|
||||
return this.showConfig;
|
||||
}
|
||||
updateShowStation(list, stationCode) {
|
||||
this.stationCode = stationCode;
|
||||
(list || []).forEach(elem => {
|
||||
const code = elem.code;
|
||||
const type = elem._type;
|
||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||
if (oDevice._type === deviceType.Station) {
|
||||
this.showStationHandleStation(oDevice, stationCode);
|
||||
} else if (oDevice._type === deviceType.Section) {
|
||||
this.$painter.updateShowStation(oDevice, stationCode);
|
||||
this.showStationHandleSection(oDevice, stationCode);
|
||||
} else if (oDevice._type === deviceType.TrainWindow) {
|
||||
} else if (oDevice._type === deviceType.Psd) {
|
||||
this.showStationHandlePsd(oDevice, stationCode);
|
||||
} else {
|
||||
this.$painter.updateShowStation(oDevice, stationCode);
|
||||
}
|
||||
});
|
||||
this.$painter.$transformHandle.revisibleAll();
|
||||
}
|
||||
showStationHandlePsd(oDevice, stationCode) {
|
||||
const standDevice = this.mapDevice[oDevice.standCode];
|
||||
if (standDevice.deviceStationCode === stationCode || !stationCode) {
|
||||
this.$painter.updateSpecialShowStation(oDevice, true);
|
||||
} else {
|
||||
this.$painter.updateSpecialShowStation(oDevice, false);
|
||||
}
|
||||
}
|
||||
showStationHandleSection(oDevice, stationCode) {
|
||||
const trainWinDevice = this.mapDevice[oDevice.trainWindowCode];
|
||||
if (oDevice.stationCode === stationCode || !stationCode) {
|
||||
this.$painter.updateSpecialShowStation(trainWinDevice, true);
|
||||
} else {
|
||||
this.$painter.updateSpecialShowStation(trainWinDevice, false);
|
||||
}
|
||||
}
|
||||
showStationHandleStation (oDevice, stationCode) {
|
||||
if ((oDevice.centralized && oDevice.code === stationCode) || !stationCode) {
|
||||
this.$painter.updateSpecialShowStation(oDevice, true);
|
||||
oDevice.chargeStationCodeList.forEach(staCode => {
|
||||
const staDevice = this.mapDevice[staCode];
|
||||
this.$painter.updateSpecialShowStation(staDevice, true);
|
||||
});
|
||||
} else if (oDevice.centralized && oDevice.code !== stationCode) {
|
||||
this.$painter.updateSpecialShowStation(oDevice, false);
|
||||
oDevice.chargeStationCodeList.forEach(staCode => {
|
||||
const staDevice = this.mapDevice[staCode];
|
||||
this.$painter.updateSpecialShowStation(staDevice, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
update(list) {
|
||||
this.setUpdateMapDevice(list || []); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息
|
||||
(list || []).forEach(elem => {
|
||||
|
@ -131,7 +131,7 @@ class MouseController extends Eventful {
|
||||
if (!eventTool.notLeftMouse(e)) {
|
||||
this._dragging = false;
|
||||
}
|
||||
if (this._zoomOnMouseWheel && this.$jmap.mapDevice['check_box']) {
|
||||
if (this._zoomOnMouseWheel && this.$jmap.mapDevice['check_box'] && this._previewOrMapDraw ) {
|
||||
this.eventTarget = this.$jmap.mapDevice['check_box'].instance;
|
||||
this.handleBoundingRect(this.eventTarget);
|
||||
var em = this.checkEvent(e);
|
||||
@ -311,8 +311,8 @@ class MouseController extends Eventful {
|
||||
const dy = originY + this.$jmap.$options.offsetY;
|
||||
const x = dx / this.$jmap.$options.scaleRate;
|
||||
const y = dy / this.$jmap.$options.scaleRate;
|
||||
const width = Math.abs(point1.x - point2.x) / this.$jmap.$options.scaleRate + 10;
|
||||
const height = Math.abs(point1.y - point2.y) / this.$jmap.$options.scaleRate + 10;
|
||||
const width = Math.abs(point1.x - point2.x) / this.$jmap.$options.scaleRate;
|
||||
const height = Math.abs(point1.y - point2.y) / this.$jmap.$options.scaleRate;
|
||||
this.$jmap.renderCheckBox({code: 'check_box', _type: 'CheckBox', point: {x: x, y: y}, width: width, height: height });
|
||||
}
|
||||
}
|
||||
|
@ -169,6 +169,19 @@ class Painter {
|
||||
device.instance.setShowMode();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 更新现地显示单独集中站
|
||||
* */
|
||||
updateShowStation(device, stationCode) {
|
||||
if (device && device.instance) {
|
||||
device.instance.setShowStation(stationCode);
|
||||
}
|
||||
}
|
||||
updateSpecialShowStation(device, flag) {
|
||||
if (device && device.instance) {
|
||||
device.instance.setShowStation(flag);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 更新transform变化
|
||||
* @param {*} opt
|
||||
|
@ -17,6 +17,7 @@ export default class Automactic extends Group {
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, style.MapCycleButtonVO.visibleConditions) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
@ -104,6 +105,7 @@ export default class Automactic extends Group {
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
@ -114,7 +116,6 @@ export default class Automactic extends Group {
|
||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||
}
|
||||
}
|
||||
|
||||
getArcBoundingRect() {
|
||||
const rect = this.control.getBoundingRect().clone();
|
||||
const scale = this.control.scale[0];
|
||||
@ -142,15 +143,31 @@ export default class Automactic extends Group {
|
||||
const showMode = this.model.showMode;
|
||||
const showConditions = this.style.MapCycleButtonVO.visibleConditions;
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.control.show();
|
||||
this.text.show();
|
||||
this.subtitleText && this.subtitleText.show();
|
||||
this.arcBorder && this.arcBorder.show();
|
||||
this.show();
|
||||
} else {
|
||||
this.control.hide();
|
||||
this.text.hide();
|
||||
this.subtitleText && this.subtitleText.hide();
|
||||
this.arcBorder && this.arcBorder.hide();
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.isShowShape = true;
|
||||
this.show();
|
||||
} else {
|
||||
this.isShowShape = false;
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
show() {
|
||||
this.control && this.control.show();
|
||||
this.text && this.text.show();
|
||||
this.subtitleText && this.subtitleText.show();
|
||||
this.arcBorder && this.arcBorder.show();
|
||||
this.setState(this.model);
|
||||
}
|
||||
hide() {
|
||||
this.control && this.control.hide();
|
||||
this.text && this.text.hide();
|
||||
this.subtitleText && this.subtitleText.hide();
|
||||
this.arcBorder && this.arcBorder.hide();
|
||||
}
|
||||
}
|
||||
|
@ -2,52 +2,52 @@ import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
|
||||
export default class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
this.text = new Text({
|
||||
zlevel: this.device.zlevel,
|
||||
z: this.device.z+1,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: this.device.model.position.x,
|
||||
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance-30,
|
||||
fontWeight: 'normal',
|
||||
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
|
||||
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily,
|
||||
text: this.device.model.name,
|
||||
textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
|
||||
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,
|
||||
textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign
|
||||
}
|
||||
});
|
||||
this.add(this.text);
|
||||
this.text.hide();
|
||||
}
|
||||
mouseover(e) {
|
||||
if (e.target && e.target._subType == 'Text') {
|
||||
this.text.show();
|
||||
} else {
|
||||
this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor);
|
||||
this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor);
|
||||
this.device.control.setTextBorder(true);
|
||||
this.device.control.setArcBorder(true);
|
||||
}
|
||||
}
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
this.text = new Text({
|
||||
zlevel: this.device.zlevel,
|
||||
z: this.device.z + 1,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: this.device.model.position.x,
|
||||
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30,
|
||||
fontWeight: 'normal',
|
||||
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
|
||||
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily,
|
||||
text: this.device.model.name,
|
||||
textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
|
||||
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,
|
||||
textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign
|
||||
}
|
||||
});
|
||||
this.add(this.text);
|
||||
this.text.hide();
|
||||
}
|
||||
mouseover(e) {
|
||||
if (e.target && e.target._subType == 'Text') {
|
||||
this.text.show();
|
||||
} else {
|
||||
this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor);
|
||||
this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor);
|
||||
this.device.control.setTextBorder(true);
|
||||
this.device.control.setArcBorder(true);
|
||||
}
|
||||
}
|
||||
|
||||
mouseout(e) {
|
||||
if (!this.device.model.down) {
|
||||
if (e.target && e.target._subType == 'Text') {
|
||||
this.text.hide();
|
||||
} else {
|
||||
this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
mouseout(e) {
|
||||
if (!this.device.model.down) {
|
||||
if (e.target && e.target._subType == 'Text') {
|
||||
this.text.hide();
|
||||
} else {
|
||||
this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import Text from 'zrender/src/graphic/Text';
|
||||
import EMouse from './EMouse';
|
||||
import {isShowThePrdType} from '../../utils/handlePath';
|
||||
|
||||
export default class LcControl extends Group {
|
||||
export default class AutomacticRoute extends Group {
|
||||
constructor(model, style) {
|
||||
super();
|
||||
this.z = 20;
|
||||
@ -16,6 +16,7 @@ export default class LcControl extends Group {
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, style.AutomaticRoute.displayCondition) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
@ -87,6 +88,7 @@ export default class LcControl extends Group {
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
@ -112,13 +114,29 @@ export default class LcControl extends Group {
|
||||
const showMode = this.model.showMode;
|
||||
const showConditions = this.style.AutomaticRoute.displayCondition;
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.control.show();
|
||||
this.text.show();
|
||||
this.subtitleText && this.subtitleText.show();
|
||||
this.show();
|
||||
} else {
|
||||
this.control.hide();
|
||||
this.text.hide();
|
||||
this.subtitleText && this.subtitleText.hide();
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.isShowShape = true;
|
||||
this.show();
|
||||
} else {
|
||||
this.isShowShape = false;
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
show() {
|
||||
this.control && this.control.show();
|
||||
this.text && this.text.show();
|
||||
this.subtitleText && this.subtitleText.show();
|
||||
this.setState(this.model);
|
||||
}
|
||||
hide() {
|
||||
this.control && this.control.hide();
|
||||
this.text && this.text.hide();
|
||||
this.subtitleText && this.subtitleText.hide();
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ export default class LcControl extends Group {
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -54,6 +55,7 @@ export default class LcControl extends Group {
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
@ -64,7 +66,6 @@ export default class LcControl extends Group {
|
||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||
}
|
||||
}
|
||||
|
||||
getShapeTipPoint() {
|
||||
if (this.control) {
|
||||
var distance = 2;
|
||||
@ -77,4 +78,14 @@ export default class LcControl extends Group {
|
||||
return null;
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.control.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.control.hide();
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ export default class LimitControl extends Group {
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
this.z = 20;
|
||||
this.create(model);
|
||||
this.createMouseEvent();
|
||||
@ -58,6 +59,7 @@ export default class LimitControl extends Group {
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
@ -81,4 +83,14 @@ export default class LimitControl extends Group {
|
||||
return null;
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.control.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.control.hide();
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ export default class Line2 extends Group {
|
||||
this.z = 0;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, model.showConditions) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
this.setState(model);
|
||||
@ -55,6 +56,7 @@ export default class Line2 extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
this.setLineType(model.type);
|
||||
}
|
||||
// 设置显示模式
|
||||
@ -71,4 +73,18 @@ export default class Line2 extends Group {
|
||||
});
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild((child) => {
|
||||
child.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild((child) => {
|
||||
child.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ export default class OutFrame extends Group {
|
||||
this._code = model.code;
|
||||
this.style = style;
|
||||
this.zlevel = model.zlevel;
|
||||
this.isShowShape = true;
|
||||
this.z = 0;
|
||||
if (isShowThePrdType(model.prdType, model.showConditions) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
@ -43,6 +44,7 @@ export default class OutFrame extends Group {
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
// 设置显示模式
|
||||
setShowMode() {
|
||||
@ -50,8 +52,19 @@ export default class OutFrame extends Group {
|
||||
const showConditions = this.model.showConditions;
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.box && this.box.show();
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.box && this.box.hide();
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.box && this.box.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.box && this.box.hide();
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -119,6 +119,20 @@ class ESafeDoor extends Group {
|
||||
this.safeC && this.safeC.setStyle('fill', color);
|
||||
this.safeR && this.safeR.setStyle('fill', color);
|
||||
}
|
||||
hide() {
|
||||
this.stand1 && this.stand1.hide();
|
||||
this.stand2 && this.stand2.hide();
|
||||
this.safeL && this.safeL.hide();
|
||||
this.safeC && this.safeC.hide();
|
||||
this.safeR && this.safeR.hide();
|
||||
}
|
||||
show() {
|
||||
this.stand1 && this.stand1.show();
|
||||
this.stand2 && this.stand2.show();
|
||||
this.safeL && this.safeL.show();
|
||||
this.safeC && this.safeC.show();
|
||||
this.safeR && this.safeR.show();
|
||||
}
|
||||
}
|
||||
|
||||
export default ESafeDoor;
|
||||
|
@ -11,6 +11,7 @@ export default class Line2 extends Group {
|
||||
this.z = 1;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
this.checkIsDrawMap();
|
||||
@ -64,6 +65,7 @@ export default class Line2 extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
/** 设置屏蔽门开关*/
|
||||
// if (model.name == 'Psd44') {
|
||||
// console.log(model, model.screenDoorOpenStatus, '1 为关门 0 为开门');
|
||||
@ -96,6 +98,15 @@ export default class Line2 extends Group {
|
||||
this.on('mouseover', () => { this.highlight.mouseover(); });
|
||||
}
|
||||
}
|
||||
|
||||
setShowMode() {}
|
||||
setShowStation(flag) {
|
||||
if (flag) {
|
||||
this.safeDoor && this.safeDoor.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.safeDoor && this.safeDoor.hide();
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ export default class Resource extends Group {
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
this.z = model.zIndex || 1;
|
||||
this.create();
|
||||
}
|
||||
@ -42,6 +43,7 @@ export default class Resource extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
|
||||
// 整体图片
|
||||
@ -67,4 +69,14 @@ export default class Resource extends Group {
|
||||
return null;
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.image && this.image.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.image && this.image.hide();
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,31 +5,31 @@ import Path from 'zrender/src/graphic/Path';
|
||||
|
||||
// 计轴
|
||||
export const EAxle = Path.extend({
|
||||
type: 'EAxle',
|
||||
shape: {
|
||||
point: null
|
||||
},
|
||||
buildPath: function (ctx, model) {
|
||||
if (model && model.style && model.traingle) {
|
||||
const axleLength = 2 * model.style.Section.axle.radius;
|
||||
const positionx = model.point.x + model.drictx * (model.traingle.getCos(axleLength));
|
||||
const positiony = model.point.y + model.dricty * (model.traingle.getCos(axleLength));
|
||||
// 圆弧
|
||||
const arcX = positionx - model.dricty * model.traingle.getSin(axleLength);
|
||||
const arcY = positiony + model.drictx * model.traingle.getSin(axleLength);
|
||||
const arcR = model.style.Section.axle.radius;
|
||||
ctx.arc(arcX, arcY, arcR, 0, 2 * Math.PI, false);
|
||||
ctx.closePath();
|
||||
type: 'EAxle',
|
||||
shape: {
|
||||
point: null
|
||||
},
|
||||
buildPath: function (ctx, model) {
|
||||
if (model && model.style && model.traingle) {
|
||||
const axleLength = 2 * model.style.Section.axle.radius;
|
||||
const positionx = model.point.x + model.drictx * (model.traingle.getCos(axleLength));
|
||||
const positiony = model.point.y + model.dricty * (model.traingle.getCos(axleLength));
|
||||
// 圆弧
|
||||
const arcX = positionx - model.dricty * model.traingle.getSin(axleLength);
|
||||
const arcY = positiony + model.drictx * model.traingle.getSin(axleLength);
|
||||
const arcR = model.style.Section.axle.radius;
|
||||
ctx.arc(arcX, arcY, arcR, 0, 2 * Math.PI, false);
|
||||
ctx.closePath();
|
||||
|
||||
const x1 = positionx - model.traingle.getCos(axleLength) - model.dricty * model.traingle.getSin(axleLength);
|
||||
const y1 = positiony + model.drictx * model.traingle.getSin(axleLength) - model.traingle.getSin(axleLength);
|
||||
const x2 = positionx + model.traingle.getCos(axleLength) - model.dricty * model.traingle.getSin(axleLength);
|
||||
const y2 = positiony + model.drictx * model.traingle.getSin(axleLength) + model.traingle.getSin(axleLength);
|
||||
ctx.moveTo(x1, y1);
|
||||
ctx.lineTo(x2, y2);
|
||||
ctx.closePath();
|
||||
}
|
||||
}
|
||||
const x1 = positionx - model.traingle.getCos(axleLength) - model.dricty * model.traingle.getSin(axleLength);
|
||||
const y1 = positiony + model.drictx * model.traingle.getSin(axleLength) - model.traingle.getSin(axleLength);
|
||||
const x2 = positionx + model.traingle.getCos(axleLength) - model.dricty * model.traingle.getSin(axleLength);
|
||||
const y2 = positiony + model.drictx * model.traingle.getSin(axleLength) + model.traingle.getSin(axleLength);
|
||||
ctx.moveTo(x1, y1);
|
||||
ctx.lineTo(x2, y2);
|
||||
ctx.closePath();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// export default class EAxle extends Group {
|
||||
|
@ -2,41 +2,41 @@ import Path from 'zrender/src/graphic/Path';
|
||||
|
||||
// 成都三号线 折返进路
|
||||
export const EBackArrow = Path.extend({
|
||||
type: 'EBackArrow',
|
||||
shape: {
|
||||
points: null
|
||||
},
|
||||
buildPath: function (ctx, shape) {
|
||||
const points = shape.points;
|
||||
var r = shape.height;
|
||||
var x = points.x + shape.drict * shape.width / 2;
|
||||
var y = points.y;
|
||||
ctx.moveTo(points.x - shape.drict * shape.width, points.y + shape.height);
|
||||
ctx.lineTo(points.x + shape.drict * shape.width / 2, points.y + shape.height);
|
||||
if (shape.drict) {
|
||||
ctx.arc(x, y, r, Math.PI / 2, Math.PI * 3 / 2, true);
|
||||
} else {
|
||||
ctx.arc(x, y, r, Math.PI / 2, Math.PI * 3 / 2, false);
|
||||
}
|
||||
ctx.moveTo(points.x + shape.drict * shape.width / 2, points.y - shape.height);
|
||||
ctx.lineTo(points.x - shape.drict * (shape.width - 5), points.y - shape.height);
|
||||
}
|
||||
type: 'EBackArrow',
|
||||
shape: {
|
||||
points: null
|
||||
},
|
||||
buildPath: function (ctx, shape) {
|
||||
const points = shape.points;
|
||||
var r = shape.height;
|
||||
var x = points.x + shape.drict * shape.width / 2;
|
||||
var y = points.y;
|
||||
ctx.moveTo(points.x - shape.drict * shape.width, points.y + shape.height);
|
||||
ctx.lineTo(points.x + shape.drict * shape.width / 2, points.y + shape.height);
|
||||
if (shape.drict) {
|
||||
ctx.arc(x, y, r, Math.PI / 2, Math.PI * 3 / 2, true);
|
||||
} else {
|
||||
ctx.arc(x, y, r, Math.PI / 2, Math.PI * 3 / 2, false);
|
||||
}
|
||||
ctx.moveTo(points.x + shape.drict * shape.width / 2, points.y - shape.height);
|
||||
ctx.lineTo(points.x - shape.drict * (shape.width - 5), points.y - shape.height);
|
||||
}
|
||||
});
|
||||
|
||||
// 箭头
|
||||
export const EBackArrowTriangle = Path.extend({
|
||||
type: 'EBackArrowTriangle',
|
||||
shape: {
|
||||
points: null
|
||||
},
|
||||
buildPath: function (ctx, shape) {
|
||||
const points = shape.points;
|
||||
ctx.moveTo(points.x - shape.drict * (shape.width - 5), points.y - shape.height - 3);
|
||||
if (shape.drict) {
|
||||
ctx.lineTo(points.x - shape.drict * shape.width, points.y - shape.height);
|
||||
} else {
|
||||
ctx.lineTo(points.x - shape.drict * shape.width, points.y - shape.height);
|
||||
}
|
||||
ctx.lineTo(points.x - shape.drict * (shape.width - 5), points.y - shape.height + 3);
|
||||
}
|
||||
type: 'EBackArrowTriangle',
|
||||
shape: {
|
||||
points: null
|
||||
},
|
||||
buildPath: function (ctx, shape) {
|
||||
const points = shape.points;
|
||||
ctx.moveTo(points.x - shape.drict * (shape.width - 5), points.y - shape.height - 3);
|
||||
if (shape.drict) {
|
||||
ctx.lineTo(points.x - shape.drict * shape.width, points.y - shape.height);
|
||||
} else {
|
||||
ctx.lineTo(points.x - shape.drict * shape.width, points.y - shape.height);
|
||||
}
|
||||
ctx.lineTo(points.x - shape.drict * (shape.width - 5), points.y - shape.height + 3);
|
||||
}
|
||||
});
|
||||
|
@ -77,141 +77,141 @@ import Vue from 'vue';
|
||||
// });
|
||||
|
||||
export default class ELimitLines extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = model.z;
|
||||
this.create(model);
|
||||
}
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = model.z;
|
||||
this.create(model);
|
||||
}
|
||||
|
||||
create(model) {
|
||||
/** 创建区段*/
|
||||
if (model && model.points.length > 1) {
|
||||
if (model.isCurve) {
|
||||
const shape = {};
|
||||
for (let i = 1; i < (model.points.length - 1); i++) {
|
||||
shape[`cpx${i}`] = model.points[i].x;
|
||||
shape[`cpy${i}`] = model.points[i].y;
|
||||
}
|
||||
create(model) {
|
||||
/** 创建区段*/
|
||||
if (model && model.points.length > 1) {
|
||||
if (model.isCurve) {
|
||||
const shape = {};
|
||||
for (let i = 1; i < (model.points.length - 1); i++) {
|
||||
shape[`cpx${i}`] = model.points[i].x;
|
||||
shape[`cpy${i}`] = model.points[i].y;
|
||||
}
|
||||
|
||||
shape[`x1`] = model.points[0].x;
|
||||
shape[`y1`] = model.points[0].y;
|
||||
shape[`x2`] = model.points[model.points.length - 1].x;
|
||||
shape[`y2`] = model.points[model.points.length - 1].y;
|
||||
shape[`x1`] = model.points[0].x;
|
||||
shape[`y1`] = model.points[0].y;
|
||||
shape[`x2`] = model.points[model.points.length - 1].x;
|
||||
shape[`y2`] = model.points[model.points.length - 1].y;
|
||||
|
||||
this.add(new BezierCurve({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
culling: true,
|
||||
shape: shape,
|
||||
position: model.position,
|
||||
style: {
|
||||
lineWidth: model.style.Section.speedLimit.width,
|
||||
stroke: model.style.Section.speedLimit.lineColor,
|
||||
fillOpacity: 0
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
const swPadding = model.style.Switch.core.length; // 定位和反位时区段距离岔芯的距离
|
||||
var switchWidth = model.style.Section.line.width + model.style.Section.line.beyondWidth; // 道岔宽度
|
||||
const beg = Object.assign({}, model.points[0]);
|
||||
const end = Object.assign({}, model.points[model.points.length - 1]);
|
||||
if (model.isSwitchSection && beg.y !== end.y) {
|
||||
const swch = Vue.prototype.$jlmap.mapDevice[model.switch.code]; // 获取道岔model 及状态数据
|
||||
this.add(new BezierCurve({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
culling: true,
|
||||
shape: shape,
|
||||
position: model.position,
|
||||
style: {
|
||||
lineWidth: model.style.Section.speedLimit.width,
|
||||
stroke: model.style.Section.speedLimit.lineColor,
|
||||
fillOpacity: 0
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
const swPadding = model.style.Switch.core.length; // 定位和反位时区段距离岔芯的距离
|
||||
var switchWidth = model.style.Section.line.width + model.style.Section.line.beyondWidth; // 道岔宽度
|
||||
const beg = Object.assign({}, model.points[0]);
|
||||
const end = Object.assign({}, model.points[model.points.length - 1]);
|
||||
if (model.isSwitchSection && beg.y !== end.y) {
|
||||
const swch = Vue.prototype.$jlmap.mapDevice[model.switch.code]; // 获取道岔model 及状态数据
|
||||
|
||||
if (swch && swch.instance) {
|
||||
const traingle = new JTriangle(swch.intersection, swch.skew);
|
||||
if ((swch.intersection.x === beg.x) && (swch.intersection.y === beg.y) && !swch.normalPosition && swch.sectionCCode == model.code) {
|
||||
beg.x = beg.x + traingle.drictx * (swPadding + switchWidth) * traingle.getCotRate();
|
||||
beg.y = beg.y + traingle.dricty * (swPadding + switchWidth);
|
||||
}
|
||||
if (swch && swch.instance) {
|
||||
const traingle = new JTriangle(swch.intersection, swch.skew);
|
||||
if ((swch.intersection.x === beg.x) && (swch.intersection.y === beg.y) && !swch.normalPosition && swch.sectionCCode == model.code) {
|
||||
beg.x = beg.x + traingle.drictx * (swPadding + switchWidth) * traingle.getCotRate();
|
||||
beg.y = beg.y + traingle.dricty * (swPadding + switchWidth);
|
||||
}
|
||||
|
||||
if ((swch.intersection.x === end.x) && (swch.intersection.y === end.y) && swch.normalPosition && swch.sectionCCode == model.code) {
|
||||
end.x = end.x + traingle.drictx * (swPadding + switchWidth) * traingle.getCotRate();
|
||||
end.y = end.y + traingle.dricty * (swPadding + switchWidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((swch.intersection.x === end.x) && (swch.intersection.y === end.y) && swch.normalPosition && swch.sectionCCode == model.code) {
|
||||
end.x = end.x + traingle.drictx * (swPadding + switchWidth) * traingle.getCotRate();
|
||||
end.y = end.y + traingle.dricty * (swPadding + switchWidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (model.points.length == 2) {
|
||||
this.add(new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
position: model.position,
|
||||
shape: {
|
||||
x1: beg.x,
|
||||
y1: beg.y,
|
||||
x2: end.x,
|
||||
y2: end.y
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.speedLimit.width,
|
||||
stroke: model.style.Section.speedLimit.lineColor
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
this.add(new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
position: model.position,
|
||||
shape: {
|
||||
x1: beg.x,
|
||||
y1: beg.y,
|
||||
x2: model.points[1].x,
|
||||
y2: model.points[1].y
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.speedLimit.width,
|
||||
stroke: model.style.Section.speedLimit.lineColor
|
||||
}
|
||||
}));
|
||||
if (model.points.length == 2) {
|
||||
this.add(new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
position: model.position,
|
||||
shape: {
|
||||
x1: beg.x,
|
||||
y1: beg.y,
|
||||
x2: end.x,
|
||||
y2: end.y
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.speedLimit.width,
|
||||
stroke: model.style.Section.speedLimit.lineColor
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
this.add(new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
position: model.position,
|
||||
shape: {
|
||||
x1: beg.x,
|
||||
y1: beg.y,
|
||||
x2: model.points[1].x,
|
||||
y2: model.points[1].y
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.speedLimit.width,
|
||||
stroke: model.style.Section.speedLimit.lineColor
|
||||
}
|
||||
}));
|
||||
|
||||
for (let i = 1; i < (model.points.length - 2); i++) {
|
||||
this.add(new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
progressive: model.progressive,
|
||||
position: model.position,
|
||||
shape: {
|
||||
x1: model.points[i].x,
|
||||
y1: model.points[i].y,
|
||||
x2: model.points[i + 1].x,
|
||||
y2: model.points[i + 1].y
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.speedLimit.width,
|
||||
stroke: model.style.Section.speedLimit.lineColor
|
||||
}
|
||||
}));
|
||||
}
|
||||
for (let i = 1; i < (model.points.length - 2); i++) {
|
||||
this.add(new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
progressive: model.progressive,
|
||||
position: model.position,
|
||||
shape: {
|
||||
x1: model.points[i].x,
|
||||
y1: model.points[i].y,
|
||||
x2: model.points[i + 1].x,
|
||||
y2: model.points[i + 1].y
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.speedLimit.width,
|
||||
stroke: model.style.Section.speedLimit.lineColor
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
this.add(new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
position: model.position,
|
||||
progressive: model.progressive,
|
||||
shape: {
|
||||
x1: model.points[model.points.length - 2].x,
|
||||
y1: model.points[model.points.length - 2].y,
|
||||
x2: end.x,
|
||||
y2: end.y
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.speedLimit.width,
|
||||
stroke: model.style.Section.speedLimit.lineColor
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.add(new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
position: model.position,
|
||||
progressive: model.progressive,
|
||||
shape: {
|
||||
x1: model.points[model.points.length - 2].x,
|
||||
y1: model.points[model.points.length - 2].y,
|
||||
x2: end.x,
|
||||
y2: end.y
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.speedLimit.width,
|
||||
stroke: model.style.Section.speedLimit.lineColor
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,70 +3,70 @@ import Line from 'zrender/src/graphic/shape/Line';
|
||||
|
||||
/** 延时释放*/
|
||||
export default class ERelease extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
|
||||
this.isNew = true;
|
||||
this.lines = new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: model.shape,
|
||||
progressive: model.progressive,
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.stroke
|
||||
}
|
||||
});
|
||||
this.add(this.lines);
|
||||
}
|
||||
}
|
||||
this.isNew = true;
|
||||
this.lines = new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: model.shape,
|
||||
progressive: model.progressive,
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.stroke
|
||||
}
|
||||
});
|
||||
this.add(this.lines);
|
||||
}
|
||||
}
|
||||
|
||||
setStyle(model) {
|
||||
this.create();
|
||||
this.lines.setStyle(model);
|
||||
}
|
||||
setStyle(model) {
|
||||
this.create();
|
||||
this.lines.setStyle(model);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.lines.hide();
|
||||
}
|
||||
hide() {
|
||||
this.create();
|
||||
this.lines.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
this.create();
|
||||
this.lines.show();
|
||||
}
|
||||
show() {
|
||||
this.create();
|
||||
this.lines.show();
|
||||
}
|
||||
|
||||
// 开始动画
|
||||
animateStyle(loop, animates) {
|
||||
this.create();
|
||||
if (animates && animates.length) {
|
||||
this.eachChild((child) => {
|
||||
if (child.animateStyle) {
|
||||
let an = child.animateStyle(loop);
|
||||
animates.forEach(elem => {
|
||||
an = an.when(elem.time, elem.styles);
|
||||
});
|
||||
an.start();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// 开始动画
|
||||
animateStyle(loop, animates) {
|
||||
this.create();
|
||||
if (animates && animates.length) {
|
||||
this.eachChild((child) => {
|
||||
if (child.animateStyle) {
|
||||
let an = child.animateStyle(loop);
|
||||
animates.forEach(elem => {
|
||||
an = an.when(elem.time, elem.styles);
|
||||
});
|
||||
an.start();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 结束动画
|
||||
stopAnimation(flag) {
|
||||
this.create();
|
||||
this.eachChild((child) => {
|
||||
if (child.stopAnimation) {
|
||||
child.stopAnimation(flag);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 结束动画
|
||||
stopAnimation(flag) {
|
||||
this.create();
|
||||
this.eachChild((child) => {
|
||||
if (child.stopAnimation) {
|
||||
child.stopAnimation(flag);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -4,111 +4,111 @@ import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
|
||||
/** 分隔符*/
|
||||
export default class ESeparator extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = model.style.Section.separator.z || 6;
|
||||
this.style = model.style;
|
||||
this.setType();
|
||||
}
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = model.style.Section.separator.z || 6;
|
||||
this.style = model.style;
|
||||
this.setType();
|
||||
}
|
||||
|
||||
createModel(points, lineWidth = null, stroke = null) {
|
||||
const model = this.model;
|
||||
this.partition = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
shape: {
|
||||
points: points
|
||||
},
|
||||
style: {
|
||||
lineWidth: lineWidth || this.style.Section.separator.width,
|
||||
stroke: stroke || this.style.Section.separator.color
|
||||
}
|
||||
});
|
||||
this.add(this.partition);
|
||||
}
|
||||
createModel(points, lineWidth = null, stroke = null) {
|
||||
const model = this.model;
|
||||
this.partition = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z,
|
||||
shape: {
|
||||
points: points
|
||||
},
|
||||
style: {
|
||||
lineWidth: lineWidth || this.style.Section.separator.width,
|
||||
stroke: stroke || this.style.Section.separator.color
|
||||
}
|
||||
});
|
||||
this.add(this.partition);
|
||||
}
|
||||
|
||||
// 创建 侵限分隔符
|
||||
createCircle() {
|
||||
const model = this.model;
|
||||
this.circle = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
progressive: model.progressive,
|
||||
shape: {
|
||||
cx: model.point.x,
|
||||
cy: model.point.y,
|
||||
r: this.style.Section.line.width
|
||||
},
|
||||
style: {
|
||||
stroke: this.style.Section.line.invadeColor,
|
||||
GBaseLineWidth: 0.5,
|
||||
fill: this.style.transparentColor
|
||||
}
|
||||
});
|
||||
this.add(this.circle);
|
||||
}
|
||||
// 创建 侵限分隔符
|
||||
createCircle() {
|
||||
const model = this.model;
|
||||
this.circle = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
progressive: model.progressive,
|
||||
shape: {
|
||||
cx: model.point.x,
|
||||
cy: model.point.y,
|
||||
r: this.style.Section.line.width
|
||||
},
|
||||
style: {
|
||||
stroke: this.style.Section.line.invadeColor,
|
||||
GBaseLineWidth: 0.5,
|
||||
fill: this.style.transparentColor
|
||||
}
|
||||
});
|
||||
this.add(this.circle);
|
||||
}
|
||||
|
||||
createCircleArc() {
|
||||
const model = this.model;
|
||||
this.circleArc = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
progressive: model.progressive,
|
||||
shape: {
|
||||
cx: model.point.x,
|
||||
cy: model.point.y,
|
||||
r: this.style.Section.line.width + 2
|
||||
},
|
||||
style: {
|
||||
stroke: 'red',
|
||||
GBaseLineWidth: 0.5,
|
||||
fill: this.style.transparentColor
|
||||
}
|
||||
});
|
||||
this.add(this.circleArc);
|
||||
}
|
||||
createCircleArc() {
|
||||
const model = this.model;
|
||||
this.circleArc = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
progressive: model.progressive,
|
||||
shape: {
|
||||
cx: model.point.x,
|
||||
cy: model.point.y,
|
||||
r: this.style.Section.line.width + 2
|
||||
},
|
||||
style: {
|
||||
stroke: 'red',
|
||||
GBaseLineWidth: 0.5,
|
||||
fill: this.style.transparentColor
|
||||
}
|
||||
});
|
||||
this.add(this.circleArc);
|
||||
}
|
||||
|
||||
setType() {
|
||||
const type = this.model.sepType;
|
||||
const model = this.model;
|
||||
if (model && this.style && model.traingle) {
|
||||
if (type === '01') { // 普通分割
|
||||
const points = [
|
||||
[model.point.x, model.point.y - (this.style.Section.line.width)],
|
||||
[model.point.x, model.point.y + (this.style.Section.line.width)]
|
||||
];
|
||||
this.createModel(points);
|
||||
} else if (type === '02') { // 单侧分割符
|
||||
const points = [
|
||||
[model.point.x + model.drict * (this.style.Section.line.width), model.point.y - (this.style.Section.line.width * 1.5)],
|
||||
[model.point.x, model.point.y - (this.style.Section.line.width * 1.5)],
|
||||
[model.point.x, model.point.y + (this.style.Section.line.width * 1.5)]
|
||||
];
|
||||
this.createModel(points);
|
||||
} else if (type === '03') { // 尽头分隔符
|
||||
const points = [
|
||||
[model.point.x + model.drict * (this.style.Section.line.width) * 1.2, model.point.y - (this.style.Section.line.width * 1.2)],
|
||||
[model.point.x, model.point.y - (this.style.Section.line.width * 1.2)],
|
||||
[model.point.x, model.point.y + (this.style.Section.line.width * 1.2)],
|
||||
[model.point.x + model.drict * (this.style.Section.line.width) * 1.2, model.point.y + (this.style.Section.line.width * 1.2)]
|
||||
];
|
||||
const lineWidth = this.style.Section.separator.endWidth;
|
||||
const stroke = this.style.Section.separator.endColor;
|
||||
this.createModel(points, lineWidth, stroke);
|
||||
} else if (type === '04') { // 侵限分隔符
|
||||
this.createCircle();
|
||||
} else if (type === '05') { // 特色分隔符
|
||||
this.createCircleArc();
|
||||
}
|
||||
}
|
||||
setType() {
|
||||
const type = this.model.sepType;
|
||||
const model = this.model;
|
||||
if (model && this.style && model.traingle) {
|
||||
if (type === '01') { // 普通分割
|
||||
const points = [
|
||||
[model.point.x, model.point.y - (this.style.Section.line.width)],
|
||||
[model.point.x, model.point.y + (this.style.Section.line.width)]
|
||||
];
|
||||
this.createModel(points);
|
||||
} else if (type === '02') { // 单侧分割符
|
||||
const points = [
|
||||
[model.point.x + model.drict * (this.style.Section.line.width), model.point.y - (this.style.Section.line.width * 1.5)],
|
||||
[model.point.x, model.point.y - (this.style.Section.line.width * 1.5)],
|
||||
[model.point.x, model.point.y + (this.style.Section.line.width * 1.5)]
|
||||
];
|
||||
this.createModel(points);
|
||||
} else if (type === '03') { // 尽头分隔符
|
||||
const points = [
|
||||
[model.point.x + model.drict * (this.style.Section.line.width) * 1.2, model.point.y - (this.style.Section.line.width * 1.2)],
|
||||
[model.point.x, model.point.y - (this.style.Section.line.width * 1.2)],
|
||||
[model.point.x, model.point.y + (this.style.Section.line.width * 1.2)],
|
||||
[model.point.x + model.drict * (this.style.Section.line.width) * 1.2, model.point.y + (this.style.Section.line.width * 1.2)]
|
||||
];
|
||||
const lineWidth = this.style.Section.separator.endWidth;
|
||||
const stroke = this.style.Section.separator.endColor;
|
||||
this.createModel(points, lineWidth, stroke);
|
||||
} else if (type === '04') { // 侵限分隔符
|
||||
this.createCircle();
|
||||
} else if (type === '05') { // 特色分隔符
|
||||
this.createCircleArc();
|
||||
}
|
||||
}
|
||||
|
||||
if (model.traingle) {
|
||||
this.origin = [model.point.x, model.point.y];
|
||||
this.rotation = Math.PI * 2 - Math.atan2(model.traingle.absy, model.traingle.absx) * model.traingle.drictx * model.traingle.dricty;
|
||||
this.dirty(); // 可以无需调用
|
||||
}
|
||||
}
|
||||
if (model.traingle) {
|
||||
this.origin = [model.point.x, model.point.y];
|
||||
this.rotation = Math.PI * 2 - Math.atan2(model.traingle.absy, model.traingle.absx) * model.traingle.drictx * model.traingle.dricty;
|
||||
this.dirty(); // 可以无需调用
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
import BezierCurve from 'zrender/src/graphic/shape/BezierCurve';
|
||||
import {
|
||||
import {
|
||||
cubicSubdivide,
|
||||
quadraticAt,
|
||||
cubicAt,
|
||||
@ -49,8 +49,8 @@ export default class ELines extends Group {
|
||||
this.add(this.section);
|
||||
} else {
|
||||
if (model.points.length == 2) {
|
||||
const spaceX= (model.points[1].x - model.points[0].x) / 3;
|
||||
const spaceY= (model.points[1].y - model.points[0].y) / 3;
|
||||
const spaceX = (model.points[1].x - model.points[0].x) / 3;
|
||||
const spaceY = (model.points[1].y - model.points[0].y) / 3;
|
||||
this.sectionM = new Line({
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
@ -130,8 +130,7 @@ export default class ELines extends Group {
|
||||
(isTangent ? cubicDerivativeAt : cubicAt)(shape.x1, shape.cpx1, shape.cpx2, shape.x2, t),
|
||||
(isTangent ? cubicDerivativeAt : cubicAt)(shape.y1, shape.cpy1, shape.cpy2, shape.y2, t)
|
||||
];
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return [
|
||||
(isTangent ? quadraticDerivativeAt : quadraticAt)(shape.x1, shape.cpx1, shape.x2, t),
|
||||
(isTangent ? quadraticDerivativeAt : quadraticAt)(shape.y1, shape.cpy1, shape.y2, t)
|
||||
@ -141,7 +140,7 @@ export default class ELines extends Group {
|
||||
|
||||
// 重新计算居中距离点
|
||||
couvert(shape) {
|
||||
let out = [];
|
||||
const out = [];
|
||||
var x1 = shape.x1;
|
||||
var y1 = shape.y1;
|
||||
var x2 = shape.x2;
|
||||
@ -150,7 +149,7 @@ export default class ELines extends Group {
|
||||
var cpy1 = shape.cpy1;
|
||||
var cpx2 = shape.cpx2;
|
||||
var cpy2 = shape.cpy2;
|
||||
|
||||
|
||||
cubicSubdivide(
|
||||
x1, cpx1, cpx2, x2, 0.3, out
|
||||
);
|
||||
@ -159,7 +158,7 @@ export default class ELines extends Group {
|
||||
x1, cpx1, cpx2, x2, 0.7, out
|
||||
);
|
||||
var n_x2 = out[3];
|
||||
|
||||
|
||||
cubicSubdivide(
|
||||
y1, cpy1, cpy2, y2, 0.3, out
|
||||
);
|
||||
@ -168,20 +167,20 @@ export default class ELines extends Group {
|
||||
y1, cpy1, cpy2, y2, 0.7, out
|
||||
);
|
||||
var n_y2 = out[3];
|
||||
|
||||
|
||||
var p = this.someVectorAt(shape, 0.5, true);
|
||||
var v = vec2.normalize(p, p);
|
||||
|
||||
var x0 = Math.sqrt((Math.pow(cpx1-x1, 2)+Math.pow(x2-cpx2, 2))/2, 2);
|
||||
var y0 = Math.sqrt((Math.pow(cpy1-y1, 2)+Math.pow(y2-cpy2, 2))/2, 2);
|
||||
|
||||
|
||||
var x0 = Math.sqrt((Math.pow(cpx1 - x1, 2) + Math.pow(x2 - cpx2, 2)) / 2, 2);
|
||||
var y0 = Math.sqrt((Math.pow(cpy1 - y1, 2) + Math.pow(y2 - cpy2, 2)) / 2, 2);
|
||||
|
||||
return {
|
||||
x1: n_x1,
|
||||
y1: n_y1,
|
||||
x2: n_x2,
|
||||
y2: n_y2,
|
||||
cpx1: (cpx1+cpx2)/2 + v[1]*x0*0.128,
|
||||
cpy1: (cpy1+cpy2)/2 + v[0]*y0*0.128
|
||||
cpx1: (cpx1 + cpx2) / 2 + v[1] * x0 * 0.128,
|
||||
cpy1: (cpy1 + cpy2) / 2 + v[0] * y0 * 0.128
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ export default class Section extends Group {
|
||||
this.style = style;
|
||||
this.selected = false; // 绘图选中状态
|
||||
this.selectedType = ''; // 绘图批量选中状态
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -783,6 +784,7 @@ export default class Section extends Group {
|
||||
|
||||
/** 设置状态*/
|
||||
setState(model, flag = false) {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
// 实际上就是 状态重置 必须在设置其他状态之前 设置颜色之类的
|
||||
if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) {
|
||||
@ -887,4 +889,18 @@ export default class Section extends Group {
|
||||
this.section && this.section.setStyle({ stroke: 'rgba(255,255,255,0.8)' });
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ class Signal extends Group {
|
||||
this.count = parseInt(model.lampPositionType);
|
||||
this.lamps = new Array(this.count);
|
||||
this.zlevel = model.zlevel;
|
||||
this.isShowShape = true;
|
||||
this.z = 7;
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
@ -461,6 +462,7 @@ class Signal extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
// /** 设置状态 (点灯类型)*/
|
||||
// switch (model.status) {
|
||||
@ -589,6 +591,20 @@ class Signal extends Group {
|
||||
}
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default Signal;
|
||||
|
@ -21,7 +21,7 @@ export default class Station extends Group {
|
||||
this.z = 40;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.createTurnBack(); // 创建按图折返
|
||||
if (isShowThePrdType(model.prdType, style.Station.functionButtonShow) || model.previewOrMapDraw) {
|
||||
@ -312,6 +312,7 @@ export default class Station extends Group {
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
switch (model.controlMode) {
|
||||
case '': // 无状态
|
||||
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
@ -378,4 +379,18 @@ export default class Station extends Group {
|
||||
this.guideLamp && this.guideLamp.hide();
|
||||
}
|
||||
}
|
||||
setShowStation(flag) {
|
||||
if (flag) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ export default class StationControl extends Group {
|
||||
this.z = 1;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -114,6 +115,7 @@ export default class StationControl extends Group {
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
// switch (model.status) {
|
||||
// case '00': // 无状态
|
||||
// this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
@ -179,4 +181,18 @@ export default class StationControl extends Group {
|
||||
return null;
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ export default class StationCounter extends Group {
|
||||
this.style = style;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 30;
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
@ -81,11 +82,26 @@ export default class StationCounter extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
|
||||
getShapeTipPoint() {
|
||||
return null;
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ export default class StationDelayUnlock extends Group {
|
||||
this.style = style;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 1;
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
@ -90,6 +91,7 @@ export default class StationDelayUnlock extends Group {
|
||||
|
||||
/** 延时解锁计数*/
|
||||
delayUnlock() {
|
||||
if (!this.isShowShape) return;
|
||||
this.table.setStyle('stroke', this.style.sidelineColor);
|
||||
this.time.setStyle('text', '' + this.model.remainTime);
|
||||
}
|
||||
@ -105,4 +107,18 @@ export default class StationDelayUnlock extends Group {
|
||||
return null;
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ class StationStand extends Group {
|
||||
this.style = style;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 1;
|
||||
this.isShowShape = true;
|
||||
this.doors = new Group();
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
@ -492,6 +493,7 @@ class StationStand extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
// 新版地图使用新版状态变更方式
|
||||
this.recover();
|
||||
model.free && this.spare(); /** 空闲*/
|
||||
@ -581,5 +583,19 @@ class StationStand extends Group {
|
||||
this.downDetainLamp && this.downDetainLamp.hide();
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.deviceStationCode === stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
export default StationStand;
|
||||
|
@ -15,7 +15,7 @@ import EHighlight from '../element/EHighlight';
|
||||
import ERhomboid from './ERhomboid';
|
||||
import ETriangle from './ETriangle';
|
||||
import store from '@/store';
|
||||
// import Vue from 'vue';
|
||||
import Vue from 'vue';
|
||||
|
||||
export default class Switch extends Group {
|
||||
constructor(model, style) {
|
||||
@ -26,6 +26,7 @@ export default class Switch extends Group {
|
||||
this.style = style;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 6;
|
||||
this.isShowShape = true;
|
||||
this.triangle = new JTriangle(model.intersection, model.skew);
|
||||
this.create();
|
||||
this.createLockRect(); // 创建单锁矩形框显示
|
||||
@ -428,6 +429,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
if (model.normalPosition) {
|
||||
this.setLocationAction(model); /** 定位*/
|
||||
} else if (model.reversePosition) {
|
||||
@ -483,4 +485,18 @@ export default class Switch extends Group {
|
||||
}
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ export default class Text2 extends Group {
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.z = 6;
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, model.showConditions) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
this.setState(model);
|
||||
@ -46,6 +47,7 @@ export default class Text2 extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
// 设置显示模式
|
||||
setShowMode() {
|
||||
@ -57,4 +59,18 @@ export default class Text2 extends Group {
|
||||
this.text && this.text.hide();
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,16 +20,16 @@ class EMouse extends Group {
|
||||
}
|
||||
let trainType = '';
|
||||
switch (this.device.model.type) {
|
||||
case '01': trainType = LangStorage.getLang() == 'en' ? 'Plan the car' : '计划车'; break;
|
||||
case '02': trainType = LangStorage.getLang() == 'en' ? 'Head size car' : '头码车'; break;
|
||||
case '03': trainType = LangStorage.getLang() == 'en' ? 'Artificial car' : '人工车'; break;
|
||||
case 'PLAN': trainType = LangStorage.getLang() == 'en' ? 'Plan the car' : '计划车'; break;
|
||||
case 'HEAD': trainType = LangStorage.getLang() == 'en' ? 'Head size car' : '头码车'; break;
|
||||
case 'MANUAL': trainType = LangStorage.getLang() == 'en' ? 'Artificial car' : '人工车'; break;
|
||||
default: trainType = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break;
|
||||
}
|
||||
let text = '';
|
||||
if (LangStorage.getLang() == 'en') {
|
||||
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${this.device.model.directionType == '02' ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${!this.device.model.hold ? 'Normal' : 'Detained'}\n \n 跳停状态: ${!this.device.model.jump ? 'Normal' : 'Skip to continue moving'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
|
||||
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${this.device.model.directionType == '02' ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
|
||||
} else {
|
||||
text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${ !this.device.model.hold ? '正常' : '扣车'}\n 跳停状态: ${!this.device.model.jump ? '正常' : '跳停'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
|
||||
text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
|
||||
}
|
||||
// 文字描述
|
||||
this.arrowText = new Text({
|
||||
|
@ -20,6 +20,7 @@ export default class Train extends Group {
|
||||
this.section = null;
|
||||
this.nextPointIndex = 1;
|
||||
this.currentAdd = 0;
|
||||
this.isShowShape = true;
|
||||
this.fontSize = style.Train.common.useSelfText ? style.Train.common.nameFontSize || style.Train.common.trainTextFontSize : model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
|
||||
this.newScale = this.fontSize / style.Train.common.trainTextFontSize;
|
||||
this.nameFormat = style.Train.common.useSelfFormat ? style.Train.trainBody.trainNameFormat : model.nameFormat || style.Train.trainBody.trainNameFormat;
|
||||
@ -34,6 +35,7 @@ export default class Train extends Group {
|
||||
}
|
||||
this.create();
|
||||
this.setState(model, this);
|
||||
this.initShowStation(model);
|
||||
}
|
||||
|
||||
_computed() {
|
||||
@ -404,6 +406,7 @@ export default class Train extends Group {
|
||||
}
|
||||
// 设置状态
|
||||
setState(model, object) {
|
||||
if (!this.isShowShape) return;
|
||||
const flag = model.trainWindowModel ? model.trainWindowModel.reversal : false;
|
||||
if (model) {
|
||||
this.recover();
|
||||
@ -512,4 +515,25 @@ export default class Train extends Group {
|
||||
this.add(this.trainBorder);
|
||||
}
|
||||
setShowMode() {}
|
||||
initShowStation(model) {
|
||||
if (model.trainWindowModel && model.trainWindowModel.instance && !model.trainWindowModel.instance.isShowShape) {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if ((this.model.sectionModel && this.model.sectionModel.stationCode === stationCode) || !stationCode ) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model, this);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ class TrainWindow extends Group {
|
||||
this.style = style;
|
||||
this.z = 9;
|
||||
this.prdType = store.state.training.prdType;
|
||||
this.isShowShape = true;
|
||||
this.create(model);
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -67,6 +68,7 @@ class TrainWindow extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
this.setVisible(model.trainWindowShow);
|
||||
}
|
||||
|
||||
@ -79,6 +81,20 @@ class TrainWindow extends Group {
|
||||
return (store.getters['map/getDeviceByCode'](code) || {}).instance;
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(flag) {
|
||||
if (flag) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default TrainWindow;
|
||||
|
@ -14,6 +14,7 @@ export default class ZcControl extends Group {
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.isShowShape = true;
|
||||
this.create(model);
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -60,6 +61,7 @@ export default class ZcControl extends Group {
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
createMouseEvent() {
|
||||
if (this.style.ZcControl.mouseOverStyle) {
|
||||
@ -81,4 +83,18 @@ export default class ZcControl extends Group {
|
||||
return null;
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -102,12 +102,4 @@ export default class EControl extends Group {
|
||||
this.text.setStyle('textFill', color);
|
||||
}
|
||||
}
|
||||
hide() {
|
||||
this.control.hide();
|
||||
this.text.hide();
|
||||
}
|
||||
show() {
|
||||
this.control.show();
|
||||
this.text.show();
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,166 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm view-display"
|
||||
title="设备显示设置"
|
||||
:visible.sync="show"
|
||||
width="240px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-checkbox-group v-model="deviceLevels">
|
||||
<div>
|
||||
<el-checkbox :label="1">车次窗</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="2">区段边界</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="3">联锁自动进路表示灯</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="4">ATS自动触发表示灯</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdConfirm" class="commit" type="primary" :loading="loading" @click="commit">确定
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button :id="domIdCancel" class="cancal" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import deviceType from '@/jmap/constant/deviceType';
|
||||
|
||||
export default {
|
||||
name: 'ViewDevice',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
deviceLevels: [2, 3, 4, 5]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setDeviceDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活,而是第一次显示,需要初始化数据
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.deviceLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setDeviceDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
let deviceList = [];
|
||||
|
||||
// 区段边界设置
|
||||
let borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { borderBorderShow })); // 区段边界
|
||||
});
|
||||
}
|
||||
|
||||
// 车次窗设置
|
||||
let trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
|
||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { trainWindowShow })); // 车次窗
|
||||
});
|
||||
}
|
||||
|
||||
// 联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
let linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1;// 联锁自动进路表示灯
|
||||
let atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1;// ATS自动触发表示灯
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
</style>
|
@ -1,248 +0,0 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm view-name" title="名称显示设置" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-checkbox-group v-model="nameLevels">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="1">信号机名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="2">站台轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="4">折返轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">股道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="7">道岔名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="9">道岔区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="10">目的地名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="11">计轴区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="12">公里标</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'viewName',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
setNameDisplay() {
|
||||
let deviceList = [];
|
||||
|
||||
//信号机
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//按钮名称
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||
|
||||
|
||||
//道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1 ? true : false; //道岔名称
|
||||
let switchSectionNameShow = this.nameLevels.indexOf(9) !== -1 ? true : false; //道岔轨名称
|
||||
let switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//控制模式
|
||||
let indicatorShow = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||
let control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //标识灯名称
|
||||
})
|
||||
}
|
||||
|
||||
//区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
//道岔轨的区段名称默认不显示
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||
} else if (elem.type === '02') {
|
||||
//股道轨名称
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||
} else if (elem.type === '03') {
|
||||
//道岔区段名称
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
//站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//停车点
|
||||
let destCodeShow = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||
let stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//车站
|
||||
let kmPostShow = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||
let stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //公里标
|
||||
})
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,192 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm view-train-id"
|
||||
title="列车识别号显示设置"
|
||||
:visible.sync="show"
|
||||
width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">计划车显示模式</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="1">表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="2">表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="5">目的地号+表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="6">目的地号+表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
|
||||
<span class="base-label">头码车显示模式</span>
|
||||
<el-radio-group v-model="headMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="8">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">字体大小</span>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="fontSize" size="small" min="16" max="99" />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewTrainId',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
planMode: 5,
|
||||
headMode: 5,
|
||||
fontSize: 16
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setTrainDispaly();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: [this.planMode, this.headMode, this.fontSize].join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.setTrainDispaly();
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setTrainDispaly() {
|
||||
const updatList = [];
|
||||
const trainList = this.$store.getters['training/viewTrainList']();
|
||||
if (trainList && trainList.length > 0) {
|
||||
const nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
const nameFontSize = this.fontSize;
|
||||
updatList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); // 车次窗
|
||||
});
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', updatList);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
switch (mode.toString()) {
|
||||
case '1': return 'serviceNumber:tripNumber'; // 表号+车次号
|
||||
case '2': return 'serviceNumber:groupNumber'; // 表号+车组号
|
||||
case '3': return 'targetCode:tripNumber'; // 目的地号+车次号
|
||||
case '4': return 'targetCode:groupNumber'; // 目的地号+车组号
|
||||
case '5': return 'targetCode:serviceNumber:tripNumber'; // 目的地号+表号+车次号
|
||||
case '6': return 'targetCode:serviceNumber:groupNumber'; // 目的地号+表号+车组号
|
||||
}
|
||||
return ''; // 无格式类型
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -51,31 +51,31 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '区段故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: '区段计轴预复位',
|
||||
handler: this.axlePreReset,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
},
|
||||
{
|
||||
label: '区段设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
}
|
||||
// {
|
||||
// label: '区段故障解锁',
|
||||
// handler: this.faultUnlock,
|
||||
// cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
// },
|
||||
// {
|
||||
// label: '区段激活',
|
||||
// handler: this.active,
|
||||
// cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
// },
|
||||
// {
|
||||
// label: '区段切除',
|
||||
// handler: this.split,
|
||||
// cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
// },
|
||||
// {
|
||||
// label: '区段计轴预复位',
|
||||
// handler: this.axlePreReset,
|
||||
// cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
// },
|
||||
// {
|
||||
// label: '区段设置限速',
|
||||
// handler: this.setSpeed,
|
||||
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
@ -172,14 +172,19 @@ export default {
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.Signal.guide.button.operation: {
|
||||
case OperationEvent.Section.fault.menu.operation: {
|
||||
// 区故解
|
||||
if (selectType.fault) {
|
||||
this.faultUnlock(selectType);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow({}, `该区段[${selectType.name}(${selectType.code})]没有故障`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Signal.guide.button.operation: {
|
||||
// 计轴复位
|
||||
break;
|
||||
}
|
||||
// case OperationEvent: {
|
||||
// // 计轴复位
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
},
|
||||
// // 设置计轴失效
|
||||
@ -205,20 +210,19 @@ export default {
|
||||
// });
|
||||
// },
|
||||
// 故障解锁
|
||||
fault() {
|
||||
faultUnlock(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
sectionCode: selectType.code
|
||||
},
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||
// this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -299,19 +303,6 @@ export default {
|
||||
},
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Section.type,
|
||||
// label: MapDeviceType.Section.label,
|
||||
// operation: OperationEvent.Section.setLimitSpeed.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.speedCmdControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
@ -47,6 +47,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
clickNum:0,
|
||||
oldSelected:null,
|
||||
menuNormal: {
|
||||
Local: [
|
||||
// {
|
||||
@ -206,6 +208,23 @@ export default {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.Signal.arrangementRoute.button.operation: {
|
||||
// 进路建立
|
||||
if (this.clickNum >= 1) {
|
||||
let route = null;
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.oldSelected.code && elem.endSignalCode === selectType.code) {
|
||||
route = elem;
|
||||
}
|
||||
});
|
||||
if (route) {
|
||||
this.setRoute(route);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow({}, `没有以[${this.oldSelected.name}(${this.oldSelected.code})]为始端信号机,以[${selectType.name}(${selectType.code})] 为终端信号机的进路`);
|
||||
}
|
||||
this.clickNum = 0;
|
||||
} else {
|
||||
this.oldSelected = selectType;
|
||||
this.clickNum++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Signal.cancelTrainRoute.button.operation: {
|
||||
@ -218,6 +237,13 @@ export default {
|
||||
}
|
||||
case OperationEvent.Signal.reopenSignal.button.operation: {
|
||||
// 信号重开
|
||||
if (selectType.greenOpen) {
|
||||
this.$refs.noticeInfo.doShow({}, `信号机[${selectType.name}(${selectType.code})]已开启,无需重开信号机`);
|
||||
} else {
|
||||
// 开放进路信号机因故关闭
|
||||
this.reopenSignalByRoute(selectType);
|
||||
// 开放非进路信号机因故关闭
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Signal.guide.button.operation: {
|
||||
@ -318,6 +344,23 @@ export default {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 现地设置进路
|
||||
setRoute(route) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
param: {
|
||||
routeCode: route.code
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
const operate = {
|
||||
@ -335,6 +378,27 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 现地信号重开操作
|
||||
reopenSignalByRoute(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
param: {
|
||||
signalCode: selectType.code
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
const operate = {
|
||||
|
@ -306,42 +306,25 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔故障解锁
|
||||
fault() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.fault.menu.operation,
|
||||
param: {
|
||||
switchCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔取消速度
|
||||
cancelSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
|
||||
param: {
|
||||
switchCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
const tempData = response.data;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
||||
}
|
||||
});
|
||||
},
|
||||
// cancelSpeed() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// send: true,
|
||||
// code: this.selected.code,
|
||||
// operation: OperationEvent.Switch.cancelSpeed.menu.operation,
|
||||
// param: {
|
||||
// switchCode: `${this.selected.code}`
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
// if (valid) {
|
||||
// const tempData = response.data;
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
|
||||
// 区段切除
|
||||
split() {
|
||||
|
@ -1,63 +1,63 @@
|
||||
import deviceType from '../../constant/deviceType';
|
||||
|
||||
class Model {
|
||||
constructor() {
|
||||
// 公共字段部分默认初始值
|
||||
this['public'] = {};
|
||||
this['public'][deviceType.Signal] = {
|
||||
lampPositionType: '02',
|
||||
lampPostType: '02'
|
||||
};
|
||||
constructor() {
|
||||
// 公共字段部分默认初始值
|
||||
this['public'] = {};
|
||||
this['public'][deviceType.Signal] = {
|
||||
lampPositionType: '02',
|
||||
lampPostType: '02'
|
||||
};
|
||||
|
||||
// 私有字段部分默认初始值
|
||||
this['private'] = {};
|
||||
this['private'][deviceType.StationControl] = {
|
||||
indicatorShow: true // 标识灯名称显示
|
||||
};
|
||||
this['private'][deviceType.Section] = {
|
||||
borderBorderShow: true, // 区段边界显示
|
||||
standTrackNameShow: true, // 站台轨名称显示
|
||||
reentryTrackNameShow: true, // 折返轨名称显示
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
this['private'][deviceType.Train] = {
|
||||
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
|
||||
nameFontSize: 10 // 字体大小
|
||||
};
|
||||
this['private'][deviceType.TrainWindow] = {
|
||||
trainWindowShow: false
|
||||
};
|
||||
}
|
||||
// 私有字段部分默认初始值
|
||||
this['private'] = {};
|
||||
this['private'][deviceType.StationControl] = {
|
||||
indicatorShow: true // 标识灯名称显示
|
||||
};
|
||||
this['private'][deviceType.Section] = {
|
||||
borderBorderShow: true, // 区段边界显示
|
||||
standTrackNameShow: true, // 站台轨名称显示
|
||||
reentryTrackNameShow: true, // 折返轨名称显示
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
this['private'][deviceType.Train] = {
|
||||
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
|
||||
nameFontSize: 10 // 字体大小
|
||||
};
|
||||
this['private'][deviceType.TrainWindow] = {
|
||||
trainWindowShow: true
|
||||
};
|
||||
}
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
export default new Model();
|
||||
|
@ -66,7 +66,6 @@
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
<view-device ref="viewDevice" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
@ -89,7 +88,6 @@ import TrainDelete from './menuDialog/trainDelete';
|
||||
import PasswordBox from './menuDialog/passwordBox';
|
||||
import ViewTrainId from './menuDialog/viewTrainId';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
import ViewDevice from './menuDialog/viewDevice';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import SetLimitSpeed from './menuDialog/setLimitSpeed';
|
||||
@ -104,7 +102,6 @@ export default {
|
||||
PasswordBox,
|
||||
ViewTrainId,
|
||||
ViewName,
|
||||
ViewDevice,
|
||||
TrainAdd,
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
|
@ -76,12 +76,12 @@
|
||||
<button :id="MixinCommand.functionButton.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.functionButton.button.operation, 'MixinCommand')">
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b style="color:deepskyblue">功</b>
|
||||
<b style="color:burlywood">能</b>
|
||||
<b style="color:#4B4B99">功</b>
|
||||
<b style="color:#943E3E">能</b>
|
||||
</center>
|
||||
<center>
|
||||
<b style="color: red">按</b>
|
||||
<b style="color:forestgreen">钮</b>
|
||||
<b style="color:#E64BE6">按</b>
|
||||
<b style="color:#4C994C">钮</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
@ -332,18 +332,37 @@ export default {
|
||||
} else if (deviceList.length === 2) {
|
||||
this.routeList.forEach(item => {
|
||||
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
|
||||
item.type;
|
||||
const operate = this.handelOperate(item);
|
||||
console.log(operate, item);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
handelFunctionButton(model, subType) {
|
||||
const operate = {
|
||||
send: true,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: '',
|
||||
param: {}
|
||||
};
|
||||
if (model._type === 'StationStand' && subType === 'StopJumpLamp') {
|
||||
operate.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP;
|
||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||
} else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp') {
|
||||
operate.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP;
|
||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||
} else if (model._type === 'MapCycleButtonVO' ) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK;
|
||||
operate.param = {cycleCode: model.cycleCode};
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
||||
console.log(operate);
|
||||
},
|
||||
selectedChange() {
|
||||
// 按钮按下时
|
||||
if (this.$store.state.menuOperation.buttonOperation) {
|
||||
const model = this.$store.state.menuOperation.selected; // 选择设备
|
||||
const subType = this.$store.state.menuOperation.subType; // 选择设备的子元素
|
||||
this.deviceList.push(model);
|
||||
if (model._type) {
|
||||
if (this.Signal.arrangementRoute.button.operation === this.$store.state.menuOperation.buttonOperation) {
|
||||
@ -351,8 +370,11 @@ export default {
|
||||
return;
|
||||
}
|
||||
this.arrangementRouteOperation(this.deviceList);
|
||||
} if (this.$store.state.menuOperation.buttonOperation === this.MixinCommand.functionButton.button.operation) {
|
||||
this.handelFunctionButton(model, subType);
|
||||
} else {
|
||||
const operate = this.handelOperate(model);
|
||||
console.log(operate);
|
||||
if (this.cmdTypeList.indexOf(model._type) >= 0) {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
|
@ -1,166 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm view-display"
|
||||
title="设备显示设置"
|
||||
:visible.sync="show"
|
||||
width="240px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-checkbox-group v-model="deviceLevels">
|
||||
<div>
|
||||
<el-checkbox :label="1">车次窗</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="2">区段边界</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="3">联锁自动进路表示灯</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="4">ATS自动触发表示灯</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdConfirm" class="commit" type="primary" :loading="loading" @click="commit">确定
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button :id="domIdCancel" class="cancal" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import deviceType from '@/jmap/constant/deviceType';
|
||||
|
||||
export default {
|
||||
name: 'ViewDevice',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
deviceLevels: [2, 3, 4, 5]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setDeviceDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活,而是第一次显示,需要初始化数据
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.deviceLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setDeviceDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
let deviceList = [];
|
||||
|
||||
// 区段边界设置
|
||||
let borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { borderBorderShow })); // 区段边界
|
||||
});
|
||||
}
|
||||
|
||||
// 车次窗设置
|
||||
let trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
|
||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { trainWindowShow })); // 车次窗
|
||||
});
|
||||
}
|
||||
|
||||
// 联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
let linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1;// 联锁自动进路表示灯
|
||||
let atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1;// ATS自动触发表示灯
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
</style>
|
@ -1,63 +1,63 @@
|
||||
import deviceType from '../../constant/deviceType';
|
||||
|
||||
class Model {
|
||||
constructor() {
|
||||
// 公共字段部分默认初始值
|
||||
this['public'] = {};
|
||||
this['public'][deviceType.Signal] = {
|
||||
lampPositionType: '02',
|
||||
lampPostType: '02'
|
||||
};
|
||||
constructor() {
|
||||
// 公共字段部分默认初始值
|
||||
this['public'] = {};
|
||||
this['public'][deviceType.Signal] = {
|
||||
lampPositionType: '02',
|
||||
lampPostType: '02'
|
||||
};
|
||||
|
||||
// 私有字段部分默认初始值
|
||||
this['private'] = {};
|
||||
this['private'][deviceType.StationControl] = {
|
||||
indicatorShow: true // 标识灯名称显示
|
||||
};
|
||||
this['private'][deviceType.Section] = {
|
||||
borderBorderShow: true, // 区段边界显示
|
||||
standTrackNameShow: true, // 站台轨名称显示
|
||||
reentryTrackNameShow: true, // 折返轨名称显示
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
this['private'][deviceType.Train] = {
|
||||
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
|
||||
nameFontSize: 10 // 字体大小
|
||||
};
|
||||
this['private'][deviceType.TrainWindow] = {
|
||||
trainWindowShow: true
|
||||
};
|
||||
}
|
||||
// 私有字段部分默认初始值
|
||||
this['private'] = {};
|
||||
this['private'][deviceType.StationControl] = {
|
||||
indicatorShow: true // 标识灯名称显示
|
||||
};
|
||||
this['private'][deviceType.Section] = {
|
||||
borderBorderShow: true, // 区段边界显示
|
||||
standTrackNameShow: true, // 站台轨名称显示
|
||||
reentryTrackNameShow: true, // 折返轨名称显示
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
this['private'][deviceType.Train] = {
|
||||
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
|
||||
nameFontSize: 10 // 字体大小
|
||||
};
|
||||
this['private'][deviceType.TrainWindow] = {
|
||||
trainWindowShow: true
|
||||
};
|
||||
}
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
export default new Model();
|
||||
|
@ -10,6 +10,15 @@ class Theme {
|
||||
'06': 'ningbo_01',
|
||||
'07': 'haerbin_01' // 哈尔滨培训线路
|
||||
};
|
||||
this._localShowMode = { // 现地显示模式
|
||||
'01': 'all', // 成都一 全显
|
||||
'02': 'all', // 福州一 全显
|
||||
'03': 'all', // 北京一 全显
|
||||
'04': 'all', // 成都三 全显
|
||||
'05': 'all', // 国际版运行图皮肤 指向05 福州线路 全显
|
||||
'06': 'all', // 宁波一 全显
|
||||
'07': 'ecStation' // 哈尔滨培训线路 集中站显示
|
||||
};
|
||||
}
|
||||
|
||||
// 加载菜单组件
|
||||
|
@ -63,7 +63,7 @@ export default {
|
||||
this.$store.state.training.roles != 'BigScreen';
|
||||
},
|
||||
isShowBar() {
|
||||
return this.$store.state.training.prdType;
|
||||
return this.$store.state.training.prdType === '01';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -353,4 +353,15 @@ export default {
|
||||
.haerbin-01__systerm .el-dialog .button-group {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.haerbin-01__systerm .nav-border .el-button {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 1px solid #1F313F;
|
||||
font-size: 12px;
|
||||
border-radius: 5px !important;
|
||||
color: #000;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,118 +1,75 @@
|
||||
<template>
|
||||
<div id="menuBar">
|
||||
<div class="nav">
|
||||
<template v-for="(item,i) in menu">
|
||||
<template v-if="noShowingChildren(item.children)">
|
||||
<li :id="item.operate.domId" :key="i" class="nav-li" @click="hookClick(item)">
|
||||
<span class="nav-li-text">{{ item.title }}</span>
|
||||
</li>
|
||||
</template>
|
||||
<template v-else>
|
||||
<li :id="item.operate.domId" :key="i" class="nav-li" @click.stop="selectedClassA(item, i)">
|
||||
<span class="nav-li-text">{{ item.title }}</span>
|
||||
<ul class="nav-ul" :class="{'active' :i==classA}">
|
||||
<template v-for="(child,j) in item.children">
|
||||
<template v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)">
|
||||
<li
|
||||
:id="child.operate.domId"
|
||||
:key="j"
|
||||
class="menu-li"
|
||||
@click.stop="selectedClassB(child, j)"
|
||||
>
|
||||
<div class="menu-li-block">
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </span>
|
||||
<span class="label">{{ child.title }}</span>
|
||||
</span>
|
||||
</div>
|
||||
<ul class="menu-ul" :class="{'active' :j==classB}">
|
||||
<template v-for="(grandchild,k) in child.children">
|
||||
<li
|
||||
v-if="grandchild.show"
|
||||
:id="grandchild.operate.domId"
|
||||
:key="k"
|
||||
class="menu-li"
|
||||
@click.stop="hookClick(grandchild)"
|
||||
>
|
||||
<div class="menu-li-block">
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </span>
|
||||
<span class="label">{{ grandchild.title }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</li>
|
||||
</template>
|
||||
<template v-else>
|
||||
<li
|
||||
v-if="child.show"
|
||||
:id="child.operate.domId"
|
||||
:key="j"
|
||||
class="menu-li"
|
||||
@click.stop="hookClick(child)"
|
||||
>
|
||||
<div class="menu-li-block">
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </span>
|
||||
<span class="label">{{ child.title }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
<div class="haerbin-01__systerm nav">
|
||||
<el-row>
|
||||
<el-col :span="2">
|
||||
<div class="nav-border">
|
||||
<el-row>
|
||||
<el-button style="width: 100px;" plain @click="undeveloped">登录</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button style="width: 100px;" disabled plain />
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<div class="nav-border">
|
||||
<el-row>
|
||||
<template v-for="(item, index) in centralizedStationList1">
|
||||
<el-col :key="index" :span="colsNum"><el-button style="width: 80px;" plain @click="switchShowStation(item)">{{ item.name }}</el-button></el-col>
|
||||
</template>
|
||||
</ul>
|
||||
</li>
|
||||
</template>
|
||||
</template>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<template v-for="(item, index) in centralizedStationList2">
|
||||
<el-col :key="index" :span="colsNum"><el-button style="width: 80px;" plain @click="switchShowStation(item)">{{ item.name }}</el-button></el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<div class="nav-border">
|
||||
<el-row>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">A级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">B级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">C级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">记录</el-button></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">声音</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">双屏</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">TGI</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">管理</el-button></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="nav-border">
|
||||
<el-row> </el-row>
|
||||
<el-row>
|
||||
<el-col :span="24"><div>{{ '版本:' + version }}</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="nav-border">
|
||||
<el-row> </el-row>
|
||||
<el-row> </el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<station-control-convert ref="stationControlConvert" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
<view-device ref="viewDevice" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" />
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
|
||||
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config.js';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import TrainAdd from './menuDialog/trainAdd';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import PasswordBox from './menuDialog/passwordBox';
|
||||
import ViewTrainId from './menuDialog/viewTrainId';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
import ViewDevice from './menuDialog/viewDevice';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'MenuBar',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
StationControlConvert,
|
||||
PasswordBox,
|
||||
ViewTrainId,
|
||||
ViewName,
|
||||
ViewDevice,
|
||||
TrainAdd,
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
ManageUser,
|
||||
HelpAbout
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -129,270 +86,11 @@ export default {
|
||||
tempClassA: -1,
|
||||
tempClassB: -1,
|
||||
valid: true,
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.system'),
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.view'),
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.refresh'),
|
||||
operate: OperationEvent.Command.mBar.fresh,
|
||||
click: this.refresh,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.display'),
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.setTrainIdDisplay'),
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.setNameDisplay'),
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.setDeviceDisplay'),
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.stationMapSwitch'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.controlModeSwitch'),
|
||||
operate: OperationEvent.Command.mBar.remoteControl,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.toStationControl'),
|
||||
click: this.turnToStationControl,
|
||||
operate: OperationEvent.StationControl.requestStationControl.mbar
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.forcedStationControl'),
|
||||
click: this.mandatoryStationControl,
|
||||
operate: OperationEvent.StationControl.forcedStationControl.password
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.toCentralControl'),
|
||||
click: this.conterStationControl,
|
||||
operate: OperationEvent.StationControl.requestCentralControl.mbar,
|
||||
froce: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.requestOperationArea'),
|
||||
operate: OperationEvent.Command.mBar.requestZone,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.historyQuery'),
|
||||
operate: OperationEvent.Command.mBar.historyQuery,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
operate: OperationEvent.Command.mBar.userManage,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
click: this.userManage,
|
||||
operate: OperationEvent.Command.manage.userManage
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.help'),
|
||||
operate: OperationEvent.Command.mBar.help,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.about'),
|
||||
click: this.about,
|
||||
operate: OperationEvent.Command.help.about
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.system'),
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.view'),
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.refresh'),
|
||||
operate: OperationEvent.Command.mBar.fresh,
|
||||
click: this.refresh,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.display'),
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.setTrainIdDisplay'),
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.setNameDisplay'),
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.setDeviceDisplay'),
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.stationMapSwitch'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.planCarOperation'),
|
||||
operate: OperationEvent.Command.mBar.planTrain,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.addPlanCar'),
|
||||
click: this.addPlanTrain,
|
||||
operate: OperationEvent.Command.planTrain.addPlanTrain
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.panPlanCar'),
|
||||
click: this.translatPlanTrain,
|
||||
operate: OperationEvent.Command.planTrain.translatPlanTrain
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.deletePlanCar'),
|
||||
click: this.delPlanTrain,
|
||||
operate: OperationEvent.Command.planTrain.delPlanTrain
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.trainNumberMaintenance'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.controlModeSwitch'),
|
||||
operate: OperationEvent.Command.mBar.remoteControl,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.toStationControl'),
|
||||
click: this.turnToStationControl,
|
||||
operate: OperationEvent.StationControl.requestStationControl.mbar,
|
||||
froce: true
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.forcedStationControl'),
|
||||
click: this.mandatoryStationControl,
|
||||
operate: OperationEvent.StationControl.forcedStationControl.password,
|
||||
froce: true
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.toCentralControl'),
|
||||
click: this.conterStationControl,
|
||||
operate: OperationEvent.StationControl.requestCentralControl.mbar
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.requestOperationArea'),
|
||||
operate: OperationEvent.Command.mBar.requestZone,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.schedulingLog'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.systemAnalysis'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
operate: OperationEvent.Command.mBar.userManage,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
click: this.userManage,
|
||||
operate: OperationEvent.Command.manage.userManage
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.historyQuery'),
|
||||
operate: OperationEvent.Command.mBar.historyQuery,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.help'),
|
||||
operate: OperationEvent.Command.mBar.help,
|
||||
children: [
|
||||
{
|
||||
title: this.$t('menu.menuBar.about'),
|
||||
click: this.about,
|
||||
operate: OperationEvent.Command.help.about
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
stationCode: '',
|
||||
centralizedStationList1: [],
|
||||
centralizedStationList2: [],
|
||||
colsNum: 0,
|
||||
version: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -421,257 +119,41 @@ export default {
|
||||
this.classA = this.tempClassA;
|
||||
this.classB = this.tempClassB;
|
||||
}
|
||||
},
|
||||
'$store.state.training.operatemode': function (mode) {
|
||||
this.initMenu();
|
||||
},
|
||||
'$store.state.training.started': function (val) {
|
||||
this.closeMenu(true);
|
||||
},
|
||||
'$store.state.training.prdType': function () {
|
||||
this.initMenu();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.version = this.$store.state.map.version;
|
||||
this.initMenu();
|
||||
},
|
||||
methods: {
|
||||
initMenu(menu) {
|
||||
this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[State2SimulationMap[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
|
||||
this.clickEvent();
|
||||
this.closeMenu(true);
|
||||
},
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
if (document.getElementById('menuBar')) {
|
||||
self.closeMenu(false);
|
||||
}
|
||||
};
|
||||
},
|
||||
noShowingChildren(children) {
|
||||
if (!children || children.length <= 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
hasShowingChildren(children) {
|
||||
if (children && children.length > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
closeMenu(flag) {
|
||||
if (flag || (this.mode !== TrainingMode.EDIT && this.mode !== TrainingMode.TEACH)) {
|
||||
this.classA = this.tempClassA = -1;
|
||||
this.classB = this.tempClassB = -1;
|
||||
}
|
||||
},
|
||||
hookClick(item, event) {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
if (item && typeof item.click == 'function') {
|
||||
item.click(item.operate);
|
||||
}
|
||||
},
|
||||
selectedClassA(item, index) {
|
||||
const order = this.order || 0;
|
||||
if (this.mode !== TrainingMode.TEACH) { // 编辑模式下可显示
|
||||
this.popupMenuA(item, index);
|
||||
} else if (this.steps[order] && this.steps[order].type == 'bar') { // 操作步骤没有顶部操作顶部菜单都不可显示
|
||||
this.popupMenuA(item, index);
|
||||
}
|
||||
},
|
||||
// 弹出顶部菜单操作
|
||||
popupMenuA(item, index) {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
this.clickEvent();
|
||||
const operate = {
|
||||
operation: item.operate.operation
|
||||
};
|
||||
this.tempClassA = index;
|
||||
this.tempClassB = -1;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
initMenu() {
|
||||
const centralizedStationList = [];
|
||||
this.centralizedStationList1 = [];
|
||||
this.centralizedStationList2 = [];
|
||||
this.stationList.forEach(item => {
|
||||
if (item.centralized) {
|
||||
centralizedStationList.push(item);
|
||||
}
|
||||
});
|
||||
},
|
||||
selectedClassB(item, index) {
|
||||
const order = this.order || 0;
|
||||
if (this.mode !== TrainingMode.TEACH) { // 编辑模式下可显示
|
||||
this.popupMenuB(item, index);
|
||||
} else if (this.steps[order] && this.steps[order].type == 'bar') { // 操作步骤没有顶部操作顶部菜单都不可显示
|
||||
this.popupMenuB(item, index);
|
||||
}
|
||||
},
|
||||
popupMenuB(item, index) {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
const operate = {
|
||||
operation: item.operate.operation
|
||||
};
|
||||
this.tempClassB = index;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
centralizedStationList.forEach((item, index) => {
|
||||
if (index < centralizedStationList.length / 2) {
|
||||
this.centralizedStationList1.push(item);
|
||||
} else {
|
||||
this.centralizedStationList2.push(item);
|
||||
}
|
||||
});
|
||||
this.colsNum = 24 / this.centralizedStationList1.length;
|
||||
},
|
||||
// 转为站控
|
||||
turnToStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
switchShowStation(station) {
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (item !== 'skinVO') {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
});
|
||||
},
|
||||
// 强制转为站控
|
||||
mandatoryStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.passwordBox.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 请求中控
|
||||
conterStationControl(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置列车识别号显示
|
||||
setTrainIdDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewTrainId.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置设备显示
|
||||
setNameDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewName.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置名称显示
|
||||
setDeviceDisplay(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewDevice.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 添加计划车
|
||||
addPlanTrain(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainAdd.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 平移计划车
|
||||
translatPlanTrain(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainTranstalet.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除计划车
|
||||
delPlanTrain(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDelete.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 用户管理
|
||||
userManage(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.manageUser.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 关于
|
||||
about(order) {
|
||||
const operate = {
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.helpAbout.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 刷新
|
||||
refresh() {
|
||||
this.closeMenu(true);
|
||||
EventBus.$emit('refresh');
|
||||
},
|
||||
getLoginResult(operate) {
|
||||
/** 密码校验*/
|
||||
if (operate.operation == OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation) {
|
||||
if (operate.success) {
|
||||
/** 校验成功*/
|
||||
this.$refs.stationControlConvert.doShow({ operation: OperationEvent.StationControl.forcedStationControl.mbar.operation });
|
||||
}
|
||||
}
|
||||
this.$jlmap.updateShowStation(list, station.code);
|
||||
this.$jlmap.setCenter(station.code);
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
@ -694,7 +176,7 @@ export default {
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$width: 30px;
|
||||
$height: 30px;
|
||||
$height: 60px;
|
||||
$menuPadding: 10px;
|
||||
$menuItemHeight: 30px;
|
||||
$menuItemWidth: 190px;
|
||||
@ -705,9 +187,17 @@ export default {
|
||||
position: absolute;
|
||||
width: inherit;
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
line-height: $height/2;
|
||||
}
|
||||
.nav-border {
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
border-top: 2px solid #7E8076;
|
||||
border-left: 2px solid #6A6B64;
|
||||
border-right: 2px solid #FBFBFA;
|
||||
border-bottom: 2px solid #FBFBFA;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
@ -716,6 +206,7 @@ export default {
|
||||
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: linear-gradient(#FDFDFE, #DEE3F3);
|
||||
/*background: #FFFFFF;*/
|
||||
border: 1px solid #B6BCCC !important;
|
||||
border-bottom: 2px solid #B6BCCC !important;
|
||||
list-style: none;
|
||||
|
@ -89,9 +89,6 @@
|
||||
<station-control ref="stationControl" />
|
||||
<detain-train-contorl ref="detainTrainContorl" />
|
||||
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" />
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
<view-device ref="viewDevice" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
@ -110,9 +107,6 @@ import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
|
||||
import TrainAdd from './menuDialog/trainAdd';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import ViewTrainId from './menuDialog/viewTrainId';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
import ViewDevice from './menuDialog/viewDevice';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
@ -125,9 +119,6 @@ export default {
|
||||
StationControl,
|
||||
DetainTrainContorl,
|
||||
DetainTrainContorlUpDown,
|
||||
ViewTrainId,
|
||||
ViewName,
|
||||
ViewDevice,
|
||||
TrainAdd,
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
@ -309,28 +300,6 @@ export default {
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
hide: true,
|
||||
children: [
|
||||
{
|
||||
title: '设置列车识别号显示',
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: '设置名称显示',
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: '设置设备显示',
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'ATS终端操作',
|
||||
operate: '',
|
||||
@ -576,28 +545,6 @@ export default {
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
hide: true,
|
||||
children: [
|
||||
{
|
||||
title: '设置列车识别号显示',
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: '设置名称显示',
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: '设置设备显示',
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'ATS终端操作',
|
||||
operate: '',
|
||||
@ -924,48 +871,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置列车识别号显示
|
||||
setTrainIdDisplay(order) {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewTrainId.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置设备显示
|
||||
setNameDisplay(order) {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewName.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置名称显示
|
||||
setDeviceDisplay(order) {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: order.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewDevice.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 添加计划车
|
||||
addPlanTrain(order) {
|
||||
const operate = {
|
||||
|
@ -1,166 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm view-display"
|
||||
title="设备显示设置"
|
||||
:visible.sync="show"
|
||||
width="240px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-checkbox-group v-model="deviceLevels">
|
||||
<div>
|
||||
<el-checkbox :label="1">车次窗</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="2">区段边界</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="3">联锁自动进路表示灯</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="4">ATS自动触发表示灯</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdConfirm" class="commit" type="primary" :loading="loading" @click="commit">确定
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button :id="domIdCancel" class="cancal" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import deviceType from '@/jmap/constant/deviceType';
|
||||
|
||||
export default {
|
||||
name: 'ViewDevice',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
deviceLevels: [2, 3, 4, 5]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setDeviceDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活,而是第一次显示,需要初始化数据
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.deviceLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setDeviceDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
let deviceList = [];
|
||||
|
||||
// 区段边界设置
|
||||
let borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { borderBorderShow })); // 区段边界
|
||||
});
|
||||
}
|
||||
|
||||
// 车次窗设置
|
||||
let trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
|
||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { trainWindowShow })); // 车次窗
|
||||
});
|
||||
}
|
||||
|
||||
// 联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
let linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1;// 联锁自动进路表示灯
|
||||
let atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1;// ATS自动触发表示灯
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
</style>
|
@ -1,248 +0,0 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm view-name" title="名称显示设置" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-checkbox-group v-model="nameLevels">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="1">信号机名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="2">站台轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="4">折返轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">股道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="7">道岔名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="9">道岔区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="10">目的地名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="11">计轴区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="12">公里标</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'viewName',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
setNameDisplay() {
|
||||
let deviceList = [];
|
||||
|
||||
//信号机
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//按钮名称
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||
|
||||
|
||||
//道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1 ? true : false; //道岔名称
|
||||
let switchSectionNameShow = this.nameLevels.indexOf(9) !== -1 ? true : false; //道岔轨名称
|
||||
let switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//控制模式
|
||||
let indicatorShow = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||
let control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //标识灯名称
|
||||
})
|
||||
}
|
||||
|
||||
//区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
//道岔轨的区段名称默认不显示
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||
} else if (elem.type === '02') {
|
||||
//股道轨名称
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||
} else if (elem.type === '03') {
|
||||
//道岔区段名称
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
//站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//停车点
|
||||
let destCodeShow = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||
let stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//车站
|
||||
let kmPostShow = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||
let stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //公里标
|
||||
})
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,192 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm view-train-id"
|
||||
title="列车识别号显示设置"
|
||||
:visible.sync="show"
|
||||
width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">计划车显示模式</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="1">表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="2">表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="5">目的地号+表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="6">目的地号+表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
|
||||
<span class="base-label">头码车显示模式</span>
|
||||
<el-radio-group v-model="headMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="8">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">字体大小</span>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="fontSize" size="small" min="16" max="99" />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewTrainId',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
planMode: 5,
|
||||
headMode: 5,
|
||||
fontSize: 16
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setTrainDispaly();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: [this.planMode, this.headMode, this.fontSize].join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.setTrainDispaly();
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setTrainDispaly() {
|
||||
const updatList = [];
|
||||
const trainList = this.$store.getters['training/viewTrainList']();
|
||||
if (trainList && trainList.length > 0) {
|
||||
const nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
const nameFontSize = this.fontSize;
|
||||
updatList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); // 车次窗
|
||||
});
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', updatList);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
switch (mode.toString()) {
|
||||
case '1': return 'serviceNumber:tripNumber'; // 表号+车次号
|
||||
case '2': return 'serviceNumber:groupNumber'; // 表号+车组号
|
||||
case '3': return 'targetCode:tripNumber'; // 目的地号+车次号
|
||||
case '4': return 'targetCode:groupNumber'; // 目的地号+车组号
|
||||
case '5': return 'targetCode:serviceNumber:tripNumber'; // 目的地号+表号+车次号
|
||||
case '6': return 'targetCode:serviceNumber:groupNumber'; // 目的地号+表号+车组号
|
||||
}
|
||||
return ''; // 无格式类型
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -59,6 +59,8 @@ const LessonDetail = () => import('@/views/lesson/details');
|
||||
const ScriptmanageHome = () => import('@/views/scriptManage/home');
|
||||
const ScriptDisplay = () => import('@/views/scriptManage/display/index');
|
||||
|
||||
const IbpHome = () => import('@/views/ibp/home');
|
||||
|
||||
const TeachDetail = () => import('@/views/teach/detail/index');
|
||||
const TeachHome = () => import('@/views/teach/index');
|
||||
const Pay = () => import('@/views/components/pay/index');
|
||||
@ -175,7 +177,8 @@ export const UrlConfig = {
|
||||
scriptHome: '/design/script/home',
|
||||
display: '/design/display',
|
||||
mapPreview: '/design/mapPreview',
|
||||
mapPreviewNew: '/design/mapPreviewNew'
|
||||
mapPreviewNew: '/design/mapPreviewNew',
|
||||
ibpHome: '/design/ibp/home'
|
||||
},
|
||||
designUser: {
|
||||
prefix: '/design/userlist/home',
|
||||
@ -439,6 +442,16 @@ export const asyncRouter = [
|
||||
path: 'mapPreviewNew/:mapId',
|
||||
component: MapPreviewNew,
|
||||
hidden: true
|
||||
},
|
||||
{ // ibp列表
|
||||
path: 'ibp/home/:mapId',
|
||||
component: IbpHome,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'ibp/edit',
|
||||
component: IbpDraw,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -509,6 +522,20 @@ export const asyncRouter = [
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/displayIscs/system',
|
||||
component: IscsSystem,
|
||||
meta: {
|
||||
},
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'config/:mode',
|
||||
component: IscsConfig,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 综合演练室
|
||||
path: '/trainroom',
|
||||
component: TrainRoom,
|
||||
@ -776,13 +803,13 @@ export const asyncRouter = [
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'ibp/edit',
|
||||
component: IbpDraw,
|
||||
meta: {
|
||||
i18n: 'router.ibpDraw'
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: 'ibp/edit',
|
||||
// component: IbpDraw,
|
||||
// meta: {
|
||||
// i18n: 'router.ibpDraw'
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: 'dictionary',
|
||||
component: Dictionary,
|
||||
|
@ -145,7 +145,8 @@ export default {
|
||||
{ enlabel: 'ATS Traffic dispatching workstation', label: 'ATS行调工作站', value: '02'},
|
||||
{ enlabel: 'Comprehensive exercise cloud platform', label: '综合演练云平台', value: '03'},
|
||||
{ enlabel: 'Driver simulation driving system', label: '司机模拟驾驶系统', value: '04'},
|
||||
{ enlabel: 'Dispatch workstation', label: '派班工作站', value: '05'}
|
||||
{ enlabel: 'Dispatch workstation', label: '派班工作站', value: '05'},
|
||||
{ enlabel: 'ISCS workstation', label: 'ISCS工作站', value: '06'}
|
||||
]
|
||||
|
||||
}
|
||||
|
@ -91,7 +91,11 @@ export default {
|
||||
/** 取消联锁自动触发 */
|
||||
CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER: {value:'Signal_Cancel_CI_Auto_Trigger', label: '取消联锁自动触发'},
|
||||
/** 查询进路状态 */
|
||||
CMD_SIGNAL_DETAIL: {value:'Signal_Detail', label: '查询进路状态'}
|
||||
CMD_SIGNAL_DETAIL: {value:'Signal_Detail', label: '查询进路状态'},
|
||||
/** 设置自动折返 */
|
||||
CMD_SIGNAL_SET_AUTO_TURN_BACK: {value: 'Signal_Set_Auto_Turn_Back', label: '设置自动折返'},
|
||||
/** 取消自动折返 */
|
||||
CMD_SIGNAL_CANCEL_AUTO_TURN_BACK: {value: 'Signal_Cancel_Auto_Turn_Back', label: '取消自动折返'}
|
||||
},
|
||||
|
||||
// 物理区段操作
|
||||
|
@ -196,7 +196,8 @@ const map = {
|
||||
trainDetails: null, // 地图'列车详情'显示
|
||||
deleteCount: 0, // 绘图快捷删除标识
|
||||
updateCount: 0, // 绘图快捷修改标识
|
||||
mousemove: 0 // 实训战场图移动标识
|
||||
mousemove: 0, // 实训战场图移动标识
|
||||
version: '' // 地图版本
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -255,7 +256,7 @@ const map = {
|
||||
},
|
||||
version: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.version;
|
||||
return state.version;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@ -516,8 +517,8 @@ const map = {
|
||||
if (map && map.skinVO) {
|
||||
state.map = map;
|
||||
let showConfig = {};
|
||||
if (Vue.prototype.$jlmap && ( typeof(Vue.prototype.$jlmap.getShowConfig) === 'function')) {
|
||||
showConfig = Vue.prototype.$jlmap.getShowConfig();
|
||||
if (Vue.prototype.$jlmap && ( typeof (Vue.prototype.$jlmap.getShowConfig) === 'function')) {
|
||||
showConfig = Vue.prototype.$jlmap.getShowConfig();
|
||||
}
|
||||
state.mapDevice = parser(map, map.skinVO.code, showConfig);
|
||||
Vue.prototype.$jlmap && Vue.prototype.$jlmap.setMapDevice(state.mapDevice);
|
||||
@ -637,6 +638,9 @@ const map = {
|
||||
},
|
||||
updateRouteState: (state, status) => {
|
||||
state.routeData[status.code] = deepAssign(state.routeData[status.code], status);
|
||||
},
|
||||
setMapVersion:(state, version) => {
|
||||
state.version = version;
|
||||
}
|
||||
},
|
||||
|
||||
@ -784,6 +788,9 @@ const map = {
|
||||
|
||||
setMousemove: ({ commit }) => {
|
||||
commit('setMousemove');
|
||||
},
|
||||
setMapVersion: ({commit}, version) => {
|
||||
commit('setMapVersion', version);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ export function loadNewMapDataByGroup(group) {
|
||||
store.dispatch('map/setRouteData', routeData);
|
||||
const mapConfig = resp.data.configVO;
|
||||
store.dispatch('map/setMapConfig', mapConfig);
|
||||
store.dispatch('map/setMapVersion', resp.data.version);
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
|
@ -112,7 +112,7 @@ export default {
|
||||
this.tryUser = 0;
|
||||
this.loading = false;
|
||||
this.drawWay = res.data.drawWay;
|
||||
const remarksList = {'01':'ATS现地工作站原理级仿真实训课程', '02':'ATS行调工作站原理级仿真实训课程', '03':'各岗位应急综合演练', '04':'桌面版模拟驾驶系统', '05':'派班工作站主要是供车辆段/停车场派班员进行派班操作,可以自动生成派班计划,极大的简化了派班计划管理的复杂性'};
|
||||
const remarksList = {'01':'ATS现地工作站原理级仿真实训课程', '02':'ATS行调工作站原理级仿真实训课程', '03':'各岗位应急综合演练', '04':'桌面版模拟驾驶系统', '05':'派班工作站主要是供车辆段/停车场派班员进行派班操作,可以自动生成派班计划,极大的简化了派班计划管理的复杂性', '06': '综合监控管理原理及仿真实训'};
|
||||
this.courseModel = {
|
||||
id: resp.data.id,
|
||||
name: resp.data.name,
|
||||
@ -202,11 +202,32 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
async enterISCS() {
|
||||
try {
|
||||
this.disabled = true;
|
||||
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
|
||||
let res = {};
|
||||
if (!this.drawWay) {
|
||||
res = await simulationNotify(data);
|
||||
} else {
|
||||
res = await createSimulationNew(data);
|
||||
}
|
||||
if (res && res.code == 200) {
|
||||
const query = { group: res.data };
|
||||
this.$router.push({ path: `/displayIscs/system`, query: query });
|
||||
}
|
||||
} catch (error) {
|
||||
this.disabled = false;
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
async start() {
|
||||
if (this.courseModel.prdType == '05') {
|
||||
this.jumpScheduling();
|
||||
} else if (this.courseModel.prdType == '03') {
|
||||
this.createRoom();
|
||||
} else if (this.courseModel.prdType == '06') {
|
||||
this.enterISCS();
|
||||
} else {
|
||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
|
||||
this.jump();
|
||||
|
@ -115,6 +115,11 @@ export default {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'ibpDesign': {
|
||||
setSessionStorage('designType', 'ibpDesign');
|
||||
this.$router.push({ path: `${UrlConfig.design.ibpHome}/${obj.mapId}`, query: {cityCode: obj.cityCode} });
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
async refresh(filterSelect) {
|
||||
@ -160,6 +165,16 @@ export default {
|
||||
cityCode: elem.cityCode
|
||||
}
|
||||
);
|
||||
elem.children.push(
|
||||
{
|
||||
id: '5',
|
||||
name: 'IBP盘设计',
|
||||
type: 'ibpDesign',
|
||||
mapId: elem.id,
|
||||
lineCode: elem.lineCode,
|
||||
cityCode: elem.cityCode
|
||||
}
|
||||
);
|
||||
});
|
||||
this.treeData = res.data;
|
||||
this.treeList = this.filterText
|
||||
|
123
src/views/ibp/create.vue
Normal file
123
src/views/ibp/create.vue
Normal file
@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button v-if="!isPut" type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button v-if="isPut" type="primary" @click="putInfo">更新</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getStationList } from '@/api/runplan';
|
||||
import { createIbp, putIbpBasicInfo } from '@/api/ibp';
|
||||
|
||||
export default {
|
||||
name: 'ScriptDraft',
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
isPut: false,
|
||||
stationList: [],
|
||||
formModel: {
|
||||
stationCode: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop: 'stationCode', label: '关联站台:', type: 'select', options: this.stationList }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
},
|
||||
rules() {
|
||||
const crules = {
|
||||
stationCode: [
|
||||
{ required: true, message: '请选择', trigger: 'change' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
}
|
||||
},
|
||||
async created () {
|
||||
try {
|
||||
const res = await getStationList(this.$route.params.mapId);
|
||||
this.stationList = [];
|
||||
if (res.code == 200) {
|
||||
console.log(res.data);
|
||||
res.data.forEach(station => {
|
||||
const param = {
|
||||
label: station.name,
|
||||
value: station.code
|
||||
};
|
||||
this.stationList.push(param);
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(code) {
|
||||
if (code) {
|
||||
this.formModel.stationCode = code;
|
||||
} else {
|
||||
this.formModel.stationCode = '';
|
||||
}
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doCreate() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
const param = {
|
||||
mapId: this.$route.params.mapId,
|
||||
stationCode: this.formModel.stationCode
|
||||
};
|
||||
createIbp(param).then(resp => {
|
||||
this.$message.success('创建成功');
|
||||
this.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
this.$messageBox(`创建失败: ${error.message}`);
|
||||
});
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
putInfo() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
const param = {
|
||||
mapId: this.$route.params.mapId,
|
||||
stationCode: this.formModel.stationCode
|
||||
};
|
||||
putIbpBasicInfo(param).then(resp => {
|
||||
this.$message.success('更新成功');
|
||||
this.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
this.$messageBox(`更新失败: ${error.message}`);
|
||||
});
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-dialog--center .el-dialog__body{
|
||||
padding: 25px 65px 30px 10px;
|
||||
}
|
||||
</style>
|
186
src/views/ibp/home.vue
Normal file
186
src/views/ibp/home.vue
Normal file
@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<div class="joylink-card">
|
||||
<div class="scriptHeader">
|
||||
<div class="scriptList">IBP盘列表</div>
|
||||
<el-button size="small" type="primary" class="createScript" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button>
|
||||
</div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
<create-ibp ref="createScript" :title="'创建数据'" @reloadTable="reloadTable" />
|
||||
<create-ibp ref="modifyScript" :title="'修改数据'" @reloadTable="reloadTable" @create="handleConfirmModify" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Cookies from 'js-cookie';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import { postIbpPublish, getIbpAllList, deleteIbpInfo } from '@/api/ibp';
|
||||
import CreateIbp from './create';
|
||||
|
||||
export default {
|
||||
name: 'ScriptDraft',
|
||||
components: {
|
||||
CreateIbp
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '100px',
|
||||
reset: true,
|
||||
show:false
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '关联站台',
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.covertData(row); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
prop: 'updateTime'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('scriptRecord.operate'),
|
||||
width: '400',
|
||||
buttons: [
|
||||
{
|
||||
name: '修改基础信息',
|
||||
handleClick: this.editInfo,
|
||||
type: 'primary'
|
||||
},
|
||||
{
|
||||
name: '修改绘图',
|
||||
handleClick: this.handleModify,
|
||||
type: 'primary'
|
||||
},
|
||||
{
|
||||
name: '删除',
|
||||
handleClick: this.deleteScript,
|
||||
type: 'danger'
|
||||
},
|
||||
{
|
||||
name: '发布',
|
||||
handleClick: this.publishScript,
|
||||
type: 'primary'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$route' () {
|
||||
this.reloadTable();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
queryFunction(params) {
|
||||
return getIbpAllList(this.$route.params.mapId, params);
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
covertData(row) {
|
||||
const releaseReview = ConstConfig.ConstSelect.releaseReview;
|
||||
const lastData = Object.assign({}, row);
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
releaseReview.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (lastData.status == rolename) {
|
||||
lastData.status = element.enlabel;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
releaseReview.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (lastData.status == rolename) {
|
||||
lastData.status = element.label;
|
||||
}
|
||||
});
|
||||
}
|
||||
return lastData.status;
|
||||
},
|
||||
// 进入绘图数据
|
||||
handleModify(index, row) {
|
||||
const query = { mapId: this.$route.params.mapId, stationCode: '33333' };
|
||||
this.$router.push({ path: `/design/ibp/edit`, query: query });
|
||||
},
|
||||
// 更新
|
||||
editInfo(index, row) {
|
||||
this.$refs.modifyScript.doShow(row.code);
|
||||
},
|
||||
// 创建
|
||||
handleCreate() {
|
||||
this.$refs.createScript.doShow(null);
|
||||
},
|
||||
// 发布
|
||||
publishScript(index, row) {
|
||||
this.$confirm('您确定发布,此条IBP盘数据', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
postIbpPublish(row.id).then(response => {
|
||||
this.$message.success('发布成功');
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.$messageBox('发布失败');
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
// 删除此条数据
|
||||
deleteScript(index, row) {
|
||||
this.$confirm('您确定是否删除,此条IBP盘数据', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteIbpInfo(row.id).then(response => {
|
||||
this.$message.success('删除成功');
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.$messageBox('删除失败');
|
||||
});
|
||||
}).catch(() => { });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.joylink-card{
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
.createScript{
|
||||
float: right;
|
||||
margin-right:20px;
|
||||
}
|
||||
.scriptHeader{
|
||||
display:inline-block;margin-top:40px;width: 90%;margin-left:5%;
|
||||
}
|
||||
.scriptList{
|
||||
display:inline-block;padding:7px 0px
|
||||
}
|
||||
/deep/.el-button+.el-button {
|
||||
margin-left: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div v-loading="loading" class="joylink-card map-list-main">
|
||||
<div class="clearfix">
|
||||
<span>我的iscs系统列表</span>
|
||||
<span>iscs系统列表</span>
|
||||
</div>
|
||||
<div class="text_item">
|
||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
@ -96,13 +96,13 @@ export default {
|
||||
name: '站台报警',
|
||||
mode: 'fas',
|
||||
id: '11',
|
||||
type: 'interface',
|
||||
type: 'interface'
|
||||
},
|
||||
{
|
||||
name: '站厅报警',
|
||||
mode: 'fas',
|
||||
id: '12',
|
||||
type: 'interface',
|
||||
type: 'interface'
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -122,7 +122,7 @@ export default {
|
||||
name: '屏蔽门',
|
||||
mode: 'psd',
|
||||
id: '31',
|
||||
type: 'interface',
|
||||
type: 'interface'
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -136,13 +136,13 @@ export default {
|
||||
name: '车站控制-站厅',
|
||||
mode: 'cctv',
|
||||
id: '41',
|
||||
type: 'interface',
|
||||
type: 'interface'
|
||||
},
|
||||
{
|
||||
name: '车站控制-站台',
|
||||
mode: 'cctv',
|
||||
id: '42',
|
||||
type: 'interface',
|
||||
type: 'interface'
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -156,7 +156,7 @@ export default {
|
||||
name: '售检票',
|
||||
mode: 'afc',
|
||||
id: '51',
|
||||
type: 'interface',
|
||||
type: 'interface'
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -170,13 +170,13 @@ export default {
|
||||
name: '门禁-站台层',
|
||||
mode: 'acs',
|
||||
id: '61',
|
||||
type: 'interface',
|
||||
type: 'interface'
|
||||
},
|
||||
{
|
||||
name: '门禁-站厅层',
|
||||
mode: 'acs',
|
||||
id: '62',
|
||||
type: 'interface',
|
||||
type: 'interface'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="app-wrapper">
|
||||
<map-create ref="mapCreate" :line-code="lineCode" @refresh="refresh1" />
|
||||
<div v-show="listShow" class="examList" :style="{width: widthLeft+'px'}">
|
||||
<demon-list ref="demonList" :width="widthLeft" @createMap="createMap" />
|
||||
</div>
|
||||
@ -17,12 +18,14 @@ import drapLeft from '@/views/components/drapLeft/index';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import localStore from 'storejs';
|
||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||
import MapCreate from './mapmanage/create';
|
||||
|
||||
export default {
|
||||
name: 'DesignPlatform',
|
||||
components: {
|
||||
demonList,
|
||||
drapLeft
|
||||
drapLeft,
|
||||
MapCreate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -65,6 +68,12 @@ export default {
|
||||
refresh() {
|
||||
this.$refs && this.$refs.demonList && this.$refs.demonList.loadInitData();
|
||||
},
|
||||
refresh1() {
|
||||
this.$refs.demonList.loadInitData();
|
||||
},
|
||||
createMap() {
|
||||
this.$refs.mapCreate.show();
|
||||
},
|
||||
drapWidth(width) {
|
||||
this.widthLeft = Number(width);
|
||||
},
|
||||
|
202
src/views/iscs/iscsDesign/mapmanage/create.vue
Normal file
202
src/views/iscs/iscsDesign/mapmanage/create.vue
Normal file
@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag v-dialogLoading="loadingUpload" :title="$t('map.createNewMap')" :visible.sync="dialogShow" width="30%" :close-on-click-modal="false" :before-close="handleClose">
|
||||
<div>
|
||||
<el-tabs v-model="activeTab" type="card">
|
||||
<el-tab-pane :label="$t('map.normalCreate')" name="first">
|
||||
<el-form ref="newForm" label-position="right" :model="newModel" label-width="140px" size="mini" :rules="newRules" @submit.native.prevent>
|
||||
<el-form-item :label="$t('map.lineCode')" prop="lineCode">
|
||||
<el-select v-model="newModel.lineCode" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in lineCodeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.mapName')" prop="name">
|
||||
<el-input v-model.trim="newModel.name" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.publishMapCreation')" name="second">
|
||||
<el-form ref="pullForm" label-position="right" :model="pullModel" :rules="pullRules" label-width="140px" size="mini">
|
||||
<el-form-item :label="$t('map.publishMap')+ ':'" prop="id">
|
||||
<el-select v-model="pullModel.id" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in publishMapList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.mapName')" prop="name">
|
||||
<el-input v-model.trim="pullModel.name" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="create">{{ $t('map.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { newMap, newUsePublishMap } from '@/api/jmap/mapdraft';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
import { getMapListByProject } from '@/utils/mapList';
|
||||
|
||||
export default {
|
||||
name: 'MapCreate',
|
||||
props: {
|
||||
lineCode: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
file: null,
|
||||
rABS: false,
|
||||
loadingUpload: false,
|
||||
resultJSON: {},
|
||||
activeTab: 'first',
|
||||
lineCodeList: [],
|
||||
publishMapList: [],
|
||||
newModel: {
|
||||
id: '',
|
||||
name: '',
|
||||
lineCode: ''
|
||||
},
|
||||
pullModel: {
|
||||
id: '',
|
||||
name: ''
|
||||
},
|
||||
newRules: {
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
|
||||
],
|
||||
lineCode: [
|
||||
{ required: true, message: this.$t('rules.pleaseChooseLineCode'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
pullRules: {
|
||||
id: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectMapSource'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
cityList: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
lineCode(val) {
|
||||
this.newModel.lineCode = val;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show() {
|
||||
this.dialogShow = true;
|
||||
this.initLoadData();
|
||||
},
|
||||
close() {
|
||||
if (this.$refs.newForm) {
|
||||
this.$refs.newForm.resetFields();
|
||||
}
|
||||
if (this.$refs.pullForm) {
|
||||
this.$refs.pullForm.resetFields();
|
||||
}
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleClose() {
|
||||
this.close();
|
||||
},
|
||||
initLoadData() {
|
||||
this.lineCodeList = [];
|
||||
this.$Dictionary.cityType().then(list => {
|
||||
this.cityList = list;
|
||||
});
|
||||
|
||||
getLineCodeList().then(response => {
|
||||
this.lineCodeList = response.data;
|
||||
});
|
||||
|
||||
// 新地图
|
||||
const drawWay = true;
|
||||
getMapListByProject(drawWay).then(response => {
|
||||
this.publishMapList = response.data;
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('map.failedLoadListPublishedMaps'));
|
||||
});
|
||||
},
|
||||
create() {
|
||||
if (this.activeTab === 'first') {
|
||||
this.$refs['newForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
this.newModel['drawWay'] = true;
|
||||
newMap(this.newModel).then(response => {
|
||||
this.loading = false;
|
||||
this.$emit('refresh');
|
||||
this.$message.success(this.$t('map.creatingSuccessful'));
|
||||
this.close();
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('map.createFailure'));
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$refs['pullForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
newUsePublishMap(this.pullModel).then(response => {
|
||||
this.loading = false;
|
||||
this.$emit('refresh');
|
||||
this.$message.success(this.$t('map.creatingSuccessful'));
|
||||
this.close();
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('map.createFailure'));
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
.uploadDemo {
|
||||
.el-upload-dragger {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.file_box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-loading-mask {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
</style>
|
@ -42,30 +42,30 @@
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="文字" name="IscsText">
|
||||
<iscs-text
|
||||
ref="iscsText"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel">
|
||||
</iscs-text>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="线段" name="IscsLine">
|
||||
<iscs-line
|
||||
ref="iscsLine"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel">
|
||||
</iscs-line>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="矩形" name="IscsRect">
|
||||
<iscs-rect
|
||||
ref="iscsRect"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel">
|
||||
</iscs-rect>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="文字" name="IscsText">
|
||||
<iscs-text
|
||||
ref="iscsText"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="线段" name="IscsLine">
|
||||
<iscs-line
|
||||
ref="iscsLine"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="矩形" name="IscsRect">
|
||||
<iscs-rect
|
||||
ref="iscsRect"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</div>
|
||||
|
@ -82,30 +82,30 @@
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="文字" name="IscsText">
|
||||
<iscs-text
|
||||
ref="iscsText"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel">
|
||||
</iscs-text>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="线段" name="IscsLine">
|
||||
<iscs-line
|
||||
ref="iscsLine"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel">
|
||||
</iscs-line>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="矩形" name="IscsRect">
|
||||
<iscs-rect
|
||||
ref="iscsRect"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel">
|
||||
</iscs-rect>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="文字" name="IscsText">
|
||||
<iscs-text
|
||||
ref="iscsText"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="线段" name="IscsLine">
|
||||
<iscs-line
|
||||
ref="iscsLine"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="矩形" name="IscsRect">
|
||||
<iscs-rect
|
||||
ref="iscsRect"
|
||||
style="width: 90%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</div>
|
||||
|
@ -1,24 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="standACS_title">{{ $route.query.stationName }}门禁站台层</div>
|
||||
<div>
|
||||
<div class="standACS_title">会展中心站门禁站台层</div>
|
||||
<div>
|
||||
<iscsSystem ref="iscsPlate" :widthCanvas="990" />
|
||||
</div>
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="990" :canvas-height="500" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import iscsSystem from "../canvas/iscsCanvas";
|
||||
import iscsSystem from '../canvas/iscsCanvas';
|
||||
export default {
|
||||
components: {
|
||||
iscsSystem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mes: "1111"
|
||||
mes: '1111'
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.iscsPlate.show("61");
|
||||
this.$refs.iscsPlate.show('61');
|
||||
},
|
||||
methods: {}
|
||||
};
|
||||
|
@ -1,24 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="stationHall_title">{{ $route.query.stationName }}门禁站厅层</div>
|
||||
<div>
|
||||
<div class="stationHall_title">会展中心站门禁站厅层</div>
|
||||
<div>
|
||||
<iscsSystem ref="iscsPlate" :widthCanvas="990" />
|
||||
</div>
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="990" :canvas-height="600" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import iscsSystem from "../canvas/iscsCanvas";
|
||||
import iscsSystem from '../canvas/iscsCanvas';
|
||||
export default {
|
||||
components: {
|
||||
iscsSystem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mes: "1111"
|
||||
mes: '1111'
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.iscsPlate.show("62");
|
||||
this.$refs.iscsPlate.show('62');
|
||||
},
|
||||
methods: {}
|
||||
};
|
||||
@ -31,4 +31,4 @@ export default {
|
||||
margin-top: 30px;
|
||||
color: #56E5DE;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,24 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="afc_title">{{ $route.query.stationName }}售检票</div>
|
||||
<div>
|
||||
<div class="afc_title">会展中心站售检票</div>
|
||||
<div>
|
||||
<iscsSystem ref="iscsPlate" :widthCanvas="990" />
|
||||
</div>
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="1200" :canvas-height="650" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import iscsSystem from "../canvas/iscsCanvas";
|
||||
import iscsSystem from '../canvas/iscsCanvas';
|
||||
export default {
|
||||
components: {
|
||||
iscsSystem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mes: "1111"
|
||||
mes: '1111'
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.iscsPlate.show("51");
|
||||
this.$refs.iscsPlate.show('51');
|
||||
},
|
||||
methods: {}
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="control-bas-box">
|
||||
<div class="title-name">会展中心站大系统模式表</div>
|
||||
<div class="title-name">{{ $route.query.stationName }}大系统模式表</div>
|
||||
<div class="control-bas">
|
||||
<el-table :data="tableData" :header-row-style="tableTitleStyle" :cell-style="rowStyle" :span-method="objectSpanMethod" style="float: left;">
|
||||
<el-table-column label="日期" width="300">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="permission-box">
|
||||
<div class="title-name">会展中心站控制权移交</div>
|
||||
<div class="title-name">{{ $route.query.stationName }}控制权移交</div>
|
||||
<div class="content-box">
|
||||
<div class="content-top">
|
||||
<div class="content-left">
|
||||
|
@ -28,6 +28,10 @@ export default {
|
||||
widthCanvas: {
|
||||
type: Number,
|
||||
default: 1200
|
||||
},
|
||||
canvasHeight: {
|
||||
type: Number,
|
||||
default: 500
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -55,18 +59,18 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'canvasWidth',
|
||||
'canvasHeight'
|
||||
// 'canvasWidth',
|
||||
// 'canvasHeight'
|
||||
]),
|
||||
iscsId() {
|
||||
return ['iscs', (Math.random().toFixed(5)) * 100000].join('_');
|
||||
},
|
||||
width() {
|
||||
return this.$store.state.config.width;
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.config.height;
|
||||
}
|
||||
// width() {
|
||||
// return this.$store.state.config.width;
|
||||
// },
|
||||
// height() {
|
||||
// return this.$store.state.config.height;
|
||||
// }
|
||||
},
|
||||
watch: {
|
||||
'$store.state.config.canvasSizeCount': function (val) {
|
||||
@ -98,8 +102,8 @@ export default {
|
||||
dom: document.getElementById(this.iscsId),
|
||||
config: {
|
||||
renderer: 'canvas',
|
||||
width: this.width,
|
||||
height: this.height
|
||||
width: this.canvasWidth,
|
||||
height: this.canvasHeight
|
||||
},
|
||||
options: {
|
||||
scaleRate: 1,
|
||||
@ -167,9 +171,9 @@ export default {
|
||||
},
|
||||
reSize() {
|
||||
this.$nextTick(() => {
|
||||
this.width = this.$store.state.config.width;
|
||||
this.height = this.$store.state.config.height;
|
||||
this.$iscs && this.$iscs.resize({ width: this.width, height: this.height });
|
||||
// this.width = this.$store.state.config.width;
|
||||
// this.height = this.$store.state.config.height;
|
||||
// this.$iscs && this.$iscs.resize({ width: this.width, height: this.height });
|
||||
});
|
||||
},
|
||||
back() {
|
||||
|
@ -6,9 +6,9 @@
|
||||
<div class="cctv-box-top-lefttop">选择显示终端</div>
|
||||
<div class="cctv-box-top-left1">
|
||||
<div class="each-cctv-box-top-btn">单画面</div>
|
||||
<div class="each-cctv-box-top-btn">站厅<br/>默认画面</div>
|
||||
<div class="each-cctv-box-top-btn">站厅<br>默认画面</div>
|
||||
<div class="each-cctv-box-top-btn active">四画面</div>
|
||||
<div class="each-cctv-box-top-btn">站台<br/>默认画面</div>
|
||||
<div class="each-cctv-box-top-btn">站台<br>默认画面</div>
|
||||
<div class="each-cctv-box-top-btn">大屏</div>
|
||||
</div>
|
||||
<div class="cctv-box-top-right1">
|
||||
@ -36,74 +36,74 @@
|
||||
</div>
|
||||
<div class="cctv-box-top-middle">
|
||||
<div class="cctv-box-top-middle-title">预设位置</div>
|
||||
<div style="margin-top: 20px;position: relative;left: 30px;">
|
||||
<div style="display: inline-block;color: #56E5DE;">新描述</div>
|
||||
<el-select v-model="value" size="mini">
|
||||
<el-option
|
||||
v-for="item in descriptionList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="margin-top: 20px;position: relative;left: 30px; width: 230px">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="6"
|
||||
v-model="textarea">
|
||||
</el-input>
|
||||
</div>
|
||||
<div style="position: relative;left: 30px; width: 230px; display: flex; justify-content: space-between;margin-top: 10px">
|
||||
<div class="each-cctv-box-top-gray-btn">预设位置</div>
|
||||
<div class="each-cctv-box-top-gray-btn">回预位置</div>
|
||||
</div>
|
||||
<div style="margin-top: 20px;position: relative;left: 30px;">
|
||||
<div style="display: inline-block;color: #56E5DE;">新描述</div>
|
||||
<el-select v-model="value" size="mini">
|
||||
<el-option
|
||||
v-for="item in descriptionList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="margin-top: 20px;position: relative;left: 30px; width: 230px">
|
||||
<el-input
|
||||
v-model="textarea"
|
||||
type="textarea"
|
||||
:rows="6"
|
||||
/>
|
||||
</div>
|
||||
<div style="position: relative;left: 30px; width: 230px; display: flex; justify-content: space-between;margin-top: 10px">
|
||||
<div class="each-cctv-box-top-gray-btn">预设位置</div>
|
||||
<div class="each-cctv-box-top-gray-btn">回预位置</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cctv-box-top-right">
|
||||
<div class="cctv-box-top-right-title" />
|
||||
<div style="text-align: center">
|
||||
<div class="cctv-box-top-right-btn1"/>
|
||||
<div class="cctv-box-top-right-btn1 cctv-btn-gray"/>
|
||||
<div>
|
||||
<div class="cctv-box-top-right-btn2"></div>
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div>
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div>
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div>
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div>
|
||||
<div class="cctv-box-top-right-btn2" style="width: 40px;"></div>
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div>
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div>
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div>
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div>
|
||||
<div class="cctv-box-top-right-btn2" style="margin-right: 0"></div>
|
||||
</div>
|
||||
<div class="cctv-box-top-right-btn1"/>
|
||||
<div class="cctv-box-top-right-btn1 cctv-btn-gray"/>
|
||||
<div>
|
||||
<div style="display: inline-block;position: relative; left: -130px; color: #fff;">光圈</div>
|
||||
<div style="display: inline-block;position: relative; left: 0; color: #fff;">聚焦</div>
|
||||
<div style="display: inline-block;position: relative; left: 130px; color: #fff;">放大</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="cctv-box-top-right-btn3 cctv-btn-gray" style="left: -90px;">+</div>
|
||||
<div class="cctv-box-top-right-btn3 cctv-btn-gray" style="left: -70px;">-</div>
|
||||
<div class="cctv-box-top-right-btn3 cctv-btn-gray" style="left: -10px;">+</div>
|
||||
<div class="cctv-box-top-right-btn3 cctv-btn-gray" style="left: 10px;">-</div>
|
||||
<div class="cctv-box-top-right-btn3 cctv-btn-gray" style="left: 70px;">+</div>
|
||||
<div class="cctv-box-top-right-btn3 cctv-btn-gray" style="left: 90px;">-</div>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<div class="cctv-box-top-right-btn1" />
|
||||
<div class="cctv-box-top-right-btn1 cctv-btn-gray" />
|
||||
<div>
|
||||
<div class="cctv-box-top-right-btn2" />
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray" />
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray" />
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray" />
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray" />
|
||||
<div class="cctv-box-top-right-btn2" style="width: 40px;" />
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray" />
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray" />
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray" />
|
||||
<div class="cctv-box-top-right-btn2 cctv-btn-gray" />
|
||||
<div class="cctv-box-top-right-btn2" style="margin-right: 0" />
|
||||
</div>
|
||||
<div class="cctv-box-top-right-btn1" />
|
||||
<div class="cctv-box-top-right-btn1 cctv-btn-gray" />
|
||||
<div>
|
||||
<div style="display: inline-block;position: relative; left: -130px; color: #fff;">光圈</div>
|
||||
<div style="display: inline-block;position: relative; left: 0; color: #fff;">聚焦</div>
|
||||
<div style="display: inline-block;position: relative; left: 130px; color: #fff;">放大</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="cctv-box-top-right-btn3 cctv-btn-gray" style="left: -90px;">+</div>
|
||||
<div class="cctv-box-top-right-btn3 cctv-btn-gray" style="left: -70px;">-</div>
|
||||
<div class="cctv-box-top-right-btn3 cctv-btn-gray" style="left: -10px;">+</div>
|
||||
<div class="cctv-box-top-right-btn3 cctv-btn-gray" style="left: 10px;">-</div>
|
||||
<div class="cctv-box-top-right-btn3 cctv-btn-gray" style="left: 70px;">+</div>
|
||||
<div class="cctv-box-top-right-btn3 cctv-btn-gray" style="left: 90px;">-</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cctv-box-content">
|
||||
<div style="position: relative;width: 75px;left: 10px;">
|
||||
<div id="cctv-41" class="cctv-box-content-btn" @click="changeCCTV('41')">站厅</div>
|
||||
<div id="cctv-42" class="cctv-box-content-btn" @click="changeCCTV('42')">站台</div>
|
||||
<div id="cctv-43" class="cctv-box-content-btn" @click="changeCCTV('43')">云台</div>
|
||||
</div>
|
||||
<div class="cctv-box-content-draw">
|
||||
<iscsSystem ref="iscsPlate" :widthCanvas="1490" />
|
||||
</div>
|
||||
<div style="position: relative;width: 75px;left: 10px;">
|
||||
<div id="cctv-41" class="cctv-box-content-btn" @click="changeCCTV('41')">站厅</div>
|
||||
<div id="cctv-42" class="cctv-box-content-btn" @click="changeCCTV('42')">站台</div>
|
||||
<div id="cctv-43" class="cctv-box-content-btn" @click="changeCCTV('43')">云台</div>
|
||||
</div>
|
||||
<div class="cctv-box-content-draw">
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="1490" :canvas-height="400" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="cctv-box-bottom">
|
||||
<div class="cctv-box-bottom-left">
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="edit-cctv-box">
|
||||
<div class="title-name">CCTV时序编辑</div>
|
||||
<div class="edit-cctv-top">
|
||||
<div class="edit-cctv-top-title"></div>
|
||||
<div class="edit-cctv-top-title" />
|
||||
<div class="edit-cctv-top-content">
|
||||
<div class="edit-cctv-top-contentL">
|
||||
<el-table
|
||||
@ -26,11 +26,11 @@
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="edit-cctv-top-contentC">
|
||||
<div class="edit-cctv-top-contentCIn">
|
||||
<div class="edit-cctv-top-contentCInTitle">功能选择</div>
|
||||
<div class="edit-cctv-top-contentCInBtn">修改</div>
|
||||
<div class="edit-cctv-top-contentCInBtn" style="margin-top:30px;">删除</div>
|
||||
</div>
|
||||
<div class="edit-cctv-top-contentCIn">
|
||||
<div class="edit-cctv-top-contentCInTitle">功能选择</div>
|
||||
<div class="edit-cctv-top-contentCInBtn">修改</div>
|
||||
<div class="edit-cctv-top-contentCInBtn" style="margin-top:30px;">删除</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="edit-cctv-top-contentR">
|
||||
<el-table
|
||||
@ -61,7 +61,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="edit-cctv-bottom">
|
||||
<div class="edit-cctv-bottom-title"></div>
|
||||
<div class="edit-cctv-bottom-title" />
|
||||
<div class="edit-cctv-bottom-content">
|
||||
<div class="edit-cctv-bottom-contentL">
|
||||
<div class="edit-cctv-bottom-contentLL">
|
||||
@ -80,16 +80,16 @@
|
||||
</div>
|
||||
<div class="edit-cctv-bottom-contentLR">
|
||||
<div class="edit-cctv-bottom-contentLRTitle">位置描述</div>
|
||||
<div class="edit-cctv-bottom-contentLRGroup"></div>
|
||||
<div class="edit-cctv-bottom-contentLRGroup" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="edit-cctv-bottom-contentR">
|
||||
<div class="edit-cctv-bottom-contentRL">
|
||||
<div class="edit-cctv-bottom-contentRLlabel">显示时间(秒)</div>
|
||||
<div class="edit-cctv-bottom-contentRLtext"></div>
|
||||
<div class="edit-cctv-bottom-contentRLBtn1">加入</div>
|
||||
<div class="edit-cctv-bottom-contentRLBtn1">移除</div>
|
||||
<div class="edit-cctv-bottom-contentRLBtn1">全部删除</div>
|
||||
<div class="edit-cctv-bottom-contentRLlabel">显示时间(秒)</div>
|
||||
<div class="edit-cctv-bottom-contentRLtext" />
|
||||
<div class="edit-cctv-bottom-contentRLBtn1">加入</div>
|
||||
<div class="edit-cctv-bottom-contentRLBtn1">移除</div>
|
||||
<div class="edit-cctv-bottom-contentRLBtn1">全部删除</div>
|
||||
</div>
|
||||
<div class="edit-cctv-bottom-contentRC">
|
||||
<div class="edit-cctv-bottom-contentRCT1">
|
||||
@ -98,7 +98,7 @@
|
||||
</div>
|
||||
<div class="edit-cctv-bottom-contentRCT2">
|
||||
<div class="edit-cctv-bottom-contentRCT2title">序列描述</div>
|
||||
<div class="edit-cctv-bottom-contentRCT2text"></div>
|
||||
<div class="edit-cctv-bottom-contentRCT2text" />
|
||||
</div>
|
||||
<div class="edit-cctv-bottom-contentRContent">
|
||||
<el-table
|
||||
@ -132,7 +132,7 @@
|
||||
</div>
|
||||
<div class="edit-cctv-bottom-foot">
|
||||
<div class="edit-cctv-bottom-footL">信息提示:</div>
|
||||
<div class="edit-cctv-bottom-footC"></div>
|
||||
<div class="edit-cctv-bottom-footC" />
|
||||
<div class="edit-cctv-bottom-footR">
|
||||
<div class="edit-cctv-bottom-footRbtn">车站时序</div>
|
||||
</div>
|
||||
@ -344,7 +344,7 @@ border-right:1px #6a7487 solid;border-bottom:1px #6a7487 solid;}
|
||||
margin-top: 45px;
|
||||
height: 160px;
|
||||
border: 1px #061c77 solid;
|
||||
|
||||
|
||||
}
|
||||
.edit-cctv-top-contentCInTitle{font-size:13px;background:#5c48f8;color:#fff;padding:5px 0px;text-align:center}
|
||||
.edit-cctv-top-contentCInBtn{
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="stand_title">会展中心站火灾报警站台报警</div>
|
||||
<div class="">
|
||||
<iscsSystem ref="iscsPlate" :widthCanvas="1520" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="stand_title">{{ $route.query.stationName }}火灾报警站台报警</div>
|
||||
<div class="">
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="1520" :canvas-height="500" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -15,15 +15,14 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mes: '1111'
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.iscsPlate.show('12');
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="stationHall_title">会展中心站火灾报警站厅报警</div>
|
||||
<div class="">
|
||||
<iscsSystem ref="iscsPlate" :widthCanvas="1300" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="stationHall_title">{{ $route.query.stationName }}火灾报警站厅报警</div>
|
||||
<div class="">
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="1300" :canvas-height="650" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -22,8 +22,8 @@ export default {
|
||||
this.$refs.iscsPlate.show('11');
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="">
|
||||
系统报警
|
||||
{{ $route.query.stationName }}系统报警
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -1,170 +1,173 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
:visible.sync="visible"
|
||||
width="800px"
|
||||
:before-close="doClose"
|
||||
class="iscs-voice-broadcast-dialog"
|
||||
>
|
||||
<div>
|
||||
<div class="dialog-header">信息广播</div>
|
||||
<div class="iscs-pis-dialog-info">
|
||||
<el-radio-group v-model="addModel.infoType">
|
||||
<el-radio label="realTime">实时信息</el-radio>
|
||||
<el-radio label="common">普通信息</el-radio>
|
||||
<el-radio label="emergency" class="iscs-pis-dialog-emergencyInfo">紧急信息</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div v-show="addModel.infoType !== 'realTime'" class="secondary-title">{{ this.message[this.addModel.infoType].title }}</div>
|
||||
<div v-show="addModel.infoType !== 'realTime'" class="information-description-box">
|
||||
<div v-for="(item,index) in message[addModel.infoType].infoList" :key="index">
|
||||
<div class="information-box">{{item.title}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="addModel.infoType === 'realTime'">
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<div>
|
||||
<div class="secondary-title">实时信息显示内容</div>
|
||||
<div class="information-context-box">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="请输入内容"
|
||||
v-model="addModel.infoContent">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<div class="iscs-pis-dialog-info" style="text-align: left">
|
||||
<div style="margin-bottom: 20px; font-size: 16px; margin-top: 10px;">优先等级</div>
|
||||
<el-radio v-model="addModel.priority" style="margin-bottom: 20px;" label="common">普通</el-radio>
|
||||
<el-radio v-model="addModel.priority" label="emergency">紧急</el-radio>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<div style="display: inline;">名称:</div>
|
||||
<input class="pis-dialog-input" style="width: 550px;" v-model="addModel.infoTitle"/>
|
||||
<input v-show="addModel.infoType !== 'emergency'" class="pis-dialog-input" style="width: 140px;" v-model="addModel.infoTime"/>
|
||||
<div v-show="addModel.infoType !== 'emergency'" style="display: inline;">次</div>
|
||||
</div>
|
||||
<div v-show="addModel.infoType !== 'realTime'" class="secondary-title" style="margin-top: 10px">{{ this.message[this.addModel.infoType].title + '内容显示' }}</div>
|
||||
<div v-show="addModel.infoType !== 'realTime'" class="information-context-box">站台有乘客越出X色安全线,站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类</div>
|
||||
<div v-show="addModel.infoType === 'realTime'" class="information-description-box" style="margin-top: 15px;">
|
||||
<el-row>
|
||||
<el-col :span="6" style="border-right:2px solid #898888; min-height: 100px">
|
||||
<div v-for="(item,index) in message[addModel.infoType].infoList" :key="index">
|
||||
<div class="information-box" @click="selectedRealTimeInfo(item)">{{item.title}}</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<div>{{ showRealTimeInfo }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="button-group">
|
||||
<el-select v-show="addModel.infoType === 'realTime'" v-model="value" placeholder="信息选择" size="mini">
|
||||
<el-option
|
||||
v-for="item in infoList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div v-show="addModel.infoType === 'realTime'" class="pis-button">储存</div>
|
||||
<div class="button-group-content" :style="{left: addModel.infoType ==='realTime'?'300px':'550px'}">
|
||||
<div class="pis-button">设定中</div>
|
||||
<div class="pis-button" @click="releaseBroadcast">发布</div>
|
||||
<div class="pis-button">取消</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="pis-dialog-form-box">
|
||||
<el-form ref="form" :model="form" label-width="95px">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<div class="pis-button" style="position: relative; top: 10px;left: 5px; padding: 7px 10px ;">导入描述</div>
|
||||
</el-col>
|
||||
<el-col :span="21">
|
||||
<el-form-item :prop="description" label-width="0">
|
||||
<input v-model="form.description" style="width:600px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="21">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :prop="startDate" label="开始日期">
|
||||
<el-date-picker
|
||||
v-model="form.startDate"
|
||||
type="date"
|
||||
size="mini"
|
||||
placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :prop="endTime" label="结束时间">
|
||||
<el-time-picker
|
||||
arrow-control
|
||||
v-model="form.endTime"
|
||||
size="mini"
|
||||
placeholder="选择时间"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :prop="startTime" label="开始时间">
|
||||
<el-time-picker
|
||||
arrow-control
|
||||
v-model="form.startTime"
|
||||
size="mini"
|
||||
placeholder="选择时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :prop="endDate" label="结束日期">
|
||||
<el-date-picker
|
||||
v-model="form.endDate"
|
||||
type="date"
|
||||
size="mini"
|
||||
placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :prop="durationTime" label="延续时间">
|
||||
<el-time-picker
|
||||
arrow-control
|
||||
v-model="form.durationTime"
|
||||
size="mini"
|
||||
placeholder="选择时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div style="text-align: center;padding-top: 10px;">
|
||||
<div class="pis-button">今日</div>
|
||||
<div class="pis-button">一次</div>
|
||||
<div class="pis-button">无截止</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="each_operate_button">排定<br>确认</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
v-dialogDrag
|
||||
:visible.sync="visible"
|
||||
width="800px"
|
||||
:before-close="doClose"
|
||||
class="iscs-voice-broadcast-dialog"
|
||||
>
|
||||
<div>
|
||||
<div class="dialog-header">信息广播</div>
|
||||
<div class="iscs-pis-dialog-info">
|
||||
<el-radio-group v-model="addModel.infoType">
|
||||
<el-radio label="realTime">实时信息</el-radio>
|
||||
<el-radio label="common">普通信息</el-radio>
|
||||
<el-radio label="emergency" class="iscs-pis-dialog-emergencyInfo">紧急信息</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div v-show="addModel.infoType !== 'realTime'" class="secondary-title">{{ this.message[this.addModel.infoType].title }}</div>
|
||||
<div v-show="addModel.infoType !== 'realTime'" class="information-description-box">
|
||||
<div v-for="(item,index) in message[addModel.infoType].infoList" :key="index">
|
||||
<div class="information-box">{{ item.title }}</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<div v-show="addModel.infoType === 'realTime'">
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<div>
|
||||
<div class="secondary-title">实时信息显示内容</div>
|
||||
<div class="information-context-box">
|
||||
<el-input
|
||||
v-model="addModel.infoContent"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<div class="iscs-pis-dialog-info" style="text-align: left">
|
||||
<div style="margin-bottom: 20px; font-size: 16px; margin-top: 10px;">优先等级</div>
|
||||
<el-radio v-model="addModel.priority" style="margin-bottom: 20px;" label="common">普通</el-radio>
|
||||
<el-radio v-model="addModel.priority" label="emergency">紧急</el-radio>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<div style="display: inline;">名称:</div>
|
||||
<input v-model="addModel.infoTitle" class="pis-dialog-input" style="width: 550px;">
|
||||
<input v-show="addModel.infoType !== 'emergency'" v-model="addModel.infoTime" class="pis-dialog-input" style="width: 140px;">
|
||||
<div v-show="addModel.infoType !== 'emergency'" style="display: inline;">次</div>
|
||||
</div>
|
||||
<div v-show="addModel.infoType !== 'realTime'" class="secondary-title" style="margin-top: 10px">{{ this.message[this.addModel.infoType].title + '内容显示' }}</div>
|
||||
<div v-show="addModel.infoType !== 'realTime'" class="information-context-box">站台有乘客越出X色安全线,站台乘客请返回安前线内站台有乘客越出X色安全线成熟的技术等级分类</div>
|
||||
<div v-show="addModel.infoType === 'realTime'" class="information-description-box" style="margin-top: 15px;">
|
||||
<el-row>
|
||||
<el-col :span="6" style="border-right:2px solid #898888; min-height: 100px">
|
||||
<div v-for="(item,index) in message[addModel.infoType].infoList" :key="index">
|
||||
<div class="information-box" @click="selectedRealTimeInfo(item)">{{ item.title }}</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<div>{{ showRealTimeInfo }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="button-group">
|
||||
<el-select v-show="addModel.infoType === 'realTime'" v-model="value" placeholder="信息选择" size="mini">
|
||||
<el-option
|
||||
v-for="item in infoList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<div v-show="addModel.infoType === 'realTime'" class="pis-button">储存</div>
|
||||
<div class="button-group-content" :style="{left: addModel.infoType ==='realTime'?'300px':'550px'}">
|
||||
<div class="pis-button">设定中</div>
|
||||
<div class="pis-button" @click="releaseBroadcast">发布</div>
|
||||
<div class="pis-button">取消</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="pis-dialog-form-box">
|
||||
<el-form ref="form" :model="form" label-width="95px">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<div class="pis-button" style="position: relative; top: 10px;left: 5px; padding: 7px 10px ;">导入描述</div>
|
||||
</el-col>
|
||||
<el-col :span="21">
|
||||
<el-form-item :prop="description" label-width="0">
|
||||
<input v-model="form.description" style="width:600px;">
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="21">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :prop="startDate" label="开始日期">
|
||||
<el-date-picker
|
||||
v-model="form.startDate"
|
||||
type="date"
|
||||
size="mini"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :prop="endTime" label="结束时间">
|
||||
<el-time-picker
|
||||
v-model="form.endTime"
|
||||
arrow-control
|
||||
size="mini"
|
||||
placeholder="选择时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :prop="startTime" label="开始时间">
|
||||
<el-time-picker
|
||||
v-model="form.startTime"
|
||||
arrow-control
|
||||
size="mini"
|
||||
placeholder="选择时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :prop="endDate" label="结束日期">
|
||||
<el-date-picker
|
||||
v-model="form.endDate"
|
||||
type="date"
|
||||
size="mini"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :prop="durationTime" label="延续时间">
|
||||
<el-time-picker
|
||||
v-model="form.durationTime"
|
||||
arrow-control
|
||||
size="mini"
|
||||
placeholder="选择时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div style="text-align: center;padding-top: 10px;">
|
||||
<div class="pis-button">今日</div>
|
||||
<div class="pis-button">一次</div>
|
||||
<div class="pis-button">无截止</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="each_operate_button">排定<br>确认</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -310,7 +313,7 @@ export default {
|
||||
this.showRealTimeInfo = item.content;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
@ -37,10 +37,10 @@
|
||||
<div class="screen_station_name">{{ station.stationName }}</div>
|
||||
</div>
|
||||
<div v-if="station.children&&station.children.length>0">
|
||||
<div v-for="(child,index) in station.children" :key="station.stationName+index" class="each_data_info" @click="selectArea(station.stationName,index)" style="text-align: center;">
|
||||
<div v-if="child.status==='default'" class="button_default_content">
|
||||
<div class="button_default" :style="{background:selectedAreaList.includes(station.stationName + '-' + index)?'#2EFF74':'#CDCDCD'}" />
|
||||
</div>
|
||||
<div v-for="(child,index) in station.children" :key="station.stationName+index" class="each_data_info" style="text-align: center;" @click="selectArea(station.stationName,index)">
|
||||
<div v-if="child.status==='default'" class="button_default_content">
|
||||
<div class="button_default" :style="{background:selectedAreaList.includes(station.stationName + '-' + index)?'#2EFF74':'#CDCDCD'}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -80,7 +80,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<info-broadcast ref="infoBroadcast" />
|
||||
<info-broadcast ref="infoBroadcast" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -45,13 +45,13 @@
|
||||
<div class="time_preview_footer">
|
||||
<div class="preview_footer_top">操作</div>
|
||||
<div class="preview_footer_content">
|
||||
<div class="each_preview_btn each_preview_back">区域<br/>详细</div>
|
||||
<div class="each_preview_btn each_preview_back">区域<br>详细</div>
|
||||
<div class="each_preview_btn each_preview_back">删除</div>
|
||||
<div class="each_preview_btn each_preview_back">停用</div>
|
||||
<div class="each_preview_btn each_preview_back1">激活</div>
|
||||
<div class="each_preview_btn each_preview_back2">修改</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -1,24 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="psd_title">{{ $route.query.stationName }}屏蔽门</div>
|
||||
<div>
|
||||
<div class="psd_title">会展中心站屏蔽门</div>
|
||||
<div>
|
||||
<iscsSystem ref="iscsPlate" :widthCanvas="1490" />
|
||||
</div>
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="1490" :canvas-height="800" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import iscsSystem from "../canvas/iscsCanvas";
|
||||
import iscsSystem from '../canvas/iscsCanvas';
|
||||
export default {
|
||||
components: {
|
||||
iscsSystem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mes: "1111"
|
||||
mes: '1111'
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.iscsPlate.show("31");
|
||||
this.$refs.iscsPlate.show('31');
|
||||
},
|
||||
methods: {}
|
||||
};
|
||||
|
393
src/views/iscs/iscsSystem/groupNav.vue
Normal file
393
src/views/iscs/iscsSystem/groupNav.vue
Normal file
@ -0,0 +1,393 @@
|
||||
<template>
|
||||
<div class="nav-box">
|
||||
<div class="nav-button-box">
|
||||
<div v-for="(item, index) in navList" :key="index" class="nav-list-box" :class="{'active': selectIndex == index}" @click="selectTab(item, index)">{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="nav-button-box">
|
||||
<div v-for="(item, index) in navList[selectIndex].children" v-show="show(item)" :key="index" class="nav-list-box" :class="{'active': selectChildIndex == index}" @click="selectChildren(item, index)">{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="nav-button-box station-box1">
|
||||
<div class="scroll-box">
|
||||
<div v-for="(item, index) in stationList" :key="index" class="station-box">
|
||||
<div class="station-line" />
|
||||
<div class="nav-list-box station-list-box" :class="{'active': selectStationIndex == index}" @click="selectStation(item, index)" />
|
||||
<div class="station-name">{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<el-select v-model="currentSystem" placeholder="请选择" size="mini" @change="changeCurrentSystem">
|
||||
<el-option
|
||||
v-for="item in systemList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="back-box" @click="back">返回主页面</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import merge from 'webpack-merge';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selectIndex: 0,
|
||||
selectChildIndex: -1,
|
||||
selectStationIndex: 0,
|
||||
type: '',
|
||||
currentSystem: 'center',
|
||||
systemList: [
|
||||
{
|
||||
label: '中心',
|
||||
value: 'center'
|
||||
},
|
||||
{
|
||||
label: '车站',
|
||||
value: 'local'
|
||||
}
|
||||
],
|
||||
navList: [
|
||||
{
|
||||
name: '火灾报警',
|
||||
children: [
|
||||
{
|
||||
name: '站台报警',
|
||||
type: 'standFAS',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: '站厅报警',
|
||||
type: 'stationHallFAS',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: '系统状态',
|
||||
type: 'systemFAS',
|
||||
showType: ['center', 'local']
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '机电', // 未知子菜单
|
||||
children: [
|
||||
{
|
||||
name: '控制模式',
|
||||
type: 'controlBAS',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: '控制权限',
|
||||
type: 'controlPermissionBAS',
|
||||
showType: ['center', 'local']
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '广播',
|
||||
children: [
|
||||
{
|
||||
name: '主画面',
|
||||
type: 'mainScreenPA',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: '广播监听',
|
||||
type: 'radioListeningPA',
|
||||
showType: ['center']
|
||||
},
|
||||
{
|
||||
name: '计时一览',
|
||||
type: 'timePreviewPA',
|
||||
showType: ['center', 'local']
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '乘客信息',
|
||||
children: [
|
||||
{
|
||||
name: '主画面',
|
||||
type: 'MainScreen',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: 'LCD屏控制',
|
||||
type: 'LCDcontrol',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: '计时一览',
|
||||
type: 'TimePreview',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: '车站网络',
|
||||
type: 'StationNetwork',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: '紧急发布一览',
|
||||
type: 'EmergencyRelease',
|
||||
showType: ['center', 'local']
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '闭路电视',
|
||||
children: [
|
||||
{
|
||||
name: '车站控制',
|
||||
type: 'controlCCTV',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: '车站时序',
|
||||
type: 'timeCCTV',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: '车站时序编辑',
|
||||
type: 'timeEditCCTV',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: '车站设备状态',
|
||||
type: 'statusCCTV',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: '中心设备状态',
|
||||
type: 'centerStatusCCTV',
|
||||
showType: ['center', 'local']
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '屏蔽门',
|
||||
children: [
|
||||
{
|
||||
name: '屏蔽门',
|
||||
type: 'PSD',
|
||||
showType: ['center', 'local']
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '售检票',
|
||||
children: [
|
||||
{
|
||||
name: '售检票',
|
||||
type: 'AFC',
|
||||
showType: ['center', 'local']
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '门禁',
|
||||
children: [
|
||||
{
|
||||
name: '站厅层',
|
||||
type: 'stationHallACS',
|
||||
showType: ['center', 'local']
|
||||
},
|
||||
{
|
||||
name: '站台层',
|
||||
type: 'standACS',
|
||||
showType: ['center', 'local']
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '防淹门', // 未知 子菜单
|
||||
children: [
|
||||
{
|
||||
name: '防淹门',
|
||||
type: 'doorFG',
|
||||
showType: ['center', 'local']
|
||||
}
|
||||
]
|
||||
}
|
||||
// {
|
||||
// name: '网络状态', // 未知 子菜单
|
||||
// children: [
|
||||
// {
|
||||
// name: '网络状态',
|
||||
// type: 'standFAS'
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
],
|
||||
stationList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
async created () {
|
||||
// 请求当前线路车站列表
|
||||
const res = await getByGroupStationList(this.$route.query.group);
|
||||
if (res.code == 200) {
|
||||
this.stationList = [];
|
||||
res.data.forEach(station => {
|
||||
if (!station.depot) {
|
||||
const param = {
|
||||
name: station.name,
|
||||
id: station.code
|
||||
};
|
||||
this.stationList.push(param);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.navList.forEach((nav, navIndex)=>{
|
||||
if (nav.children && nav.children.length > 0) {
|
||||
nav.children.forEach((child, childIndex)=>{
|
||||
if (child.type && child.type === this.$route.params.mode) {
|
||||
this.selectIndex = navIndex;
|
||||
this.selectChildIndex = childIndex;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
show(item) {
|
||||
let flag = false;
|
||||
if (item.showType.indexOf(this.currentSystem) >= 0) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
},
|
||||
selectTab(item, index) { // 选择大分类
|
||||
if (this.selectIndex != index) {
|
||||
this.selectIndex = index;
|
||||
this.selectChildIndex = 0;
|
||||
if (item.children.length) {
|
||||
this.type = item.children[0].type;
|
||||
this.$router.push({ path: `/displayIscs/system/config/${item.children[0].type}`, query: {currentSystem:this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group } });
|
||||
}
|
||||
}
|
||||
},
|
||||
selectChildren(item, index) { // 选择子菜单
|
||||
this.selectChildIndex = index;
|
||||
this.type = item.type;
|
||||
this.$router.push({ path: `/displayIscs/system/config/${item.type}`, query: {currentSystem: this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group } });
|
||||
},
|
||||
selectStation(item, index) { // 选择子菜单
|
||||
this.selectStationIndex = index;
|
||||
if (!this.type) {
|
||||
this.type = this.$route.params.mode;
|
||||
}
|
||||
this.$router.push({ path: `/displayIscs/system/config/${this.type}`, query: {currentSystem: this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group } });
|
||||
},
|
||||
back() {
|
||||
this.$router.push({ path: `/trainingPlatform` });
|
||||
},
|
||||
changeCurrentSystem() {
|
||||
this.$router.push({
|
||||
query:merge(this.$route.query, {'currentSystem':this.currentSystem})
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.nav-box{
|
||||
width: 100%;
|
||||
height: 95px;
|
||||
background-color: #ACACAC;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
.nav-button-box{
|
||||
display: table;
|
||||
margin-top: 2px;
|
||||
.nav-list-box{
|
||||
width: 90px;
|
||||
height: 28px;
|
||||
text-align: center;
|
||||
line-height: 28px;
|
||||
background-color: #A7A7A7;
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
color: #4C4B6B;
|
||||
margin-left: 5px;
|
||||
margin-bottom: 2px;
|
||||
box-sizing: border-box;
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #565656;
|
||||
border-bottom: 2px solid #565656;
|
||||
cursor: pointer;
|
||||
&.active,
|
||||
&:hover{
|
||||
background: #EBB570;
|
||||
border-top: 2px solid #795B31;
|
||||
border-left: 2px solid #795B31;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.station-box1{
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
margin-top: -1px;
|
||||
// overflow: auto;
|
||||
display: block;
|
||||
.scroll-box{
|
||||
padding: 14px 20px 0;
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
.station-box{
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 120px;
|
||||
float: left;
|
||||
flex: 1;
|
||||
.station-list-box{
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-7px);
|
||||
}
|
||||
.station-name{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
transform: translateY(-14px);
|
||||
font-size: 12px;
|
||||
color: #4C4B6B;
|
||||
}
|
||||
.station-line{
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
background: #A1D9DC;
|
||||
}
|
||||
}
|
||||
.select-box{
|
||||
display: table;
|
||||
position: absolute;
|
||||
right: 120px;
|
||||
top: 10px;
|
||||
width: 80px;
|
||||
}
|
||||
.back-box{
|
||||
display: table;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 15px;
|
||||
cursor: pointer;
|
||||
&:hover{
|
||||
color: #3161cc;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<div class="iscs-system-box">
|
||||
<top-nav @selectMode="selectMode" />
|
||||
<div class="content-box iscs_content_box">
|
||||
<top-nav v-if="!$route.query.group" @selectMode="selectMode" />
|
||||
<group-nav v-if="$route.query.group" @selectMode="selectMode" />
|
||||
<div class="content-box iscs_content_box" :class="{'displayIscs': $route.query.group}">
|
||||
<router-view />
|
||||
</div>
|
||||
<!-- <bottom /> -->
|
||||
@ -10,11 +11,13 @@
|
||||
|
||||
<script>
|
||||
import TopNav from './nav.vue';
|
||||
import GroupNav from './groupNav.vue';
|
||||
// import bottom from './bottom.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
TopNav
|
||||
TopNav,
|
||||
GroupNav
|
||||
// bottom
|
||||
},
|
||||
data() {
|
||||
@ -39,6 +42,9 @@ export default {
|
||||
padding: 34px 0 0;
|
||||
background: #45607B;
|
||||
}
|
||||
.displayIscs{
|
||||
padding: 95px 0 0;
|
||||
}
|
||||
|
||||
// 谷歌、safari、qq浏览器、360浏览器滚动条样式
|
||||
// 定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸
|
||||
|
@ -34,7 +34,8 @@ export default {
|
||||
return {
|
||||
selectIndex: 0,
|
||||
selectChildIndex: -1,
|
||||
selectStationIndex: -1,
|
||||
selectStationIndex: 0,
|
||||
type: '',
|
||||
currentSystem: 'center',
|
||||
systemList: [
|
||||
{
|
||||
@ -275,16 +276,19 @@ export default {
|
||||
this.selectIndex = index;
|
||||
this.selectChildIndex = 0;
|
||||
if (item.children.length) {
|
||||
this.$router.push({ path: `/iscs/system/config/${item.children[0].type}`, query: {currentSystem:this.currentSystem} });
|
||||
this.type = item.children[0].type;
|
||||
this.$router.push({ path: `/iscs/system/config/${item.children[0].type}`, query: {currentSystem:this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id } });
|
||||
}
|
||||
}
|
||||
},
|
||||
selectChildren(item, index) { // 选择子菜单
|
||||
this.selectChildIndex = index;
|
||||
this.$router.push({ path: `/iscs/system/config/${item.type}`, query: {currentSystem:this.currentSystem} });
|
||||
this.type = item.type;
|
||||
this.$router.push({ path: `/iscs/system/config/${item.type}`, query: {currentSystem:this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id } });
|
||||
},
|
||||
selectStation(item, index) { // 选择子菜单
|
||||
this.selectStationIndex = index;
|
||||
this.$router.push({ path: `/iscs/system/config/${this.type}`, query: {currentSystem:this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id } });
|
||||
},
|
||||
back() {
|
||||
this.$router.push({ path: `/design/home` });
|
||||
|
@ -33,7 +33,8 @@ import FaultChoose from './demon/faultChoose';
|
||||
import AddQuest from './demon/addQuest';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
// import { getStationList } from '@/api/runplan';
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import { getEveryDayRunPlanNew } from '@/api/simulation';
|
||||
|
||||
// 右上角操作
|
||||
@ -106,7 +107,8 @@ export default {
|
||||
this.$store.dispatch('runPlan/clear').then(() => {
|
||||
if (opt && opt.mapId) {
|
||||
this.viewDisabled = true;
|
||||
getStationList(opt.mapId).then(response => {
|
||||
getByGroupStationList(this.$route.query.group).then(response => {
|
||||
// getStationList(opt.mapId).then(response => {
|
||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||
getEveryDayRunPlanNew(this.group).then(resp => {
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
|
@ -21,7 +21,7 @@
|
||||
import SetTime from './demon/setTime';
|
||||
import { Notification } from 'element-ui';
|
||||
import { ranAsPlan, runDiagramOver, runDiagramGetTime } from '@/api/simulation';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
// import { timeFormat } from '@/utils/date';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
|
@ -4,7 +4,8 @@
|
||||
<div :id="canvasId" style="background: #000;" class="display_canvas" />
|
||||
<progress-bar ref="progressBar" />
|
||||
<zoom-box v-if="!isScreen" :scale-rate="dataZoom.scaleRate" @setShrink="setShrink" @setMagnify="setMagnify" />
|
||||
<show-mode v-if="isDesign" @setShowMode="setShowMode" />
|
||||
<show-mode v-if="isDesign" :local-station-show="handleDataLoaded " @setShowMode="setShowMode" />
|
||||
<switch-station v-show="isDesign && (showMode === '03') && localStationShow" ref="switchStation" :concentration-station-list="concentrationStationList" @setShowStation="setShowStation" />
|
||||
<div v-if="show" class="zoom-view" :style="{ width: width +'px'}">
|
||||
<el-form :model="dataZoom" label-width="80px" size="mini" inline>
|
||||
<el-form-item :label="$t(`global.offset`)">
|
||||
@ -36,6 +37,7 @@ import localStore from 'storejs';
|
||||
import Jlmap from '@/jmapNew/map';
|
||||
import ZoomBox from './pendant/zoom';
|
||||
import ShowMode from './pendant/showMode';
|
||||
import SwitchStation from './pendant/switchStation';
|
||||
import ProgressBar from '@/views/components/progressBar/index';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
@ -47,7 +49,8 @@ export default {
|
||||
components: {
|
||||
ZoomBox,
|
||||
ProgressBar,
|
||||
ShowMode
|
||||
ShowMode,
|
||||
SwitchStation
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -62,7 +65,11 @@ export default {
|
||||
y: 0
|
||||
},
|
||||
sectionActive: false,
|
||||
operate: null
|
||||
operate: null,
|
||||
concentrationStationList: [],
|
||||
showMode: '03',
|
||||
localStationShow: false,
|
||||
previewOrMapDraw: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -159,12 +166,9 @@ export default {
|
||||
// 默认个人地图绘制可以滚轮放大缩小 其他地图显示不允许此操作
|
||||
const path = window.location.href;
|
||||
const mouseWheelFlag = true;
|
||||
let previewOrMapDraw = false;
|
||||
// if (path.includes('design/userlist/map/draw') || path.includes('design/usermap/map/draw')) {
|
||||
// mouseWheelFlag = true;
|
||||
// }
|
||||
this.previewOrMapDraw = false;
|
||||
if (path.indexOf('map/draw') !== -1 || path.indexOf('mapPreviewNew') !== -1) {
|
||||
previewOrMapDraw = true;
|
||||
this.previewOrMapDraw = true;
|
||||
}
|
||||
const prdType = this.$route.query.prdType;
|
||||
Vue.prototype.$theme = new Theme();
|
||||
@ -183,7 +187,7 @@ export default {
|
||||
},
|
||||
showConfig: {
|
||||
prdType: prdType,
|
||||
previewOrMapDraw: previewOrMapDraw,
|
||||
previewOrMapDraw: this.previewOrMapDraw,
|
||||
showMode: '03'
|
||||
},
|
||||
methods: {
|
||||
@ -227,6 +231,18 @@ export default {
|
||||
// 地图数据加载完成
|
||||
handleDataLoaded() {
|
||||
this.$store.dispatch('map/mapDataLoaded');
|
||||
const concentrationStationList = [];
|
||||
this.$store.state.map.map.stationList.forEach(item => {
|
||||
if (item.centralized) {
|
||||
concentrationStationList.push({value: item.code, name: item.name});
|
||||
}
|
||||
});
|
||||
this.concentrationStationList = concentrationStationList;
|
||||
const lineCode = this.$store.state.map.map.skinVO.code;
|
||||
if (Vue.prototype.$theme) {
|
||||
this.localStationShow = Vue.prototype.$theme._localShowMode[lineCode] === 'ecStation';
|
||||
}
|
||||
this.$store.dispatch('map/setTrainWindowShow', this.previewOrMapDraw);
|
||||
},
|
||||
// 地图视图加载完成
|
||||
handleViewLoaded() {
|
||||
@ -330,10 +346,30 @@ export default {
|
||||
},
|
||||
// 切换现地行调显示界面(绘图和预览页面下)
|
||||
setShowMode(showMode) {
|
||||
const list = [...this.$store.state.map.map.automaticRouteButtonList, ...this.$store.state.map.map.cycleButtonList,
|
||||
...this.$store.state.map.map.stationList, ...this.$store.state.map.map.stationStandList,
|
||||
...this.$store.state.map.map.lineList, ...this.$store.state.map.map.textList, ...this.$store.state.map.map.outerFrameList];
|
||||
if (this.showMode !== showMode) {
|
||||
this.setShowStation('');
|
||||
this.$refs.switchStation.inintShowStation();
|
||||
}
|
||||
this.showMode = showMode;
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (item !== 'skinVO') {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowMode(list, showMode);
|
||||
},
|
||||
setShowStation(stationCode) {
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (item !== 'skinVO') {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowStation(list, stationCode);
|
||||
this.setCenter(stationCode);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -8,10 +8,18 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'ShowMode',
|
||||
props: {
|
||||
localStationShow: {
|
||||
type: String,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
offsetY: 15,
|
||||
offsetX: 20,
|
||||
offsetX: 150,
|
||||
swch: '03',
|
||||
swchList: [
|
||||
{ value: '03', name: '现地' },
|
||||
@ -27,6 +35,9 @@ export default {
|
||||
},
|
||||
'$route' () {
|
||||
this.setOffsetX();
|
||||
},
|
||||
localStationShow() {
|
||||
this.setOffsetX();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -54,12 +65,25 @@ export default {
|
||||
},
|
||||
setOffsetX() {
|
||||
if (this.$route.path.indexOf('mapPreviewNew') !== -1) {
|
||||
this.offsetX = 20;
|
||||
this.offsetX = this.localStationShow ? 150 : 20;
|
||||
} else if (this.$route.path.indexOf('map/draw') !== -1) {
|
||||
this.offsetX = 140;
|
||||
this.offsetX = this.localStationShow ? 270 : 140;
|
||||
}
|
||||
},
|
||||
switchMode(val) {
|
||||
if (val === '03' && this.localStationShow) {
|
||||
if (this.$route.path.indexOf('mapPreviewNew') !== -1) {
|
||||
this.offsetX = 150;
|
||||
} else if (this.$route.path.indexOf('map/draw') !== -1) {
|
||||
this.offsetX = 270;
|
||||
}
|
||||
} else {
|
||||
if (this.$route.path.indexOf('mapPreviewNew') !== -1) {
|
||||
this.offsetX = 20;
|
||||
} else if (this.$route.path.indexOf('map/draw') !== -1) {
|
||||
this.offsetX = 140;
|
||||
}
|
||||
}
|
||||
this.$emit('setShowMode', val);
|
||||
}
|
||||
}
|
||||
|
117
src/views/newMap/jlmapNew/pendant/switchStation.vue
Normal file
117
src/views/newMap/jlmapNew/pendant/switchStation.vue
Normal file
@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<div class="zoom-box" :style="{top: offsetY+'px', right: offsetX+ 'px'}">
|
||||
<el-select v-model="showStation" size="small" :placeholder="$t('display.schema.selectProduct')" @change="switchMode">
|
||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'SwitchStation',
|
||||
props: {
|
||||
concentrationStationList: {
|
||||
type: String,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
offsetY: 15,
|
||||
offsetX: 20,
|
||||
showStation: '',
|
||||
stationList: [
|
||||
{ value: '', name: '全部' }
|
||||
]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
||||
this.$nextTick(() => {
|
||||
this.setPosition();
|
||||
});
|
||||
},
|
||||
'$route' () {
|
||||
this.setOffsetX();
|
||||
},
|
||||
concentrationStationList(val) {
|
||||
this.stationList = [...this.stationList, ...val];
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setOffsetX();
|
||||
},
|
||||
methods: {
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
let offsetY = 15;
|
||||
const menuBar = document.getElementById('menuBar');
|
||||
const menuTool = document.getElementById('menuTool');
|
||||
|
||||
if (menuBar) {
|
||||
offsetY += (menuBar.offsetHeight || 0);
|
||||
}
|
||||
|
||||
if (menuTool) {
|
||||
offsetY += (menuTool.offsetHeight || 0);
|
||||
}
|
||||
|
||||
if (this.offsetY != offsetY) {
|
||||
this.offsetY = offsetY;
|
||||
}
|
||||
});
|
||||
},
|
||||
inintShowStation() {
|
||||
this.showStation = '';
|
||||
},
|
||||
setOffsetX() {
|
||||
if (this.$route.path.indexOf('mapPreviewNew') !== -1) {
|
||||
this.offsetX = 20;
|
||||
} else if (this.$route.path.indexOf('map/draw') !== -1) {
|
||||
this.offsetX = 140;
|
||||
}
|
||||
},
|
||||
switchMode(val) {
|
||||
this.$emit('setShowStation', val);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.zoom-box {
|
||||
z-index: 7;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
width: 120px;
|
||||
height: 32px;
|
||||
background: rgb(224, 223, 223);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
|
||||
.zoom {
|
||||
width: 50%;
|
||||
float: right;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: none;
|
||||
outline: none;
|
||||
color: #333;
|
||||
|
||||
i {
|
||||
color: #000;
|
||||
font-size: 18px;
|
||||
font-weight: 900;
|
||||
}
|
||||
}
|
||||
|
||||
.shrink {
|
||||
border-right: 1px solid #333;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -31,13 +31,15 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setPosition();
|
||||
},
|
||||
methods: {
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
let offset = 15;
|
||||
const menuBar = document.getElementById('menuBar');
|
||||
const menuTool = document.getElementById('menuTool');
|
||||
|
||||
if (menuBar) {
|
||||
offset += (menuBar.offsetHeight || 0);
|
||||
}
|
||||
|
@ -37,7 +37,8 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
// import { getStationList } from '@/api/runplan';
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import { getEveryDayRunPlanData } from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
@ -104,7 +105,8 @@ export default {
|
||||
this.$store.dispatch('runPlan/clear').then(resp => {
|
||||
if (opt && opt.mapId) {
|
||||
this.viewDisabled = true;
|
||||
getStationList(opt.mapId).then(response => {
|
||||
getByGroupStationList(this.$route.query.group).then(response => {
|
||||
// getStationList(opt.mapId).then(response => {
|
||||
const stations = response.data;
|
||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||
getEveryDayRunPlanData(this.group).then(resp => {
|
||||
|
Loading…
Reference in New Issue
Block a user