Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
d6f5205ae4
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,3 +16,4 @@ src/utils/baseUrl.js*
|
||||
*.njsproj
|
||||
*.sln
|
||||
debug.log
|
||||
.prettierrc
|
||||
|
@ -148,6 +148,14 @@ export function listUserRoutingData(mapId) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 根据目的地码查询用户交路数据(新版) */
|
||||
export function getUserRoutingDataByDes(mapId, destinationCode) {
|
||||
return request({
|
||||
url: `/api/runPlan/userData/${mapId}/routing/select?destinationCode=${destinationCode}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 根据交路查询交路区段列表*/
|
||||
export function querySectionListByRouting(routingCode) {
|
||||
return request({
|
||||
|
BIN
src/assets/icon/favicon_richor.png
Normal file
BIN
src/assets/icon/favicon_richor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
@ -36,6 +36,13 @@ export default {
|
||||
backgroundHeight: 'backgroundHeight',
|
||||
buttonCode: 'Button code',
|
||||
buttonColor: 'Button color',
|
||||
buttonLightColor: 'Button Light Color',
|
||||
red: 'Red',
|
||||
blue: 'Blue',
|
||||
yellow: 'Yellow',
|
||||
green: 'Green',
|
||||
gray: 'White',
|
||||
button: 'Button',
|
||||
buttonWidth: 'Button width',
|
||||
redButton: 'Red button',
|
||||
blueButton: 'Blue button',
|
||||
|
@ -41,6 +41,13 @@ export default {
|
||||
backgroundHeight: '背景板高度',
|
||||
buttonCode: '按钮编号',
|
||||
buttonColor: '按钮颜色',
|
||||
buttonLightColor: '按钮灯颜色',
|
||||
red: '红色',
|
||||
blue: '蓝色',
|
||||
yellow: '黄色',
|
||||
green: '绿色',
|
||||
gray: '白色',
|
||||
button: '按钮',
|
||||
buttonWidth: '按钮宽度',
|
||||
redButton: '红色按钮',
|
||||
blueButton: '蓝色按钮',
|
||||
|
@ -86,7 +86,12 @@ export default class button extends Group {
|
||||
}
|
||||
|
||||
getImagePic() {
|
||||
const color = colors.get(`${this.model.color}${this.model.pressed ? '_pressed' : ''}_${this.model.status}`);
|
||||
let color;
|
||||
if (this.model.status === 'on') {
|
||||
color = colors.get(`${this.model.lightColor || this.model.color}${this.model.pressed ? '_pressed' : ''}_on`)
|
||||
} else if (this.model.status === 'off') {
|
||||
color = colors.get(`${this.model.color}${this.model.pressed ? '_pressed' : ''}_off`)
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
|
@ -147,20 +147,20 @@ export default class key extends Group {
|
||||
}
|
||||
}
|
||||
onclick() {
|
||||
if (!this.keyImage.draggable) {
|
||||
switch (this.model.status) {
|
||||
case 'off': {
|
||||
this.keyImage.setStyle({image: keyPicOn});
|
||||
this.model.status = 'on';
|
||||
break;
|
||||
}
|
||||
case 'on': {
|
||||
this.keyImage.setStyle({image: keyPic});
|
||||
this.model.status = 'off';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (!this.keyImage.draggable) {
|
||||
// switch (this.model.status) {
|
||||
// case 'off': {
|
||||
// this.keyImage.setStyle({image: keyPicOn});
|
||||
// this.model.status = 'on';
|
||||
// break;
|
||||
// }
|
||||
// case 'on': {
|
||||
// this.keyImage.setStyle({image: keyPic});
|
||||
// this.model.status = 'off';
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
setStatus(model) {
|
||||
if (model.on) {
|
||||
|
@ -160,7 +160,8 @@ class SkinCode extends defaultStyle {
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0', // 信号灯蓝色
|
||||
faultType: 'flash' // 信号机故障类型(flash太阳)
|
||||
faultType: 'flash', // 信号机故障类型(flash太阳)
|
||||
overlapColor: '#0000ff' // 信号机延续保护颜色
|
||||
},
|
||||
route: {
|
||||
direction: false, // 自动进路方向
|
||||
@ -658,7 +659,7 @@ class SkinCode extends defaultStyle {
|
||||
], // 特殊列车类型需设置显示格式
|
||||
lrPadding: 1, // 两边间隔
|
||||
upPadding: 1, // 上边距离
|
||||
trainBodyFillColor: '#000000', // 列车车身填充颜色
|
||||
trainBodyFillColor: 'rgba(0,0,0,0)', // 列车车身填充颜色
|
||||
// targetCode:
|
||||
trainNameFormat: 'serviceNumber:tripNumber'// 列车显示格式
|
||||
},
|
||||
|
@ -134,13 +134,6 @@ deviceState[deviceType.StationStand] = {
|
||||
parkingTime: 0, // 站台停车时间 自动为0
|
||||
num:0, // 站台上等车人数
|
||||
// /** 折返策略*/
|
||||
// reentryStrategy: {
|
||||
// Default: '01', /** 默认(缺省值)*/
|
||||
// State01: '01', /** 无折返策略 */
|
||||
// State02: '02', /** 无人折返 */
|
||||
// State03: '03', /** 自动换端 */
|
||||
// State04: '04' /** 默认 */
|
||||
// },
|
||||
/** 是否故障*/
|
||||
fault: 0 /** 非故障*/
|
||||
};
|
||||
|
@ -330,37 +330,36 @@ class Jlmap {
|
||||
getShowConfig() {
|
||||
return this.showConfig;
|
||||
}
|
||||
showStationHandlePsd(oDevice, stationCode) {
|
||||
const standDevice = this.mapDevice[oDevice.standCode];
|
||||
if (standDevice && standDevice.deviceStationCode === stationCode || !stationCode) {
|
||||
this.$painter.updateSpecialShowStation(oDevice, true);
|
||||
} else {
|
||||
this.$painter.updateSpecialShowStation(oDevice, false);
|
||||
}
|
||||
}
|
||||
showStationHandleSection(oDevice, stationCode) {
|
||||
const trainWinDevice = this.mapDevice[oDevice.trainWindowCode];
|
||||
if (oDevice.stationCode === stationCode || !stationCode) {
|
||||
this.$painter.updateSpecialShowStation(trainWinDevice, true);
|
||||
} else {
|
||||
this.$painter.updateSpecialShowStation(trainWinDevice, false);
|
||||
}
|
||||
}
|
||||
showStationHandleStation (oDevice, stationCode) {
|
||||
if ((oDevice.centralized && oDevice.code === stationCode) || !stationCode) {
|
||||
this.$painter.updateSpecialShowStation(oDevice, true);
|
||||
oDevice.chargeStationCodeList.forEach(staCode => {
|
||||
const staDevice = this.mapDevice[staCode];
|
||||
this.$painter.updateSpecialShowStation(staDevice, true);
|
||||
});
|
||||
} else if (oDevice.centralized && oDevice.code !== stationCode) {
|
||||
this.$painter.updateSpecialShowStation(oDevice, false);
|
||||
oDevice.chargeStationCodeList.forEach(staCode => {
|
||||
const staDevice = this.mapDevice[staCode];
|
||||
this.$painter.updateSpecialShowStation(staDevice, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
// showStationHandlePsd(oDevice, stationCode) {
|
||||
// if (store.getters['map/checkDeviceShow'](stationCode, oDevice.standCode) || !stationCode) {
|
||||
// this.$painter.updateSpecialShowStation(oDevice, true);
|
||||
// } else {
|
||||
// this.$painter.updateSpecialShowStation(oDevice, false);
|
||||
// }
|
||||
// }
|
||||
// showStationHandleSection(oDevice, stationCode) {
|
||||
// const trainWinDevice = this.mapDevice[oDevice.trainWindowCode];
|
||||
// if (oDevice.stationCode === stationCode || !stationCode) {
|
||||
// this.$painter.updateSpecialShowStation(trainWinDevice, true);
|
||||
// } else {
|
||||
// this.$painter.updateSpecialShowStation(trainWinDevice, false);
|
||||
// }
|
||||
// }
|
||||
// showStationHandleStation (oDevice, stationCode) {
|
||||
// if ((oDevice.centralized && oDevice.code === stationCode) || !stationCode) {
|
||||
// this.$painter.updateSpecialShowStation(oDevice, true);
|
||||
// oDevice.chargeStationCodeList.forEach(staCode => {
|
||||
// const staDevice = this.mapDevice[staCode];
|
||||
// this.$painter.updateSpecialShowStation(staDevice, true);
|
||||
// });
|
||||
// } else if (oDevice.centralized && oDevice.code !== stationCode) {
|
||||
// this.$painter.updateSpecialShowStation(oDevice, false);
|
||||
// oDevice.chargeStationCodeList.forEach(staCode => {
|
||||
// const staDevice = this.mapDevice[staCode];
|
||||
// this.$painter.updateSpecialShowStation(staDevice, false);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
updateShowStation(list = [], stationCode = '') {
|
||||
this.stationCode = stationCode;
|
||||
|
||||
@ -369,18 +368,19 @@ class Jlmap {
|
||||
const code = elem.code;
|
||||
const type = elem._type;
|
||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||
if (oDevice._type === deviceType.Station) {
|
||||
this.showStationHandleStation(oDevice, stationCode);
|
||||
} else if (oDevice._type === deviceType.Section) {
|
||||
this.$painter.updateShowStation(oDevice, stationCode);
|
||||
this.showStationHandleSection(oDevice, stationCode);
|
||||
} else if (oDevice._type === deviceType.TrainWindow) {
|
||||
// 不处理车次窗 勿删
|
||||
} else if (oDevice._type === deviceType.Psd) {
|
||||
this.showStationHandlePsd(oDevice, stationCode);
|
||||
} else {
|
||||
this.$painter.updateShowStation(oDevice, stationCode);
|
||||
}
|
||||
// if (oDevice._type === deviceType.Station) {
|
||||
// this.showStationHandleStation(oDevice, stationCode);
|
||||
// } else if (oDevice._type === deviceType.Section) {
|
||||
// this.$painter.updateShowStation(oDevice, stationCode);
|
||||
// this.showStationHandleSection(oDevice, stationCode);
|
||||
// } else if (oDevice._type === deviceType.TrainWindow) {
|
||||
// // 不处理车次窗 勿删
|
||||
// } else if (oDevice._type === deviceType.Psd) {
|
||||
// this.showStationHandlePsd(oDevice, stationCode);
|
||||
// } else {
|
||||
// this.$painter.updateShowStation(oDevice, stationCode);
|
||||
// }
|
||||
this.$painter.updateShowStation(oDevice, stationCode);
|
||||
});
|
||||
this.$painter.$transformHandle.revisibleAll();
|
||||
if (stationCode) {
|
||||
|
@ -239,6 +239,7 @@ class MouseController extends Eventful {
|
||||
this.$jmap.deleteCheckBox('check_box');
|
||||
this.eventTarget = '';
|
||||
this.deviceList = [];
|
||||
store.commit('map/setSeclectDeviceList', this.deviceList); // 给store设置框选的 model
|
||||
}
|
||||
}
|
||||
// 通过包围盒筛选选中区域的元素
|
||||
@ -276,8 +277,7 @@ class MouseController extends Eventful {
|
||||
if (this.whetherInclude(boundingRect, deviceBoundingRect )) {
|
||||
includeDeviceList.push(item);
|
||||
}
|
||||
}
|
||||
if (item.instance && item.instance._type == deviceType.Switch) {
|
||||
} else if (item.instance && item.instance._type == deviceType.Switch) {
|
||||
const deviceBoundingRect = {
|
||||
x1: item.intersection.x,
|
||||
y1: item.intersection.y,
|
||||
@ -287,8 +287,7 @@ class MouseController extends Eventful {
|
||||
if (this.whetherInclude(boundingRect, deviceBoundingRect )) {
|
||||
includeDeviceList.push(item);
|
||||
}
|
||||
}
|
||||
if (item.instance && item.instance._type == deviceType.Signal) {
|
||||
} else if (item.instance && item.instance._type == deviceType.Signal) {
|
||||
const deviceBoundingRect = {
|
||||
x1: item.position.x,
|
||||
y1: item.position.y,
|
||||
@ -298,6 +297,27 @@ class MouseController extends Eventful {
|
||||
if (this.whetherInclude(boundingRect, deviceBoundingRect )) {
|
||||
includeDeviceList.push(item);
|
||||
}
|
||||
} else if (item.instance && item.instance._type == deviceType.Psd) {
|
||||
const deviceBoundingRect = {
|
||||
x1: item.position.x,
|
||||
y1: item.position.y,
|
||||
x2: item.position.x,
|
||||
y2: item.position.y
|
||||
};
|
||||
if (this.whetherInclude(boundingRect, deviceBoundingRect )) {
|
||||
includeDeviceList.push(item);
|
||||
}
|
||||
} else if (item.instance && item.instance._type !== deviceType.TrainWindow && item.instance._type !== deviceType.CheckBox && item.instance._type !== deviceType.Train) {
|
||||
const rect = item.instance.getBoundingRect();
|
||||
const deviceBoundingRect = {
|
||||
x1: rect.x,
|
||||
y1: rect.y,
|
||||
x2: rect.x,
|
||||
y2: rect.y
|
||||
};
|
||||
if (this.whetherInclude(boundingRect, deviceBoundingRect)) {
|
||||
includeDeviceList.push(item);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.deviceList = includeDeviceList;
|
||||
|
@ -199,11 +199,11 @@ class Painter {
|
||||
device.instance.setShowStation(stationCode);
|
||||
}
|
||||
}
|
||||
updateSpecialShowStation(device, flag) {
|
||||
if (device && device.instance) {
|
||||
device.instance.setShowStation(flag);
|
||||
}
|
||||
}
|
||||
// updateSpecialShowStation(device, flag) {
|
||||
// if (device && device.instance) {
|
||||
// device.instance.setShowStation(flag);
|
||||
// }
|
||||
// }
|
||||
/**
|
||||
* 更新transform变化
|
||||
* @param {*} opt
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class Arrow extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -53,7 +54,7 @@ export default class Arrow extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -7,6 +7,7 @@ import Text from 'zrender/src/graphic/Text';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import EMouse from './EMouse';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class AutoTurnBack extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -172,7 +173,7 @@ export default class AutoTurnBack extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.isShowShape = true;
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -6,6 +6,7 @@ import Arc from 'zrender/src/graphic/shape/Arc';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import EMouse from './EMouse';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class AutomacticRoute extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -137,7 +138,7 @@ export default class AutomacticRoute extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.isShowShape = true;
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -6,6 +6,7 @@ import Arc from 'zrender/src/graphic/shape/Arc';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import EMouse from './EMouse';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class AxleReset extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -83,18 +84,18 @@ export default class AxleReset extends Group {
|
||||
this.add(this.text);
|
||||
}
|
||||
|
||||
setAshShow() {
|
||||
this.control && this.control.setStyle({fill:'#FFF'});
|
||||
}
|
||||
setAshShow() {
|
||||
this.control && this.control.setStyle({fill:'#FFF'});
|
||||
}
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
// 只响应前端自定义类型的状态变化
|
||||
if (model._free) {
|
||||
this.setAshShow()
|
||||
} else {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
// 只响应前端自定义类型的状态变化
|
||||
if (model._free) {
|
||||
this.setAshShow();
|
||||
} else {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
@ -141,7 +142,7 @@ export default class AxleReset extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.isShowShape = true;
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class DirectionRod extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -97,7 +98,7 @@ export default class DirectionRod extends Group {
|
||||
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.deviceStationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.isShowShape = true;
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -3,6 +3,7 @@
|
||||
*/
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class FloodGate extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -61,7 +62,7 @@ export default class FloodGate extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.isShowShape = true;
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -6,6 +6,7 @@ import Arc from 'zrender/src/graphic/shape/Arc';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import EMouse from './EMouse';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class GuideLock extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -86,22 +87,22 @@ export default class GuideLock extends Group {
|
||||
}
|
||||
handleSignal() {
|
||||
this.control.setStyle({ fill: this.style.GuideLock.lamp.lightUpColor });
|
||||
}
|
||||
}
|
||||
|
||||
setAshShow() {
|
||||
this.control && this.control.setStyle({fill:'#FFF'});
|
||||
}
|
||||
setAshShow() {
|
||||
this.control && this.control.setStyle({fill:'#FFF'});
|
||||
}
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
// 只响应前端自定义类型的状态变化
|
||||
if (model._free) {
|
||||
this.setAshShow()
|
||||
} else {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
model.totalGuideLock && this.handleSignal();
|
||||
}
|
||||
// 只响应前端自定义类型的状态变化
|
||||
if (model._free) {
|
||||
this.setAshShow();
|
||||
} else {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
model.totalGuideLock && this.handleSignal();
|
||||
}
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
@ -148,7 +149,7 @@ export default class GuideLock extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.isShowShape = true;
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -4,6 +4,7 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import EControl from '../element/EControl';
|
||||
import EMouse from './EMouse';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class LcControl extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -53,19 +54,18 @@ export default class LcControl extends Group {
|
||||
this.add(this.control);
|
||||
}
|
||||
|
||||
setAshShow() {
|
||||
this.control && this.control.setControlColor('#7F7F7F');
|
||||
}
|
||||
|
||||
setAshShow() {
|
||||
this.control && this.control.setControlColor('#7F7F7F');
|
||||
}
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
// 只响应前端自定义类型的状态变化
|
||||
if (model._free) {
|
||||
this.setAshShow()
|
||||
} else {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
// 只响应前端自定义类型的状态变化
|
||||
if (model._free) {
|
||||
this.setAshShow();
|
||||
} else {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
@ -89,7 +89,7 @@ export default class LcControl extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.control.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -4,6 +4,7 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import EControl from '../element/EControl';
|
||||
import EMouse from './EMouse';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class LimitControl extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -57,18 +58,18 @@ export default class LimitControl extends Group {
|
||||
this.add(this.control);
|
||||
}
|
||||
|
||||
setAshShow() {
|
||||
this.control && this.control.setControlColor('#FFF');
|
||||
}
|
||||
setAshShow() {
|
||||
this.control && this.control.setControlColor('#FFF');
|
||||
}
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
// 只响应前端自定义类型的状态变化
|
||||
if (model._free) {
|
||||
this.setAshShow()
|
||||
} else {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
// 只响应前端自定义类型的状态变化
|
||||
if (model._free) {
|
||||
this.setAshShow();
|
||||
} else {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
@ -93,7 +94,7 @@ export default class LimitControl extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.control.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class Line2 extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -105,7 +106,7 @@ export default class Line2 extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.segment && this.segment.show();
|
||||
this.viceSegment && this.viceSegment.show();
|
||||
this.isShowShape = true;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class OutFrame extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -57,7 +58,7 @@ export default class OutFrame extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.box && this.box.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -2,6 +2,7 @@ import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import JTriangle from '../../../utils/JTriangle';
|
||||
import ESeparator from './ESeparator';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class Line2 extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -135,7 +136,7 @@ export default class Line2 extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild((child) => {
|
||||
child.show();
|
||||
});
|
||||
|
@ -5,6 +5,7 @@ import EHorizontal2Door from './EHorizontal2Door';
|
||||
import EHighlight from '../element/EHighlight';
|
||||
import {traverseLineElements} from '../utils/ShapeStatusCovert';
|
||||
import ERectDoor from './ERectDoor';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class Line2 extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -90,8 +91,8 @@ export default class Line2 extends Group {
|
||||
});
|
||||
}
|
||||
}
|
||||
setShowStation(flag) {
|
||||
if (flag) {
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -3,6 +3,7 @@
|
||||
*/
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Image from 'zrender/src/graphic/Image';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class Resource extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -70,7 +71,7 @@ export default class Resource extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.image && this.image.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -6,6 +6,7 @@ import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import EHighlight from '../element/EHighlight';
|
||||
import store from '@/store/index';
|
||||
|
||||
const defaultStyle = {
|
||||
distance: 12,
|
||||
@ -188,7 +189,7 @@ export default class Responder extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.block && this.block.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -10,6 +10,7 @@ import EModeStatus from './EModeStatus';
|
||||
import EUnmanned from './EUnmanned';
|
||||
import EAxle from './EAxle';
|
||||
import EIndicatorLight from './EIndicatorLight';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class SaidLamp extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -222,7 +223,7 @@ export default class SaidLamp extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.control && this.control.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -14,6 +14,7 @@ import ELimitName from './ELimitName'; // 成都三号线 限速名称
|
||||
import { drawSectionStyle } from '../../../config/defaultStyle';
|
||||
import EStopRouteImg from './EStopRouteImg';
|
||||
import EBadShunt from './EBadShunt';
|
||||
import store from '@/store/index';
|
||||
|
||||
const exec = (f, ...args) => { f && f(...args); };
|
||||
const DerailerMap = {
|
||||
@ -594,7 +595,7 @@ export default class Section extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -685,7 +685,11 @@ class Signal extends Group {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
overlapLock() {
|
||||
if (this.style.Signal.lamp.overlapColor) {
|
||||
this.sigName && this.sigName.setStyle({ textFill: this.style.Signal.lamp.overlapColor });
|
||||
}
|
||||
}
|
||||
// 封锁
|
||||
block() {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
@ -970,6 +974,7 @@ class Signal extends Group {
|
||||
}
|
||||
/** 信号机封锁 */ // 缺一个功能封锁
|
||||
model.blockade && this.block(); // 因大铁处理信号按钮状态 封锁处理需在延时解锁时间之后处理
|
||||
model.overlapLock && this.overlapLock();
|
||||
model.reblockade && this.reblock();
|
||||
if (!path.includes('/map/draw')) {
|
||||
// 联锁自动进路通过
|
||||
@ -1170,7 +1175,7 @@ class Signal extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -2,6 +2,7 @@ import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class SignalButton extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -131,7 +132,7 @@ export default class SignalButton extends Group {
|
||||
setShowMode() {
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -2,6 +2,7 @@ import Group from 'zrender/src/container/Group';
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class SplitStation extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -132,7 +133,7 @@ export default class SplitStation extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -783,8 +783,8 @@ export default class Station extends Group {
|
||||
this.troButton && this.troButton.hide();
|
||||
}
|
||||
}
|
||||
setShowStation(flag) {
|
||||
if (flag) {
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (this.model.visible) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
|
@ -4,6 +4,7 @@
|
||||
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class StationCounter extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -90,7 +91,7 @@ export default class StationCounter extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -4,6 +4,7 @@
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class StationDelayUnlock extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -108,7 +109,7 @@ export default class StationDelayUnlock extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -63,17 +63,17 @@ class EReentry extends Group {
|
||||
reentryStrategy = model.defaultReentryStrategy;
|
||||
}
|
||||
switch (reentryStrategy) {
|
||||
case '04': /** 默认*/
|
||||
case '01': {
|
||||
case 'DEFAULT': /** 默认*/
|
||||
case 'NONE': {
|
||||
this.reentry && this.reentry.hideMode(); /** 无折返策略*/
|
||||
break;
|
||||
}
|
||||
case '02': {
|
||||
case 'UNMANNED': {
|
||||
this.showMode(); /** 无人折返*/
|
||||
this.setColor(style.StationStand.reentry.noHumanColor);
|
||||
break;
|
||||
}
|
||||
case '03':/** 自动换端*/ {
|
||||
case 'AUTO':/** 自动换端*/ {
|
||||
this.showMode();
|
||||
this.setColor(style.StationStand.reentry.autoChangeEndsColor);
|
||||
break;
|
||||
|
@ -38,6 +38,7 @@ import ETrainSetButton from './ETrainSetButton';
|
||||
import EStationPlatform from './EStationPlatform';
|
||||
|
||||
import {traverseLineElements, traverseStatusElements} from '../utils/ShapeStatusCovert';
|
||||
import store from '@/store/index';
|
||||
|
||||
class StationStand extends Group {
|
||||
constructor(model, {style, mapDevice}) {
|
||||
@ -248,7 +249,7 @@ class StationStand extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if ((!stationCode || this.model.deviceStationCode === stationCode) && this.model.visible) {
|
||||
if ((!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) && this.model.visible) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -4,6 +4,7 @@ import Text from 'zrender/src/graphic/Text';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import EFoldbackMode from './EFoldbackMode';
|
||||
import EMouse from './EMouse';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class StationTurnBack extends Group {
|
||||
constructor(model, {style, lineCode}) {
|
||||
@ -198,7 +199,7 @@ export default class StationTurnBack extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -12,6 +12,7 @@ import ESwBlock from './ESwBlock';
|
||||
import EMouse from './EMouse';
|
||||
import EHighlight from '../element/EHighlight';
|
||||
import ETriangle from './ETriangle';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class Switch extends Group {
|
||||
constructor(model, {style, mapDevice}) {
|
||||
@ -811,7 +812,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class Text2 extends Group {
|
||||
constructor(model, {style, lineCode}) {
|
||||
@ -11,8 +12,8 @@ export default class Text2 extends Group {
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.z = 6;
|
||||
this.lineCode = lineCode;
|
||||
this.z = 6;
|
||||
this.lineCode = lineCode;
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
@ -69,7 +70,7 @@ export default class Text2 extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -3,7 +3,6 @@ import Text from 'zrender/src/graphic/Text';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import store from '@/store/index';
|
||||
import Vue from 'vue';
|
||||
|
||||
class EMouse extends Group {
|
||||
constructor(device) {
|
||||
@ -58,16 +57,48 @@ class EMouse extends Group {
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
direction = this.device.model.right != 1;
|
||||
}
|
||||
const physicalSection = store.getters['map/getDeviceByCode'](this.device.model.model.physicalCode);
|
||||
let closeDoorTip = '';
|
||||
if (physicalSection.standTrack) {
|
||||
const stationStand = store.state.map.map.stationStandList.find(item => item.standTrackCode === physicalSection.code);
|
||||
if ((stationStand.right && this.device.model.right) || (!stationStand.right && !this.device.model.right)) {
|
||||
if (stationStand.inside) {
|
||||
closeDoorTip = '左开右关';
|
||||
} else {
|
||||
closeDoorTip = '左关右开';
|
||||
}
|
||||
} else {
|
||||
if (stationStand.inside) {
|
||||
closeDoorTip = '左关右开';
|
||||
} else {
|
||||
closeDoorTip = '左开右关';
|
||||
}
|
||||
}
|
||||
}
|
||||
const turnBackStrategyMap = new Map([
|
||||
['NONE', '无折返'],
|
||||
['DEFAULT', '默认'],
|
||||
['AUTO', '自动换端'],
|
||||
['UNMANNED', '无人折返']
|
||||
]);
|
||||
const turnBackStatusMap = new Map([
|
||||
['NON', '无折返'],
|
||||
['INIT', '初始化'],
|
||||
['TO', '开往折返轨'],
|
||||
['STOP', '到达折返轨停稳'],
|
||||
['EXIT', '开出折返轨']
|
||||
]);
|
||||
// \nNumber of people: ${this.device.model.num ? this.device.model.num : 0}
|
||||
const path = window.location.href;
|
||||
const stationNames = new Map(store.state.map.map.stationList.map(s=>[s.code, s.name]));
|
||||
if (!path.includes('/practiceDisplay')) {
|
||||
if (LangStorage.getLang() == 'en') {
|
||||
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : 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 {
|
||||
if (this.device.style.Train.moreTrainDetail) {
|
||||
text = `列车类型: ${trainType}\n来\0\0\0\0源:人工标记\n车\0组\0号: ${this.device.model.groupNumber}\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点: ${destinationText}${this.parseDt(this.device.model.dt)}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel || 'CTC'}车\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
|
||||
text = `列车类型: ${trainType}\n来\0\0\0\0源:人工标记\n车\0组\0号: ${this.device.model.groupNumber}\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点: ${destinationText}${this.parseDt(this.device.model.dt)}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: ${stationNames.get(this.device.model.startStation) || ''}\n终点站名: ${stationNames.get(this.device.model.endStation) || ''}\n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: ${stationNames.get(this.device.model.stationCode) || ''}\n车次通信: 通信车\n运行时间: ${this.device.model.runningTime}s\n停站时间: ${this.device.model.parkingRemainTime < 0 ? '无效' : `${this.device.model.parkingRemainTime}s`}\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel === 'CBTC' ? 'CTC' : this.device.model.runLevel}车\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.model.doorCloseLock ? '关闭' : closeDoorTip}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折返策略: ${turnBackStrategyMap.get(this.device.model.turnBackStrategy) || ''}\n折返状态: ${turnBackStatusMap.get(this.device.model.turnBackStatus)}\n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
|
||||
} else {
|
||||
text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : 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运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: ${stationNames.get(this.device.model.startStation) || ''}\n终点站名: ${stationNames.get(this.device.model.endStation) || ''}\n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : 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`;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -86,6 +86,14 @@ export default class Train extends Group {
|
||||
num:model.num,
|
||||
dt: model.dt,
|
||||
driveMode: model.driveMode,
|
||||
startStation: model.startStation,
|
||||
endStation: model.endStation,
|
||||
runningTime: model.runningTime,
|
||||
parkingRemainTime: model.parkingRemainTime,
|
||||
turnBackStrategy: model.turnBackStrategy,
|
||||
turnBackStatus: model.turnBackStatus,
|
||||
stationCode: model.stationCode,
|
||||
runLevel: model.runLevel,
|
||||
model: model
|
||||
});
|
||||
const rect = this.trainB.getBoundingRectOfFont().clone();
|
||||
@ -447,24 +455,22 @@ export default class Train extends Group {
|
||||
}
|
||||
setShowMode() { }
|
||||
initShowStation(model) {
|
||||
if (model.trainWindowModel && model.trainWindowModel.instance && !model.trainWindowModel.instance.isShowShape) {
|
||||
if (model.trainWindowModel && model.trainWindowModel.instance && !store.getters['map/checkDeviceShow'](model.trainWindowModel.instance.stationCode, model.sectionModel.code)) {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if ((this.model.sectionModel && this.model.sectionModel.stationCode === stationCode) || !stationCode) {
|
||||
if ((this.model.sectionModel && store.getters['map/checkDeviceShow'](stationCode, this.model.sectionModel.code)) || !stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model, this);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
// screenShow() {
|
||||
|
@ -15,6 +15,7 @@ class TrainWindow extends Group {
|
||||
this.z = 9;
|
||||
this.prdType = store.state.training.prdType;
|
||||
this.isShowShape = model.isShowShape;
|
||||
this.stationCode = '';
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -92,19 +93,21 @@ class TrainWindow extends Group {
|
||||
});
|
||||
}
|
||||
}
|
||||
setShowStation(flag) {
|
||||
if (flag) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild(item => {
|
||||
item.hide();
|
||||
});
|
||||
this.isShowShape = false;
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
this.stationCode = stationCode;
|
||||
// console.log(this.model);
|
||||
// if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this.model.sectionModel)) {
|
||||
// this.eachChild(item => {
|
||||
// item.show();
|
||||
// });
|
||||
// this.isShowShape = true;
|
||||
// this.setState(this.model);
|
||||
// } else {
|
||||
// this.eachChild(item => {
|
||||
// item.hide();
|
||||
// });
|
||||
// this.isShowShape = false;
|
||||
// }
|
||||
}
|
||||
getAnchorPoint() {
|
||||
return this.model.point || this.model.position;
|
||||
|
@ -4,6 +4,7 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import EControl from '../element/EControl';
|
||||
import EMouse from './EMouse';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default class ZcControl extends Group {
|
||||
constructor(model, {style}) {
|
||||
@ -59,21 +60,22 @@ export default class ZcControl extends Group {
|
||||
|
||||
}
|
||||
|
||||
setAshShow() {
|
||||
this.control && this.control.setControlColor('#7F7F7F');
|
||||
}
|
||||
setAshShow() {
|
||||
this.control && this.control.setControlColor('#7F7F7F');
|
||||
}
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
this.recover();
|
||||
this.recover();
|
||||
|
||||
// 只响应前端自定义类型的状态变化
|
||||
if (model._free) {
|
||||
this.setAshShow()
|
||||
} else {
|
||||
model.fault == 'FAULT' && this.fault();
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
// 只响应前端自定义类型的状态变化
|
||||
if (model._free) {
|
||||
this.setAshShow();
|
||||
} else {
|
||||
model.fault == 'FAULT' && this.fault();
|
||||
model.noService && this.fault();
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
}
|
||||
|
||||
recover() {
|
||||
@ -109,7 +111,7 @@ export default class ZcControl extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -8,7 +8,7 @@ export default class checkBox extends Group {
|
||||
this._type = model._type;
|
||||
this._code = model.code;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = model.z;
|
||||
this.z = model.z || 999;
|
||||
this.create();
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ export default class checkBox extends Group {
|
||||
const model = this.model;
|
||||
this.box = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
z: model.z || 999,
|
||||
draggable: false,
|
||||
shape: {
|
||||
x: model.point.x,
|
||||
|
@ -68,6 +68,7 @@ import { MapDeviceType } from '@/scripts/cmdPlugin/Config';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { TurnBackTypeMap } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'StandDetail',
|
||||
@ -81,12 +82,7 @@ export default {
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
standName: '',
|
||||
strategyMap: {
|
||||
'01': '无折返',
|
||||
'02': '无人折返',
|
||||
'03': '自动换端',
|
||||
'04': '默认'
|
||||
},
|
||||
strategyMap: TurnBackTypeMap,
|
||||
treeData: [
|
||||
{
|
||||
children: [
|
||||
@ -232,7 +228,7 @@ export default {
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
|
@ -92,12 +92,6 @@ export default {
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
standName: '',
|
||||
strategyMap: {
|
||||
'01': '无折返',
|
||||
'02': '无人折返',
|
||||
'03': '自动换端',
|
||||
'04': '默认'
|
||||
},
|
||||
runLevelList: [
|
||||
'自动',
|
||||
'低速',
|
||||
|
@ -1,111 +1,88 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="xian-01__systerm psl-panel"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="psl-title">
|
||||
<div>{{ title }}</div>
|
||||
</div>
|
||||
<div class="psl-content">
|
||||
<!-- <div class="content-row">
|
||||
<div class="btn">
|
||||
<div class="btn-text">
|
||||
有滑动门/应急门未关闭且锁紧指示灯
|
||||
</div>
|
||||
<img
|
||||
:src="getIcon('top', indicators.lock ? 'on' : 'off')"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="content-row">
|
||||
<div class="cell">
|
||||
<div class="btn-text">PSL操作指示灯</div>
|
||||
<img
|
||||
:src="
|
||||
getIcon('red', indicators.pslczLight ? 'on' : 'off')
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="btn-text">互锁解除指示灯</div>
|
||||
<img
|
||||
:src="
|
||||
getIcon('red', indicators.hsjcLight ? 'on' : 'off')
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell">
|
||||
<div class="btn-text">开门状态指示灯</div>
|
||||
<img
|
||||
:src="getIcon('red', indicators.kmLight ? 'on' : 'off')"
|
||||
/>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="btn-text">关门状态指示灯</div>
|
||||
<img
|
||||
:src="
|
||||
getIcon('green', indicators.gmLight ? 'on' : 'off')
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">禁止</div>
|
||||
<img
|
||||
:src="getIcon('key')"
|
||||
:class="['key', { 'key-on': indicators.yxjzKey }]"
|
||||
@click="btnClickHandler('YXJZ')"
|
||||
/>
|
||||
<div class="btn-text-opt">允许</div>
|
||||
</div>
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">禁止</div>
|
||||
<img
|
||||
:src="getIcon('key')"
|
||||
:class="['key', { 'key-on': indicators.hsjcKey }]"
|
||||
@click="btnClickHandler('HSJC')"
|
||||
/>
|
||||
<div class="btn-text-opt">互锁解除</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">开门按钮</div>
|
||||
<img
|
||||
:src="getIcon('red', 'btn')"
|
||||
@click="btnClickHandler('KM')"
|
||||
/>
|
||||
</div>
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">关门按钮</div>
|
||||
<img
|
||||
:src="getIcon('green', 'btn')"
|
||||
@click="btnClickHandler('GM')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">试灯按钮</div>
|
||||
<img class="btn-sd btn-img"
|
||||
:src="getIcon('green', 'btn')"
|
||||
@mousedown.left="btnClickHandler('SD')"
|
||||
@mouseup.left="btnClickHandler('SD')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="xian-01__systerm psl-panel"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="psl-title">
|
||||
<div>{{ title }}</div>
|
||||
</div>
|
||||
<div class="psl-content">
|
||||
<div class="content-row">
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">所有滑动门/应急门关闭且锁紧指示灯</div>
|
||||
<img :src="getIcon('top', indicators.qbgmLight ? 'on' : 'off')" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell">
|
||||
<div class="btn-text">PSL操作指示灯</div>
|
||||
<img :src="getIcon('red', indicators.pslczLight ? 'on' : 'off')" />
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="btn-text">互锁解除指示灯</div>
|
||||
<img :src="getIcon('red', indicators.hsjcLight ? 'on' : 'off')" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell">
|
||||
<div class="btn-text">开门状态指示灯</div>
|
||||
<img :src="getIcon('red', indicators.kmLight ? 'on' : 'off')" />
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="btn-text">关门状态指示灯</div>
|
||||
<img :src="getIcon('green', indicators.gmLight ? 'on' : 'off')" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">禁止</div>
|
||||
<img
|
||||
:src="getIcon('key')"
|
||||
:class="['key', { 'key-on': indicators.yxjzKey }]"
|
||||
@click="btnClickHandler('YXJZ')"
|
||||
/>
|
||||
<div class="btn-text-opt">允许</div>
|
||||
</div>
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">禁止</div>
|
||||
<img
|
||||
:src="getIcon('key')"
|
||||
:class="['key', { 'key-on': indicators.hsjcKey }]"
|
||||
@click="btnClickHandler('HSJC')"
|
||||
/>
|
||||
<div class="btn-text-opt">互锁解除</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">开门按钮</div>
|
||||
<img :src="getIcon('red', 'btn')" @click="btnClickHandler('KM')" />
|
||||
</div>
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">关门按钮</div>
|
||||
<img :src="getIcon('green', 'btn')" @click="btnClickHandler('GM')" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">试灯按钮</div>
|
||||
<img
|
||||
class="btn-sd btn-img"
|
||||
:src="getIcon('green', 'btn')"
|
||||
@mousedown.left="btnClickHandler('SD')"
|
||||
@mouseup.left="btnClickHandler('SD')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -113,111 +90,109 @@ import icons from "@/assets/psl_images/psl_icons";
|
||||
import { getPslStatus, pressPslButton } from "@/api/simulation";
|
||||
let standCode, group;
|
||||
export default {
|
||||
name: "PSL",
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
indicators: {
|
||||
// lock: false,
|
||||
pslczLight: false,
|
||||
hsjcLight: false,
|
||||
kmLight: false,
|
||||
gmLight: false,
|
||||
yxjzKey: false,
|
||||
hsjcKey: false
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return "PSL";
|
||||
},
|
||||
name: "PSL",
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
indicators: {
|
||||
qbgmLight: true,
|
||||
pslczLight: false,
|
||||
hsjcLight: false,
|
||||
kmLight: false,
|
||||
gmLight: false,
|
||||
yxjzKey: false,
|
||||
hsjcKey: false
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return "PSL";
|
||||
},
|
||||
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(selected) {
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function() {
|
||||
this.$store.dispatch("training/emitTipFresh");
|
||||
});
|
||||
standCode = selected.code;
|
||||
group = this.$route.query.group;
|
||||
this.initData(group, standCode);
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(selected) {
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function() {
|
||||
this.$store.dispatch("training/emitTipFresh");
|
||||
});
|
||||
standCode = selected.code;
|
||||
group = this.$route.query.group;
|
||||
this.initData(group, standCode);
|
||||
},
|
||||
|
||||
initData(group, standCode) {
|
||||
getPslStatus(group, standCode)
|
||||
.then(resp => {
|
||||
if (resp.data) {
|
||||
this.indicators = resp.data;
|
||||
}
|
||||
})
|
||||
.catch(err => {});
|
||||
},
|
||||
initData(group, standCode) {
|
||||
getPslStatus(group, standCode)
|
||||
.then(resp => {
|
||||
if (resp.data) {
|
||||
this.indicators = resp.data;
|
||||
}
|
||||
})
|
||||
.catch(err => {});
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch("training/emitTipFresh");
|
||||
},
|
||||
getIcon(type, status) {
|
||||
return status !== undefined
|
||||
? icons[`${type}_${status}`]
|
||||
: icons[type];
|
||||
},
|
||||
btnClickHandler(btnType) {
|
||||
pressPslButton(group, standCode, btnType);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"$store.state.socket.simulationPslStatus": function(val) {
|
||||
if (val && val[standCode]) {
|
||||
Object.assign(this.indicators, val[standCode])
|
||||
}
|
||||
}
|
||||
}
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch("training/emitTipFresh");
|
||||
},
|
||||
getIcon(type, status) {
|
||||
return status !== undefined ? icons[`${type}_${status}`] : icons[type];
|
||||
},
|
||||
btnClickHandler(btnType) {
|
||||
pressPslButton(group, standCode, btnType);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"$store.state.socket.simulationPslStatus": function(val) {
|
||||
if (val && val[standCode]) {
|
||||
Object.assign(this.indicators, val[standCode]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.psl-title {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
color: #000;
|
||||
font-size: 18px;
|
||||
margin: 30px 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
color: #000;
|
||||
font-size: 18px;
|
||||
margin: 30px 0;
|
||||
}
|
||||
.psl-content {
|
||||
.content-row {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
margin: 10px 0;
|
||||
.cell {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 120px;
|
||||
height: 100px;
|
||||
.key {
|
||||
transition: 0.1s;
|
||||
}
|
||||
.key-on {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.btn-text-opt {
|
||||
position: absolute;
|
||||
left: 80%;
|
||||
top: 35%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.content-row {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
margin: 10px 0;
|
||||
.cell {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 120px;
|
||||
height: 100px;
|
||||
.key {
|
||||
transition: 0.1s;
|
||||
}
|
||||
.key-on {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.btn-text-opt {
|
||||
position: absolute;
|
||||
left: 80%;
|
||||
top: 35%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -242,6 +242,9 @@ export default {
|
||||
faultType: this.form.faultType
|
||||
}
|
||||
};
|
||||
if (this.selected._type === 'Switch' && this.form.faultType === 'ARB') {
|
||||
setp.param.code = this.selected.sectionParentCode;
|
||||
}
|
||||
this.sendCommand(setp);
|
||||
},
|
||||
sendInstructions() { // 发送指令
|
||||
@ -253,6 +256,9 @@ export default {
|
||||
faultType: this.form.faultType
|
||||
}
|
||||
};
|
||||
if (this.selected._type === 'Switch' && this.form.faultType === 'ARB') {
|
||||
setp.param.code = this.selected.sectionParentCode;
|
||||
}
|
||||
this.sendCommand(setp);
|
||||
},
|
||||
handleCollocation() { // 设置托管
|
||||
|
@ -93,7 +93,7 @@ export default {
|
||||
},
|
||||
groupNumber: '',
|
||||
field: '',
|
||||
selected: null,
|
||||
selected: null,
|
||||
rules: {
|
||||
groupNumber2: [
|
||||
{ required: true, message: '请选择被动车', trigger: 'change'}
|
||||
@ -146,8 +146,8 @@ export default {
|
||||
this.field = field == this.field ? '' : field;
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.$root.$emit('dialogOpen', selected);
|
||||
this.selected = selected;
|
||||
this.$root.$emit('dialogOpen', selected);
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
this.cmdType = operate.cmdType;
|
||||
@ -164,7 +164,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.form.resetFields();
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
|
@ -62,12 +62,6 @@ export default {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
strategyMap: {
|
||||
'01': '无折返',
|
||||
'02': '无人折返',
|
||||
'03': '自动换端',
|
||||
'04': '默认'
|
||||
},
|
||||
treeData: [
|
||||
{
|
||||
children: [
|
||||
|
@ -1,94 +1,108 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :class="popClass + ' train-control'" :title="title" :visible.sync="show" width="370px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-form ref="form" size="small" label-width="120px" :model="formModel" :rules="rules">
|
||||
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber">
|
||||
<el-select
|
||||
:id="domIdTrainNumber"
|
||||
v-model="formModel.groupNumber"
|
||||
filterable
|
||||
:disabled="trainNumberIsDisabled"
|
||||
@change="trainNumberChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="type" label-width="0px">
|
||||
<el-radio-group
|
||||
:id="domIdTrainType"
|
||||
v-model="formModel.type"
|
||||
style="margin-left: 45px;"
|
||||
@change="trainTypeChange"
|
||||
>
|
||||
<el-radio :label="'PLAN'">{{ $t('menu.planTrain') }}</el-radio>
|
||||
<el-radio :label="'HEAD'">{{ $t('menu.headCodeTrain') }}</el-radio>
|
||||
<el-radio :label="'MANUAL'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formModel.type == 'PLAN'|| formModel.type == 'HEAD'" prop="serviceNumber">
|
||||
<span slot="label">{{ $t('menu.serviceNumber') + ':' }}</span>
|
||||
<el-input
|
||||
:id="domIdServerNo"
|
||||
v-model="formModel.serviceNumber"
|
||||
:disabled="serverNoIsDisabled"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formModel.type == 'PLAN'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
|
||||
<el-input
|
||||
:id="domIdTrainNo"
|
||||
v-model="formModel.tripNumber"
|
||||
maxlength="4"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formModel.type == 'PLAN' || formModel.type == 'HEAD'" :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="destinationCode">
|
||||
<el-input
|
||||
:id="domIdTargetCode"
|
||||
v-model="formModel.destinationCode"
|
||||
:disabled="formModel.type !== 'HEAD'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formModel.type == 'MANUAL'" :label="this.$t('menu.category')+this.$t('global.colon')" prop="category">
|
||||
<el-select
|
||||
:id="domIdTrainNumber"
|
||||
v-model="formModel.category"
|
||||
filterable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in categoryList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" :pop-class="popClass" />
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
:class="popClass + ' train-control'"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="370px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="120px" :model="formModel" :rules="rulesComputed">
|
||||
<el-form-item :label="this.$t('menu.groupNumber') + this.$t('global.colon')" prop="groupNumber">
|
||||
<el-select
|
||||
:id="domIdTrainNumber"
|
||||
v-model="formModel.groupNumber"
|
||||
filterable
|
||||
:disabled="trainNumberIsDisabled"
|
||||
@change="trainNumberChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="type" label-width="0px">
|
||||
<el-radio-group
|
||||
:id="domIdTrainType"
|
||||
v-model="formModel.type"
|
||||
style="margin-left: 45px;"
|
||||
@change="trainTypeChange"
|
||||
>
|
||||
<el-radio :label="'PLAN'">{{ $t("menu.planTrain") }}</el-radio>
|
||||
<el-radio :label="'HEAD'">{{ $t("menu.headCodeTrain") }}</el-radio>
|
||||
<el-radio :label="'MANUAL'" style="margin-top:5px;">{{ $t("menu.artificialTrain") }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 表号 -->
|
||||
<el-form-item v-if="formModel.type == 'PLAN'" prop="serviceNumber">
|
||||
<span slot="label">{{ $t("menu.serviceNumber") + ":" }}</span>
|
||||
<el-input :id="domIdServerNo" v-model="formModel.serviceNumber" :disabled="serverNoIsDisabled" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 车次号 -->
|
||||
<el-form-item
|
||||
v-if="formModel.type == 'PLAN' || formModel.type == 'HEAD'"
|
||||
:label="this.$t('menu.tripNumber') + this.$t('global.colon')"
|
||||
prop="tripNumber"
|
||||
>
|
||||
<el-input :id="domIdTrainNo" v-model="formModel.tripNumber" maxlength="4" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 目的地号 -->
|
||||
<el-form-item
|
||||
v-if="formModel.type == 'PLAN' || formModel.type == 'HEAD'"
|
||||
:label="this.$t('menu.targetCode') + this.$t('global.colon')"
|
||||
prop="destinationCode"
|
||||
>
|
||||
<el-input
|
||||
:id="domIdTargetCode"
|
||||
v-model="formModel.destinationCode"
|
||||
:disabled="formModel.type !== 'HEAD'"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 类别 -->
|
||||
<el-form-item
|
||||
v-if="formModel.type == 'MANUAL'"
|
||||
:label="this.$t('menu.category') + this.$t('global.colon')"
|
||||
prop="category"
|
||||
>
|
||||
<el-select :id="domIdTrainNumber" v-model="formModel.category" filterable :disabled="true">
|
||||
<el-option v-for="item in categoryList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{
|
||||
$t("global.confirm")
|
||||
}}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t("global.cancel") }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" :pop-class="popClass" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import {getTrainDetailBytripNumber, getTrainDetailByStNumber} from '@/api/simulation';
|
||||
import NoticeInfo from '../childDialog/noticeInfo';
|
||||
import { mapGetters } from "vuex";
|
||||
import { OperationEvent } from "@/scripts/cmdPlugin/OperationHandler";
|
||||
import Handler from "@/scripts/cmdPlugin/Handler";
|
||||
import { menuOperate, commitOperate } from "@/jmapNew/theme/components/utils/menuOperate";
|
||||
import { getTrainDetailBytripNumber, getTrainDetailByStNumber } from "@/api/simulation";
|
||||
import NoticeInfo from "../childDialog/noticeInfo";
|
||||
|
||||
export default {
|
||||
name: 'TrainControl',
|
||||
name: "TrainControl",
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
@ -96,52 +110,61 @@ export default {
|
||||
popClass: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainList: [],
|
||||
serviceNumber:'',
|
||||
serviceNumber: "",
|
||||
formModel: {
|
||||
tripNumber: '',
|
||||
groupNumber: '',
|
||||
type: 'PLAN',
|
||||
serviceNumber: '',
|
||||
destinationCode: '',
|
||||
category: 'MM'
|
||||
},
|
||||
categoryList: [
|
||||
{ name: 'MM', value: '01' }
|
||||
],
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请选择车组号', trigger: 'change' }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: '请选择列车类型', trigger: 'change' }
|
||||
],
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
destinationCode: [
|
||||
{ required: true, message: '请输入目的地号', trigger: 'blur' }
|
||||
]
|
||||
tripNumber: "",
|
||||
groupNumber: "",
|
||||
type: "PLAN",
|
||||
serviceNumber: "",
|
||||
destinationCode: "",
|
||||
category: "MM"
|
||||
},
|
||||
categoryList: [{ name: "MM", value: "01" }],
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
direction: 0,
|
||||
selected: null
|
||||
selected: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
...mapGetters("map", ["map"]),
|
||||
rulesComputed() {
|
||||
const validateTripNum = (rule, value, callback) => {
|
||||
const trip = Number.parseInt(value.substring(1));
|
||||
if (
|
||||
this.formModel.type === "HEAD" &&
|
||||
this.popClass === "xian-01__systerm" &&
|
||||
(trip < 701 || trip > 749)
|
||||
) {
|
||||
callback(new Error("头码车车次编号为701至749"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
groupNumber: [{ required: true, message: "请选择车组号", trigger: "change" }],
|
||||
type: [{ required: true, message: "请选择列车类型", trigger: "change" }],
|
||||
tripNumber: [
|
||||
{
|
||||
required: !(this.formModel.type === "HEAD" && this.popClass === "xian-01__systerm"),
|
||||
message: "请输入车次号",
|
||||
trigger: "change"
|
||||
},
|
||||
{ validator: validateTripNum, trigger: "change" }
|
||||
],
|
||||
destinationCode: [{ required: true, message: "请输入目的地号", trigger: "change" }]
|
||||
};
|
||||
},
|
||||
serverNoIsDisabled() {
|
||||
if (this.popClass === 'foshan-01__systerm' && this.formModel.type === 'PLAN') {
|
||||
if (this.popClass === "foshan-01__systerm" && this.formModel.type === "PLAN") {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
@ -151,7 +174,7 @@ export default {
|
||||
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return true;
|
||||
}
|
||||
return '';
|
||||
return "";
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
@ -166,7 +189,7 @@ export default {
|
||||
return OperationEvent.Train.editTrainId.trainNumberChange.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
return "";
|
||||
},
|
||||
domIdTrainNo() {
|
||||
if (this.dialogShow) {
|
||||
@ -178,7 +201,7 @@ export default {
|
||||
return OperationEvent.Train.editTrainId.trainNoChange.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
return "";
|
||||
},
|
||||
domIdTrainType() {
|
||||
if (this.dialogShow) {
|
||||
@ -190,7 +213,7 @@ export default {
|
||||
return OperationEvent.Train.editTrainId.trainTypeChange.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
return "";
|
||||
},
|
||||
domIdServerNo() {
|
||||
if (this.dialogShow) {
|
||||
@ -202,7 +225,7 @@ export default {
|
||||
return OperationEvent.Train.editTrainId.serverNoChange.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
return "";
|
||||
},
|
||||
domIdTargetCode() {
|
||||
if (this.dialogShow) {
|
||||
@ -214,7 +237,7 @@ export default {
|
||||
return OperationEvent.Train.editTrainId.targetCodeChange.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
return "";
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
@ -226,63 +249,66 @@ export default {
|
||||
return OperationEvent.Train.editTrainId.menu.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
return "";
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : "";
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return '添加列车识别号';
|
||||
return "添加列车识别号";
|
||||
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
|
||||
return '修改列车识别号';
|
||||
return "修改列车识别号";
|
||||
}
|
||||
return '';
|
||||
return "";
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'formModel.tripNumber': function(val) {
|
||||
if (this.popClass !== 'foshan-01__systerm' && val.length === 4) {
|
||||
"formModel.tripNumber": function(val) {
|
||||
if (this.popClass !== "foshan-01__systerm" && val.length === 4 && this.formModel.type !== "HEAD") {
|
||||
this.trainNoChange(val);
|
||||
} else if (this.popClass !== 'foshan-01__systerm') {
|
||||
} else if (this.popClass !== "foshan-01__systerm" && this.formModel.type !== "HEAD") {
|
||||
this.formModel = {
|
||||
groupNumber: this.formModel.groupNumber,
|
||||
tripNumber: val,
|
||||
type: this.formModel.type,
|
||||
serviceNumber: '',
|
||||
targetCode: '',
|
||||
category: 'MM'
|
||||
serviceNumber: "",
|
||||
category: "MM",
|
||||
destinationCode: ""
|
||||
};
|
||||
} else if (this.popClass === 'foshan-01__systerm' && val.length === 2 && this.formModel.serviceNumber.length === 3) {
|
||||
} else if (
|
||||
this.popClass === "foshan-01__systerm" &&
|
||||
val.length === 2 &&
|
||||
this.formModel.serviceNumber.length === 3 &&
|
||||
this.formModel.type !== "HEAD"
|
||||
) {
|
||||
this.trainNoChange(val, this.formModel.serviceNumber);
|
||||
} else if (this.popClass === 'foshan-01__systerm') {
|
||||
const serviceNumber = this.formModel.serviceNumber;
|
||||
const destinationCode = this.formModel.destinationCode;
|
||||
} else if (this.popClass === "foshan-01__systerm" && this.formModel.type !== "HEAD") {
|
||||
let serviceNumber = this.formModel.serviceNumber;
|
||||
let destinationCode = this.formModel.destinationCode;
|
||||
this.formModel = {
|
||||
groupNumber: this.formModel.groupNumber,
|
||||
destinationCode: destinationCode,
|
||||
tripNumber: val,
|
||||
type: this.formModel.type,
|
||||
serviceNumber: serviceNumber,
|
||||
targetCode: '',
|
||||
category: 'MM'
|
||||
category: "MM"
|
||||
};
|
||||
}
|
||||
},
|
||||
'formModel.serviceNumber': function(val) {
|
||||
if (this.popClass === 'foshan-01__systerm' && val.length === 3 && this.formModel.tripNumber.length === 2) {
|
||||
"formModel.serviceNumber": function(val) {
|
||||
if (this.popClass === "foshan-01__systerm" && val.length === 3 && this.formModel.tripNumber.length === 2) {
|
||||
this.trainNoChange(this.formModel.tripNumber, val);
|
||||
} else if (this.popClass === 'foshan-01__systerm') {
|
||||
const tripNumber = this.formModel.tripNumber;
|
||||
const destinationCode = this.formModel.destinationCode;
|
||||
} else if (this.popClass === "foshan-01__systerm") {
|
||||
let tripNumber = this.formModel.tripNumber;
|
||||
let destinationCode = this.formModel.destinationCode;
|
||||
this.formModel = {
|
||||
groupNumber: this.formModel.groupNumber,
|
||||
tripNumber: tripNumber,
|
||||
destinationCode: destinationCode,
|
||||
type: this.formModel.type,
|
||||
serviceNumber: val,
|
||||
targetCode: '',
|
||||
category: 'MM'
|
||||
category: "MM"
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -290,40 +316,40 @@ export default {
|
||||
methods: {
|
||||
loadInitData(map) {},
|
||||
doShow(operate, selected) {
|
||||
this.$root.$emit('dialogOpen', selected);
|
||||
this.selected = selected;
|
||||
this.$root.$emit("dialogOpen", selected);
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
const model = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||
const model = this.$store.getters["map/getDeviceByCode"](selected.code);
|
||||
this.serviceNumber = model.serviceNumber;
|
||||
this.formModel = {
|
||||
groupNumber: model.groupNumber,
|
||||
tripNumber: model.tripNumber,
|
||||
type: model.type ? model.type : 'PLAN',
|
||||
type: model.type ? model.type : "PLAN",
|
||||
serviceNumber: model.serviceNumber,
|
||||
destinationCode: model.destinationCode,
|
||||
category: 'MM'
|
||||
category: "MM"
|
||||
};
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$nextTick(function() {
|
||||
this.$store.dispatch("training/emitTipFresh");
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$root.$emit("dialogClose", this.selected);
|
||||
this.$store.dispatch("training/emitTipFresh");
|
||||
this.$store.dispatch("map/setTrainWindowShow", false);
|
||||
},
|
||||
trainNumberChange(groupNumber) {
|
||||
const operate = {
|
||||
groupNumber: groupNumber,
|
||||
operation: ''
|
||||
operation: ""
|
||||
};
|
||||
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
|
||||
operate.operation = OperationEvent.Train.addTrainId.trainNumberChange.operation;
|
||||
@ -331,37 +357,37 @@ export default {
|
||||
operate.operation = OperationEvent.Train.editTrainId.trainNumberChange.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch("training/nextNew", operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch("menuOperation/handleBreakFlag", { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
trainTypeChange(trainType) {
|
||||
if (trainType === 'HEAD') {
|
||||
this.formModel.serviceNumber = '';
|
||||
} else if (trainType === 'PLAN' && this.serviceNumber) {
|
||||
if (trainType === "HEAD") {
|
||||
this.formModel.serviceNumber = "";
|
||||
} else if (trainType === "PLAN" && this.serviceNumber) {
|
||||
this.formModel.serviceNumber = this.serviceNumber;
|
||||
}
|
||||
const operate = {
|
||||
type: trainType,
|
||||
operation: ''
|
||||
operation: ""
|
||||
};
|
||||
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
|
||||
operate.operation = OperationEvent.Train.addTrainId.trainTypeChange.operation;
|
||||
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
|
||||
operate.operation = OperationEvent.Train.editTrainId.trainTypeChange.operation;
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch("training/nextNew", operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch("menuOperation/handleBreakFlag", { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
trainNoChange(tripNumber, serviceNumber) {
|
||||
const operate = {
|
||||
tripNumber: tripNumber,
|
||||
operation: ''
|
||||
operation: ""
|
||||
};
|
||||
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
|
||||
operate.operation = OperationEvent.Train.addTrainId.trainNoChange.operation;
|
||||
@ -370,30 +396,35 @@ export default {
|
||||
}
|
||||
Handler.undo(1);
|
||||
try {
|
||||
if (this.popClass === 'foshan-01__systerm') {
|
||||
getTrainDetailByStNumber(this.$route.query.group, {tripNumber: tripNumber, serviceNumber: serviceNumber}).then(resp => {
|
||||
if (this.popClass === "foshan-01__systerm") {
|
||||
getTrainDetailByStNumber(this.$route.query.group, {
|
||||
tripNumber: tripNumber,
|
||||
serviceNumber: serviceNumber
|
||||
}).then(resp => {
|
||||
if (resp.data) {
|
||||
this.formModel.destinationCode = resp.data.destinationCode;
|
||||
} else {
|
||||
this.$message.error('未找到输入列车信息!');
|
||||
this.$message.error("未找到输入列车信息!");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
getTrainDetailBytripNumber(this.$route.query.group, {tripNumber:tripNumber}).then(resp => {
|
||||
getTrainDetailBytripNumber(this.$route.query.group, {
|
||||
tripNumber: tripNumber
|
||||
}).then(resp => {
|
||||
if (resp.data) {
|
||||
this.formModel.serviceNumber = resp.data.serviceNumber;
|
||||
this.formModel.destinationCode = resp.data.destinationCode;
|
||||
} else {
|
||||
this.$message.error('未找到输入列车信息!');
|
||||
this.$message.error("未找到输入列车信息!");
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.error('获取列车信息失败!');
|
||||
this.$message.error("获取列车信息失败!");
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch("training/nextNew", operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch("menuOperation/handleBreakFlag", { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -408,33 +439,35 @@ export default {
|
||||
},
|
||||
// 增加列车识别号
|
||||
addTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
const params = {
|
||||
groupNumber: this.formModel.groupNumber,
|
||||
type: this.formModel.type,
|
||||
serviceNumber: '',
|
||||
tripNumber: '',
|
||||
destinationCode: ''
|
||||
serviceNumber: "",
|
||||
tripNumber: "",
|
||||
destinationCode: ""
|
||||
};
|
||||
if (this.formModel.type === 'PLAN') {
|
||||
if (this.formModel.type === "PLAN") {
|
||||
params.serviceNumber = this.formModel.serviceNumber;
|
||||
params.tripNumber = this.formModel.tripNumber;
|
||||
params.destinationCode = this.formModel.destinationCode;
|
||||
} else if (this.formModel.type === 'HEAD') {
|
||||
} else if (this.formModel.type === "HEAD") {
|
||||
params.tripNumber = this.formModel.tripNumber;
|
||||
params.destinationCode = this.formModel.destinationCode;
|
||||
}
|
||||
commitOperate(menuOperate.TrainWindow.addTrainId, params, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
commitOperate(menuOperate.TrainWindow.addTrainId, params, 2)
|
||||
.then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -442,33 +475,35 @@ export default {
|
||||
},
|
||||
// 修改列车识别号
|
||||
editTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
const params = {
|
||||
groupNumber: this.formModel.groupNumber,
|
||||
type: this.formModel.type,
|
||||
serviceNumber: '',
|
||||
tripNumber: '',
|
||||
destinationCode: ''
|
||||
serviceNumber: "",
|
||||
tripNumber: "",
|
||||
destinationCode: ""
|
||||
};
|
||||
if (this.formModel.type === 'PLAN') {
|
||||
if (this.formModel.type === "PLAN") {
|
||||
params.serviceNumber = this.formModel.serviceNumber;
|
||||
params.tripNumber = this.formModel.tripNumber;
|
||||
params.destinationCode = this.formModel.destinationCode;
|
||||
} else if (this.formModel.type === 'HEAD') {
|
||||
} else if (this.formModel.type === "HEAD") {
|
||||
params.tripNumber = this.formModel.tripNumber;
|
||||
params.destinationCode = this.formModel.destinationCode;
|
||||
}
|
||||
commitOperate(menuOperate.TrainWindow.editTrainId, params, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
commitOperate(menuOperate.TrainWindow.editTrainId, params, 2)
|
||||
.then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -478,13 +513,16 @@ export default {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store
|
||||
.dispatch("training/nextNew", operate)
|
||||
.then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -17,7 +17,7 @@
|
||||
<div style="display: flex;align-items: center;">
|
||||
<el-input v-model="addModel.speedLimit" style="width: 130px;margin-right: 10px;" size="small" />
|
||||
<span>km/h</span>
|
||||
<el-tooltip style="margin-left: 10px;" effect="dark" content="值为25-65之间,-1为取消限速" placement="top-start">
|
||||
<el-tooltip style="margin-left: 10px;" effect="dark" content="值为5-65之间,-1为取消限速" placement="top-start">
|
||||
<i class="el-icon-warning" />
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@ -94,10 +94,10 @@ export default {
|
||||
validateLimit(rule, value, callback) {
|
||||
const num = Number(value);
|
||||
if (num) {
|
||||
if ((num >= 25 && num <= 65) || num === -1) {
|
||||
if ((num >= 5 && num <= 65) || num === -1) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('限速值应该在25-65之间'));
|
||||
callback(new Error('限速值应该在5-65之间'));
|
||||
}
|
||||
} else {
|
||||
callback(new Error('请输入数值类型'));
|
||||
|
@ -92,12 +92,6 @@ export default {
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
standName: '',
|
||||
strategyMap: {
|
||||
'01': '无折返',
|
||||
'02': '无人折返',
|
||||
'03': '自动换端',
|
||||
'04': '默认'
|
||||
},
|
||||
runLevelList: [
|
||||
'自动',
|
||||
'低速',
|
||||
|
@ -83,6 +83,7 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
|
||||
export default {
|
||||
name: 'StandBackStrategy',
|
||||
@ -95,24 +96,7 @@ export default {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
strategyList: [
|
||||
{
|
||||
value: '01',
|
||||
label: this.$t('menu.noSwitchback')
|
||||
},
|
||||
{
|
||||
value: '02',
|
||||
label: this.$t('menu.noOneSwitchback')
|
||||
},
|
||||
{
|
||||
value: '03',
|
||||
label: this.$t('menu.automaticChange')
|
||||
},
|
||||
{
|
||||
value: '04',
|
||||
label: this.$t('menu.default')
|
||||
}
|
||||
],
|
||||
strategyList: ConstConfig.ConstSelect.turnBackTypeList,
|
||||
stationName: '',
|
||||
standStatus: '',
|
||||
selection: [],
|
||||
@ -146,8 +130,9 @@ export default {
|
||||
methods: {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: selected.reentryStrategy || '04' });
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
const stand = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||
this.tempData.push({ name: station.name, station: station.name, strategy: stand.typeStrategy || 'DEFAULT' });
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
|
@ -6,9 +6,11 @@
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
<view-device ref="viewDevice" />
|
||||
<train-add ref="trainAdd" />
|
||||
<!-- <train-add ref="trainAdd" /> -->
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" />
|
||||
<!-- <train-delete ref="trainDelete" /> -->
|
||||
<add-runplan-line ref="addRunplanLine" />
|
||||
<delete-runplan-line ref="deleteRunplanLine" />
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
</div>
|
||||
@ -18,9 +20,11 @@
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBar';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import TrainAdd from './menuDialog/trainAdd';
|
||||
// import TrainAdd from './menuDialog/trainAdd';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
// import TrainDelete from './menuDialog/trainDelete';
|
||||
import AddRunplanLine from './menuDialog/addRunplanLine';
|
||||
import DeleteRunplanLine from './menuDialog/deleteRunplanLine';
|
||||
import PasswordBox from './menuDialog/passwordBox';
|
||||
import ViewTrainId from './menuDialog/viewTrainId';
|
||||
import ViewName from './menuDialog/viewName';
|
||||
@ -38,9 +42,11 @@ export default {
|
||||
ViewTrainId,
|
||||
ViewName,
|
||||
ViewDevice,
|
||||
TrainAdd,
|
||||
// TrainAdd,
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
// TrainDelete,
|
||||
AddRunplanLine,
|
||||
DeleteRunplanLine,
|
||||
ManageUser,
|
||||
HelpAbout
|
||||
},
|
||||
@ -397,7 +403,8 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainAdd.doShow(operate);
|
||||
// this.$refs.trainAdd.doShow(operate);
|
||||
this.$refs.addRunplanLine.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -421,7 +428,8 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDelete.doShow(operate);
|
||||
// this.$refs.trainDelete.doShow(operate);
|
||||
this.$refs.deleteRunplanLine.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
377
src/jmapNew/theme/fuzhou_01/menus/menuDialog/addRunplanLine.vue
Normal file
377
src/jmapNew/theme/fuzhou_01/menus/menuDialog/addRunplanLine.vue
Normal file
@ -0,0 +1,377 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="fuzhou-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="430px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item prop="serviceNumber">
|
||||
<span id="rpServiceNumber" slot="label">表号: </span>
|
||||
<el-input v-model="addModel.serviceNumber" style="width:260px" maxlength="2" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="tripNumber">
|
||||
<span id="rpTripNumber" slot="label">车次号: </span>
|
||||
<el-input v-model="addModel.tripNumber" style="width:260px" maxlength="4" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="destinationCode">
|
||||
<span id="rpDestinationCode" slot="label">目的地码: </span>
|
||||
<el-select ref="destinationCode" v-model="addModel.destinationCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')" style="width:260px" @change="changeDestination">
|
||||
<el-option
|
||||
v-for="item in destinationCodeList"
|
||||
:key="item.code"
|
||||
:label="item.code"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="routing">
|
||||
<span slot="label">交路: </span>
|
||||
<el-select ref="routing" v-model="addModel.routing" value-key="id" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')" style="width:260px">
|
||||
<el-option
|
||||
v-for="item in routeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="startTime">
|
||||
<span slot="label">开始时间: </span>
|
||||
<el-time-picker ref="startTime" v-model="addModel.startTime" size="small" value-format="HH:mm:ss" :clearable="false" :picker-options="{selectableRange:'02:00:00-23:59:59'}" style="width:260px" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {getUserRoutingDataByDes, querySectionListByRouting, getMapStationRunUser, getStationStopTime} from '@/api/runplan';
|
||||
import { getRunplanConfig } from '@/api/jmap/mapdraft';
|
||||
import { formatTime } from '@/jmapNew/theme/parser/util';
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
export default {
|
||||
name:'AddRunplanLine',
|
||||
data() {
|
||||
return {
|
||||
dialogShow:false,
|
||||
loading:false,
|
||||
operate: null,
|
||||
operation:'',
|
||||
destinationCodeList:[],
|
||||
routeList:[],
|
||||
stopStationMap:{},
|
||||
stopTimeMap:{},
|
||||
reentryData: {},
|
||||
addModel:{
|
||||
serviceNumber:'',
|
||||
tripNumber:'',
|
||||
destinationCode:'',
|
||||
startTime:'',
|
||||
routing:{
|
||||
startStationCode:'',
|
||||
endStationCode:'',
|
||||
endSectionCode:'',
|
||||
startSectionCode:'',
|
||||
id:'',
|
||||
startTbFront: null,
|
||||
endTbFront: null
|
||||
}
|
||||
}
|
||||
// rules: {
|
||||
// }
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '加线';
|
||||
// this.$t('menu.menuDialog.addPlanTrain')
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
rules() {
|
||||
const validateRouting = (rule, value, callback) => {
|
||||
if (value && value.id != '') {
|
||||
return callback();
|
||||
} else {
|
||||
return callback(new Error('请选择交路'));
|
||||
}
|
||||
};
|
||||
|
||||
const crules = {
|
||||
serviceNumber: [
|
||||
{ required: true, trigger: 'blur', validator:this.validateService}
|
||||
// message: '请输入表号',
|
||||
],
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
destinationCode:[
|
||||
{ required: true, message: '请选择目的地码', trigger: 'blur' },
|
||||
{ required: true, message: '请选择目的地码', trigger: 'change' }
|
||||
],
|
||||
routing:[
|
||||
{ required: true, validator: validateRouting, trigger: 'blur' },
|
||||
{ required: true, validator: validateRouting, trigger: 'change' }
|
||||
],
|
||||
startTime:[
|
||||
{ required: true, message: '请选择开始时间', trigger: 'blur' },
|
||||
{ required: true, message: '请选择开始时间', trigger: 'change' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const destinationList = this.sectionList.filter(section=>{
|
||||
return section.destinationCode != '' && section.destinationCode != undefined;
|
||||
});
|
||||
this.destinationCodeList = destinationList.map(section=>{
|
||||
const destination = {};
|
||||
destination['code'] = section.destinationCode;
|
||||
return destination;
|
||||
});
|
||||
const mapId = this.$route.query.mapId;
|
||||
const that = this;
|
||||
if (mapId) {
|
||||
getMapStationRunUser(mapId).then(resp =>{
|
||||
const list = resp.data.list;
|
||||
list.forEach(elem => {
|
||||
that.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
|
||||
});
|
||||
getStationStopTime(mapId).then(response=>{
|
||||
const stopTimeList = response.data.list;
|
||||
stopTimeList.forEach(element=>{
|
||||
that.stopTimeMap[element.stationCode] = {parkingTime:element.parkingTime};
|
||||
});
|
||||
getRunplanConfig(mapId).then(resp => {
|
||||
const data = resp.data;
|
||||
this.reentryData = data.config.reentryData;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
methods:{
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
validateService (rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请输入表号'));
|
||||
} else {
|
||||
let newValue = parseInt(value);
|
||||
if (newValue) {
|
||||
if (newValue > 0 & newValue <= 9) {
|
||||
newValue = '0' + newValue;
|
||||
}
|
||||
this.addModel.serviceNumber = newValue;
|
||||
return callback();
|
||||
} else {
|
||||
this.addModel.serviceNumber = '';
|
||||
}
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.$refs['routing'].blur();
|
||||
this.$refs['destinationCode'].blur();
|
||||
this.$refs['startTime'].hidePicker();
|
||||
this.$refs['form'].resetFields();
|
||||
this.addModel = {
|
||||
serviceNumber:'',
|
||||
tripNumber:'',
|
||||
destinationCode:'',
|
||||
startTime:'',
|
||||
routing:{
|
||||
startStationCode:'',
|
||||
endStationCode:'',
|
||||
endSectionCode:'',
|
||||
startSectionCode:'',
|
||||
id:'',
|
||||
startTbFront: null,
|
||||
endTbFront: null
|
||||
}
|
||||
},
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
changeDestination(destinationCode) {
|
||||
this.addModel.routing = {};
|
||||
const mapId = this.$route.query.mapId;
|
||||
if (mapId) {
|
||||
getUserRoutingDataByDes(mapId, destinationCode).then(resp => {
|
||||
this.routeList = resp.data;
|
||||
}).catch((error) => {
|
||||
this.routeList = [];
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const runplanLine = {serviceNumber:this.addModel.serviceNumber, tripConfigList:[{
|
||||
startStationCode:this.addModel.routing.startStationCode,
|
||||
endStationCode:this.addModel.routing.endStationCode,
|
||||
endSectionCode:this.addModel.routing.endSectionCode,
|
||||
startSectionCode:this.addModel.routing.startSectionCode,
|
||||
routingCode:this.addModel.routing.id,
|
||||
id:1,
|
||||
tripNumber:this.addModel.tripNumber,
|
||||
startTime:this.addModel.startTime
|
||||
}] };
|
||||
//
|
||||
// startTbFront
|
||||
// startTbFront
|
||||
// endTbFront
|
||||
const arriveConfigList = [];
|
||||
const that = this;
|
||||
querySectionListByRouting(that.addModel.routing.id).then(resp=>{
|
||||
const length = resp.data.length - 1;
|
||||
resp.data.forEach((parkSectionCode, index)=>{
|
||||
const arriveConfig = {arriveTime:'', departureTime:'', sectionCode:parkSectionCode.sectionCode, stationCode:parkSectionCode.stationCode};
|
||||
const prev = arriveConfigList[index - 1];
|
||||
const reentryData = that.reentryData[parkSectionCode.stationCode] || {};
|
||||
if (index == 0) {
|
||||
arriveConfig.departureTime = that.addModel.startTime;
|
||||
} else if (index < length) {
|
||||
if (String(that.addModel.routing.startTbFront) == 'false' && index == 1) {
|
||||
// const reentryData = that.reentryData[parkSectionCode.stationCode] || {};
|
||||
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (reentryData.tbTo || 0));
|
||||
} else {
|
||||
const runLevel = that.stopStationMap[[prev.sectionCode, parkSectionCode.sectionCode].toString()] || {};
|
||||
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (runLevel.l3 || 0));
|
||||
}
|
||||
const nowParking = that.stopTimeMap[parkSectionCode.stationCode] || {};
|
||||
arriveConfig.departureTime = formatTime(this.computedTimeByString(arriveConfig.arriveTime) / 1000 + nowParking.parkingTime || 0 );
|
||||
} else {
|
||||
if (String(that.addModel.routing.endTbFront) == 'false') {
|
||||
// const reentryData = that.reentryData[parkSectionCode.stationCode] || {};
|
||||
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (reentryData.tbTo || 0));
|
||||
} else {
|
||||
const runLevel = that.stopStationMap[[prev.sectionCode, parkSectionCode.sectionCode].toString()] || {};
|
||||
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (runLevel.l3 || 0));
|
||||
}
|
||||
arriveConfig.departureTime = '';
|
||||
}
|
||||
// if (index == 0) {
|
||||
// arriveConfig.departureTime = that.addModel.startTime;
|
||||
// } else if (index < resp.data.length - 1) {
|
||||
// const prev = arriveConfigList[index - 1];
|
||||
// // startSectionCode;
|
||||
// // endSectionCode;
|
||||
// const runLevel = that.stopStationMap[[prev.sectionCode, parkSectionCode.sectionCode].toString()] || 0;
|
||||
// arriveConfig.arriveTime = prev.departureTime + that.stopTimeMap[prev.stationCode] || 0 + runLevel ? runLevel.l3 : 0;
|
||||
//
|
||||
// // elem.stopTime = this.stopTimeMap[elem.stationCode].parkingTime;
|
||||
// } else {
|
||||
// arriveConfig.arriveTime = '';
|
||||
// }
|
||||
// { }
|
||||
arriveConfigList.push(arriveConfig);
|
||||
});
|
||||
runplanLine.tripConfigList[0].arriveConfigList = arriveConfigList;
|
||||
runplanLine.tripConfigList[0].endTime = arriveConfigList[arriveConfigList.length - 1].arriveTime;
|
||||
|
||||
if (this.group) {
|
||||
sendCommandNew(this.group, 'RunPlan_Add_Trip', runplanLine).then((response) => {
|
||||
this.$message.success('添加计划车成功');
|
||||
this.doClose();
|
||||
// 重新加载 仿真运行图
|
||||
}).catch(error => {
|
||||
this.$messageBox('添加计划车失败:' + error.$message);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
computedTimeByString(timeStr) {
|
||||
const bTime = +new Date(`2019-01-01 00:00:00`);
|
||||
const eTime = +new Date(`2019-01-01 ${timeStr}`);
|
||||
return Number(eTime) - Number(bTime);
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
|
||||
// serviceNumber: "001",
|
||||
// tripConfigList:[
|
||||
// {
|
||||
// arriveConfigList[]
|
||||
// {
|
||||
// arriveTime: "06:00:00"
|
||||
// departureTime: "06:00:00"
|
||||
// sectionCode: "T2"
|
||||
// speedLevel: "等级一"
|
||||
// speedLevelTime: 123
|
||||
// stationCode: "Station1478"
|
||||
// stopTime: 0
|
||||
// }
|
||||
|
||||
// startStationCode
|
||||
// endStationCode
|
||||
// endSectionCode
|
||||
// startSectionCode
|
||||
// endTime
|
||||
// id
|
||||
// routingCode: 3615
|
||||
// serviceNumber: "001"
|
||||
// startTime: "06:00:00"
|
||||
// tripNumber: ""
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.rpServiceNumber{}
|
||||
.rpTripNumber{}
|
||||
.rpDestinationCode{}
|
||||
</style>
|
@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="fuzhou-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
size="small"
|
||||
label-width="100px"
|
||||
:model="model"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item prop="serviceNumber" label="表号">
|
||||
<el-input v-model="model.serviceNumber" maxlength="2" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="tripNumber" label="车次号">
|
||||
<el-input v-model="model.tripNumber" maxlength="4" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button type="primary" :loading="loading" @click="commit">{{
|
||||
$t("menu.menuDialog.confirm")
|
||||
}}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button @click="doClose">{{
|
||||
$t("menu.menuDialog.cancel")
|
||||
}}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
export default {
|
||||
name: 'DeleteRunplanLine',
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
dialogShow: false,
|
||||
model: {
|
||||
serviceNumber: '',
|
||||
tripNumber: ''
|
||||
},
|
||||
rules: {
|
||||
serviceNumber: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator:this.validateService
|
||||
// message: "请输入表号"
|
||||
}
|
||||
],
|
||||
tripNumber: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
message: '请输入车次号'
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '抽线';
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.runPlan': function(oldVal, newVal) {
|
||||
console.log(newVal);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// this.operate = operate || {};
|
||||
// this.operation = operate.operation;
|
||||
// // 非断电激活时设置初始值
|
||||
// if (!this.dialogShow) {
|
||||
// this.loading = false;
|
||||
// }
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function() {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
// this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
validateService (rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请输入表号'));
|
||||
} else {
|
||||
let newValue = parseInt(value);
|
||||
if (newValue) {
|
||||
if (newValue > 0 & newValue <= 9) {
|
||||
newValue = '0' + newValue;
|
||||
}
|
||||
this.model.serviceNumber = newValue;
|
||||
return callback();
|
||||
} else {
|
||||
this.model.serviceNumber = '';
|
||||
}
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
const group = this.$route.query.group;
|
||||
const data = this.model;
|
||||
sendCommandNew(group, 'RunPlan_Delete_Trip', data)
|
||||
.then(resp => {
|
||||
console.log(resp);
|
||||
this.$message.success('删除计划车成功');
|
||||
this.doClose();
|
||||
})
|
||||
.catch(e => {
|
||||
this.$messageBox(e.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
@ -24,7 +24,8 @@
|
||||
>{{ $t('menu.menuDialog.confirm') }}</el-button>
|
||||
</div>
|
||||
<div style="width:100%; padding-top: 20px">
|
||||
<span> {{ $t('menu.menuDialog.copyright') }}</span>
|
||||
<!-- <span >版权所有(C)2010-2021 北京玖琏科技有限公司</span> -->
|
||||
<span v-if="!thirdLogin">{{ $t('menu.menuDialog.copyright') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -39,7 +40,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
export default {
|
||||
name: 'ManageUser',
|
||||
data() {
|
||||
@ -70,6 +71,9 @@ export default {
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.menuDialog.about');
|
||||
},
|
||||
thirdLogin() {
|
||||
return getSessionStorage('project') == 'richor';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -50,27 +50,47 @@ class EqualDistanceParser {
|
||||
var lastPoint = null;
|
||||
var nextPoint = null;
|
||||
|
||||
/** 创建标记点名称和坐标*/
|
||||
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
|
||||
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
|
||||
pointdata.color = '#000' || lineStyle.color;
|
||||
pointdata.directionCode = train.right ? '2' : '1';
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
pointdata.directionCode = train.right ? '1' : '2';
|
||||
/** 如果车次号为空,不显示名称*/
|
||||
if (train.tripNumber) {
|
||||
// 如果不是被删除的首个车次
|
||||
if (!train.firstInvalid) {
|
||||
/** 创建标记点名称和坐标*/
|
||||
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
|
||||
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
|
||||
pointdata.color = '#000' || lineStyle.color;
|
||||
pointdata.directionCode = train.right ? '2' : '1';
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
pointdata.directionCode = train.right ? '1' : '2';
|
||||
}
|
||||
pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[0], pointdata.directionCode, false)];
|
||||
/** 给服务对象添加服务名称和标记点*/
|
||||
opt.markPointData.push(this.__createMartPoint(pointdata));
|
||||
}
|
||||
opt.name = '' + service.serviceNumber;
|
||||
}
|
||||
pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[0], pointdata.directionCode, false)];
|
||||
|
||||
/** 给服务对象添加服务名称和标记点*/
|
||||
opt.name = '' + service.serviceNumber;
|
||||
opt.markPointData.push(this.__createMartPoint(pointdata));
|
||||
|
||||
if (!train.firstInvalid) {
|
||||
/** 计算非折返点车次点坐标集合*/
|
||||
train.stationTimeList.forEach((elem, index) => {
|
||||
idx = index;
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeMap, elem, pointdata.directionCode, false), elem.stationCode, aa]);
|
||||
});
|
||||
train.stationTimeList.forEach((elem, index) => {
|
||||
idx = index;
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeMap, elem, pointdata.directionCode, false), elem.stationCode, aa]);
|
||||
});
|
||||
} else {
|
||||
const deletePoint = {
|
||||
symbol:'circle',
|
||||
name:'breakPoint',
|
||||
symbolSize:10,
|
||||
itemStyle:{
|
||||
color:'#FF5A3B'
|
||||
},
|
||||
coord: [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[0], pointdata.directionCode, false)]
|
||||
};
|
||||
/** 给服务对象添加服务名称和标记点*/
|
||||
// this.__createMartPoint(deletePoint)
|
||||
opt.markPointData.push(deletePoint);
|
||||
}
|
||||
|
||||
/** 计算折返点车次坐标点集合*/
|
||||
if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) {
|
||||
|
@ -52,32 +52,50 @@ class EqualRatioParser {
|
||||
|
||||
/** 如果车次号为空,不显示名称*/
|
||||
if (train.tripNumber) {
|
||||
/** 创建标记点名称和坐标*/
|
||||
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
|
||||
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
|
||||
pointdata.color = '#000' || lineStyle.color;
|
||||
pointdata.directionCode = train.right ? '2' : '1';
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
pointdata.directionCode = train.right ? '1' : '2';
|
||||
// 如果不是被删除的首个车次
|
||||
if (!train.firstInvalid) {
|
||||
/** 创建标记点名称和坐标*/
|
||||
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
|
||||
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
|
||||
pointdata.color = '#000' || lineStyle.color;
|
||||
pointdata.directionCode = train.right ? '2' : '1';
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
pointdata.directionCode = train.right ? '1' : '2';
|
||||
}
|
||||
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[1], pointdata.directionCode, false)];
|
||||
/** 给服务对象添加服务名称和标记点*/
|
||||
opt.markPointData.push(this.__createMartPoint(pointdata));
|
||||
}
|
||||
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[1], pointdata.directionCode, false)];
|
||||
|
||||
/** 给服务对象添加服务名称和标记点*/
|
||||
opt.markPointData.push(this.__createMartPoint(pointdata));
|
||||
/** 创建服务号名称*/
|
||||
opt.name = `${service.serviceNumber}`;
|
||||
}
|
||||
|
||||
/** 计算非折返点车次点坐标集合*/
|
||||
train.stationTimeList.forEach((elem, index) => {
|
||||
idx = index;
|
||||
// if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
|
||||
// index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
|
||||
// index > 0 && index < train.stationTimeList.length - 1) {
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeMap, elem, pointdata.directionCode, false), elem.stationCode, aa]);
|
||||
if (!train.firstInvalid) {
|
||||
/** 计算非折返点车次点坐标集合*/
|
||||
train.stationTimeList.forEach((elem, index) => {
|
||||
idx = index;
|
||||
// if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
|
||||
// index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
|
||||
// index > 0 && index < train.stationTimeList.length - 1) {
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeMap, elem, pointdata.directionCode, false), elem.stationCode, aa]);
|
||||
// }
|
||||
});
|
||||
});
|
||||
} else {
|
||||
const deletePoint = {
|
||||
symbol:'circle',
|
||||
name:'breakPoint',
|
||||
symbolSize:10,
|
||||
itemStyle:{
|
||||
color:'#FF5A3B'
|
||||
},
|
||||
coord: [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeMap, train.stationTimeList[0], pointdata.directionCode, false)]
|
||||
};
|
||||
/** 给服务对象添加服务名称和标记点*/
|
||||
// this.__createMartPoint(deletePoint)
|
||||
opt.markPointData.push(deletePoint);
|
||||
}
|
||||
|
||||
/** 计算折返点车次坐标点集合*/
|
||||
if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) {
|
||||
|
@ -71,6 +71,7 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
|
||||
export default {
|
||||
name: 'StandBackStrategy',
|
||||
@ -82,24 +83,7 @@ export default {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
strategyList: [
|
||||
{
|
||||
value: '01',
|
||||
label: this.$t('menu.noSwitchback')
|
||||
},
|
||||
{
|
||||
value: '02',
|
||||
label: this.$t('menu.noOneSwitchback')
|
||||
},
|
||||
{
|
||||
value: '03',
|
||||
label: this.$t('menu.automaticChange')
|
||||
},
|
||||
{
|
||||
value: '04',
|
||||
label: this.$t('menu.default')
|
||||
}
|
||||
],
|
||||
strategyList: ConstConfig.ConstSelect.turnBackTypeList,
|
||||
stationName: '',
|
||||
standStatus: '',
|
||||
selection: [],
|
||||
@ -133,8 +117,9 @@ export default {
|
||||
methods: {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: selected.reentryStrategy || '04' });
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
const stand = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||
this.tempData.push({ name: station.name, station: station.name, strategy: stand.typeStrategy || 'DEFAULT' });
|
||||
},
|
||||
strategySelectChange(strategy) {
|
||||
const operate = {
|
||||
|
@ -15,6 +15,8 @@
|
||||
<train-delete ref="trainDelete" />
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
<!-- <delete-runplan-line ref="deleteRunplanLine" /> -->
|
||||
<!-- <add-runplan-line ref="addRunplanLine" /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -22,6 +24,7 @@ import MenuBar from '@/jmapNew/theme/components/menus/menuBar';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import TrainAdd from './menuDialog/trainAdd';
|
||||
// import AddRunplanLine from './menuDialog/addRunplanLine';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import PasswordBox from './menuDialog/passwordBox';
|
||||
@ -30,6 +33,7 @@ import ViewName from './menuDialog/viewName';
|
||||
import ViewDevice from './menuDialog/viewDevice';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
// import DeleteRunplanLine from './menuDialog/deleteRunplanLine';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -42,10 +46,12 @@ export default {
|
||||
ViewName,
|
||||
ViewDevice,
|
||||
TrainAdd,
|
||||
// AddRunplanLine,
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
ManageUser,
|
||||
HelpAbout
|
||||
// DeleteRunplanLine
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -403,7 +409,12 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainAdd.doShow(operate);
|
||||
if (this.$route.query.lineCode == '10') {
|
||||
this.$refs.trainAdd.doShow(operate);
|
||||
} else {
|
||||
// this.$refs.addRunplanLine.doShow(operate);
|
||||
this.$refs.trainAdd.doShow(operate);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -428,6 +439,7 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDelete.doShow(operate);
|
||||
// this.$refs.deleteRunplanLine.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
377
src/jmapNew/theme/xian_01/menus/menuDialog/addRunplanLine.vue
Normal file
377
src/jmapNew/theme/xian_01/menus/menuDialog/addRunplanLine.vue
Normal file
@ -0,0 +1,377 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="xian-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="430px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item prop="serviceNumber">
|
||||
<span id="rpServiceNumber" slot="label">表号: </span>
|
||||
<el-input v-model="addModel.serviceNumber" style="width:260px" maxlength="2" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="tripNumber">
|
||||
<span id="rpTripNumber" slot="label">车次号: </span>
|
||||
<el-input v-model="addModel.tripNumber" style="width:260px" maxlength="4" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="destinationCode">
|
||||
<span id="rpDestinationCode" slot="label">目的地码: </span>
|
||||
<el-select ref="destinationCode" v-model="addModel.destinationCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')" style="width:260px" @change="changeDestination">
|
||||
<el-option
|
||||
v-for="item in destinationCodeList"
|
||||
:key="item.code"
|
||||
:label="item.code"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="routing">
|
||||
<span slot="label">交路: </span>
|
||||
<el-select ref="routing" v-model="addModel.routing" value-key="id" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')" style="width:260px">
|
||||
<el-option
|
||||
v-for="item in routeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="startTime">
|
||||
<span slot="label">开始时间: </span>
|
||||
<el-time-picker ref="startTime" v-model="addModel.startTime" size="small" value-format="HH:mm:ss" :clearable="false" :picker-options="{selectableRange:'02:00:00-23:59:59'}" style="width:260px" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {getUserRoutingDataByDes, querySectionListByRouting, getMapStationRunUser, getStationStopTime} from '@/api/runplan';
|
||||
import { getRunplanConfig } from '@/api/jmap/mapdraft';
|
||||
import { formatTime } from '@/jmapNew/theme/parser/util';
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
export default {
|
||||
name:'AddRunplanLine',
|
||||
data() {
|
||||
return {
|
||||
dialogShow:false,
|
||||
loading:false,
|
||||
operate: null,
|
||||
operation:'',
|
||||
destinationCodeList:[],
|
||||
routeList:[],
|
||||
stopStationMap:{},
|
||||
stopTimeMap:{},
|
||||
reentryData: {},
|
||||
addModel:{
|
||||
serviceNumber:'',
|
||||
tripNumber:'',
|
||||
destinationCode:'',
|
||||
startTime:'',
|
||||
routing:{
|
||||
startStationCode:'',
|
||||
endStationCode:'',
|
||||
endSectionCode:'',
|
||||
startSectionCode:'',
|
||||
id:'',
|
||||
startTbFront: null,
|
||||
endTbFront: null
|
||||
}
|
||||
}
|
||||
// rules: {
|
||||
// }
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '加线';
|
||||
// this.$t('menu.menuDialog.addPlanTrain')
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
rules() {
|
||||
const validateRouting = (rule, value, callback) => {
|
||||
if (value && value.id != '') {
|
||||
return callback();
|
||||
} else {
|
||||
return callback(new Error('请选择交路'));
|
||||
}
|
||||
};
|
||||
|
||||
const crules = {
|
||||
serviceNumber: [
|
||||
{ required: true, trigger: 'blur', validator:this.validateService}
|
||||
// message: '请输入表号',
|
||||
],
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
destinationCode:[
|
||||
{ required: true, message: '请选择目的地码', trigger: 'blur' },
|
||||
{ required: true, message: '请选择目的地码', trigger: 'change' }
|
||||
],
|
||||
routing:[
|
||||
{ required: true, validator: validateRouting, trigger: 'blur' },
|
||||
{ required: true, validator: validateRouting, trigger: 'change' }
|
||||
],
|
||||
startTime:[
|
||||
{ required: true, message: '请选择开始时间', trigger: 'blur' },
|
||||
{ required: true, message: '请选择开始时间', trigger: 'change' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const destinationList = this.sectionList.filter(section=>{
|
||||
return section.destinationCode != '' && section.destinationCode != undefined;
|
||||
});
|
||||
this.destinationCodeList = destinationList.map(section=>{
|
||||
const destination = {};
|
||||
destination['code'] = section.destinationCode;
|
||||
return destination;
|
||||
});
|
||||
const mapId = this.$route.query.mapId;
|
||||
const that = this;
|
||||
if (mapId) {
|
||||
getMapStationRunUser(mapId).then(resp =>{
|
||||
const list = resp.data.list;
|
||||
list.forEach(elem => {
|
||||
that.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
|
||||
});
|
||||
getStationStopTime(mapId).then(response=>{
|
||||
const stopTimeList = response.data.list;
|
||||
stopTimeList.forEach(element=>{
|
||||
that.stopTimeMap[element.stationCode] = {parkingTime:element.parkingTime};
|
||||
});
|
||||
getRunplanConfig(mapId).then(resp => {
|
||||
const data = resp.data;
|
||||
this.reentryData = data.config.reentryData;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
methods:{
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
validateService (rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请输入表号'));
|
||||
} else {
|
||||
let newValue = parseInt(value);
|
||||
if (newValue) {
|
||||
if (newValue > 0 & newValue <= 9) {
|
||||
newValue = '0' + newValue;
|
||||
}
|
||||
this.addModel.serviceNumber = newValue;
|
||||
return callback();
|
||||
} else {
|
||||
this.addModel.serviceNumber = '';
|
||||
}
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.$refs['routing'].blur();
|
||||
this.$refs['destinationCode'].blur();
|
||||
this.$refs['startTime'].hidePicker();
|
||||
this.$refs['form'].resetFields();
|
||||
this.addModel = {
|
||||
serviceNumber:'',
|
||||
tripNumber:'',
|
||||
destinationCode:'',
|
||||
startTime:'',
|
||||
routing:{
|
||||
startStationCode:'',
|
||||
endStationCode:'',
|
||||
endSectionCode:'',
|
||||
startSectionCode:'',
|
||||
id:'',
|
||||
startTbFront: null,
|
||||
endTbFront: null
|
||||
}
|
||||
},
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
changeDestination(destinationCode) {
|
||||
this.addModel.routing = {};
|
||||
const mapId = this.$route.query.mapId;
|
||||
if (mapId) {
|
||||
getUserRoutingDataByDes(mapId, destinationCode).then(resp => {
|
||||
this.routeList = resp.data;
|
||||
}).catch((error) => {
|
||||
this.routeList = [];
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const runplanLine = {serviceNumber:this.addModel.serviceNumber, tripConfigList:[{
|
||||
startStationCode:this.addModel.routing.startStationCode,
|
||||
endStationCode:this.addModel.routing.endStationCode,
|
||||
endSectionCode:this.addModel.routing.endSectionCode,
|
||||
startSectionCode:this.addModel.routing.startSectionCode,
|
||||
routingCode:this.addModel.routing.id,
|
||||
id:1,
|
||||
tripNumber:this.addModel.tripNumber,
|
||||
startTime:this.addModel.startTime
|
||||
}] };
|
||||
//
|
||||
// startTbFront
|
||||
// startTbFront
|
||||
// endTbFront
|
||||
const arriveConfigList = [];
|
||||
const that = this;
|
||||
querySectionListByRouting(that.addModel.routing.id).then(resp=>{
|
||||
const length = resp.data.length - 1;
|
||||
resp.data.forEach((parkSectionCode, index)=>{
|
||||
const arriveConfig = {arriveTime:'', departureTime:'', sectionCode:parkSectionCode.sectionCode, stationCode:parkSectionCode.stationCode};
|
||||
const prev = arriveConfigList[index - 1];
|
||||
const reentryData = that.reentryData[parkSectionCode.stationCode] || {};
|
||||
if (index == 0) {
|
||||
arriveConfig.departureTime = that.addModel.startTime;
|
||||
} else if (index < length) {
|
||||
if (String(that.addModel.routing.startTbFront) == 'false' && index == 1) {
|
||||
// const reentryData = that.reentryData[parkSectionCode.stationCode] || {};
|
||||
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (reentryData.tbTo || 0));
|
||||
} else {
|
||||
const runLevel = that.stopStationMap[[prev.sectionCode, parkSectionCode.sectionCode].toString()] || {};
|
||||
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (runLevel.l3 || 0));
|
||||
}
|
||||
const nowParking = that.stopTimeMap[parkSectionCode.stationCode] || {};
|
||||
arriveConfig.departureTime = formatTime(this.computedTimeByString(arriveConfig.arriveTime) / 1000 + nowParking.parkingTime || 0 );
|
||||
} else {
|
||||
if (String(that.addModel.routing.endTbFront) == 'false') {
|
||||
// const reentryData = that.reentryData[parkSectionCode.stationCode] || {};
|
||||
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (reentryData.tbTo || 0));
|
||||
} else {
|
||||
const runLevel = that.stopStationMap[[prev.sectionCode, parkSectionCode.sectionCode].toString()] || {};
|
||||
arriveConfig.arriveTime = formatTime(this.computedTimeByString(prev.departureTime) / 1000 + (runLevel.l3 || 0));
|
||||
}
|
||||
arriveConfig.departureTime = '';
|
||||
}
|
||||
// if (index == 0) {
|
||||
// arriveConfig.departureTime = that.addModel.startTime;
|
||||
// } else if (index < resp.data.length - 1) {
|
||||
// const prev = arriveConfigList[index - 1];
|
||||
// // startSectionCode;
|
||||
// // endSectionCode;
|
||||
// const runLevel = that.stopStationMap[[prev.sectionCode, parkSectionCode.sectionCode].toString()] || 0;
|
||||
// arriveConfig.arriveTime = prev.departureTime + that.stopTimeMap[prev.stationCode] || 0 + runLevel ? runLevel.l3 : 0;
|
||||
//
|
||||
// // elem.stopTime = this.stopTimeMap[elem.stationCode].parkingTime;
|
||||
// } else {
|
||||
// arriveConfig.arriveTime = '';
|
||||
// }
|
||||
// { }
|
||||
arriveConfigList.push(arriveConfig);
|
||||
});
|
||||
runplanLine.tripConfigList[0].arriveConfigList = arriveConfigList;
|
||||
runplanLine.tripConfigList[0].endTime = arriveConfigList[arriveConfigList.length - 1].arriveTime;
|
||||
|
||||
if (this.group) {
|
||||
sendCommandNew(this.group, 'RunPlan_Add_Trip', runplanLine).then((response) => {
|
||||
this.$message.success('添加计划车成功');
|
||||
this.doClose();
|
||||
// 重新加载 仿真运行图
|
||||
}).catch(error => {
|
||||
this.$messageBox('添加计划车失败:' + error.$message);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
computedTimeByString(timeStr) {
|
||||
const bTime = +new Date(`2019-01-01 00:00:00`);
|
||||
const eTime = +new Date(`2019-01-01 ${timeStr}`);
|
||||
return Number(eTime) - Number(bTime);
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
|
||||
// serviceNumber: "001",
|
||||
// tripConfigList:[
|
||||
// {
|
||||
// arriveConfigList[]
|
||||
// {
|
||||
// arriveTime: "06:00:00"
|
||||
// departureTime: "06:00:00"
|
||||
// sectionCode: "T2"
|
||||
// speedLevel: "等级一"
|
||||
// speedLevelTime: 123
|
||||
// stationCode: "Station1478"
|
||||
// stopTime: 0
|
||||
// }
|
||||
|
||||
// startStationCode
|
||||
// endStationCode
|
||||
// endSectionCode
|
||||
// startSectionCode
|
||||
// endTime
|
||||
// id
|
||||
// routingCode: 3615
|
||||
// serviceNumber: "001"
|
||||
// startTime: "06:00:00"
|
||||
// tripNumber: ""
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.rpServiceNumber{}
|
||||
.rpTripNumber{}
|
||||
.rpDestinationCode{}
|
||||
</style>
|
141
src/jmapNew/theme/xian_01/menus/menuDialog/deleteRunplanLine.vue
Normal file
141
src/jmapNew/theme/xian_01/menus/menuDialog/deleteRunplanLine.vue
Normal file
@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="xian-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
size="small"
|
||||
label-width="100px"
|
||||
:model="model"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item prop="serviceNumber" label="表号">
|
||||
<el-input v-model="model.serviceNumber" maxlength="2" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="tripNumber" label="车次号">
|
||||
<el-input v-model="model.tripNumber" maxlength="4" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button type="primary" :loading="loading" @click="commit">{{
|
||||
$t("menu.menuDialog.confirm")
|
||||
}}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button @click="doClose">{{
|
||||
$t("menu.menuDialog.cancel")
|
||||
}}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
export default {
|
||||
name: 'DeleteRunplanLine',
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
dialogShow: false,
|
||||
model: {
|
||||
serviceNumber: '',
|
||||
tripNumber: ''
|
||||
},
|
||||
rules: {
|
||||
serviceNumber: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator:this.validateService
|
||||
// message: "请输入表号"
|
||||
}
|
||||
],
|
||||
tripNumber: [
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
message: '请输入车次号'
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '抽线';
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.runPlan': function(oldVal, newVal) {
|
||||
console.log(newVal);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// this.operate = operate || {};
|
||||
// this.operation = operate.operation;
|
||||
// // 非断电激活时设置初始值
|
||||
// if (!this.dialogShow) {
|
||||
// this.loading = false;
|
||||
// }
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function() {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
// this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
validateService (rule, value, callback) {
|
||||
if (typeof value == 'string' && value.trim().length == 0) {
|
||||
return callback(new Error('请输入表号'));
|
||||
} else {
|
||||
let newValue = parseInt(value);
|
||||
if (newValue) {
|
||||
if (newValue > 0 & newValue <= 9) {
|
||||
newValue = '0' + newValue;
|
||||
}
|
||||
this.model.serviceNumber = newValue;
|
||||
return callback();
|
||||
} else {
|
||||
this.model.serviceNumber = '';
|
||||
}
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
const group = this.$route.query.group;
|
||||
const data = this.model;
|
||||
sendCommandNew(group, 'RunPlan_Delete_Trip', data)
|
||||
.then(resp => {
|
||||
console.log(resp);
|
||||
this.$message.success('删除计划车成功');
|
||||
this.doClose();
|
||||
})
|
||||
.catch(e => {
|
||||
this.$messageBox(e.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
@ -138,7 +138,7 @@ export default {
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
|
||||
}
|
||||
|
||||
if (this.model.password == '123456') {
|
||||
if (this.model.password == '12') {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
|
@ -10,6 +10,7 @@
|
||||
<train-detail ref="trainDetail" />
|
||||
<speed-limit ref="speedLimit" pop-class="xian-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="xian-01__systerm" />
|
||||
<set-train-operation ref="setTrainOperation" pop-class="xian-01__systerm" />
|
||||
<!-- <select-station ref="selectStation" @selectStationCode="selectStationCode" /> -->
|
||||
</div>
|
||||
</template>
|
||||
@ -29,6 +30,7 @@ import TrainMove from './dialog/trainMove';
|
||||
import TrainSwitch from './dialog/trainSwitch';
|
||||
import TrainEditNumber from './dialog/trainEditNumber';
|
||||
import TrainDetail from './dialog/trainDetail';
|
||||
import SetTrainOperation from '@/jmapNew/theme/components/menus/dialog/setTrainOperation';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
@ -45,7 +47,8 @@ export default {
|
||||
TrainEditNumber,
|
||||
TrainDetail,
|
||||
SetFault,
|
||||
SpeedLimit
|
||||
SpeedLimit,
|
||||
SetTrainOperation
|
||||
// SelectStation
|
||||
},
|
||||
props: {
|
||||
@ -175,6 +178,10 @@ export default {
|
||||
{
|
||||
label: '驾驶至',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
label: '连挂',
|
||||
handler: this.setLink
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -440,6 +447,14 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置连挂
|
||||
setLink() {
|
||||
commitOperate(menuOperate.Common.setLink, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setTrainOperation.doShow(menuOperate.Common.setLink, this.selected, true);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 换端
|
||||
handleTurnDirection() {
|
||||
const group = this.$route.query.group;
|
||||
|
@ -115,7 +115,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.thirdLogin = getSessionStorage('thirdLogin');
|
||||
this.thirdLogin = getSessionStorage('project') == 'richor';
|
||||
this.routes = this.$router.options.routes;
|
||||
if (this.$route.fullPath.indexOf('design/usermap') >= 0) {
|
||||
this.activePath = '/design/usermap/home';
|
||||
|
@ -225,6 +225,7 @@ export const projectTky = '018'; // 铁科院
|
||||
export const projectHeb = '019'; // 哈盈达
|
||||
export const projectDrts = '020'; // 行调实训
|
||||
export const projectSdy = '021';// 苏电院
|
||||
export const projectRichor = '022';// 中航锐创
|
||||
|
||||
export const userTrainingPlatform = '016'; // 实训系统
|
||||
// export const refereePlatform = '017'; // 裁判系统
|
||||
|
@ -227,6 +227,12 @@ export default {
|
||||
{ label: '每日加载', value:'EVERY_DAY' },
|
||||
{ label: '周内加载', value: 'WITHIN_A_WEEK' },
|
||||
{ label: '周末加载', value: 'WEEKEND' }
|
||||
],
|
||||
turnBackTypeList: [
|
||||
{ label: '无折返', value: 'NONE' },
|
||||
{ label: '默认', value: 'DEFAULT' },
|
||||
{ label: '自动换端', value: 'AUTO' },
|
||||
{ label: '无人折返', value: 'UNMANNED' }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -1,3 +1,12 @@
|
||||
/**
|
||||
* 折返类型
|
||||
*/
|
||||
export const TurnBackTypeMap = {
|
||||
NONE: '无折返',
|
||||
DEFAULT: '默认',
|
||||
AUTO: '自动换端',
|
||||
UNMANNED: '无人折返'
|
||||
};
|
||||
/**
|
||||
* 图纸类型
|
||||
*/
|
||||
@ -130,8 +139,11 @@ export const IbpOperation = {
|
||||
XXYS: {operate: '09', event: 'XXYS', name: '下行钥匙'},
|
||||
SXYS: {operate: '11', event: 'SXYS', 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: '计轴预复零'}
|
||||
AXLE_PRE_RESET: {operate: '13', event: 'AXLE_PRE_RESET', name: '计轴区段复位'},
|
||||
PRERESET_Z: {operate: '14', event: 'PRERESET_Z', name: '计轴预复位'},
|
||||
SD: {operate: '15', event: 'SD', name: '试灯'},
|
||||
XXGM: {operate: '16', event: 'XXGM', name: '下行屏蔽门开门'},
|
||||
SXGM: {operate: '17', event: 'SXGM', name: '上行屏蔽门开门'},
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -15,6 +15,7 @@ import FaviconNty from '@/assets/icon/favicon_nty.png';
|
||||
import FaviconBjd from '@/assets/icon/favicon_bjd.png';
|
||||
import FaviconSdy from '@/assets/icon/favicon_jdy.png';
|
||||
import FaviconCgy from '@/assets/icon/favicon_cgy.png';
|
||||
import FaviconRichor from '@/assets/icon/favicon_richor.png';
|
||||
import FaviconZzww from '@/assets/icon/favicon_zzww.png';
|
||||
import Link_Bxkc from '@/assets/icon/link_bxkc.png';
|
||||
import Link_Crsc from '@/assets/icon/link_crsc.png';
|
||||
@ -279,9 +280,9 @@ export const loginInfo = {
|
||||
xadt: {
|
||||
title: '城市轨道交通实训平台',
|
||||
logoWidth: '60px',
|
||||
loginTitle: '调度一部',
|
||||
homeTitle: '调度一部',
|
||||
browserTitle: '西安地铁调度一部城市轨道交通实训平台',
|
||||
loginTitle: '运营一中心',
|
||||
homeTitle: '运营一中心',
|
||||
browserTitle: '西安地铁运营一中心城市轨道交通实训平台',
|
||||
loginPath:'/login?project=xadt',
|
||||
loginParam: 'XADT',
|
||||
navigationLogoWidth: '40px',
|
||||
@ -291,9 +292,9 @@ export const loginInfo = {
|
||||
designxadt: {
|
||||
title: '城市轨道交通设计平台',
|
||||
logoWidth: '60px',
|
||||
loginTitle: '调度一部',
|
||||
homeTitle: '调度一部',
|
||||
browserTitle: '西安地铁调度一部城市轨道交通设计平台',
|
||||
loginTitle: '运营一中心',
|
||||
homeTitle: '运营一中心',
|
||||
browserTitle: '西安地铁运营一中心城市轨道交通设计平台',
|
||||
loginPath:'/design/login?project=xadt',
|
||||
loginParam: 'XADT',
|
||||
navigationLogoWidth: '40px',
|
||||
@ -425,6 +426,16 @@ export const loginInfo = {
|
||||
navigationLogoWidth: '180px',
|
||||
navigationMarginLeft: '195px',
|
||||
systemType: '011'
|
||||
},
|
||||
richor:{
|
||||
title: '中航锐创城市轨道交通实训平台',
|
||||
loginParam: 'RICHOR',
|
||||
bottomColumn: '中航锐创(北京)科技发展有限公司 联系电话:4000500081',
|
||||
linkIcon: FaviconRichor,
|
||||
titleIcon: FaviconRichor,
|
||||
navigationLogoWidth: '40px',
|
||||
navigationMarginLeft: '50px',
|
||||
systemType: '022'
|
||||
}
|
||||
};
|
||||
|
||||
@ -466,7 +477,8 @@ export const ProjectIcon = {
|
||||
sdy: FaviconSdy,
|
||||
designsdy: FaviconSdy,
|
||||
cgy: FaviconCgy,
|
||||
designcgy: FaviconCgy
|
||||
designcgy: FaviconCgy,
|
||||
richor:FaviconRichor
|
||||
};
|
||||
|
||||
export const ProjectCode = {
|
||||
@ -495,13 +507,14 @@ export const ProjectCode = {
|
||||
sdy: 'SDY',
|
||||
designsdy: 'SDY',
|
||||
cgy: 'CGY',
|
||||
designcgy: 'CGY'
|
||||
designcgy: 'CGY',
|
||||
richor:'RICHOR'
|
||||
};
|
||||
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 底部栏仅展示公司信息不展示备案号
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'wjls', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy', 'zzww']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'richor']; // 底部栏仅展示公司信息不展示备案号
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'wjls', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy', 'zzww', 'richor']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const CaseHideProjectList = ['heb', 'designheb', 'cgy', 'designcgy']; // 案例展示隐藏的项目
|
||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角版本开发基于不展示
|
||||
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy']; // 登录页右下角主体不展示
|
||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'xadt', 'designxadt']; // 登录页右下角版本开发基于不展示
|
||||
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'xadt', 'designxadt']; // 登录页右下角主体不展示
|
||||
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc',
|
||||
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'cgy', 'designcgy', 'zzww']; // 登录页样式
|
||||
export const NoQrcodeList = ['heb', 'designheb', 'cgy', 'designcgy', 'ntyl', 'designntyl'];
|
||||
@ -557,7 +570,8 @@ export const ProjectList = [
|
||||
{value: 'sdy', label: '苏电院'},
|
||||
{value: 'cgy', label: '成都工业'},
|
||||
{value: 'wjls', label: '微机联锁'},
|
||||
{value: 'zzww', label: '郑州共赢'}
|
||||
{value: 'zzww', label: '郑州共赢'},
|
||||
{value: 'richor', label: '中航锐创'}
|
||||
];
|
||||
export const localPackageProject = {
|
||||
localdesign: 'designheb',
|
||||
|
@ -31,7 +31,7 @@ export const deviceFaultType = {
|
||||
Section: [
|
||||
{label: '计轴故障', value: 'FAULT'},
|
||||
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
|
||||
{label: 'ARB', value: 'ARB'}
|
||||
{label: '橙光带故障', value: 'ARB'}
|
||||
// {label: '计轴干扰', value: 'DISTURBANCE'}
|
||||
],
|
||||
Signal: [
|
||||
@ -43,7 +43,8 @@ export const deviceFaultType = {
|
||||
{label: '反位失表', value: 'REVERSE_SPLIT'},
|
||||
{label: '挤岔', value: 'SQUEEZE'},
|
||||
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
|
||||
{label: '计轴故障', value: 'AXLE_FAULT'}
|
||||
{label: '计轴故障', value: 'AXLE_FAULT'},
|
||||
{label: '橙光带故障', value: 'ARB'}
|
||||
// {label: '道岔区段计轴故障', value: 'AXLE_FAULT'}
|
||||
],
|
||||
StationStand: [
|
||||
@ -70,7 +71,7 @@ export const deviceFaultMap = {
|
||||
Section: {
|
||||
FAULT: '计轴故障',
|
||||
CBTC_OCCUPIED_FAULT: '通信车占用',
|
||||
ARB: 'ARB'
|
||||
ARB: '橙光带故障'
|
||||
},
|
||||
Signal: {
|
||||
MAIN_FILAMENT_BROKEN: '熔断'
|
||||
@ -81,7 +82,8 @@ export const deviceFaultMap = {
|
||||
REVERSE_SPLIT: '反位失表',
|
||||
SQUEEZE: '挤岔',
|
||||
CBTC_OCCUPIED_FAULT: '通信车占用',
|
||||
AXLE_FAULT: '计轴故障'
|
||||
AXLE_FAULT: '计轴故障',
|
||||
ARB: '橙光带故障'
|
||||
},
|
||||
StationStand: {
|
||||
PSD_CANNOT_BE_CLOSED: '屏蔽门无法关闭',
|
||||
|
@ -665,6 +665,19 @@ const map = {
|
||||
}
|
||||
|
||||
return device;
|
||||
},
|
||||
checkDeviceShow: (state) => (stationCode, deviceCode) => {
|
||||
if (state.map && state.map.displayList && state.map.displayList.length) {
|
||||
let flag = false;
|
||||
state.map.displayList.forEach(item => {
|
||||
if (item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) {
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
return flag;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { publicAsyncRoute, asyncRouter, constantRoutes, user, projectTrain, projectXian, projectXty, projectGzzb, projectJsxt, projectJyd, projectTky, projectHeb, superAdmin, admin, userTrainingPlatform, JSXT, projectRoute, projectDrts, projectSdy } from '@/router/index';
|
||||
import { publicAsyncRoute, asyncRouter, constantRoutes, user, projectTrain, projectXian, projectXty, projectGzzb, projectJsxt, projectJyd, projectRichor, projectTky, projectHeb, superAdmin, admin, userTrainingPlatform, JSXT, projectRoute, projectDrts, projectSdy } from '@/router/index';
|
||||
import { loginInfo } from '@/scripts/ProjectConfig';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
@ -78,6 +78,8 @@ function resetAsyncRouter({ systemType }) {
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectDrts) {
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectRichor) {
|
||||
list = [...list, ...asyncRouter];
|
||||
} else if (systemType == projectSdy) {
|
||||
if (projectRoute && projectRoute.designsdy && projectRoute.designsdy.length) {
|
||||
projectRoute.designheb.forEach(item => {
|
||||
|
@ -12,21 +12,17 @@ const runPlan = {
|
||||
width: 800, // 运行图canvas 容器 宽度
|
||||
height: 600, // 运行图canvas 容器 高度
|
||||
refreshCount: 0, // 刷新页面重新加载
|
||||
initialPlanData: {}, // 运行图原始数据
|
||||
draftSelected: {}, // 草稿运行图选中对象
|
||||
draftStations: [], // 草稿运行图车站列表
|
||||
runPlanMap: {}, // 运行图数据map(以id和version 为标识)
|
||||
runPlanInfo: {}, // 运行图信息
|
||||
loadRunPlanCount: 0, // 运行图加载数据完成
|
||||
serviceNumberDataList: [] // 运行图数据
|
||||
serviceNumberDataList: [], // 运行图数据
|
||||
updateTrainRpData:{} // 更新仿真运行图数据
|
||||
},
|
||||
getters: {
|
||||
stations: (state) => {
|
||||
return state.stations || [];
|
||||
},
|
||||
draftStations: (state) => {
|
||||
return state.draftStations || [];
|
||||
},
|
||||
getRunPlanData: (state) => {
|
||||
if (!state.runPlanInfo || !state.runPlanInfo.templateId) {
|
||||
return '';
|
||||
@ -47,24 +43,6 @@ const runPlan = {
|
||||
setStations: (state, stations) => {
|
||||
state.stations = stations;
|
||||
},
|
||||
setDraftStations: (state, stations) => {
|
||||
state.draftStations = stations;
|
||||
},
|
||||
setInitialPlanData: (state, data) => {
|
||||
state.initialPlanData = {};
|
||||
if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
|
||||
const serviceList = data.serviceNumberDataList;
|
||||
serviceList.forEach((service, i) => {
|
||||
const trainList = service.tripNumberDataList;
|
||||
state.initialPlanData[service.serviceNumber] = { oldIndex: i, serviceNumber: service.serviceNumber, backup: service.backup, trainMap: {} };
|
||||
trainList.forEach((train, j) => {
|
||||
state.initialPlanData[service.serviceNumber].trainMap[`${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, right:train.right,
|
||||
directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList, endSecondTime:train.endSecondTime,
|
||||
startSecondTime: train.startSecondTime, startSectionCode:train.startSectionCode, endSectionCode:train.endSectionCode };
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
setPlanData: (state, data) => {
|
||||
state.planData = data;
|
||||
state.editData = {};
|
||||
@ -84,22 +62,6 @@ const runPlan = {
|
||||
}
|
||||
state.planLoadedCount++;
|
||||
},
|
||||
setDraftPlanData: (state, data) => {
|
||||
state.draftPlanData = data;
|
||||
state.draftEditData = {};
|
||||
if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
|
||||
const serviceList = data.serviceNumberDataList;
|
||||
serviceList.forEach((service, i) => {
|
||||
const trainList = service.tripNumberDataList;
|
||||
state.draftEditData[service.serviceNumber] = { oldIndex: i, serviceNumber: service.serviceNumber, backup: service.backup, trainMap: {} };
|
||||
trainList.forEach((train, j) => {
|
||||
state.draftEditData[service.serviceNumber].trainMap[`${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, right:train.right,
|
||||
directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList, endSecondTime:train.endSecondTime,
|
||||
startSecondTime: train.startSecondTime, startSectionCode:train.startSectionCode, endSectionCode:train.endSectionCode };
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
setSelected: (state, selected) => {
|
||||
state.selected = selected;
|
||||
},
|
||||
@ -113,7 +75,68 @@ const runPlan = {
|
||||
state.planData[serviceNumber] = { oldIndex, serviceNumber, trainMap: {} };
|
||||
state.planLoadedCount++;
|
||||
}
|
||||
},
|
||||
},
|
||||
setUpdateTrainRpData: (state, updateTrainRpData) => {
|
||||
state.updateTrainRpData = updateTrainRpData;
|
||||
},
|
||||
|
||||
updateTrainRunplan:(state, updateServiceNumber) => {
|
||||
const dataList = updateServiceNumber.serviceNumberDataList;
|
||||
const length = dataList.length;
|
||||
if (length > 0) {
|
||||
dataList.forEach(data=>{
|
||||
const {serviceNumber, tripNumberDataList} = data;
|
||||
const serviceNumberDataList = state.planData.serviceNumberDataList;
|
||||
const serviceObj = serviceNumberDataList.find(serviceNumberData=>{ return serviceNumberData.serviceNumber == serviceNumber; });
|
||||
if (!serviceObj) {
|
||||
// 原始计划不存在 添加
|
||||
state.editData[serviceNumber] = { oldIndex: serviceNumberDataList.length, serviceNumber: serviceNumber, backup: undefined, trainMap: {}};
|
||||
tripNumberDataList.forEach(tripNumberData=>{
|
||||
state.editData[serviceNumber].trainMap[tripNumberData.tripNumber] = Object.assign({oldIndex:tripNumberDataList.length }, tripNumberData);
|
||||
});
|
||||
state.planData.serviceNumberDataList.push({
|
||||
serviceNumber: serviceNumber,
|
||||
tripNumberDataList:[...tripNumberDataList]
|
||||
});
|
||||
} else {
|
||||
// 原始计划存在
|
||||
tripNumberDataList.forEach(tripNumberData=>{
|
||||
if (tripNumberData.invalid) {
|
||||
// 删除计划
|
||||
const index = serviceObj.tripNumberDataList.findIndex(tripNumberInfo=>{ return tripNumberInfo.tripNumber == tripNumberData.tripNumber; });
|
||||
if (tripNumberData.firstInvalid) {
|
||||
// 删除的第一条数据处理
|
||||
serviceObj.tripNumberDataList[index].stationTimeList.splice(1, tripNumberData.stationTimeList.length - 1);
|
||||
serviceObj.tripNumberDataList[index].firstInvalid = tripNumberData.firstInvalid;
|
||||
delete state.editData[serviceNumber].trainMap[tripNumberData.tripNumber];
|
||||
// state.editData[serviceNumber].trainMap[tripNumberData.tripNumber].stationTimeList.splice(1, tripNumberData.stationTimeList.length - 1);
|
||||
} else {
|
||||
serviceObj.tripNumberDataList.splice(index, 1);
|
||||
delete state.editData[serviceNumber].trainMap[tripNumberData.tripNumber];
|
||||
}
|
||||
} else {
|
||||
if (tripNumberData.add) {
|
||||
// 添加计划
|
||||
state.editData[serviceNumber].trainMap[tripNumberData.tripNumber] = Object.assign({oldIndex:serviceObj.tripNumberDataList.length }, tripNumberData);
|
||||
serviceObj.tripNumberDataList.push(tripNumberData);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 处理所有的车次号删除
|
||||
if (serviceObj.tripNumberDataList.length == 1 && serviceObj.tripNumberDataList[0].firstInvalid) {
|
||||
delete state.editData[serviceNumber];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
state.planLoadedCount++;
|
||||
// const serviceObj = state.planData[serviceNumber];
|
||||
// if (serviceObj) {
|
||||
// const oldIndex = serviceObj.oldIndex;
|
||||
// state.planData[serviceNumber] = { oldIndex, serviceNumber, trainMap: {} };
|
||||
// state.planLoadedCount++;
|
||||
// }
|
||||
},
|
||||
clear: (state) => {
|
||||
// state.stations = [];
|
||||
state.planData = {};
|
||||
@ -158,13 +181,6 @@ const runPlan = {
|
||||
resolve(mapModel);
|
||||
});
|
||||
},
|
||||
/** 设置草稿stations数据 */
|
||||
setDraftStations: ({ commit }, mapModel) => {
|
||||
return new Promise((resolve) =>{
|
||||
commit('setDraftStations', mapModel);
|
||||
resolve(mapModel);
|
||||
});
|
||||
},
|
||||
/** 重置运行图数据更新池 */
|
||||
resetRunPlanData:({ commit }) => {
|
||||
commit('resetRunPlanData');
|
||||
@ -177,17 +193,18 @@ const runPlan = {
|
||||
setPlanData: ({ commit }, data) => {
|
||||
commit('setPlanData', data);
|
||||
},
|
||||
setDraftPlanData: ({ commit }, data) => {
|
||||
commit('setDraftPlanData', data);
|
||||
},
|
||||
/** 设置初始运行图数据 */
|
||||
setInitialPlanData: ({ commit }, data) => {
|
||||
commit('setInitialPlanData', data);
|
||||
},
|
||||
/** 增加服务号*/
|
||||
addServiceNumber: ({ commit }, serviceNumber) => {
|
||||
commit('addServiceNumber', serviceNumber);
|
||||
},
|
||||
/** 更新仿真里的运行图(西安三加线抽线逻辑) */
|
||||
updateTrainRunplan: ({ commit }, updateServiceNumber) => {
|
||||
commit('updateTrainRunplan', updateServiceNumber);
|
||||
},
|
||||
/** 设置需要更新的仿真运行图数据 (西安三加线抽线逻辑) */
|
||||
setUpdateTrainRpData: ({ commit }, updateTrainRpData) => {
|
||||
commit('setUpdateTrainRpData', updateTrainRpData);
|
||||
},
|
||||
/** 选择车次*/
|
||||
setSelected: ({ commit }, selected) => {
|
||||
commit('setSelected', selected);
|
||||
|
@ -189,9 +189,13 @@ function handle(state, data) {
|
||||
store.dispatch('training/over');
|
||||
}
|
||||
break;
|
||||
case 'Simulation_PslStatus':
|
||||
case 'Simulation_PslStatus':
|
||||
state.simulationPslStatus = msg;
|
||||
break;
|
||||
// 运行图加线/抽线/变化推送消息
|
||||
case 'Simulation_Trip_Plan_Change':
|
||||
state.simulationPlanChange = msg;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@ -337,7 +341,8 @@ const socket = {
|
||||
deviceStateMessages: null, // 新版订阅设备状态消息
|
||||
simulationSpeed: 1, // 仿真倍速
|
||||
simulationPause: false,
|
||||
simulationPslStatus: [], //PSL面板按钮状态信息
|
||||
simulationPslStatus: [], // PSL面板按钮状态信息
|
||||
simulationPlanChange:{} // 运行图加线/抽线/变化推送消息
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
|
@ -92,9 +92,10 @@ const user = {
|
||||
const type = userInfo.type;
|
||||
const project = userInfo.project;
|
||||
const deviceCode = userInfo.deviceCode;
|
||||
const teacherLogin = userInfo.teacherLogin;
|
||||
return new Promise((resolve, reject) => {
|
||||
// 登录系统
|
||||
const params = Object.assign({ account: username, password, project:project, deviceCode:deviceCode }, type == 'design' ? LoginParams.Design : LoginParams.LianKeTang);
|
||||
const params = Object.assign({ account: username, password, project:project, deviceCode:deviceCode, teacherLogin:teacherLogin }, type == 'design' ? LoginParams.Design : LoginParams.LianKeTang);
|
||||
login(params).then(resp => {
|
||||
const token = resp.data;
|
||||
const header = { group: '', 'X-Token': token };
|
||||
|
@ -4,9 +4,9 @@ export function getBaseUrl() {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
|
||||
// BASE_API = 'http://192.168.2.175:9000'; // 旭强 有线
|
||||
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
|
||||
// BASE_API = 'http://192.168.3.120:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.2.183:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
@ -69,12 +69,10 @@ export function loadRunPlanData(group, dataError) {
|
||||
dbReadData('runPlan', store.state.runPlan.runPlanInfo.templateId, store.state.runPlan.runPlanInfo.version, async (runPlanData, version) =>{
|
||||
if (runPlanData && runPlanData.version == version) {
|
||||
await store.dispatch('runPlan/setPlanData', runPlanData);
|
||||
await store.dispatch('runPlan/setInitialPlanData', runPlanData);
|
||||
await store.dispatch('runPlan/loadRunPlanCountIncrease');
|
||||
} else if (runPlanData) {
|
||||
getEveryDayRunPlanNew(group).then(async (resp) => {
|
||||
await store.dispatch('runPlan/setPlanData', resp.data);
|
||||
await store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
await store.dispatch('runPlan/loadRunPlanCountIncrease');
|
||||
resp.data.templateId = store.state.runPlan.runPlanInfo.templateId;
|
||||
resp.data.version = store.state.runPlan.runPlanInfo.version;
|
||||
@ -85,7 +83,6 @@ export function loadRunPlanData(group, dataError) {
|
||||
} else {
|
||||
getEveryDayRunPlanNew(group).then(async (resp) => {
|
||||
await store.dispatch('runPlan/setPlanData', resp.data);
|
||||
await store.dispatch('runPlan/setInitialPlanData', resp.data);
|
||||
await store.dispatch('runPlan/loadRunPlanCountIncrease');
|
||||
resp.data.templateId = store.state.runPlan.runPlanInfo.templateId;
|
||||
resp.data.version = store.state.runPlan.runPlanInfo.version;
|
||||
|
@ -9,9 +9,9 @@
|
||||
</div>
|
||||
<div class="bullshit">
|
||||
<div class="bullshit__oops">OOPS!</div>
|
||||
<div class="bullshit__info">All rights reserved
|
||||
<!-- <div class="bullshit__info">All rights reserved
|
||||
<a style="color:#20a0ff" href="https://wallstreetcn.com" target="_blank">wallstreetcn</a>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="bullshit__headline">{{ message }}</div>
|
||||
<div class="bullshit__info">Please check that the URL you entered is correct, or click the button below to
|
||||
return to the homepage.</div>
|
||||
|
@ -1,121 +1,128 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-form-item :label="this.$t('ibp.buttonCode')" prop="code">
|
||||
<el-input v-model="form.code" :disabled="true">
|
||||
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{ $t('ibp.generateCode') }}</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('ibp.buttonColor')" prop="buttonColor">
|
||||
<el-select v-model="form.buttonColor" :placeholder="this.$t('ibp.selectTheButtonColor')">
|
||||
<el-option :label="this.$t('ibp.redButton')" value="red" />
|
||||
<el-option :label="this.$t('ibp.yellowButton')" value="yellow" />
|
||||
<el-option :label="this.$t('ibp.greenButton')" value="green" />
|
||||
<el-option :label="this.$t('ibp.blueButton')" value="blue" />
|
||||
<el-option :label="this.$t('ibp.grayButton')" value="gray" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('ibp.buttonWidth')" prop="buttonWidth">
|
||||
<el-input-number v-model="form.buttonWidth" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('ibp.xCoordinate')">
|
||||
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('ibp.yCoordinate')">
|
||||
<el-input-number v-model="form.y" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作">
|
||||
<el-select v-model="form.mean" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in operateMeanList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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"
|
||||
:key="item.code"
|
||||
:label="item.name + '(' + item.code +')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="needDirectionItem" label="方向">
|
||||
<el-select v-model="form.direction" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item, i) in directions"
|
||||
:key="i"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="initPage">{{ $t('global.cancel') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-form-item :label="this.$t('ibp.buttonCode')" prop="code">
|
||||
<el-input v-model="form.code" :disabled="true">
|
||||
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">{{
|
||||
$t("ibp.generateCode")
|
||||
}}</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('ibp.buttonColor')" prop="buttonColor">
|
||||
<el-select v-model="form.buttonColor" :placeholder="this.$t('ibp.selectTheButtonColor')">
|
||||
<el-option
|
||||
v-for="item in colors"
|
||||
:key="`btn${item}`"
|
||||
:label="`${$t(`ibp.${item}`)}${$t('ibp.button')}`"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('ibp.buttonLightColor')" prop="buttonLightColor">
|
||||
<el-select v-model="form.buttonLightColor">
|
||||
<el-option label="默认" value=""></el-option>
|
||||
<el-option
|
||||
v-for="item in colors"
|
||||
:key="`light${item}`"
|
||||
:label="`${$t(`ibp.${item}`)}`"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('ibp.buttonWidth')" prop="buttonWidth">
|
||||
<el-input-number v-model="form.buttonWidth" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('ibp.xCoordinate')">
|
||||
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('ibp.yCoordinate')">
|
||||
<el-input-number v-model="form.y" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作">
|
||||
<el-select v-model="form.mean" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in operateMeanList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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"
|
||||
:key="item.code"
|
||||
:label="item.name + '(' + item.code + ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="needDirectionItem" label="方向">
|
||||
<el-select v-model="form.direction" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item, i) in directions"
|
||||
:key="i"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{
|
||||
$t("global.delete")
|
||||
}}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="initPage">{{ $t("global.cancel") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getSectionListByCenStationCode, getSectionListByMapId } from '@/api/jmap/map';
|
||||
import { getSectionListByCenStationCode, getSectionListByMapId } from "@/api/jmap/map";
|
||||
export default {
|
||||
name: 'ButtonDraft',
|
||||
components: {
|
||||
},
|
||||
name: "ButtonDraft",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
isUpdate: false,
|
||||
buttonText: this.$t('ibp.createNow'),
|
||||
buttonText: this.$t("ibp.createNow"),
|
||||
showDeleteButton: false,
|
||||
operateMeanList: [
|
||||
{ label: '扣车', value: 'KC' },
|
||||
{ label: '终止扣车', value: 'ZZKC' },
|
||||
{ label: '紧急停车', value: 'JJTC' },
|
||||
{ label: '取消紧急停车', value: 'QXJJTC' },
|
||||
{ label: '报警切除', value: 'BJQC' },
|
||||
{ label: '屏蔽门开门', value: 'KM' },
|
||||
{ label: '计轴复位', value: 'AXLE_RESET' },
|
||||
{ label: '计轴预复位', value: 'AXLE_PRE_RESET' },
|
||||
{ label: '计轴预复零', value: 'PRERESET_Z' },
|
||||
{ label: "扣车", value: "KC" },
|
||||
{ label: "终止扣车", value: "ZZKC" },
|
||||
{ label: "紧急停车", value: "JJTC" },
|
||||
{ label: "取消紧急停车", value: "QXJJTC" },
|
||||
{ label: "报警切除", value: "BJQC" },
|
||||
{ label: "屏蔽门开门", value: "KM" },
|
||||
{ label: "屏蔽门关门", value: "GM" },
|
||||
{ label: "计轴复位", value: "AXLE_RESET" },
|
||||
{ label: "计轴区段复位", value: "AXLE_PRE_RESET" },
|
||||
{ label: "计轴预复位", value: "PRERESET_Z" },
|
||||
{ label: "试灯", value: "SD" }
|
||||
],
|
||||
operateWithoutDirections: ['AXLE_RESET', 'AXLE_PRE_RESET', 'PRERESET_Z'],
|
||||
colors: ["red", "yellow", "blue", "green", "gray"],
|
||||
operateWithoutDirections: ["AXLE_RESET", "AXLE_PRE_RESET", "PRERESET_Z", "SD"],
|
||||
form: {
|
||||
code: '',
|
||||
buttonColor: 'red',
|
||||
code: "",
|
||||
buttonColor: "red",
|
||||
buttonLightColor: "",
|
||||
buttonWidth: 25,
|
||||
x: 10,
|
||||
y: 10,
|
||||
sectionCode: '',
|
||||
mean: '',
|
||||
direction: null,
|
||||
sectionCode: "",
|
||||
mean: "",
|
||||
direction: null
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.$t('ibp.enterTheButtonCode'), trigger: 'blur' }
|
||||
],
|
||||
buttonColor: [
|
||||
{ required: true, message: this.$t('ibp.selectTheButtonColor'), trigger: 'change'}
|
||||
],
|
||||
buttonWidth: [
|
||||
{ required: true, message: this.$t('ibp.enterTheButtonWidth'), trigger: 'blur' }
|
||||
],
|
||||
sectionCode: [
|
||||
{ required: true, message: '请选择关联区段', trigger: 'blur' }
|
||||
],
|
||||
code: [{ required: true, message: this.$t("ibp.enterTheButtonCode"), trigger: "blur" }],
|
||||
buttonColor: [{ required: true, message: this.$t("ibp.selectTheButtonColor"), trigger: "change" }],
|
||||
buttonWidth: [{ required: true, message: this.$t("ibp.enterTheButtonWidth"), trigger: "blur" }],
|
||||
sectionCode: [{ required: true, message: "请选择关联区段", trigger: "blur" }]
|
||||
},
|
||||
sectionList: [],
|
||||
directions: [
|
||||
{ name: '全部', value: null},
|
||||
{ name: '上行', value: true},
|
||||
{ name: '下行', value: false},
|
||||
],
|
||||
directions: [{ name: "全部", value: null }, { name: "上行", value: true }, { name: "下行", value: false }]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -124,14 +131,15 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
if (model._type === 'SquareButton' ) {
|
||||
this.buttonText = this.$t('global.modify');
|
||||
"$store.state.ibp.rightClickCount": function(val) {
|
||||
const model = this.$store.getters["ibp/updateDeviceData"];
|
||||
if (model._type === "SquareButton") {
|
||||
this.buttonText = this.$t("global.modify");
|
||||
this.showDeleteButton = true;
|
||||
this.isUpdate = true;
|
||||
this.form.code = model.code;
|
||||
this.form.buttonColor = model.color;
|
||||
this.form.buttonLightColor = model.lightColor;
|
||||
this.form.buttonWidth = model.width;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
@ -143,40 +151,45 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.stationCode) {
|
||||
getSectionListByCenStationCode(this.$route.query.mapId, this.$route.query.stationCode).then(resp => {
|
||||
this.sectionList = resp.data;
|
||||
// console.log(resp.data);
|
||||
}).catch(() => {
|
||||
this.$message.error('获取区段列表失败!');
|
||||
});
|
||||
getSectionListByCenStationCode(this.$route.query.mapId, this.$route.query.stationCode)
|
||||
.then(resp => {
|
||||
this.sectionList = resp.data;
|
||||
// console.log(resp.data);
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message.error("获取区段列表失败!");
|
||||
});
|
||||
} else {
|
||||
getSectionListByMapId(this.$route.query.mapId).then(resp => {
|
||||
this.sectionList = resp.data;
|
||||
console.log(resp.data);
|
||||
}).catch(() => {
|
||||
this.$message.error('获取区段列表失败!');
|
||||
});
|
||||
getSectionListByMapId(this.$route.query.mapId)
|
||||
.then(resp => {
|
||||
this.sectionList = resp.data;
|
||||
console.log(resp.data);
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message.error("获取区段列表失败!");
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
this.$refs[form].validate(valid => {
|
||||
if (valid) {
|
||||
const buttonModel = {
|
||||
point: {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'SquareButton',
|
||||
_type: "SquareButton",
|
||||
code: this.form.code,
|
||||
color: this.form.buttonColor,
|
||||
status: 'off',
|
||||
lightColor: this.form.buttonLightColor,
|
||||
status: "off",
|
||||
width: this.form.buttonWidth,
|
||||
mean: this.form.mean,
|
||||
sectionCode: this.form.sectionCode,
|
||||
direction: this.form.direction,
|
||||
direction: this.form.direction
|
||||
};
|
||||
this.$emit('createData', buttonModel);
|
||||
this.$emit("createData", buttonModel);
|
||||
this.initPage();
|
||||
} else {
|
||||
return false;
|
||||
@ -189,40 +202,47 @@ export default {
|
||||
x: this.form.x,
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'SquareButton',
|
||||
_type: "SquareButton",
|
||||
code: this.form.code,
|
||||
color: this.form.buttonColor,
|
||||
status: 'off',
|
||||
lightColor: this.form.buttonLightColor,
|
||||
status: "off",
|
||||
width: this.form.buttonWidth,
|
||||
mean: this.form.mean,
|
||||
sectionCode: this.form.sectionCode,
|
||||
direction: this.form.direction,
|
||||
direction: this.form.direction
|
||||
};
|
||||
this.$emit('deleteDataModel', buttonModel );
|
||||
this.$emit("deleteDataModel", buttonModel);
|
||||
this.initPage();
|
||||
},
|
||||
initPage() {
|
||||
this.isUpdate = false;
|
||||
this.buttonText = this.$t('ibp.createNow');
|
||||
this.buttonText = this.$t("ibp.createNow");
|
||||
this.showDeleteButton = false;
|
||||
this.form = {
|
||||
code: '',
|
||||
buttonColor: 'red',
|
||||
code: "",
|
||||
buttonColor: "red",
|
||||
buttonLightColor: "",
|
||||
buttonWidth: 25,
|
||||
x: 10,
|
||||
y: 10,
|
||||
mean: '',
|
||||
sectionCode: '',
|
||||
direction: null,
|
||||
mean: "",
|
||||
sectionCode: "",
|
||||
direction: null
|
||||
};
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
this.form.code = 'sButton_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
this.form.code =
|
||||
"sButton_" +
|
||||
mydate.getDay() +
|
||||
mydate.getHours() +
|
||||
mydate.getMinutes() +
|
||||
mydate.getSeconds() +
|
||||
mydate.getMilliseconds() +
|
||||
Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped></style>
|
||||
|
@ -199,16 +199,8 @@ export default {
|
||||
},
|
||||
updateRunPlanData(data) {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||
data.forEach(item => {
|
||||
if (item && initialPlanData[item.serviceNumber]) {
|
||||
Object.keys(initialPlanData[item.serviceNumber].trainMap).forEach(ele => {
|
||||
if (initialPlanData[item.serviceNumber].trainMap[ele + ''].tripNumber == item.tripNumber) {
|
||||
item.directionCode = initialPlanData[item.serviceNumber].trainMap[ele + ''].directionCode;
|
||||
}
|
||||
});
|
||||
item.secondTime = item.second;
|
||||
}
|
||||
item.secondTime = item.second;
|
||||
});
|
||||
this.kmRangeMap = this.PlanParser.convertStationsToMap(stations);
|
||||
this.runSeries = this.PlanParser.updateDataToModels(data, stations, this.kmRangeMap,
|
||||
@ -234,7 +226,7 @@ export default {
|
||||
await this.loadInitData();
|
||||
this.inter && clearInterval(this.inter);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
console.log(error);
|
||||
this.$messageBox(`加载运行图数据失败`);
|
||||
}
|
||||
},
|
||||
|
@ -77,6 +77,7 @@
|
||||
<div style="display: inline-block;width: 100%;margin-bottom: 10px;">
|
||||
<div style="display:inline-block">
|
||||
<el-checkbox v-model="isAutoLogin">{{ $t('login.autoLogin') }}</el-checkbox>
|
||||
<el-checkbox v-if="project === 'cgy'" v-model="teacherLogin">教师登录</el-checkbox>
|
||||
</div>
|
||||
<el-popover
|
||||
v-if="!noQrcodeList.includes(project)"
|
||||
@ -105,6 +106,9 @@
|
||||
<div v-if="!mainBodyNoShow.includes(project)" style="position: absolute; bottom: 10px;right: 20px; font-size: 14px;">
|
||||
<span>{{ '主体:北京玖琏科技有限公司 备案号:京ICP备18028522号' }}</span>
|
||||
</div>
|
||||
<div v-if="project.endsWith('xadt')" style="position: absolute; bottom: 10px;right: 20px; font-size: 14px;">
|
||||
<span>本产品由西安地铁(李乐工作室)与北京玖琏科技有限公司联合开发</span>
|
||||
</div>
|
||||
<div v-if="project === 'drts'" style="position: absolute; bottom: 50px; font-size: 20px;right: 20px;color:#3D3D3D;width: 370px;">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
@ -176,6 +180,7 @@ export default {
|
||||
QCode: QCode,
|
||||
loading111: true,
|
||||
isAutoLogin: false,
|
||||
teacherLogin: false,
|
||||
loginForm: {
|
||||
username: '',
|
||||
password: ''
|
||||
@ -417,6 +422,7 @@ export default {
|
||||
model.type = this.modelType;
|
||||
model.project = loginInfo[this.project].loginParam;
|
||||
model.deviceCode = this.$route.query.projectDevice;
|
||||
model.teacherLogin = this.teacherLogin;
|
||||
this.loading = true;
|
||||
if (this.isAutoLogin) {
|
||||
Cookies.set(this.cookiesName, model.username, { expires: 2});
|
||||
@ -562,7 +568,11 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$router.push({ path: this.path });
|
||||
if (this.teacherLogin) {
|
||||
this.$router.push({ path: '/info/organization/classManage?enter=teacher' });
|
||||
} else {
|
||||
this.$router.push({ path: this.path });
|
||||
}
|
||||
}
|
||||
},
|
||||
handleLanguage() {
|
||||
@ -771,7 +781,7 @@ export default {
|
||||
position: relative;
|
||||
}
|
||||
.text-box{
|
||||
font-size: 40px;
|
||||
font-size: 39px;
|
||||
font-weight: bold;
|
||||
top: 150px;
|
||||
width: 1050px;
|
||||
|
@ -9,10 +9,10 @@
|
||||
:close-on-click-modal="false"
|
||||
top="25vh"
|
||||
>
|
||||
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="100px" class="demo-ruleForm">
|
||||
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item prop="email">
|
||||
<template slot="label">
|
||||
<span>邮  箱:</span>
|
||||
<span>邮箱(账号):</span>
|
||||
</template>
|
||||
<el-input v-model="form.email" />
|
||||
</el-form-item>
|
||||
|
@ -271,16 +271,8 @@ export default {
|
||||
},
|
||||
updateRunPlanData(data) {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||
data.forEach(item => {
|
||||
if (item && initialPlanData[item.serviceNumber]) {
|
||||
Object.keys(initialPlanData[item.serviceNumber].trainMap).forEach(ele => {
|
||||
if (initialPlanData[item.serviceNumber].trainMap[ele + ''].tripNumber == item.tripNumber) {
|
||||
item.directionCode = initialPlanData[item.serviceNumber].trainMap[ele + ''].directionCode;
|
||||
}
|
||||
});
|
||||
item.secondTime = item.second;
|
||||
}
|
||||
item.secondTime = item.second;
|
||||
});
|
||||
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
||||
this.runSeries = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
|
||||
|
@ -48,7 +48,6 @@ export default {
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
this.$store.dispatch('runPlan/setInitialPlanData', []);
|
||||
},
|
||||
mounted() {
|
||||
// this.menus = this.$theme.loadPlanComponent(this.$route.query.lineCode);
|
||||
|
@ -157,7 +157,7 @@ export default {
|
||||
mounted() {
|
||||
this.staticSeries = []; this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
|
||||
this.PlanParser = this.$theme.loadPlanParser(this.$route.query.lineCode);
|
||||
this.loadChartPage();
|
||||
// this.loadChartPage();
|
||||
EventBus.$on('clearRunSeries', () => {
|
||||
this.runSeries = [];
|
||||
});
|
||||
@ -230,16 +230,8 @@ export default {
|
||||
},
|
||||
updateRunPlanData(data) {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||
data.forEach(item => {
|
||||
if (item && initialPlanData[item.serviceNumber]) {
|
||||
Object.keys(initialPlanData[item.serviceNumber].trainMap).forEach(ele => {
|
||||
if (initialPlanData[item.serviceNumber].trainMap[ele + ''].tripNumber == item.tripNumber) {
|
||||
item.directionCode = initialPlanData[item.serviceNumber].trainMap[ele + ''].directionCode;
|
||||
}
|
||||
});
|
||||
item.secondTime = item.second;
|
||||
}
|
||||
item.secondTime = item.second;
|
||||
});
|
||||
this.kmRangeMap = this.PlanParser.convertStationsToMap(stations);
|
||||
this.runSeries = this.PlanParser.updateDataToModels(data, stations, this.kmRangeMap,
|
||||
@ -531,13 +523,18 @@ export default {
|
||||
axisTooltip(param) {
|
||||
const station = (this.$store.getters['map/getDeviceByCode'](param.data[2])) || { name: '', kmRange: '' };
|
||||
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('');
|
||||
if (station.name) {
|
||||
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 '';
|
||||
}
|
||||
} else {
|
||||
|
||||
return [
|
||||
`Point Data <hr size=1 style=" margin: 3px 0">`,
|
||||
`车站名称: ${station.name}<br>`,
|
||||
@ -566,8 +563,12 @@ export default {
|
||||
}
|
||||
} else if (this.seriesMap[serviceNumber]) {
|
||||
markPoint = deepAssign({}, this.seriesMap[serviceNumber].markPoint);
|
||||
markPoint.data.forEach(each => {
|
||||
each.label.color = '#f00';
|
||||
markPoint.data.forEach((each, index) => {
|
||||
if (each.symbol == 'circle') {
|
||||
markPoint.data.splice(index, 1);
|
||||
} else {
|
||||
each.label.color = '#f00';
|
||||
}
|
||||
});
|
||||
data = this.seriesMap[serviceNumber].data;
|
||||
}
|
||||
|
@ -232,16 +232,8 @@ export default {
|
||||
},
|
||||
updateRunPlanData(data) {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||
data.forEach(item => {
|
||||
if (item && initialPlanData[item.serviceNumber]) {
|
||||
Object.keys(initialPlanData[item.serviceNumber].trainMap).forEach(ele => {
|
||||
if (initialPlanData[item.serviceNumber].trainMap[ele + ''].tripNumber == item.tripNumber) {
|
||||
item.directionCode = initialPlanData[item.serviceNumber].trainMap[ele + ''].directionCode;
|
||||
}
|
||||
});
|
||||
item.secondTime = item.second;
|
||||
}
|
||||
item.secondTime = item.second;
|
||||
});
|
||||
this.kmRangeMap = this.PlanParser.convertStationsToMap(stations);
|
||||
this.runSeries = this.PlanParser.updateDataToModels(data, stations, this.kmRangeMap,
|
||||
@ -257,11 +249,11 @@ export default {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
this.kmRangeMap = this.PlanParser.convertStationsToMap(stations);
|
||||
if (this.$route.query.lineCode === '07') {
|
||||
this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisX(stations)]);
|
||||
} else {
|
||||
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;
|
||||
|
@ -5,14 +5,28 @@
|
||||
width="400px"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div><span class="el-icon-user" style="font-size:15px;margin-right:8px;" />联系人:小九</div>
|
||||
<div class="eachInfo"><span class="el-icon-mobile-phone" style="font-size:15px;margin-right:7px;" />手 机:13289398171</div>
|
||||
<div class="eachInfo"><span class="el-icon-message" style="font-size:15px;margin-right:7px;" />邮 箱:ServiceEmail@joylink.club</div>
|
||||
<div class="eachInfo">
|
||||
<span class="el-icon-chat-round" style="font-size:15px;margin-right:3px;vertical-align:top;" />
|
||||
<span style="vertical-align: top;">微 信:</span>
|
||||
<img :src="wchatImg" width="80" height="80">
|
||||
<div v-if="thirdLogin">
|
||||
<div><span class="el-icon-user" style="font-size:15px;margin-right:8px;" />联系人:欧阳炜椿</div>
|
||||
<div class="eachInfo"><span class="el-icon-mobile-phone" style="font-size:15px;margin-right:7px;" />电 话:4000500081</div>
|
||||
<div class="eachInfo"><span class="el-icon-message" style="font-size:15px;margin-right:7px;" />邮 箱:zhrc@richortech.com</div>
|
||||
<div class="eachInfo"><span class="el-icon-connection" style="font-size:15px;margin-right:7px;" />网 址:www.richortech.com</div>
|
||||
<!-- <div class="eachInfo">
|
||||
<span class="el-icon-chat-round" style="font-size:15px;margin-right:3px;vertical-align:top;" />
|
||||
<span style="vertical-align: top;">微 信:</span>
|
||||
<img :src="wchatImg" width="80" height="80">
|
||||
</div> -->
|
||||
</div>
|
||||
<div v-else>
|
||||
<div><span class="el-icon-user" style="font-size:15px;margin-right:8px;" />联系人:小九</div>
|
||||
<div class="eachInfo"><span class="el-icon-mobile-phone" style="font-size:15px;margin-right:7px;" />手 机:13289398171</div>
|
||||
<div class="eachInfo"><span class="el-icon-message" style="font-size:15px;margin-right:7px;" />邮 箱:ServiceEmail@joylink.club</div>
|
||||
<div class="eachInfo">
|
||||
<span class="el-icon-chat-round" style="font-size:15px;margin-right:3px;vertical-align:top;" />
|
||||
<span style="vertical-align: top;">微 信:</span>
|
||||
<img :src="wchatImg" width="80" height="80">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
@ -20,6 +34,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import wchat from '@/assets/wchat.png';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
export default {
|
||||
name:'',
|
||||
data() {
|
||||
@ -28,6 +43,11 @@ export default {
|
||||
wchatImg: wchat
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
thirdLogin() {
|
||||
return getSessionStorage('project') == 'richor';
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<div class="schema" :style="{top: offset+'px'}">
|
||||
<select-station v-if="isLocalStation && !isScript" ref="selectStation" :style-css="'width: 100px;'" />
|
||||
<el-select v-if="isAdmin" v-model="speed" style="width: 100px;" size="small" @change="speedChange">
|
||||
<el-select v-model="speed" style="width: 100px;" size="small" @change="speedChange">
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
@ -84,18 +84,6 @@ export default {
|
||||
swch: '02',
|
||||
isScriptCommand:false,
|
||||
faultMode: false,
|
||||
speedList:[
|
||||
{ value: 1, label: '1倍速' },
|
||||
{ value: 2, label: '2倍速' },
|
||||
{ value: 3, label: '3倍速' },
|
||||
{ value: 4, label: '4倍速' },
|
||||
{ value: 5, label: '5倍速' },
|
||||
{ value: 6, label: '6倍速' },
|
||||
{ value: 7, label: '7倍速' },
|
||||
{ value: 8, label: '8倍速' },
|
||||
{ value: 9, label: '9倍速' },
|
||||
{ value: 10, label: '10倍速' }
|
||||
],
|
||||
speed: 1
|
||||
// firstLoad: true
|
||||
};
|
||||
@ -133,6 +121,26 @@ export default {
|
||||
},
|
||||
isAdmin() {
|
||||
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');
|
||||
},
|
||||
speedList() {
|
||||
return this.isAdmin ? [
|
||||
{ value: 1, label: '1倍速' },
|
||||
{ value: 2, label: '2倍速' },
|
||||
{ value: 3, label: '3倍速' },
|
||||
{ value: 4, label: '4倍速' },
|
||||
{ value: 5, label: '5倍速' },
|
||||
{ value: 6, label: '6倍速' },
|
||||
{ value: 7, label: '7倍速' },
|
||||
{ value: 8, label: '8倍速' },
|
||||
{ value: 9, label: '9倍速' },
|
||||
{ value: 10, label: '10倍速' }
|
||||
] : [
|
||||
{ value: 1, label: '1倍速' },
|
||||
{ value: 2, label: '2倍速' },
|
||||
{ value: 3, label: '3倍速' },
|
||||
{ value: 4, label: '4倍速' },
|
||||
{ value: 5, label: '5倍速' }
|
||||
];
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -142,14 +150,28 @@ export default {
|
||||
this.swch = '01';
|
||||
}
|
||||
},
|
||||
'$store.state.map.mapDataLoadedCount': function () {
|
||||
// '$store.state.map.mapDataLoadedCount': function () {
|
||||
// this.loadRunData();
|
||||
// },
|
||||
'$store.state.training.subscribeCount': function () {
|
||||
this.loadRunData();
|
||||
},
|
||||
'$store.state.socket.simulationPlanChange': function (val) {
|
||||
// 判断是否已经加载运行图,若加载只处理运行图数据,否则,缓存数据
|
||||
if (JSON.stringify(this.$store.state.runPlan.planData) == '{}') {
|
||||
this.$store.dispatch('runPlan/setUpdateTrainRpData', val);
|
||||
} else {
|
||||
this.$store.dispatch('runPlan/updateTrainRunplan', val);
|
||||
}
|
||||
},
|
||||
'$store.state.training.triggerFaultCount': function () {
|
||||
this.setFault();
|
||||
},
|
||||
'$store.state.runPlan.loadRunPlanCount': function () {
|
||||
this.viewDisabled = false;
|
||||
if (JSON.stringify(this.$store.state.runPlan.updateTrainRpData) != '{}') {
|
||||
this.$store.dispatch('runPlan/updateTrainRunplan', this.$store.state.runPlan.updateTrainRpData);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationSpeed': function (val) {
|
||||
this.speed = val;
|
||||
|
@ -57,12 +57,13 @@ export default {
|
||||
this.showMemberId = val;
|
||||
const member = this.$store.state.training.memberData[val];
|
||||
const station = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
||||
const lineCode = this.$store.getters['map/lineCode'];
|
||||
if ((lineCode === '02' || lineCode === '05') && station) {
|
||||
this.showStation = station.code;
|
||||
const showStationCode = this.stationCentralizedMap[station.code];
|
||||
this.setCenter(showStationCode);
|
||||
} else if (station) {
|
||||
// const lineCode = this.$store.getters['map/lineCode'];
|
||||
// if ((lineCode === '02' || lineCode === '05') && station) {
|
||||
// this.showStation = station.code;
|
||||
// const showStationCode = this.stationCentralizedMap[station.code];
|
||||
// this.setCenter(showStationCode);
|
||||
// } else
|
||||
if (station) {
|
||||
this.showStation = station.code;
|
||||
const showStationCode = this.stationCentralizedMap[station.code];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
|
@ -499,22 +499,21 @@ export default {
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowMode(list, showMode);
|
||||
EventBus.$emit('select_DrawType', showMode);
|
||||
},
|
||||
setShowStation(stationCode, setCenter) {
|
||||
const lineCode = this.$store.getters['map/lineCode'];
|
||||
if (lineCode === '02' || lineCode === '05') {
|
||||
!setCenter && this.setCenter(stationCode);
|
||||
} else {
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
|
||||
this.$jlmap.updateShowStation(list, stationCode);
|
||||
!setCenter && this.setCenter(stationCode);
|
||||
// if (lineCode === '02' || lineCode === '05') {
|
||||
// !setCenter && this.setCenter(stationCode);
|
||||
// } else {
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
|
||||
this.$jlmap.updateShowStation(list, stationCode);
|
||||
!setCenter && this.setCenter(stationCode);
|
||||
// }
|
||||
},
|
||||
setOffset(data, num, sum, obj) {
|
||||
this.$jlmap.switchScreen(data, num, sum, obj);
|
||||
|
@ -552,18 +552,18 @@ export default {
|
||||
// },
|
||||
setShowStation(stationCode) {
|
||||
const showStation = this.centralizedStationMap[stationCode];
|
||||
const lineCode = this.$store.getters['map/lineCode'];
|
||||
if (lineCode === '02' || lineCode === '05') {
|
||||
this.$jlmap.setCenter(showStation);
|
||||
} else {
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list, showStation);
|
||||
this.$jlmap.setCenter(showStation);
|
||||
// const lineCode = this.$store.getters['map/lineCode'];
|
||||
// if (lineCode === '02' || lineCode === '05') {
|
||||
// this.$jlmap.setCenter(showStation);
|
||||
// } else {
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list, showStation);
|
||||
this.$jlmap.setCenter(showStation);
|
||||
// }
|
||||
},
|
||||
setCentralizedstationList(map) {
|
||||
this.centralizedstationList = [];
|
||||
|
@ -26,7 +26,8 @@
|
||||
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) -->
|
||||
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式[Tab]':'切换到指令模式[Tab]' }}</el-button>
|
||||
</div>
|
||||
<join-run-plan-view v-if="running && !dataError" ref="runPlanView" :group="group" />
|
||||
<!-- running && -->
|
||||
<join-run-plan-view v-if="!dataError" ref="runPlanView" :group="group" />
|
||||
<select-ibp ref="selectIbp" />
|
||||
</div>
|
||||
|
||||
@ -160,7 +161,18 @@ export default {
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
'$store.state.map.mapDataLoadedCount': function () {
|
||||
'$store.state.socket.simulationPlanChange': function (val) {
|
||||
// 判断是否已经加载运行图,若加载只处理运行图数据,否则,缓存数据
|
||||
if (JSON.stringify(this.$store.state.runPlan.planData) == '{}') {
|
||||
this.$store.dispatch('runPlan/setUpdateTrainRpData', val);
|
||||
} else {
|
||||
this.$store.dispatch('runPlan/updateTrainRunplan', val);
|
||||
}
|
||||
},
|
||||
// '$store.state.map.mapDataLoadedCount': function () {
|
||||
// this.loadRunData(this.$route.query);
|
||||
// },
|
||||
'$store.state.training.subscribeCount': function () {
|
||||
this.loadRunData(this.$route.query);
|
||||
},
|
||||
'$store.state.training.triggerFaultCount': function () {
|
||||
@ -169,6 +181,10 @@ export default {
|
||||
'$store.state.runPlan.loadRunPlanCount': function () {
|
||||
this.viewDisabled = false;
|
||||
this.firstLoad = false;
|
||||
if (JSON.stringify(this.$store.state.runPlan.updateTrainRpData) != '{}') {
|
||||
this.$store.dispatch('runPlan/updateTrainRunplan', this.$store.state.runPlan.updateTrainRpData);
|
||||
this.$store.dispatch('runPlan/setUpdateTrainRpData', {});
|
||||
}
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
|
@ -95,6 +95,7 @@ export default {
|
||||
return device;
|
||||
},
|
||||
clickEvent(em) {
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
var device = { _type: em.deviceType, _code: em.deviceCode, _event: MouseEvent.Left };
|
||||
|
||||
const lineCode = this.$store.getters['map/lineCode'];
|
||||
|
@ -8,8 +8,15 @@
|
||||
<b>{{ mapInfo.name }}</b>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-button type="text" class="operate-button" @click="showMap">绘图显隐</el-button>
|
||||
<el-button type="text" class="operate-button" @click="showMap">显隐</el-button>
|
||||
<el-button type="text" class="operate-button" @click="dataRelation">{{ $t('map.advanced') }}</el-button>
|
||||
<el-dropdown class="operate-button" trigger="click">
|
||||
<span class="el-dropdown-link">配置</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item><span @click="showLocalConfig">现地配置</span></el-dropdown-item>
|
||||
<el-dropdown-item><span @click="showScreenConfig">大屏配置</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-dropdown class="operate-button" trigger="click">
|
||||
<span class="el-dropdown-link">数据操作</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
@ -19,7 +26,7 @@
|
||||
</el-dropdown>
|
||||
<el-button v-if="isSave" type="text" style="padding: 3px 0" :disabled="$attrs.mapSaveing" @click="saveMapEvent">{{ $t('map.save') }}</el-button>
|
||||
</div>
|
||||
<el-tabs v-show="projectType" v-model="enabledTab" class="mapEdit" type="card">
|
||||
<el-tabs v-show="configShow === 'none'" v-model="enabledTab" class="mapEdit" type="card">
|
||||
<el-tab-pane v-for="(each,index) in tabList" :key="index" :label="each.label" class="tab_pane_box" :name="each.name" :lazy="lazy">
|
||||
<component
|
||||
:is="each.menus"
|
||||
@ -31,10 +38,14 @@
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<template v-show="!projectType">
|
||||
<template v-if="configShow === 'local'">
|
||||
<local-config ref="localConfig" :selected="selected" @goDraw="goDraw" />
|
||||
</template>
|
||||
<template v-show="configShow === 'screen'">
|
||||
<split-screen
|
||||
ref="splitScreen"
|
||||
:selected="selected"
|
||||
@goDraw="goDraw"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
@ -68,7 +79,7 @@ import SplitScreen from './splitScreen';
|
||||
import FloodGate from './floodGate';
|
||||
import DirectionRod from './directionRod';
|
||||
import SignalButton from './signalButton';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import LocalConfig from './localConfig';
|
||||
|
||||
export default {
|
||||
name: 'MapOperate',
|
||||
@ -99,7 +110,8 @@ export default {
|
||||
SplitScreen,
|
||||
FloodGate,
|
||||
DirectionRod,
|
||||
SignalButton
|
||||
SignalButton,
|
||||
LocalConfig
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -145,7 +157,7 @@ export default {
|
||||
],
|
||||
selectDevice:'',
|
||||
enabledTab: 'Section',
|
||||
projectType: true
|
||||
configShow: 'none'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -171,18 +183,20 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('select_DrawType', (showMode) => {
|
||||
if (showMode == '04') {
|
||||
this.projectType = false;
|
||||
} else {
|
||||
this.projectType = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
dataRelation() {
|
||||
this.$emit('selectView', 'path');
|
||||
},
|
||||
showLocalConfig() {
|
||||
this.configShow = 'local';
|
||||
},
|
||||
showScreenConfig() {
|
||||
this.configShow = 'screen';
|
||||
},
|
||||
goDraw() {
|
||||
this.configShow = 'none';
|
||||
},
|
||||
showMap() {
|
||||
this.$emit('showMap');
|
||||
},
|
||||
|
310
src/views/newMap/newMapdraft/mapoperate/localConfig.vue
Normal file
310
src/views/newMap/newMapdraft/mapoperate/localConfig.vue
Normal file
@ -0,0 +1,310 @@
|
||||
<template>
|
||||
<div v-loading="loading" class="view-control-content">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-table :data="tableData" style="width: 80%; margin: 0 auto;">
|
||||
<el-table-column label="车站">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="stationCode in scope.row.stationCodeList">
|
||||
<span :key="stationCode" style="margin-left: 10px">{{ getDeviceName(stationCode) }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click.native.prevent="editModel(tableData, scope.$index)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="text" size="small" @click.native.prevent="deleteModel(tableData, scope.$index)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-card class="box-card" shadow="never" style="width: 80%; margin: 0 auto 15px; border-top: none;">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 12px;">{{ cardTitle }}</span>
|
||||
<el-button style="float: right; padding: 3px 3px" type="text" @click="clear">清空</el-button>
|
||||
<el-button v-if="cardMode === 'generate'" style="float: right; padding: 3px 0" type="text" @click="generateOverlab">生成</el-button>
|
||||
<el-button-group v-else-if=" cardMode === 'edit'" style="float: right;">
|
||||
<el-button type="text" style="padding:3px 3px" @click="updateOverlab">修改</el-button>
|
||||
<el-button type="text" style="padding:3px 0" @click="cancelOverlab">取消</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div style="padding: 10px;font-size: 14px;">
|
||||
<div>
|
||||
<span>车站:</span>
|
||||
<el-select v-model="addModel.stationCodeList" size="mini" style="width: 300px;" multiple placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="content-box-list" style="margin-top: 10px;">
|
||||
<div class="title-box">设备列表</div>
|
||||
<div class="list-box">
|
||||
<div v-for="nor in addModel.elementList" :key="nor.code" class="list-content">
|
||||
<div class="name">{{ getDeviceName(nor) }}</div>
|
||||
<div class="close" @click="delList(nor, addModel.elementList)"><i class="el-icon-close" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<div style="display: table; margin-left: 90px; margin-top: 12px; margin-bottom: 20px;">
|
||||
<el-button type="primary" size="small" @click="generateData">按集中站生成并保存</el-button>
|
||||
<el-button type="primary" size="small" @click="save">保存</el-button>
|
||||
<el-button type="primary" size="small" @click="back">返回</el-button>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { saveMap } from '@/api/jmap/mapdraft';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
addModel: {
|
||||
stationCodeList: [],
|
||||
elementList: []
|
||||
},
|
||||
list: [],
|
||||
field: '',
|
||||
cardMode: 'generate',
|
||||
index: '',
|
||||
isPreview: true,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList',
|
||||
'stationList',
|
||||
'signalList',
|
||||
'switchList',
|
||||
'stationStandList',
|
||||
'automaticRouteButtonList',
|
||||
'axleCounterResetButtonList',
|
||||
'cycleButtonList',
|
||||
'directionRodList',
|
||||
'indicatorLightList',
|
||||
'lineList',
|
||||
'outerFrameList',
|
||||
'psdList',
|
||||
'responderList',
|
||||
'tbStrategyList',
|
||||
'tempSpeedLimitList',
|
||||
'textList',
|
||||
'totalGuideLockButtonVOList',
|
||||
'localStationConfig',
|
||||
'seclectDeviceList'
|
||||
]),
|
||||
cardTitle() {
|
||||
if (this.cardMode === 'generate') {
|
||||
return '生成数据';
|
||||
} else if (this.cardMode === 'edit') {
|
||||
return '编辑数据';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
selected: function (val, oldVal) {
|
||||
this.deviceSelect(val);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
// deviceSelect(selected) {
|
||||
// this.$refs.form && this.$refs.form.resetFields();
|
||||
// this.$refs.make && this.$refs.make.resetFields();
|
||||
// if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'selectSection'.toUpperCase()) {
|
||||
// if (selected.type === '01' || selected.type === '02' || selected.type === '03') {
|
||||
// this.addModel.sectionCode = selected.code;
|
||||
// this.field = '';
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
initData() {
|
||||
this.tableData = this.$store.state.map.map.displayList || [];
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() == 'CheckBox'.toUpperCase()) {
|
||||
this.seclectDeviceList.forEach(item => {
|
||||
if (this.addModel.elementList.indexOf(item.code) < 0) {
|
||||
this.addModel.elementList.push(item.code);
|
||||
}
|
||||
});
|
||||
} else if (selected) {
|
||||
if (this.addModel.elementList.indexOf(selected.code) < 0) {
|
||||
this.addModel.elementList.push(selected.code);
|
||||
}
|
||||
}
|
||||
},
|
||||
getDeviceName(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return device.name || device.code;
|
||||
},
|
||||
deleteModel(list, index) {
|
||||
list.splice(index, 1);
|
||||
this.list.pop();
|
||||
this.clearData();
|
||||
this.cardMode = 'generate';
|
||||
},
|
||||
editModel(list, index) {
|
||||
this.addModel = list[index];
|
||||
this.index = index;
|
||||
this.cardMode = 'edit';
|
||||
},
|
||||
cancelOverlab() {
|
||||
this.cardMode = 'generate';
|
||||
this.clear();
|
||||
},
|
||||
updateOverlab() {
|
||||
if (this.index || this.index == 0) {
|
||||
if (!this.addModel.stationCodeList.length) {
|
||||
this.$messageBox('请选择车站!');
|
||||
} else {
|
||||
this.tableData.splice(this.index, 1, this.addModel);
|
||||
}
|
||||
this.clearData();
|
||||
}
|
||||
},
|
||||
// 删除当前选中
|
||||
delList(model, list) {
|
||||
list.forEach((nor, index) => {
|
||||
if (nor == model) {
|
||||
list.splice(index, 1);
|
||||
}
|
||||
});
|
||||
this.seclectDeviceList.forEach((item, index) => {
|
||||
if (item.code == model) {
|
||||
this.seclectDeviceList.splice(index, 1);
|
||||
}
|
||||
});
|
||||
},
|
||||
save() {
|
||||
const map = this.$store.state.map.map;
|
||||
const param = {
|
||||
displayList: this.tableData,
|
||||
mapId: this.$route.params.mapId
|
||||
};
|
||||
saveMap(Object.assign(map, param)).then(response => {
|
||||
this.$message.success('保存现地配置成功');
|
||||
}).catch(() => {
|
||||
this.$messageBox('保存现地配置失败');
|
||||
});
|
||||
},
|
||||
back() {
|
||||
this.$emit('goDraw');
|
||||
},
|
||||
generateOverlab() { // 生成
|
||||
if (!this.addModel.stationCodeList.length) {
|
||||
this.$messageBox('请选择车站!');
|
||||
} else {
|
||||
this.tableData.push(this.addModel);
|
||||
this.clearData();
|
||||
}
|
||||
},
|
||||
clear() {
|
||||
this.addModel = { stationCodeList: [], elementList: [] };
|
||||
},
|
||||
clearData() {
|
||||
this.addModel = { stationCodeList: [], elementList: [] };
|
||||
this.index = '';
|
||||
this.cardMode = 'generate';
|
||||
},
|
||||
generateData() {
|
||||
this.loading = true;
|
||||
this.tableData = [];
|
||||
this.stationList.forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.tableData.push({stationCodeList: [...item.chargeStationCodeList, item.code], elementList: [...item.chargeStationCodeList, item.code]});
|
||||
}
|
||||
});
|
||||
|
||||
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
||||
...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList,
|
||||
...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList].forEach(item => {
|
||||
const target = this.tableData.find(elem => elem.stationCodeList.includes(item.stationCode));
|
||||
target && target.elementList.push(item.code);
|
||||
});
|
||||
[...this.directionRodList].forEach(item => {
|
||||
const target = this.tableData.find(elem => elem.stationCodeList.includes(item.deviceStationCode));
|
||||
target && target.elementList.push(item.code);
|
||||
});
|
||||
this.psdList.forEach(item => {
|
||||
const stand = this.$store.getters['map/getDeviceByCode'](item.standCode);
|
||||
const target = this.tableData.find(elem => elem.stationCodeList.includes(stand.stationCode));
|
||||
target && target.elementList.push(item.code);
|
||||
});
|
||||
const map = this.$store.state.map.map;
|
||||
const param = {
|
||||
displayList: this.tableData,
|
||||
mapId: this.$route.params.mapId
|
||||
};
|
||||
saveMap(Object.assign(map, param)).then(response => {
|
||||
this.loading = false;
|
||||
this.$message.success('保存现地配置成功');
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox('保存现地配置失败');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.title-box{
|
||||
padding-left: 10px;
|
||||
border-left: 4px solid red;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.list-box{
|
||||
overflow: hidden;
|
||||
.list-content{
|
||||
float: left;
|
||||
background: #e2e2e2;
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding-left: 10px;
|
||||
padding-right: 3px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover{
|
||||
background: #ccc;
|
||||
}
|
||||
.name{
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.close{
|
||||
float: left;
|
||||
width: 23px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -62,9 +62,9 @@ export default {
|
||||
return idx;
|
||||
},
|
||||
|
||||
// 只是用来比较就不开根号了, 同一个区段的信号机距离应该不会溢出
|
||||
// 采用合理的距离计算方式
|
||||
distanceOf(a, b) {
|
||||
return (b.x - a.x) ** 2 + (b.y - a.y) ** 2;
|
||||
return Math.hypot(b.x - a.x, b.y - a.y);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -70,6 +70,7 @@
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
<el-button v-if="isPreview" type="primary" @click="preview">预览</el-button>
|
||||
<el-button v-if="!isPreview" type="primary" @click="recover">重置</el-button>
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@ -269,6 +270,9 @@ export default {
|
||||
};
|
||||
this.$jlmap && this.$jlmap.setRecover(param);
|
||||
},
|
||||
back() {
|
||||
this.$emit('goDraw');
|
||||
},
|
||||
clear() {
|
||||
this.$refs.hostileForm.resetFields();
|
||||
this.addModel.sectionCode = '';
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user