This commit is contained in:
sunzhenyu 2020-06-23 10:08:01 +08:00
commit 869ddc78b6
507 changed files with 2851 additions and 87558 deletions

View File

@ -46,7 +46,7 @@ export function logout(token) {
});
}
// 检查登录状态
// 检查登录状态 WAIT,SCAN,SUCCESS,CANCEL,EXPIRE,
export function checkLoginStatus(sessionId) {
return new Promise((resolve, reject) => {
request({

View File

@ -219,3 +219,11 @@ export function getWxQrCode(params) {
params: params
});
}
// 获取微信小程序绑定二维码
export function getBindWxQrCodeUrl() {
return request({
url: `/api/user/bind/wm/url`,
method: 'get'
});
}

View File

@ -3,22 +3,22 @@ import request from '@/utils/request';
/** 新建项目设备*/
export function createDevice(data) {
return request({
url: `/api/project/device`,
url: `/api/device`,
method: 'post',
data: data
});
}
/** 项目设备编码是否已存在 */
export function deviceIsExist(projectCode, code) {
export function deviceIsExist(code) {
return request({
url: `/api/project/device/exist/${projectCode}/${code}`,
url: `/api/device/exist/${code}`,
method: 'get'
});
}
/** 分页查询项目设备 */
/** 分页查询项目设备n */
export function getProjectDeviceList(params) {
return request({
url: `/api/project/device/paging`,
url: `/api/device/paging`,
method: 'get',
params:params
});
@ -26,21 +26,21 @@ export function getProjectDeviceList(params) {
/** 删除项目设备 */
export function deleteProjectDevice(id) {
return request({
url: `/api/project/device/${id}`,
url: `/api/device/${id}`,
method: 'delete'
});
}
/** 获取设备详情 */
export function getDeviceDetail(id) {
return request({
url: `/api/project/device/${id}`,
url: `/api/device/${id}`,
method: 'get'
});
}
/** 添加/修改屏蔽门设备网关映射配置 */
export function setPsdConfig(id, data) {
return request({
url: `/api/project/device/${id}/config/psd`,
url: `/api/device/${id}/config/psd`,
method: 'put',
data: data
});
@ -48,7 +48,7 @@ export function setPsdConfig(id, data) {
/** 添加/修改信号机设备网关映射配置 */
export function setSignalConfig(id, data) {
return request({
url: `/api/project/device/${id}/config/signal`,
url: `/api/device/${id}/config/signal`,
method: 'put',
data: data
});
@ -56,7 +56,7 @@ export function setSignalConfig(id, data) {
/** 添加/修改信号机设备网关映射配置 */
export function setSwitchConfig(id, data) {
return request({
url: `/api/project/device/${id}/config/switch`,
url: `/api/device/${id}/config/switch`,
method: 'put',
data: data
});
@ -64,8 +64,31 @@ export function setSwitchConfig(id, data) {
/** 查询项目下的所有设备 */
export function getAllDeviceInProject(params) {
return request({
url: `/api/project/device/project`,
url: `/api/device/project`,
method: 'get',
params
});
}
/** 添加/修改ibp设备配置 */
export function setIbpConfig(id, data) {
return request({
url: `/api/device/${id}/config/ibp`,
method: 'put',
data: data
});
}
/** 添加/修改现地工作站配置 */
export function setLwConfig(id, data) {
return request({
url: `/api/device/${id}/config/lw`,
method: 'put',
data: data
});
}
/** 查询所有的某类型设备 */
export function getDevicesByType(type) {
return request({
url: `/api/device/${type}/all`,
method: 'get'
});
}

View File

@ -55,7 +55,8 @@ let passerwebwork = new Worker("../../static/workertest/passsimulation/passer.js
let stationwebwork = new Worker("../../static/workertest/passsimulation/station.js");
let stationzon = new ZoneManager();
//老版本临时ai控制
let olddataai = false;
for(let i=0;i<5;i++){
checkdoor1[i]={
id:"c1"+i,
@ -947,6 +948,9 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
}else if(humanlist.children[i].stage == 3){
humanlist.children[i].stage = 4;
if(olddataai){
humanlist.children[i].stage = 5;
}
}else if(humanlist.children[i].stage == 2){
humanlist.children[i].stage = 3;
@ -1031,64 +1035,70 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
// console.log(humanlist.children.length);
}
function initstationlist(stationdata,standdata,psddata){
// console.log(standdata);
let list = [];
for(let i=0,leni = standdata.length;i<leni;i++){
for(let j=0,lenj = psddata.length;j<lenj;j++){
if(standdata[i].code == psddata[j].standCode){
standdata[i].name = psddata[j].code;
}
}
}
for(let i=0,leni = stationdata.length;i<leni;i++){
if(stationdata[i].depot == false){
list[stationdata[i].name] = [];
for(let j=0,lenj = standdata.length;j<lenj;j++){
if(standdata[j].stationCode == stationdata[i].code){
list[stationdata[i].name].push(standdata[j]);
if(psddata){
for(let i=0,leni = standdata.length;i<leni;i++){
for(let j=0,lenj = psddata.length;j<lenj;j++){
if(standdata[i].code == psddata[j].standCode){
standdata[i].name = psddata[j].code;
}
}
}
}
for(let k in list){
if(list[k].length>0){
let stationobject = {
code : list[k][0].stationCode,
name : k,
toppsd:null,
downpsd:null,
topsection:null,
downsection:null,
};
if(list[k][0].position.y<list[k][1].position.y){
stationobject.toppsd = list[k][0].name;
stationobject.downpsd = list[k][1].name;
stationobject.topsection = list[k][0].standTrackCode;
stationobject.downsection = list[k][1].standTrackCode;
}else{
stationobject.toppsd = list[k][1].name;
stationobject.downpsd = list[k][0].name;
stationobject.topsection = list[k][1].standTrackCode;
stationobject.downsection = list[k][0].standTrackCode;
for(let i=0,leni = stationdata.length;i<leni;i++){
if(stationdata[i].depot == false){
list[stationdata[i].name] = [];
for(let j=0,lenj = standdata.length;j<lenj;j++){
if(standdata[j].stationCode == stationdata[i].code){
list[stationdata[i].name].push(standdata[j]);
}
}
}
stationlist.push(stationobject);
}
for(let k in list){
if(list[k].length>0){
let stationobject = {
code : list[k][0].stationCode,
name : k,
toppsd:null,
downpsd:null,
topsection:null,
downsection:null,
};
if(list[k][0].position.y<list[k][1].position.y){
stationobject.toppsd = list[k][0].name;
stationobject.downpsd = list[k][1].name;
stationobject.topsection = list[k][0].standTrackCode;
stationobject.downsection = list[k][1].standTrackCode;
}else{
stationobject.toppsd = list[k][1].name;
stationobject.downpsd = list[k][0].name;
stationobject.topsection = list[k][1].standTrackCode;
stationobject.downsection = list[k][0].standTrackCode;
}
stationlist.push(stationobject);
}
}
scope.nowstation = stationlist[0];
scope.modelmanager.station.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
scope.modelmanager.station.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
if(scope.modelmanager.station.mesh.getObjectByName("menkuangyanse")){
scope.modelmanager.station.mesh.getObjectByName("menkuangyanse").material.map =scope.stationtexture["pingbimen"];
scope.modelmanager.station.mesh.getObjectByName("menkuangyanse").material.map.needsUpdate = true;
}
scope.modelmanager.station.mesh.getObjectByName("zhantaiming").material.map = scope.stationtexture[scope.nowstation.code];
scope.modelmanager.station.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
updatestationlist(stationlist);
}else{
olddataai = true;
}
scope.nowstation = stationlist[0];
scope.modelmanager.station.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
scope.modelmanager.station.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
if(scope.modelmanager.station.mesh.getObjectByName("menkuangyanse")){
scope.modelmanager.station.mesh.getObjectByName("menkuangyanse").material.map =scope.stationtexture["pingbimen"];
scope.modelmanager.station.mesh.getObjectByName("menkuangyanse").material.map.needsUpdate = true;
}
scope.modelmanager.station.mesh.getObjectByName("zhantaiming").material.map = scope.stationtexture[scope.nowstation.code];
scope.modelmanager.station.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
updatestationlist(stationlist);
// console.log(scope.nowstation);
}
function inittrain(object){

View File

@ -1,8 +1,8 @@
const mapDeviceStyle = {
'01': 'chengdu_04',
'02': 'fuzhou_01',
'03': 'bejing_01',
'04': 'chengdu_03'
// '01': 'chengdu_04',
'02': 'fuzhou_01'
// '03': 'bejing_01',
// '04': 'chengdu_03'
};
export function selectLineCode(code) {

View File

@ -1,585 +0,0 @@
import defaultStyle from '../defaultStyle';
import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this[deviceType.Link] = {
lineWidthColor: '#FFFFFF', // line 颜色
linkWidth: 4.4, // link 宽度
linkColor: '#3F3F3F', // link 线条颜色
linkTextColor: '#FFFFFF' // link 字体颜色
};
this[deviceType.Section] = {
active: {
routeColor: false // 进路触发颜色
},
text: { // 物理区段名称
show: true, // 物理区段名称显示
position: -1, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 11, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
logicText: { // 逻辑区段名称
show: false, // 逻辑区段名称显示
position: -1, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 11, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
standText: { // 站台轨名称
show: true, // 站台轨名称显示
opposite: true, // 对称相反
position: 1, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 11, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
reentryText: { // 折返轨名称
show: true, // 折返轨名称显示
opposite: true, // 对称相反
position: 1, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 11, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
transferText: { // 转换轨名称
show: true, // 转换轨名称显示
opposite: true, // 对称相反
position: 1, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 11, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
destinationText: { // 目的码名称
show: true, // 目的码名称显示
position: 1, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 11, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'bold', // 字体粗细
fontColor: 'yellow', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
mouseOverStyle: {
borderColor: '#fff',
borderBackgroundColor: '#22DFDF',
textShadowColor: '#22DFDF'
},
line: {
width: 5, // 区段宽度
beyondWidth: 0, // 区段宽超出宽度
invadeColor: '#EF0C08', // 区段侵入颜色
spareColor: '#606060', // 区段空闲颜色
communicationOccupiedColor: '#FF0000', // 区段通信车占用颜色
unCommunicationOccupiedColor: '#800080', // 区段非通讯车占用颜色
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
faultLockColor: '#006400', // 区段故障锁定颜色
undefinedColor: '#0071C1', // 区段未定义颜色
protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用)
blockColor: '#800080', // 区段封锁颜色
atcExcisionColor: '#A0522D', // 区段atc切除颜色
atsExcisionColor: '#A0522D', // 区段ats切除颜色
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
protectiveLockColor: '#FFFF00', // 区段保护锁闭
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
logicalTextColor: '#C0C0C0' // 逻辑区段名称颜色 (未用)
},
axle: {
radius: 3, // 计轴 半径
distance: 5, // 计轴和区段之间的距离 (未用)
color: '#C0C0C0', // 区段计轴颜色
resetColor: '#00FFFF', // 区段计轴预复位颜色
Failure: '#E6A23C' // #FFFF00 计轴失效
},
speedLimit: { // 限速元素
width: 1, // 限速线的宽度
distance: 5, // 限速线距离区段距离
lineColor: '#FFFF00', // 限速线颜色
nameShow: false // 名称显示
},
separator: {
z: 1, // 分割符层级
width: 1.5, // 分隔符宽度
endWidth: 1.5, // 尽头分隔符宽度
endColor: '#7F7F7F', // 尽头分隔符颜色
color: '#7F7F7F' // 区段边界符颜色
}
};
this[deviceType.Signal] = {
distance: 0, // 设备距离区段的距离
post: {
standardColor: '#5578B6', // 灯灯柱颜色
standardWidth: 1.5 // 灯柱宽度
},
text: {
show: true, // 信号机名称显示
distance: 3, // 文字和灯杆的距离
isNoRotation: true, // 是否禁止旋转
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#C0C0C0', // 信号灯字体默认色
blockColor: '#EF0C08', // 信号灯字体锁定颜色
checkColor: '#00FF00' // 信号字体
},
lamp: {
guidName: 'defult', // 默认引导类型
stopWidth: 2, // 禁止线宽度
borderVariable: true, // 信号灯边框可变
borderWidth: 0.5, // 信号灯边框线宽度
borderColor: '#3149C3', // 信号灯边框线颜色
radiusR: 5, // 信号机宽度
blockColor: '#EF0C08', // 信号灯锁闭
grayColor: '#7F7F7F', // 信号灯灰色
redColor: '#FF0000', // 信号灯红色
greenColor: '#00FF00', // 信号灯绿色
yellowColor: '#FFFF00', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0' // 信号灯蓝色
},
route: {
direction: false, // 自动进路方向
offset: { x: 1, y: -2 }, // 自动进路偏移量
routeColor: '#00FF00' // 自动进路
},
auto: {
direction: true, // 自动通过方向
offset: { x: 4, y: 0}, // 自动通过偏移量
width: 5, // 自动宽度
autoRoute: '#00FF00', // 自动进路
autoTrigger: '#FFFF00', // 自动触发
manualControl: '#FFFF00', // 人工控制
outConflict: '#C00808' // 出车冲突
},
delay: {
direction: false, // 延时解锁方向
offset: { x: 0, y: -5}, // 延时解锁偏移量
fontSize: 9, // 延迟解锁字体大小
fontColor: '#FF0000', // 延迟解锁颜色
fontWeight: 'bold' // 字体粗细
},
button: {
distance: 5, // 信号灯按钮距离区段的距离
borderDashColor: '#FFFFFF', // 信号灯按钮边线
buttonColor: 'darkgreen', // 信号灯按钮颜色
buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色
},
mouseOverStyle: {
borderLineColor: '#FFFFFF',
borderLineDash: [3, 3],
nameBackgroundColor: '#22DFDF',
lampBorderLineColor: '#22DFDF'
}
};
this[deviceType.StationStand] = {
common: { // 通用属性
textFontSize: 8 // 站台默认字体大小
},
safetyDoor: { // 屏蔽门
height: 1.6, // 站台屏蔽门高度
distance: 9, // 站台和屏蔽门之间的距离
defaultColor: '#00FF00', // 屏蔽门默认颜色
splitDoorColor: '#F61107' // 屏蔽门切除颜色
},
stand: { // 站台
headFontSize: 8, // 站台首端字体大小
spareColor: '#606060', // 站台空闲颜色
stopColor: '#FEFE00', // 站台列车停站颜色
jumpStopColor: '#9A99FF', // 站台跳停颜色
designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
offset: {x: 0, y: 0}, // 站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色
},
reentry: { // 站台折返策略
position: 0, // 折返方向
offset: {x: -16, y: 18}, // 折返偏移量
noHumanColor: '#0F16DA', // 站台无人折返
autoChangeEndsColor: '#0BF400' // 站台自动换端
},
detainCar: { // 扣车
text: 'H', // 扣车显示内容
position: 1, // 扣车方向
offset: {x: -8, y: 13}, // 扣车偏移量
trainColor: '#E4EF50', // 车站扣车颜色
centerTrainColor: '#FFFFFF', // 中心扣车颜色
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
},
stopTime: { // 停站时间
position: 1, // 运行时间方向
offset: {x: -8, y: 3}, // 运行时间偏移量
textColor: '#FFFFFF' // 停站时间字体颜色
},
level: { // 运行等级
position: 1, // 运行等级方向
offset: {x: -8, y: 22}, // 运行等级偏移量
textColor: '#FFFFFF' // 停站等级字体颜色
},
mouseOverStyle: {
borderLineColor: '#FFFFFF',
borderLineDash: [3, 3]
}
};
this[deviceType.StationControl] = {
text: {
distance: 2, // 灯和文字之间的距离
fontSize: 10, // 控制模式字体大小
fontFormat: 'consolas', // 控制模式字体格式
fontColor: '#ffffff', // 控制模式字体颜色
fontWeight: 'normal', // 控制模式字体粗细
textAlign: 'middle', // 控制模式水平对齐
textVerticalAlign: 'top' // 控制模式垂直对齐
},
lamp: {
count: 3, // 控制模式灯个数
offset: { x: 20, y: 0 }, // 偏移量
radiusR: 6, // 控制模式灯的半径
distance: 36, // 控制模式之间灯之间的距离
grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false // 联锁控显示
},
arrow: {
show: false // 控制模式箭头显隐
},
mouseOverStyle: { // 鼠标悬浮样式
fontSize: 10,
fontFormat: 'consolas',
fontColor: '#FFF000',
fontWeight: 'normal',
textAlign: 'middle',
textVerticalAlign: 'top'
}
};
this[deviceType.StationCounter] = {
text: {
distance: 2, // 计数器名称和文字的距离
fontColor: '#FFFFFF', // 计数器字体颜色
borderColor: '#E4EF50' // 计数器边框颜色
}
};
this[deviceType.StationDelayUnlock] = {
text: {
distance: 3, // 延迟解锁和设备之间的距离
fontColor: '#FFFFFF', // 延时解锁字体颜色
borderColor: '#FFFFFF' // 延迟解锁边框颜色
}
};
this[deviceType.Station] = {
// text: {
// show: true // 公里标名称显示
// },
kmPostShow: true, // 公里标显示
kilometerPosition: 'down', // 公里标位置
fontWeight: 'bold' // 文字错细
};
this[deviceType.Switch] = {
text: {
show: true, // 道岔名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
offset: {x: -15, y: -10}, // 道岔名称与区段距离
fontSize: 10, // 字体大小
fontColor: '#C0C0C0', // 道岔名称颜色
fontWeight: 'normal', // 字体粗细
borderColor: '#FE0000', // 道岔边框颜色
lossColor: '#FFFFFF', // 道岔失去颜色
locateColor: '#00FF00', // 道岔定位颜色
inversionColor: '#9C9D09', // 道岔反位颜色
monolockColor: '#870E10' // 道岔单锁颜色
},
core: {
length: 6 // 道岔单边长度
},
monolock: { // 道岔单锁配置
locationColor: '#870E10', // 道岔单锁定位颜色 (红色)
inversionColor: '#870E10', // 道岔单锁反位颜色 (红色)
rectShow: false // 道岔单锁 矩形框是否显示
},
block: { // 道岔封锁配置
nameBorderShow: true, // 道岔名称是否有包围框 显示
contentRectShow: false // 道岔封锁显示
},
mouseOverStyle: {
borderBackgroundColor: '#22DFDF', // 边框背景色
borderColor: '#fff', // 边框颜色
textShadowColor: '#22DFDF' // 字体阴影颜色
}
};
this[deviceType.LcControl] = {
text: {
fontSize: 10, // 灯字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 灯大小
controlColor: '#FFFF00' // 灯颜色
},
mouseOverStyle: {
fontSize: 10,
fontFormat: 'consolas',
fontColor: '#FFF000',
fontWeight: 'normal',
textAlign: 'middle',
textVerticalAlign: 'top',
arcColor: '#00FFFF',
textColor: '#000000'
}
};
this[deviceType.ZcControl] = {
text: {
fontSize: 10, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 灯大小
controlColor: '#00FF00' // 灯颜色
},
mouseOverStyle: {
fontSize: 10,
fontFormat: 'consolas',
fontColor: '#FFF000',
fontWeight: 'normal',
textAlign: 'middle',
textVerticalAlign: 'top',
arcColor: '#00FFFF',
textColor: '#000000'
}
};
this[deviceType.LimitControl] = {
text: {
fontSize: 10, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 灯大小
controlColor: '#ECE9D8' // 灯颜色
},
mouseOverStyle: {
fontSize: 10,
fontFormat: 'consolas',
fontColor: '#FFF000',
fontWeight: 'normal',
textAlign: 'middle',
textVerticalAlign: 'top',
textColor: '#000000',
arcColor: '#00FFFF'
}
};
this[deviceType.Line] = {
lineColor: '#FFFFFF' // 线条颜色
};
this[deviceType.TrainWindow] = {
lineColor: '#FFF', // 车次窗颜色
lineDash: [3, 3], // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0.01 // 车次窗矩形圆滑程度
};
this[deviceType.Train] = {
trainBody: {
trainBodyLineWidth: 0.1, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [
{
type: '03',
serviceNumber: 'M0',
nameFormat: 'serviceNumber:groupNumber'
},
{
type: '02',
nameFormat: 'targetCode:groupNumber'
}
], // 特殊列车类型需设置显示格式
lrPadding: 4, // 两边间隔
upPadding: 4, // 上边距离
trainBodyFillColor: '#725A64', // 列车车身填充颜色
trainNameFormat: 'serviceNumber:tripNumber'// 列车显示格式
},
hsda: {
lrPaddingHSDA: 3, // HSDA两边间隔
upPaddingHSDA: 4, // HSDA上边距离
trainHSDATextFontSize: 9, // 列车HDSA字号
textHContent: 'H', // textH文本
textSContent: 'S', // textS文本
textDContent: 'D', // textD文本
textAContent: 'A'// textA文本
},
trainNumber: {
trainNumberOffset: { x: 0, y: 1}// 目的地码偏移量
},
trainServer: {
serviceNumberPrefix: '00', // 服务号(表号)前缀
defaultServiceNumber: 'AA', // 默认服务号(表号)
trainServerOffset: { x: 4, y: 4}// 列车服务号偏移
},
trainTarget: {
tripNumberPrefix: '000', // 车次号前缀
defaultTripNumber: 'DDD', // 默认车次号2
trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移
trainTargetTextAlign: 'left'// 车次号文字显示位置
},
trainTargetNumber: {
trainTargetNumberOffset: {x: 0, y: 0}// 车组号偏移量
},
trainHead: {
trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
trainHeadTriangleFirst: { x: 7, y: 1}, // 列车车头三角坐标1偏移量
trainHeadTriangleSecond: { x: 13, y: 10}, // 列车车头三角坐标2偏移量
trainHeadTriangleThird: { x: 7, y: 19}, // 列车车头三角坐标3偏移量
trainHeadRectHeight: 20, // 列车车头矩形高度
trainConntWidth: 3, // 列车竖杠的宽度
trainHeadFillColor: '#000000'// 列车车头矩形填充颜色
},
common: {
trainHeight: 20, // 列车高度
trainHeadDistance: 4, // 列车和车头之间的间距
trainWidth: 40, // 列车长度
trainTextFontSize: 12, // 列车字号
fontFamily: 'consolas', // 默认字体 族类
haveTextHSDA: true, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true // 使用配置项的字体大小
},
trainStatusStyle: {
destinationStatus: [
{status: '01', showColor: '#FFFFFF'},
{status: '02', showColor: '#00FF00'},
{status: '03', showColor: '#A0522D'},
{status: '04', showColor: '#FFFF00'}
], // 目的地状态 01准点 02早点 03晚点 04头码车
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
destinationStatusSetText: 'trainTarget', // 目的地状态设置的对应哪个text的颜色
directionType: [
{
type: '01',
lineLShow: true,
lineRShow: true,
arrowLShow: false,
arrowRShow: false
},
{
type: '02',
lineLShow: false,
lineRShow: true,
arrowLShow: false,
arrowRShow: true
},
{
type: '03',
lineLShow: true,
lineRShow: false,
arrowLShow: true,
arrowRShow: false
}
], // 列车运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
directionStopType: [
{type: '01', lineLShow: false, lineRShow: false},
{type: '02', lineLShow: false, lineRShow: true},
{type: '03', lineLShow: true, lineRShow: false}
], // 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
runModeStatus: [
{
status: '01',
trainLColor: '#FFFFFF',
trainRColor: '#FFFFFF'
},
{
status: '02',
trainLColor: '#00FF00',
trainRColor: '#00FF00'
},
{
status: '03',
trainLColor: '#FFFF00',
trainRColor: '#FFFF00'},
{
status: '04',
trainLColor: '#A0522D',
trainRColor: '#A0522D'
},
{
status: '05',
trainLColor: '#A0522D',
trainRColor: '#A0522D'
}
], // 列车运行模式对应车头颜色 01未知 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM
runControlStatus: [
{status: '01', hShow: false, sShow: false},
{status: '02', hShow: true, sShow: false},
{status: '03', hShow: false, sShow: true}
], // 设置运行控制状态类型 01正常 02扣车 03停跳
doorStatus: [
{status: '01', dShow: false},
{status: '02', dShow: true}
], // 设置车门状态类型 01关门 02开门
communicationStatus: [
{status: '01', trainColor: '#725A64'},
{status: '02', trainColor: '#C0C0C0'}
], // 设置通信状态 01正常 02故障
alarmStatus: [
{status: '01', aShow: false},
{status: '02', aShow: true}
], // 设置报警状态 01不报警 02报警
serverNoType: [
{type: '01', showColor: '#FFFFFF'},
{type: '02', showColor: '#FFF000'}
], // 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车
defaultServerNoColor: '#FFFFFF' // 默认服务号状态显示颜色
}
};
}
}
export default new SkinCode();

View File

@ -1,591 +0,0 @@
import defaultStyle from '../defaultStyle';
import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this[deviceType.Link] = {
lineWidthColor: '#FFFFFF', // line 颜色
linkWidth: 4.4, // link 宽度
linkColor: '#3F3F3F', // link 线条颜色
linkTextColor: '#FFFFFF' // link 字体颜色
};
this[deviceType.Section] = {
active: {
routeColor: true // 进路触发颜色
},
text: {
show: true, // 物理区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 10, // 文字离区段距离
fontSize: 12, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
logicText: {
show: false, // 逻辑区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 12, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
standText: {
show: true, // 站台轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 24, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
reentryText: {
show: true, // 折返轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 36, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
transferText: {
show: true, // 转换轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 36, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
destinationText: {
show: true, // 目的码名称显示
opposite: true, // 对称相反
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 12, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'bold', // 字体粗细
fontColor: 'yellow', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
line: {
width: 5, // 区段宽度
beyondWidth: 0, // 区段宽超出宽度
invadeColor: '#FFFFFF', // 区段侵入颜色
spareColor: '#618cc3', // 区段空闲颜色
communicationOccupiedColor: '#FF00FF', // 区段通信车占用颜色
unCommunicationOccupiedColor: '#DE310C', // 区段非通讯车占用颜色
routeLockColor: '#3FFD46', // 区段路由锁定颜色
faultLockColor: '#006400', // 区段故障锁定颜色
undefinedColor: '#0071C1', // 区段未定义颜色
protectionLockedColor: '#3FFD46', // 保护区段锁闭
blockColor: '#00FF00', // 区段封锁颜色
atcExcisionColor: '#A0522D', // 区段atc切除颜色
atsExcisionColor: '#A0522D', // 区段ats切除颜色
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
protectiveLockColor: '#FFFF00', // 区段保护锁闭
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
logicalTextColor: '#C0C0C0' // 逻辑区段名称颜色 (未用)
},
axle: {
radius: 3, // 计轴 半径
distance: 5, // 计轴和区段之间的距离 (未用)
color: '#C0C0C0', // 区段计轴颜色
resetColor: '#00FFFF', // 区段计轴预复位颜色
Failure: '#E6A23C' // #FFFF00 计轴失效
},
speedLimit: { // 限速元素
width: 1, // 限速线的宽度
distance: 5, // 限速线距离区段距离
lineColor: '#C0C000', // 限速线颜色 (黄色透明光)
nameBackground: '#C0C000', // 限速名称背景颜色
nameShow: true, // 名称显示
nameNumberColor: '#C00808', // 限速值颜色
nameNumberFontSize: 11, // 限速值大小
kilometerColor: '#fff', // 公里标颜色
kilometerFontSize: 8, // 公里标大小
drogueWidth: 19, // 浮标宽度
drogueHeight: 12 // 浮标高度
},
separator: {
z: 6, // 分割符层级
width: 1.5, // 分隔符宽度
endWidth: 1.5, // 尽头分隔符宽度
endColor: '#FFFFFF', // 尽头分隔符颜色
color: '#FFFFFF' // 区段边界符颜色
},
shuttleBack: { // 折返进路 (存在此对象 显示折返箭头)
distance: 5 // 限速线距离区段距离
}
};
this[deviceType.Signal] = {
distance: 10, // 设备距离区段的距离
post: {
standardColor: '#FFFFFF', // 灯柱颜色
standardWidth: 2 // 灯柱宽度
},
text: {
show: true, // 信号机名称显示
distance: 3, // 文字和灯杆的距离
isNoRotation: true, // 是否禁止旋转
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#FFFFFF', // 信号灯字体默认色
blockColor: '#EF0C08', // 信号灯字体锁定颜色
checkColor: '#00FF00' // 信号保护区段检查颜色
},
lamp: {
guidName: 'chengdu_03', // 成都三号线引导类型
borderVariable: true, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度
borderWidth: 2, // 信号灯边框线宽度
borderColor: '#3149C3', // 信号灯边框线颜色
radiusR: 6, // 信号灯半径
blockColor: '#EF0C08', // 信号灯锁闭
grayColor: '#7F7F7F', // 信号灯灰色
redColor: '#FF0000', // 信号灯红色
greenColor: '#00FF00', // 信号灯绿色
yellowColor: '#FFFF00', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0' // 信号灯蓝色
},
route: {
direction: true, // 自动通过方向
offset: { x: 4, y: 0}, // 自动通过偏移量
routeColor: '#00FF00' // 自动进路
},
auto: {
direction: false, // 自动通过方向
offset: { x: -4, y: 0}, // 自动通过偏移量
width: 5, // 自动宽度
manualControl: '#FFFF00', // 人工控制
autoRoute: '#00FF00', // 自动进路
autoTrigger: '#FFFF00', // 自动触发
outConflict: '#C00808' // 出车冲突
},
delay: {
direction: false, // 延时解锁方向
offset: { x: -5, y: 0}, // 延时解锁偏移量
fontSize: 11, // 延迟解锁字体大小
fontColor: '#C00808', // 延迟解锁颜色
fontWeight: 'bold' // 字体粗细
},
button: {
distance: 5, // 信号灯按钮距离区段的距离
borderDashColor: '#FFFFFF', // 信号灯按钮边线
buttonColor: 'darkgreen', // 信号灯按钮颜色
buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色
}
};
this[deviceType.StationStand] = {
common: { // 通用属性
textFontSize: 10, // 站台默认字体大小
haveJumpShow: true // 站台是否有列车停跳显示
},
safetyDoor: { // 屏蔽门
height: 3, // 站台屏蔽门高度
distance: 8, // 站台和屏蔽门之间的距离
defaultColor: '#00FF00', // 屏蔽门默认颜色
splitDoorColor: '#C00808' // 屏蔽门切除颜色
},
stand: { // 站台
headFontSize: 10, // 站台首端字体大小
spareColor: '#ffffff', // 站台空闲颜色
stopColor: '#FFF000', // 站台列车停站颜色
jumpStopColor: '#808080', // 站台跳停颜色
designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
offset: {x: 0, y: 40}, // 站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色
},
reentry: { // 站台折返策略
position: 0, // 折返方向
offset: {x: -16, y: 20}, // 折返偏移量
noHumanColor: '#0F16DA', // 站台无人折返
autoChangeEndsColor: '#0BF400' // 站台自动换端
},
detainCar: { // 扣车
text: '扣', // 扣车显示内容
position: -1, // 扣车方向
offset: {x: -8, y: -20}, // 扣车偏移量
trainColor: '#FFFF00', // 车站扣车颜色
centerTrainColor: '#C0C0C0', // 中心扣车颜色
andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
},
stopTime: { // 停站时间
position: 1, // 运行时间方向
offset: {x: -8, y: -4}, // 运行时间偏移量
textColor: '#C0C0C0' // 停站时间字体颜色
},
jump: {
text: '跳', // 停跳显示内容
position: -1, // 停跳方向
offset: {x: -8, y: 0},
textColor: '#0000FF', // 停跳文字颜色
arcColor: '#0000FF', // 停跳圆圈颜色
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
r: 8 // 圆半径大小
},
level: { // 运行等级
position: 1, // 运行等级方向
offset: {x: -8, y: 30}, // 运行等级偏移量
textColor: '#FFF000' // 停站等级字体颜色
}
};
this[deviceType.StationControl] = {
text: {
distance: 2, // 灯和文字之间的距离
fontSize: 11, // 字体大小
fontFormat: 'consolas', // 字体格式
fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐
},
lamp: {
count: 4, // 控制模式的个数
offset: {x: 0, y: 0}, // 偏移量
radiusR: 6, // 控制模式灯的半径
distance: 36, // 控制模式之间灯之间的距离
grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: true // 联锁控显示
},
arrow: {
show: false // 控制模式箭头显隐
}
};
this[deviceType.StationCounter] = {
text: {
distance: 2, // 计数器名称和文字的距离
fontColor: '#FFFFFF', // 计数器字体颜色
borderColor: '#E4EF50' // 计数器边框颜色
}
};
this[deviceType.StationDelayUnlock] = {
text: {
distance: 3, // 延迟解锁和设备之间的距离
fontColor: '#FFFFFF', // 延时解锁字体颜色
borderColor: '#FFFFFF' // 延迟解锁边框颜色
}
};
this[deviceType.Station] = {
// text: {
// show: true // 公里标名称显示
// },
kmPostShow: false, // 公里标显示
kilometerPosition: 'up' // 公里标朝向
};
this[deviceType.Switch] = {
text: {
show: true, // 道岔名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
offset: {x: 5, y: -10}, // 道岔名称与区段距离
fontSize: 11, // 字体大小
fontColor: '#fff', // 道岔名称颜色
fontWeight: 'normal', // 字体粗细
borderColor: '#FE0000', // 道岔边框颜色
lossColor: '#C00808', // 道岔失去颜色
locateColor: '#00FF00', // 道岔定位颜色
inversionColor: '#FFFF00', // 道岔反位颜色
monolockColor: '#FFFFFF' // 道岔单锁颜色
},
core: {
length: 6 // 道岔单边长度
},
monolock: { // 道岔单锁配置
locationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
inversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
rectShow: true, // 道岔单锁 矩形框是否显示
rectWidth: 18, // 矩形框 宽高
rectBorderColor: '#fff' // 矩形边框颜色
},
block: { // 道岔封锁配置
nameBorderShow: false, // 道岔名称是否有包围框 显示
contentRectShow: true, // 道岔封锁显示
contentRectColor: 'red' // 道岔封锁边框颜色
}
};
this[deviceType.LcControl] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#FFFF00' // 控制灯颜色
}
};
this[deviceType.ZcControl] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#00FF00' // 控制灯颜色
}
};
this[deviceType.LimitControl] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#ECE9D8' // 控制灯颜色
}
};
this[deviceType.ButtonControl] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#FFFF00' // 控制灯颜色
}
};
this[deviceType.Line] = {
lineColor: '#FFFFFF' // 线条颜色
};
this[deviceType.TrainWindow] = {
lineColor: '#4DD43F', // 车次窗颜色
lineDash: null, // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度
};
this[deviceType.Train] = {
trainBody: {
trainBodyLineWidth: 1, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [
{
type: '03',
serviceNumber: '---',
nameFormat: 'groupNumber:serviceNumber'
},
{
type: '03',
nameFormat: 'serviceNumber:trainNumber'
}
], // 特殊列车类型需设置显示格式
lrPadding: 4, // 两边间隔
upPadding: 4, // 上边距离
trainBodyFillColor: '#000099', // 列车车身填充颜色
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
},
hsda: {
lrPaddingHSDA: 3, // HSDA两边间隔
upPaddingHSDA: 4, // HSDA上边距离
trainHSDATextFontSize: 9, // 列车HDSA字号
textHContent: '扣', // textH文本
textSContent: '跳', // textS文本
textDContent: '门', // textD文本
textAContent: '警' // textA文本
},
trainNumber: {
targetCodePrefix: '000', // 目的地码前缀
defaultTargetCode: 'DDD', // 默认目的地码
trainTargetTextAlign: 'left', // 目的地码文字显示位置
trainNumberOffset: { x: 24, y: 4}// 目的地码偏移量
},
trainServer: {
serviceNumberPrefix: '000', // 服务号(表号)前缀
defaultServiceNumber: 'TTT', // 默认服务号(表号)
defaultServerNoColor: '#FFFFFF', // 默认服务号状态显示颜色
trainServerOffset: { x: 4, y: 4} // 列车服务号偏移
},
trainTarget: {
tripNumberPrefix: '000', // 车次号前缀
defaultTripNumber: 'DDD', // 默认车次号2
trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移
trainTargetTextAlign: 'right' // 车次号文字显示位置
},
trainTargetNumber: {
trainTargetNumberOffset: {x: 0, y: 0}// 车组号偏移量
},
trainHead: {
trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
trainHeadTriangleFirst: { x: 7, y: 1}, // 列车车头三角坐标1偏移量
trainHeadTriangleSecond: { x: 13, y: 10}, // 列车车头三角坐标2偏移量
trainHeadTriangleThird: { x: 7, y: 19}, // 列车车头三角坐标3偏移量
trainConntWidth: 3, // 列车竖杠的宽度
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
trainHeadRectHeight: 20 // 列车车头矩形高度
},
common: {
trainHeight: 20, // 列车高度
trainHeadDistance: 4, // 列车和车头之间的间距
trainWidth: 48, // 列车长度
trainTextFontSize: 12, // 列车字号
fontFamily: 'consolas', // 默认字体 族类
haveTextHSDA: true, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true // 使用配置项的字体大小
},
trainStatusStyle: {
trainTypeStatus: [
{type: '03', serviceNumberColor: '#FFF000', groupNumberColor: '#FFF000'},
{type: '02', trainNumberColor: '#FFF000', groupNumberColor: '#FFF000'}
], // 列车类型对应的识别号样式
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
destinationStatusSetText: 'trainWindowBorder', // 目的地状态设置的对应哪个颜色
destinationStatus: [
{status: '01', showColor: '#FFFFFF'},
{status: '02', showColor: '#00FF00'},
{status: '03', showColor: '#A0522D'}
], // 目的地状态 01准点 02早点 03晚点 04头码车
serverNoType: [
{type: '01', showColor: '#FFFFFF'},
{type: '02', showColor: '#FFF000'}
], // 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车
directionType: [
{
type: '01',
lineLShow: true,
lineRShow: true,
arrowLShow: false,
arrowRShow: false
},
{
type: '02',
lineLShow: false,
lineRShow: true,
arrowLShow: false,
arrowRShow: true
},
{
type: '03',
lineLShow: true,
lineRShow: false,
arrowLShow: true,
arrowRShow: false
}
], // 列车运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
directionStopType: [
{
type: '01',
lineLShow: false,
lineRShow: false
},
{
type: '02',
lineLShow: false,
lineRShow: true
},
{
type: '03',
lineLShow: true,
lineRShow: false
}
], // 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
runModeStatus: [
{
status: '01',
trainLColor: '#00FF00',
trainRColor: '#00FF00'
},
{
status: '02',
trainLColor: '#FF8000',
trainRColor: '#FF8000'
},
{
status: '03',
trainLColor: '#FFFF00',
trainRColor: '#FFFF00'
},
{
status: '04',
trainLColor: '#C2C2C2',
trainRColor: '#C2C2C2'
},
{
status: '05',
trainLColor: '#C2C2C2',
trainRColor: '#C2C2C2'
}
], // 列车运行模式对应车头颜色 01未知 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM
runControlStatus: [
{
status: '01',
hShow: false,
sShow: false
},
{
status: '02',
hShow: true,
sShow: false
},
{
status: '03',
hShow: false,
sShow: true
}
], // 设置运行控制状态类型 01正常 02扣车 03停跳
doorStatus: [
{status: '01', dShow: false},
{status: '02', dShow: true}
], // 设置车门状态类型 01关门 02开门
communicationStatus: [
{status: '01', trainColor: '#725A64'},
{status: '02', trainColor: '#C0C0C0'}
], // 设置通信状态 01正常 02故障
alarmStatus: [
{status: '01', aShow: false},
{status: '02', aShow: true}
] // 设置报警状态 01不报警 02报警
}
};
}
}
export default new SkinCode();

View File

@ -1,564 +0,0 @@
import defaultStyle from '../defaultStyle';
import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this[deviceType.Link] = {
lineWidthColor: '#FFFFFF', // line 颜色
linkWidth: 4, // link 宽度
linkColor: '#4e8de6', // link 线条颜色
linkTextColor: '#FFFFFF' // link 字体颜色
};
this[deviceType.Section] = {
active: {
routeColor: false // 进路触发颜色
},
text: {
show: true, // 物理区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 10, // 文字离区段距离
fontSize: 12, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: 'lightgreen', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
logicText: { // 逻辑区段名称
show: false, // 逻辑区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 12, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
standText: { // 站台
show: true, // 站台轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 24, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
reentryText: { // 折返
show: true, // 折返轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 36, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
transferText: { // 转换轨
show: true, // 转换轨名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 36, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
destinationText: { // 目的地
show: true, // 目的码名称显示
opposite: true, // 对称相反
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 12, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'bold', // 字体粗细
fontColor: 'yellow', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
},
line: {
width: 5, // 区段宽度
beyondWidth: 0, // 区段宽超出宽度
invadeColor: '#FFFFFF', // 区段侵入颜色
spareColor: '#5578B6', // 区段空闲颜色
communicationOccupiedColor: 'lightpink', // 区段通信车占用颜色
unCommunicationOccupiedColor: 'red', // 区段非通讯车占用颜色
routeLockColor: 'rgba(0, 255, 0, 1)', // 区段路由锁定颜色
faultLockColor: 'white', // 区段故障锁定颜色
undefinedColor: '#0071C1', // 区段未定义颜色
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
blockColor: 'pink', // 区段封锁颜色
atcExcisionColor: '#A0522D', // 区段atc切除颜色
atsExcisionColor: '#A0522D', // 区段ats切除颜色
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
protectiveLockColor: '#92D14F', // 区段保护锁闭
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
logicalTextColor: 'white' // 逻辑区段名称颜色 (未用)
},
axle: {
radius: 3, // 计轴 半径
distance: 5, // 计轴和区段之间的距离 (未用)
color: 'white', // 区段计轴颜色
resetColor: '#00FFFF', // 区段计轴预复位颜色
Failure: '#E6A23C' // #FFFF00 计轴失效
},
speedLimit: { // 限速元素
width: 1, // 限速线的宽度
distance: 5, // 限速线距离区段距离
lineColor: '#C0C000', // 限速线颜色 (黄色透明光)
nameBackground: '#C0C000', // 限速名称背景颜色
nameShow: true, // 名称显示
nameNumberColor: '#C00808', // 限速值颜色
nameNumberFontSize: 11, // 限速值大小
kilometerColor: '#fff', // 公里标颜色
kilometerFontSize: 8, // 公里标大小
drogueWidth: 19, // 浮标宽度
drogueHeight: 12 // 浮标高度
},
separator: {
z: 6, // 分割符层级
width: 1.5, // 分隔符宽度
endWidth: 1.5, // 尽头分隔符宽度
endColor: '#FFFFFF', // 尽头分隔符颜色
color: 'white' // 区段边界符颜色
}
};
this[deviceType.Signal] = {
distance: 3, // 设备距离区段的距离
post: {
standardColor: '#C0C0C0', // 灯柱颜色
standardWidth: 2 // 灯柱宽度
},
text: {
show: true, // 信号机名称显示
distance: 3, // 文字和灯杆的距离
isNoRotation: true, // 是否禁止旋转
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: 'white', // 信号灯字体默认色
blockColor: '#EF0C08', // 信号灯字体锁定颜色
checkColor: '#00FF00' // 信号保护区段检查颜色
},
lamp: {
guidName: 'defult', // 默认引导类型
borderVariable: true, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度
borderWidth: 2, // 信号灯边框线宽度
borderColor: '#3149C3', // 信号灯边框线颜色
radiusR: 3, // 信号灯半径
blockColor: '#EF0C08', // 信号灯锁闭
grayColor: '#C0C0C0', // 信号灯灰色
redColor: 'red', // 信号灯红色
greenColor: 'green', // 信号灯绿色
yellowColor: 'yellow', // 信号灯黄色
whiteColor: '#FFFFFF', // 信号灯白色
blueColor: '#0070C0' // 信号灯蓝色
},
route: {
direction: true, // 自动通过方向
offset: { x: 4, y: 0}, // 自动通过偏移量
routeColor: '#00FF00' // 自动进路
},
auto: {
direction: false, // 自动通过方向
offset: { x: -4, y: 0}, // 自动通过偏移量
width: 5, // 自动宽度
manualControl: '#FFFF00', // 人工控制
autoRoute: '#00FF00', // 自动进路
autoTrigger: '#FFFF00', // 自动触发
outConflict: '#C00808' // 出车冲突
},
delay: {
direction: false, // 延时解锁方向
offset: { x: -5, y: 0}, // 延时解锁偏移量
fontSize: 11, // 延迟解锁字体大小
fontColor: '#C00808', // 延迟解锁颜色
fontWeight: 'bold' // 字体粗细
},
button: {
distance: 5, // 信号灯按钮距离区段的距离
borderDashColor: '#FFFFFF', // 信号灯按钮边线
buttonColor: 'darkgreen', // 信号灯按钮颜色
buttonLightenColor: 'yellow' // 信号灯按钮闪烁颜色
}
};
this[deviceType.StationStand] = {
common: { // 通用属性
textFontSize: 10, // 站台默认字体大小
haveJumpShow: true // 站台是否有列车停跳显示
},
safetyDoor: { // 屏蔽门
height: 3, // 站台屏蔽门高度
distance: 4, // 站台和屏蔽门之间的距离
defaultColor: 'green', // 屏蔽门默认颜色
splitDoorColor: 'green' // 屏蔽门切除颜色
},
stand: { // 站台
headFontSize: 10, // 站台首端字体大小
spareColor: 'white', // 站台空闲颜色
stopColor: 'yellow', // 站台列车停站颜色
jumpStopColor: 'blue', // 站台跳停颜色
designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
offset: {x: 0, y: 40}, // 站台紧急关闭偏移量
closeColor: 'red' // 站台紧急关闭颜色
},
reentry: { // 站台折返策略
position: 0, // 折返方向
offset: {x: -16, y: 20}, // 折返偏移量
noHumanColor: '#0F16DA', // 站台无人折返
autoChangeEndsColor: '#0BF400' // 站台自动换端
},
detainCar: { // 扣车
text: '扣', // 扣车显示内容
position: -1, // 扣车方向
offset: {x: -8, y: -20}, // 扣车偏移量
trainColor: 'yellow', // 车站扣车颜色
centerTrainColor: 'white', // 中心扣车颜色
andCenterTrainColor: 'red', // 车站+中心扣车颜色
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
},
stopTime: { // 停站时间
position: 1, // 运行时间方向
offset: {x: -8, y: -4}, // 运行时间偏移量
textColor: 'white' // 停站时间字体颜色
},
jump: {
text: '跳', // 停跳显示内容
position: -1, // 停跳方向
offset: {x: -8, y: 0},
textColor: '#0000FF', // 停跳文字颜色
arcColor: '#0000FF', // 停跳圆圈颜色
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
r: 8 // 圆半径大小
},
level: { // 运行等级
position: 1, // 运行等级方向
offset: {x: -8, y: 30}, // 运行等级偏移量
textColor: '#FFF000' // 停站等级字体颜色
}
};
this[deviceType.StationControl] = {
text: {
distance: 2, // 灯和文字之间的距离
fontSize: 12, // 字体大小
fontFormat: 'consolas', // 字体格式
fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top' // 字体垂直对齐
},
lamp: {
count: 4, // 控制模式的个数
offset: {x: 0, y: 0}, // 偏移量
radiusR: 4, // 控制模式灯的半径
distance: 36, // 控制模式之间灯之间的距离
grayColor: '#C0C0C0', // 控制模式灰色
greenColor: 'green', // 控制模式绿色
redColor: 'red', // 控制模式红色
yellowColor: 'yellow', // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false // 联锁控显示
},
arrow: {
show: false // 控制模式箭头显隐
}
};
this[deviceType.StationCounter] = {
text: {
distance: 2, // 计数器名称和文字的距离
fontColor: '#FFFFFF', // 计数器字体颜色
borderColor: '#E4EF50' // 计数器边框颜色
}
};
this[deviceType.StationDelayUnlock] = {
text: {
distance: 3, // 延迟解锁和设备之间的距离
fontColor: '#FFFFFF', // 延时解锁字体颜色
borderColor: '#FFFFFF' // 延迟解锁边框颜色
}
};
this[deviceType.Station] = {
// text: {
// show: true // 公里标名称显示
// },
kmPostShow: false, // 公里标显示
kilometerPosition: 'up' // 公里标朝向
};
this[deviceType.Switch] = {
text: {
show: true, // 道岔名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
offset: {x: 5, y: -10}, // 道岔名称与区段距离
fontSize: 11, // 字体大小
fontColor: '#C0C0C0', // 道岔名称颜色
fontWeight: 'normal', // 字体粗细
borderColor: '#FE0000', // 道岔边框颜色
lossColor: 'lightgreen', // 道岔失去颜色
locateColor: 'lightgreen', // 道岔定位颜色
inversionColor: 'lightgreen', // 道岔反位颜色
monolockColor: '#FFFFFF' // 道岔单锁颜色
},
core: {
length: 10 // 道岔单边长度
},
monolock: { // 道岔单锁配置
locationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
inversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
rectShow: true, // 道岔单锁 矩形框是否显示
rectWidth: 18, // 矩形框 宽高
rectBorderColor: '#fff' // 矩形边框颜色
},
block: { // 道岔封锁配置
nameBorderShow: false, // 道岔名称是否有包围框 显示
contentRectShow: true, // 道岔封锁显示
contentRectColor: 'red' // 道岔封锁边框颜色
}
};
this[deviceType.LcControl] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#FFFF00' // 控制灯颜色
}
};
this[deviceType.ZcControl] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#00FF00' // 控制灯颜色
}
};
this[deviceType.LimitControl] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
radiusR: 6, // 控制灯大小
controlColor: '#ECE9D8' // 控制灯颜色
}
};
this[deviceType.Line] = {
lineColor: '#FFFFFF' // 线条颜色
};
this[deviceType.TrainWindow] = {
lineColor: '#4DD43F', // 车次窗颜色
lineDash: null, // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度
};
this[deviceType.Train] = {
trainBody: {
trainBodyLineWidth: 1, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [], // 特殊列车类型需设置显示格式
lrPadding: 4, // 两边间隔
upPadding: 4, // 上边距离
trainBodyFillColor: '#000099', // 列车车身填充颜色
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
},
hsda: {
lrPaddingHSDA: 3, // HSDA两边间隔
upPaddingHSDA: 4, // HSDA上边距离
trainHSDATextFontSize: 8, // 列车HDSA字号
textHContent: '扣', // textH文本
textSContent: '跳', // textS文本
textDContent: '门', // textD文本
textAContent: '警' // textA文本
},
trainNumber: {
targetCodePrefix: '000', // 目的地码前缀
defaultTargetCode: 'DDD', // 默认目的地码
trainTargetTextAlign: 'left', // 目的地码文字显示位置
trainNumberOffset: { x: 24, y: 4}// 目的地码偏移量
},
trainServer: {
serviceNumberPrefix: '000', // 服务号(表号)前缀
defaultServiceNumber: 'TTT', // 默认服务号(表号)
defaultServerNoColor: '#FFFFFF', // 默认服务号状态显示颜色
trainServerOffset: { x: 4, y: 4} // 列车服务号偏移
},
trainTarget: {
tripNumberPrefix: '000', // 车次号前缀
defaultTripNumber: 'DDD', // 默认车次号2
trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移
trainTargetTextAlign: 'right' // 车次号文字显示位置
},
trainTargetNumber: {
trainTargetNumberOffset: {x: 0, y: 0}// 车组号偏移量
},
trainHead: {
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
trainHeadTriangleFirst: { x: 7, y: 1}, // 列车车头三角坐标1偏移量
trainHeadTriangleSecond: { x: 13, y: 10}, // 列车车头三角坐标2偏移量
trainHeadTriangleThird: { x: 7, y: 19}, // 列车车头三角坐标3偏移量
trainConntWidth: 4, // 列车竖杠的宽度
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
trainHeadRectHeight: 20 // 列车车头矩形高度
},
common: {
trainHeight: 20, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth: 55, // 列车长度
trainTextFontSize: 16, // 列车字号
fontFamily: 'consolas', // 默认字体 族类
haveTextHSDA: true, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象
aspectRatio: 7 / 5, // 字体宽高比例用以拼接text是计算位置
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true // 使用配置项的字体大小
},
trainStatusStyle: {
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
destinationStatusSetText: 'trainTarget', // 目的地状态设置的对应哪个text的颜色
destinationStatus: [
{status: '01', showColor: '#FFFFFF'},
{status: '02', showColor: '#00FF00'},
{status: '03', showColor: '#A0522D'},
{status: '04', showColor: '#FFFF00'}
], // 目的地状态 01准点 02早点 03晚点 04头码车
serverNoType: [
{type: '01', showColor: '#FFFFFF'},
{type: '02', showColor: '#FFF000'}
], // 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车
directionType: [
{
type: '01',
lineLShow: true,
lineRShow: true,
arrowLShow: false,
arrowRShow: false
},
{
type: '02',
lineLShow: false,
lineRShow: true,
arrowLShow: false,
arrowRShow: true
},
{
type: '03',
lineLShow: true,
lineRShow: false,
arrowLShow: true,
arrowRShow: false
}
], // 列车运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
directionStopType: [
{
type: '01',
lineLShow: false,
lineRShow: false
},
{
type: '02',
lineLShow: false,
lineRShow: true
},
{
type: '03',
lineLShow: true,
lineRShow: false
}
], // 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
runModeStatus: [
{
status: '01',
trainLColor: '#FFFFFF',
trainRColor: '#FFFFFF'
},
{
status: '02',
trainLColor: '#00FF00',
trainRColor: '#00FF00'
},
{
status: '03',
trainLColor: '#FFFF00',
trainRColor: '#FFFF00'
},
{
status: '04',
trainLColor: '#A0522D',
trainRColor: '#A0522D'
},
{
status: '05',
trainLColor: '#A0522D',
trainRColor: '#A0522D'
}
], // 列车运行模式对应车头颜色 01未知 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM
runControlStatus: [
{
status: '01',
hShow: false,
sShow: false
},
{
status: '02',
hShow: true,
sShow: false
},
{
status: '03',
hShow: false,
sShow: true
}
], // 设置运行控制状态类型 01正常 02扣车 03停跳
doorStatus: [
{status: '01', dShow: false},
{status: '02', dShow: true}
], // 设置车门状态类型 01关门 02开门
communicationStatus: [
{status: '01', trainColor: '#725A64'},
{status: '02', trainColor: '#C0C0C0'}
], // 设置通信状态 01正常 02故障
alarmStatus: [
{status: '01', aShow: false},
{status: '02', aShow: true}
] // 设置报警状态 01不报警 02报警
}
};
}
}
export default new SkinCode();

View File

@ -6,125 +6,107 @@ const deviceRender = {};
deviceRender[deviceType.Link] = {
_type: deviceType.Link,
zlevel: 1
// progressive: 1
};
/** Section渲染配置*/
deviceRender[deviceType.Section] = {
_type: deviceType.Section,
zlevel: 1
// progressive: 2
};
/** Signal渲染配置*/
deviceRender[deviceType.Signal] = {
_type: deviceType.Signal,
zlevel: 1
// progressive: 3
};
/** Switch渲染配置*/
deviceRender[deviceType.Switch] = {
_type: deviceType.Switch,
zlevel: 1
// progressive: 5
};
/** Station渲染配置*/
deviceRender[deviceType.Station] = {
_type: deviceType.Station,
zlevel: 1
// progressive: 4
};
/** StationStand渲染配置*/
deviceRender[deviceType.StationStand] = {
_type: deviceType.StationStand,
zlevel: 1
// progressive: 5
};
/** StationControl渲染配置*/
deviceRender[deviceType.StationControl] = {
_type: deviceType.StationControl,
zlevel: 1
// progressive: 4
};
/** ImageControl渲染配置*/
deviceRender[deviceType.ImageControl] = {
_type: deviceType.ImageControl,
zlevel: 1
// progressive: 5
};
/** ZcControl渲染配置*/
deviceRender[deviceType.ZcControl] = {
_type: deviceType.ZcControl,
zlevel: 1
// progressive: 6
};
/** LcControl渲染配置*/
deviceRender[deviceType.LcControl] = {
_type: deviceType.LcControl,
zlevel: 1
// progressive: 6
};
/** LimitControl渲染配置*/
deviceRender[deviceType.LimitControl] = {
_type: deviceType.LimitControl,
zlevel: 1
// progressive: 5
};
/** StationDelayUnlock渲染配置*/
deviceRender[deviceType.StationDelayUnlock] = {
_type: deviceType.StationDelayUnlock,
zlevel: 1
// progressive: 6
};
/** Train渲染配置*/
deviceRender[deviceType.Train] = {
_type: deviceType.Train,
zlevel: 1
// progressive: 9
};
/** TrainWindow渲染配置*/
deviceRender[deviceType.TrainWindow] = {
_type: deviceType.TrainWindow,
zlevel: 1
// progressive: 8
};
/** Line渲染配置*/
deviceRender[deviceType.Line] = {
_type: deviceType.Line,
zlevel: 1
// progressive: 7
};
/** Text渲染配置*/
deviceRender[deviceType.Text] = {
_type: deviceType.Text,
zlevel: 1
// progressive: 7
};
/** TrainWindow渲染配置*/
deviceRender[deviceType.TrainWindow] = {
_type: deviceType.TrainWindow,
zlevel: 1
// progressive: 4
};
/** Train渲染配置*/
deviceRender[deviceType.TRain] = {
_type: deviceType.TRain,
zlevel: 1
// progressive: 4
};
/** CheckBox渲染配置*/
deviceRender[deviceType.CheckBox] = {

View File

@ -1,442 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm alxe-effective"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px;border: 1px solid lightgray;">
<span class="base-label">准备</span>
<div style="margin-top: 10px">
<el-row type="flex" justify="left">
<el-col :span="9">车站</el-col>
<el-col :span="9">轨道/计轴</el-col>
</el-row>
<el-row type="flex" justify="left">
<el-col :span="9">
<el-input v-model="model.stationName" :type="type" size="mini" :disabled="true" />
</el-col>
<el-col :span="9">
<el-input v-model="model.sectionName" :type="type" size="mini" :disabled="true" />
</el-col>
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认
</el-button>
</el-col>
</el-row>
</div>
</div>
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
<span class="base-label">确认</span>
<div>
<el-row type="flex" justify="left">
<el-col :span="9">车站</el-col>
<el-col :span="9">轨道/计轴</el-col>
</el-row>
<el-row type="flex" justify="left">
<el-col :span="9">
<el-select
:id="domIdChoose1"
v-model="model.confirmStationName"
filterable
size="mini"
:disabled="type==='text'"
@change="stationSelectChange"
>
<el-option
v-for="(option,index) in filterStationList"
:key="index"
:label="option.name"
:value="option.name"
/>
</el-select>
</el-col>
<el-col :span="9">
<el-select
:id="domIdChoose2"
v-model="model.confirmSectionName"
filterable
size="mini"
:disabled="type==='text'"
@change="sectionSelectChange"
>
<el-option
v-for="(option,index) in randomSectionList"
:key="index"
:label="option.name"
:value="option.name"
/>
</el-select>
</el-col>
<el-col :span="4" :offset="1">
<el-button
:id="domIdConfirm2"
size="mini"
:loading="loading"
:disabled="type==='text'"
@click="commit"
>确认</el-button>
</el-col>
</el-row>
</div>
</div>
<el-row type="flex" justify="left" style="margin-top:20px">
<el-col :span="6" :offset="1"> 操作倒计时</el-col>
<el-col :span="16">
<el-input v-model="model.time" size="mini" :readonly="true" />
</el-col>
</el-row>
<el-row>
<el-col :offset="1"> 状态</el-col>
</el-row>
<el-row>
<el-col :offset="1" :span="23">
<el-input v-model="model.status" type="textarea" :rows="2" placeholder="" />
</el-col>
</el-row>
<el-row class="botton-group" style="margin-top:20px">
<el-col :span="4" :offset="10">
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<popup-alarm ref="popupAlarm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PopupAlarm from './childDialog/popupAlarm';
export default {
name: 'AlxeEffective',
components: {
NoticeInfo,
PopupAlarm
},
data() {
return {
dialogShow: false,
loading: false,
type: 'text',
timeout: 1000,
timenum: 30,
stepNum: 0,
task: null,
model: {
stationName: '',
sectionName: '',
confirmStationName: '',
confirmSectionName: '',
status: '',
time: 0
},
selected: null,
operate: null,
operation: '',
randomSectionList: []
};
},
computed: {
...mapGetters('map', [
'stationList',
'sectionList'
]),
filterStationList() {
const i = 0; const list = [];
if (this.stationList) {
this.stationList.forEach(elem => {
if (list.findIndex(it => { return it.name == elem.name; }) < 0) {
list.push({ name: elem.name });
}
});
}
return list;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdConfirm1() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
return OperationEvent.Section.alxeEffective.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return OperationEvent.Switch.alxeEffective.confirm1.domId;
}
return '';
},
domIdConfirm2() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
return OperationEvent.Section.alxeEffective.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return OperationEvent.Switch.alxeEffective.confirm2.domId;
}
return '';
},
domIdChoose1() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
return OperationEvent.Section.alxeEffective.choose1.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return OperationEvent.Switch.alxeEffective.choose1.domId;
}
return '';
},
domIdChoose2() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
return OperationEvent.Section.alxeEffective.choose2.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return OperationEvent.Switch.alxeEffective.choose2.domId;
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
title() {
this.earlyDepar = false;
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation ||
this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return '确认计轴恢复工作';
}
return '';
}
},
watch: {
'model.sectionName': function (name) {
const index = Math.floor(Math.random(1) * 5);
for (var i = 0; i < 5; i++) {
if (i == index) {
this.randomSectionList.push({ name });
} else {
const section = this.sectionList[Math.floor(Math.random(1) * this.sectionList.length)];
if (section.type != '02') {
if (this.randomSectionList.findIndex(it => { return it.name == section.name; }) < 0) {
this.randomSectionList.push({ name: section.name });
} else {
i--;
}
} else {
i--;
}
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
stopTask() {
if (this.task) {
clearInterval(this.task);
this.task = null;
}
if (this.stepNum < 3) {
this.$store.dispatch('training/backSteps', this.stepNum);
this.$store.dispatch('training/emitTipFresh');
this.model.name = '';
this.model.time = '';
this.type = 'text';
}
},
doShow(operate, selected) {
this.selected = selected;
this.operate = operate || {};
this.operation = operate.operation;
this.status = '';
this.model.stationName = '';
this.model.sectionName = '';
this.model.confirmStationName = '';
this.model.confirmSectionName = '';
if (selected) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.isSwitchSection) {
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.model.sectionName = section.name;
}
} else {
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.model.sectionName = section.name;
this.model.sectionName = `${section.name}-${selected.name}`;
} else {
this.model.sectionName = `${selected.name}`;
}
}
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
const section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
if (section) {
this.model.sectionName = section.name;
}
}
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.model.stationName = station.name;
}
}
this.stepNum = 0;
this.loading = false;
this.dialogShow = true;
this.stopTask();
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
waitSelectEvent() {
if (!this.$store.state.menuOperation.break) {
this.model.time -= 1;
if (this.model.time <= 0) {
this.stopTask();
}
}
},
commitOnce() {
this.stepNum = 1;
const operate = {
type: this.operate.type,
operation: ''
};
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Section.alxeEffective.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Switch.alxeEffective.confirm1.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.type = 'password';
this.model.time = this.timenum;
this.task = setInterval(this.waitSelectEvent, this.timeout);
}
});
},
stationSelectChange(val) {
if (this.model.confirmStationName === this.model.stationName) {
this.stepNum = 2;
} else {
this.model.time = 0;
}
const operate = {
type: this.operate.type,
operation: '',
val: val
};
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Switch.alxeEffective.choose1.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
});
},
sectionSelectChange(val) {
if (this.model.confirmSectionName === this.model.sectionName) {
this.stepNum = 2;
} else {
this.model.time = 0;
}
const operate = {
type: this.operate.type,
operation: '',
val: val
};
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Section.alxeEffective.choose2.operation;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Switch.alxeEffective.choose2.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
});
},
/** 确认计轴恢复工作*/
commit() {
const operate = {
send: true,
type: this.operate.type,
operation: '',
val: this.selected.code
};
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation;
}
this.model.status = '';
if (this.model.stationName == this.model.confirmStationName &&
this.model.sectionName == this.model.confirmSectionName) {
this.stepNum = 3;
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.type = 'text';
this.stopTask();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.popupAlarm.doShow(Object.assign(this.operate, { val: operate.val }),
[`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
} else {
if (this.model.stationName != this.model.confirmStationName) {
this.model.status = '车站选择错误';
} else if (this.model.sectionName != this.model.confirmSectionName) {
this.model.status = '区段选择错误';
}
}
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.alxe-effective .context {
height: 80px !important;
}
</style>

View File

@ -1,367 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm stand-detain-train"
:title="title"
:visible.sync="show"
width="380px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="head_content content">
<span class="base-label" style="left: 0px;">会话管理</span>
<el-col :span="8">
<el-button class="status">查询会话状态</el-button>
</el-col>
<el-col :span="15" :offset="1">
<el-input :value="messageText" placeholder="" size="mini" disabled />
</el-col>
<el-col :span="12">
<el-button
:id="openMessageId"
class="status_btn"
:disabled="isOpenMessage"
@click="handleMessage('open')"
>打开会话</el-button>
</el-col>
<el-col :span="12">
<el-button
:id="closeMessageId"
class="status_btn"
:disabled="!isOpenMessage"
@click="handleMessage('close')"
>关闭会话
</el-button>
</el-col>
</div>
<div class="content cotnent_body">
<span class="base-label" style="left: 0px;">操作</span>
<el-col :span="3">
<div class="text">操作</div>
</el-col>
<el-col :span="11" :offset="1">
<el-input :value="messageText1" placeholder="" size="mini" disabled />
</el-col>
<el-col :span="8" :offset="1">
<el-button :id="confirmId1" class="status_btn" :disabled="disabledConfirm1" @click="confirm1">确认
</el-button>
</el-col>
</div>
<div class="content cotnent_body">
<span class="base-label" style="left: 0px;">确认</span>
<el-col :span="3">
<div class="text">操作</div>
</el-col>
<el-col :span="11" :offset="1">
<el-input :value="messageText2" placeholder="" size="mini" disabled />
</el-col>
<el-col :span="8" :offset="1">
<el-button :id="confirmId2" class="status_btn" :disabled="disabledConfirm2" @click="confirm2">确认
</el-button>
</el-col>
</div>
<div class="body_cont">
<el-col :span="7">
<div class="text">操作倒计时</div>
</el-col>
<el-col :span="17">
<div style="border: 2px inset #E9E9E9; height: 30px; width: 100%;">
{{ timeCountConfirm == -1 ? '' : timeCountConfirm }}</div>
</el-col>
</div>
<div class="body_cont">
<div class="status_text">状态</div>
<div class="textarea_content" />
</div>
<el-button :id="domIdConfirm" class="close_btn" type="primary" @click="commit">关闭</el-button>
<confirm-tip ref="ConfirmTip" @close="closeMessage" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmTip from './childDialog/confirmTip';
export default {
name: 'StandDetainTrain',
components: {
ConfirmTip
},
data() {
return {
dialogShow: false,
standName: '',
stationName: '',
selected: null,
operation: null,
radio: '1',
radio1: '1',
earlyDepar: false,
messageText: '',
messageText1: '',
messageText2: '',
isOpenMessage: false,
timeCountConfirm: -1,
disabledConfirm1: false,
disabledConfirm2: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
openMessageId() {
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.openMessage.domId : '';
},
closeMessageId() {
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.closeMessage.domId : '';
},
confirmId1() {
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm1.domId : '';
},
confirmId2() {
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm2.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm.domId : '';
},
title() {
return '取消全线临时限速';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) { //
this.timeCountConfirm = -1;
this.disabledConfirm2 = true;
}
}, 1000);
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
handleMessage(message) {
if (message == 'open') {
const operate = {
type: MapDeviceType.LimitControl.type,
operation: OperationEvent.LimitControl.CancelAllLimit.openMessage.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.isOpenMessage = true;
this.messageText1 = '取消全线临时限速';
}
}).catch(() => {
this.doClose();
});
} else {
const operate = {
type: MapDeviceType.LimitControl.type,
operation: OperationEvent.LimitControl.CancelAllLimit.closeMessage.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.isOpenMessage = false;
this.messageText1 = '';
this.messageText2 = '';
this.disabledConfirm1 = false;
this.disabledConfirm2 = false;
this.timeCountConfirm = -1; //
}
}).catch(() => {
this.doClose();
});
}
},
confirm1() {
const operate = {
type: MapDeviceType.LimitControl.type,
operation: OperationEvent.LimitControl.CancelAllLimit.confirm1.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.isOpenMessage = true;
this.messageText1 = '**************';
this.messageText2 = '取消全线临时限速';
this.disabledConfirm1 = true;
this.timeCountConfirm = 60; //
}
}).catch(() => {
this.doClose();
});
},
confirm2() {
const operate = {
send: true,
type: MapDeviceType.LimitControl.type,
operation: OperationEvent.LimitControl.CancelAllLimit.confirm2.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.isOpenMessage = true;
this.messageText2 = '**************';
this.disabledConfirm2 = true;
this.timeCountConfirm = -1;
}
}).catch(() => {
this.doClose();
});
},
commit() {
const operate = {
send: true,
type: MapDeviceType.LimitControl.type,
operation: OperationEvent.LimitControl.CancelAllLimit.confirm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (!this.isOpenMessage) {
this.doClose();
} else {
const operate = {
message: `是否关闭会话,并关闭窗口`,
confirmId: OperationEvent.LimitControl.CancelAllLimit.close.domId
};
this.$refs.ConfirmTip.doShow(operate);
}
});
},
closeMessage() {
const operate = {
type: MapDeviceType.LimitControl.type,
operation: OperationEvent.LimitControl.CancelAllLimit.close.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.ConfirmTip.doClose();
this.isOpenMessage = false;
this.messageText1 = '';
this.messageText2 = '';
this.disabledConfirm1 = false;
this.disabledConfirm2 = false;
this.timeCountConfirm = -1; //
this.doClose();
});
}
}
};
</script>
<style scoped lang="scss">
.stand-detain-train .context {
height: 80px !important;
}
.content {
width: 100%;
border: 1px solid lightgray;
padding: 18px 5px;
position: relative;
.base-label {
position: absolute;
top: -5px;
left: 20px;
background-color: #F0F0F0;
padding: 0 5px;
}
.el-button {
width: 100%;
line-height: 28px;
}
.status_btn {
width: 110px;
margin: 15px auto 0;
display: block;
}
}
.head_content {
height: 110px;
margin-bottom: 10px;
}
.cotnent_body {
height: 60px;
margin-bottom: 10px;
.text {
line-height: 30px;
text-align: center;
font-size: 15px;
}
.status_btn {
width: 80px;
margin: 0 auto
}
}
.close_btn {
margin: 0 auto;
width: 80px;
display: block;
}
.body_cont {
margin-bottom: 10px;
padding: 0 3px;
overflow: hidden;
.text {
line-height: 30px;
text-align: center;
font-size: 15px;
}
.status_text {
margin-bottom: 3px;
font-size: 14px;
padding-left: 8px;
}
.textarea_content {
height: 85px;
width: 100%;
border: 2px solid #E9E9E9;
box-shadow: 2px 2px #959595 inset;
}
}
</style>

View File

@ -1,77 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm notice-info" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span>{{message}}</span><br>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'NoticeInfo',
data() {
return {
dialogShow: false,
messages: ['命令下达失败'],
operate: null
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages) {
this.messages = messages;
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.doClose();
},
cancel() {
this.doClose();
}
}
}
</script>
<style>
.notice-info .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,360 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span>{{message}}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/noticeInfo'
export default {
name: 'ConfirmControl',
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
return '进路设置';
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
return '信号重开';
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return '取消进路';
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
return '进路交人工控';
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交ATS自动控'
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
return '设置运行等级';
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
return '停站时间';
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
return '设置折返策略';
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
/** 进路设置*/
return OperationEvent.Signal.arrangementRoute.confirm.domId
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
return OperationEvent.Signal.signalClose.confirm.domId;
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
return OperationEvent.Signal.reopenSignal.confirm.domId;
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消进路*/
return OperationEvent.Signal.cancelTrainRoute.confirm.domId;
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
return OperationEvent.Signal.humanControl.confirm.domId;
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交ATS自动控*/
return OperationEvent.Signal.atsAutoControl.confirm.domId;
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
/** 设置运行等级*/
return OperationEvent.StationStand.setRunLevel.confirm.domId;
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
/** 设置停战时间*/
return OperationEvent.StationStand.setStopTime.confirm.domId;
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
/** 设置折返策略*/
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
}
}
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
/** 进路设置*/
this.routeSetting();
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
this.reopenSignal();
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消进路*/
this.cancelTrainRoute();
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
this.humanControl();
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交ATS自动控*/
this.atsAutoControl();
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
/** 设置运行等级*/
this.setRunLevel();
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
/** 停站时间*/
this.setStopTime();
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
/** 设置折返策略*/
this.setBackStrategy();
}
},
//
routeSetting() {
let operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
//
signalClose() {
let operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Signal.signalClose.confirm.operation
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
//
reopenSignal() {
let operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Signal.reopenSignal.confirm.operation
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
//
cancelTrainRoute() {
let operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
//
humanControl() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//ATS
atsAutoControl() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
setRunLevel() {
let operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
val: this.operate.val
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
//
setStopTime() {
let operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
val: this.operate.val,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
//
setBackStrategy() {
let operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
val: this.operate.val,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>
<style>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,153 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="540px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{message}}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="10" :offset="2">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'ConfirmControlSpeed',
data() {
return {
dialogShow: false,
loading: false,
type: '',
operation: '',
message: '',
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
return "区段设置限速";
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
return "区段取消限速";
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
return "道岔设置限速";
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
return "道岔取消限速";
}
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.confirm.domId;
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.confirm.domId;
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.confirm.domId;
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.confirm.domId;
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.type = operate.type;
this.operation = operate.operation;
this.message = operate.message;
}
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');
},
commit() {
let operate = {
type: this.type
}
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 1, success: true });
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
})
},
cancel() {
let operate = {
type: this.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 0, success: false });
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>
<style>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,118 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm route-unlock-confirm" :title="title" :visible.sync="show" width="500px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="height: 60px; padding-left: 20px">
<span>{{stationName}}{{signalName}}信号机信号解锁确认下达吗</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="10" :offset="2">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'RouteUnlockConfirm',
data() {
return {
dialogShow: false,
loading: false,
signalName: '',
stationName: ''
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '信号解封'
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.stationName = ''
this.signalName = '';
if (selected) {
this.signalName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
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');
},
commit() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.unlock.confirm.operation
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 1, success: true });
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
})
},
cancel() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>
<style>
.route-unlock-confirm .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,68 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="340px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{message}}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="11">
<el-button type="primary" :id="confirmId" @click="confirm">确定</el-button>
</el-col>
<el-col :span="11" :offset="2">
<el-button @click="doClose"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'ConfirmTip',
data() {
return {
dialogShow: false,
message: '',
confirmId: '',
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.dialogShow) {
return "提示";
}
}
},
mounted() {
},
methods: {
doShow(operate) {
this.message = operate.message;
this.dialogShow = true;
this.confirmId = operate.confirmId;
},
confirm() {
this.$emit('close');
},
doClose() {
this.dialogShow = false;
}
}
}
</script>
<style scoped>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
.beijing-01__systerm .el-dialog .el-button{
display: block;
margin: 0 auto;
}
</style>

View File

@ -1,168 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span>{{message}}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/noticeInfo'
export default {
name: 'ConfirmTrain',
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
return '添加列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
return '修改列车识别号';
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
return '删除列车识别号';
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
return '移动列车识别号';
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
return '交换列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
return '修改车组号'
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
/** 删除列车识别号*/
return OperationEvent.Train.delTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
/** 移动列车识别号*/
return OperationEvent.Train.moveTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
/** 交换列车识别号*/
return OperationEvent.Train.switchTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
/** 修改车组号*/
return OperationEvent.Train.editTrainNo.confirm.domId
}
}
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('map/setTrainWindowShow', false);
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
this.routeSetting();
}
},
//
routeSetting() {
let operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Train.addTrainId.confirm.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>
<style>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,90 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm popup-alarm" :title="title" :visible.sync="show" width="500px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-row>
<el-col :offset="2">
<span v-for="message in messages">{{message}}</span><br>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'Popup-Alarm',
data() {
return {
dialogShow: false,
messages: [],
operate: null,
operation: '',
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '弹出式告警';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.operation = operate.operation;
this.dialogShow = true;
this.messages = messages || [];
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
//
this.alxeEffective();
}
},
alxeEffective() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
})
}
}
}
</script>
<style>
.popup-alarm .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,439 +0,0 @@
<template>
<div>
<el-dialog v-dialogDrag class="beijing-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="8">
<el-form-item label="类型" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="车站名称" label-width="80px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="信号机名称" label-width="100px">
<el-input v-model="signalName" size="small" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<el-table-column prop="order" :width="50" label="序号" />
<el-table-column prop="date" :width="160" label="时间" />
<el-table-column prop="context" :width="180" label="执行过程" />
<el-table-column prop="result" label="执行结果" />
</el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="2">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
v-show="timeCountCommand>0"
>({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
v-show="timeCountConfirm>0"
>({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdClose" @click="close">关闭</el-button>
</el-col>
</el-row>
</el-dialog>
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
export default {
name: 'RouteCmdControl',
components: {
ConfirmSignalUnlock
},
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: '',
signalName: ''
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.order.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.order.domId;
}
}
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.confirm1.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.confirm1.domId;
}
}
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.confirm2.domId;
}
}
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.stop.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.stop.domId;
}
}
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
return '办理引导进路';
}
}
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.order = 0;
this.operation = operate.operation;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.dialogShow = true;
this.stpDisabled = true;
this.setMessage('请点击“下达”按钮,下达命令!');
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
command() {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 第一步带弹框处理*/
this.commandHasPopUp();
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
}
},
commandHasPopUp() {
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.order.operation;
}
this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
}
}
});
},
commandNoPopUp() {
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.order.operation;
}
this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
});
},
confirm1() {
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm1.operation;
}
this.setMessage('请点击“确认2”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
});
},
confirm2() {
const operate = {
send: true,
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
});
},
stop() {
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.stop.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
}
}).catch(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
});
},
close() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
},
getOperate(operate) {
/** 弹框返回值处理*/
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
this.backOperate = operate;
this.setButtonEnable(operate);
if (operate.success) {
this.timeCountCommand = 30;
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' });
}
}
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
});
}
}
};
</script>

View File

@ -1,223 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm signal-control" :title="title" :visible.sync="show" width="300px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><span>信号机</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="signalName" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'RouteControl',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: null,
stationName: '',
signalName: ''
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return '取消列车进路';
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
return '重开信号';
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消列车进路*/
this.cancelTrainRoute();
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
this.reopenSignal();
}
},
//
cancelTrainRoute() {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
this.cancelTrainRouteByLocal();
} else if (this.$store.state.training.prdType == '02') {
/** 行调工作站*/
this.cancelTrainRouteByCentral();
}
},
//
cancelTrainRouteByLocal() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelTrainRouteByCentral() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
signalClose() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.signalClose.menu.operation,
messages: [`信号关灯: ${this.signalName}`],
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(error => {
this.loading = false;
});
},
//
reopenSignal() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.reopenSignal.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancel() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
}
}
</script>

View File

@ -1,153 +0,0 @@
<template>
<div>
<el-dialog class="beijing-01__systerm route-detail" :title="title" :visible.sync="show" width="340px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="10"><span>车站</span></el-col>
<el-col :span="10" :offset="2"><span>始端信号机</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="signalName" size="small" disabled></el-input>
</el-col>
</el-row>
<div class="table">
<span>进路列表</span>
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
:height="140">
<el-table-column label="进路">
<template slot-scope="scope">
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="控制状态" width="180">
<template slot-scope="scope">
<span v-if="scope.row.controlType == '01'">自动不进行冲突检测</span>
<span v-else>人工</span>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'RouteDetail',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
stationName: '',
signalName: '',
}
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
},
title() {
return '查询进路状态'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.detail.menu.operation
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

View File

@ -1,342 +0,0 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="beijing-01__systerm route-hand-control"
:title="title"
:visible.sync="show"
width="300px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<el-table
ref="tempTable"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
:height="140"
>
<el-table-column prop="name" label="选择" width="55" style="margin-left:50px; text-align: right;">
<template slot-scope="scope">
<el-checkbox
v-model="scope.row.check"
style="text-align: center; display: block;"
:disabled="scope.row.disabled"
/>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
</template>
</el-table-column>
</el-table>
</div>
<el-row>
<el-col :span="22" :offset="1">
<el-checkbox v-model="allSelect" size="small" @change="allSelectChange">全选</el-checkbox>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button
:id="domIdConfirm"
type="primary"
:disabled="commitDisabled"
:loading="loading"
@click="commit"
>确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteHandControl',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
operation: null,
selection: [],
stationName: '',
signalName: '',
allSelect: false
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return OperationEvent.Signal.humanControl.choose.domId;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return OperationEvent.Signal.atsAutoControl.choose.domId;
}
}
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路交人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交自动控';
}
},
commitDisabled() {
let disabled = true;
if (this.selection && this.selection.length) {
disabled = false;
}
return disabled;
}
},
watch: {
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
if (tempData && tempData.length > 0) {
tempData.forEach(elem => {
elem.check = false;
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
elem.controlType != '01') {
elem.disabled = true;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
elem.controlType == '01') {
elem.disabled = true;
}
});
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.tempTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
});
}
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
}
let num = 0;
this.allSelect = false;
this.tempData.forEach(item => {
if (item.check) {
num++;
if (num == this.tempData.length) {
this.allSelect = true;
}
}
});
},
allSelectChange() {
if (this.allSelect) {
this.tempData.forEach(item => {
if (!item.disabled) {
item.check = true;
}
});
} else {
this.tempData.forEach(item => {
if (!item.disabled) {
item.check = false;
}
});
}
},
serializeCodeListWithSeparator(sep) {
const codeList = [];
if (this.selection && this.selection.length) {
this.selection.forEach(elem => {
codeList.push(elem.code);
});
}
return codeList.join(sep);
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
const operate = {
repeat: true,
type: MapDeviceType.Signal.type,
operation: '',
val: this.serializeCodeListWithSeparator('::'),
selection: selection
};
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else if (!selection) {
this.$messageBox(`请选择一条数据`);
}
},
commit() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
this.humanControl();
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
this.atsAutoControl();
}
},
//
humanControl() {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
atsAutoControl() {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
};
</script>

View File

@ -1,157 +0,0 @@
<template>
<div>
<el-dialog class="beijing-01__systerm route-lock" :title="title" :visible.sync="show" width="340px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="10"><span>车站名称</span></el-col>
<el-col :span="10" :offset="2"><span>信号机名称</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="signalName" size="small" disabled></el-input>
</el-col>
</el-row>
<div class="table">
<span>信号按钮列表</span>
<el-table ref="table" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
:height="140">
<el-table-column prop="name" label="按钮名称">
</el-table-column>
<el-table-column prop="status" label="按钮状态">
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'RouteLock',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
operate: null,
stationName: '',
signalName: ''
}
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.lock.menu.domId : '';
},
title() {
return '封锁信号按钮'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
/** status 04:封锁*/
let signal = (selected || {}).state;
this.tempData = [{ code: selected.code, name: selected.name, status: signal.status != '04' ? '未封锁' : '封锁' }]
let timer = setInterval(() => {
if (this.$refs.table) {
this.$refs.table.setCurrentRow(this.tempData[0]);
clearInterval(timer);
}
}, 300);
}
this.dialogShow = true;
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
// mouseCancelState(this.selected);
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.lock.menu.operation
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

View File

@ -1,253 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm route-setting"
:title="title"
:visible.sync="show"
width="350px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="11"><span>车站名称</span></el-col>
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<el-row style="margin-top: 10px; line-height: 30px;">
<el-col :span="11"><span>进路列表</span></el-col>
<el-col :span="11" :offset="2">
<el-button class="expand" @click="expandPath">展开进路预览</el-button>
</el-col>
</el-row>
<el-table
ref="table"
:data="tempData"
border
:cell-style="tableStyle"
style="width: 100%; margin-top:10px"
size="mini"
height="120"
highlight-current-row
:show-header="false"
@row-click="clickEvent"
>
<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />
</el-table>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="4">
<el-button
:id="domIdConfirm"
type="primary"
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<!-- <confirm-control ref="confirmControl"></confirm-control> -->
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
// import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteSelection',
components: {
// ConfirmControl,
NoticeInfo
},
data() {
return {
tempData: [],
beforeSectionList: [],
dialogShow: false,
loading: false,
selected: null,
row: null,
operation: '',
display: true,
stationName: '',
signalName: '',
tableStyle: {
'border-bottom': 'none'
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return '进路选排';
},
commitDisabled() {
let disabled = true;
if (this.row) {
disabled = !this.row.canSetting;
}
return disabled;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList &&
row.overlapSectionList &&
row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
expandPath() {
console.log('展开进路预览');
},
doShow(operate, selected, tempData) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.restoreBeforeDevices();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
restoreBeforeDevices() {
//
if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(elem => {
elem.cutOff = false;
});
}
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
this.beforeSectionList = [];
},
clickEvent(row, event, column) {
this.row = row;
if (row) {
//
this.restoreBeforeDevices();
if (row.canSetting) {
//
if (row.containSectionList && row.containSectionList.length) {
//
row.containSectionList.forEach(elem => {
elem.cutOff = true;
});
}
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
this.beforeSectionList = row.containSectionList || [];
//
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: row.code
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
},
commit() {
if (this.row && this.row.canSetting) {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
},
cancel() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -1,435 +0,0 @@
<template>
<div>
<el-dialog class="beijing-01__systerm section-cmd-control" :title="title" :visible.sync="show" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="8">
<el-form-item label="类型" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
:value="option.code">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="车站名称" label-width="80px">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="区段名称" label-width="100px">
<el-input v-model="sectionName" size="small" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
highlight-current-row height="200">
<el-table-column prop="order" :width="50" label="序号">
</el-table-column>
<el-table-column prop="date" :width="160" label="时间">
</el-table-column>
<el-table-column prop="context" :width="180" label="执行过程">
</el-table-column>
<el-table-column prop="result" label="执行结果">
</el-table-column>
</el-table>
<span class="notice">{{message}}</span>
<el-row class="button-group">
<el-col :span="2" :offset="2">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdClose" @click="close">关闭</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date';
export default {
name: 'SectionCmdControl',
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: '',
sectionName: ''
}
},
computed: {
typeList() {
return [
{ code: OperationEvent.Section.unlock.menu.operation, name: '区段解封' },
{ code: OperationEvent.Section.fault.menu.operation, name: '区段故障解锁' },
{ code: OperationEvent.Section.axlePreReset.menu.operation, name: '区段计轴预复位' },
]
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
return OperationEvent.Section.unlock.order.domId;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
return OperationEvent.Section.fault.order.domId;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
return OperationEvent.Section.axlePreReset.order.domId;
}
}
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
return OperationEvent.Section.unlock.confirm1.domId;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
return OperationEvent.Section.fault.confirm1.domId;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
return OperationEvent.Section.axlePreReset.confirm1.domId;
}
}
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
return OperationEvent.Section.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
return OperationEvent.Section.fault.confirm2.domId;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
return OperationEvent.Section.axlePreReset.confirm2.domId;
}
}
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
return OperationEvent.Section.unlock.stop.domId;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
return OperationEvent.Section.fault.stop.domId;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
return OperationEvent.Section.axlePreReset.stop.domId;
}
}
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
return '区段解封';
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return '区段故障解锁';
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
return '区段计轴预复位';
}
}
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && 1 <= index && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000)
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.sectionName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.sectionName += section.name
}
}
this.sectionName += selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.order = 0;
this.operation = operate.operation || '';
this.dialogShow = true;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.stpDisabled = true;
this.setMessage('请点击“下达”按钮,下达命令!');
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
command() {
if (this.operation == OperationEvent.Section.fault.menu.operation ||
this.operation == OperationEvent.Section.unlock.menu.operation ||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
} else {
/** 第一步带弹框处理*/
this.commandHasPopUp();
}
},
commandHasPopUp() {
},
commandNoPopUp() {
let operate = {
type: MapDeviceType.Section.type
}
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.order.operation
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.order.operation
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.order.operation
}
this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
})
},
confirm1() {
let operate = {
type: MapDeviceType.Section.type,
}
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.confirm1.operation;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.confirm1.operation;
}
this.setMessage('请点击“确认2”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
})
},
confirm2() {
let operate = {
send: true,
type: MapDeviceType.Section.type
}
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.confirm2.operation;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
})
},
stop() {
let operate = {
type: MapDeviceType.Section.type,
}
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.stop.operation;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.stop.operation;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
}
}).catch(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
})
},
close() {
let operate = {
type: MapDeviceType.Section.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
},
getOperate(operate) {
/** 弹框返回值处理*/
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
})
}
}
}
</script>

View File

@ -1,207 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm section-control" :title="title" :visible.sync="show" width="300px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><span>区段名</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="sectionName" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="11">
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
激活</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="radio" label="2" :disabled="radio == 1" style="display: block; text-align: center;">
切除</el-radio>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'SectionControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: '',
stationName: '',
sectionName: '',
radio: '',
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Section.lock.menu.operation) {
return '区段封锁';
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
this.radio = '2';
return '区段控制';
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
this.radio = '1';
return '区段控制';
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.sectionName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.sectionName += section.name
}
}
this.sectionName += selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation || '';
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.operation == OperationEvent.Section.lock.menu.operation) {
/** 区段封锁*/
this.lock();
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
/** 轨道区段切除*/
this.split();
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
/** 轨道区段激活*/
this.active();
}
},
//
lock() {
let operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.lock.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
split() {
let operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.split.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
active() {
let operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.active.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
type: MapDeviceType.Section.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

View File

@ -1,895 +0,0 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="beijing-01__systerm section-cmd-speed"
:title="title"
:visible.sync="show"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px 2px; margin-bottom: 25px; border: 1px solid lightgray;">
<span class="base-label">会话管理</span>
<el-form label-position="center" size="mini" style="margin-top: -15px;">
<el-row>
<el-col :span="3">
<el-button type="primary" style="width: 110px; line-height: 26px;" @click="commit">查询会话状态
</el-button>
</el-col>
<el-col :span="11" :offset="1">
<el-input v-model="dialogueStatus" size="mini" disabled />
</el-col>
<el-col :span="3" :offset="1">
<el-button
:id="openConversationId"
type="primary"
style="width: 110px; line-height: 26px;"
:disabled="!isOpenMessage"
@click="openMessage('open')"
>打开会话
</el-button>
</el-col>
<el-col :span="3" :offset="1">
<el-button
:id="closeConversationId"
type="primary"
style="width: 110px; line-height: 26px;"
:disabled="isOpenMessage"
@click="openMessage('close')"
>关闭会话
</el-button>
</el-col>
</el-row>
</el-form>
</div>
<div style="margin-bottom: 15px;">
<el-row>
<el-col :span="15">
<div style="padding: 12px 8px 8px; height: 170px; border: 1px solid lightgray;">
<div style="float: left; width: 20%; padding: 25px 8px 0;">
<div style="margin-bottom: 5px;">限速数值</div>
<el-select
:id="firstLimitSpeedId"
v-model="firstScetion.speed"
size="mini"
:disabled="spdDisabled"
placeholder=""
@change="changeSelect(firstScetion.speed, '1')"
>
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</div>
<div
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;"
>
<span class="base-label" style="left: 0px;">起点</span>
<div style="margin-bottom: 5px;">区间选择</div>
<el-select
:id="firstStartSectionId"
v-model="firstScetion.startSection"
size="mini"
:disabled="spdDisabled"
placeholder=""
@change="changeSelect(firstScetion.startSection, '2')"
>
<el-option
v-for="item in regionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="margin-bottom: 5px;margin-top: 5px;">公里标数值(m)</div>
<el-input
:id="firstStartvalueId"
v-model="firstScetion.startValue"
:min="0"
size="mini"
:disabled="spdDisabled"
@blur="changeSelect(firstScetion.startValue, '3')"
/>
</div>
<div
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;"
>
<span class="base-label" style="left: 0px;">终点</span>
<div style="margin-bottom: 5px;">区间选择</div>
<el-select
:id="firstEndSectionId"
v-model="firstScetion.endSection"
size="mini"
:disabled="spdDisabled"
placeholder=""
@change="changeSelect(firstScetion.endSection, '4')"
>
<el-option
v-for="item in regionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="margin-bottom: 5px; margin-top: 5px;">公里标数值(m)</div>
<el-input
:id="firstEndvalueId"
v-model="firstScetion.endValue"
:min="0"
size="mini"
:disabled="spdDisabled"
@blur="changeSelect(firstScetion.endValue, '5')"
/>
</div>
<div style="float: left; width: 20%; padding:8px;">
<el-button
:id="firstCheckId"
type="primary"
style="width: 90px; margin: 18px 0 20px; line-height: 26px;"
:disabled="spdDisabled"
@click="CheckEquipment"
>查看设备
</el-button>
<el-button
:id="firstComfirmId"
type="primary"
style="width: 90px; margin: 0; line-height: 26px;"
:disabled="firstDisabled"
@click="Confirmed"
>首次确认
</el-button>
</div>
</div>
</el-col>
<el-col :span="9">
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表</span>
<div style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
<div v-for="(item,i) in equipmentText" :key="i">
{{ item.name }}: {{ item.text }}
</div>
</div>
</div>
</el-col>
</el-row>
</div>
<div style="margin-bottom: 15px;">
<el-row>
<el-col :span="15">
<div style="padding: 12px 8px 8px; height: 170px; border: 1px solid lightgray;">
<div style="float: left; width: 20%; padding: 25px 8px 0;">
<div style="margin-bottom: 5px;">限速数值</div>
<el-select
:id="secondLimitSpeedId"
v-model="secondScetion.speed"
size="mini"
:disabled="stpDisabled"
placeholder=""
@change="changeSelect(secondScetion.speed, '6')"
>
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</div>
<div
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;"
>
<span class="base-label" style="left: 0px;">起点</span>
<div style="margin-bottom: 5px;">区间选择</div>
<el-select
:id="secondStartSectionId"
v-model="secondScetion.startSection"
size="mini"
:disabled="stpDisabled"
placeholder=""
@change="changeSelect(secondScetion.startSection, '7')"
>
<el-option
v-for="item in regionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="margin-bottom: 5px;margin-top: 5px;">公里标数值(m)</div>
<el-select
:id="secondStartvalueId"
v-model="secondScetion.startValue"
size="mini"
:disabled="stpDisabled"
placeholder=""
@change="changeSelect(secondScetion.startValue, '8')"
>
<el-option
v-for="item in startSectionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;"
>
<span class="base-label" style="left: 0px;">终点</span>
<div style="margin-bottom: 5px;">区间选择</div>
<el-select
:id="secondEndSectionId"
v-model="secondScetion.endSection"
size="mini"
:disabled="stpDisabled"
placeholder=""
@change="changeSelect(secondScetion.endSection, '9')"
>
<el-option
v-for="item in regionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="margin-bottom: 5px; margin-top: 5px;">公里标数值(m)</div>
<el-select
:id="secondEndvalueId"
v-model="secondScetion.endValue"
size="mini"
:disabled="stpDisabled"
placeholder=""
@change="changeSelect(secondScetion.endValue, '10')"
>
<el-option
v-for="item in endSectionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div style="float: left; width: 20%; padding:8px;">
<el-button
:id="secondCheckId"
type="primary"
style="width: 90px; margin: 18px 0 20px; line-height: 26px;"
@click="CheckSecondEquipment"
>查看设备
</el-button>
<el-button
:id="secondComfirmId"
type="primary"
style="width: 90px; margin: 0; line-height: 26px;"
:disabled="secondDisabled"
@click="confirm"
>确认发送
</el-button>
</div>
</div>
</el-col>
<el-col :span="9">
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表</span>
<div style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
<div v-for="(item,i) in equipmentText1" :key="i">
{{ item.name }}: {{ item.text }}
</div>
</div>
</div>
</el-col>
</el-row>
</div>
<el-row>
<el-col :span="5">
<div style="float: left; height: 30px; line-height: 30px; margin-right:10px;">操作倒计时</div>
<div style="border: 2px inset #E9E9E9; height: 30px; width: 45px;float: left;">
{{ timeCountConfirm == -1 ? '' : timeCountConfirm }}</div>
</el-col>
<el-col :span="19">
<div style="float: left; height: 30px; line-height: 30px; margin-right:10px;">状态</div>
<div style="border: 2px inset #E9E9E9; height: 30px; width: calc(100% - 38px);float: left;">
{{ messageStatus }}</div>
</el-col>
</el-row>
<el-row class="button-group">
<el-button :id="domIdClose" style="margin: 0px auto; display: block;" @click="close">关闭</el-button>
</el-row>
</el-dialog>
<confirm-tip ref="ConfirmTip" @close="closeMessage" />
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/ConstDic';
// import { mouseCancelState } from '../utils/menuItemStatus';
// import { now } from '@/utils/date';
import ConfirmTip from './childDialog/confirmTip';
import { sendCommand } from '@/api/jmap/training';
import router from '@/router/index_APP_TARGET';
export default {
name: 'SectionCmdSpeed',
components: {
ConfirmTip
},
data() {
return {
dialogShow: false,
selected: '',
order: 0,
code: '',
row: null,
timer: null,
type: '',
operation: '',
spdDisabled: true,
firstDisabled: true,
secondDisabled: true,
stpDisabled: true,
timeCountCommand: -1,
timeCountConfirm: -1,
equipmentText: [],
equipmentText1: [],
maxSpeed: 85,
speedSpace: 5,
stationName: '111',
name: '',
speed: '',
regionList: [],
startSectionList: [],
endSectionList: [],
sectionList: [
{
value: 'up',
name: '上行'
},
{
value: 'down',
name: '下行'
}
],
messageStatus: '请先打开会话!',
dialogueStatus: '会话已关闭',
isOpenMessage: true,
codeText: '',
firstScetion: {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
},
firstShow: false,
copyScetion: {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
},
secondScetion: {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
}
};
},
computed: {
speedList() {
const list = [{ value: -1, name: '无限速' }];
for (var i = 5; i * this.speedSpace <= this.maxSpeed; i++) {
list.push({ value: String(i * this.speedSpace), name: String(i * this.speedSpace) });
}
return list;
},
title() {
return this.dialogShow ? '公里标输入临时限速' : '';
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
openConversationId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.openConversation.domId : '';
},
closeConversationId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.closeConversation.domId : '';
},
firstLimitSpeedId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstLimitSpeed.domId : '';
},
firstStartSectionId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstStartSection.domId : '';
},
firstStartvalueId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstStartvalue.domId : '';
},
firstEndSectionId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstEndSection.domId : '';
},
firstEndvalueId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstEndvalue.domId : '';
},
firstCheckId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstCheck.domId : '';
},
firstComfirmId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstComfirm.domId : '';
},
secondLimitSpeedId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondLimitSpeed.domId : '';
},
secondStartSectionId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondStartSection.domId : '';
},
secondStartvalueId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondStartvalue.domId : '';
},
secondEndSectionId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondEndSection.domId : '';
},
secondEndvalueId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondEndvalue.domId : '';
},
secondCheckId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondCheck.domId : '';
},
secondComfirmId() {
return this.dialogShow ? OperationEvent.Section.confirmLimit.menu.domId : '';
},
domIdClose() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.domIdClose.domId : '';
}
},
watch: {
'timeCountCommand': function (val) {
if (val <= 0) {
this.dialogueStatus = `会话已关闭`;
// this.openMessage('close');
this.isOpenMessage = true;
this.spdDisabled = true;
this.firstDisabled = true;
this.secondDisabled = true;
this.messageStatus = '请先打开会话!';
this.timeCountCommand = -1;
if (this.speed) {
this.messageStatus = '会话关闭成功';
}
this.equipmentText = [];
this.equipmentText1 = [];
this.firstScetion = {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
};
this.secondScetion = {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
};
} else {
this.dialogueStatus = `会话打开,剩余时间${val}`;
}
},
firstScetion: {
handler: function (val) {
if (val.speed && val.startSection && val.endSection && val.startValue != '' && val.endValue != '') {
this.firstShow = true;
} else {
this.firstShow = false;
}
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.regionList = this.$ConstSelect.RegionTypeList;
this.timer = setInterval(() => {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) { //
this.isOpenMessage = true;
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) { //
this.timeCountConfirm = -1;
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
if (!this.dialogShow) {
this.name = '';
if (selected) {
this.timeCountCommand = -1; //
this.order = 0;
this.type = operate.type;
this.operation = operate.operation;
this.code = operate.code;
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.secondScetion = {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
};
this.firstScetion = {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
};
this.speed = 0;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
// mouseCancelState(this.selected);
},
openMessage(state) {
if (state == 'open') { //
const operate = {
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.openConversation.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.isOpenMessage = false;
this.spdDisabled = false;
this.messageStatus = '会话打开成功';
this.speed = 1;
this.timeCountCommand = 120;
}
}).catch(error => {
console.log(error);
});
} else { //
const operate = {
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.closeConversation.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.isOpenMessage = true;
this.spdDisabled = true;
this.firstDisabled = true;
this.secondDisabled = true;
this.messageStatus = '请先打开会话!';
this.timeCountCommand = -1;
this.startSectionList = [];
this.endSectionList = [];
if (this.speed) {
this.messageStatus = '会话关闭成功';
}
}
}).catch(error => {
console.log(error);
});
}
},
CheckEquipment() { //
if (this.firstShow) {
const value = `${this.firstScetion.speed}::${this.firstScetion.startSection}::${this.firstScetion.startValue}::${this.firstScetion.endSection}::${this.firstScetion.endValue}`;
const operate = {
send: true,
val: value,
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.firstCheck.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.firstDisabled = false; //
this.getEquipmentList(response.data);
this.copyScetion = {
speed: this.firstScetion.speed,
startSection: this.firstScetion.startSection,
endSection: this.firstScetion.endSection,
startValue: this.firstScetion.startValue,
endValue: this.firstScetion.endValue
};
this.startSectionList = [];
this.endSectionList = [];
for (let index = 0; index < 4; index++) {
const starData = {
value: Number(this.firstScetion.startValue) + index,
label: Number(this.firstScetion.startValue) + index
};
this.startSectionList.push(starData);
const endData = {
value: Number(this.firstScetion.endValue) + index,
label: Number(this.firstScetion.endValue) + index
};
this.endSectionList.push(endData);
}
}
}).catch(error => {
console.log(error);
});
}
},
getEquipmentList(list) {
this.equipmentText = [];
const stationStand = [];
const stationText = [];
this.codeText = '';
const arr = [];
list.forEach(ele => {
if (stationStand.indexOf(ele.stationCode) == -1) {
stationStand.push(ele.stationCode);
const text = this.getTextName(ele);
stationText.push(text);
} else {
const index = stationStand.indexOf(ele.stationCode);
const text = this.getTextName(ele);
stationText[index] += text;
}
arr.push(ele.code);
});
this.codeText = arr.join('::');
stationStand.forEach((item, index) => {
const stationStandName = this.$store.getters['map/getDeviceByCode'](item);
const data = {
text: stationText[index],
name: stationStandName.name
};
this.equipmentText.push(data);
});
},
getTextName(ele) {
if (ele.switchSectionType) {
switch (ele.switchSectionType) {
case '01':
return `${ele.name}(主), `;
case '02':
return `${ele.name}(定), `;
case '03':
return `${ele.name}(反), `;
}
} else if (ele.parentName) {
return `${ele.parentName}-${ele.name}, `;
} else {
return `${ele.name}, `;
}
return '';
},
CheckSecondEquipment() { //
if (this.secondScetion.speed == this.copyScetion.speed && this.secondScetion.startSection == this.copyScetion.startSection && this.secondScetion.endSection == this.copyScetion.endSection && this.secondScetion.startValue == this.copyScetion.startValue && this.secondScetion.endValue == this.copyScetion.endValue) {
const operate = {
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.secondCheck.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.equipmentText1 = this.equipmentText;
this.secondDisabled = false; //
}
}).catch(error => {
console.log(error);
});
} else {
this.firstScetion = {
speed: this.copyScetion.speed,
startSection: this.copyScetion.startSection,
endSection: this.copyScetion.endSection,
startValue: this.copyScetion.startValue,
endValue: this.copyScetion.endValue
};
this.firstDisabled = true;
this.secondScetion = {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
};
this.spdDisabled = false;
this.equipmentText = [];
this.stpDisabled = true;
this.timeCountConfirm = -1;
const operate = {
message: `两次值不一致`
};
this.$refs.ConfirmTip.doShow(operate);
}
},
changeSelect(value, val) {
const operate = {
type: this.type,
operation: '',
val: value
};
switch (val) {
case '1':
operate.operation = OperationEvent.Section.setLimitSpeed.firstLimitSpeed.operation;
break;
case '2':
operate.operation = OperationEvent.Section.setLimitSpeed.firstStartSection.operation;
break;
case '3':
operate.operation = OperationEvent.Section.setLimitSpeed.firstStartvalue.operation;
break;
case '4':
operate.operation = OperationEvent.Section.setLimitSpeed.firstEndSection.operation;
break;
case '5':
operate.operation = OperationEvent.Section.setLimitSpeed.firstEndvalue.operation;
break;
case '6':
operate.operation = OperationEvent.Section.setLimitSpeed.secondLimitSpeed.operation;
break;
case '7':
operate.operation = OperationEvent.Section.setLimitSpeed.secondStartSection.operation;
break;
case '8':
operate.operation = OperationEvent.Section.setLimitSpeed.secondStartvalue.operation;
break;
case '9':
operate.operation = OperationEvent.Section.setLimitSpeed.secondEndSection.operation;
break;
case '10':
operate.operation = OperationEvent.Section.setLimitSpeed.secondEndvalue.operation;
break;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
console.log(error);
});
},
Confirmed() { //
const operate = {
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.firstComfirm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.spdDisabled = true;
this.stpDisabled = false;
this.firstDisabled = true;
this.messageStatus = '收到Confirm request消息';
this.timeCountConfirm = 60; //
this.firstScetion = {
speed: '',
startSection: '',
endSection: '',
startValue: '***',
endValue: '***'
};
}
}).catch(error => {
console.log(error);
});
},
confirm() { //
// let value = `${this.secondScetion.speed}::${this.codeText}`;
const value = `${this.secondScetion.speed}::${this.secondScetion.startSection}::${this.secondScetion.startValue}::${this.secondScetion.endSection}::${this.secondScetion.endValue}`;
const operate = {
send: true,
val: value,
type: this.type,
code: this.code,
operation: OperationEvent.Section.confirmLimit.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
const group = router.currentRoute.query.group;
const command = this.handleMenuConfirmLimit(operate);
sendCommand(group, command).then((response) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountConfirm = -1;
this.stpDisabled = true;
this.messageStatus = '临时限速设置成功';
}).catch(error => {
const operate = {
message: error.message
};
this.$refs.ConfirmTip.doShow(operate);
console.log(error);
});
}
}).catch(error => {
this.$refs.ConfirmTip.doShow(operate);
console.log(error);
});
},
close() { //
const operate = {
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.domIdClose.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (this.isOpenMessage) {
this.doClose();
} else {
const operate = {
message: `是否关闭会话,并关闭窗口`,
confirmId: OperationEvent.Section.setLimitSpeed.close.domId
};
this.$refs.ConfirmTip.doShow(operate);
}
}
}).catch(() => {
this.doClose();
});
},
commit() {
},
closeMessage() {
const operate = {
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.close.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.ConfirmTip.doClose();
this.isOpenMessage = true;
this.spdDisabled = true;
this.firstDisabled = true;
this.secondDisabled = true;
this.timeCountCommand = -1;
this.startSectionList = [];
this.endSectionList = [];
this.doClose();
}).catch(error => {
console.log(error);
});
},
//
handleMenuConfirmLimit(operate) {
return {
type: operate.type,
code: operate.code,
over: true,
operation: OperationEvent.Section.confirmLimit.event,
val: operate.val
};
}
}
};
</script>

View File

@ -1,554 +0,0 @@
<template>
<div>
<el-dialog class="beijing-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="6">
<el-form-item label="类型" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
:value="option.code">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="车站名称" label-width="80px">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="nameLabel" label-width="80px">
<el-input v-model="name" size="small" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="限速值" label-width="80px">
<el-select v-model="speed" :id="domIdChoose" size="small" :disabled="spdDisabled"
@change="speedSelectChange">
<el-option v-for="item in speedList" :key="item.value" :label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table class="table" ref="table" :data="tableData" border style="width: 100%" size="mini"
highlight-current-row height="200">
<el-table-column prop="order" :width="50" label="序号">
</el-table-column>
<el-table-column prop="date" :width="160" label="时间">
</el-table-column>
<el-table-column prop="context" :width="180" label="执行过程">
</el-table-column>
<el-table-column prop="result" label="执行结果">
</el-table-column>
</el-table>
<span class="notice">{{message}}</span>
<el-row class="button-group">
<el-col :span="2" :offset="2">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdClose" @click="close">关闭</el-button>
</el-col>
</el-row>
</el-dialog>
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate"></confirm-control-speed>
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
import { now } from '@/utils/date';
export default {
name: 'SectionCmdSpeed',
components: {
ConfirmControlSpeed
},
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
type: '',
operation: '',
cmdDisabled: [true, true, true],
spdDisabled: false,
stpDisabled: true,
tableData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
maxSpeed: 80,
speedSpace: 5,
stationName: '',
name: '',
speed: ''
}
},
computed: {
nameLabel() {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation ||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
return '区段名称';
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation ||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
return '道岔名称';
}
},
speedList() {
let list = [{ name: '不限速', value: '-1' }];
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
let speed = String(i * this.speedSpace);
list.push({ name: speed, value: speed });
}
return list;
},
typeList() {
return [
{ code: OperationEvent.Section.setSpeed.menu.operation, name: '区段设置限速' },
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: '区段取消限速' },
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: '区段设置限速' },
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' },
]
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
return '区段设置限速';
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
return '区段取消限速'
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
return '区段设置限速';
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
return '区段取消限速'
}
}
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdChoose() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.choose.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.choose.domId;
}
}
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.order.domId;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.order.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.order.domId;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.order.domId;
}
}
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.confirm1.domId;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.confirm1.domId;
}
}
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.confirm2.domId;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.cancelSpeed.confirm2.domId;
}
}
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.stop.domId;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.stop.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.stop.domId;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.stop.domId;
}
}
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
},
isCancelSpeed() {
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation
|| this.operation == OperationEvent.Switch.cancelSpeed.menu.operation
},
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
this.spdDisabled = false;
val.forEach((elem, index) => {
//
if (elem == false && index >= 1 || this.isCancelSpeed) {
this.spdDisabled = true;
}
//1
if (elem == false && index >= 1) {
this.stpDisabled = false;
}
});
},
deep: true
},
'speed': function (val) {
if (val) this.cmdDisabled[0] = false;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000)
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected, tempData) {
if (!this.dialogShow) {
this.name = '';
this.stationName = '';
if (selected) {
if (operate.operation == OperationEvent.Section.setSpeed.menu.operation ||
operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.name += section.name
}
}
this.name += selected.name
}
} else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation) {
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.name = selected.name
}
}
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
this.speed = '';
this.tableData = [];
this.selected = selected;
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [true, true, true];
this.stpDisabled = true;
this.order = 0;
this.type = operate.type;
this.operation = operate.operation;
this.setMessage('请选择限速值后,点击“下达”按钮,下达命令!');
if (this.isCancelSpeed) {
this.speed = `${tempData}`;
this.spdDisabled = true;
this.cmdDisabled = [false, true, true];
}
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
speedSelectChange(val) {
let operate = {
type: this.type,
val: val,
}
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.choose.operation
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.choose.operation
}
this.setMessage('请点击“下达”按钮,下达命令!');
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
}
})
},
command() {
let operate = {
type: this.type,
}
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.order.operation;
operate.message = `在【${this.name}】区段,区段设置限速${this.speed}km/h确认下达吗`;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.order.operation;
operate.message = `在【${this.name}】区段,区段取消限速${this.speed}km/h确认下达吗`;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.order.operation;
operate.message = `在【${this.name}】区段,道岔设置限速${this.speed}km/h确认下达吗`;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.order.operation;
operate.message = `在【${this.name}】区段,道岔取消限速${this.speed}km/h确认下达吗`;
}
this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
this.$refs.confirmControlSpeed.doShow(operate, this.selected);
} else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
})
},
confirm1() {
let operate = {
type: this.type,
}
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm1.operation;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm1.operation;
}
this.setMessage('请点击“确认2”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
})
},
confirm2() {
let operate = {
send: true,
type: this.type,
val: this.speed
}
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm2.operation;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
}
}).catch((error) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
})
},
stop() {
let operate = {
type: this.type,
}
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.stop.operation;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.stop.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.stop.operation;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
}
}).catch(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
})
},
close() {
let operate = {
type: this.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
},
getOperate(operate) {
if (operate.step) {
this.setButtonEnable({ step: operate.step });
}
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tableData.push(param);
},
editRecord(param) {
this.tableData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
})
}
}
}
</script>

View File

@ -1,212 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm stand-run-level" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="font-size: 16px; margin-bottom: 5px;">变通节点</div>
<div style="margin-bottom: 5px;">
<el-input v-model="stationName" size="mini" disabled></el-input>
</div>
<div style="font-size: 16px; margin-bottom: 5px;">当前变通策略</div>
<div style="margin-bottom: 5px;">
<el-input v-model="stationStrategy" size="mini" disabled></el-input>
</div>
<div style="font-size: 16px; margin-bottom: 5px;">变通策略选项</div>
<el-table ref="table" :data="strategyList" border :cell-style="tableStyle" style="width: 100%; margin-top:10px"
size="mini" @row-click="clickEvent" height="120" highlight-current-row :show-header="false">
<el-table-column prop="label" :id="domIdChoose" style="margin-left:30px">
</el-table-column>
</el-table>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { mapGetters } from 'vuex';
export default {
name: 'StandBackStrategy',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
strategyList: [
{
value: '01',
label: '无折返'
},
{
value: '02',
label: '无人折返'
},
{
value: '03',
label: '自动换端'
},
{
value: '04',
label: '关闭'
},
],
stationName: '',
stationStrategy: '',
selection: [],
isConfirm: false,
strategy: '',
tableStyle: {
'border-bottom': 'none',
}
}
},
computed: {
...mapGetters('map', [
'stationList',
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.choose.domId : '';
},
title() {
return '变通策略管理';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
let stationList = [...this.stationList];
let station = this.stationList.find(n => n.code == selected.stationCode)
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
this.$nextTick(() => {
this.$refs.table.setCurrentRow(null);
})
},
doShow(operate, selected, opts) {
this.selected = selected;
if (!this.dialogShow) {
this.stationName = '';
this.stationStrategy = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
this.strategyList.forEach(item => {
if (item.value == opts.reentryStrategy) {
this.stationStrategy = item.label;
}
})
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
clickEvent(row, column, event) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
val: `${row.value}`,
}
this.strategy = row.value;
this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
checkTableDataSelction(data) {
let selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
})
}
this.disabledSend = selection.length ? false : true;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.isConfirm) {
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
val: `${this.strategy}`
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
} else {
this.doClose();
}
},
cancel() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

View File

@ -1,323 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm stand-detain-train"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>集中站</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<div v-if="!earlyDepar">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio"
label="1"
:disabled="radio == 2"
style="display: block; text-align: left;"
>
本站台上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio"
label="2"
:disabled="radio == 1"
style="display: block; text-align: left;"
>
本站台上行</el-radio>
</el-col>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
label="1"
:disabled="radio1 == '2'"
style="display: block; text-align: left;"
>
扣车</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
label="2"
:disabled="radio1 == '1'"
style="display: block; text-align: left;"
>
取消扣车</el-radio>
</el-col>
</el-row>
</div>
</div>
<div v-if="earlyDepar">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
:id="upRadioId"
v-model="radio2"
label="1"
style="display: block; text-align: left;"
@change="changeRadio"
>
本站台上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
:id="downRadioId"
v-model="radio2"
label="2"
style="display: block; text-align: left;"
@change="changeRadio"
>
本站台下行</el-radio>
</el-col>
</el-row>
</div>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
radio: '1',
radio1: '1',
radio2: '1',
earlyDepar: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
upRadioId() {
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
},
downRadioId() {
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
},
title() {
this.earlyDepar = false;
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.radio1 = '1';
return '扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.radio1 = '2';
return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
this.earlyDepar = true;
if (this.selected.direction == '01') {
this.radio2 = '2';
} else {
this.radio2 = '1';
}
return '提前发车';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.name;
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
changeRadio(val) {
const operate = {
type: MapDeviceType.StationStand.type,
operation: '',
val: val
};
if (val == 1) {
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
} else if (val == 2) {
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
console.log(error);
});
},
commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
/** 设置扣车*/
this.setDetainTrain();
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
/** 取消扣车*/
this.cancelDetainTrain();
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
/** 提前发车*/
this.earlyDeparture();
}
},
//
setDetainTrain() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelDetainTrain() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
earlyDeparture() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.stand-detain-train .context {
height: 80px !important;
}
</style>

View File

@ -1,261 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm stand-detail" :title="title" :visible.sync="show" width="400px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-tree :data="treeData" :lazy="false" class="tree-height-max" :default-expand-all="true"
style="background: #f0f0f0;">
<div slot-scope="{ node, data }" style="height: 24px; width: 100%;">
<div v-if="data.level == 1" style="line-height: 26px;">{{ data.name }}</div>
<div v-if="data.level == 2" style="background: lightgray; overflow: hidden; height: 100%;">
<div
style="width: 46%;float: left; height: 24px; line-height: 24px; padding-left: 5px; border-right: 1px solid #f0f0f0;">
{{ data.name }}</div>
<div style="width: 54%;float: left; height: 24px; line-height: 24px; padding-left: 5px;">
{{ data.value }}</div>
</div>
</div>
</el-tree>
<!-- <el-row class="header">
<el-col :span="10"><span>车站名称</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled></el-input>
</el-col>
</el-row>
<div class="table">
<span>站台状态</span>
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" highlight-current-row>
<el-table-column prop="item" :width="140" label="项目">
</el-table-column>
<el-table-column prop="status" label="状态">
</el-table-column>
</el-table>
</div> -->
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandDetail',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
stationName: '',
standName: '',
strategyMap: {
'01': '无折返',
'02': '无人折返',
'03': '自动换端',
'04': '默认'
},
treeData: [
{
children: [
{
name: '车站',
value: '',
level: 2,
},
{
name: '站台',
value: '',
level: 2,
},
{
name: '停站时间',
value: '',
level: 2,
},
{
name: '跳停',
value: '',
level: 2,
}
],
name: '站台基本信息',
level: 1,
},
{
children: [
{
name: '中心扣车',
value: '',
level: 2,
},
{
name: '车站扣车',
value: '',
level: 2,
}
],
name: '扣车',
level: 1,
},
{
children: [
{
name: '上行站台',
value: '',
level: 2,
},
{
name: '下行站台',
value: '',
level: 2,
}
],
name: '运行等级',
level: 1,
},
],
}
},
computed: {
...mapGetters('map', [
'stationList',
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return '站台详细信息';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
let stationList = this.stationList.slice();
let index = this.stationList.findIndex(n => n.code == selected.stationCode);
let stationStand, station;
if (selected.direction == '01') { //
//
if (index != 0) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
} else {
//
if (index != this.stationList.length - 1) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
}
/** 01: 未设置扣车 02: 车站扣车 03: 中心扣车 04: 中心+车站扣车*/
// this.tempData.push({ item: '', status: opts.holdStatus == '02' || opts.holdStatus == '04' ? '' : '' });
// this.tempData.push({ item: '', status: opts.holdStatus == '03' || opts.holdStatus == '04' ? '' : '' });
//
this.treeData[1].children[0].value = opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置';
//
this.treeData[1].children[1].value = opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置';
// this.tempData.push({ item: '', status: opts.parkingTime != -1 ? opts.parkingTime : '' });
//
this.treeData[0].children[2].value = opts.parkingTime != -1 ? opts.parkingTime : '自动';
//
this.treeData[0].children[3].value = opts.jumpStopStatus != '01' ? '已设置' : '未设置';
if (!stationStand || !station) {
this.tempData.push({ item: '运行等级', status: `自动` });
} else {
this.tempData.push({ item: '运行等级', status: opts.intervalRunTime > 0 ? `${station.name}${stationStand.name}:人工` : `${station.name}${stationStand.name}:自动` });
}
// this.tempData.push({ item: '', status: opts.jumpStopStatus != '01' ? '' : '' });
this.tempData.push({ item: '下行折返策略', status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : '默认' });
},
doShow(operate, selected, opts) {
this.selected = selected;
if (!this.dialogShow) {
// this.standName = '';
// this.stationName = '';
this.treeData[0].children[0].value = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
// this.standName = selected.name;
this.treeData[0].children[1].value = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
// this.stationName = station.name;
this.treeData[0].children[0].value = station.name;
// this.treeData[0].children[1].value = station.runPlanName
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.close.confirm.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
})
},
cancel() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

View File

@ -1,187 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm stand-detain-train-all"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray; ">
<span class="base-label">范围</span>
<el-row>
<el-radio-group v-model="upDown" @change="choose">
<el-col :span="10">
<el-radio :id="upDown == '01' ? domIdChoose : ''" label="02">上行全线</el-radio>
</el-col>
<el-col :span="6" :offset="8">
<el-radio :id="upDown == '02' ? domIdChoose : ''" label="01">下行全线</el-radio>
</el-col>
</el-radio-group>
</el-row>
</div>
<div class="table">
<span>扣车站台列表中心设置</span>
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" empty-text="所有站台都无扣车状态" height="160" highlight-current-row>
<el-table-column prop="stationName" label="车站名称" />
<el-table-column prop="standName" :width="140" label="扣车站台" />
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="disabled" @click="commit">确定
</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandDetainTrainAll',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
upDown: '01',
tempData: [],
disabled: true,
operation: ''
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrainAll.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrainAll.menu.domId : '';
},
title() {
// if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
return '全线取消扣车';
} else {
return '全线取消跳停';
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadTableData() {
this.tempData = [];
this.stationStandList.forEach(elem => {
/** status 01: 未扣车*/
const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).state;
const station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {}).model;
if (station && stand && stand.holdStatus != '01' && Number(elem.direction) === Number(this.upDown)) {
this.tempData.push({ stationName: station.name, standName: elem.name });
}
});
//
if (this.tempData.length > 0) {
this.disabled = false;
}
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.loading = false;
this.upDown = selected.direction;
this.loadTableData();
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
choose(upDown) {
//
this.loadTableData();
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrainAll.choose.operation,
val: `${upDown}`
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
val: this.upDown
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
};
</script>

View File

@ -1,359 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm stand-detain-train"
:title="title"
:visible.sync="show"
width="380px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><span>站台</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<el-form label-width="70px" size="mini" style="">
<el-row style="margin-top: 20px;padding: 10px 5px; border: 1px solid lightgray;">
<span class="base-label" style="display:block; padding-left: 20px;">范围</span>
<el-radio-group :id="selfStationStandId" v-model="model.val1" @change="upAndDownStreamChangeVal1">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.direction !== '01'">本站台下行跳停</el-radio>
</div>
</el-radio-group>
<el-row>
<el-col :span="10">
<el-radio-group id="stand_upDown_choose" :id="otherStationStandId" v-model="model.val2" @change="upAndDownStreamChange">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.direction !== '01'">指定列车下行跳停</el-radio>
</div>
</el-radio-group>
</el-col>
<el-col :span="11" align="top" :offset="2">
<span>车组号</span>
<el-select
:id="selectTrainId"
v-model="model.tripNumber"
style="width: 110px;"
size="mini"
:disabled="!model.val2"
@change="trainNoSelectChange"
>
<el-option
v-for="option in trainList"
:key="option.groupNumber"
:label="option.groupNumber"
:value="option.groupNumber"
/>
</el-select>
</el-col>
</el-row>
</el-row>
</el-form>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
:label="JumpStopSet"
:disabled="radio1 == JumpStopCancel"
style="display: block; text-align: left;"
>
设置</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
:label="JumpStopCancel"
:disabled="radio1 == JumpStopSet"
style="display: block; text-align: left;"
>
取消</el-radio>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandDetainTrains',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
trainList: [],
radio1: '',
model: {
val1: '',
val2: '',
tripNumber: '',
direction: ''
}
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selectTrainId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
}
},
selfStationStandId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.selfStationStand.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.selfStationStand.domId : '';
}
},
otherStationStandId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.otherStationStand.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.otherStationStand.domId : '';
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
return '跳停';
},
upstream() {
return '02'; //
},
downstream() {
return '01'; //
},
JumpStopSet() {
return OperationEvent.StationStand.setJumpStop.menu.operation;
},
JumpStopCancel() {
return OperationEvent.StationStand.cancelJumpStop.menu.operation;
}
},
watch: {
'model.val1'(val) {
if (val) this.model.val2 = '';
},
'model.val2'(val) {
if (val) this.model.val1 = '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.radio1 = '',
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.name;
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.radio1 = operate.operation;
this.model.direction = selected.direction;
this.model.val1 = selected.direction; // , 01: /02:
this.model.val2 = '';
this.model.tripNumber = '';
/** 加载列车数据*/
this.trainList = this.map.trainList;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
/** 设置跳停*/
this.setJumpStop();
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
/** 取消跳停*/
this.cancelJumpStop();
}
},
//
setJumpStop() {
let val = this.model.val1;
if (this.model.val2) {
val = this.model.val2 + '::' + this.model.tripNumber;
}
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
// val: this.selected.direction //, 01: /02:
val: val
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelJumpStop() {
let val = this.model.val1;
if (this.model.val2) {
val = this.model.val2 + '::' + this.model.tripNumber;
}
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
val: val // , 01: /02:
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
upAndDownStreamChange(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
this.model.val1 = '';
const operate = {
type: MapDeviceType.StationStand.type,
operation: operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
upAndDownStreamChangeVal1(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
this.model.val1 = '';
const operate = {
type: MapDeviceType.StationStand.type,
operation: operation
};
this.model.val2 = '';
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainNoSelectChange(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
this.model.val1 = '';
const operate = {
type: MapDeviceType.StationStand.type,
operation: operation,
val: val
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
};
</script>
<style>
.stand-detain-train .context {
height: 80px !important;
}
</style>

View File

@ -1,336 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="10"><span>集中站</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled></el-input>
</el-col>
</el-row>
<div class="table">
<span>站台状态</span>
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
<el-table-column prop="name" :width="180" label="下一站台">
</el-table-column>
<el-table-column prop="level" label="运行等级">
<template slot-scope="scope">
<el-select v-model="scope.row.level" size="mini" @change="levelSelectChange(scope.row)"
:id='chooseLevelId'>
<el-option v-for="item in levelList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="time" label="区间运行时间">
<template slot-scope="scope">
<el-select v-model="scope.row.time" size="mini" @change="timeSelectChange"
:disabled="scope.row.level == 0" :id='domIdChoose'>
<el-option v-for="item in timeList[scope.row.level]" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="check" label="一直有效">
<template slot-scope="scope">
<el-checkbox ref="check" v-model="scope.row.check" @change="checkChange" :id='domIdCheck'>
</el-checkbox>
</template>
</el-table-column>
</el-table>
</div>
<!-- <el-row class="button-group">
<span v-if="isSelect && tempData.length">提示: 未选中要设置运行等级的下一站台</span>
<span v-if="isConfirm && tempData.length">提示: 选中要设置运行等级的下一站台为{{tempData[0].name}}</span>
</el-row> -->
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
export default {
name: 'StandRunLevel',
components: {
ConfirmControl
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
maxRunLevel: 300,
stationName: '',
standName: '',
selection: [],
levelList: [
{
value: '0',
label: '自动',
},
{
value: '1',
label: '1',
},
{
value: '2',
label: '2',
},
{
value: '3',
label: '3',
},
{
value: '4',
label: '4',
},
],
isSelect: true,
isConfirm: false,
time: ''
}
},
watch: {
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
computed: {
...mapGetters('map', [
'stationList',
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
chooseLevelId() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.chooseLevel.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose.domId : '';
},
domIdCheck() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.check.domId : '';
},
title() {
return '设置运行等级';
},
timeList() {
let list = {
'0': [{ value: 0, label: '0' }],
'1': [], // 120 - 110
'2': [], // 100 - 90
'3': [], // 80 - 70
'4': [], // 60 - 50
}
for (var i = 110; i <= 120; i++) {
list['1'].push({ value: i, label: `${i}` })
}
for (var i = 90; i <= 100; i++) {
list['2'].push({ value: i, label: `${i}` })
}
for (var i = 70; i <= 80; i++) {
list['3'].push({ value: i, label: `${i}` })
}
for (var i = 50; i <= 60; i++) {
list['4'].push({ value: i, label: `${i}` })
}
return list;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
getLevelByTime(time) {
return Object.keys(this.timeList).findIndex(key => {
return this.timeList[key].findIndex(obj => {
return obj.value === time;
}) >= 0;
}).toString();
},
loadInitData(selected, opts) {
this.tempData = [];
let stationList = this.stationList.slice();
let index = this.stationList.findIndex(n => n.code == selected.stationCode)
if (selected.direction == '01') { //
//
if (index != 0) {
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
}
} else {
//
if (index != this.stationList.length) {
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
}
}
},
doShow(operate, selected, opts) {
this.selected = selected;
//
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
checkTableDataSelction(data) {
let selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
})
}
this.disabledSend = selection.length ? false : true;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
},
timeSelectChange(time) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
val: time.toString(),
}
this.time = time.toString();
this.isSelect = false;
this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
levelSelectChange(row) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation,
val: row.level.toString(),
}
this.time = row.time = this.timeList[row.level][0].value;
this.isSelect = false;
this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
checkChange(check) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.check.operation,
val: check.toString(),
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.isConfirm) {
let forver = this.tempData[0].check ? true : false;
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
// operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
// messages: [`${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? `` : `${this.tempData[0].time}s`},${this.tempData[0].check ? '' : ''}`],
val: [this.time, forver].join('::'),
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.confirmControl.doShow(operate);
}
}).catch((error) => {
this.loading = false;
this.doClose();
})
} else {
this.doClose();
}
},
cancel() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

View File

@ -1,238 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="340px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><span>站台名称</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="standName" size="small" disabled></el-input>
</el-col>
</el-row>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 73px;">
<span class="base-label" style="left: -9px;">模式</span>
<div style=" position: relative; top:-10px;">
<el-radio-group v-model="control" @change='chooseControl' style="width: 40%;float: left;">
<div style="margin-bottom: 10px;">
<el-radio label="01" :id="control === '01'? '': domIdChoose1">自动</el-radio>
</div>
<el-radio label="02" :id="control === '02'? '': domIdChoose1">全人工</el-radio>
</el-radio-group>
<el-input-number v-model="time" @change="inputTime" :disabled="disabledInput" :id="domIdInput"
controls-position="right" :min="0" size="mini"
style="width: 130px; padding-left:30px;display: block; float: left; margin-top: 15px;">
</el-input-number>
<div style="float: left;margin-top: 22px; margin-left: 5px;"></div>
</div>
</div>
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
<span class="base-label" style="left: -9px;">有效次数</span>
<div style=" position: relative; top:-10px;">
<el-radio-group v-model="effective" @change="chooseEffective" :disabled="disabledTime">
<el-radio :label="false" :id="effective === false? '': domIdChoose2">一次有效</el-radio>
<el-radio :label="true" :id="effective === true? '': domIdChoose2">一直有效</el-radio>
</el-radio-group>
</div>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'StandStopTime',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
time: 0,
control: '01',
direction: '01',
effective: false,
selected: null,
standName: '',
stationName: '',
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.menu.domId : '';
},
domIdChoose1() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
},
domIdChoose2() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
},
domIdInput() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
},
disabledUp() {
if (this.selected) {
return this.selected.direction !== '02'
}
return true;
},
disabledDown() {
if (this.selected) {
return this.selected.direction !== '01'
}
return true;
},
disabledInput() {
return this.control === '01'; //
},
disabledTime() {
return this.control === '01'; //
},
title() {
return '停站时间';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected, tempDate) {
this.selected = selected || {};
//
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02';
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
this.effective = tempDate.parkingValidStatus ? true : false;
this.direction = selected.direction;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
chooseControl(control) {
/** 自动时的默认时间*/
if (control == '01') {
this.inputTime = 15;
this.effective = true;
}
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
val: `${control}`
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
chooseEffective(effective) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
val: `${effective}`
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
inputTime(time) {
let operate = {
repeat: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setStopTime.input.operation,
val: `${time}`
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setStopTime.menu.operation,
val: [`${this.control}`, this.time, this.effective].join('::'),
// messages: [`: ${this.stationName} - ${this.standName}, ${this.control == '01' ? '' : this.time + ''}, ${this.effective == false ? '' : ''}`]
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.confirmControl.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
})
},
cancel() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>

View File

@ -1,389 +0,0 @@
<template>
<div>
<el-dialog class="beijing-01__systerm station-cmd-control" :title="title" :visible.sync="show" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="8">
<el-form-item label="类型" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
:value="option.code">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="车站名称" label-width="100px">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
highlight-current-row height="200">
<el-table-column prop="order" :width="50" label="序号">
</el-table-column>
<el-table-column prop="date" :width="160" label="时间">
</el-table-column>
<el-table-column prop="context" :width="180" label="执行过程">
</el-table-column>
<el-table-column prop="result" label="执行结果">
</el-table-column>
</el-table>
<span class="notice">{{message}}</span>
<el-row class="button-group">
<el-col :span="2" :offset="2">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdClose" @click="close">关闭</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date';
export default {
name: 'StationCmdControl',
data() {
return {
dialogShow: false,
backOperate: '',
selected: null,
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: ''
}
},
computed: {
typeList() {
return [
{ code: OperationEvent.Station.powerUnLock.menu.operation, name: '上电解锁' },
{ code: OperationEvent.Station.execKeyOperationTest.menu.operation, name: '执行关键操作测试' }
]
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
return OperationEvent.Station.powerUnLock.order.domId;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
return OperationEvent.Station.execKeyOperationTest.order.domId;
}
}
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
return OperationEvent.Station.powerUnLock.confirm1.domId;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
return OperationEvent.Station.execKeyOperationTest.confirm1.domId;
}
}
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
return OperationEvent.Station.powerUnLock.confirm2.domId;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
return OperationEvent.Station.execKeyOperationTest.confirm2.domId;
}
}
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
return OperationEvent.Station.powerUnLock.stop.domId;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
return OperationEvent.Station.execKeyOperationTest.stop.domId;
}
}
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
return '执行关键操作测试';
}
}
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && 1 <= index && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000)
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
this.stationName = selected.name
}
this.order = 0;
this.operation = operate.operation;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.stpDisabled = true;
this.dialogShow = true;
this.setMessage('请点击“下达”按钮,下达命令!');
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
command() {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation ||
this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
} else {
/** 第一步带弹框处理*/
this.commandHasPopUp();
}
},
commandHasPopUp() {
},
commandNoPopUp() {
let operate = {
type: MapDeviceType.Station.type
}
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.order.operation
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.order.operation
}
this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
})
},
confirm1() {
let operate = {
type: MapDeviceType.Station.type,
}
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.confirm1.operation;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm1.operation;
}
this.setMessage('请点击“确认2”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
})
},
confirm2() {
let operate = {
send: true,
type: MapDeviceType.Station.type
}
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
})
},
stop() {
let operate = {
type: MapDeviceType.Station.type,
}
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.stop.operation;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
}
}).catch(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
})
},
close() {
let operate = {
type: MapDeviceType.Station.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
},
getOperate(operate) {
/** 弹框返回值处理*/
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
})
}
}
}
</script>

View File

@ -1,118 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm station-human-control-all" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div class="context">
<span>{{title}}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'StationHumanControlAll',
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: null
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '全集中站进路交人工控';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.loading = false;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.humanControlALL.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: MapDeviceType.Station.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>
<style>
.station-human-control-all .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,138 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm station-set-route-control-all" :title="title" :visible.sync="show"
width="320px" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body
v-dialogDrag>
<div style="padding: 0px 10px">
<el-form size="small" label-width="90px" label-position="left" ref="form">
<el-form-item label="集中站名称:" prop="stationName">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-form-item>
</el-form>
<el-radio-group v-model="mode">
<el-row>
<el-radio :label="true">检查冲突</el-radio>
</el-row>
<el-row style="margin-top: 20px">
<el-radio :label="false">不检查冲突</el-radio>
</el-row>
</el-radio-group>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'StationSetRouteControlAll',
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: null,
stationName: '',
mode: true,
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '全集中站设置进路控制模式';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.loading = false;
this.operation = operate.operation;
this.stationName = '';
if (selected) {
this.stationName = selected.name;
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
val: this.mode
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: MapDeviceType.Station.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>
<style>
.station-set-route-control-all .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,459 +0,0 @@
<template>
<div>
<el-dialog class="beijing-01__systerm switch-cmd-control" :title="title" :visible.sync="show" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="8">
<el-form-item label="类型" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
:value="option.code">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="车站名称" label-width="80px">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="道岔名称" label-width="80px">
<el-input v-model="switchName" size="small" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
highlight-current-row height="200">
<el-table-column prop="order" :width="50" label="序号">
</el-table-column>
<el-table-column prop="date" :width="160" label="时间">
</el-table-column>
<el-table-column prop="context" :width="180" label="执行过程">
</el-table-column>
<el-table-column prop="result" label="执行结果">
</el-table-column>
</el-table>
<span class="notice">{{message}}</span>
<el-row class="button-group">
<el-col :span="2" :offset="2">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdClose" @click="close">关闭</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date';
export default {
name: 'SwitchCmdControl',
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: '',
switchName: ''
}
},
computed: {
typeList() {
return [
{ code: OperationEvent.Switch.unlock.menu.operation, name: '道岔单解' },
{ code: OperationEvent.Switch.unblock.menu.operation, name: '道岔解封' },
{ code: OperationEvent.Switch.fault.menu.operation, name: '道岔故障解锁' },
{ code: OperationEvent.Switch.axlePreReset.menu.operation, name: '道岔计轴预复位' },
]
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
return OperationEvent.Switch.unlock.order.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
return OperationEvent.Switch.unblock.order.domId;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
return OperationEvent.Switch.fault.order.domId;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
return OperationEvent.Switch.axlePreReset.order.domId;
}
}
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
return OperationEvent.Switch.unlock.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
return OperationEvent.Switch.unblock.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
return OperationEvent.Switch.fault.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
return OperationEvent.Switch.axlePreReset.confirm1.domId;
}
}
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
return OperationEvent.Switch.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
return OperationEvent.Switch.unblock.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
return OperationEvent.Switch.fault.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
return OperationEvent.Switch.axlePreReset.confirm2.domId;
}
}
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
return OperationEvent.Switch.unlock.stop.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
return OperationEvent.Switch.unblock.stop.domId;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
return OperationEvent.Switch.fault.stop.domId;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
return OperationEvent.Switch.axlePreReset.stop.domId;
}
}
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
return '道岔单解';
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
return '道岔解封';
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
return '道岔故障解锁';
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
return '道岔计轴复位';
}
}
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && 1 <= index && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000)
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.switchName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.switchName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.order = 0;
this.operation = operate.operation;
this.dialogShow = true;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.stpDisabled = true;
this.setMessage('请点击“下达”按钮,下达命令!');
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
command() {
/** 道岔单解/道岔解封/道岔故障解锁/道岔计轴复位*/
if (this.operation == OperationEvent.Switch.unlock.menu.operation ||
this.operation == OperationEvent.Switch.unblock.menu.operation ||
this.operation == OperationEvent.Switch.fault.menu.operation ||
this.operation == OperationEvent.Switch.axlePreReset.menu.operation ||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
} else {
/** 第一步带弹框处理*/
this.commandHasPopUp();
}
},
commandHasPopUp() {
},
commandNoPopUp() {
let operate = {
type: MapDeviceType.Switch.type
}
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.order.operation
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.order.operation
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.order.operation
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.order.operation;
}
this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
})
},
confirm1() {
let operate = {
type: MapDeviceType.Switch.type,
}
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.confirm1.operation
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm1.operation;
}
this.setMessage('请点击“确认2”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
})
},
confirm2() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
}
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.confirm2.operation
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
})
},
stop() {
let operate = {
type: MapDeviceType.Switch.type,
}
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.stop.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.stop.operation;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.stop.operation
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
}
}).catch(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
})
},
close() {
let operate = {
type: MapDeviceType.Switch.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
},
getOperate(operate) {
/** 弹框返回值处理*/
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
})
}
}
}
</script>

View File

@ -1,259 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm switch-control" :title="title" :visible.sync="show" width="300px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="11"><span>车站名称</span></el-col>
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="switchName" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'SwitchControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: '',
stationName: '',
switchName: '',
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
return '道岔单锁';
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
return '道岔封锁';
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
return '道岔转动';
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
return '道岔强扳';
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
return '区段切除'
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
return '区段激活'
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.switchName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.switchName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
/** 道岔单锁*/
this.lock();
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
/** 道岔封锁*/
this.block();
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
/** 道岔转动*/
this.turnout(this.operation);
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
/** 道岔强扳*/
this.turnoutForce();
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
/** 区段激活*/
this.split();
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
/** 区段激活*/
this.active();
}
},
//
lock() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.lock.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
block() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.block.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
turnout(operation) {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.turnout.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
turnoutForce() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.turnoutForce.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
split() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.split.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
active() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.active.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
type: MapDeviceType.Switch.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

View File

@ -1,176 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="340px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
<div style="width: 96%;display:flex;flex-dorection:row">
<!-- <el-form-item label="车 组 号:" label-width="95px" prop="tripNumber">
<el-input v-model="addModel.tripNumber" disabled></el-input>
</el-form-item> -->
<el-form-item label="车 次 号:" label-width="95px" prop="trainSource">
<el-input v-model="addModel.trainSource" :id="domIdTrainSource" @change="handerTrainSource"></el-input>
</el-form-item>
</div>
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
export default {
// name: 'TrainMove',
name: 'TrainAddPlan',
components: {
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
tripNumber: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
},
rules: {
// tripNumber: [
// { required: true, message: '', trigger: 'blur' }
// ],
trainSource: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
// stationStandSource: [
// { required: true, message: '', trigger: 'change' }
// ],
// trainGoal: [
// { required: true, message: '', trigger: 'blur' }
// ],
// stationStandGoal: [
// { required: true, message: '', trigger: 'change' }
// ],
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
},
domIdTrainSource() {
// return this.dialogShow ? OperationEvent.Train.trainSource.menu.domId : '';
return this.dialogShow ? OperationEvent.Train.setPlanTrainId.menu.domId : '';
},
title() {
return '添加计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
type: MapDeviceType.Train.type,
// operation: OperationEvent.Train.moveTrainId.menu.operation,
operation: OperationEvent.Train.addPlanTrainId.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
},
handerTrainSource() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.trainSource.menu.operation,
val: this.addModel.trainSource
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
}
</script>
<style scoped>
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,155 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm route-create"
:title="title"
:visible.sync="show"
width="580px"
label-position="top"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<el-form size="small" label-width="100px">
<el-form-item label="列车:" prop="trainCode">
<el-select v-model="trainCode" filterable placeholder="列车">
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.groupNumber"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="列车方向:" prop="direction">
<el-select v-model="direction" filterable placeholder="列车方向">
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
</el-select>
</el-form-item>
</el-form>
<el-row>
<el-col style="text-align: right;">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</div>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteCreate',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
trainList: [],
trainNoList: [],
directionList: [
{
value: '2',
label: '上行'
},
{
value: '1',
label: '下行'
}
],
trainCode: '',
tripNumber: '',
direction: '',
selected: null
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return OperationEvent.Section.newtrain.menu.domId;
},
title() {
return '设置列车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.dialogShow = true;
this.selected = selected;
/** 加载列车数据*/
this.loadInitData(this.map);
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.trainCode = '';
this.direction = '';
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
const operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.newtrain.menu.operation,
val: '' + this.direction + '::' + this.trainCode
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
type: MapDeviceType.Section.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
};
</script>

View File

@ -1,172 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm train-define" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="12">车站</el-col>
<el-col :span="11" :offset="1">车次窗</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
</el-col>
<el-col :span="11" :offset="1">
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="12">新车组号</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.tripNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainDefine',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
tripNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
},
title() {
return '定义车组号'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.input.operation,
val: this.addModel.tripNumber
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.menu.operation,
val: this.addModel.tripNumber
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
/deep/ .el-row {
margin: 10px
}
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,169 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-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="90px" :model="addModel" :rules="rules">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
// import { getPublishMapTrainNos } from '@/api/runplan';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'TrainDelete',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
groupNumber: ''
},
rules: {
groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.delTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
},
title() {
return '删除车组号';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
if (map) {
// getPublishMapTrainNos(map.skinCode).then(response => {
// this.trainNoList = response.data;
// }).catch(() => {
// this.$messageBox(``);
// });
}
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
inputGroupNumber() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.delTrainId.input.operation,
val: this.addModel.groupNumber
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.delTrainId.menu.operation,
val: this.addModel.groupNumber
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -1,165 +0,0 @@
<template>
<!-- <el-dialog class="fuzhou_01 stand-stop-time" :title="title" :visible.sync="show" width="640px" :before-close="doClose" :zIndex="2000" -->
<el-dialog class="beijing-01__systerm train-set-plan" :title="title" :visible.sync="show" width="380px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
<div style="overflow: hidden;">
<div style="width: 98%; float: left; padding: 10px 15px; margin: 20px 0px; height: 120px;">
<!-- <span class="base-label">目的</span> -->
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandGoal">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车 次 号:" prop="trainGoal" style="width:280px">
<el-input v-model="addModel.trainGoal"></el-input>
</el-form-item>
</div>
</div>
</div>
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'TrainMove',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
// trainNo: '',
trainSource: '',
// stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
},
rules: {
// trainNo: [
// { required: true, message: '', trigger: 'blur' }
// ],
trainSource: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
// stationStandSource: [
// { required: true, message: '', trigger: 'change' }
// ],
trainGoal: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: '请选择车站', trigger: 'change' }
],
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
},
title() {
return '删除计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
type: MapDeviceType.Train.type,
// operation: OperationEvent.Train.moveTrainId.menu.operation,
operation: OperationEvent.Train.deletePlanTrainId.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.fuzhou_01 .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,172 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm train-edit" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="12">新车组号</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="12">车站</el-col>
<el-col :span="11" :offset="1">车次窗</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
</el-col>
<el-col :span="11" :offset="1">
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainEdit',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
groupNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return '修改计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.input.operation,
val: this.addModel.groupNumber
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.groupNumber
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
/deep/ .el-row {
margin: 10px
}
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,151 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm train-flag" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="12">车组号:</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.groupNumber"></el-input>
</el-col>
</el-row>
<el-row style="margin-top: 15px; margin-bottom: 30px">
<el-col :span="24">
<el-radio-group v-model="addModel.type" :disabled="true">
<el-radio label="01">备选项</el-radio>
<el-radio label="02">备选项</el-radio>
</el-radio-group>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainFlag',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
type: '01',
groupNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return 'ATP切除功能'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.tripNumber
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
/deep/ .el-row {
margin: 10px
}
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,172 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm train-move" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="12">车组号</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="12">车站</el-col>
<el-col :span="11" :offset="1">车次窗</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
</el-col>
<el-col :span="11" :offset="1">
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainMove',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
groupNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
},
title() {
return '平移车组号'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.input.operation,
val: this.addModel.groupNumber
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.menu.operation,
val: this.addModel.groupNumber
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
/deep/ .el-row {
margin: 10px
}
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,185 +0,0 @@
<template>
<!-- <el-dialog class="fuzhou_01 stand-stop-time" :title="title" :visible.sync="show" width="640px" :before-close="doClose" :zIndex="2000" -->
<el-dialog class="beijing-01__systerm train-set-plan" :title="title" :visible.sync="show" width="640px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
<!-- <div style="width: 46%;">
<el-form-item label="车 组 号:" label-width="95px" prop="trainNo">
<el-input v-model="addModel.trainNo" disabled></el-input>
</el-form-item>
</div> -->
<div style="overflow: hidden;">
<div style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;">
<span class="base-label"></span>
<div style="position: relative; top:-10px;">
<!-- <el-form-item prop="stationStandSource">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="车 次 号:" prop="trainSource">
<el-input v-model="addModel.trainSource"></el-input>
</el-form-item>
</div>
</div>
<div style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">目的</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandGoal">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车 次 号:" prop="trainGoal">
<el-input v-model="addModel.trainGoal"></el-input>
</el-form-item>
</div>
</div>
</div>
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'TrainMove',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
// trainNo: '',
trainSource: '',
// stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
},
rules: {
// trainNo: [
// { required: true, message: '', trigger: 'blur' }
// ],
trainSource: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
// stationStandSource: [
// { required: true, message: '', trigger: 'change' }
// ],
trainGoal: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: '请选择车站', trigger: 'change' }
],
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
},
title() {
return '平移计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
type: MapDeviceType.Train.type,
// operation: OperationEvent.Train.moveTrainId.menu.operation,
operation: OperationEvent.Train.moveEventlyTrainId.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.fuzhou_01 .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,172 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm train-set-head" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="12">车组号</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="12">目的地号</el-col>
<el-col :span="11" :offset="1">车次号</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.targetCode" :disabled="true"></el-input>
</el-col>
<el-col :span="11" :offset="1">
<el-input v-model="addModel.tripNumber" :disabled="true"></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainSetHead',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
groupNumber: '',
targetCode: '',
tripNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return '设置头码车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.input.operation,
val: this.addModel.groupNumber
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.groupNumber
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
/deep/ .el-row {
margin: 10px
}
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,156 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm train-set-plan" :title="title" :visible.sync="show" width="360px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="12">车组号</el-col>
<el-col :span="11" :offset="1">车次号</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.groupNumber"></el-input>
</el-col>
<el-col :span="11" :offset="1">
<el-input v-model="addModel.tripNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainSetPlan',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
groupNumber: '',
tripNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return '设置计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.input.operation,
val: this.addModel.tripNumber
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.tripNumber
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
/deep/ .el-row {
margin: 10px
}
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,156 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm train-set-work" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="6">车组号:</el-col>
<el-col :span="18">
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainSetWork',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
groupNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return '设置人工车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.input.operation,
val: this.addModel.tripNumber
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.tripNumber
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
/deep/ .el-row {
margin: 10px
}
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,369 +0,0 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<template v-show="isShowAll">
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-button ref="menuButton" />
<menu-station-control ref="menuStationControl" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" />
<menu-limit ref="menuLimit" :selected="selected" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" />
<passive-Timeout ref="passiveTimeout" />
</template>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuStationControl from './menuStationControl';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './menuBar';
import MenuLimit from './menuLimit';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from './passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'Menus',
components: {
MenuBar,
MenuButton,
MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationControl,
MenuStationStand,
MenuStation,
MenuTrain,
MenuLimit,
PassiveAlarm,
PassiveContorl,
PassiveTimeout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
computed: {
...mapGetters('config', [
'width'
]),
isShowAll() {
return this.$route.params.mode !== 'dp' &&
this.$route.params.mode !== 'plan' &&
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() {
return this.$store.state.training.prdType;
}
},
watch: {
isShowBar(val) {
val && this.$store.dispatch('config/updateMenuBar');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.beijing-01__systerm {
overflow: hidden !important;
}
.beijing-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.beijing-01__systerm .el-dialog .el-dialog__header {
padding: 10px;
height: 26px;
}
.beijing-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.beijing-01__systerm .el-dialog .el-dialog__body {
padding: 10px;
margin: 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.beijing-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 6px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.beijing-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
filter: blur(7px);
height: 20px;
width: -webkit-fill-available;
background: rgba(190, 190, 190, 0.8);
z-index: -1;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 5px;
right: 5px;
line-height: 18px;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.beijing-01__systerm .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #F0F0F0;
}
.beijing-01__systerm .el-dialog .expand {
width: 120px;
}
.beijing-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.beijing-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.beijing-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.beijing-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.beijing-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.beijing-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.beijing-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.beijing-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.beijing-01__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.beijing-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.beijing-01__systerm .el-dialog .el-table th.is-leaf {
background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.beijing-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.beijing-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.beijing-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.beijing-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.beijing-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.beijing-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.beijing-01__systerm .el-dialog .table {
margin-top: 10px;
}
.beijing-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.beijing-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,389 +0,0 @@
<template>
<div v-if="isShowBtn" class="menu" style="height: 45px;" :style="{left: point.x+'px', top: point.y+'px' }">
<button
:id="Signal.arrangementRoute.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Signal.arrangementRoute.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Signal.cancelTrainRoute.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Signal.cancelTrainRoute.button.operation)"
>
<span style="color: black">
<center>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Signal.humanTrainRoute.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Signal.humanTrainRoute.button.operation)"
>
<span style="color: red">
<center>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Signal.reopenSignal.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Signal.reopenSignal.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Signal.guide.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Signal.guide.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
id="mbm_06"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown('mbm_06')"
>
<span style="color: red">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Switch.locate.button.domId"
:style="{display: 'block', float: 'left', width: width+'px',backgroundColor:buttonUpColor}"
@click="buttonDown(Switch.locate.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Switch.reverse.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Switch.reverse.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Switch.lock.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Switch.lock.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Switch.unlock.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Switch.unlock.button.operation)"
>
<span style="color: red">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Signal.setAutoInterlock.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Signal.setAutoInterlock.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Section.fault.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Section.fault.button.operation)"
>
<span style="color: black">
<center>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Section.axlePreReset.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Section.axlePreReset.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
id="mbm_11"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown('mbm_11')"
>
<span style="color: black">
<center>
<b style="color:deepskyblue"></b>
<b style="color:burlywood"></b>
</center>
<center>
<b style="color: red"></b>
<b style="color:forestgreen"></b>
</center>
</span>
</button>
<button
id="mbm_12"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown('mbm_12')"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
</div>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import OperateHandler from '@/scripts/plugin/OperateHandler';
export default {
name: 'MapButtonMenu',
data() {
return {
point: {
x: -1000,
y: -1000
},
operation: '0',
buttonName: '',
buttonDownColor: '#A8A8A8',
buttonUpColor: '#DCDCDC',
width: 58,
tempData: null,
offset: {}
};
},
computed: {
Switch() {
return OperationEvent.Switch;
},
Section() {
return OperationEvent.Section;
},
Signal() {
return OperationEvent.Signal;
},
isShowBtn() {
return this.$store.state.training.prdType == '01';
}
},
watch: {
'$store.state.config.canvasOffsetCount': function (val) {
this.resetPosition();
},
'$store.state.menuOperation.buttonOperation': function (val, old) {
this.updateButtonShow(val, old);
},
'$store.state.menuOperation.selectedCount': function (val) {
this.selectedChange();
}
},
mounted() {
this.resetPosition();
},
methods: {
resetPosition() {
this.$nextTick(() => {
const canvasOffset = this.$store.state.config.canvasOffset;
this.point = {
x: canvasOffset.x + 20,
y: canvasOffset.y + this.$store.state.config.height - 65
};
this.$store.dispatch('training/tipReload');
});
},
updateButtonShow(val, old) {
if (old) {
//
const domId = getDomIdByOperation(old);
const dom = document.getElementById(domId);
if (dom) {
dom.disabled = false;
dom.style.backgroundColor = this.buttonUpColor;
}
}
if (val) {
//
const domId = getDomIdByOperation(val);
const dom = document.getElementById(domId);
if (dom) {
dom.disabled = true;
dom.style.backgroundColor = this.buttonDownColor;
}
}
},
buttonDown(operation) {
const operate = {
type: 'mbm',
operation: operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/setButtonOperation', operation); //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('training/emitTipFresh');
}
});
},
selectedChange() {
//
if (this.$store.state.menuOperation.buttonOperation) {
const model = this.$store.state.menuOperation.selected;
if (model) {
const deviceType = MapDeviceType[model._type];
const operate = {
send: true,
model: model,
code: model.code,
type: deviceType.type,
operation: this.$store.state.menuOperation.buttonOperation,
tempData: this.tempData
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
if (response) {
this.tempData = response.data;
}
}
});
} else {
OperateHandler.cleanOperates();
this.$store.dispatch('menuOperation/setButtonOperation', null);
}
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
$bg: #fff;
$hoverBg: #f5f7fa;
.menu {
background-color: $bg;
position: fixed;
border: 1px solid gray;
z-index: 10;
display: block;
.dsp-block {
display: block;
text-align: center;
border-radius: unset;
width: 100%;
}
.dsp-block:hover {
background-color: $hoverBg;
}
}
</style>

View File

@ -1,149 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
import { runDiagramQuit } from '@/api/simulation';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [],
menuScreen: [
{
label: '放大地图',
handler: this.magnifyMap,
disabled: false
},
{
label: '缩小地图',
handler: this.shrinkMap,
disabled: false
},
{
label: '返回',
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
isScreen() { //
return this.$route.params.mode === 'dp' ||
this.$store.state.training.roles == 'BigScreen';
},
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) {
if (!this.isScreen && this.menu && this.menu.length > 1) {
this.menu[0].disabled = true;
this.menu[1].disabled = !((this.menu[1] && val));
}
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal = [];
// this.stationList.forEach(station => {
// if (station.code === station.concentrateStationCode) {
// let node = {
// label: station.name,
// children: []
// }
//
// this.stationList.forEach(elem => {
// if (elem.visible) {
// let next = elem;
// while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
// next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
// }
//
// if (station.code == next.code) {
// node.children.push({
// code: elem.code,
// label: elem.name,
// handler: this.mapLocation,
// });
// }
// }
// })
//
// this.menuNormal.push(node);
// }
// });
if (this.isScreen) {
this.menu = [...this.menuScreen];
}
// else {
// this.menu = [...this.menuNormal];
// }
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
await runDiagramQuit(this.group);
EventBus.$emit('trainingSubscribeStop');
history.go(-1);
exitFullscreen();
}
}
};
</script>

View File

@ -1,120 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm two-confirmation" title="二次确认" :visible.sync="show" width="360px"
:before-close="doClose" :showClose="false" :zIndex="2000" :modal="false" :close-on-click-modal="false"
append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span> {{message}}</span><br>
</template>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="3">
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo'
export default {
name: 'TwoConfirmation',
data() {
return {
dialogShow: false,
loading: false,
operation: '',
operate: '',
timer: null
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdConfirm() {
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.emergencyStationControl)) {
return OperationEvent.StationControl.emergencyStationControl.confirm.domId;
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
return OperationEvent.StationControl.requestStationControl.confirm.domId;
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
return OperationEvent.StationControl.requestCentralControl.confirm.domId;
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
messages() {
if (this.operate) {
return this.operate.messages;
}
return []
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = this.operate.operation;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
})
},
commit() {
let operate = {
send: true,
type: this.operate.type,
val: this.operate.val,
}
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.emergencyStationControl)) {
operate.operation = OperationEvent.StationControl.emergencyStationControl.confirm.operation;
}
this.doClose();
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}, 1000).catch((error) => {
this.$refs.noticeInfo.doShow(operate);
});
}
}
}
</script>

View File

@ -1,162 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm user-add" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
<el-form-item label="工号:" prop="jobNumber">
<el-input v-model="model.jobNumber"></el-input>
</el-form-item>
<el-form-item label="用户名:" prop="userName">
<el-input v-model="model.userName"></el-input>
</el-form-item>
<el-form-item label="密码:" prop="password">
<el-input type="password" v-model="model.password"></el-input>
</el-form-item>
<el-form-item label="确认密码:" prop="confirm">
<el-input type="password" v-model="model.confirm"></el-input>
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'UserAdd',
components: {
},
data() {
return {
operate: {},
operation: null,
dialogShow: false,
loading: false,
model: {
type: 'ADD',
jobNumber: '',
userName: '',
password: '',
confirm: '',
},
rules: {
jobNumber: [
{ required: true, message: '请输入工号', trigger: 'blur' }
],
userName: [
{ required: true, message: '请输入用户名', trigger: 'blur' }
],
password: [
{ required: true, message: '请输入密码', trigger: 'change' }
],
confirm: [
{ required: true, message: '请再次输入密码', trigger: 'change' }
],
},
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return '增加用户'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.$nextTick(() => {
this.$refs.form.resetFields();
});
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
if (this.model.password === this.model.confirm) {
this.doClose();
this.$emit('operateUser', this.model);
} else {
this.$messageBox('二次输入密码不一致');
}
}
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); this.model });
}
}
}
</script>
<style scoped>
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,134 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm user-delete" :title="title" :visible.sync="show" width="260px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="padding-left: 10px; padding-bottom: 10px">
<i class="el-icon-info"></i>
<template v-for="message in messages">
<span>{{message}}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="3">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="2">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'UserDelete',
components: {
},
data() {
return {
operate: {},
messages: [],
model: {
type: 'DELETE',
jobNumber: '',
userName: '',
},
operation: null,
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return '删除用户'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.messages = operate.messages;
this.model.userName = '';
this.model.jobNumber = '';
if (selected) {
this.model.userName = selected.userName;
this.model.jobNumber = selected.jobNumber;
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.model.userName && this.model.jobNumber) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$emit('operateUser', this.model);
}
})
} else {
this.$messageBox('选择的用户名或工号为空');
}
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,178 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm user-edit" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
<el-form-item label="工号:" prop="jobNumber">
<el-input v-model="model.jobNumber" disabled></el-input>
</el-form-item>
<el-form-item label="用户名:" prop="userName">
<el-input v-model="model.userName" disabled></el-input>
</el-form-item>
<el-form-item label="原始密码:" prop="oldPassword">
<el-input type="oldPassword" v-model="model.oldPassword"></el-input>
</el-form-item>
<el-form-item label="密码:" prop="password">
<el-input type="password" v-model="model.password"></el-input>
</el-form-item>
<el-form-item label="确认密码:" prop="confirm">
<el-input type="password" v-model="model.confirm"></el-input>
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'UserEdit',
components: {
},
data() {
return {
operate: {},
selected: {},
operation: null,
dialogShow: false,
loading: false,
model: {
type: 'EDIT',
jobNumber: '',
userName: '',
oldPassword: '',
password: '',
confirm: '',
},
rules: {
jobNumber: [
{ required: true, message: '请输入工号', trigger: 'blur' }
],
userName: [
{ required: true, message: '请输入用户名', trigger: 'blur' }
],
oldPassword: [
{ required: true, message: '请输入原始密码', trigger: 'change' }
],
password: [
{ required: true, message: '请输入新密码', trigger: 'change' }
],
confirm: [
{ required: true, message: '请再次输入新密码', trigger: 'change' }
],
},
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return '用户编辑页面'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.$nextTick(() => {
this.$refs.form.resetFields();
this.selected = selected;
if (selected) {
this.model.jobNumber = selected.jobNumber;
this.model.userName = selected.userName;
}
});
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid)
if (this.selected.password !== this.model.oldPassword) {
this.$messageBox('原始密码错误');
} else if (this.model.password !== this.model.confirm) {
this.$messageBox('二次输入的密码错误');
} else if (this.model.oldPassword === this.model.password) {
this.$messageBox('老密码和新密相同');
} else {
this.doClose();
this.$emit('operateUser', this.model);
}
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,192 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm station-control"
:title="title"
:visible.sync="show"
width="400px"
:before-close="doClose"
:show-close="true"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-radio-group v-model="control" :disabled="true">
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
<el-radio :label="item" disabled="false">{{ controlProps[item] }}</el-radio>
</el-row>
</el-radio-group>
<el-row type="flex" justify="center" class="button-group">
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
</el-button>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'StationStand',
components: {
NoticeInfo
},
data() {
return {
operate: null,
dialogShow: false,
disabledClose: false,
disabledCommit: false,
control: '01',
controlProps: {
'01': '全线扣车',
'02': '取消全线扣车'
}
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
...mapGetters('training', [
'mode',
'started'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
return '全线扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
return '取消全线扣车';
}
}
},
domIdCommit() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
}
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
// 线
this.control = '01';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
// 线
this.control = '02';
}
this.dialogShow = true;
this.$store.dispatch('training/emitTipFresh');
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: 'bar',
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
//
handleCommit() {
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
// 线
this.setDetainTrainAll();
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
// 线
this.cancelDetainTrainAll();
}
},
// 线
setDetainTrainAll() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setDetainTrainAll.menu.operation,
val: this.control,
messages: ['确认设置全线扣车!']
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.disabledSure = false;
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
// 线
cancelDetainTrainAll() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
val: this.control,
messages: ['确认取消全线扣车!']
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.disabledSure = false;
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ .el-radio {
color: #000;
font-weight: bold;
}
</style>

View File

@ -1,183 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm station-control" :title="title" :visible.sync="show" width="400px"
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
v-dialogDrag>
<el-radio-group v-model="control" :disabled="true">
<el-row style="padding-bottom: 10px;padding-top:10px" v-for="item in Object.keys(controlProps)" :key="item">
<el-radio :label="item">{{controlProps[item]}}</el-radio>
</el-row>
</el-radio-group>
<el-row type="flex" justify="center" class="button-group">
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel" style="margin-left: 200px">退出
</el-button>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo'
export default {
name: 'StationStand',
components: {
NoticeInfo
},
data() {
return {
operate: null,
dialogShow: false,
disabledClose: false,
disabledCommit: false,
control: '01',
controlProps: {
'01': '取消上行扣车',
'02': '取消下行扣车',
},
}
},
computed: {
...mapGetters('map', [
'stationList'
]),
...mapGetters('training', [
'mode',
'started'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
return '取消上行扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
return '取消下行扣车';
}
}
},
domIdCommit() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId;
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId;
}
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
// 线
this.control = '01'
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
// 线
this.control = '02'
}
this.dialogShow = true;
this.$store.dispatch('training/emitTipFresh');
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: 'bar',
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
})
},
//
handleCommit() {
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
// 线
this.cancelUpDetainTrainAll();
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
// 线
this.cancelDownDetainTrainAll();
}
},
// 线
cancelUpDetainTrainAll() {
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelUpDetainTrainAll.menu.operation,
val: this.control,
messages: ['确认取消全线上行扣车!'],
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.disabledSure = false;
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
// 线
cancelDetainTrainAll() {
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDownDetainTrainAll.menu.operation,
val: this.control,
messages: ['确认取消全线下行扣车!'],
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.disabledSure = false;
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ .el-radio {
color: #000;
font-weight: bold;
}
</style>

View File

@ -1,131 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm manage-user" :title="title" :visible.sync="show" width="600px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="height: 70px;">
<div style="position: relative; left: 10px;">
</div>
<div style="position: relative; left: 80px;">
<div style="width:100%">
<span style="padding-left: 60px">ControlMonitor 1.3.5.0</span>
<el-button style="position: absolute; right: 95px;" :id="domIdConfirm" type="primary"
:loading="loading" @click="commit">确定</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span> 版权所有C2010-2011 北京玖琏科技有限公司</span>
</div>
</div>
</div>
<div style="padding: 10px; margin: 5px; ">
<el-table :data="tableData" style="width: 100%;" height="400">
<el-table-column prop="moduleName" label="模块名称" width="180">
</el-table-column>
<el-table-column prop="version" label="版本" width="180">
</el-table-column>
<el-table-column prop="updateDate" label="修改日期">
</el-table-column>
</el-table>
</div>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'ManageUser',
data() {
return {
tableData: [
{
moduleName: '主程序版本:',
version: '123',
updateDate: '123'
}
],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null,
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return '关于ControlMonitor'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
})
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,290 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm manage-user" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
<span class="base-label">用户列表</span>
<el-row>
<el-col :span="18">
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%"
height="450" center size="mini" highlight-current-row @row-click="chooseUser">
<el-table-column prop="jobNumber" label="工号" width="120">
<template slot-scope="scope">
<span>{{scope.row.jobNumber}}</span>
</template>
</el-table-column>
<el-table-column prop="userName" label="用户名">
<template slot-scope="scope">
<span>{{scope.row.userName}}</span>
</template>
</el-table-column>
<el-table-column width="20">
</el-table-column>
</el-table>
</el-col>
<el-col :span="4">
<el-button style="margin-top: 140px; margin-left: 10px;" :id="domIdFreshUser" @click="freshUser">刷新
</el-button>
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdAddUser" @click="addUser">增加
</el-button>
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdEditUser" @click="editUser">修改
</el-button>
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdDelUser" @click="delUser">删除
</el-button>
</el-col>
</el-row>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<user-add ref="userAdd" @operateUser="operateUser"></user-add>
<user-edit ref="userEdit" @operateUser="operateUser"></user-edit>
<user-delete ref="userDelete" @operateUser="operateUser"></user-delete>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import UserAdd from './childDialog/userAdd';
import UserEdit from './childDialog/userEdit';
import UserDelete from './childDialog/userDelete';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'ManageUser',
components: {
UserAdd,
UserEdit,
UserDelete
},
data() {
return {
tableData: [],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdAddUser() {
return this.dialogShow ? OperationEvent.Command.manage.addUser.domId : '';
},
domIdEditUser() {
return this.dialogShow ? OperationEvent.Command.manage.editUser.domId : '';
},
domIdDelUser() {
return this.dialogShow ? OperationEvent.Command.manage.delUser.domId : '';
},
domIdFreshUser() {
return this.dialogShow ? OperationEvent.Command.manage.freshUser.domId : '';
},
domIdChooseUser() {
return this.dialogShow ? OperationEvent.Command.manage.chooseUser.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return '用户管理'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
//
addUser() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.addUser.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userAdd.doShow(operate);
}
}).catch(error => {
this.loading = false;
})
},
//
editUser() {
if (this.selected) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.editUser.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userEdit.doShow(operate, this.selected);
}
}).catch(error => {
this.loading = false;
})
} else {
this.$messageBox('请先选择用户');
}
},
//
delUser() {
if (this.selected) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.delUser.operation,
messages: [`你确定删除用户${this.selected.userName}吗?`]
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userDelete.doShow(operate, this.selected);
}
}).catch(error => {
this.loading = false;
})
} else {
this.$messageBox('请先选择用户');
}
},
//
freshUser() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.freshUser.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
}).catch(error => {
this.loading = false;
})
},
//
chooseUser(row) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.chooseUser.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.selected = row;
}).catch(error => {
this.loading = false;
})
},
commit() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
})
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
},
//
operateUser(data) {
if (data && data.type === 'ADD') {
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
if (index < 0) {
this.tableData.push({
jobNumber: data.jobNumber,
userName: data.userName,
password: data.password
});
} else {
this.$messageBox('添加失败,存在相同工号的用户');
}
} else if (data && data.type === 'EDIT') {
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
if (index >= 0) {
this.tableData[index].password = data.password;
this.tableData[index].userName = data.userName;
} else {
this.$messageBox('修改失败');
}
} else if (data && data.type === 'DELETE') {
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
if (index >= 0) {
this.tableData.splice(index, 1);
} else {
this.$messageBox('删除失败');
}
}
}
}
}
</script>
<style scoped>
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,237 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm station-control" title="控制模式转换" :visible.sync="show" width="400px"
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
v-dialogDrag>
<el-row> 集中站 </el-row>
<el-row style="margin-bottom: 20px">
<el-select v-model="stationCode" filterable placeholder="请选择" style="width: 100%;" :id="domIdChooseStation"
@change="handleChooseChangeStation">
<el-option v-for="item in stationList" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-row>
<el-radio-group v-model="stationType" :id="domIdChooseControl">
<el-row style="padding-bottom: 10px" v-for="item in Object.keys(controlProps)" :key="item">
<el-radio :label="item" @change="handleChooseChangeControl">
{{controlProps[item]}}</el-radio>
</el-row>
</el-radio-group>
<el-row type="flex" justify="center" class="button-group">
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel" style="margin-left: 200px">退出
</el-button>
</el-row>
<two-confirmation ref="twoConfirmation"></two-confirmation>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import TwoConfirmation from './childDialog/twoConfirmation';
export default {
name: 'StationControl',
data() {
return {
operate: null,
dialogShow: false,
disabledClose: false,
disabledCommit: false,
stationType: '01',
stationCode: '',
controlProps: {
'03': '紧急站控',
'02': '站控',
'01': '遥控',
},
}
},
components: {
TwoConfirmation
},
computed: {
...mapGetters('map', [
'stationList'
]),
...mapGetters('training', [
'mode',
'started'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdChooseControl() {
return this.dialogShow ? OperationEvent.Command.order.choose.domId : '';
},
domIdChooseStation() {
return this.dialogShow ? OperationEvent.Command.order.choose1.domId : '';
},
domIdCommit() {
if (this.dialogShow) {
if (this.stationType == '01') {
return OperationEvent.StationControl.requestCentralControl.menu.domId;
} else if (this.stationType == '02') {
return OperationEvent.StationControl.requestStationControl.menu.domId;
} else if (this.stationType == '03') {
return OperationEvent.StationControl.emergencyStationControl.menu.domId;
}
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$store.dispatch('training/emitTipFresh');
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: 'bar',
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
})
},
handleChooseChangeStation() {
let operate = {
type: MapDeviceType.StationControl.type,
operation: OperationEvent.Command.order.choose1.operation,
val: this.stationCode,
}
// if (this.stationType == '01') {
// operate.operation = OperationEvent.StationControl.requestCentralControl.choose1.operation
// } else if (this.stationType == '02') {
// operate.operation = OperationEvent.StationControl.requestStationControl.choose1.operation
// } else if (this.stationType == '03') {
// operate.operation = OperationEvent.StationControl.emergencyStationControl.choose1.operation
// }
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
handleChooseChangeControl() {
let operate = {
type: MapDeviceType.StationControl.type,
operation: OperationEvent.Command.order.choose.operation,
val: this.stationCode,
}
// if (this.stationType == '01') {
// operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation
// } else if (this.stationType == '02') {
// operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation
// } else if (this.stationType == '03') {
// operate.operation = OperationEvent.StationControl.emergencyStationControl.choose.operation
// }
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
//
handleCommit() {
if (this.stationType == '01') {
//
this.conterCommit();
} else if (this.stationType == '02') {
//
this.requestCommit();
} else if (this.stationType == '03') {
//
this.emergencyCommit();
}
},
//
conterCommit() {
let operate = {
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
messages: ['确认将如下操作区域的控制模式由站控转为中控:'],
val: `${this.stationCode}::`,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
})
},
//
requestCommit() {
let operate = {
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
val: `${this.stationCode}::`,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch((error) => {
})
},
//
emergencyCommit() {
let operate = {
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
val: `${this.stationCode}::`,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
})
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ .el-radio {
color: #000;
font-weight: bold;
}
</style>

View File

@ -1,162 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">添加位置</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="前车车次号:" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber"></el-input>
</el-form-item>
</div>
</div>
<el-form-item label="添加车次号:" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber"></el-input>
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: '',
},
rules: {
groupNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
// trainNumberLimber: [
// { required: true, message: '', trigger: 'blur' }
// ],
stationStandCode: [
{ required: true, message: '请选择终端', trigger: 'change' }
],
},
operation: null,
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
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 '添加计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,149 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车 次 号:" prop="groupNumber">
<el-input v-model="addModel.groupNumber"></el-input>
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
},
rules: {
groupNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandCode: [
{ required: true, message: '请选择终端', trigger: 'change' }
],
},
operation: null,
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
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.delPlanTrain.domId : '';
},
title() {
return '删除计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.planTrain.delPlanTrain.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,152 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<el-form-item label="车 次 号:" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber"></el-input>
</el-form-item>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">目的</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车 次 号:" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber"></el-input>
</el-form-item>
</div>
</div>
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'TrainTranstalet',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: '',
},
rules: {
groupNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
trainNumberLimber: [
{ required: true, message: '请输入前车车次号', trigger: 'blur' }
],
stationStandCode: [
{ required: true, message: '请选择终端', trigger: 'change' }
],
},
operation: null,
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
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.translatPlanTrain.domId : '';
},
title() {
return '平移计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>

View File

@ -1,166 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm view-display"
title="设备显示设置"
:visible.sync="show"
width="240px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-checkbox-group v-model="deviceLevels">
<div>
<el-checkbox :label="1">车次窗</el-checkbox>
</div>
<div>
<el-checkbox :label="2">区段边界</el-checkbox>
</div>
<div>
<el-checkbox :label="3">联锁自动进路表示灯</el-checkbox>
</div>
<div>
<el-checkbox :label="4">ATS自动触发表示灯</el-checkbox>
</div>
</el-checkbox-group>
<el-row class="button-group">
<el-col :span="8" :offset="2">
<el-button :id="domIdConfirm" class="commit" type="primary" :loading="loading" @click="commit">确定
</el-button>
</el-col>
<el-col :span="8" :offset="3">
<el-button :id="domIdCancel" class="cancal" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
import deviceType from '@/jmap/constant/deviceType';
export default {
name: 'ViewDevice',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
deviceLevels: [2, 3, 4, 5]
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setDeviceDisplay();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: this.deviceLevels.sort().join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.setDeviceDisplay();
}
}).catch(() => {
this.loading = false;
});
},
setDeviceDisplay() {
let show = false;
let deviceList = [];
//
let borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
let sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { borderBorderShow })); //
});
}
//
let trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
let trainWindowList = this.$store.getters['map/trainWindowList'];
if (trainWindowList && trainWindowList.length > 0) {
trainWindowList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { trainWindowShow })); //
});
}
// ATS
let linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1;//
let atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1;// ATS
let signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
});
}
this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,256 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm view-name"
title="名称显示设置"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-checkbox-group v-model="nameLevels">
<el-row>
<el-col :span="10">
<el-checkbox :label="1">信号机名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="2">站台轨名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="4">折返轨名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="5">轨道名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="7">道岔名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="9">道岔区段名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="10">目的地名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="11">计轴区段名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="12">公里标</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewName',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12]
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setNameDisplay();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: this.nameLevels.sort().join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.setNameDisplay();
}
}).catch(() => {
this.loading = false;
});
},
setNameDisplay() {
const deviceList = [];
//
let nameShow = this.nameLevels.indexOf(1) !== -1;
const signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
});
}
//
nameShow = this.nameLevels.indexOf(3) !== -1;
//
nameShow = this.nameLevels.indexOf(7) !== -1; //
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; //
const switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) {
switchList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
});
}
//
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
const control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) {
control.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //
});
}
//
nameShow = false;
let standTrackNameShow = false;
let reentryTrackNameShow = false;
let transferTrackNameShow = false;
const sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
if (elem.isSwitchSection && elem.parentCode) {
//
nameShow = false;
} else {
if (elem.type === '01') {
nameShow = this.nameLevels.indexOf(11) !== -1;
} else if (elem.type === '02') {
//
nameShow = this.nameLevels.indexOf(5) !== -1;
} else if (elem.type === '03') {
//
nameShow = this.nameLevels.indexOf(9) !== -1;
}
}
//
if (elem.isStandTrack) {
standTrackNameShow = this.nameLevels.indexOf(2) !== -1;
}
//
if (elem.isReentryTrack) {
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1;
}
//
if (elem.isTransferTrack) {
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1;
}
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
});
}
//
const destCodeShow = this.nameLevels.indexOf(10) !== -1;
const stopPointList = this.$store.getters['map/stopPointList'];
if (stopPointList && stopPointList.length > 0) {
stopPointList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
});
}
//
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
const stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) {
stationList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //
});
}
this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
};
</script>

View File

@ -1,192 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm view-train-id"
title="列车识别号显示设置"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">表号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="5">目的地号+表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">目的地号+表号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">头码车显示模式</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="6" :offset="8">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setTrainDispaly();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.setTrainDispaly();
this.doClose();
}
}).catch(error => {
this.loading = false;
});
},
setTrainDispaly() {
const updatList = [];
const trainList = this.$store.getters['training/viewTrainList']();
if (trainList && trainList.length > 0) {
const nameFormat = this.trainNameFormatBy(this.planMode);
const nameFontSize = this.fontSize;
updatList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); //
});
this.$store.dispatch('map/updateMapDevices', updatList);
}
},
trainNameFormatBy(mode) {
switch (mode.toString()) {
case '1': return 'serviceNumber:tripNumber'; // +
case '2': return 'serviceNumber:groupNumber'; // +
case '3': return 'targetCode:tripNumber'; // +
case '4': return 'targetCode:groupNumber'; // +
case '5': return 'targetCode:serviceNumber:tripNumber'; // ++
case '6': return 'targetCode:serviceNumber:groupNumber'; // ++
}
return ''; //
}
}
};
</script>

View File

@ -1,120 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<cancel-all-limit ref="cancelAllLimit" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import CancelAllLimit from './dialog/cancelAllLimit';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState } from './utils/menuItemStatus';
export default {
name: 'MenuLimit',
components: {
PopMenu,
CancelAllLimit
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [{
label: '取消全线临时限速',
handler: this.cancelSpeed,
disabledCallback: '',
auth: { station: true, center: false }
}],
menuNormal: {
local: [
{
label: '取消全线临时限速',
handler: this.cancelSpeed,
disabledCallback: MenuDisabledState.Section.cancelSpeed,
auth: { station: true, center: false }
}
],
central: [
{
label: '取消全线临时限速',
handler: this.cancelSpeed,
disabledCallback: MenuDisabledState.Section.cancelSpeed,
auth: { station: false, center: true }
}
]
}
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu];
}
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
cancelSpeed() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.LimitControl.type,
label: MapDeviceType.LimitControl.label,
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.cancelAllLimit.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -1,413 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<section-cmd-control ref="sectionCmdControl" />
<speed-limit-control ref="speedLimitControl" />
<speed-cmd-control ref="speedCmdControl" />
<train-create ref="trainCreate" />
<alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SectionCmdControl from './dialog/sectionCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import SpeedLimitControl from './dialog/speedLimitControl';
import TrainCreate from './dialog/trainCreate';
import AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default {
name: 'SectionMenu',
components: {
PopMenu,
SectionControl,
SectionCmdControl,
SpeedLimitControl,
SpeedCmdControl,
TrainCreate,
AlxeEffective,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: '区段故障解锁',
handler: this.fault,
disabledCallback: MenuDisabledState.Section.fault,
auth: { station: true, center: false }
},
{
label: '区段激活',
handler: this.active,
disabledCallback: MenuDisabledState.Section.active,
auth: { station: true, center: false }
},
{
label: '区段切除',
handler: this.split,
disabledCallback: MenuDisabledState.Section.split,
auth: { station: true, center: false }
},
{
label: '区段计轴预复位',
handler: this.axlePreReset,
disabledCallback: MenuDisabledState.Section.axlePreReset,
auth: { station: true, center: false }
},
{
label: '区段封锁',
handler: this.lock,
disabledCallback: MenuDisabledState.Section.lock,
auth: { station: true, center: false }
},
{
label: '区段解封',
handler: this.unlock,
disabledCallback: MenuDisabledState.Section.unlock,
auth: { station: true, center: false }
},
{
label: '区段设置限速',
handler: this.setSpeed,
disabledCallback: MenuDisabledState.Section.setSpeed,
auth: { station: true, center: false }
}
],
central: [
{
label: '轨道激活',
handler: this.active,
disabledCallback: MenuDisabledState.Section.active,
auth: { station: false, center: true }
},
{
label: '轨道切除',
handler: this.split,
disabledCallback: MenuDisabledState.Section.split,
auth: { station: false, center: true }
},
{
type: 'separator'
},
{
label: '确认计轴有效',
handler: this.alxeEffective,
disabledCallback: MenuDisabledState.Section.alxeEffective,
auth: { station: false, center: true }
},
{
type: 'separator'
},
{
label: '设置临时限速',
handler: this.setSpeed,
disabledCallback: MenuDisabledState.Section.setSpeed,
auth: { station: false, center: true }
},
{
type: 'separator'
},
{
label: '查看站场设备状态',
handler: this.undeveloped,
disabledCallback: MenuDisabledState.Section.setSpeed,
auth: { station: false, center: true }
}
]
},
menuTrain: [
{
label: '新建列车',
handler: this.newTrain,
disabledCallback: MenuDisabledState.Section.newTrain
}
],
menuForce: [
{
label: '设置计轴失效',
handler: this.alxeFailure,
disabledCallback: MenuDisabledState.Section.alxeFailure
}
]
};
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
alxeFailure() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.alxeFailure.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
fault() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.fault.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionCmdControl.doShow(operate, this.selected);
}
});
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
//
split() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.split.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionControl.doShow(operate, this.selected);
}
});
},
alxeEffective() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.alxeEffective.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.alxeEffective.doShow(operate, this.selected);
}
});
},
//
active() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.active.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionControl.doShow(operate, this.selected);
}
});
},
//
axlePreReset() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.axlePreReset.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionCmdControl.doShow(operate, this.selected);
}
});
},
//
lock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.lock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionControl.doShow(operate, this.selected);
}
});
},
//
unlock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.unlock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionCmdControl.doShow(operate, this.selected);
}
});
},
//
setSpeed() {
// let operate = {
// start: true,
// code: this.selected.code,
// type: MapDeviceType.Section.type,
// label: MapDeviceType.Section.label,
// operation: OperationEvent.Section.setLimitSpeed.menu.operation
// };
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.speedCmdControl.doShow(operate, this.selected);
// }
// });
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.setSpeed.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedLimitControl.doShow(operate, this.selected);
}
});
},
//
// cancelSpeed() {
// let operate = {
// start: true,
// send: true,
// code: this.selected.code,
// type: MapDeviceType.Section.type,
// label: MapDeviceType.Section.label,
// operation: OperationEvent.Section.cancelSpeed.menu.operation
// };
// this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
// if (valid) {
// let tempData = response.data;
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
// }
// });
// },
//
newTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.newtrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainCreate.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -1,500 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-control ref="routeControl" />
<route-cmd-control ref="routeCmdControl" />
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import RouteControl from './dialog/routeControl';
import RouteSelection from './dialog/routeSelection';
import RouteLock from './dialog/routeLock';
import RouteCmdControl from './dialog/routeCmdControl';
import RouteHandControl from './dialog/routeHandControl';
import RouteDetail from './dialog/routeDetail';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default {
name: 'SignalMenu',
components: {
PopMenu,
RouteControl,
RouteSelection,
RouteLock,
RouteCmdControl,
RouteHandControl,
RouteDetail,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: '排列进路',
handler: this.arrangementRoute,
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
auth: { station: false, center: true }
},
{
label: '取消进路',
handler: this.cancelTrainRoute,
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
auth: { station: false, center: true }
},
{
label: '信号重开',
handler: this.reopenSignal,
disabledCallback: MenuDisabledState.Signal.reopenSignal,
auth: { station: false, center: true }
},
{
type: 'separator'
},
{
label: '进路交人工控',
handler: this.humanControl,
disabledCallback: MenuDisabledState.Signal.humanControl,
auth: { station: false, center: true }
},
{
label: '进路交自动控',
handler: this.atsAutoControl,
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
auth: { station: false, center: true }
},
{
label: '查询进路控制状态',
handler: this.detail,
disabledCallback: MenuDisabledState.Signal.detail,
auth: { station: true, center: true }
}
],
central: [
{
label: '排列进路',
handler: this.arrangementRoute,
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
auth: { station: false, center: true }
},
{
label: '取消进路',
handler: this.cancelTrainRoute,
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
auth: { station: false, center: true }
},
{
label: '信号重开',
handler: this.reopenSignal,
disabledCallback: MenuDisabledState.Signal.reopenSignal,
auth: { station: false, center: true }
},
{
type: 'separator'
},
{
label: '进路交人工控',
handler: this.humanControl,
disabledCallback: MenuDisabledState.Signal.humanControl,
auth: { station: false, center: true }
},
{
label: '进路交自动控',
handler: this.atsAutoControl,
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
auth: { station: false, center: true }
},
{
label: '查询进路控制状态',
handler: this.detail,
disabledCallback: MenuDisabledState.Signal.detail,
auth: { station: true, center: true }
}
]
},
menuForce: [
{
label: '信号关灯',
handler: this.signalClose,
disabledCallback: ''
},
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Signal.setStoppage
},
{
label: '取消故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Signal.cancelStoppage
}
]
};
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
arrangementRoute() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.arrangementRoute.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
var tempData = null;
if (response) {
tempData = response.data;
}
this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelTrainRoute() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
lock() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.lock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeLock.doShow(operate.operation, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
unlock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.unlock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeCmdControl.doShow(operate, this.selected);
}
});
},
//
reopenSignal() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.reopenSignal.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
guide() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.guide.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$refs.routeCmdControl.doShow(operate, this.selected);
}
});
},
//
setAutoInterlock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
cancelAutoInterlock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
setAutoTrigger() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.setAutoTrigger.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
cancelAutoTrigger() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
signalClose() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.signalClose.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
humanControl() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.humanControl.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempData = null;
if (response) {
tempData = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
}
});
},
//
atsAutoControl() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.atsAutoControl.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempData = null;
if (response) {
tempData = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
}
});
},
//
detail() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.detail.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeDetail.doShow(operate, this.selected, response.data);
}
});
}
}
};
</script>

View File

@ -1,307 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<station-cmd-control ref="stationCmdControl" />
<station-human-control-all ref="stationHumanControlAll" />
<station-set-route-control-all ref="stationSetRouteControlAll" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import StationCmdControl from './dialog/stationCmdControl';
import StationHumanControlAll from './dialog/stationHumanControlAll';
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default {
name: 'StationMenu',
components: {
PopMenu,
StationCmdControl,
StationHumanControlAll,
StationSetRouteControlAll,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: '全站设置联锁自动触发',
handler: this.setAutoTrigger,
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
auth: { station: true, center: false }
},
{
label: '全站取消联锁自动触发',
handler: this.cancelAutoTrigger,
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
auth: { station: true, center: false }
},
{
label: '上电解锁',
handler: this.powerUnLock,
disabledCallback: MenuDisabledState.Station.powerUnLock,
auth: { station: true, center: false }
},
{
label: '执行关键操作测试',
handler: this.execKeyOperationTest,
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
auth: { station: true, center: false }
}
],
central: [
{
label: '所有进路自排关',
handler: this.humanControlALL,
disabledCallback: MenuDisabledState.Station.humanControlALL,
auth: { station: false, center: true }
},
{
label: '所有进路自排开',
handler: this.atsAutoControlALL,
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
auth: { station: false, center: true }
},
{
label: '执行关键操作测试',
handler: this.execKeyOperationTest,
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
auth: { station: false, center: true }
}
]
},
menuForce: [
{
label: '设置ZC故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Station.setStoppage
},
{
label: '取消ZC故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Station.cancelStoppage
}
]
};
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menu = [];
if (this.selected.concentrateStationCode == this.selected.code) {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
}
if (this.selected.centralized) {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
}
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
setAutoTrigger() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.setAutoTrigger.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelAutoTrigger() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
powerUnLock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.powerUnLock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(operate, this.selected);
}
});
},
//
execKeyOperationTest() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(operate, this.selected);
}
});
},
//
humanControlALL() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.humanControlALL.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationHumanControlAll.doShow(operate, this.selected);
}
});
},
//
atsAutoControlALL() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -1,69 +0,0 @@
<template>
<pop-menu ref="popMenu" :menu="menu" />
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
export default {
name: 'StationControlMenu',
components: {
PopMenu
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: [
],
menuForce: [
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
doShow(point) {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
}
}
};
</script>

View File

@ -1,508 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl" />
<stand-jump-stop-control ref="standJumpStopControl" />
<stand-detail ref="standDetail" />
<stand-run-level ref="standRunLevel" />
<stand-stop-time ref="standStopTime" />
<stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import StandControl from './dialog/standControl';
import StandJumpStopControl from './dialog/standJumpStopControl';
import StandBackStrategy from './dialog/standBackStrategy';
import StandDetail from './dialog/standDetail';
import StandRunLevel from './dialog/standRunLevel';
import StandStopTime from './dialog/standStopTime';
import StandDetainTrainAll from './dialog/standDetainTrainAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default {
name: 'StationStandMenu',
components: {
PopMenu,
StandControl,
StandJumpStopControl,
StandDetail,
StandRunLevel,
NoticeInfo,
StandBackStrategy,
StandStopTime,
StandDetainTrainAll
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: '设置扣车',
handler: this.setDetainTrain,
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
auth: { station: true, center: false }
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
auth: { station: true, center: true }
},
{
label: '设置跳停',
handler: this.setJumpStop,
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
auth: { station: true, center: false }
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '提前发车',
handler: this.earlyDeparture,
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
auth: { station: true, center: true }
},
{
label: '设置停站时间',
handler: this.setStopTime,
disabledCallback: MenuDisabledState.StationStand.setStopTime,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '站台详细信息',
handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: true, center: true }
},
{
label: '运行时间控制',
handler: this.setRunLevel,
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
auth: { station: false, center: false }
},
{
label: '设置提前发车',
handler: this.earlyDeparture,
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
auth: { station: false, center: false }
},
{
label: '人工折返策略设置',
handler: this.setBackStrategy,
disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
auth: { station: false, center: false }
},
{
label: '查询站台状态',
handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: false, center: false }
}
],
central: [
{
label: '设置扣车',
handler: this.setDetainTrain,
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
auth: { station: true, center: true }
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
auth: { station: true, center: true }
},
{
label: '设置跳停',
handler: this.setJumpStop,
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
auth: { station: true, center: true }
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
auth: { station: true, center: true }
},
{
label: '提前发车',
handler: this.earlyDeparture,
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '停站时间控制',
handler: this.setStopTime,
disabledCallback: MenuDisabledState.StationStand.setStopTime,
auth: { station: true, center: true }
},
{
label: '运行时间控制',
handler: this.setRunLevel,
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
auth: { station: true, center: true }
},
{
label: '变通策略管理',
handler: this.setBackStrategy,
disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '站台信息',
handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: true, center: true }
}
]
},
menuForce: [
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.StationStand.setStoppage
},
{
label: '取消故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
setDetainTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelDetainTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelDetainTrainForce() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
// 线
cancelDetainTrainAll() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standDetainTrainAll.doShow(operate, this.selected);
}
});
},
//
setJumpStop() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setJumpStop.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standJumpStopControl.doShow(operate, this.selected);
}
});
},
//
cancelJumpStop() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standJumpStopControl.doShow(operate, this.selected);
}
});
},
//
setStopTime() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setStopTime.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standStopTime.doShow(operate, this.selected, tempDate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
setRunLevel() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setRunLevel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standRunLevel.doShow(operate, this.selected, tempDate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
earlyDeparture() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
setBackStrategy() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standBackStrategy.doShow(operate, this.selected, tempDate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
detail() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.detail.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>

View File

@ -1,448 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<switch-control ref="switchControl" />
<switch-cmd-control ref="switchCmdControl" />
<speed-cmd-control ref="speedCmdControl" />
<speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SwitchControl from './dialog/switchControl';
import SwitchCmdControl from './dialog/switchCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import SpeedLimitControl from './dialog/speedLimitControl';
import AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default {
name: 'SwitchMenu',
components: {
PopMenu,
SectionControl,
SwitchControl,
SwitchCmdControl,
SpeedLimitControl,
SpeedCmdControl,
AlxeEffective,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: '轨道切除',
handler: this.split,
disabledCallback: MenuDisabledState.Switch.split,
auth: { station: true, center: true }
},
{
label: '轨道激活',
handler: this.active,
disabledCallback: MenuDisabledState.Switch.active,
auth: { station: true, center: true }
}
],
central: [
{
label: '轨道切除',
handler: this.split,
disabledCallback: MenuDisabledState.Switch.split,
auth: { station: true, center: true }
},
{
label: '轨道激活',
handler: this.active,
disabledCallback: MenuDisabledState.Switch.active,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '确认计轴有效',
handler: this.alxeEffective,
disabledCallback: MenuDisabledState.Switch.alxeEffective,
auth: { station: false, center: true }
},
{
type: 'separator'
},
{
label: '设置临时限速',
handler: this.setSpeed,
disabledCallback: MenuDisabledState.Switch.setSpeed,
auth: { station: false, center: true }
},
{
type: 'separator'
},
{
label: '查看站场设备状态',
handler: this.undeveloped,
disabledCallback: MenuDisabledState.Switch.setSpeed,
auth: { station: false, center: true }
}
]
},
menuForce: [
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Switch.setStoppage,
auth: {
}
},
{
label: '取消故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Switch.cancelStoppage,
auth: {
}
}
]
};
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
lock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.lock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unlock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.unlock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
block() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.block.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unblock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.unblock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
switchTurnoutForce() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.turnoutForce.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
switchTurnout() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.turnout.menu.operation
};
if (operate.operation) {
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
}
},
//
fault() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.fault.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
cancelSpeed() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.cancelSpeed.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
}
});
},
//
split() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.split.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
active() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.active.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
axlePreReset() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.axlePreReset.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
setSpeed() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.setSpeed.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedLimitControl.doShow(operate, this.selected);
}
});
},
//
alxeEffective() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.alxeEffective.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.alxeEffective.doShow(operate, this.selected);
}
});
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
}
}
};
</script>

View File

@ -1,202 +0,0 @@
<template>
<div id="menuTool">
<div class="nav">
<div v-for="(item,index) in tools" :key="index" class="tool">
<img :src="item.src" :alt="item.title">
</div>
<img class="logo" :src="logoImg">
<system-time v-if="isShowSystemTime" class="time" :time="time" :zoom="2" :width="180" :height="48" :fine="2" :top="6" />
</div>
</div>
</template>
<script>
import { prefixIntrger } from '@/utils/date';
import SystemTime from '@/views/components/systemTime/index';
import logo_ from '@/assets/logo_.png';
export default {
name: 'MenuTool',
components: {
SystemTime
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
logoImg: logo_,
time: '00:0000',
tools: [
{
title: '服务器1',
operate: '',
src: logo_,
click: this.undeveloped
},
{
title: '服务器2',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '前置机1',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '前置机2',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '主调',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '调度台1',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '调度台2',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '调度台3',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '大屏',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '维护工作站',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '运行图显示人工站',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '跳停',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '扣车',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '列车报警',
operate: '',
src: logo_,
click: this.undeveloped
}
]
};
},
computed: {
isShowSystemTime() {
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
}
},
watch: {
'$store.state.training.initTime': function (initTime) {
const date = new Date(initTime);
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
}
},
mounted() {
this.initTools();
},
methods: {
initTools() {
this.tools = [];
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$top: 30px;
$width: 50px;
$height: 50px;
#menuTool {
z-index: 5;
position: absolute;
top: $top;
width: 100%;
}
.nav {
display: block;
height: $height;
line-height: $height;
color: #0000;
background: #ECE9D8;
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
}
.tool {
background: #808080;
display: flex;
justify-content: center;
cursor: pointer;
position: relative;
float: left;
height: $height - 2;
width: $width + 15;
margin: 1px;
img {
display: block;
text-align: center;
padding-top: 4px;
height: $height - 10;
width: $width - 10;
}
}
.time {
position: relative;
float: right;
text-align: center;
}
.logo {
position: relative;
float: right;
text-align: center;
margin: 1px 10px;
height: $height - 4;
width: $width - 4;
}
</style>

View File

@ -1,601 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" />
<train-delete ref="trainDelete" />
<train-define ref="trainDefine" />
<train-move ref="trainMove" />
<train-edit ref="trainEdit" />
<train-set-plan ref="trainSetPlan" />
<train-add-plan ref="trainAddPlan" />
<train-move-evently ref="trainMoveEvently" />
<train-delete-plan ref="trainDeletePlan" />
<train-set-head ref="trainSetHead" />
<train-set-work ref="trainSetWork" />
<train-flag ref="trainFlag" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
import TrainDelete from './dialog/trainDelete';
import TrainDefine from './dialog/trainDefine';
import TrainMove from './dialog/trainMove';
import TrainEdit from './dialog/trainEdit';
import TrainSetPlan from './dialog/trainSetPlan';
import TrainAddPlan from './dialog/trainAddPlan';
import TrainMoveEvently from './dialog/trainMoveEvently';
import TrainDeletePlan from './dialog/trainDeletePlan';
import TrainSetHead from './dialog/trainSetHead';
import TrainSetWork from './dialog/trainSetWork';
import TrainFlag from './dialog/trainFlag';
import { mouseCancelState } from './utils/menuItemStatus';
export default {
name: 'MenuTrain',
components: {
PopMenu,
NoticeInfo,
TrainDelete,
TrainDefine,
TrainMove,
TrainEdit,
TrainSetPlan,
TrainAddPlan,
TrainMoveEvently,
TrainDeletePlan,
TrainSetHead,
TrainSetWork,
TrainFlag
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: '定义车组号',
handler: this.addTrainId,
disabledCallback: MenuDisabledState.Train.addTrainId,
auth: { station: true, center: true }
},
{
label: '删除车组号',
handler: this.delTrainId,
disabledCallback: MenuDisabledState.Train.delTrainId,
auth: { station: true, center: true }
},
{
label: '修改车组号',
handler: this.editTrainId,
disabledCallback: MenuDisabledState.Train.editTrainId,
auth: { station: true, center: true }
},
{
label: '移动车组号',
handler: this.moveTrainId,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '设置计划车',
handler: this.setPlanTrain,
disabledCallback: MenuDisabledState.Train.setPlanTrain,
auth: { station: true, center: true }
},
{
label: '设置头码车',
handler: this.setHeadTrain,
disabledCallback: MenuDisabledState.Train.setHeadTrain,
auth: { station: true, center: true }
},
{
label: '设置人工车',
handler: this.setWorkTrain,
disabledCallback: MenuDisabledState.Train.setWorkTrain,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '添加计划车',
// handler: this.undeveloped,
handler: this.addPlanTrain,
// disabledCallback: MenuDisabledState.Train.moveTrainId,
disabledCallback: MenuDisabledState.Train.addPlanTrain,
auth: { station: true, center: true }
},
{
label: '删除计划车',
// handler: this.undeveloped,
handler: this.deletePlanTrain,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
},
{
label: '平移计划车',
// handler: this.undeveloped,
handler: this.moveEventlyTrain,
disabledCallback: MenuDisabledState.Train.moveEventlyTrain,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '标记重点列车',
handler: this.trainToFlag,
disabledCallback: MenuDisabledState.Train.trainToFlag,
auth: { station: true, center: true }
},
{
label: '取消标记重点列车',
handler: this.trainUnFlag,
disabledCallback: MenuDisabledState.Train.trainUnFlag,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '列车信息',
handler: this.undeveloped,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
}
],
central: [
{
label: '定义车组号',
handler: this.addTrainId,
disabledCallback: MenuDisabledState.Train.addTrainId,
auth: { station: true, center: true }
},
{
label: '删除车组号',
handler: this.delTrainId,
disabledCallback: MenuDisabledState.Train.delTrainId,
auth: { station: true, center: true }
},
{
label: '修改车组号',
handler: this.editTrainId,
disabledCallback: MenuDisabledState.Train.editTrainId,
auth: { station: true, center: true }
},
{
label: '移动车组号',
handler: this.moveTrainId,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '设置计划车',
handler: this.setPlanTrain,
disabledCallback: MenuDisabledState.Train.setPlanTrain,
auth: { station: true, center: true }
},
{
label: '设置头码车',
handler: this.setHeadTrain,
disabledCallback: MenuDisabledState.Train.setHeadTrain,
auth: { station: true, center: true }
},
{
label: '设置人工车',
handler: this.setWorkTrain,
disabledCallback: MenuDisabledState.Train.setWorkTrain,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '添加计划车',
// handler: this.undeveloped,
handler: this.addPlanTrain,
// disabledCallback: MenuDisabledState.Train.moveTrainId,
disabledCallback: MenuDisabledState.Train.addPlanTrain,
auth: { station: true, center: true }
},
{
label: '删除计划车',
// handler: this.undeveloped,
handler: this.deletePlanTrain,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
},
{
label: '平移计划车',
// handler: this.undeveloped,
handler: this.moveEventlyTrain,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '标记重点列车',
handler: this.trainToFlag,
disabledCallback: MenuDisabledState.Train.trainToFlag,
auth: { station: true, center: true }
},
{
label: '取消标记重点列车',
handler: this.trainUnFlag,
disabledCallback: MenuDisabledState.Train.trainUnFlag,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '列车信息',
handler: this.undeveloped,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
}
]
},
menuForce: [
{
label: '设置通信故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Train.setStoppage
},
{
label: '取消通信故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Train.cancelStoppage
}
],
menuSpeed: [
{
label: '确认运行至前方站',
handler: this.limitSpeed,
disabledCallback: MenuDisabledState.Train.limitSpeed
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function () {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = trainMenuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce, ...this.menuSpeed];
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
// this.$store.dispatch('map/setTrainWindowShow', false);
}
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
limitSpeed() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.limitSpeed.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
//
addTrainId() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.addTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDefine.doShow(operate, this.selected);
}
});
},
//
delTrainId() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.delTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(operate, this.selected);
}
});
},
//
moveTrainId() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.moveTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainMove.doShow(operate, this.selected);
}
});
},
//
editTrainId() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainEdit.doShow(operate, this.selected);
}
});
},
//
setPlanTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainSetPlan.doShow(operate, this.selected);
}
});
},
//
addPlanTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.addPlanTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAddPlan.doShow(operate, this.selected);
}
});
},
//
moveEventlyTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.moveEventlyTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainMoveEvently.doShow(operate, this.selected);
}
});
},
//
deletePlanTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.deletePlanTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDeletePlan.doShow(operate, this.selected);
}
});
},
//
setHeadTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainSetHead.doShow(operate, this.selected);
}
});
},
//
setWorkTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainSetWork.doShow(operate, this.selected);
}
});
},
//
trainToFlag() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainFlag.doShow(operate, this.selected);
}
});
},
//
trainUnFlag() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainFlag.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -1,214 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form label-width="80px" size="mini">
<el-row>
<el-col :span="8">
<el-form-item label="线路名称">
<el-input v-model="model.lineName" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位名称">
<el-input v-model="model.unitName" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="模块名称">
<el-input v-model="model.moduleName" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="报警时间">
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item>
<span slot="label">&emsp;</span>
<el-input v-model="model.level" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="确认状态">
<el-input v-model="model.confirm" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9" class="alarm-type">
<el-form-item>
<span slot="label">&emsp;&emsp;</span>
<el-input v-model="model.type" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="15" class="alarm-child-type">
<el-form-item label="子类型">
<el-input v-model="model.childType" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="时间摘要">
<el-input v-model="model.timeSummary" disabled></el-input>
</el-form-item>
<el-form-item label="推荐操作">
<el-input v-model="model.recommendedOperation" disabled></el-input>
</el-form-item>
<div class="alarm-detail-description">
<span> 报警详细描述</span><br>
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="model.alarmDetail" disabled>
</el-input>
</div>
</el-form>
<el-row class="button-group">
<el-col :span="3" :offset="9">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit"> </el-button>
</el-col>
<el-col :span="10">
<span style="line-height:26px">未确认{{level}}级报警数目1</span>
</el-col>
</el-row>
</span>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'AlarmDetail',
data() {
return {
dialogShow: false,
loading: false,
level: 0,
operate: null,
controlProps: {
'01': '中控',
'02': '站控'
},
model: {
lineName: '',
unitName: '',
moduleName: '',
level: '',
confirm: '',
alarmDate: '',
type: '',
childType: '',
timeSummary: '',
recommendedOperation: '',
alarmDetail: ''
}
}
},
computed: {
...mapGetters('map', [
'name',
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
},
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.hasOwnProperty('success')) {
if (elem.success) {
let operate = this.$store.state.training.operate;
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
let newOperate = {
type: operate.type,
name: station.name,
}
this.doShow(newOperate);
}
}
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.model = {
lineName: this.name,
unitName: this.operate.name,
moduleName: 'CMM控制模式转换模式',
level: '0级告警',
confirm: '确认状态',
alarmDate: new Date(),
type: '系统事件',
childType: '依据信号设备操作命令设置控制模式',
timeSummary: '控制模式摘要',
recommendedOperation: '',
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
},
commit() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
},
isClose() {
return this.dialogShow;
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.alarm-type .el-input {
width: 220px;
}
.alarm-detail-description {
padding-left: 12px;
text-align: left;
}
</style>

View File

@ -1,285 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm passive-control" title="控制模式请求" :visible.sync="show" width="700px"
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
v-dialogDrag>
<span class="control-label">{{`${requestInfo}请求如下区域的控制模式`}}</span>
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%" height="250" center
size="mini" highlight-current-row>
<el-table-column prop="operate" label="操作区域">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.operate}}</span>
</template>
</el-table-column>
<el-table-column prop="control" label="当前控制模式" width="120">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.control.name}}</span>
</template>
</el-table-column>
<el-table-column prop="target" label="请求控制模式" width="120">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.target.name}}</span>
</template>
</el-table-column>
<el-table-column prop="agree" label="是否同意" width="140">
<template slot-scope="scope">
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled"></el-checkbox>
</template>
</el-table-column>
</el-table>
<span class="control-label">距离对话还有{{count}}请应答</span>
<el-row class="button-group">
<el-col :span="10" :offset="3">
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">同意
</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">拒绝</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'RequestControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
disabledAgree: false,
disabledRefuse: false,
requestInfo: '调度员1工作站',
controlProps: {
'01': '中控',
'02': '站控'
},
selection: [],
tableData: [],
timer: null,
timeout: 61,
count: 0,
}
},
computed: {
targetStatus() {
if (this.$store.state.training.prdType == '01') {
return '01';
}
if (this.$store.state.training.prdType == '02') {
return '02'
}
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationControl.controlResponse.choose.domId : '';
},
domAgree() {
return this.dialogShow ? OperationEvent.StationControl.controlResponse.agree.domId : '';
},
domIdRefuse() {
return this.dialogShow ? OperationEvent.StationControl.controlResponse.refuse.domId : '';
}
},
watch: {
tableData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
},
'$store.state.socket.msgHead': function (elem) {
if (elem && !elem.hasOwnProperty('success') && !elem.hasOwnProperty('timeout')) {
if (elem.stationControlCode) {
this.doShow(elem);
}
}
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
createTimer() {
this.count = this.timeout;
this.timer = setInterval(() => {
if (this.count <= 0) {
this.doClose();
return;
}
this.count = this.count - 1;
}, 1000)
},
clearTimer() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
checkTableDataSelction(data) {
let selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.agree && !row.disabled) {
selection.push(row);
}
})
}
this.disabledSend = selection.length ? false : true;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
this.disabledAgree = this.selection.length <= 0;
}
},
updateTableData(code) {
this.tableData = [];
let model = {
code: code,
operate: '',
control: { code: '', name: '' },
target: { code: '', name: '' },
agree: false,
disabled: false,
}
let device = this.$store.getters['map/getDeviceByCode'](code);
if (device) {
let control = (device||{}).state;
if (control) {
model.control = { status: control.status, name: this.controlProps[control.status] };
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
}
let station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
if (station) {
model.operate = station.name || '';
}
}
this.tableData.push(model);
},
doShow(msgHead) {
this.dialogShow = true;
this.disabledAgree = true;
this.createTimer();
this.updateTableData(msgHead.stationControlCode);
let operate = {
start: true,
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.menu.operation,
};
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
doClose() {
this.disabledAgree = false;
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.count = 0;
this.dialogShow = false;
this.clearTimer();
this.$store.dispatch('training/emitTipFresh');
this.$refs.multipleTable.setCurrentRow();
},
serializeCodeListWithSeparator(sep) {
let codeList = [];
if (this.selection && this.selection.length) {
this.selection.forEach(elem => {
codeList.push(elem.code);
})
}
return codeList.join(sep);
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
let operate = {
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.choose.operation,
val: this.serializeCodeListWithSeparator('::'),
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
} else if (!selection) {
this.$messageBox('请选择一条数据');
}
},
agree() {
let operate = {
send: true,
over: true,
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.agree.operation,
val: this.selection[0].code,
prdType: this.$store.state.training.prdType
}
this.clearTimer();
this.disabledAgree = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate);
})
},
refuse() {
let operate = {
send: true,
over: true,
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
val: this.tableData[0].code,
prdType: this.$store.state.training.prdType
}
this.clearTimer();
this.disabledAgree = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate);
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.control-label {
line-height: 30px;
font-size: 18px;
}
</style>

View File

@ -1,106 +0,0 @@
<template>
<el-dialog class="beijing-01__systerm cmd-notice" title="操作命令提示" :visible.sync="show" width="400px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<span>{{name}}{{msg}}!</span>
<el-row class="button-group">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确认</el-button>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'CmdNotice',
data() {
return {
dialogShow: false,
loading: false,
operate: null,
name: '',
msg: ''
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
},
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && (elem.hasOwnProperty('success') || elem.hasOwnProperty('timeout'))) {
let operate = this.$store.state.training.operate;
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
let newOperate = {
type: operate.type,
name: station.name,
}
if (elem.timeout) {
newOperate['msg'] = '请求超时';
this.doShow(newOperate);
} else if (!elem.success) {
newOperate['msg'] = '请求拒绝';
this.doShow(newOperate);
}
}
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.name = this.operate.name || '';
this.msg = this.operate.msg || '';
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
operation: this.operate.type,
operation: OperationEvent.Command.close.notice.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
},
commit() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.notice.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
},
isClose() {
return this.dialogShow;
}
}
}
</script>

View File

@ -1,570 +0,0 @@
import Vue from 'vue';
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';
export function getCurrentStateObject() {
return store.getters['menuOperation/selected'];
}
/** 系统类型 */
export const SystemType = {
'01': 'local', // 现地工作站
'02': 'central' // 中心调度工作站
};
export const StationControlType = {
'01': 'center', // 中控
'02': 'station' // 站控
};
// 控制禁用
export const MenuDisabledState = {
Section: {
// 故障解锁
fault() {
},
// 切除
split() {
const device = getCurrentStateObject();
if (device && device.cutOff != deviceState.Section.cutOff.Default) {
return true;
}
},
// 激活
active() {
const device = getCurrentStateObject();
if (device && device.cutOff == deviceState.Section.cutOff.Default) {
return true;
}
},
// 区段封锁
lock() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Section.status.State06) {
return true;
}
},
// 区段解禁
unlock() {
const device = getCurrentStateObject();
if (device && device.status != deviceState.Section.status.State06) {
return true;
}
},
// 区段设置限速
setSpeed() {
},
// 区段取消限速
cancelSpeed() {
const device = getCurrentStateObject();
if (device && device.speedUpperLimit == deviceState.Section.speedUpperLimit.Default) {
return true;
}
},
// 新建列车
newTrain() {
},
// 计轴预复位
axlePreReset() {
},
// 设置计轴有效
alxeEffective() {
},
// 设置计轴失效
alxeFailure() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Section.status.State13) {
return true;
}
}
},
Signal: {
// 进路选排
arrangementRoute() {
},
// 进路取消
cancelTrainRoute() {
},
// 信号封闭
lock() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Signal.status.State05) {
return true;
}
},
// 信号解封
unlock() {
const device = getCurrentStateObject();
if (device && device.status != deviceState.Signal.status.State05) {
return true;
}
},
// 信号重开
reopenSignal() {
},
// 进路引导
guide() {
},
// 设置联锁自动进路
setAutoInterlock() {
},
// 取消联锁自动进路
cancelAutoInterlock() {
},
// 设置联锁自动触发
setAutoTrigger() {
},
// 取消联锁自动触发
cancelAutoTrigger() {
},
// 关灯
signalClose() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Signal.status.State01) {
return true;
}
},
// 人工控
humanControl() {
},
// ats自动控
atsAutoControl() {
},
// 查询进路状态
detail() {
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
Station: {
// 全站设置联锁自动触发
setAutoTrigger() {
},
// 全站取消联锁自动触发
cancelAutoTrigger() {
},
// 上电解锁
powerUnLock() {
},
// 执行关键操作测试
execKeyOperationTest() {
},
// 所有进路自排开
atsAutoControlALL() {
},
// 所有进路自排关
humanControlALL() {
},
// 设置ZC故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消ZC故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
StationControl: {
// 紧急站控
emergencyStationControl() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.StationControl.status.State03) {
return true;
}
},
// 请求站控
requestStationControl() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.StationControl.status.State02) {
return true;
}
},
// 强行站控
forcedStationControl() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.StationControl.status.State02) {
return true;
}
},
// 请求中控
requestCentralControl() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.StationControl.status.State01) {
return true;
}
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
StationStand: {
// 设置扣车
setDetainTrain() {
const device = getCurrentStateObject();
if (device && device.holdStatus != deviceState.StationStand.holdStatus.State01) {
return true;
}
},
// 取消扣车
cancelDetainTrain() {
const device = getCurrentStateObject();
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
return true;
}
},
// 强制取消扣车
cancelDetainTrainForce() {
const device = getCurrentStateObject();
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
return true;
}
},
// 设置全站扣车
cancelDetainTrainAll() {
},
// 设置运行等级
setRunLevel() {
},
// 设置停站时间
setStopTime() {
},
// 设置跳停
setJumpStop() {
const device = getCurrentStateObject();
if (device && device.jumpStopStatus != deviceState.StationStand.jumpStopStatus.State01) {
return true;
}
},
// 取消跳停
cancelJumpStop() {
const device = getCurrentStateObject();
if (device && device.jumpStopStatus == deviceState.StationStand.jumpStopStatus.State01) {
return true;
}
},
// 提前发车
earlyDeparture() {
},
// 站台详细信息
detail() {
},
// 设置折返策略
setBackStrategy() {
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
Switch: {
// 单锁
lock() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Switch.status.State10) {
return true;
}
},
// 解锁
unlock() {
const device = getCurrentStateObject();
if (device && device.status != deviceState.Switch.status.State10) {
return true;
}
},
// 封锁
block() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Switch.status.State14) {
return true;
}
},
// 解封
unblock() {
const device = getCurrentStateObject();
if (device && device.status != deviceState.Switch.status.State14) {
return true;
}
},
// 强扳
switchTurnoutForce() {
},
// 转动
switchTurnout() {
},
// 道岔故障解锁
fault() {
},
// 计轴预复位
axlePreReset() {
},
// 道岔切除
split() {
},
// 道岔激活
active() {
},
// 道岔设置速度
setSpeed() {
// const device = getCurrentStateObject();
},
// 设置计轴有效
alxeEffective() {
},
// 道岔取消速度
cancelSpeed() {
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
Train: {
// 添加列车识别号
addTrainId() {
},
// 删除列车识别号
delTrainId() {
},
// 修改列车识别号
editTrainId() {
},
// 修改车组号
editTrainNo() {
},
// 移动列车识别号
moveTrainId() {
},
// 交换列车识别号
switchTrainId() {
},
// 设置限速
limitSpeed() {
},
// 设置通信故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消通信故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
},
// 添加计划车
addPlanTrain() {
},
// 设置计划车
setPlanTrain() {
},
// 设置头码车
setHeadTrain() {
},
// 设置人工车
setWorkTrain() {
},
// 标记重点车
trainToFlag() {
},
// 取消标记重点车
trainUnFlag() {
}
}
};
/**
* 将menu的disabled属性使用disabledCallback计算并返回
* @param {Array} menu
*/
export function menuConvert(menu) {
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.type === 'separator') {
elem.show = true;
return;
}
if (elem.disabledCallback.constructor === Function) {
if (!elem.defaultDisabled) {
elem.disabled = elem.disabledCallback();
}
}
});
}
return menu;
}
/**
* 根据产品类型返回对应的menuBar
* @param {*} menuObj
*/
export function menuBarConvert(menu, mode) {
if (menu) {
if (mode === OperateMode.NORMAL) {
menu.forEach(item => {
if (item.type === 'separator') {
item.show = true;
return;
}
item.show = false;
if (!item.click) {
item.click = () => { };
}
if (!item.froce) {
item.show = true;
if (item.children && item.children.length > 0) {
menuBarConvert(item.children, mode);
}
}
});
} else if (mode === OperateMode.ADMIN) {
menu.forEach(item => {
item.show = true;
if (!item.click) {
item.click = () => { };
}
if (item.children && item.children.length > 0) {
menuBarConvert(item.children, mode);
}
});
}
}
return menu || [];
}
/**
* 将menu的show属性过滤返回
* @param {Array} menu
*/
export function menuFiltration(menuObj) {
var selected = getCurrentStateObject();
var control;
var menu = [];
if (selected._type == 'StationStand') {
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
} else if (selected._type == 'Station') {
control = store.getters['map/getStationControlByStationCode'](selected.code);
} else {
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
}
if (control) {
if (store.state.training.prdType != '') {
const type = SystemType[store.state.training.prdType];
const status = StationControlType[control.status];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.type === 'separator') {
elem.show = true;
return;
}
if (elem.auth.constructor === Object) {
elem.show = true;
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
elem.show = false;
}
elem.defaultDisabled = !elem.auth[status];
}
});
}
}
}
return menu;
}
/**
* 将train menu的show属性过滤返回
*/
export function trainMenuFiltration(menuObj) {
var menu = [];
if (store.state.training.prdType != '') {
const type = SystemType[store.state.training.prdType];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.type === 'separator') {
elem.show = true;
return;
}
if (elem.auth.constructor === Object) {
elem.show = true;
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
elem.show = false;
}
}
});
}
}
return menu;
}
/**
* 离开菜单以及执行完菜单取消选中状态
*/
export function mouseCancelState(selected) {
const device = Vue.prototype.$jlmap.getDeviceByCode(selected.code);
const instance = (device || {}).instance;
if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
device['down'] = false;
instance.mouseEvent.mouseout(Vue.prototype.$jlmap.$zr.curEvent);
}
}

View File

@ -1,175 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule add-task"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="margin: 10px">
<el-row>
<el-col :span="3">
<el-radio v-model="model.type" label="1">加在最前</el-radio>
</el-col>
<el-col :span="2" :offset="1">
<span>车次号</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.tripNumber" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="3" :offset="1">
<span>开始时间</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.startTime" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<el-radio v-model="model.type" label="2">加在最后</el-radio>
</el-col>
<el-col :span="2" :offset="1">
<span>车次号</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.tripNumber" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="3" :offset="1">
<span>开始时间</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.startTime" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
<el-row style="margin-bottom: 5px;">
交路
</el-row>
<el-row>
<el-table :data="model.route" border :height="180">
<el-table-column prop="date" label="日期" width="180" />
<el-table-column prop="name" label="姓名" width="180" />
<el-table-column prop="address" label="地址" />
<el-table-column width="20" />
</el-table>
</el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
详情
</el-row>
<el-row>
<el-table :data="model.detail" border :height="180">
<el-table-column prop="date" label="日期" width="180" />
<el-table-column prop="name" label="姓名" width="180" />
<el-table-column prop="address" label="地址" />
<el-table-column width="20" />
</el-table>
</el-row>
<el-row>
<el-col :offset="16">
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
</el-col>
</el-row>
</div>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'AddTask',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
model: {
type: '1',
serviceNumber: '',
tripNumber: '',
startTime: '',
default: false,
route: [],
detail: []
},
tripNumberList: []
};
},
computed: {
title() {
return '添加任务';
}
},
mounted() {
},
methods: {
doShow(params) {
this.model.serviceNumber = params.serviceNumber;
this.model.tripNumber = params.tripNumber;
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-button {
margin-left: 40px !important;
margin-right: 40px !important;
}
.el-row {
margin-bottom: 5px !important;
}
.el-input__inner {
height: 20px !important;
line-height: 20px !important;
}
}
</style>

View File

@ -1,115 +0,0 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
class="beijing-01__schedule choose-plan-template"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" :loading="loading" @click="handleConfirm"> </el-button>
<el-button @click="dialogShow = false"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { runPlanTemplateList } from '@/api/runplan';
import { listPublishMap } from '@/api/jmap/map';
export default {
name: 'ChooseTemplatePlan',
data() {
return {
dialogShow: false,
loading: false,
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '100px',
queryObject: {
name: {
type: 'text',
label: '运行图名称'
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
radioShow: true,
columns: [
{
title: '运行图名称',
prop: 'name'
},
{
title: '地图名称',
prop: 'mapId',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.mapId, this.mapList, ['id', 'name']);
},
tagType: (row) => { return 'success'; }
}
]
},
currentModel: {}
};
},
computed: {
title() {
return '选择模板运行图';
}
},
methods: {
loadInitData() {
this.mapList = [];
listPublishMap().then(response => {
this.mapList = response.data;
});
},
doShow() {
this.loading = false;
this.dialogShow = true;
this.loadInitData();
},
doClose() {
this.dialogShow = false;
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
params['mapId'] = this.$route.query.mapId;
// params['lineCode'] = this.$store.getters['map/lineCode'];
}
return runPlanTemplateList(params);
},
handleConfirm() {
this.doClose();
if (this.$refs && this.$refs.pageRules) {
const choose = this.$refs.pageRules.currentChoose();
if (choose) {
this.$emit('chooseConfirm', choose);
} else {
this.$messageBox(`请选择模板运行图`);
}
}
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,206 +0,0 @@
<template>
<div v-if="show">
<template v-if="maxmini">
<div class="nav">
<div v-show="config.showClose" class="cls-status" @click="touch('Close')"><span /></div>
<div class="min-status" @click="touch('Minim')"><span /></div>
</div>
<el-table
ref="table"
:data="config.data"
:highlight-current-row="config.highlightCurrentRow"
:height="height"
border
@current-change="handleChange"
>
<template v-for="(item,index) in config.columns">
<el-table-column :key="index" :prop="item.prop" :label="item.label" :width="item.width" />
</template>
</el-table>
</template>
<template v-else>
<div class="nav">
<div class=" max-status" @click="touch('Maxim')"><span /></div>
</div>
</template>
</div>
</template>
<script>
export default {
name: 'DataTable',
props: {
height: {
type: Number,
required: true
},
config: {
type: Object,
required: true
}
},
data() {
return {
show: true,
maxmini: true,
touchStrategy: {
'Close': [false, true],
'Minim': [true, false],
'Maxim': [true, true]
}
};
},
methods: {
handleChange(row) {
if (this.config.handleChange) {
this.config.handleChange(row);
}
},
setCurrentRow(row) {
this.$refs.table.setCurrentRow(row);
},
touch(operate) {
this.$nextTick(() => {
[this.show, this.maxmini] = this.touchStrategy[operate];
this.$emit('touch', this.maxmini);
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" >
@import "src/styles/mixin.scss";
$height: 20px;
$width: 20px;
.nav {
display: table;
float: right;
width: 100%;
color: #0000;
background: -webkit-linear-gradient(#FDFDFE, #B1CBF3);
background: -o-linear-gradient(#FDFDFE, #B1CBF3);
background: -moz-linear-gradient(#FDFDFE, #B1CBF3);
background: linear-gradient(#FDFDFE, #B1CBF3);
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
height: $height;
line-height: $height;
}
/deep/ {
.el-table--border th.gutter {
background: #EBEADB !important;
}
.el-table {
overflow-y: hidden;
width: 100%;
th.is-leaf {
padding: 0px 0;
background: #EBEADB;
border-right: none !important;
border-left: 1px solid #D1CDBD !important;
border-top: 1px solid #D1CDBD !important;
border-bottom: 1px inset #D1CDBD !important;
color: #000;
.cell {
height: $height;
line-height: $height;
}
}
td {
padding: 0px 0;
.cell {
height: $height;
line-height: $height;
font-size: smaller !important;
}
}
.current-row>td {
background: #316AC5 !important;
color: #fff !important;
}
}
.cls-status {
float: right;
width: 12px;
height: 100%;
line-height: 100%;
margin-left: 5px;
cursor: pointer;
span {
display: inline-block;
content: '/';
background: black;
width: 2px;
height: 12px;
vertical-align: middle;
transform: rotate(45deg);
}
span::after {
display: block;
content: '/';
background: black;
width: 2px;
height: 12px;
transform: rotate(-90deg);
}
}
.min-status {
float: right;
width: 20px;
height: 100%;
line-height: 100%;
cursor: pointer;
span {
display: inline-block;
content: '-';
background: black;
width: 2px;
height: 12px;
vertical-align: middle;
transform: rotate(-90deg);
}
}
.max-status {
float: right;
width: 20px;
height: 100%;
line-height: 100%;
cursor: pointer;
span {
display: inline-block;
content: '';
background: black;
width: 2px;
height: 12px;
transform: rotate(0deg);
}
span::after {
display: block;
content: '';
background: black;
width: 2px;
height: 12px;
transform: rotate(90deg);
}
}
}
</style>

View File

@ -1,134 +0,0 @@
<template>
<el-dialog
v-dialogDrag
:title="title"
class="beijing-01__schedule reload-today-plan"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" :loading="loading" @click="handleConfirm"> </el-button>
<el-button @click="dialogShow = false"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { runPlanTemplateList } from '@/api/runplan';
import { getStationList } from '@/api/runplan';
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
name: 'ReloadTodayPlan',
data() {
return {
dialogShow: false,
loading: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '100px',
queryObject: {
name: {
type: 'text',
label: '运行图名称'
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
radioShow: true,
columns: [
{
title: '运行图名称',
prop: 'name'
}
]
},
currentModel: {}
};
},
computed: {
title() {
return '加载当天计划';
}
},
methods: {
doShow() {
this.loading = false;
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
// params['lineCode'] = this.$store.getters['map/lineCode'];
params['mapId'] = this.$route.query.mapId;
}
return runPlanTemplateList(params);
},
//
handleConfirm() {
if (this.$refs && this.$refs.pageRules) {
const choose = this.$refs.pageRules.currentChoose();
if (choose && choose.id) {
this.loading = true;
generateDayRunPlan(choose.id, this.$route.query.group).then(response => {
this.loading = false;
this.reloadTable();
this.loadRunData();
this.doClose();
this.$message.success(`生成用户每日运行图成功`);
}).catch(() => {
this.loading = false;
this.reloadTable();
this.$messageBox(`生成用户每日运行图失败`);
});
} else {
this.$messageBox(`请选择需要加载的运行图`);
}
}
},
loadRunData() {
// const skinCode = this.$route.query.skinCode;
const mapId = this.$route.query.mapId;
this.$store.dispatch('runPlan/clear');
if (mapId) {
getStationList(mapId).then(response => {
const stations = response.data;
getPublishMapInfo(this.$route.query.mapId).then(res=>{
this.PlanConvert = this.$theme.loadPlanConvert(res.data.lineCode);
this.$store.dispatch('runPlan/setStations', stations).then(() => {
getEveryDayRunPlanData(this.$route.query.group).then(resp => {
this.$store.dispatch('runPlan/setPlanData', resp.data);
}).catch(() => {
this.$store.dispatch('runPlan/setPlanData', []);
this.$messageBox(`获取运行图数据失败`);
});
});
});
}).catch(() => {
this.$messageBox(`获取车站列表失败`);
});
}
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,137 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule create-week-plan"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-form ref="form" :model="model" :rules="rules" label-width="140px" size="small">
<el-form-item label="运行图名称:" prop="planId">
<el-row>
<el-col :span="19">
<el-input v-model="model.planName" :readonly="true" />
</el-col>
<el-col :span="4" :offset="1">
<el-button @click="handleChoose">选择 </el-button>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="计划日期范围:" prop="dateList">
<el-row>
<el-date-picker
v-model="model.dateList"
type="dates"
:clearable="false"
placeholder="选择一个或多个日期"
value-format="yyyy-MM-dd"
/>
</el-row>
</el-form-item>
</el-form>
</el-row>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="create"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm" />
</el-dialog>
</template>
<script>
import { createRunPlanLoad } from '@/api/runplan';
import ChooseTemplatePlan from './chooseTemplatePlan';
export default {
name: 'CreateWeekPlan',
components: {
ChooseTemplatePlan
},
data() {
return {
dialogShow: false,
loading: false,
model: {
planId: '',
planName: '',
dateList: []
}
};
},
computed: {
title() {
return '创建一周计划';
},
rules() {
const rules = {
planId: [
{ required: true, message: '请选择模板运行图', trigger: 'blur' }
],
dateList: [
{ required: true, message: '请选择计划日期范围', trigger: 'change' }
]
};
return rules;
}
},
mounted() {
},
methods: {
doShow(params) {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleChoose() {
this.$refs.choose.doShow();
},
chooseConfirm(choose) {
if (choose) {
this.model.planId = choose.id;
this.model.planName = choose.name;
}
},
buildModel() {
return {
planDateList: this.model.dateList,
mapId: this.$route.query.mapId,
templatePlanId: this.model.planId
};
},
create() {
this.$refs['form'].validate((valid) => {
if (valid) {
createRunPlanLoad(this.buildModel()).then(response => {
this.$message.success('创建运行图计划成功');
this.doClose();
}).catch(() => {
this.doClose();
this.$messageBox('创建运行图计划失败');
});
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.card-box {
padding-top: 10px;
}
/deep/ {
.el-row {
margin: 10px;
}
}
</style>

View File

@ -1,73 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule delete-task"
:title="title"
:visible.sync="dialogShow"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-radio v-model="type" :label="1">删除以前所有任务包含本任务</el-radio>
</el-row>
<el-row>
<el-radio v-model="type" :label="2">删除以后所有任务包含本任务</el-radio>
</el-row>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'DeleteTask',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
tripNumber: '',
serviceNumber: '',
type: '1'
};
},
computed: {
title() {
return '删除任务';
}
},
mounted() {
},
methods: {
doShow(params) {
this.tripNumber = params.tripNumber;
this.serviceNumber = params.serviceNumber;
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
// this.tripNumber
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-row {
margin: 10px;
}
}
</style>

View File

@ -1,62 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule create-week-plan"
:title="title"
:visible.sync="dialogShow"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'DeleteTodayPlan',
components: {
},
data() {
return {
dialogShow: false,
loading: false
};
},
computed: {
title() {
return '删除当天计划';
}
},
mounted() {
},
methods: {
doShow(params) {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
// this.tripNumber
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-row {
margin: 10px;
}
}
</style>

View File

@ -1,143 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule manage-plan-list"
:title="title"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-dialog>
</template>
<script>
import { getRunPlanLoadList, deleteRunPlanLoad, listAllTempLateRunPlan } from '@/api/runplan';
import { getPublishMapListOnline } from '@/api/jmap/map';
export default {
name: 'ManagePlanList',
data() {
return {
dialogShow: false,
loading: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '140px',
reset: true
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('publish.mapName'),
prop: 'mapId',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
tagType: (row) => { return ''; }
},
{
title: this.$t('publish.runPlanName'),
prop: 'templatePlanId',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.templatePlanId, this.templatePlanList, ['id', 'name']); },
tagType: (row) => { return 'success'; }
},
{
title: '加载日期',
prop: 'loadTime'
},
{
type: 'button',
title: '操作',
width: '100',
buttons: [
{
name: '删除',
handleClick: this.handleDelete,
type: 'danger'
}
]
}
],
actions: [
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan }
]
},
currentModel: {}
};
},
computed: {
title() {
return '运行图计划表';
}
},
mounted() {
this.loadPageData();
},
methods: {
loadPageData() {
this.mapList = [];
getPublishMapListOnline().then(resp => {
this.mapList = resp.data;
});
this.templatePlanList = [];
listAllTempLateRunPlan().then(resp => {
this.templatePlanList = resp.data;
});
},
queryFunction(params) {
if (this.$route.query.mapId) {
params['mapId'] = this.$route.query.mapId;
}
if (this.$store.state.user.id) {
params['userId'] = this.$store.state.user.id;
}
return getRunPlanLoadList(params);
},
handleDelete(index, row) {
this.$confirm('此操作将删除次日加载的运行图, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteRunPlanLoad(row.id).then(response => {
this.$message.success('删除成功');
this.reloadTable();
}).catch(() => {
this.reloadTable();
this.$messageBox('删除失败');
});
}).catch(() => { });
},
handleCreateRunPlan() {
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
},
doShow() {
this.dialogShow = true;
this.$nextTick(()=> { this.reloadTable(); });
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,177 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule edit-planning-train"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :offset="10">列车线路</el-col>
</el-row>
<el-row>
<el-col :span="17">
<el-table :data="serviceData" border style="width: 100%" height="160">
<el-table-column prop="startStationCode" label="起点站" />
<el-table-column prop="startStationStandCode" label="起点站台" />
<el-table-column prop="endStationCode" label="终点站" />
<el-table-column prop="endStationStandCode" label="终点站台" />
</el-table>
</el-col>
<el-col :span="6" :offset="1">
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleAddTask">加任务</el-button>
</el-row>
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleReplace">&ensp;&ensp;</el-button>
</el-row>
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleDeleteTask">删任务</el-button>
</el-row>
<div class="view-box">
<el-row type="flex" justify="center">
<el-radio-group v-model="storeInOut">
<el-radio :label="1">进库</el-radio>
<el-radio :label="2">出库</el-radio>
</el-radio-group>
</el-row>
</div>
</el-col>
</el-row>
<el-row class="view-box">
<el-col :span="9" style="padding-left: 10px">
<el-input v-model="oldServiceNumber" size="small" :disabled="true" />
</el-col>
<el-col :span="9" style="padding-left: 20px">
<el-input v-model="newServiceNumber" size="small" />
</el-col>
<el-col :span="5" style="padding-left: 20px">
<el-button style="width: 150px;" @click="handleModifyingTripNumber">改车次号</el-button>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
<el-col :span="8">
<el-time-select v-model="serviceStartTime" size="small" />
</el-col>
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
<el-col :span="8">
<el-time-select v-model="serviceEndTime" size="small" />
</el-col>
</el-row>
<el-row style="margin-top: 20px">
<el-col :offset="10">线路详细信息</el-col>
</el-row>
<el-row>
<el-table :data="tripData" border style="width: 100%" height="200">
<el-table-column prop="arriveTime" label="到站时间" />
<el-table-column prop="stationCode" label="车站" />
<el-table-column prop="stationStandCode" label="站台" />
<el-table-column prop="stopTime" label="停站时间" />
<el-table-column prop="level" label="运行等级" />
</el-table>
</el-row>
<el-row style="margin-top: 20px">
<el-checkbox v-model="effect">影响后续任务</el-checkbox>
</el-row>
<el-row type="flex" justify="center">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'ModifyingPlan',
data() {
return {
dialogShow: false,
loading: false,
effect: false,
storeInOut: '1',
oldServiceNumber: '',
newServiceNumber: '',
serviceStartTime: '',
serviceEndTime: '',
serviceData: [],
tripData: []
};
},
computed: {
title() {
return '修改';
}
},
mounted() {
},
methods: {
formatTime(time) {
return formatTime(time);
},
formatName(code) {
return formatName(code);
},
doShow() {
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
//
handleAddTask() {
this.$emit('dispatchDialog', { name: 'addTask', params: {} });
},
//
handleReplace() {
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} });
},
//
handleDeleteTask() {
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} });
},
//
handleModifyingTripNumber() {
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} });
},
//
handleCommit() {
this.doClose();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.view-button {
display: list-item;
width: 150px !important;
margin-left: 0px;
}
.view-label {
height: 32px;
line-height: 32px;
}
.view-box {
padding: 10px 0px;
border: 1px inset gray;
border-top: 1px outset gray;
border-left: 1px outset gray;
}
/deep/ {
.el-row {
margin: 5px 20px;
}
}
</style>

View File

@ -1,327 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__schedule add-task"
:title="title"
:visible.sync="dialogShow"
width="1000px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="margin: 10px">
<el-row>
<el-col :span="4">
<el-row>
<el-col :span="9">
<span>车次号</span>
</el-col>
<el-col :span="15">
<el-select v-model="model.tripNumber" style="display: inline-black" placeholder="请选择">
<el-option
v-for="item in tripNumberList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="2">
<el-row>
<el-col :offset="4">
<el-checkbox v-model="model.trainManual">手工</el-checkbox>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="12">
<span>缺省停站时间</span>
</el-col>
<el-col :span="12">
<el-select v-model="model.time" style="display: inline-black" placeholder="请选择">
<el-option
v-for="item in timeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="9" :offset="2">
<span>表号</span>
</el-col>
<el-col :span="13">
<el-input v-model="model.serviceNumber" />
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="22" :offset="2">
<el-row>
<el-col :span="6">
<el-checkbox v-model="model.clearGuest">清客</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox v-model="model.continuationPlan">延续计划</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="model.firstTrain">首班车</el-checkbox>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<el-row>
<el-col :span="9">
<span>序列号</span>
</el-col>
<el-col :span="15">
<el-select v-model="model.serialNumber" style="display: inline-black" placeholder="请选择">
<el-option
v-for="item in serialNumberList"
:key="item.value"
:label="item.label"
:value="model.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="2">
<el-row>
<el-col :offset="4">
<el-checkbox v-model="model.serialManual">手工</el-checkbox>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="12">
<span>缺省运行等级</span>
</el-col>
<el-col :span="12">
<el-select v-model="model.level" style="display: inline-black" placeholder="请选择">
<el-option
v-for="item in levelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="9" :offset="2">
<span>开始时间</span>
</el-col>
<el-col :span="13">
<el-time-select v-model="model.startTime" placeholder="选择时间" :clearable="false" />
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row>
<el-col :span="22" :offset="2">
<el-row>
<el-col :span="6">
<el-checkbox v-model="model.inStock">入库</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox v-model="model.outStock">出库</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="model.lastTrain">末班车</el-checkbox>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row style="margin-bottom: 5px;">
交路
</el-row>
<el-row>
<el-table :data="model.route" border :height="140">
<el-table-column prop="beginStationCode" label="起始站">
<template slot-scope="scope">
{{ formatName(scope.row.beginStationCode) }}
</template>
</el-table-column>
<el-table-column prop="beginStationStandCode" label="起始站台" />
<el-table-column prop="endStationCode" label="终到站">
<template slot-scope="scope">
{{ formatName(scope.row.endStationCode) }}
</template>
</el-table-column>
<el-table-column prop="endStationStandCode" label="终到站台" />
<el-table-column prop="describe" label="描述" :width="280" />
<el-table-column :width="40" />
</el-table>
</el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
详情
</el-row>
<el-row>
<el-table :data="model.detail" border :height="140">
<el-table-column prop="stationCode" label="站台" :width="160">
<template slot-scope="scope">
{{ formatName(scope.row.stationCode) }}
</template>
</el-table-column>
<el-table-column prop="startTime" label="到点">
<template slot-scope="scope">
{{ formatTime(scope.row.startTime) }}
</template>
</el-table-column>
<el-table-column prop="stopTime" label="停站时间">
<template slot-scope="scope">
{{ formatTime(scope.row.stopTime) }}
</template>
</el-table-column>
<el-table-column prop="endTime" label="发点">
<template slot-scope="scope">
{{ formatTime(scope.row.endTime) }}
</template>
</el-table-column>
<el-table-column prop="level" label="运行等级" />
<el-table-column width="280" />
</el-table>
</el-row>
<el-row>
<el-col :offset="16">
<el-checkbox v-model="model.default">显示默认停站时间和运行等级</el-checkbox>
</el-col>
</el-row>
</div>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'ModifyingTask',
components: {
},
data() {
return {
dialogShow: false,
loading: false,
model: {
tripNumber: '',
serialNumber: '',
trainManual: false,
serialManual: false,
clearGuest: false,
continuationPlan: false,
firstTrain: false,
lastTrain: false,
inStock: false,
outStock: false,
startTime: '',
route: [],
detail: []
},
timeList: [],
levelList: [],
tripNumberList: [],
serialNumberList: []
};
},
computed: {
title() {
return '修改任务';
}
},
mounted() {
},
methods: {
formatTime(time) {
return formatTime(time);
},
formatName(code) {
return formatName(code);
},
loadInitData(params) {
this.model.tripNumber = params.tripNumber;
this.model.serviceNumber = params.serviceNumber;
const editData = this.$store.state.runPlan.editData[params.serviceNumber];
if (editData) {
// const tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex; });
const trainInfo = editData.trainMap[params.tripNumber];
const lastIndex = trainInfo.stationTimeList.length - 1;
const taskObj = {
tripNumber: params.tripNumber,
beginStationCode: trainInfo.stationTimeList[0].stationCode,
beginStationStandCode: '',
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
endStationStandCode: ''
};
this.model.route.push(taskObj);
trainInfo.stationTimeList.forEach((elem, index) => {
const stationObj = {
stationCode: elem.stationCode,
startTime: index == 0 ? null : trainInfo.stationTimeList[index - 1].secondTime,
stopTime: index == 0 ? null : elem.secondTime - trainInfo.stationTimeList[index - 1].secondTime,
endTime: elem.secondTime,
level: ''
};
this.model.detail.push(stationObj);
});
}
},
doShow(params) {
this.loadInitData(params);
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.el-button {
margin-left: 40px !important;
margin-right: 40px !important;
}
.el-row {
margin-bottom: 5px !important;
}
.el-input__inner {
height: 20px !important;
line-height: 20px !important;
}
.el-input {
width: 110px !important;
}
}
</style>

View File

@ -1,68 +0,0 @@
import deviceType from '../../constant/deviceType';
class Model {
constructor() {
// 公共字段部分默认初始值
this['public'] = {};
this['public'][deviceType.Signal] = {
lampPositionType: '02',
lampPostType: '02'
};
// 私有字段部分默认初始值
this['private'] = {};
this['private'][deviceType.StationControl] = {
indicatorShow: true // 标识灯名称显示
};
this['private'][deviceType.Switch] = {
nameShow: true
};
this['private'][deviceType.Section] = {
nameShow: true,
borderBorderShow: true, // 区段边界显示
destinationNameShow: true, // 目的地码名称显示
standTrackNameShow: true, // 站台轨名称显示
reentryTrackNameShow: true, // 折返轨名称显示
transferTrackNameShow: true // 转换轨名称显示
};
this['private'][deviceType.Signal] = {
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
atsAutoTriggerShow: true // ATS自动触发表示灯显示
};
this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
};
this['private'][deviceType.TrainWindow] = {
trainWindowShow: true
};
}
initPublicProps(model) {
if (model) {
var modelInitial = this.public[model._type];
if (modelInitial) {
for (var prop in modelInitial) {
model[prop] = modelInitial[prop];
}
}
}
return model;
}
initPrivateProps(model) {
if (model) {
var modelInitial = this.private[model._type];
if (modelInitial) {
for (var prop in modelInitial) {
model[prop] = modelInitial[prop];
}
}
}
return model;
}
}
export default new Model();

View File

@ -1,314 +0,0 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan';
export default {
/** 边缘高度*/
EdgeHeight: 600,
/** 间隔高度*/
CoordMultiple: 1,
/** 偏移时间*/
TranslationTime: 60 * 60 * 2,
/** excel解析配置*/
ExcelConfig: {
beginRow: 1,
beginCol: 0,
fieldNum: 10,
sepField: '车次',
columns: {
'车站名': { key: 'stationName', formatter: (val) => { return val; } },
'到点': { key: 'arriveTime', formatter: (val) => { return val; } },
'发点': { key: 'departureTime', formatter: (val) => { return val; } }
}
},
/** 解析exal数据转换为Json后台数据*/
importData(Sheet, JsonData) {
var dataList = convertSheetToList(Sheet, true);
var needList = Object.keys(this.ExcelConfig.columns);
if (dataList && dataList.length) {
for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList.length; colIndex += this.ExcelConfig.fieldNum + 1) {
var isContinue = true;
var tripObj = { code: '', arrivalList: [] };
for (var rowIndex = this.ExcelConfig.beginRow; isContinue; rowIndex += 1) {
isContinue = false;
var stationObj = {};
for (var index = 0; index < this.ExcelConfig.fieldNum; index += 1) {
if (dataList[colIndex + index]) {
var title = dataList[colIndex + index][0];
var value = dataList[colIndex + index][rowIndex];
if (title && value) {
// 数据列解析
isContinue = true;
var titleStr = `${title}`.trim();
var valueStr = `${value}`.trim();
if (titleStr == this.ExcelConfig.sepField) {
if (tripObj.code) {
const length = tripObj.arrivalList.length;
if (length == 1) {
tripObj.arrivalList[0]['flag'] = true;
}
JsonData.push(tripObj);
tripObj = { code: valueStr, arrivalList: [] };
} else {
tripObj.code = valueStr;
}
}
// 取需要的字段
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
stationObj[this.ExcelConfig.columns[titleStr].key] = this.ExcelConfig.columns[titleStr].formatter(valueStr);
}
}
}
}
// 添加字段值
if (Object.keys(stationObj).length) {
tripObj.arrivalList.push(stationObj);
}
}
// 添加最后那条没有车次的记录
if (tripObj.code) {
const length = tripObj.arrivalList.length;
if (length) {
tripObj.arrivalList[length - 1]['flag'] = true;
}
JsonData.push(tripObj);
}
}
}
return JsonData;
},
/** 将后台数据解析成图表*/
convertDataToModels(data, stations, kmRangeCoordMap, lineStyle) {
var models = [];
if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
/** 按服务遍历数据*/
data.serviceNumberDataList.forEach((service) => {
/** 按车次遍历数据*/
var isBackup = true;
var opt = { name: '', markPointData: [], data: [] };
if (service.tripNumberDataList && service.tripNumberDataList.length) {
service.tripNumberDataList.forEach((train, j) => {
var pointdata = {};
var idx = 0;
var num = 0;
var lastPoint = null;
var nextPoint = null;
/** 如果车次号为空,不显示名称*/
if (train.tripNumber) {
/** 创建标记点名称和坐标*/
pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode;
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(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.directionCode}${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
}
});
/** 计算折返点车次坐标点集合*/
if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) {
lastPoint = train.stationTimeList[idx - 1];
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(train.tripNumber);
const aa = `${train.directionCode}${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
}
/** 如果是备用车,按车次添加线*/
if (train.backup) {
/** 创建一条完成的服务数据*/
opt.name += j;
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) {
models.push(model);
opt = { name: '', markPointData: [], data: [] };
}
}
isBackup = train.backup;
});
// 不是备用车,按服务添加线
if (!isBackup) {
/** 创建一条完成的服务数据*/
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) {
models.push(model);
}
}
}
});
return models;
} else {
return [];
}
},
/** 更新数据并解析成图表*/
updateDataToModels(data, stations, kmRangeCoordMap, runPlanData, series, lineStyle) {
if (data && data.length) {
data.forEach(elem => {
/** 判断此条记录的服务号是否存在*/
if (!runPlanData[elem.serviceNumber]) {
/** 创建一个新服务号标记*/
runPlanData[elem.serviceNumber] = {};
/** 不存在此服务号则需要创建一条新的line*/
series.push(createSeriesModel({
zlevel: 1,
name: `run${elem.serviceNumber}`,
data: [],
markPointData: []
}, Object.assign({ color: hexColor.toCreate() }, lineStyle)));
}
/** 添加数据*/
series.forEach(serie => {
/** 找到服务号所在图数据的位置*/
if (serie.name == `run${elem.serviceNumber}`) {
/** 添加车组号记录标记*/
if (!runPlanData[elem.serviceNumber][elem.tripNumber]) {
runPlanData[elem.serviceNumber][elem.tripNumber] = [];
}
runPlanData[elem.serviceNumber][elem.tripNumber].push(elem);
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
return parseInt(a.secondTime) - parseInt(b.secondTime);
});
/** 如果此记录车组号的数据为第一条时,则打上标签*/
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.directionCode}${elem.tripNumber}`,
color: lineStyle.color || '#000'
}));
}
/** 计算折返点*/
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {
var num = this.computedReentryNumber(elem.tripNumber);
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2], num), lastPoint[2]]);
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2], num), lastPoint[2]]);
}
}
/** 添加车组号数据到对应的服务图数据中*/
serie.data.push(nextPoint);
/** 保证原始数据排序*/
serie.data.sort((a, b) => {
return parseInt(a[0]) - parseInt(b[0]);
});
}
});
});
}
return series;
},
/** 初始化Y轴*/
initializeYaxis(stations) {
return createMarkLineModels(stations, (elem) => {
return this.EdgeHeight + elem.kmRange * this.CoordMultiple;
});
},
/** 将后台数据转换为试图序列模型*/
convertStationsToMap(stations) {
var map = {};
if (stations && stations.length) {
stations.forEach((elem) => {
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
});
}
return map;
},
/** 计算y轴最小值*/
computedYaxisMinValue(stations) {
return stations[0].kmRange * this.CoordMultiple;
},
/** 计算y轴最大值*/
computedYaxisMaxValue(stations) {
return stations[stations.length - 1].kmRange * this.CoordMultiple + this.EdgeHeight * 2;
},
/** 格式化y轴数据*/
computedFormatYAxis(stations, params) {
var yText = '';
stations.forEach(elem => {
if (elem.kmRange < parseInt(params.value) / this.CoordMultiple - this.EdgeHeight) {
yText = elem.kmRange + 'm';
}
});
return yText;
},
/** 根据是否和上一个车次是否相交,计算下一个车次的折返的高度*/
computedReentryNumber(code) {
return parseInt(code || 1) % 2 ? 1 : 2;
},
/** 根据方向计算y折返偏移量*/
getYvalueByDirectionCode(defaultVlue, directionCode, num) {
if (directionCode === '1') {
defaultVlue -= this.EdgeHeight / 2 * num;
} else if (directionCode === '2') {
defaultVlue += this.EdgeHeight / 2 * num;
}
return defaultVlue;
},
/** 根据elem计算y值*/
getCoordYByElem(stations, kmRangeCoordMap, elem, directionCode, isSpecial, num) {
var defaultVlue = 0;
var station = stations.find(it => { return it.code == elem.stationCode; });
if (station) {
defaultVlue = kmRangeCoordMap[`${station.kmRange}`];
if (isSpecial) {
defaultVlue = this.getYvalueByDirectionCode(defaultVlue, directionCode, num);
}
}
return defaultVlue;
}
};

View File

@ -1,403 +0,0 @@
<template>
<div class="plan-schedule" style="width: 100%">
<title-bar ref="titleBar" @back="back" />
<menu-bar ref="menuBar" :line-code="lineCode" @dispatchDialog="dispatchDialog" />
<schedule ref="schedule" :group="group" :line-code="lineCode" :max-height="height" :max-width="width" />
<status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" />
<manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" />
<create-week-plan ref="createWeekPlan" @reloadTable="reloadTable" />
<create-today-plan ref="createTodayPlan" />
<modifying-plan ref="modifyingPlan" @dispatchDialog="dispatchDialog" />
<add-task ref="addTask" />
<delete-task ref="deleteTask" />
<modifying-task ref="modifyingTask" />
</div>
</template>
<script>
import TitleBar from './titleBar';
import MenuBar from './menuBar';
import StatusBar from './statusBar';
import Schedule from './schedule';
import ManagePlanList from '../menusPlan/managePlanList';
import CreateWeekPlan from '../menusPlan/createWeekPlan';
import CreateTodayPlan from '../menusPlan/createTodayPlan';
import ModifyingPlan from '../menusPlan/modifyingPlan';
import AddTask from '../menusPlan/addTask';
import DeleteTask from '../menusPlan/deleteTask';
import ModifyingTask from '../menusPlan/modifyingTask';
export default {
name: 'Menus',
components: {
TitleBar,
MenuBar,
StatusBar,
Schedule,
ManagePlanList,
CreateWeekPlan,
CreateTodayPlan,
ModifyingPlan,
AddTask,
DeleteTask,
ModifyingTask
},
props: {
group: {
type: String,
required: true
}
},
data() {
return {
};
},
computed: {
lineCode() {
return this.$route.query.lineCode || '02';
},
width() {
return this.$store.state.app.width;
},
height() {
return this.$store.state.app.height;
}
},
methods: {
setPosition() {
this.$nextTick(() => {
this.$refs.schedule.setPosition();
});
},
dispatchDialog(dialogObj) {
this.$nextTick(() => {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].doShow(dialogObj.params);
}
});
},
reloadTable(dialogObj) {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].reloadTable();
}
},
confirm(params) {
},
back() {
this.$emit('back');
}
}
};
</script>
<style>
.plan-schedule {
position: absolute;
background: gray;
}
.plan-schedule .pop-menu {
background: #F0F0F0;
}
.plan-schedule .pop-menu span {
color: #000;
}
.plan-schedule .system-close {
cursor: pointer;
position: absolute;
right: 0px;
background: -webkit-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -o-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -moz-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid white;
border-radius: 4px;
}
.plan-schedule .system-close::before {
position: absolute;
height: 22px;
line-height: 22px;
top: 0px;
left: 0px;
font-size: x-large;
}
.plan-schedule .pop-menu .is-disabled span {
color: #B4B3B8;
}
.beijing-01__schedule {
overflow: hidden !important;
}
.beijing-01__schedule .el-dialog {
background: rgba(0, 85, 231, 1);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
border: 2px solid #727375;
border-radius: 4px;
color: #000;
font-size: 14px;
}
.beijing-01__schedule .el-dialog .el-dialog__header {
height: 30px;
padding: 5px;
}
.beijing-01__schedule .el-dialog .el-dialog__footer {
background: #ECE9D8;
opacity: 1;
}
.beijing-01__schedule .el-dialog .el-dialog__body {
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
margin: 0px 3px 3px 3px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
color: #000;
background: #ECE9D8;
opacity: 1;
}
.beijing-01__schedule .el-dialog .el-dialog__title {
font-size: 16px;
}
.beijing-01__schedule .el-dialog .el-dialog__headerbtn {
background: -webkit-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -o-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -moz-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid white;
border-radius: 4px;
top: 0px;
right: 3px;
line-height: 26px;
width: 26px;
}
.beijing-01__schedule .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.beijing-01__schedule .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.beijing-01__schedule .el-dialog .el-form {
background: #ECE9D8 !important;
}
.beijing-01__schedule .el-dialog .el-card {
background: #ECE9D8 !important;
}
.beijing-01__schedule .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #ECE9D8;
}
.beijing-01__schedule .el-dialog .expand {
width: 120px;
}
.beijing-01__schedule .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.beijing-01__schedule .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.beijing-01__schedule .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.beijing-01__schedule .el-dialog .el-button:disabled span {
border: 0px;
}
.beijing-01__schedule .el-dialog .button-group {
margin: 0px 5px;
text-align: center !important;
}
.beijing-01__schedule .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.beijing-01__schedule .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__schedule .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.beijing-01__schedule .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.beijing-01__schedule .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__schedule .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.beijing-01__schedule .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.beijing-01__schedule .el-dialog .el-table .cell {
line-height: unset !important;
}
.beijing-01__schedule .el-dialog .el-table th.is-leaf {
background: #ECE9D8 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.beijing-01__schedule .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.beijing-01__schedule .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.beijing-01__schedule .el-dialog .current-row>td {
background: #316AC5 !important;
color: #fff !important;
}
.beijing-01__schedule .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__schedule .el-dialog .el-checkbox__label {
color: #000 !important;
}
.beijing-01__schedule .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.beijing-01__schedule .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.beijing-01__schedule .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-01__schedule .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.beijing-01__schedule .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__schedule .el-dialog .el-radio__label {
color: #000 !important;
}
.beijing-01__schedule .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-01__schedule .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.beijing-01__schedule .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.beijing-01__schedule .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.beijing-01__schedule .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.beijing-01__schedule .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.beijing-01__schedule .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.beijing-01__schedule .el-dialog .table {
margin-top: 10px;
}
.beijing-01__schedule .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.beijing-01__schedule .el-dialog .button-group {
margin-top: 10px;
}
.beijing-01__schedule .el-dialog .el-tree__empty-block {
background: #E9E9E9 !important;
color: #000 !important;
}
</style>

View File

@ -1,514 +0,0 @@
<template>
<div id="PlanMenuBar">
<div class="nav">
<template v-for="(item,i) in menu">
<template v-if="noShowingChildren(item.children)">
<li class="nav-li" @click="hookClick(item)">
<span class="nav-li-text">{{ item.title }}</span>
</li>
</template>
<template v-else>
<li class="nav-li" @click.stop="popupMenuA(item, i)">
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template
v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)"
>
<li v-if="child.type === 'separator'" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li v-else-if="child.type === 'file'" class="menu-li">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<el-button type="text" class="button" :disabled="child.disabled">
<input
:ref="child.label"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(child)"
>
{{ child.title }}
</el-button>
</span>
</div>
</li>
<li v-else class="menu-li" @click.stop="popupMenuB(child, j)">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<template v-for="(grandchild,k) in child.children">
<li v-if="grandchild.type === 'separator'" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li v-else-if="grandchild.type === 'file'" class="menu-li">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<el-button
type="text"
class="button"
:disabled="grandchild.disabled"
>
<input
:ref="grandchild.label"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(grandchild)"
>
{{ grandchild.title }}
</el-button>
</span>
</div>
</li>
<li v-else class="menu-li" @click.stop="hookClick(grandchild)">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
<li v-if="child.type === 'separator'" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li v-else-if="child.type === 'file'" class="menu-li">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<el-button type="text" class="button" :disabled="child.disabled">
<input
:ref="child.title"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(child)"
>
{{ child.title }}
</el-button>
</span>
</div>
</li>
<li v-else class="menu-li" @click.stop="hookClick(child)">
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
</li>
</template>
</template>
</ul>
</li>
</template>
</template>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'PlanMenuBar',
props: {
lineCode: {
type: String,
required: true
}
},
data() {
return {
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
menu: [
{
title: '文件F',
children: [
]
},
{
title: '显示V',
children: [
// {
// title: '',
// },
// {
// title: '',
// },
// {
// title: ''
// }
]
},
{
title: '编辑E',
children: [
// {
// title: '',
// click: this.handleEditPlanningTrain
// },
// {
// title: '',
// click: this.handleAddTask
// },
// {
// title: '',
// click: this.handleDeleteTask
// },
// {
// title: '',
// click: this.handleModifyingPlanId
// },
// {
// title: '',
// click: this.handleTranslationalMulTrain
// }
]
},
{
title: '工具T',
children: [
{
title: '查看计划列表',
click: this.handleViewPlanSchedule
},
{
title: '创建一周计划',
click: this.handleCreateWeekPlan
},
{
title: '加载当天计划',
click: this.handleReloadTodayPlan
}
// {
// title: '',
// click: this.handleValidityCheck
// }
]
},
{
title: '帮助H',
children: [
]
}
]
};
},
computed: {
...mapGetters('training', [
'mode'
]),
...mapGetters('map', [
'stationList'
])
},
watch: {
tempClassA() {
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
},
tempClassB() {
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
},
'$store.state.menuOperation.break': function (val) {
if (val) {
this.classA = this.classB = -1;
} else {
this.classA = this.tempClassA;
this.classB = this.tempClassB;
}
}
},
mounted() {
this.initMenu();
},
methods: {
initMenu() {
this.clickEvent();
this.closeMenu();
},
clickEvent() {
const self = this;
window.onclick = function (e) {
self.closeMenu(false);
};
},
noShowingChildren(children) {
if (!children || children.length <= 0) {
return true;
}
return false;
},
hasShowingChildren(children) {
if (children && children.length > 0) {
return true;
}
return false;
},
closeMenu() {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
},
hookClick(item, event) {
this.closeMenu();
setTimeout(() => {
if (item && typeof item.click == 'function') {
item.click();
}
}, 500);
},
popupMenuA(item, index) {
this.clickEvent();
this.tempClassA = index;
this.tempClassB = -1;
},
popupMenuB(item, index) {
this.tempClassB = index;
},
openLoadFile(item) {
const obj = this.$refs[item.title][0];
if (obj.files) {
const file = obj.files[0];
item.click(file);
obj.value = '';
}
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
},
//
refresh() {
this.closeMenu(true);
EventBus.$emit('refresh');
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
//
handleEditPlanningTrain() {
this.$emit('dispatchDialog', { name: 'modifyingPlan' });
},
//
handleAddTask() {
const params = this.$store.state.runPlan.selected;
this.$emit('dispatchDialog', { name: 'addTask', params });
},
//
handleDeleteTask() {
const params = this.$store.state.runPlan.selected;
this.$emit('dispatchDialog', { name: 'deleteTask', params });
},
//
handleModifyingTask() {
const params = this.$store.state.runPlan.selected;
this.$emit('dispatchDialog', { name: 'modifyingTask', params });
},
//
handleModifyingPlanId() {
this.$emit('dispatchDialog', { name: 'modifyingPlanId' });
},
//
handleTranslationalMulTrain() {
this.$emit('dispatchDialog', { name: 'translationalMulTrain' });
},
//
handleViewPlanSchedule() {
this.$emit('dispatchDialog', { name: 'managePlanList' });
},
//
handleCreateWeekPlan() {
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
},
//
handleReloadTodayPlan() {
this.$emit('dispatchDialog', { name: 'createTodayPlan' });
},
//
handleValidityCheck() {
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$top: 25px;
$width: 30px;
$height: 20px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 160px;
$menuItemPadding: 5px;
#PlanMenuBar {
z-index: 10;
position: absolute;
top: $top;
width: 100%;
height: $height;
line-height: $height;
}
.nav {
display: block;
cursor: pointer;
color: #0000;
background: #EBEADB;
list-style: none;
border: 1px solid #B6BCCC !important;
}
.nav-li {
position: relative;
display: inline-block;
padding-left: $menuPadding;
padding-right: $menuPadding;
}
.nav-li:active {
background: #C9D0E1;
border-radius: 4px;
}
.nav-li-text {
font-size: 13px;
color: #000;
text-align: center;
text-decoration: none;
}
.nav-ul {
display: none;
position: absolute;
list-style: none;
border: 1px solid gray;
width: $menuItemWidth;
padding: 0px;
margin: 0px;
}
.menu-ul {
display: none;
list-style: none;
background: #F0F0F0;
line-height: $menuItemHeight;
width: $menuItemWidth;
bottom: $menuItemHeight;
}
.active {
position: absolute;
display: block !important;
}
.menu-ul-text {
font-size: 14px;
color: #000;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
border-left: 1px solid #000;
border-right: 1px solid #000;
}
.menu-separator {
text-align: left;
background: #F0F0F0;
height: 2px;
line-height: 2px;
}
.menu-separator .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
height: 100%;
background: #EFECDE;
}
.menu-separator .separator {
display: inline-block;
background: #CACACA;
margin-left: 5px;
height: 2px;
width: $menuItemWidth - $width - 30px;
}
.menu-li {
text-align: left;
background: #F0F0F0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-block {
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-text {
font-size: 14px;
color: #000;
}
.menu-li-text .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
background: #EFECDE;
}
.menu-li-text .label {
display: inline-block;
margin-left: 5px;
}
.menu-li-text .button {
position: relative;
overflow: hidden;
margin-left: 10px;
line-height: 0px;
width: $menuItemWidth - $width;
top: -$menuItemHeight;
color: #000;
cursor: pointer;
input {
opacity: 0;
cursor: pointer;
position: absolute;
top: 0px;
width: $menuItemWidth - $width - 10px;
}
}
.menu-li-block:hover {
background: #C9DEF7;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>

View File

@ -1,172 +0,0 @@
<template>
<div id="PlanMenuTool">
<div class="nav">
<div class="tool" v-for="(item,index) in tools" :key="index">
<img :src="item.src" :alt="item.title" />
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { prefixIntrger } from '@/utils/date';
import logo_ from '@/assets/logo_.png';
export default {
name: 'PlanMenuTool',
data() {
return {
tools: [
{
title: '服务器1',
operate: '',
src: logo_,
click: this.undeveloped,
},
{
title: '服务器2',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '前置机1',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '前置机2',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '主调',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '调度台1',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '调度台2',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '调度台3',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '大屏',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '维护工作站',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '运行图显示人工站',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '跳停',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '扣车',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '列车报警',
operate: '',
src: logo_,
click: this.undeveloped,
}
]
}
},
watch: {
'$store.state.training.initTime': function (initTime) {
let date = new Date(initTime);
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`
}
},
computed: {
isShowSystemTime() {
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
}
},
mounted() {
this.initTools();
},
methods: {
initTools() {
this.tools = [];
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
$top: 48px;
$width: 25px;
$height: 25px;
#PlanMenuTool {
z-index: 5;
position: absolute;
width: 100%;
top: $top;
}
.nav {
display: block;
color: #0000;
background: #EBEADB;
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
height: $height;
line-height: $height;
}
.tool {
padding-left: 10px;
display: flex;
justify-content: center;
cursor: pointer;
position: relative;
float: left;
margin: 1px;
width: $width;
img {
display: block;
text-align: center;
padding-top: 2px;
height: $height - 5;
width: $width - 5;
}
}
</style>

View File

@ -1,471 +0,0 @@
<template>
<div id="PlanSchedule" :style="{top: top+'px', height: height+'px'}">
<div class="left">
<div :id="runPlanId" />
</div>
<div class="right">
<data-table
ref="serviceTable"
:height="height/2"
:config="serviceNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="scheduleTouch"
/>
<data-table
ref="tripTable"
:height="height/2"
:config="tripNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="trainNumTouch"
/>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date';
import { runDiagramGetTime } from '@/api/simulation';
import DataTable from '../menusPlan/components/dataTable';
import echarts from 'echarts';
export default {
name: 'PlanSchedule',
components: {
DataTable
},
props: {
group: {
type: String,
required: true
},
lineCode: {
type: String,
required: true
},
maxWidth: {
type: Number,
require: true
},
maxHeight: {
type: Number,
required: true
}
},
data() {
return {
top: 0,
height: 0,
heights: [100, 100],
runPlanId: 'plan-schedule-id',
myChart: null,
PlanConvert: {},
serviceNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.serviceNumberChange,
showClose: false,
columns: [
{
prop: 'serviceNumber',
label: '表号'
},
{
width: 40
}
]
},
tripNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.tripNumberChange,
showClose: false,
columns: [
{
prop: 'tripNumber',
label: '车次号'
},
{
width: 40
}
]
},
realData: {},
kmRangeCoordMap: {},
option: {
title: {
text: '',
left: 'center'
},
grid: {
top: '30px',
left: '120px',
right: '40px',
bottom: '65px',
containLabel: true,
backgroundColor: 'floralwhite'
},
toolbox: {
// right: '30px',
// feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
// restore: {},
// saveAsImage: {}
// }
},
tooltip: {
axisPointer: {
trigger: 'item',
type: 'cross'
},
formatter: this.axisTooltip,
borderWidth: 1
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: [],
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
formatter: this.xAxisLableFormat,
textStyle: {
color: '#333'
}
},
axisPointer: {
snap: true,
label: {
formatter: this.xAxisPointFormat,
backgroundColor: 'rgb(255,0,0,0.5)',
color: 'white'
}
}
}
],
yAxis: {
type: 'value',
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
interval: 'auto',
formatter: this.yAxisLableFormat
},
axisPointer: {
xAxisIndex: 'all',
label: {
formatter: this.yAxisPointFormat,
backgroundColor: 'rgb(0,100,0,0.5)',
color: 'white'
}
},
min: 0,
max: 0
},
series: [],
dataZoom: [
{
type: 'inside'
},
{
fiterMode: 'filter',
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '80%',
handleStyle: {
color: '#fff',
shadowBlur: 3,
shadowColor: 'rgba(0, 0, 0, 0.6)',
shadowOffsetX: 2,
shadowOffsetY: 2
},
bottom: '20px'
}
]
},
absoluteTime: 2 * 3600,
indexKmRangeMap: {}
};
},
computed: {
...mapGetters('runPlan', [
'stations'
])
},
watch: {
maxWidth() {
this.setPosition();
},
maxHeight() {
this.setPosition();
},
'$store.state.runPlan.planLoadedCount': async function () {
await this.loadChartPage();
},
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
'$store.state.runPlan.selected.serviceNumber': function (val) {
const index = this.serviceNumberConfig.data.findIndex(elem => {
return elem.serviceNumber == val;
});
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
},
'$store.state.runPlan.selected.tripNumber': function (val) {
const index = this.tripNumberConfig.data.findIndex(elem => {
return elem.tripNumber == val;
});
this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]);
}
},
mounted() {
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
},
beforeDestroy() {
this.destroy();
},
methods: {
serviceNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
if (serviceObj) {
this.analyticalTripNumber(serviceObj.trainMap);
}
}
},
tripNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
}
},
async analyticalServiceNumber(data) {
this.serviceNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(serviceNumber => { return { serviceNumber }; });
},
async analyticalTripNumber(data) {
this.tripNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(tripNumber => { return { tripNumber }; });
},
async setPosition() {
this.$nextTick(() => {
let top = 3;
const width = this.maxWidth * 0.85;
let height = this.maxHeight;
const titleBar = document.getElementById('PlanTitleBar');
const menuBar = document.getElementById('PlanMenuBar');
const menuTool = document.getElementById('PlanMenuTool');
const statusBar = document.getElementById('PlanStatusBar');
if (titleBar) {
top += (titleBar.offsetHeight || 0);
}
if (menuBar) {
top += (menuBar.offsetHeight || 0);
}
if (menuTool) {
top += (menuTool.offsetHeight || 0);
}
if (statusBar) {
height -= (statusBar.offsetHeight || 0);
}
height = height - top;
this.$store.dispatch('runPlan/resize', { width, height });
if (this.top != top) {
this.top = top;
}
if (this.height != height) {
this.height = height - 20 * 2;
}
});
},
async loadChartPage() {
try {
let series = [];
const stations = this.$store.state.runPlan.stations;
const planData = this.$store.state.runPlan.planData;
this.viewDisabled = true;
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
series = this.pushModels(series, [this.PlanConvert.initializeYaxis(stations)]);
series = this.pushModels(series, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { color: '#000', width: 0.5 }));
await this.loadInitData(series);
await this.analyticalServiceNumber(this.$store.state.runPlan.editData);
this.viewDisabled = false;
} catch (error) {
this.viewDisabled = false;
this.$messageBox(`加载运行图数据失败`);
}
},
async loadInitData(series) {
this.myChart && this.myChart.showLoading();
await this.xAxisInit();
await this.yAxisInit();
await this.loadInitChart(series);
this.myChart && this.myChart.hideLoading();
},
pushModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
if (elem) {
series.push(elem);
}
});
}
return series;
},
loadInitChart(series) {
return new Promise((resolve, reject) => {
try {
this.destroy();
let startValue = 3600 + this.PlanConvert.TranslationTime;
const offsetTime = 3600;
runDiagramGetTime(this.group).then(resp => {
startValue = resp.data - this.PlanConvert.TranslationTime;
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
this.option.series = series;
this.myChart = echarts.init(document.getElementById(this.runPlanId));
if (this.myChart) {
this.myChart.setOption(this.option);
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
this.myChart.on('click', this.mouseClick);
}
});
resolve(true);
} catch (error) {
reject(error);
}
});
},
xAxisPointFormat(params) {
return timeFormat(params.value);
},
yAxisPointFormat(params) {
return this.PlanConvert.computedFormatYAxis(this.stations, params);
},
xAxisLableFormat(value, index) {
if (value % 60 === 0) {
return timeFormat(value);
}
},
yAxisLableFormat(value, index) {
return '';
},
xAxisInit() {
const list = [];
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
list.push(time);
}
const startValue = 3600 * 6;
const offsetTime = 3600 * 1;
this.option.xAxis[0].data = list;
if (!this.option.dataZoom[0].startValue) {
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
}
if (!this.option.dataZoom[0].endValue) {
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
}
},
yAxisInit() {
if (Object.keys(this.PlanConvert).length) {
this.option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
this.option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
}
},
axisTooltip(param) {
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
].join('');
},
mouseClick(params) {
const model = {
serviceNumber: params.seriesName
};
this.$store.dispatch('runPlan/setSelected', model);
},
reSize(opt) {
if (this.myChart) {
this.myChart.resize({
width: opt.width,
height: opt.height,
silent: false
});
}
},
destroy() {
if (this.myChart && this.myChart.isDisposed) {
this.myChart.dispose();
this.myChart = null;
}
},
scheduleTouch() {
},
trainNumTouch() {
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
#PlanSchedule {
z-index: 5;
position: absolute;
width: 100%;
.left {
height: 100%;
width: 85%;
float: left;
}
.right {
height: 100%;
width: 15%;
float: right;
}
}
</style>

Some files were not shown because too many files have changed in this diff Show More