This commit is contained in:
sunzhenyu 2021-06-16 18:27:19 +08:00
commit 0879173066
54 changed files with 723 additions and 292 deletions

View File

@ -497,3 +497,11 @@ export function updateRunlevelDistance(mapId) {
});
}
// 更新模板运行图的信息
export function updateTemplateRunPlan (data) {
return request({
url: `/api/runPlan/template/update`,
method: 'put',
data
});
}

View File

@ -228,6 +228,23 @@ export function handlerIbpEvent(group, button, stationCode, buttonCode) {
});
}
/** 处理ibp盘事件(按下) */
export function handleIbpPress(group, stationCode, buttonCode) {
return request({
url: `/simulation/${group}/ibp/press/${stationCode}/${buttonCode}`,
method: 'put'
})
}
/** 处理ibp盘事件(松开) */
export function handleIbpRelease(group, stationCode, buttonCode) {
return request({
url: `/simulation/${group}/ibp/release/${stationCode}/${buttonCode}`,
method: 'put'
})
}
/** 预览脚本仿真(新版)*/
export function scriptDraftRecordNotifyNew(scriptId) {
return request({

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -55,6 +55,7 @@ export default {
publisherId: 'Publisher Id',
publishTime: 'Time',
publishVersion: 'Version',
publishDescription:'Description',
lessonDeleteBtn: 'Delete',
durationMinutes: ' minutes',
copyRunPlan: 'Copy run plan',

View File

@ -157,6 +157,7 @@ export default {
strLengthNotExceed50: 'No more than 50 characters',
pleaseEnterMapName: 'Please enter a map name',
pleaseEnterDescription:'Please enter description',
pleaseChooseSkinCode: 'Please choose skin style',
pleaseChooseLineCode:'Please Choose line type',
pleaseSelectMapSource: 'Please select the map source',

View File

@ -57,6 +57,7 @@ export default {
addEveryRunjihuaSuccess: '加载计划创建通用排班计划成功!',
publisherId: '发布人id',
publishTime: '时间',
publishDescription:'描述',
publishVersion: '版本',
lessonDeleteBtn: '删除',
durationMinutes: '分钟',

View File

@ -156,6 +156,7 @@ export default {
pleaseSelectCity: '请选择城市',
pleaseEnterMapName: '请输入地图名称',
pleaseEnterDescription:'请输入描述',
pleaseChooseSkinCode: '请选择皮肤风格',
pleaseChooseLineCode:'请选择线路类型',
pleaseSelectMapSource: '请选择地图来源',

View File

@ -17,11 +17,11 @@ deviceRender[deviceType.SquareButton] = {
};
/** WarnButton渲染配置*/
deviceRender[deviceType.WarnButton] = {
_type: deviceType.WarnButton,
zlevel: 1,
z: 4
};
// deviceRender[deviceType.WarnButton] = {
// _type: deviceType.WarnButton,
// zlevel: 1,
// z: 4
// };
/** Arrow渲染配置*/
deviceRender[deviceType.Arrow] = {

View File

@ -1,18 +1,18 @@
const deviceType = {
IbpText: 'IbpText',
SquareButton: 'SquareButton',
Arrow: 'Arrow',
TipBox: 'TipBox',
SquareButton: 'SquareButton', // 方形按钮
Arrow: 'Arrow', // 箭头
TipBox: 'TipBox', // 提示框
Background: 'Background',
CircularLamp: 'CircularLamp',
CircularLamp: 'CircularLamp', // 圆形灯
IbpLine: 'IbpLine',
AppendageBox: 'AppendageBox',
Alarm: 'Alarm',
Elevator: 'Elevator',
Key: 'Key',
TeleTerminal: 'TeleTerminal',
Clock: 'Clock',
RotateTip: 'RotateTip',
AppendageBox: 'AppendageBox', // 扶梯框
Alarm: 'Alarm', // 蜂鸣器
Elevator: 'Elevator', // 电梯
Key: 'Key', // 钥匙
TeleTerminal: 'TeleTerminal', // 电话端子
Clock: 'Clock', // 数字时钟
RotateTip: 'RotateTip', // 旋转提示
CheckBox: 'CheckBox'
};

View File

@ -8,6 +8,7 @@ import zrender from 'zrender';
import localStore from 'storejs';
import Options from './options';
import MouseController from './mouseController';
import KeyboardController from './keyboardController';
import Painter from './painter';
import deviceType from './constant/deviceType';
import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser';
@ -22,7 +23,7 @@ class IbpPan {
this.methods = opts.methods;
// 鼠标事件
this.events = { __Pan: 'pan', Selected: 'selected', MouseDown: 'mouseDown', Contextmenu: 'contextmenu'};
this.events = { __Pan: 'pan', Selected: 'selected', MouseDown: 'mouseDown', MouseUp: 'mouseUp', Contextmenu: 'contextmenu', Keyboard: 'keyboard'};
// 设备数据
this.ibpDevice = {};
@ -41,8 +42,10 @@ class IbpPan {
this.$ibpZr = zrender.init(opts.dom, Object.assign({ renderer, devicePixelRatio, width, height }, opts.config));
this.$options = new Options(Object.assign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {})); // 缩放
this.$mouseController = new MouseController(this);
this.$keyboardController = new KeyboardController(this);
this.$mouseController.enable();
this.$keyboardController.enable();
this.$painter = new Painter(this);
this.$painter.updateZrSize({width: this.$ibpZr.getWidth(), height: this.$ibpZr.getHeight()});
@ -196,13 +199,11 @@ class IbpPan {
}
setDeviceStatus(val) {
const deviceList = Object.values(this.ibpDevice);
deviceList.forEach(elem =>{
for (var key in val) {
const mean = elem.model.mean || '';
if (mean.toUpperCase() === key.toUpperCase()) {
const state = {};
state[key] = val[key];
elem.instance.setStatus(state);
deviceList.forEach(device =>{
for (var key in val.statusMap) {
if (device.model.code === key) {
const state = {...val.statusMap[key]}
device.instance.setStatus instanceof Function && device.instance.setStatus(state);
}
}
});
@ -285,6 +286,7 @@ class IbpPan {
this.clear();
this.$mouseController.dispose();
this.$keyboardController.disable();
this.$ibpZr && zrender.dispose(this.$ibpZr);
this.$painter.dispose();
}
@ -299,6 +301,9 @@ class IbpPan {
case this.events.MouseDown:
this.$mouseController.on(this.events.MouseDown, cb, context);
break;
case this.events.MouseUp:
this.$mouseController.on(this.events.MouseUp, cb, context);
break;
case this.events.Contextmenu:
this.$mouseController.on(this.events.Contextmenu, cb, context);
break;
@ -308,6 +313,9 @@ class IbpPan {
case this.events.__Pan:
this.$mouseController.on(this.events.__Pan, this.optionsHandler);
break;
case this.events.Keyboard:
this.$keyboardController.on(this.events.Keyboard, cb, context);
break;
}
}
}
@ -322,6 +330,9 @@ class IbpPan {
case this.events.MouseDown:
this.$mouseController.off(this.events.MouseDown, cb);
break;
case this.events.MouseUp:
this.$mouseController.off(this.events.MouseUp, cb);
break;
case this.events.Contextmenu:
this.$mouseController.off(this.events.Contextmenu, cb);
break;
@ -331,6 +342,9 @@ class IbpPan {
case this.events.__Pan:
this.$mouseController.off(this.events.__Pan, cb);
break;
case this.events.Keyboard:
this.$keyboardController.off(this.events.Keyboard, cb);
break;
}
}
}

View File

@ -0,0 +1,33 @@
import Eventful from "zrender/src/mixin/Eventful";
export default class keyboardController extends Eventful {
constructor(ibp) {
super();
this.$ibp = ibp;
this.$zr = ibp.getZr();
this.events = ibp.getEvents();
this.initHandler(this.$zr);
}
initHandler(zr) {
if (zr) {
let keyActionHandler = this.keyAction.bind(this);
this.enable = (opt = {}) => {
window.addEventListener("keyup", keyActionHandler, false);
window.addEventListener("keydown", keyActionHandler, false);
};
this.disable = () => {
window.removeEventListener("keyup", keyActionHandler, false);
window.removeEventListener("keydown", keyActionHandler, false);
};
}
}
keyAction(e) {
if (!e.repeat) {
this.trigger(this.events.Keyboard, e);
}
}
}

View File

@ -154,7 +154,7 @@ class MouseController extends Eventful {
if (this.eventTarget.grouper) {
if (this._target && this._target._subType == 'buttonImag') {
// this.targetView = this.checkEvent(e);
this._targetView && this._targetView.eventTarget.close();
this._targetView && this._targetView.eventTarget.release();
this.boundingRect = {};
}
this._target = null;
@ -163,6 +163,7 @@ class MouseController extends Eventful {
this.eventTarget = '';
this._dragging = false;
this.deviceList = [];
this.trigger(this.events.MouseUp, new EventModel(e));
}
contextmenu(e) {
@ -231,10 +232,10 @@ class MouseController extends Eventful {
} else {
this.$ibp.deleteCheckBox('check_box');
}
if (this.eventTarget.grouper) {
if (this.eventTarget && this.eventTarget.grouper) {
if (e.target._subType == 'buttonImag') {
this.targetView = this.checkEvent(e);
this.targetView.eventTarget.open();
this.targetView.eventTarget.press();
this._target = e.target;
this._targetView = this.targetView;
this.boundingRect = this.eventTarget.grouper.getBoundingRect();
@ -272,7 +273,7 @@ class MouseController extends Eventful {
const x = e.event.x + this.$ibp.$options.offsetX;
const y = e.event.y + this.$ibp.$options.offsetY;
if (!(x <= this.boundingRect.x2 && x >= this.boundingRect.x1 && y <= this.boundingRect.y2 && y >= this.boundingRect.y1)) {
this.targetView.eventTarget.close();
this.targetView.eventTarget.release();
}
}
if (!this._moveOnMouseMove || !this._dragging || !this.isAllowDragging) {

View File

@ -46,4 +46,14 @@ export default class alarm extends Group {
this.model.point.x+=dx;
this.model.point.y+=dy;
}
setStatus(state) {
// domid还是写在了alarm里面 待优化
const audioDom = document.querySelector('#buzzer');
if (state && state.on) {
audioDom.play().catch(e=>{throw e})
} else if (state && !state.on) {
audioDom.pause()
}
}
}

View File

@ -2,33 +2,55 @@ import Group from 'zrender/src/container/Group';
import Image from 'zrender/src/graphic/Image';
import redButtonPic from '@/assets/ibp_images/red_button.png';
import redButtonPicOn from '@/assets/ibp_images/red_button_on.png';
import redButtonPicPressed from '@/assets/ibp_images/red_button_pressed.png';
import redButtonPicPressedOn from '@/assets/ibp_images/red_button_pressed_on.png';
import greenButtonPicOn from '@/assets/ibp_images/green_button_on.png';
import greenButtonPic from '@/assets/ibp_images/green_button.png';
import greenButtonPicPressedOn from '@/assets/ibp_images/green_button_pressed_on.png';
import greenButtonPicPressed from '@/assets/ibp_images/green_button_pressed.png';
import blueButtonPic from '@/assets/ibp_images/blue_button.png';
import blueButtonPicOn from '@/assets/ibp_images/blue_button_on.png';
import blueButtonPicPressed from '@/assets/ibp_images/blue_button_pressed.png';
import blueButtonPicPressedOn from '@/assets/ibp_images/blue_button_pressed_on.png';
import yellowButtonPic from '@/assets/ibp_images/yellow_button.png';
import yellowButtonPicOn from '@/assets/ibp_images/yellow_button_on.png';
import yellowButtonPicPressed from '@/assets/ibp_images/yellow_button_pressed.png';
import yellowButtonPicPressedOn from '@/assets/ibp_images/yellow_button_pressed_on.png';
import grayButtonPic from '@/assets/ibp_images/gray_button.png';
import grayButtonPicOn from '@/assets/ibp_images/gray_button_on.png';
import grayButtonPicPressed from '@/assets/ibp_images/gray_button_pressed.png';
import grayButtonPicPressedOn from '@/assets/ibp_images/gray_button_pressed_on.png';
// on/off 代表是否亮灯
// pressed 代表是否按下
const colors = new Map([
['red_on', [redButtonPicOn]],
['red_off', [redButtonPic]],
['green_on', [greenButtonPicOn]],
['green_off', [greenButtonPic]],
['blue_on', [blueButtonPicOn]],
['blue_off', [blueButtonPic]],
['yellow_on', [yellowButtonPicOn]],
['yellow_off', [yellowButtonPic]],
['gray_on', [grayButtonPicOn]],
['gray_off', [grayButtonPic]]
['red_on', redButtonPicOn],
['red_off', redButtonPic],
['red_pressed_on', redButtonPicPressedOn],
['red_pressed_off', redButtonPicPressed],
['green_on', greenButtonPicOn],
['green_off', greenButtonPic],
['green_pressed_on', greenButtonPicPressedOn],
['green_pressed_off', greenButtonPicPressed],
['blue_on', blueButtonPicOn],
['blue_off', blueButtonPic],
['blue_pressed_on', blueButtonPicPressedOn],
['blue_pressed_off', blueButtonPicPressed],
['yellow_on', yellowButtonPicOn],
['yellow_off', yellowButtonPic],
['yellow_pressed_on', yellowButtonPicPressedOn],
['yellow_pressed_off', yellowButtonPicPressed],
['gray_on', grayButtonPicOn],
['gray_off', grayButtonPic],
['gray_pressed_on', grayButtonPicPressedOn],
['gray_pressed_off', grayButtonPicPressed],
]);
export default class button extends Group {
constructor(device) {
super();
this._type = device.model._type;
this._code = device.model.code;
this.model = device.model;
this.model = {...device.model, pressed: false};
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this.create();
@ -64,8 +86,8 @@ export default class button extends Group {
}
getImagePic() {
const color = colors.get(`${this.model.color}_${this.model.status}`);
return color[0];
const color = colors.get(`${this.model.color}${this.model.pressed ? '_pressed' : ''}_${this.model.status}`);
return color;
}
// 设置按钮状态
@ -85,51 +107,32 @@ export default class button extends Group {
}
}
}
// onmousedown() {
// console.log('按下');
// this.mouse = true;
// this.model.status = 'on';
// }
// onmousemove(e) {
// if (this.mouse) {
// console.log(e, '元素移动');
// }
// }
// onmouseup() {
// if (this.mouse) {
// console.log('抬起');
// this.model.status = 'off';
// this.mouse = false;
// }
// }
onclick() {
// if (!this.model.draggable) {
// switch (this.model.status) {
// case 'off': {
// this.open();
// this.model.status='on';
// break;
// }
// case 'on': {
// this.close();
// this.model.status='off';
// break;
// }
// }
// }
setStatus(model) {
model.on ? this.open() : this.close();
}
// 关闭
close() {
const color = colors.get(`${this.model.color}_off`);
this.imageBg.setStyle({image: color[0]});
this.model.status = 'off';
this.imageBg.setStyle({image: this.getImagePic()});
}
// 开放
open() {
const color = colors.get(`${this.model.color}_on`);
this.imageBg.setStyle({image: color[0]});
this.model.status = 'on';
this.imageBg.setStyle({image: this.getImagePic()});
}
// 按下
press() {
this.model.pressed = true;
this.imageBg.setStyle({image: this.getImagePic()});
}
// 松开
release() {
this.model.pressed = false;
this.imageBg.setStyle({image: this.getImagePic()});
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;

View File

@ -2,6 +2,9 @@ import Group from 'zrender/src/container/Group';
import Circle from 'zrender/src/graphic/shape/Circle';
import {IbpShowCondition} from '@/scripts/ConstDic';
const ACTIVE_COLOR = '#D8FCF2';
const INACTIVE_COLOR = '#332C22';
export default class CircularLamp extends Group {
constructor(device) {
super();
@ -41,11 +44,7 @@ export default class CircularLamp extends Group {
this.lamp.setStyle({fill: color});
}
setStatus(state) {
if (state.xxkcLight || state.sxkcLight || state.jjtcLight || state.xxgmLight || state.xxkmLight || state.sxgmLight || state.sxkmLight ) {
this.setCircularLampColor('#D8FCF2');
} else {
this.setCircularLampColor('#332C22');
}
this.setCircularLampColor( state.on ? ACTIVE_COLOR : INACTIVE_COLOR );
}
setModel(dx, dy) {
this.model.point.x += dx;
@ -53,9 +52,9 @@ export default class CircularLamp extends Group {
}
setDefaultStatus(obj) {
if (obj && obj.defaultStatus === 'close') {
this.setCircularLampColor('#332C22');
this.setCircularLampColor(ACTIVE_COLOR);
} else if (obj && obj.defaultStatus === 'open') {
this.setCircularLampColor('#D8FCF2');
this.setCircularLampColor(INACTIVE_COLOR);
}
}
}

View File

@ -163,13 +163,14 @@ export default class key extends Group {
}
}
setStatus(model) {
if (model.xxys || model.sxys) {
if (model.on) {
this.keyImage.setStyle({image: keyPicOn});
this.model.status = 'on';
} else {
this.keyImage.setStyle({image: keyPic});
this.model.status = 'off';
}
}
setModel(dx, dy) {
this.model.point.x += dx;

View File

@ -97,23 +97,24 @@ class MouseController extends Eventful {
}
mousemove(e) {
if (this._dragging) {
const oldX = this._x;
const oldY = this._y;
if (this._dragging) {
const oldX = this._x;
const oldY = this._y;
const dx = e.offsetX - oldX;
const dy = e.offsetY - oldY;
const dx = e.offsetX - oldX;
const dy = e.offsetY - oldY;
this._x = e.offsetX;
this._y = e.offsetY;
this._x = e.offsetX;
this._y = e.offsetY;
if (e.which == 1) {
this._preventDefaultMouseMove && eventTool.stop(e.event);
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
} else if (e.which === 3 && this._zoomOnMouseWheel && this._previewOrMapDraw) {
this.handleMouseMoveRight({x: e.offsetX, y: e.offsetY});
}
}
if (e.which == 1) {
this._preventDefaultMouseMove && eventTool.stop(e.event);
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
} else if (e.which === 3 && this._zoomOnMouseWheel && this._previewOrMapDraw) {
this.handleMouseMoveRight({x: e.offsetX, y: e.offsetY});
this.isMoveRight = true;
}
}
}
mouseup(e) {
@ -121,10 +122,23 @@ class MouseController extends Eventful {
this._dragging = false;
}
if (this._zoomOnMouseWheel && this.$jmap.mapDevice['check_box'] && this._previewOrMapDraw ) {
console.log(this.isMoveRight, 'mouseup');
this.eventTarget = this.$jmap.mapDevice['check_box'].instance;
this.handleBoundingRect(this.eventTarget);
var em = this.checkEvent(e);
let em;
if (!this.isMoveRight) {
em = this.checkEvent(e);
} else {
em = {
clientX:e.offsetX,
clientY:e.offsetY,
eventTarget:this.eventTarget,
deviceCode:'check_box',
deviceType:'CheckBox'
};
}
this.trigger(this.events.Selected, em);
}
}
@ -157,8 +171,13 @@ class MouseController extends Eventful {
}
contextmenu(e) {
var em = this.checkEvent(e);
this.trigger(this.events.Contextmenu, em);
// 判断是否正在右键拖选 若不是则弹出右键菜单
if (!this.isMoveRight) {
var em = this.checkEvent(e);
this.trigger(this.events.Contextmenu, em);
} else {
this.isMoveRight = false;
}
}
moveEvent(e) {

View File

@ -131,6 +131,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { MouseEvent } from '@/scripts/ConstDic';
export default {
name: 'FaultChoose',
components: {
@ -191,7 +192,7 @@ export default {
watch:{
'$store.state.menuOperation.selectedCount':function(em) {
const device = this.$store.state.menuOperation.selected;
if (device && device.code && device.deviceType === 'TRAIN' && this.$store.state.training.prdType === '02') {
if (device && device.code && device.deviceType === 'TRAIN' && this.$store.state.training.prdType === '02' && device._event === MouseEvent.left) {
if (!this.dialogShow) {
this.controlMode = 'edit';
this.dialogShow = true;

View File

@ -683,7 +683,7 @@ export default {
this.param.routeCodeList = routeCodeList;
}
if (this.cmdType == CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER || this.cmdType == CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER) {
this.param = { stationCode: this.selectedObj.code };
this.param = { stationCode: this.selectedObj.code || this.$store.state.map.showCentralizedStationCode };
}
if (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) {
this.param.speedLimitValue = this.speedLimitValue;
@ -863,14 +863,15 @@ export default {
{ name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false },
{ name: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, show: false },
{ name: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, show: false }
] : [{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' },
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true },
{ name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, show: false },
{ name: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, show: false },
{ name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false },
{ name: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, show: false },
{ name: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, show: false }
] : [
// { name: '', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
// { name: '', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' },
// { name: '', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true },
// { name: '', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, show: false },
// { name: '', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, show: false },
// { name: '', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false },
// { name: '', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, show: false },
// { name: '', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, show: false }
];
this.sectionParamList = [
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, show: false },

View File

@ -641,7 +641,7 @@ export default {
operateType: 'Signal_Set_CI_Auto',
skinCode: '06',
trainingName: '设置自动通过进路({5})',
trainingRemark: '设置自动通过进路',
trainingRemark: '向某个未开放信号机设置通过模式',
trainingType: 'Signal',
productTypes: ['01', '02'],
stepVOList: [
@ -672,7 +672,7 @@ export default {
operateType: 'Signal_Cancel_CI_Auto',
skinCode: '06',
trainingName: '取消自动通过进路({5})',
trainingRemark: '取消自动通过进路',
trainingRemark: '向某个未开放信号机取消通过模式',
trainingType: 'Signal',
productTypes: ['01', '02'],
stepVOList: [

View File

@ -94,6 +94,11 @@ export default {
handler: this.cancelDetainTrainAll,
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
},
{
label: '强制取消扣车',
handler: this.cancelDetainTrainForce,
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
},
{
label: '设置跳停',
handler: this.setJumpStop,
@ -185,8 +190,8 @@ export default {
label: 'PSL',
handler: this.openPsl
}
]
];
}
},
doShow(point) {
@ -309,8 +314,8 @@ export default {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
// PSL
openPsl(){
this.$refs.psl.doShow(this.selected)
openPsl() {
this.$refs.psl.doShow(this.selected);
}
}
};

View File

@ -129,7 +129,9 @@ export const IbpOperation = {
SXKM: {operate: '10', event: 'SXKM', name: '上行屏蔽门开门'},
XXYS: {operate: '09', event: 'XXYS', name: '下行钥匙'},
SXYS: {operate: '11', event: 'SXYS', name: '上行钥匙'},
PRERESET: {operate: '12', event: 'PRERESET', name: '计轴复位'}
AXLE_RESET: {operate: '12', event: 'AXLE_RESET', name: '计轴复位'},
AXLE_PRE_RESET: {operate: '13', event: 'AXLE_PRE_RESET', name: '计轴预复位'},
PRERESET_Z: {operate: '14', event: 'PRERESET_Z', name: '计轴预复零'}
};
/**

View File

@ -6,7 +6,7 @@ export function getBaseUrl() {
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
// BASE_API = 'http://192.168.3.120:9000'; // 张赛
BASE_API = 'http://192.168.3.120:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康

View File

@ -1,17 +1,22 @@
<template>
<div id="textStatus" class="icon-box" :style="{top: offset+'px'}">
<div class="textStatus" :style="{background: holdBackground}" @mouseenter="showHoldStatus" @mouseleave="hideHoldStatus">H</div>
<div class="textStatus" :style="{background: jumpBackground}" @mouseenter="showJumpStatus" @mouseleave="hideJumpStatus">S</div>
<div class="textStatus" style="cursor: pointer;" :style="{background: holdBackground}" @contextmenu="showHoldStationPop">H</div>
<div class="textStatus" style="cursor: pointer;" :style="{background: jumpBackground}" @contextmenu="showJumpStationPop">S</div>
<pop-tip v-show="popShow" :position="position" :tip="tip" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="statusIcon" />
</div>
</template>
<script>
import PopTip from '@/views/newMap/mapsystemNew/plugin/src/poptip';
import PopMenu from '@/components/PopMenu';
export default {
name: 'StatusIcon',
components: { PopTip },
components: {
PopTip,
PopMenu
},
data() {
return {
offset: 15,
@ -19,7 +24,8 @@ export default {
jumpBackground: '#807D8E',
tip: '',
position: {x: 0, y:0, align: 'top', textAlign:'left', fontNumber: 12},
popShow: false
popShow: false,
menu: []
};
},
watch: {
@ -61,43 +67,49 @@ export default {
}
});
},
showHoldStatus(e) {
showHoldStationPop(e) {
const point = {};
point.x = e.clientX;
point.y = e.clientY;
if (this.$store.state.map.holdStandList.length) {
this.popShow = true;
this.position.x = e.clientX;
this.position.y = e.clientY;
this.tip = '扣车提示:<br>';
this.menu = [];
this.$store.state.map.holdStandList.forEach(item => {
const stand = this.$store.getters['map/getDeviceByCode'](item);
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
const dir = stand.right ? '上行站台' : '下行站台';
if (stand) {
this.tip = this.tip + station.name + ':<br>' + dir + '站台存在扣车命令<br>';
}
this.menu.push({
label: station.name,
code: station.code,
handler: this.setCenter
});
});
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.resetShowPosition(point);
}
}
},
hideHoldStatus(e) {
this.popShow = false;
},
showJumpStatus(e) {
showJumpStationPop(e) {
const point = {};
point.x = e.clientX;
point.y = e.clientY;
if (this.$store.state.map.jumpStandList.length) {
this.popShow = true;
this.position.x = e.clientX;
this.position.y = e.clientY;
this.tip = '跳停提示:<br>';
this.menu = [];
this.$store.state.map.jumpStandList.forEach(item => {
const stand = this.$store.getters['map/getDeviceByCode'](item);
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
const dir = stand.right ? '上行站台' : '下行站台';
if (stand) {
this.tip = this.tip + station.name + ':<br>' + dir + '站台存在跳停命令<br>';
}
this.menu.push({
label: station.name,
code: station.code,
handler: this.setCenter
});
});
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.resetShowPosition(point);
}
}
},
hideJumpStatus(e) {
this.popShow = false;
setCenter(val) {
this.$jlmap && this.$jlmap.setCenter(val.code);
}
}
};
@ -105,7 +117,7 @@ export default {
<style scoped>
.icon-box {
z-index: 7;
z-index: 10;
position: absolute;
left: 0;
width: 120px;
@ -127,4 +139,7 @@ export default {
background: #807D8E;
color: #C9A167;
}
.statusIcon {
background: #ccc;
}
</style>

View File

@ -34,7 +34,7 @@
/>
</el-select>
</el-form-item>
<el-form-item v-if="form.mean === 'PRERESET'" label="关联区段" prop="sectionCode">
<el-form-item v-if="'AXLE_PRE_RESET' === form.mean" label="关联区段" prop="sectionCode">
<el-select v-model="form.sectionCode" filterable placeholder="请选择">
<el-option
v-for="item in sectionList"
@ -74,7 +74,9 @@ export default {
{ label: '报警切除', value: 'BJQC' },
{ label: '下行屏蔽门开门', value: 'XXKM' },
{ label: '上行屏蔽门开门', value: 'SXKM' },
{ label: '计轴复位', value: 'PRERESET' }
{ label: '计轴复位', value: 'AXLE_RESET' },
{ label: '计轴预复位', value: 'AXLE_PRE_RESET' },
{ label: '计轴预复零', value: 'PRERESET_Z' },
],
form: {
code: '',

View File

@ -19,7 +19,7 @@ import IbpPan from '@/ibp/ibpPan';
import { parser } from '@/ibp/utils/parser';
import { mapGetters } from 'vuex';
import { exitFullscreen } from '@/utils/screen';
import { handlerIbpEvent } from '@/api/simulation';
import { handlerIbpEvent, handleIbpPress, handleIbpRelease } from '@/api/simulation';
import { IbpOperation } from '@/scripts/ConstDic';
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
import { getToken } from '@/utils/auth';
@ -28,6 +28,7 @@ import { getSimulationInfoNew, getIbpInitialState } from '@/api/simulation';
import BuzzerAudio from '@/assets/buzzer.mp3';
import { getStationList } from '@/api/runplan';
const pressedKeys = new Set();
export default {
name: 'Ibp',
props: {
@ -85,7 +86,6 @@ export default {
'$store.state.socket.simulationIbpStatus': function (val) {
if (val && val[this.stationCode]) {
this.statusMessage(val[this.stationCode]);
this.controlAudio(val[this.stationCode].jjtcBuzzer);
}
},
'$store.state.socket.simulationTimeSync': function (time) { // 仿
@ -118,6 +118,7 @@ export default {
}
this.ibpDestroy();
},
preResetBtn: null,
methods: {
initIbp(offsetX = 0) {
this.ibpDestroy();
@ -141,9 +142,11 @@ export default {
Vue.prototype.$ibp = this.$ibp;
this.initClockTime(this.initTime || this.$store.state.socket.simulationTimeSync);
this.$ibp.on('contextmenu', this.onContextMenu, this);
this.$ibp.on('keyboard', this.onKeyboardAction, this);
if (this.$route.query.group) {
this.$ibp.on('selected', this.onSelected, this);
this.$ibp.on('mouseDown', this.onMouseDown, this);
this.$ibp.on('mouseUp', this.onMouseUp, this);
}
},
async show (deviceCode, ibpPart) {
@ -171,9 +174,8 @@ export default {
getIbpInitialState(this.$route.query.group, this.stationCode).then(resp => {
if (resp.data) {
this.statusMessage(resp.data);
this.controlAudio(resp.data.jjtcBuzzer);
}
}).catch(() => {
}).catch((e) => {
this.$message.error('获取IBP盘初始状态异常');
});
document.getElementById(this.ibpId).oncontextmenu = function (e) {
@ -191,6 +193,7 @@ export default {
this.setIbp(data, ibpDatas);
this.$store.dispatch('ibp/setIbpData', ibpDatas);
this.handleBanOpenScreenDoorStatus();
this.preResetBtn = this.$ibp.$painter.ibpInstanceLevel.SquareButton.children().find(e=>e.model.mean === IbpOperation.PRERESET_Z.event);
} else {
//
this.loading = false;
@ -227,14 +230,28 @@ export default {
//
onSelected(em) {
},
onKeyboardAction(e){
if (this.preResetBtn) {
if (e.type === 'keydown' && e.key === 'Control') {
pressedKeys.add(e.key)
this.preResetBtn.press();
handleIbpPress(this.$route.query.group, this.stationCode, this.preResetBtn._code).catch(error => { this.$message.error(error.message); });
} else if (e.type === 'keyup' && e.key === 'Control'){
pressedKeys.delete(e.key)
this.preResetBtn.release();
handleIbpRelease(this.$route.query.group, this.stationCode, this.preResetBtn._code).catch(error => { this.$message.error(error.message); });
}
}
},
onMouseDown(em) {
if (em.deviceModel.mean && IbpOperation[em.deviceModel.mean] && em.deviceModel.mean === IbpOperation.PRERESET.event) {
handlerIbpEvent(this.$route.query.group, IbpOperation[em.deviceModel.mean].event, this.stationCode, em.deviceModel.sectionCode).then(() => {
}).catch(error => { this.$message.error(error.message); });
} else if ( em.deviceModel.mean && IbpOperation[em.deviceModel.mean]) {
handlerIbpEvent(this.$route.query.group, IbpOperation[em.deviceModel.mean].event, this.stationCode).then(() => {
}).catch(error => { this.$message.error(error.message); });
if (["SquareButton", "Key"].includes(em.deviceType)){
handleIbpPress(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); });
}
},
onMouseUp(em) {
if (["SquareButton"].includes(em.deviceType)){
handleIbpRelease(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); });
}
},
//
@ -293,6 +310,7 @@ export default {
this.$ibp.dispose();
this.$ibp = '';
Vue.prototype.$ibp = '';
this.preResetBtn = null;
}
},
handleViewLoaded() {
@ -310,16 +328,6 @@ export default {
clearSubscribe() {
clearSubscribe(`${displayTopic}\/${this.$route.query.group}`);
},
controlAudio(val) {
const audio = document.getElementById('buzzer');
if (audio !== null) {
if (val) {
audio.play();
} else if (val === false) {
audio.pause();
}
}
},
switchOffset() {
if (this.offsetX === 0) {
this.offsetX = 1920;

View File

@ -25,7 +25,7 @@
/>
</el-select>
</div>
<div class="back-box" @click="back">{{ projectDevice? '退出': '返回主页面' }}</div>
<div v-if="!projectDevice" class="back-box" @click="back">返回主页面</div>
</div>
</template>
@ -416,17 +416,17 @@ export default {
back() {
this.firstBack = true;
this.clearSubscribe();
if (this.projectDevice) {
this.$store.dispatch('LogOut').then(() => {
location.reload();
});
} else {
clearSimulation(this.$route.query.group).then(resp => {
this.$router.push({ path: `/trainingPlatform` });
}).catch(()=> {
this.$message.error('清除仿真失败!');
});
}
// if (this.projectDevice) {
// this.$store.dispatch('LogOut').then(() => {
// location.reload();
// });
// } else {
clearSimulation(this.$route.query.group).then(resp => {
this.$router.push({ path: `/trainingPlatform` });
}).catch(()=> {
this.$message.error('清除仿真失败!');
});
// }
},
changeCurrentSystem() {
this.$router.push({

View File

@ -472,6 +472,7 @@ export default {
this.$router.push({ path: `/displayIscs/system`, query: {
group: res.data.group,
lineCode: resp.data.map.lineCode,
mapId:resp.data.map.id,
projectDevice: this.$route.query.projectDevice,
type: this.$route.query.type} });
} else if (this.$route.query.type == 'CCTV') {

View File

@ -62,7 +62,7 @@
</el-table-column>
<el-table-column prop="address" label="位置" width="60">
<template slot-scope="scope">
<span>{{ scope.row.section }}</span>
<span>{{ getSectionPosition(scope.row.sectionCode) }}</span>
</template>
</el-table-column>
</el-table>
@ -110,8 +110,16 @@
<div style="margin-top: 20px;height: 20px;">插入位置之前</div>
<el-table :data="tableData" border style="width: 280px;" height="180">
<el-table-column prop="date" label="方向" width="60" />
<el-table-column prop="name" label="列车号" width="157" />
<el-table-column prop="address" label="位置" width="60" />
<el-table-column prop="name" label="列车号" width="157">
<template slot-scope="scope">
<span>{{ getTrainCode(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="address" label="位置" width="60">
<template slot-scope="scope">
<span>{{ getSectionPosition(scope.row.sectionCode) }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
@ -180,7 +188,11 @@
<span>{{ getTrainCode(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="address" label="位置" width="60" />
<el-table-column prop="address" label="位置" width="60">
<template slot-scope="scope">
<span>{{ getSectionPosition(scope.row.sectionCode) }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div style="width: 250px;display: flex;justify-content: space-between;margin-top: 20px;margin-left: 10px;align-items: center;height: 25px;">

View File

@ -257,7 +257,11 @@ export default {
const stations = this.$store.state.runPlan.stations;
const planData = this.$store.state.runPlan.planData;
this.kmRangeMap = this.PlanParser.convertStationsToMap(stations);
this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisY(stations)]);
if (this.$route.query.lineCode === '07') {
this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisX(stations)]);
} else {
this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisY(stations)]);
}
this.staticSeries = this.pushModels(this.staticSeries, this.PlanParser.convertDataToModels(planData, stations, this.kmRangeMap, { color: '#000', width: 0.5 }));
this.staticSeries.forEach(item => {
this.seriesMap[item.name] = item;
@ -362,6 +366,89 @@ export default {
]
};
const hebXAxis = {
type: 'value',
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
interval: 'auto',
formatter: this.yAxisLableFormat
},
axisPointer: {
xAxisIndex: 'all',
label: {
formatter: this.yAxisPointFormat,
backgroundColor: 'rgb(0,100,0,0.5)',
color: 'white'
}
},
min: 0,
max: 0
};
const hebYAxis = [
{
type: 'category',
boundaryGap: false,
data: [],
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
formatter: this.xAxisLableFormat,
textStyle: {
color: '#333'
}
},
axisPointer: {
snap: true,
label: {
formatter: this.xAxisPointFormat,
backgroundColor: 'rgb(255,0,0,0.5)',
color: 'white'
}
}
}
];
const hebDataZoom = [
{
type: 'inside',
yAxisIndex: 0
},
{
fiterMode: 'filter',
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '80%',
yAxisIndex: 0,
handleStyle: {
color: '#fff',
shadowBlur: 3,
shadowColor: 'rgba(0, 0, 0, 0.6)',
shadowOffsetX: 2,
shadowOffsetY: 2
},
left: '20px'
}
];
if (this.$route.query.lineCode === '07') {
option.xAxis = hebXAxis;
option.yAxis = hebYAxis;
option.dataZoom = hebDataZoom;
}
await this.xAxisInit(option);
await this.yAxisInit(option);
await this.loadInitChart(option);
@ -420,7 +507,11 @@ export default {
const startValue = 3600 * 6;
const offsetTime = 3600 * 1;
option.xAxis[0].data = list;
if (this.$route.query.lineCode === '07') {
option.yAxis[0].data = list;
} else {
option.xAxis[0].data = list;
}
if (!option.dataZoom[0].startValue) {
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
}
@ -430,19 +521,31 @@ export default {
}
},
yAxisInit(option) {
if (Object.keys(this.PlanParser).length) {
option.yAxis[0].min = this.PlanParser.computedAxisYMinValue(this.stations);
option.yAxis[0].max = this.PlanParser.computedAxisYMaxValue(this.stations);
if (Object.keys(this.PlanParser).length && this.$route.query.lineCode !== '07') {
option.yAxis.min = this.PlanParser.computedAxisYMinValue(this.stations);
option.yAxis.max = this.PlanParser.computedAxisYMaxValue(this.stations);
} else if (Object.keys(this.PlanParser).length && this.$route.query.lineCode === '07') {
option.xAxis.min = this.PlanParser.computedAxisXMinValue(this.stations);
option.xAxis.max = this.PlanParser.computedAxisXMaxValue(this.stations);
}
},
axisTooltip(param) {
const station = (this.$store.getters['map/getDeviceByCode'](param.data[2])) || { name: '', kmRange: '' };
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[0] + this.PlanParser.getTranslation())} (${param.data[0]})<br>`
].join('');
if (this.$route.query.lineCode !== '07') {
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[0] + this.PlanParser.getTranslation())} (${param.data[0]})<br>`
].join('');
} else {
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[1] + this.PlanParser.getTranslation())} (${param.data[1]})<br>`
].join('');
}
},
renderTripNumber(params) {
const tripNumber = params.tripNumber; //

View File

@ -342,16 +342,27 @@ export default {
async back() {
this.isGoback = true;
if (this.projectDevice) {
// || this.project === 'bjd'
clearSimulation(this.group).then(res=>{
if (this.$route.query.type == 'IM') {
clearSimulation(this.group).then(res=>{
this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('LogOut').then(() => {
// this.$store.dispatch('training/reset');
// this.$store.dispatch('map/mapClear');
location.reload();
});
});
});
} else {
this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('LogOut').then(() => {
// this.$store.dispatch('training/reset');
// this.$store.dispatch('map/mapClear');
// this.$store.dispatch('training/reset');
// this.$store.dispatch('map/mapClear');
location.reload();
});
});
});
}
// || this.project === 'bjd'
} else {
if (this.project === 'bjd') {
window.close();

View File

@ -1,9 +1,10 @@
<template>
<div>
<status-icon v-if="statusIconShow" ref="statusIcon" />
<chat-box v-if="$route.query.type !== 'ILW'" :group="group" :user-role="userRole" />
<!-- 地图没有报错-->
<!-- 地图错误判断 -->
<div v-if="!dataError&&hasOneButton" class="display_top_draft" :style="{top: offset+'px'}">
<div v-if="!dataError&&hasOneButton" class="display_top_draft" :style="{top: statusIconShow ? offset + 60 + 'px':offset+'px'}">
<div class="btn_hover" @click="menuClick">菜单</div>
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
<!-- 设备视图 -->
@ -48,6 +49,7 @@
<script>
import QrCode from '@/components/QrCode';
import StatusIcon from '@/views/components/StatusIcon/statusIcon';
import ChatBox from '../chatView/chatBox';
import Equipment from '@/views/newMap/displayNew/demon/equipment';
import SetTime from '@/views/newMap/displayNew/demon/setTime';
@ -68,7 +70,8 @@ export default {
QrCode,
SetTime,
Equipment,
ContectUs
ContectUs,
StatusIcon
},
props: {
group: {
@ -182,6 +185,9 @@ export default {
},
isDisable() {
return this.$store.state.training.started;
},
statusIconShow() {
return (this.$route.query.lineCode == '11' || this.$route.query.lineCode == '10') && this.$store.state.training.prdType == '02';
}
},
watch: {

View File

@ -187,7 +187,7 @@ export default {
device = this.getSelectedByLineCode(device);
this.selected = { ...device, _event: MouseEvent.Right};
if (!this.buttonOperation) {
this.$store.dispatch('menuOperation/setSelected', {device: device, subType: em.subType});
this.$store.dispatch('menuOperation/setSelected', {device: this.selected, subType: em.subType});
if (!this.checkShouldPop(device)) {
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: null });
} else {

View File

@ -109,7 +109,7 @@ export default {
lineCode: elem.lineCode
},
{
id: '1',
id: '2',
name: '系统配置绘图',
type: 'mapSystem',
mapId: elem.id,

View File

@ -11,6 +11,9 @@
<el-form-item :label="$t('map.publishMapName')" prop="name">
<el-input v-model="editModel.name" />
</el-form-item>
<el-form-item label="描述:" prop="note">
<el-input v-model="editModel.note" />
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
@ -39,7 +42,8 @@ export default {
editModel: {
id: '',
name: '',
cityCode: '000000'
cityCode: '000000',
note:''
},
editRules: {
cityCode: [
@ -47,6 +51,9 @@ export default {
],
name: [
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
],
note:[
{ required: true, message: this.$t('rules.pleaseEnterDescription'), trigger: 'blur' }
]
}
};

View File

@ -294,6 +294,30 @@
</div>
</div>
</template>
<template v-if="checkFieldType(item,'checkBoxDevice')">
<div :key="item.prop" class="coordinate">
<span class="title">{{ item.label }}</span>
<div class="list-box">
<div>
<el-button
size="small"
:type="item.buttonShowType ? 'danger' : 'primary'"
@click="item.hover(item.buttonType)"
>激活选择</el-button>
<el-button
size="small"
@click="item.clear()"
>清空</el-button>
</div>
<div class="list-content">
<div v-for="(nor,indexIn) in formModel[item.prop]" :key="nor" class="each-content" @mouseenter="item.mouseenter(nor)" @mouseleave="item.mouseleave(nor)">
<div class="name">{{ item.getName(nor) }}</div>
<div class="close" @click="formModel[item.prop].splice(indexIn, 1);"><i class="el-icon-close" /></div>
</div>
</div>
</div>
</div>
</template>
</template>
</fieldset>
</template>

View File

@ -196,11 +196,19 @@ export default {
} else if (controlLampTypeList.includes(type)) {
this.enabledTab = 'ControlLamp';
} else {
this.enabledTab = type;
if (this.$refs['ZcControl'] && this.$refs['ZcControl'][0].field == 'checkZcSection') {
this.enabledTab = 'ZcControl';
} else {
this.enabledTab = type;
}
}
},
deviceSelect(type) {
// if (this.$refs['ZcControl'].field != 'checkZcSection') {
this.selectDevice = type;
// } else {
// this.selectDevice = 'ZcControl';
// }
},
saveMapEvent() {
this.$emit('saveMapEvent');

View File

@ -1,5 +1,5 @@
<template>
<el-tabs v-model="activeName" class="card" @tab-click="handleClick">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div class="view-control-content">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
@ -53,8 +53,9 @@ export default {
editModel: {
code: '',
name: '',
managedSectionList:[],
// visible: '',
concentrateStationList:[],
// concentrateStationList:[],
position: {
x: 0,
y: 0
@ -64,12 +65,13 @@ export default {
code: '',
name: '',
// visible: '',
concentrateStationList:[],
// concentrateStationList:[],
position: {
x: 0,
y: 0
}
},
field:'',
rules: {
code: [
{ required: true, message: this.$t('rules.pleaseSelectEncoding'), trigger: 'change' }
@ -80,9 +82,9 @@ export default {
// visible: [
// { required: true, message: this.$t('rules.visible'), trigger: 'change' }
// ],
concentrateStationList:[
{ required: true, message: this.$t('rules.selectConcentrateStation'), trigger: 'change' }
],
// concentrateStationList:[
// { required: true, message: this.$t('rules.selectConcentrateStation'), trigger: 'change' }
// ],
'position.x': [
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' }
],
@ -95,8 +97,11 @@ export default {
computed: {
...mapGetters('map', [
'zcList',
'stationList'
'seclectDeviceList'
]),
isButtonType() {
return this.field == 'checkZcSection';
},
form() {
const form = {
labelWidth: '150px',
@ -115,7 +120,8 @@ export default {
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
] },
{ prop:'concentrateStationList', label:this.$t('map.concentrateStationList'), type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.concertrateStation, deviceChange: this.changeConcentrateStation }
{ prop:'managedSectionList', label:'管理区段列表: ', type: 'checkBoxDevice', getName:this.getName, mouseenter:this.mouseenter, mouseleave:this.mouseleave, buttonShowType:this.isButtonType, hover:this.hover, buttonType:'checkZcSection', clear:this.clear}
// { prop:'concentrateStationList', label:this.$t('map.concentrateStationList'), type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.concertrateStation, deviceChange: this.changeConcentrateStation }
]
}
}
@ -133,8 +139,9 @@ export default {
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
] },
{ prop:'concentrateStationList', label:this.$t('map.concentrateStationList'), type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.concertrateStation, deviceChange: this.changeConcentrateStation }
] }
//
// { prop:'concentrateStationList', label:this.$t('map.concentrateStationList'), type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.concertrateStation, deviceChange: this.changeConcentrateStation }
]
}
}
@ -143,51 +150,41 @@ export default {
}
},
watch: {
stationList() {
this.getConcertrateStation();
}
},
mounted() {
this.getConcertrateStation();
},
// mounted() {
// this.getConcertrateStation();
// },
methods: {
deviceChange(code) {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
changeConcentrateStation() {},
handleClick() {
this.getConcertrateStation();
},
deviceSelect(selected) {
this.$refs.dataform && this.$refs.dataform.resetFields();
this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'ZcControl'.toUpperCase()) {
//
// this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'CheckBox'.toUpperCase()) {
this.activeName = 'first';
this.seclectDeviceList.forEach(item => {
if (item._type == 'Section' && (item.type == '01' || item.type == '04') && !this.editModel.managedSectionList.includes(selected.code)) {
this.editModel.managedSectionList.push(item.code);
}
});
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected._type == 'Section' && (selected.type == '01' || selected.type == '04') && !this.editModel.managedSectionList.includes(selected.code)) {
this.editModel.managedSectionList.push(selected.code);
}
} else if (selected && selected._type.toUpperCase() === 'ZcControl'.toUpperCase()) {
this.$refs.dataform && this.$refs.dataform.resetFields();
this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected);
this.getConcertrateStation();
}
},
getConcertrateStation() {
//
const beConcentrateStation = {};
this.zcList.forEach(data=>{
data.concentrateStationList.forEach(concentrate=>{
beConcentrateStation[concentrate] = data.code;
});
});
this.concertrateStation = this.stationList.filter(station=>{
// if (this.activeName == 'first') {
// return station.centralized && !( beConcentrateStation[station.code] && (beConcentrateStation[station.code] != this.editModel.code));
return station.centralized;
// } else {
// return station.centralized && !( beConcentrateStation[station.code]);
// }
});
clear() {
this.editModel.managedSectionList = [];
},
create() {
const uid = getUID('ZcControl', this.zcList);
let models = [];
const models = [];
const model = {
_type: 'ZcControl',
code: uid,
@ -195,16 +192,11 @@ export default {
position: {
x: this.addModel.position.x,
y: this.addModel.position.y
},
concentrateStationList:this.addModel.concentrateStationList
}
};
models.push(model);
model.concentrateStationList.forEach(stationCode=>{
const arr = this.setStationStand(stationCode, model.code);
models = [...models, ...arr];
});
this.$emit('updateMapModel', models);
this.getConcertrateStation();
this.$refs.createForm.resetForm();
},
//
@ -212,11 +204,7 @@ export default {
this.$refs['dataform'].validate((valid) => {
if (valid) {
const data = Object.assign({_type: 'ZcControl'}, this.editModel);
let models = [data];
data.concentrateStationList.forEach(stationCode=>{
const arr = this.setStationStand(stationCode, data.code);
models = [...models, ...arr];
});
const models = [data];
this.$emit('updateMapModel', models);
this.$emit('deviceSelect', '');
}
@ -231,16 +219,6 @@ export default {
cancelButtonText: this.$t('tip.cancel'),
type: 'warning'
}).then(() => {
this.concertrateStation.forEach(station=>{
selected.concentrateStationList.forEach(stationCode=>{
switch (stationCode) {
case station.code: {
this.setStationStand(station.code, '');
break;
}
}
});
});
this.$emit('updateMapModel', {...selected, _dispose: true});
this.$refs.dataform && this.$refs.dataform.resetFields();
}).catch(() => {
@ -248,19 +226,18 @@ export default {
});
}
},
// ZC
setStationStand(stationCode, code) {
const arr = [];
this.stationList.forEach(elem=>{
if (elem.code == stationCode) {
const station = deepAssign({}, elem);
// const station = Object.assign({}, elem);
station.zcCode = code;
arr.push(station);
// this.$emit('updateMapModel', station);
}
});
return arr; // list
getName(code) {
const section = this.$store.getters['map/getDeviceByCode'](code);
return section.name || '';
},
mouseenter(code) {
},
mouseleave(code) {
},
hover(field) {
this.field = field === this.field ? '' : field;
}
// changeConcertrateStation(data) {
// if (data.length > 0) {
@ -300,3 +277,31 @@ export default {
color: #3E44BE;
}
</style>
<style lang="scss">
.view-control-content .list-box .list-content{
margin-left:10px;
margin-top:10px;
margin-right:10px;
padding:5px;
}
.view-control-content .list-box .each-content{
background: #e2e2e2;
margin: 5px;
border-radius: 5px;
height: 30px;
line-height: 30px;
padding-left: 10px;
padding-right: 7px;
display: inline-block;
cursor: pointer;
font-size: 14px;
}
.view-control-content .list-box .each-content .name{
display: inline-block;
}
.view-control-content .list-box .each-content .close{
display: inline-block;
cursor: pointer;
}
</style>

View File

@ -2,7 +2,7 @@
<el-dialog :title="title" :visible.sync="dialogShow" custom-class="content-route" width="100%" :fullscreen="true" top="0px" :before-close="close" :z-index="2000" :append-to-body="true">
<div class="content-box">
<div v-if="type=='generateRouting'">
<gernarate-plan ref="gernaratePlanTrain" @close="closeDialog" @mapLoading="mapLoading" />
<gernarate-plan ref="gernaratePlanTrain" :load-run-plan-id="loadRunPlanId" @close="closeDialog" @mapLoading="mapLoading" />
</div>
<jlmap-visual ref="jlmapVisual" v-loading="loadingMap" @onMenu="onContextmenu" @onSelect="clickEvent" />
<!-- :style="{height: $store.state.app.height-54+'px' }" -->
@ -28,6 +28,12 @@ export default {
GernaratePlan
},
props:{
loadRunPlanId: {
type: String,
default: function() {
return '';
}
}
},
data() {
return {

View File

@ -126,7 +126,7 @@
<el-button type="primary" @click="confirmPublish"> </el-button>
</span>
</el-dialog>
<route-map ref="routeMap" />
<route-map ref="routeMap" :load-run-plan-id="loadRunPlanId" />
<runplan-config ref="runplanConfig" />
</div>
</template>

View File

@ -36,14 +36,21 @@ export default {
{
title: this.$t('publish.publisherId'),
prop: 'userId'
// width:'300px'
},
{
title: this.$t('publish.publishTime'),
prop: 'publishTime'
// width:'200px'
},
{
title: this.$t('publish.publishVersion'),
prop: 'version'
// width:'200px'
},
{
title: this.$t('publish.publishDescription'),
prop: 'note'
}
]
},

View File

@ -0,0 +1,58 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="30%" :before-close="doClose">
<el-form ref="form" :model="formModel" :rules="rules" label-width="140px">
<el-form-item :label="$t('publish.runPlanName')" prop="name">
<el-input v-model="formModel.name" :placeholder="$t('publish.enterRunPlanName')" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" @click="handleCofirm">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data() {
return {
show: false,
mapIdList: [],
formModel: {
id: 0,
name: ''
}
};
},
computed: {
title() {
return this.$t('publish.selectMap');
},
rules() {
return {
name: [
{ required: true, message: this.$t('publish.enterRunPlanName'), trigger: 'blur' }
]
};
}
},
methods: {
doShow(row) {
this.formModel.id = row.id;
this.formModel.name = row.name;
this.show = true;
},
doClose(done) {
this.show = false;
this.$refs.form.resetFields();
},
handleCofirm() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('confirm', this.formModel);
}
});
}
}
};
</script>

View File

@ -2,20 +2,23 @@
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<copy-plan ref="copyPlan" @confirm="handleCopyRunPlan" />
<edit-plan ref="editPlan" @confirm="handleUpdateRunPlan" />
</div>
</template>
<script>
import { superAdmin } from '@/router/index';
import { getPublishMapListOnline } from '@/api/jmap/map';
import { runPlanTemplateList, deleteRunPlanTemplate, generateCommonRunPlanEveryDay, postRunPlanTemplate } from '@/api/runplan';
import { runPlanTemplateList, deleteRunPlanTemplate, generateCommonRunPlanEveryDay, postRunPlanTemplate, updateTemplateRunPlan } from '@/api/runplan';
import { UrlConfig } from '@/scripts/ConstDic';
import CopyPlan from './copyPlan.vue';
import EditPlan from './editPlan.vue';
export default {
name: 'RunPlanTemplate',
components: {
CopyPlan
CopyPlan,
EditPlan
},
data() {
return {
@ -65,7 +68,7 @@ export default {
{
type: 'button',
title: this.$t('global.operate'),
width: '550',
width: '580',
hide: () => { return !this.$store.state.user.roles.includes(superAdmin); },
buttons: [
{
@ -78,6 +81,11 @@ export default {
handleClick: this.handleCopyPlan,
type: ''
},
{
name: '编辑',
handleClick: this.handleEdit,
type: ''
},
{
name: this.$t('global.preview'),
handleClick: this.handleView,
@ -142,6 +150,9 @@ export default {
handleCopyPlan(index, row) {
this.$refs.copyPlan.doShow({row:row, mapList:this.mapIdList});
},
handleEdit(index, row) {
this.$refs.editPlan.doShow(row);
},
//
handleGenerateEveryDay(planId, mapId) {
this.$confirm(this.$t('publish.wellGenerateEveryRunPlan'), this.$t('global.tips'), {
@ -175,6 +186,16 @@ export default {
});
}).catch(() => { });
},
handleUpdateRunPlan(data) {
updateTemplateRunPlan(data).then(resp => {
this.reloadTable();
this.$refs.editPlan.doClose();
this.$message.success('编辑模板运行图成功!');
}).catch(e => {
this.reloadTable();
this.$message.error('编辑模板运行图失败:' + e.message);
});
},
//
handleView(index, row) {
const data = this.mapIdList.filter(elem=>{ return elem.id == row.mapId; })[0];

View File

@ -49,6 +49,14 @@ export default {
type: 'text',
label: 'id'
},
account:{
type: 'text',
label: '账号'
},
parentAccount:{
type: 'text',
label: '父账号'
},
roles: {
type: 'select',
label: this.$t('system.roles'),
@ -95,6 +103,16 @@ export default {
prop: 'id',
width: 80
},
{
title: '账号',
prop: 'account',
width: 80
},
{
title: '父账号',
prop: 'parentAccount',
width: 80
},
{
title: this.$t('system.name'),
prop: 'name'

View File

@ -31,7 +31,8 @@ export default {
'NTYC_Joylink':'南铁院实训平台(云平台专用版)',
'NTYC_Design':'南铁院设计平台(云平台专用版)',
'DRTS_Joylink':'调度大赛实训平台',
'DRTS_Design':'调度大赛设计平台'
'DRTS_Design':'调度大赛设计平台',
'DEFAULT_Assistant':'琏课堂助手'
},
pagerConfig: {
pageSize: 'pageSize',