# Conflicts:
#	src/jmapNew/shape/Train/index.js
This commit is contained in:
fan 2020-03-13 13:08:18 +08:00
commit 7753c53ee0
38 changed files with 917 additions and 713 deletions

View File

@ -100,7 +100,7 @@ export default class TrainBody extends Group {
const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode
? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber) ? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber)
: model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号 : model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号
const targetCode = style.Train.trainNumber.targetCodePrefix + (model.targetCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码 const targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码
const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号 const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号
this.textTrainServer = new ETextName({ this.textTrainServer = new ETextName({
zlevel: model.zlevel, zlevel: model.zlevel,

View File

@ -4,16 +4,16 @@ const deviceState = {};
deviceState[deviceType.Section] = { deviceState[deviceType.Section] = {
/** 区段状态*/ /** 区段状态*/
blockade: false, // 是否封锁 blockade: 0, // 是否封锁
routeLock: false, // 是否进路锁闭 routeLock: 0, // 是否进路锁闭
overlapLock: false, // 进路延续保护锁闭 overlapLock: 0, // 进路延续保护锁闭
ctOccupied: false, // 通信车占用 ctOccupied: 0, // 通信车占用
nctOccupied: false, // 非通信车占用 nctOccupied: 0, // 非通信车占用
cutOff: false, // 是否切除 cutOff: 0, // 是否切除
invalid: false, // 是否失效 invalid: 0, // 是否失效
speedUpLimit: 0, // 最高限速 speedUpLimit: 0, // 最高限速
/** 是否故障*/ /** 是否故障*/
fault: false /** 非故障*/ fault: 0 /** 非故障*/
}; };
deviceState[deviceType.Switch] = { deviceState[deviceType.Switch] = {
@ -50,7 +50,7 @@ deviceState[deviceType.Switch] = {
// State14: '14' /** 道岔状态类型 - 封锁*/ // State14: '14' /** 道岔状态类型 - 封锁*/
// }, // },
/** 是否故障*/ /** 是否故障*/
fault: false /** 非故障*/ fault: 0 /** 非故障*/
// /** 是否切除*/ // /** 是否切除*/
// cutOff: { // cutOff: {
// Default: false /** 是否切除*/ // Default: false /** 是否切除*/
@ -58,19 +58,19 @@ deviceState[deviceType.Switch] = {
}; };
deviceState[deviceType.Signal] = { deviceState[deviceType.Signal] = {
blockade: false, // 是否锁闭 blockade: 0, // 是否锁闭
logicLight: false, // 逻辑点灯 logicLight: 0, // 逻辑点灯
greenOpen: false, // 绿灯开放 greenOpen: 0, // 绿灯开放
yellowOpen: false, // 黄灯开放 yellowOpen: 0, // 黄灯开放
redOpen: true, // 红灯开放(默认状态) redOpen: 1, // 红灯开放(默认状态)
delayTime: 0, // 信号机延迟解锁倒计时 delayTime: 0, // 信号机延迟解锁倒计时
atsControl: 1, // 0是人工1是自动 atsControl: 1, // 0是人工1是自动
fault: false // 是否故障 fault: 0 // 是否故障
}; };
deviceState[deviceType.Station] = { deviceState[deviceType.Station] = {
/** 是否故障*/ /** 是否故障*/
fault: false, /** 非故障*/ fault: 0, /** 非故障*/
controlMode: 'Center' controlMode: 'Center'
// controlMode: 'Local' // Center 中控 Local 站控 Emergency 紧急站控 Interlock 联锁控 // controlMode: 'Local' // Center 中控 Local 站控 Emergency 紧急站控 Interlock 联锁控
}; };
@ -87,7 +87,7 @@ deviceState[deviceType.Psd] = {
// State03: '03' /** 切除 */ // State03: '03' /** 切除 */
// }, // },
/** 是否故障*/ /** 是否故障*/
fault: false /** 非故障*/ fault: 0 /** 非故障*/
}; };
deviceState[deviceType.StationDelayUnlock] = { deviceState[deviceType.StationDelayUnlock] = {
@ -99,7 +99,7 @@ deviceState[deviceType.StationDelayUnlock] = {
// }, // },
/** 是否故障*/ /** 是否故障*/
fault: false /** 非故障*/ fault: 0 /** 非故障*/
}; };
deviceState[deviceType.StationStand] = { deviceState[deviceType.StationStand] = {
@ -123,7 +123,7 @@ deviceState[deviceType.StationStand] = {
// State04: '04' /** 默认 */ // State04: '04' /** 默认 */
// }, // },
/** 是否故障*/ /** 是否故障*/
fault: false /** 非故障*/ fault: 0 /** 非故障*/
}; };
deviceState[deviceType.Train] = { deviceState[deviceType.Train] = {
@ -207,7 +207,7 @@ deviceState[deviceType.Train] = {
// State02: '02' /** 有报警 */ // State02: '02' /** 有报警 */
// }, // },
/** 车门是否关闭且锁闭 */ /** 车门是否关闭且锁闭 */
doorCloseLock: true, doorCloseLock: 1,
/** 列车运行级别 */ /** 列车运行级别 */
runLevel: 'CBTC', runLevel: 'CBTC',
/** 驾驶模式 */ /** 驾驶模式 */
@ -219,7 +219,18 @@ deviceState[deviceType.Train] = {
/** 列车是否向右形式 */ /** 列车是否向右形式 */
right: 1, right: 1,
/** 是否故障*/ /** 是否故障*/
fault: false /** 非故障*/ fault: 0 /** 非故障*/,
/** 是否跳停 */
jump: 0,
/** 是否扣车 */
hold: 0,
/** 列车类型 PLAN计划车 HEAD 头码车 MANUAL 人工车*/
type: 'PLAN',
/** 列车精确位置 (成都一号线使用)*/
offsetp:0,
/** 列车所在物理区段 */
physicalCode:''
}; };
export default deviceState; export default deviceState;

View File

@ -83,10 +83,14 @@ class Status {
right: device.right, /** 列车方向 */ right: device.right, /** 列车方向 */
doorCloseLock: device.doorCloseLock, /** 车门是否关闭且锁闭 */ doorCloseLock: device.doorCloseLock, /** 车门是否关闭且锁闭 */
stop: device.stop, /** 列车是否停稳 */ stop: device.stop, /** 列车是否停稳 */
type: device.type, /** 列车类型 */ type: device.type, /** 列车类型 PLAN计划车 HEAD 头码车 MANUAL 人工车*/
runLevel: device.runLevel, /** 列车运行级别 */ runLevel: device.runLevel, /** 列车运行级别 */
driveMode: device.driveMode, /** 驾驶模式 */ driveMode: device.driveMode, /** 驾驶模式 */
fault: device.fault /** 非故障*/ fault: device.fault, /** 非故障*/
jump: device.jump, /** 是否跳停 */
hold: device.hold, /** 是否扣车 */
offsetp:device.offsetp, /** 列车精确位置 (成都一号线使用)*/
physicalCode:device.physicalCode /** 列车所在物理区段 */
}; };
} }
handleStation(device) { handleStation(device) {

View File

@ -46,6 +46,7 @@ class Jlmap {
const width = opts.dom.clientWidth; const width = opts.dom.clientWidth;
const height = opts.dom.clientHeight; const height = opts.dom.clientHeight;
this.zoomOnMouseWheel = opts.options.zoomOnMouseWheel; this.zoomOnMouseWheel = opts.options.zoomOnMouseWheel;
this.previewOrMapDraw = opts.showConfig.previewOrMapDraw;
this.$zr = zrender.init(opts.dom, deepAssign({ renderer, devicePixelRatio, width, height }, opts.config)); this.$zr = zrender.init(opts.dom, deepAssign({ renderer, devicePixelRatio, width, height }, opts.config));
@ -140,6 +141,7 @@ class Jlmap {
this.$mouseController.disable(); this.$mouseController.disable();
} else { } else {
opts['zoomOnMouseWheel'] = this.zoomOnMouseWheel; opts['zoomOnMouseWheel'] = this.zoomOnMouseWheel;
opts['previewOrMapDraw'] = this.previewOrMapDraw;
this.$mouseController.enable(opts); this.$mouseController.enable(opts);
} }

View File

@ -54,6 +54,7 @@ class MouseController extends Eventful {
this._moveOnMouseMove = opts.moveOnMouseMove || true; this._moveOnMouseMove = opts.moveOnMouseMove || true;
this._zoomOnMouseWheel = opts.zoomOnMouseWheel || false; this._zoomOnMouseWheel = opts.zoomOnMouseWheel || false;
this._preventDefaultMouseMove = opts.preventDefaultMouseMove || true; this._preventDefaultMouseMove = opts.preventDefaultMouseMove || true;
this._previewOrMapDraw = opts.previewOrMapDraw || false;
this.disable(); this.disable();
@ -121,7 +122,7 @@ class MouseController extends Eventful {
this._preventDefaultMouseMove && eventTool.stop(e.event); this._preventDefaultMouseMove && eventTool.stop(e.event);
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y }); this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
} else if (e.which === 3 && this._zoomOnMouseWheel) { } else if (e.which === 3 && this._zoomOnMouseWheel && this._previewOrMapDraw) {
this.handleMouseMoveRight({x: e.offsetX, y: e.offsetY}); this.handleMouseMoveRight({x: e.offsetX, y: e.offsetY});
} }
} }
@ -130,7 +131,7 @@ class MouseController extends Eventful {
if (!eventTool.notLeftMouse(e)) { if (!eventTool.notLeftMouse(e)) {
this._dragging = false; 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.eventTarget = this.$jmap.mapDevice['check_box'].instance;
this.handleBoundingRect(this.eventTarget); this.handleBoundingRect(this.eventTarget);
var em = this.checkEvent(e); var em = this.checkEvent(e);
@ -310,8 +311,8 @@ class MouseController extends Eventful {
const dy = originY + this.$jmap.$options.offsetY; const dy = originY + this.$jmap.$options.offsetY;
const x = dx / this.$jmap.$options.scaleRate; const x = dx / this.$jmap.$options.scaleRate;
const y = dy / 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 width = Math.abs(point1.x - point2.x) / this.$jmap.$options.scaleRate;
const height = Math.abs(point1.y - point2.y) / this.$jmap.$options.scaleRate + 10; 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 }); this.$jmap.renderCheckBox({code: 'check_box', _type: 'CheckBox', point: {x: x, y: y}, width: width, height: height });
} }
} }

View File

@ -252,7 +252,7 @@ export default class Section extends Group {
/** 区段名称 (逻辑区段名称 或 物理区段名称 是否显示)*/ /** 区段名称 (逻辑区段名称 或 物理区段名称 是否显示)*/
let tempx = x; let tempx = x;
let tempy = y; let tempy = y;
if (model.type == '01') { if (model.type == '01') { // 物理区段名称
if (style.Section.text.show) { if (style.Section.text.show) {
const opposite = style.Section.text.opposite ? -1 : 1; const opposite = style.Section.text.opposite ? -1 : 1;
tempx += traingle.getSin(style.Section.text.distance); tempx += traingle.getSin(style.Section.text.distance);
@ -275,7 +275,7 @@ export default class Section extends Group {
}); });
this.add(this.name); this.add(this.name);
} }
} else if (model.type == '02') { } else if (model.type == '02') { // 逻辑区段
if (style.Section.logicText.show) { if (style.Section.logicText.show) {
const opposite = style.Section.logicText.opposite ? -1 : 1; const opposite = style.Section.logicText.opposite ? -1 : 1;
tempx += traingle.getSin(style.Section.logicText.distance); tempx += traingle.getSin(style.Section.logicText.distance);
@ -298,7 +298,7 @@ export default class Section extends Group {
}); });
this.add(this.name); this.add(this.name);
} }
} else if (model.type == '03') { } else if (model.type == '03') { // 道岔区段
if (style.Section.switchText.show) { if (style.Section.switchText.show) {
this.name = new ETextName({ this.name = new ETextName({
zlevel: this.zlevel, zlevel: this.zlevel,
@ -318,7 +318,7 @@ export default class Section extends Group {
}); });
this.add(this.name); this.add(this.name);
} }
} else if (model.type == '04') { } else if (model.type == '04') { // 道岔计轴区段名称
if (router.currentRoute.path.startsWith('/design/usermap/map/draw') && router.currentRoute.path.endsWith('/draft')) { if (router.currentRoute.path.startsWith('/design/usermap/map/draw') && router.currentRoute.path.endsWith('/draft')) {
this.name = new ETextName({ this.name = new ETextName({
zlevel: this.zlevel, zlevel: this.zlevel,

View File

@ -20,16 +20,16 @@ class EMouse extends Group {
} }
let trainType = ''; let trainType = '';
switch (this.device.model.type) { switch (this.device.model.type) {
case '01': trainType = LangStorage.getLang() == 'en' ? 'Plan the car' : '计划车'; break; case 'PLAN': trainType = LangStorage.getLang() == 'en' ? 'Plan the car' : '计划车'; break;
case '02': trainType = LangStorage.getLang() == 'en' ? 'Head size car' : '头码车'; break; case 'HEAD': trainType = LangStorage.getLang() == 'en' ? 'Head size car' : '头码车'; break;
case '03': trainType = LangStorage.getLang() == 'en' ? 'Artificial car' : '人工车'; break; case 'MANUAL': trainType = LangStorage.getLang() == 'en' ? 'Artificial car' : '人工车'; break;
default: trainType = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break; default: trainType = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break;
} }
let text = ''; let text = '';
if (LangStorage.getLang() == 'en') { 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.targetCode ? this.device.model.targetCode : ''}\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 { } else {
text = `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\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({ this.arrowText = new Text({

View File

@ -21,9 +21,9 @@ export default class ETriangle extends Group {
points:[[model.point.x + 10 * right, model.point.y], [model.point.x, model.point.y - 6], [model.point.x, model.point.y + 6]] points:[[model.point.x + 10 * right, model.point.y], [model.point.x, model.point.y - 6], [model.point.x, model.point.y + 6]]
}, },
style: { style: {
stroke:'#FFFF00', stroke:'#00FF00',
lineWidth: 0.5, lineWidth: 0.5,
fill: '#FFFF00' fill: '#00FF00'
} }
}); });
this.add(this.angle); this.add(this.angle);

View File

@ -102,7 +102,7 @@ export default class TrainBody extends Group {
const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode
? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber) ? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber)
: model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号 : model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号
const targetCode = style.Train.trainNumber.targetCodePrefix + (model.targetCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码 const targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码
const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号 const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号
this.textTrainServer = new ETextName({ this.textTrainServer = new ETextName({
zlevel: model.zlevel, zlevel: model.zlevel,

View File

@ -18,6 +18,8 @@ export default class Train extends Group {
this.z = 40; this.z = 40;
this.size = 0; this.size = 0;
this.section = null; this.section = null;
this.nextPointIndex = 1;
this.currentAdd = 0;
this.isShowShape = true; 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.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.newScale = this.fontSize / style.Train.common.trainTextFontSize;
@ -70,7 +72,7 @@ export default class Train extends Group {
destinationStatus: model.destinationStatus, destinationStatus: model.destinationStatus,
serviceNumber: model.serviceNumber, serviceNumber: model.serviceNumber,
tripNumber: model.tripNumber, tripNumber: model.tripNumber,
targetCode: model.targetCode, destinationCode: model.destinationCode,
groupNumber: model.groupNumber, groupNumber: model.groupNumber,
directionType: model.directionType, directionType: model.directionType,
directionCode: model.directionCode, directionCode: model.directionCode,
@ -107,6 +109,7 @@ export default class Train extends Group {
scale: this.newScale scale: this.newScale
}); });
if (style.Section.trainPosition.display) {
const data = this.model.physicalCode; const data = this.model.physicalCode;
const oldmodel = store.getters['map/getDeviceByCode'](data); const oldmodel = store.getters['map/getDeviceByCode'](data);
const leftPoint = oldmodel.points[0]; const leftPoint = oldmodel.points[0];
@ -114,6 +117,20 @@ export default class Train extends Group {
const right = this.model.right == 1 ? 1 : 0; const right = this.model.right == 1 ? 1 : 0;
this.startX = leftPoint.x + (1 - right) * (rightPoint.x - leftPoint.x); this.startX = leftPoint.x + (1 - right) * (rightPoint.x - leftPoint.x);
this.startY = leftPoint.y + (1 - right) * (rightPoint.y - leftPoint.y); this.startY = leftPoint.y + (1 - right) * (rightPoint.y - leftPoint.y);
// 算出折线的长度
this.lineLength = 0;
let oldPoint = null;
oldmodel.points.forEach((point)=>{
if (oldPoint) {
const temp = Math.sqrt(
Math.pow(point.x - oldPoint.x, 2) +
Math.pow(point.y - oldPoint.y, 2),
);
this.lineLength += temp;
}
oldPoint = point;
});
// this.animatePoint = {x:this.startX, y:this.startY};
this.triangle = new ETriangle({ this.triangle = new ETriangle({
style: this.style, style: this.style,
zlevel: this.zlevel, zlevel: this.zlevel,
@ -122,6 +139,7 @@ export default class Train extends Group {
point:{x:this.startX, y:this.startY} point:{x:this.startX, y:this.startY}
}); });
this.add(this.triangle); this.add(this.triangle);
}
this.add(this.trainB); this.add(this.trainB);
this.add(this.trainL); this.add(this.trainL);
@ -138,14 +156,61 @@ export default class Train extends Group {
updateSection() { updateSection() {
const train = this.model; const train = this.model;
if (train.physicalCode && train.offsetp) { if (train.physicalCode && train.offsetp && this.triangle) {
const data = train.physicalCode; const data = train.physicalCode;
const oldmodel = store.getters['map/getDeviceByCode'](data); const oldmodel = store.getters['map/getDeviceByCode'](data);
// 待处理(多个点的问题)
// const points = train.right == 1 ? oldmodel.points : oldmodel.points.reverse();
const points = oldmodel.points;
// 目标距离
let targetDistance = Math.sqrt(
Math.pow(points[this.nextPointIndex - 1].x - points[this.nextPointIndex].x, 2) +
Math.pow(points[this.nextPointIndex - 1].y - points[this.nextPointIndex].y, 2),
);
// // 当前距离
// const currentDistance = Math.sqrt(
// Math.pow(points[this.nextPointIndex - 1].x - this.animatePoint.x, 2) +
// Math.pow(points[this.nextPointIndex - 1].y - this.animatePoint.y, 2),
// );
const currentDistance = this.lineLength * train.offsetp - this.currentAdd;
// let cureent this.lineLength * train.offsetp
// 利用运动距离与目标距离, 判断运动的点是否超过下一个目标点, 超过了就重置下一个点
if (currentDistance >= targetDistance) {
// this.animatePoint = {
// x: points[this.nextPointIndex].x,
// y: points[this.nextPointIndex].y
// };
this.nextPointIndex++;
this.currentAdd += targetDistance;
targetDistance = Math.sqrt(
Math.pow(points[this.nextPointIndex - 1].x - points[this.nextPointIndex].x, 2) +
Math.pow(points[this.nextPointIndex - 1].y - points[this.nextPointIndex].y, 2),
);
}
if (this.nextPointIndex > points.length - 1) {
const leftPoint = oldmodel.points[0]; const leftPoint = oldmodel.points[0];
const rightPoint = oldmodel.points[oldmodel.points.length - 1]; const rightPoint = oldmodel.points[oldmodel.points.length - 1];
if (this.triangle) {
this.startX = leftPoint.x + (rightPoint.x - leftPoint.x) * train.offsetp; this.startX = leftPoint.x + (rightPoint.x - leftPoint.x) * train.offsetp;
this.startY = leftPoint.y + (rightPoint.y - leftPoint.y) * train.offsetp; this.startY = leftPoint.y + (rightPoint.y - leftPoint.y) * train.offsetp;
} else {
// debugger;
// this.lineLength * train.offsetp
// if (this.currentLength > targetDistance) {
// this.currentLength = this.currentLength - targetDistance;
// this.nextPointIndex++;
// targetDistance = Math.sqrt(
// Math.pow(points[this.nextPointIndex - 1].x - points[this.nextPointIndex].x, 2) +
// Math.pow(points[this.nextPointIndex - 1].y - points[this.nextPointIndex].y, 2),
// );
// }
const rate = (this.lineLength * train.offsetp - this.currentAdd) / targetDistance;
this.startX = points[this.nextPointIndex - 1].x + (points[this.nextPointIndex].x - points[this.nextPointIndex - 1].x) * rate;
this.startY = points[this.nextPointIndex - 1].y + (points[this.nextPointIndex].y - points[this.nextPointIndex - 1].y) * rate;
// this.animatePoint.x = this.startX;
// this.animatePoint.y = this.startY;
}
const point = {x:this.startX, y:this.startY}; const point = {x:this.startX, y:this.startY};
this.triangle.point = point; this.triangle.point = point;
this.triangle.updateTriangle(point, train.right); this.triangle.updateTriangle(point, train.right);
@ -153,7 +218,6 @@ export default class Train extends Group {
this.dirty(); this.dirty();
} }
} }
}
// 恢复颜色状态 // 恢复颜色状态
recover() { recover() {

View File

@ -40,7 +40,7 @@ class TrainWindow extends Group {
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z - 1, z: this.z - 1,
shape: { shape: {
smooth: this.style.TrainWindow.trainWindowSmooth, smooth: this.style.TrainWindow.trainWindowSmooth, // 圆滑程度
points: [ points: [
[point.x - model.width / 2, point.y], [point.x - model.width / 2, point.y],
[point.x + model.width / 2, point.y], [point.x + model.width / 2, point.y],

View File

@ -51,31 +51,31 @@ export default {
menu: [], menu: [],
menuNormal: { menuNormal: {
Local: [ Local: [
{ // {
label: '区段故障解锁', // label: '',
handler: this.fault, // handler: this.faultUnlock,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK // cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
}, // },
{ // {
label: '区段激活', // label: '',
handler: this.active, // handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE // cmdType: CMD.Section.CMD_SECTION_ACTIVE
}, // },
{ // {
label: '区段切除', // label: '',
handler: this.split, // handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF // cmdType: CMD.Section.CMD_SECTION_CUT_OFF
}, // },
{ // {
label: '区段计轴预复位', // label: '',
handler: this.axlePreReset, // handler: this.axlePreReset,
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET // cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
}, // },
{ // {
label: '区段设置限速', // label: '',
handler: this.setSpeed, // handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED // cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
} // }
], ],
Center: [ Center: [
{ {
@ -172,14 +172,19 @@ export default {
}, },
operationHandler(buttonOperation, selectType) { operationHandler(buttonOperation, selectType) {
switch (buttonOperation) { 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; break;
} }
case OperationEvent.Signal.guide.button.operation: { // case OperationEvent: {
// // //
break; // break;
} // }
} }
}, },
// // // //
@ -205,20 +210,19 @@ export default {
// }); // });
// }, // },
// //
fault() { faultUnlock(selectType) {
const operate = { const operate = {
start: true, start: true,
code: this.selected.code,
operation: OperationEvent.Section.fault.menu.operation, operation: OperationEvent.Section.fault.menu.operation,
param: { param: {
sectionCode: `${this.selected.code}` sectionCode: selectType.code
} },
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); 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() { 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 = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,

View File

@ -218,6 +218,13 @@ export default {
} }
case OperationEvent.Signal.reopenSignal.button.operation: { case OperationEvent.Signal.reopenSignal.button.operation: {
// //
if (selectType.greenOpen) {
this.$refs.noticeInfo.doShow({}, `信号机[${selectType.name}(${selectType.code})]已开启,无需重开信号机`);
} else {
//
this.reopenSignalByRoute(selectType);
//
}
break; break;
} }
case OperationEvent.Signal.guide.button.operation: { case OperationEvent.Signal.guide.button.operation: {
@ -335,6 +342,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() { reopenSignal() {
const operate = { const operate = {

View File

@ -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() { // cancelSpeed() {
const operate = { // const operate = {
start: true, // start: true,
send: true, // send: true,
code: this.selected.code, // code: this.selected.code,
operation: OperationEvent.Switch.cancelSpeed.menu.operation, // operation: OperationEvent.Switch.cancelSpeed.menu.operation,
param: { // param: {
switchCode: `${this.selected.code}` // switchCode: `${this.selected.code}`
} // }
}; // };
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { // this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
if (valid) { // if (valid) {
const tempData = response.data; // const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData); // this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
} // }
}); // });
}, // },
// //
split() { split() {

View File

@ -41,7 +41,7 @@ export default {
}, },
data() { data() {
return { return {
unfold: false, unfold: true,
tempData: [], tempData: [],
tableStyle: { tableStyle: {
'border-bottom': 'none', 'border-bottom': 'none',
@ -105,7 +105,8 @@ export default {
const operate = { const operate = {
over: true, over: true,
operation: eachCmd.operation.code, operation: eachCmd.operation.code,
cmdType: eachCmd.operation.cmdType cmdType: eachCmd.operation.cmdType,
param: eachCmd.operation.param //
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false; this.loading = false;

View File

@ -49,13 +49,13 @@ export default {
}, },
{ {
label: '开放自动进路', label: '开放自动进路',
handler: this.atsAutoControl, handler: this.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
}, },
{ {
label: '关闭自动进路', label: '关闭自动进路',
handler: this.humanControl, handler: this.singalCancelPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
}, },
{ {
label: '终端信号封锁', label: '终端信号封锁',
@ -307,24 +307,45 @@ export default {
arrangementRoute() { arrangementRoute() {
const step = { const step = {
start: true, start: true,
// over:true,
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.arrangementRoute.menu.operation, operation: OperationEvent.Signal.arrangementRoute.menu.operation,
param: { param: {
signalCode: `${this.selected.code}` signalCode: `${this.selected.code}`
}, }
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true}); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true});
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.arrangementRoute.menu.operation, name: '始端/终端选择', cmdType:CMD.Signal.CMD_SIGNAL_SET_ROUTE}}); const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
const routeCode = this.checkRoutes(routes);
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: {
code: OperationEvent.Signal.arrangementRoute.menu.operation,
name: '始端/终端选择',
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
param: {
routeCode: routeCode
}
}
});
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(step); this.$refs.noticeInfo.doShow(step);
}); });
}, },
checkRoutes(routes) {
const route = routes.filter(route => {
return route.greenOpen;
});
return route[0].code;
},
// //
guide() { guide() {
const step = { const step = {
@ -334,7 +355,7 @@ export default {
operation: OperationEvent.Signal.guide.menu.operation, operation: OperationEvent.Signal.guide.menu.operation,
param: { param: {
signalCode: `${this.selected.code}` signalCode: `${this.selected.code}`
}, }
// cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE // cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
@ -353,7 +374,7 @@ export default {
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation, operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
param: { param: {
signalCode: `${this.selected.code}` signalCode: `${this.selected.code}`
}, }
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE // cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
}; };
@ -373,7 +394,7 @@ export default {
operation: OperationEvent.Signal.lock.menu.operation, operation: OperationEvent.Signal.lock.menu.operation,
param: { param: {
signalCode: `${this.selected.code}` signalCode: `${this.selected.code}`
}, }
// cmdType: CMD.Signal.CMD_SIGNAL_BLOCK // cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -394,7 +415,7 @@ export default {
operation: OperationEvent.Signal.unlock.menu.operation, operation: OperationEvent.Signal.unlock.menu.operation,
param: { param: {
signalCode: `${this.selected.code}` signalCode: `${this.selected.code}`
}, }
// cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK // cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {

View File

@ -525,7 +525,7 @@ export default {
this.$refs.routerCommand.doShow(step, this.selected, '是否执行引导命令'); this.$refs.routerCommand.doShow(step, this.selected, '是否执行引导命令');
} }
}); });
}, }
} }
}; };
</script> </script>

View File

@ -7,7 +7,7 @@ export function getBaseUrl() {
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://192.168.8.125:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛automaticRouteButtonList // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛automaticRouteButtonList

View File

@ -1,24 +1,24 @@
<template> <template>
<div> <div>
<div class="standACS_title">会展中心站门禁站台层</div> <div class="standACS_title">{{ $route.query.stationName }}门禁站台层</div>
<div> <div>
<iscsSystem ref="iscsPlate" :widthCanvas="990" /> <iscsSystem ref="iscsPlate" :width-canvas="990" :canvas-height="500" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iscsSystem from "../canvas/iscsCanvas"; import iscsSystem from '../canvas/iscsCanvas';
export default { export default {
components: { components: {
iscsSystem iscsSystem
}, },
data() { data() {
return { return {
mes: "1111" mes: '1111'
}; };
}, },
mounted() { mounted() {
this.$refs.iscsPlate.show("61"); this.$refs.iscsPlate.show('61');
}, },
methods: {} methods: {}
}; };

View File

@ -1,24 +1,24 @@
<template> <template>
<div> <div>
<div class="stationHall_title">会展中心站门禁站厅层</div> <div class="stationHall_title">{{ $route.query.stationName }}门禁站厅层</div>
<div> <div>
<iscsSystem ref="iscsPlate" :widthCanvas="990" /> <iscsSystem ref="iscsPlate" :width-canvas="990" :canvas-height="600" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iscsSystem from "../canvas/iscsCanvas"; import iscsSystem from '../canvas/iscsCanvas';
export default { export default {
components: { components: {
iscsSystem iscsSystem
}, },
data() { data() {
return { return {
mes: "1111" mes: '1111'
}; };
}, },
mounted() { mounted() {
this.$refs.iscsPlate.show("62"); this.$refs.iscsPlate.show('62');
}, },
methods: {} methods: {}
}; };

View File

@ -1,24 +1,24 @@
<template> <template>
<div> <div>
<div class="afc_title">会展中心站售检票</div> <div class="afc_title">{{ $route.query.stationName }}售检票</div>
<div> <div>
<iscsSystem ref="iscsPlate" :widthCanvas="990" /> <iscsSystem ref="iscsPlate" :width-canvas="1200" :canvas-height="650" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iscsSystem from "../canvas/iscsCanvas"; import iscsSystem from '../canvas/iscsCanvas';
export default { export default {
components: { components: {
iscsSystem iscsSystem
}, },
data() { data() {
return { return {
mes: "1111" mes: '1111'
}; };
}, },
mounted() { mounted() {
this.$refs.iscsPlate.show("51"); this.$refs.iscsPlate.show('51');
}, },
methods: {} methods: {}
}; };

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="control-bas-box"> <div class="control-bas-box">
<div class="title-name">会展中心站大系统模式表</div> <div class="title-name">{{ $route.query.stationName }}大系统模式表</div>
<div class="control-bas"> <div class="control-bas">
<el-table :data="tableData" :header-row-style="tableTitleStyle" :cell-style="rowStyle" :span-method="objectSpanMethod" style="float: left;"> <el-table :data="tableData" :header-row-style="tableTitleStyle" :cell-style="rowStyle" :span-method="objectSpanMethod" style="float: left;">
<el-table-column label="日期" width="300"> <el-table-column label="日期" width="300">

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="permission-box"> <div class="permission-box">
<div class="title-name">会展中心站控制权移交</div> <div class="title-name">{{ $route.query.stationName }}控制权移交</div>
<div class="content-box"> <div class="content-box">
<div class="content-top"> <div class="content-top">
<div class="content-left"> <div class="content-left">

View File

@ -28,6 +28,10 @@ export default {
widthCanvas: { widthCanvas: {
type: Number, type: Number,
default: 1200 default: 1200
},
canvasHeight: {
type: Number,
default: 500
} }
}, },
data() { data() {
@ -55,18 +59,18 @@ export default {
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'canvasWidth', // 'canvasWidth',
'canvasHeight' // 'canvasHeight'
]), ]),
iscsId() { iscsId() {
return ['iscs', (Math.random().toFixed(5)) * 100000].join('_'); 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: { watch: {
'$store.state.config.canvasSizeCount': function (val) { '$store.state.config.canvasSizeCount': function (val) {
@ -98,8 +102,8 @@ export default {
dom: document.getElementById(this.iscsId), dom: document.getElementById(this.iscsId),
config: { config: {
renderer: 'canvas', renderer: 'canvas',
width: this.width, width: this.canvasWidth,
height: this.height height: this.canvasHeight
}, },
options: { options: {
scaleRate: 1, scaleRate: 1,
@ -167,9 +171,9 @@ export default {
}, },
reSize() { reSize() {
this.$nextTick(() => { this.$nextTick(() => {
this.width = this.$store.state.config.width; // this.width = this.$store.state.config.width;
this.height = this.$store.state.config.height; // this.height = this.$store.state.config.height;
this.$iscs && this.$iscs.resize({ width: this.width, height: this.height }); // this.$iscs && this.$iscs.resize({ width: this.width, height: this.height });
}); });
}, },
back() { back() {

View File

@ -6,9 +6,9 @@
<div class="cctv-box-top-lefttop">选择显示终端</div> <div class="cctv-box-top-lefttop">选择显示终端</div>
<div class="cctv-box-top-left1"> <div class="cctv-box-top-left1">
<div class="each-cctv-box-top-btn">单画面</div> <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 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 class="each-cctv-box-top-btn">大屏</div>
</div> </div>
<div class="cctv-box-top-right1"> <div class="cctv-box-top-right1">
@ -43,16 +43,16 @@
v-for="item in descriptionList" v-for="item in descriptionList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
</el-option> />
</el-select> </el-select>
</div> </div>
<div style="margin-top: 20px;position: relative;left: 30px; width: 230px"> <div style="margin-top: 20px;position: relative;left: 30px; width: 230px">
<el-input <el-input
v-model="textarea"
type="textarea" type="textarea"
:rows="6" :rows="6"
v-model="textarea"> />
</el-input>
</div> </div>
<div style="position: relative;left: 30px; width: 230px; display: flex; justify-content: space-between;margin-top: 10px"> <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>
@ -65,17 +65,17 @@
<div class="cctv-box-top-right-btn1" /> <div class="cctv-box-top-right-btn1" />
<div class="cctv-box-top-right-btn1 cctv-btn-gray" /> <div class="cctv-box-top-right-btn1 cctv-btn-gray" />
<div> <div>
<div class="cctv-box-top-right-btn2"></div> <div class="cctv-box-top-right-btn2" />
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div> <div class="cctv-box-top-right-btn2 cctv-btn-gray" />
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div> <div class="cctv-box-top-right-btn2 cctv-btn-gray" />
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div> <div class="cctv-box-top-right-btn2 cctv-btn-gray" />
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div> <div class="cctv-box-top-right-btn2 cctv-btn-gray" />
<div class="cctv-box-top-right-btn2" style="width: 40px;"></div> <div class="cctv-box-top-right-btn2" style="width: 40px;" />
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div> <div class="cctv-box-top-right-btn2 cctv-btn-gray" />
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div> <div class="cctv-box-top-right-btn2 cctv-btn-gray" />
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div> <div class="cctv-box-top-right-btn2 cctv-btn-gray" />
<div class="cctv-box-top-right-btn2 cctv-btn-gray"></div> <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-btn2" style="margin-right: 0" />
</div> </div>
<div class="cctv-box-top-right-btn1" /> <div class="cctv-box-top-right-btn1" />
<div class="cctv-box-top-right-btn1 cctv-btn-gray" /> <div class="cctv-box-top-right-btn1 cctv-btn-gray" />
@ -102,7 +102,7 @@
<div id="cctv-43" class="cctv-box-content-btn" @click="changeCCTV('43')">云台</div> <div id="cctv-43" class="cctv-box-content-btn" @click="changeCCTV('43')">云台</div>
</div> </div>
<div class="cctv-box-content-draw"> <div class="cctv-box-content-draw">
<iscsSystem ref="iscsPlate" :widthCanvas="1490" /> <iscsSystem ref="iscsPlate" :width-canvas="1490" :canvas-height="400" />
</div> </div>
</div> </div>
<div class="cctv-box-bottom"> <div class="cctv-box-bottom">

View File

@ -2,7 +2,7 @@
<div class="edit-cctv-box"> <div class="edit-cctv-box">
<div class="title-name">CCTV时序编辑</div> <div class="title-name">CCTV时序编辑</div>
<div class="edit-cctv-top"> <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-content">
<div class="edit-cctv-top-contentL"> <div class="edit-cctv-top-contentL">
<el-table <el-table
@ -61,7 +61,7 @@
</div> </div>
</div> </div>
<div class="edit-cctv-bottom"> <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-content">
<div class="edit-cctv-bottom-contentL"> <div class="edit-cctv-bottom-contentL">
<div class="edit-cctv-bottom-contentLL"> <div class="edit-cctv-bottom-contentLL">
@ -80,13 +80,13 @@
</div> </div>
<div class="edit-cctv-bottom-contentLR"> <div class="edit-cctv-bottom-contentLR">
<div class="edit-cctv-bottom-contentLRTitle">位置描述</div> <div class="edit-cctv-bottom-contentLRTitle">位置描述</div>
<div class="edit-cctv-bottom-contentLRGroup"></div> <div class="edit-cctv-bottom-contentLRGroup" />
</div> </div>
</div> </div>
<div class="edit-cctv-bottom-contentR"> <div class="edit-cctv-bottom-contentR">
<div class="edit-cctv-bottom-contentRL"> <div class="edit-cctv-bottom-contentRL">
<div class="edit-cctv-bottom-contentRLlabel">显示时间</div> <div class="edit-cctv-bottom-contentRLlabel">显示时间</div>
<div class="edit-cctv-bottom-contentRLtext"></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 class="edit-cctv-bottom-contentRLBtn1">移除</div>
<div class="edit-cctv-bottom-contentRLBtn1">全部删除</div> <div class="edit-cctv-bottom-contentRLBtn1">全部删除</div>
@ -98,7 +98,7 @@
</div> </div>
<div class="edit-cctv-bottom-contentRCT2"> <div class="edit-cctv-bottom-contentRCT2">
<div class="edit-cctv-bottom-contentRCT2title">序列描述</div> <div class="edit-cctv-bottom-contentRCT2title">序列描述</div>
<div class="edit-cctv-bottom-contentRCT2text"></div> <div class="edit-cctv-bottom-contentRCT2text" />
</div> </div>
<div class="edit-cctv-bottom-contentRContent"> <div class="edit-cctv-bottom-contentRContent">
<el-table <el-table
@ -132,7 +132,7 @@
</div> </div>
<div class="edit-cctv-bottom-foot"> <div class="edit-cctv-bottom-foot">
<div class="edit-cctv-bottom-footL">信息提示</div> <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-footR">
<div class="edit-cctv-bottom-footRbtn">车站时序</div> <div class="edit-cctv-bottom-footRbtn">车站时序</div>
</div> </div>

View File

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<div class="stand_title">会展中心站火灾报警站台报警</div> <div class="stand_title">{{ $route.query.stationName }}火灾报警站台报警</div>
<div class=""> <div class="">
<iscsSystem ref="iscsPlate" :widthCanvas="1520" /> <iscsSystem ref="iscsPlate" :width-canvas="1520" :canvas-height="500" />
</div> </div>
</div> </div>
</template> </template>
@ -23,7 +23,7 @@ export default {
}, },
methods: { methods: {
}, }
}; };
</script> </script>

View File

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<div class="stationHall_title">会展中心站火灾报警站厅报警</div> <div class="stationHall_title">{{ $route.query.stationName }}火灾报警站厅报警</div>
<div class=""> <div class="">
<iscsSystem ref="iscsPlate" :widthCanvas="1300" /> <iscsSystem ref="iscsPlate" :width-canvas="1300" :canvas-height="650" />
</div> </div>
</div> </div>
</template> </template>
@ -23,7 +23,7 @@ export default {
}, },
methods: { methods: {
}, }
}; };
</script> </script>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class=""> <div class="">
系统报警 {{ $route.query.stationName }}系统报警
</div> </div>
</template> </template>

View File

@ -28,11 +28,11 @@
<div class="secondary-title">实时信息显示内容</div> <div class="secondary-title">实时信息显示内容</div>
<div class="information-context-box"> <div class="information-context-box">
<el-input <el-input
v-model="addModel.infoContent"
type="textarea" type="textarea"
:rows="4" :rows="4"
placeholder="请输入内容" placeholder="请输入内容"
v-model="addModel.infoContent"> />
</el-input>
</div> </div>
</div> </div>
</el-col> </el-col>
@ -47,8 +47,8 @@
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<div style="display: inline;">名称</div> <div style="display: inline;">名称</div>
<input class="pis-dialog-input" style="width: 550px;" v-model="addModel.infoTitle"/> <input v-model="addModel.infoTitle" class="pis-dialog-input" style="width: 550px;">
<input v-show="addModel.infoType !== 'emergency'" class="pis-dialog-input" style="width: 140px;" v-model="addModel.infoTime"/> <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 v-show="addModel.infoType !== 'emergency'" style="display: inline;"></div>
</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="secondary-title" style="margin-top: 10px">{{ this.message[this.addModel.infoType].title + '内容显示' }}</div>
@ -71,8 +71,8 @@
v-for="item in infoList" v-for="item in infoList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
</el-option> />
</el-select> </el-select>
<div v-show="addModel.infoType === 'realTime'" class="pis-button">储存</div> <div v-show="addModel.infoType === 'realTime'" class="pis-button">储存</div>
<div class="button-group-content" :style="{left: addModel.infoType ==='realTime'?'300px':'550px'}"> <div class="button-group-content" :style="{left: addModel.infoType ==='realTime'?'300px':'550px'}">
@ -90,7 +90,7 @@
</el-col> </el-col>
<el-col :span="21"> <el-col :span="21">
<el-form-item :prop="description" label-width="0"> <el-form-item :prop="description" label-width="0">
<input v-model="form.description" style="width:600px;" /> <input v-model="form.description" style="width:600px;">
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -103,16 +103,18 @@
v-model="form.startDate" v-model="form.startDate"
type="date" type="date"
size="mini" size="mini"
placeholder="选择日期"/> placeholder="选择日期"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :prop="endTime" label="结束时间"> <el-form-item :prop="endTime" label="结束时间">
<el-time-picker <el-time-picker
arrow-control
v-model="form.endTime" v-model="form.endTime"
arrow-control
size="mini" size="mini"
placeholder="选择时间"/> placeholder="选择时间"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -120,8 +122,8 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :prop="startTime" label="开始时间"> <el-form-item :prop="startTime" label="开始时间">
<el-time-picker <el-time-picker
arrow-control
v-model="form.startTime" v-model="form.startTime"
arrow-control
size="mini" size="mini"
placeholder="选择时间" placeholder="选择时间"
/> />
@ -133,7 +135,8 @@
v-model="form.endDate" v-model="form.endDate"
type="date" type="date"
size="mini" size="mini"
placeholder="选择日期"/> placeholder="选择日期"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -141,8 +144,8 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :prop="durationTime" label="延续时间"> <el-form-item :prop="durationTime" label="延续时间">
<el-time-picker <el-time-picker
arrow-control
v-model="form.durationTime" v-model="form.durationTime"
arrow-control
size="mini" size="mini"
placeholder="选择时间" placeholder="选择时间"
/> />
@ -310,7 +313,7 @@ export default {
this.showRealTimeInfo = item.content; this.showRealTimeInfo = item.content;
} }
} }
} };
</script> </script>
<style scoped> <style scoped>

View File

@ -37,7 +37,7 @@
<div class="screen_station_name">{{ station.stationName }}</div> <div class="screen_station_name">{{ station.stationName }}</div>
</div> </div>
<div v-if="station.children&&station.children.length>0"> <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-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 v-if="child.status==='default'" class="button_default_content">
<div class="button_default" :style="{background:selectedAreaList.includes(station.stationName + '-' + index)?'#2EFF74':'#CDCDCD'}" /> <div class="button_default" :style="{background:selectedAreaList.includes(station.stationName + '-' + index)?'#2EFF74':'#CDCDCD'}" />
</div> </div>

View File

@ -45,7 +45,7 @@
<div class="time_preview_footer"> <div class="time_preview_footer">
<div class="preview_footer_top">操作</div> <div class="preview_footer_top">操作</div>
<div class="preview_footer_content"> <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_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_back1">激活</div>

View File

@ -1,24 +1,24 @@
<template> <template>
<div> <div>
<div class="psd_title">会展中心站屏蔽门</div> <div class="psd_title">{{ $route.query.stationName }}屏蔽门</div>
<div> <div>
<iscsSystem ref="iscsPlate" :widthCanvas="1490" /> <iscsSystem ref="iscsPlate" :width-canvas="1490" :canvas-height="800" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import iscsSystem from "../canvas/iscsCanvas"; import iscsSystem from '../canvas/iscsCanvas';
export default { export default {
components: { components: {
iscsSystem iscsSystem
}, },
data() { data() {
return { return {
mes: "1111" mes: '1111'
}; };
}, },
mounted() { mounted() {
this.$refs.iscsPlate.show("31"); this.$refs.iscsPlate.show('31');
}, },
methods: {} methods: {}
}; };

View File

@ -34,7 +34,8 @@ export default {
return { return {
selectIndex: 0, selectIndex: 0,
selectChildIndex: -1, selectChildIndex: -1,
selectStationIndex: -1, selectStationIndex: 0,
type: '',
currentSystem: 'center', currentSystem: 'center',
systemList: [ systemList: [
{ {
@ -275,16 +276,19 @@ export default {
this.selectIndex = index; this.selectIndex = index;
this.selectChildIndex = 0; this.selectChildIndex = 0;
if (item.children.length) { 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) { // selectChildren(item, index) { //
this.selectChildIndex = 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) { // selectStation(item, index) { //
this.selectStationIndex = 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() { back() {
this.$router.push({ path: `/design/home` }); this.$router.push({ path: `/design/home` });

View File

@ -164,11 +164,11 @@ export default {
}; };
// //
const path = window.location.href; const path = window.location.href;
let mouseWheelFlag = false; const mouseWheelFlag = true;
let previewOrMapDraw = false; let previewOrMapDraw = false;
if (path.includes('design/userlist/map/draw') || path.includes('design/usermap/map/draw')) { // if (path.includes('design/userlist/map/draw') || path.includes('design/usermap/map/draw')) {
mouseWheelFlag = true; // mouseWheelFlag = true;
} // }
if (path.indexOf('map/draw') !== -1 || path.indexOf('mapPreviewNew') !== -1) { if (path.indexOf('map/draw') !== -1 || path.indexOf('mapPreviewNew') !== -1) {
previewOrMapDraw = true; previewOrMapDraw = true;
} }

View File

@ -14,12 +14,50 @@
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form ref="formModel" :model="formModel" label-width="200px" size="mini" :rules="formRules">
<el-form-item label="区段编码:" prop="modelList">
<el-select v-model="formModel.modelList" filterable multiple>
<el-option
v-for="item in sectionList"
:key="item.code"
:label="item.name + '(' + item.code + ')'"
:value="item.code"
/>
</el-select>
<el-button
:type="field === 'sectionTypeCode' ? 'danger' : 'primary'"
size="small"
@click="hover('sectionTypeCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="区段名称位置:" prop="trainPosType">
<el-select
v-model="formModel.trainPosType"
placeholder="请选择"
:clearable="true"
>
<el-option
v-for="option in positionTypes"
:key="option.type"
:label="option.name"
:value="option.type"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" size="big" @click="setPositionType">{{ $t('global.set') }}</el-button>
</el-button-group>
</el-form-item>
</el-form>
</el-scrollbar> </el-scrollbar>
</div> </div>
</template> </template>
<script> <script>
import { deepAssign } from '@/utils/index'; import { deepAssign } from '@/utils/index';
import { mapGetters } from 'vuex';
export default { export default {
name: 'BatchSettings', name: 'BatchSettings',
props: { props: {
@ -28,6 +66,12 @@ export default {
default: function() { default: function() {
return []; return [];
} }
},
field: {
type: Object,
default: function () {
return '';
}
} }
}, },
data() { data() {
@ -36,10 +80,34 @@ export default {
leftDistance: 0, leftDistance: 0,
rightDistance: 0 rightDistance: 0
}, },
tipInfoList: [] formModel: {
modelList: [],
trainPosType: ''
},
positionTypes: [
{ name: '上方', type: '01' },
{ name: '下方', type: '02' }
],
tipInfoList: [],
formRules: {
trainPosType: [
{ required: true, message: '请选择', trigger: 'change' }
],
modelList: [
{ required: true, message: '请选择', trigger: 'change' }
]
}
}; };
}, },
computed: {
...mapGetters('map', [
'sectionList'
])
},
methods:{ methods:{
hover(filed) {
this.$emit('hover', filed);
},
batchSettings() { batchSettings() {
this.tipInfoList = []; this.tipInfoList = [];
const models = []; const models = [];
@ -63,6 +131,20 @@ export default {
this.$message.success(this.$t('tip.stopPointOffsetTip')); this.$message.success(this.$t('tip.stopPointOffsetTip'));
} }
} }
},
setPositionType() {
const models = [];
this.$refs['formModel'].validate((valid) => {
if (valid) {
this.formModel.modelList.forEach(sectionCode => {
const model = deepAssign({}, this.$store.getters['map/getDeviceByCode'](sectionCode) || {});
model.trainPosType = this.formModel.trainPosType;
models.push(model);
});
this.$emit('updateMapModel', models, 'five');
this.$refs.formModel.resetFields(); //
}
});
} }
} }
}; };

View File

@ -24,7 +24,7 @@
<logic-block ref="logicBlock" :edit-model="editModel" @updateMapModel="updateMapModel" /> <logic-block ref="logicBlock" :edit-model="editModel" @updateMapModel="updateMapModel" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.batchSettings')" name="five"> <el-tab-pane class="view-control" :label="$t('map.batchSettings')" name="five">
<batch-settings ref="batchSettings" :section-list="sectionList" @updateMapModel="updateMapModel" @tipInfoHandle="tipInfoHandle" /> <batch-settings ref="batchSettings" :field="field" :section-list="sectionList" @hover="hover" @updateMapModel="updateMapModel" @tipInfoHandle="tipInfoHandle" />
</el-tab-pane> </el-tab-pane>
<tip-info ref="tipInfo" :tip-info-list="tipInfoList" /> <tip-info ref="tipInfo" :tip-info-list="tipInfoList" />
</el-tabs> </el-tabs>
@ -453,6 +453,11 @@ export default {
this.activeName = 'second'; this.activeName = 'second';
this.field = ''; this.field = '';
this.$emit('fieldSelect', ''); this.$emit('fieldSelect', '');
} else if (this.field.toUpperCase() === 'sectionTypeCode'.toUpperCase()) {
this.$refs.batchSettings.formModel.modelList.push(selected.code);
this.activeName = 'five';
// this.field = '';
// this.$emit('fieldSelect', '');
} }
} }
}, },